Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-inputs

Package Overview
Dependencies
Maintainers
2
Versions
251
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.10 to 1.0.11

dist\global\numerictextbox.js

2

dist/ej2-inputs.umd.min.js

@@ -11,2 +11,2 @@ /*!

!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(10)],void 0!==(r=function(e,t,n,i){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n),r(i)}.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 o=e.length-1;o>=0;o--)(r=e[o])&&(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(4),n(8),n(3),n(9)],void 0!==(r=function(e,t,n,i,r,o,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-input-group-icon",d=new RegExp("/^(-)?(d*)$/"),h=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.decimalSeparator=".",i.intRegExp=new RegExp("/^(-)?(d*)$/"),i.isCalled=!1,i}return s(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=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,o.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(),o.isNullOrUndefined(this.width)||r.setStyleAttribute(this.container,{width:o.formatUnit(this.width)}),o.isNullOrUndefined(this.height)||r.setStyleAttribute(this.container,{height:o.formatUnit(this.height)}),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 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(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,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"),o.isUndefined(this.inputName)||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(c+" 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(c+" 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),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")}},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,o=s?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),r.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,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=l.getNumericObject(this.locale),t=o.getValue("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals?d:(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.element.value=t,this.element.setSelectionRange(t.length,t.length)}n.Browser.isDevice||n.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOut=function(e){this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t),n.Browser.isDevice||n.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(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(c)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(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:o.formatUnit(e.width)});break;case"height":r.setStyleAttribute(this.container,{height:o.formatUnit(e.height)});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":o.setValue(s,o.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":o.setValue(s,o.getValue(s,e),this.cultureInfo),this.updateValue(this.value);break;case"format":o.setValue(s,o.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("")],h.prototype,"cssClass",void 0),a([n.Property(null)],h.prototype,"value",void 0),a([n.Property(-Number.MAX_VALUE)],h.prototype,"min",void 0),a([n.Property(Number.MAX_VALUE)],h.prototype,"max",void 0),a([n.Property(1)],h.prototype,"step",void 0),a([n.Property(null)],h.prototype,"width",void 0),a([n.Property(null)],h.prototype,"height",void 0),a([n.Property(null)],h.prototype,"placeholder",void 0),a([n.Property(!0)],h.prototype,"showSpinButton",void 0),a([n.Property(!1)],h.prototype,"readonly",void 0),a([n.Property(!0)],h.prototype,"enabled",void 0),a([n.Property(!1)],h.prototype,"enableRtl",void 0),a([n.Property("n2")],h.prototype,"format",void 0),a([n.Property(null)],h.prototype,"decimals",void 0),a([n.Property(null)],h.prototype,"currency",void 0),a([n.Property(!0)],h.prototype,"strictMode",void 0),a([n.Property(!1)],h.prototype,"validateDecimalOnType",void 0),a([n.Property("Auto")],h.prototype,"floatLabelType",void 0),a([n.Event()],h.prototype,"created",void 0),a([n.Event()],h.prototype,"destroyed",void 0),a([n.Event()],h.prototype,"change",void 0),h=a([i.NotifyPropertyChanges],h),t.NumericTextBox=h,t.numerictextboxHelper=n.CreateBuilder(h)}.apply(t,i))&&(e.exports=r)},function(t,n){t.exports=e},function(e,t,n){var i,r;i=[n,t,n(5)],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(6),n(7)],void 0!==(r=function(e,t,n,i){"use strict";function r(e,t){var n=document.createElement(e);return void 0===t?n:(n.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(n.className=t.className),void 0!==t.id&&(n.id=t.id),void 0!==t.styles&&n.setAttribute("style",t.styles),void 0!==t.attrs&&p(n,t.attrs),n)}function s(e,t){for(var n=o(t),i=0,r=e;i<r.length;i++)for(var s=r[i],a=0,l=n;a<l.length;a++){var u=l[a];s.classList.contains(u)||s.classList.add(u)}return e}function a(e,t){for(var n=o(t),i=0,r=e;i<r.length;i++){var s=r[i];if(""!==s.className)for(var a=0,l=n;a<l.length;a++){var u=l[a];s.classList.remove(u)}}return e}function o(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function l(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function u(e,t){for(var n=document.createDocumentFragment(),i=0,r=e;i<r.length;i++){var s=r[i];n.appendChild(s)}return t.insertBefore(n,t.firstElementChild),e}function c(e,t){for(var n=document.createDocumentFragment(),i=0,r=e;i<r.length;i++){var s=r[i];n.appendChild(s)}return t.appendChild(n),e}function d(e){return e.parentNode.removeChild(e)}function h(e){var t=e.parentNode;n.EventHandler.clearEvents(e),t.removeChild(e)}function p(e,t){for(var n=Object.keys(t),i=e,r=0,s=n;r<s.length;r++){var a=s[r];i.setAttribute(a,t[a])}return i}function m(e,t){return void 0===t&&(t=document),t.querySelector(e)}function v(e,t){return void 0===t&&(t=document),t.querySelectorAll(e)}function f(e,t){var n=e;if("function"==typeof n.closest)return n.closest(t);for(;n&&1===n.nodeType;){if(O(n,t))return n;n=n.parentNode}return null}function y(e){for(var t=[],n=Array.prototype.slice.call(e.parentNode.childNodes),i=0,r=n;i<r.length;i++){var s=r[i];s.nodeType===Node.ELEMENT_NODE&&e!==s&&t.push(s)}return t}function b(e,t,n){var r=e.getAttribute(t);return i.isNullOrUndefined(r)&&(e.setAttribute(t,n.toString()),r=n),r}function g(e,t){void 0!==t&&Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function E(e,t,n){s([e],t),a([e],n)}function O(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return n?n.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=r,t.addClass=s,t.removeClass=a,t.isVisible=l,t.prepend=u,t.append=c,t.detach=d,t.remove=h,t.attributes=p,t.select=m,t.selectAll=v,t.closest=f,t.siblings=y,t.getAttributeOrDefault=b,t.setStyleAttribute=g,t.classList=E,t.matches=O}.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});var i=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,i,r,s,a){var o,l=e.addOrGetEventData(t);o=a?n.debounce(r,a):r,s&&(o=o.bind(s));for(var u=i.split(" "),c=0;c<u.length;c++)l.push({name:u[c],listener:r,debounce:o}),t.addEventListener(u[c],o)},e.remove=function(t,n,i){for(var r=e.addOrGetEventData(t),s=n.split(" "),a=0;a<s.length;a++)!function(e){var n,a=-1;r&&0!==r.length&&r.some(function(t,r){return t.name===s[e]&&t.listener.toString()===i.toString()&&(a=r,n=t.debounce,!0)}),-1!==a&&r.splice(a,1),t.removeEventListener(s[e],n)}(a)},e.clearEvents=function(t){var i,r;i=e.addOrGetEventData(t),r=n.extend([],r,i);for(var s=0;s<r.length;s++)t.removeEventListener(r[s].name,r[s].debounce),i.shift()},e.trigger=function(t,n,i){for(var r=e.addOrGetEventData(t),s=0,a=r;s<a.length;s++){var o=a[s];o.name===n&&o.debounce.call(this,i)}},e}();t.EventHandler=i}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t],void 0!==(r=function(e,t){"use strict";function n(e,t){var n=t;return n.unshift(void 0),new(Function.prototype.bind.apply(e,n))}function i(e){var t,n=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(n);var i="ej2"+N(n),r=function(n){n.source===window&&"string"==typeof n.data&&n.data.length<=32&&n.data===i&&(e(),t())};return window.addEventListener("message",r,!1),window.postMessage(i,"*"),t=function(){window.removeEventListener("message",r)}}function r(e,t){for(var n=t,i=e.split("."),r=0;r<i.length&&!h(n);r++)n=n[i[r]];return n}function s(e,t,n){var i,r,s=e.split("."),a=n||{},o=a,l=s.length;for(i=0;i<l;i++)r=s[i],i+1===l?o[r]=void 0===t?{}:t:d(o[r])&&(o[r]={}),o=o[r];return a}function a(e,t){delete e[t]}function o(e){var t={};return!d(e)&&e.constructor===t.constructor}function l(e,t){return e[t]}function u(e,t){if(!d(t))for(var n=e,i=t,r=Object.keys(t),s=0,a=r;s<a.length;s++){var o=a[s];n[o]=i[o]}}function c(e,t,n,i){var r=e||{},s=arguments.length;i&&(s-=1);for(var a=arguments,l=1;l<s;l++)!function(e){if(!a[e])return"continue";var t=a[e];Object.keys(t).forEach(function(e){var n,s=r[e],a=t[e];i&&o(a)?(n=o(s)?s:{},r[e]=c({},n,a,!0)):r[e]=a})}(l);return r}function d(e){return void 0===e||null===e}function h(e){return void 0===e}function p(e){return e+"_"+C++}function m(e,t){var n,i=this;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];var a=r[0],o=function(){return n=null,e.call(i,a)};clearTimeout(n),n=setTimeout(o,t)}}function v(e){for(var t=[],n=Object.keys(e),i=0,r=n;i<r.length;i++){var s=r[i];t.push(encodeURIComponent(s)+"="+encodeURIComponent(""+e[s]))}return t.join("&")}function f(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function y(e,t){var n=e;return n===t||!(n===document||!n)&&y(n.parentNode,t)}function b(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function g(e,t){var n=document.createElement("div"),i=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),r="";d(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),n.appendChild(e.cloneNode(!0));for(var s=0,a=i.length;s<a;s++)r+=i[s].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+r+"</head><body>"+n.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var o=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(o))},500);return t}function E(e){var t=e+"";return"auto"===t||-1!==t.indexOf("%")||-1!==t.indexOf("px")?t:t+"px"}function O(e,t){var n="string"==typeof e?document.querySelector(e):e;if(n[T])for(var i=0,r=n[T];i<r.length;i++){var s=r[i];if(s instanceof t)return s}return null}function L(e,t){var n="string"==typeof e?document.querySelector(e):e;n[T]?n[T].push(t):n[T]=[t]}function N(e){for(var t="",n=0;n<5;n++)t+=(n?",":"")+e[n];return t}Object.defineProperty(t,"__esModule",{value:!0});var T="ej2_instances",C=0;t.createInstance=n,t.setImmediate=i,t.getValue=r,t.setValue=s,t.deleteObject=a,t.isObject=o,t.getEnumValue=l,t.merge=u,t.extend=c,t.isNullOrUndefined=d,t.isUndefined=h,t.getUniqueID=p,t.debounce=m,t.queryParams=v,t.isObjectArray=f,t.compareElementParent=y,t.throwError=b,t.print=g,t.formatUnit=E,t.getInstance=O,t.addInstance=L}.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;i=[n,t,n(4),n(8)],void 0!==(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={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",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"};!function(e){function t(e){var t={container:null,buttons:[],clearButton:null};if(i.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType)t.container=d(e,r.INPUTGROUP,r.INPUTCUSTOMTAG,"span"),e.element.parentNode.insertBefore(t.container,e.element),n.addClass([e.element],r.INPUT),t.container.appendChild(e.element);else{var a,c=void 0;"Auto"===e.floatLabelType&&(e.element.addEventListener("focus",function(){var e=l(this).getElementsByClassName("e-float-text")[0];n.addClass([e],r.LABELTOP),e.classList.contains(r.LABELBOTTOM)&&n.removeClass([e],r.LABELBOTTOM)}),e.element.addEventListener("blur",function(){var e=l(this);if(""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];t.classList.contains(r.LABELTOP)&&n.removeClass([t],r.LABELTOP),n.addClass([t],r.LABELBOTTOM)}})),t.container=d(e,r.FLOATINPUT,r.FLOATCUSTOMTAG,"div"),e.element.parentNode.insertBefore(t.container,e.element),n.attributes(e.element,{required:"true"}),c=n.createElement("span",{className:r.FLOATLINE}),a=n.createElement("label",{className:r.FLOATTEXT}),i.isNullOrUndefined(e.element.id)||""===e.element.id||(a.id="label_"+e.element.id.replace(/ /g,"_"),n.attributes(e.element,{"aria-labelledby":a.id})),i.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(a.innerHTML=e.element.placeholder,e.element.removeAttribute("placeholder")),i.isNullOrUndefined(e.properties)||i.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(a.innerHTML=e.properties.placeholder),t.container.appendChild(e.element),t.container.appendChild(c),t.container.appendChild(a),o(e.element.value,a),"Always"===e.floatLabelType&&(a.classList.contains(r.LABELBOTTOM)&&n.removeClass([a],r.LABELBOTTOM),n.addClass([a],r.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){o(e.element.value,a)}),e.element.addEventListener("blur",function(t){o(e.element.value,a)}))}if(e.element.addEventListener("focus",function(){var e=l(this);e.classList.contains("e-input-group")&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=l(this);e.classList.contains("e-input-group")&&e.classList.remove("e-input-focus")}),i.isNullOrUndefined(e.properties)||i.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(u(e.element,t.container),t.container.classList.contains(r.FLOATINPUT)&&n.addClass([t.container],r.INPUTGROUP)),!i.isNullOrUndefined(e.buttons))for(var h=0;h<e.buttons.length;h++)t.buttons.push(g(e.buttons[h],t.container));return t=s(e,t),E=t,t}function s(e,t){if(!i.isNullOrUndefined(e.properties))for(var n=0,r=Object.keys(e.properties);n<r.length;n++){var s=r[n];switch(s){case"cssClass":h(e.properties.cssClass,[t.container]);break;case"enabled":f(e.properties.enabled,e.element);break;case"enableRtl":v(e.properties.enableRtl,[t.container]);break;case"placeholder":p(e.properties.placeholder,e.element);break;case"readonly":m(e.properties.readonly,e.element)}}return t}function a(e,t){e?n.removeClass([t],r.CLEARICONHIDE):n.addClass([t],r.CLEARICONHIDE)}function o(e,t){e?(n.addClass([t],r.LABELTOP),t.classList.contains(r.LABELBOTTOM)&&n.removeClass([t],r.LABELBOTTOM)):(t.classList.contains(r.LABELTOP)&&n.removeClass([t],r.LABELTOP),n.addClass([t],r.LABELBOTTOM))}function l(e){return e.parentNode}function u(e,t){var s=n.createElement("span",{className:r.CLEARICON});t.appendChild(s),!i.isNullOrUndefined(E.container)&&E.container.classList.contains(r.FLOATINPUT)&&n.addClass([E.container],r.INPUTGROUP),a(e.value,s),c(e,s)}function c(e,t){t.addEventListener("click",function(i){e.classList.contains(r.DISABLE)||e.readOnly||(i.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",n.addClass([t],r.CLEARICONHIDE))}),e.addEventListener("input",function(n){a(e.value,t)}),e.addEventListener("focus",function(n){a(e.value,t)}),e.addEventListener("blur",function(n){a(e.value,t)})}function d(e,t,r,s){var a;return i.isNullOrUndefined(e.customTag)?a=n.createElement(s,{className:t}):(a=n.createElement(e.customTag,{className:t}),a.classList.add(r)),a}function h(e,t,r){i.isNullOrUndefined(r)||""===r||n.removeClass(t,r),i.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function p(e,t){var s;s=l(t),s.classList.contains(r.FLOATINPUT)?i.isNullOrUndefined(e)||""===e||(s.getElementsByClassName(r.FLOATTEXT)[0].textContent=e):i.isNullOrUndefined(e)||""===e?(t.removeAttribute("placeholder"),t.removeAttribute("aria-placeholder")):n.attributes(t,{placeholder:e,"aria-placeholder":e})}function m(e,t){e?n.attributes(t,{readonly:""}):t.removeAttribute("readonly")}function v(e,t){e?n.addClass(t,r.RTL):n.removeClass(t,r.RTL)}function f(e,t){var n={disabled:"disabled","aria-disabled":"true"};e?(t.classList.remove(r.DISABLE),y(n,t)):(t.classList.add(r.DISABLE),b(n,t))}function y(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var s=i[n],a=void 0;a=l(t),"disabled"===s&&t.classList.remove(r.DISABLE),"disabled"===s&&a.classList.contains(r.INPUTGROUP)&&a.classList.remove(r.DISABLE),"placeholder"===s&&a.classList.contains(r.FLOATINPUT)?a.getElementsByClassName(r.FLOATTEXT)[0].textContent="":t.removeAttribute(s)}}function b(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var s=i[n],a=void 0;a=l(t),"disabled"===s&&t.classList.add(r.DISABLE),"disabled"===s&&a.classList.contains(r.INPUTGROUP)&&a.classList.add(r.DISABLE),"placeholder"===s&&a.classList.contains(r.FLOATINPUT)?a.getElementsByClassName(r.FLOATTEXT)[0].textContent=e[s]:t.setAttribute(s,e[s])}}function g(e,t){var i=n.createElement("span",{className:e});return t.appendChild(i),t.classList.contains(r.INPUTGROUP)||t.classList.add(r.INPUTGROUP),i.addEventListener("mousedown",function(){this.classList.add("e-input-btn-ripple")}),i.addEventListener("mouseup",function(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}),i}var E={container:null,buttons:[],clearButton:null};e.createInput=t,e.setCssClass=h,e.setPlaceholder=p,e.setReadonly=m,e.setEnableRtl=v,e.setEnabled=f,e.removeAttributes=y,e.addAttributes=b,e.appendSpan=g}(t.Input||(t.Input={}))}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(9)],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){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(10)],void 0!==(r=function(e,t,n,i){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n),r(i)}.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 o=e.length-1;o>=0;o--)(r=e[o])&&(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(4),n(8),n(3),n(9)],void 0!==(r=function(e,t,n,i,r,o,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-input-group-icon",d=new RegExp("/^(-)?(d*)$/"),h=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=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=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,o.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(),o.isNullOrUndefined(this.width)||r.setStyleAttribute(this.container,{width:o.formatUnit(this.width)}),o.isNullOrUndefined(this.height)||r.setStyleAttribute(this.container,{height:o.formatUnit(this.height)}),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 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(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,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(c+" 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(c+" 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),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")}},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,o=s?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),r.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,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=l.getNumericObject(this.locale),t=o.getValue("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals?d:(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.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 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),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(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(),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:o.formatUnit(e.width)});break;case"height":r.setStyleAttribute(this.container,{height:o.formatUnit(e.height)});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":o.setValue(s,o.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":o.setValue(s,o.getValue(s,e),this.cultureInfo),this.updateValue(this.value);break;case"format":o.setValue(s,o.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("")],h.prototype,"cssClass",void 0),a([n.Property(null)],h.prototype,"value",void 0),a([n.Property(-Number.MAX_VALUE)],h.prototype,"min",void 0),a([n.Property(Number.MAX_VALUE)],h.prototype,"max",void 0),a([n.Property(1)],h.prototype,"step",void 0),a([n.Property(null)],h.prototype,"width",void 0),a([n.Property(null)],h.prototype,"height",void 0),a([n.Property(null)],h.prototype,"placeholder",void 0),a([n.Property(!0)],h.prototype,"showSpinButton",void 0),a([n.Property(!1)],h.prototype,"readonly",void 0),a([n.Property(!0)],h.prototype,"enabled",void 0),a([n.Property(!1)],h.prototype,"enableRtl",void 0),a([n.Property(!1)],h.prototype,"enablePersistence",void 0),a([n.Property("n2")],h.prototype,"format",void 0),a([n.Property(null)],h.prototype,"decimals",void 0),a([n.Property(null)],h.prototype,"currency",void 0),a([n.Property(!0)],h.prototype,"strictMode",void 0),a([n.Property(!1)],h.prototype,"validateDecimalOnType",void 0),a([n.Property("Auto")],h.prototype,"floatLabelType",void 0),a([n.Event()],h.prototype,"created",void 0),a([n.Event()],h.prototype,"destroyed",void 0),a([n.Event()],h.prototype,"change",void 0),h=a([i.NotifyPropertyChanges],h),t.NumericTextBox=h,t.numerictextboxHelper=n.CreateBuilder(h)}.apply(t,i))&&(e.exports=r)},function(t,n){t.exports=e},function(e,t,n){var i,r;i=[n,t,n(5)],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(6),n(7)],void 0!==(r=function(e,t,n,i){"use strict";function r(e,t){var n=document.createElement(e);return void 0===t?n:(n.innerHTML=t.innerHTML?t.innerHTML:"",void 0!==t.className&&(n.className=t.className),void 0!==t.id&&(n.id=t.id),void 0!==t.styles&&n.setAttribute("style",t.styles),void 0!==t.attrs&&p(n,t.attrs),n)}function s(e,t){for(var n=o(t),i=0,r=e;i<r.length;i++)for(var s=r[i],a=0,l=n;a<l.length;a++){var u=l[a];s.classList.contains(u)||s.classList.add(u)}return e}function a(e,t){for(var n=o(t),i=0,r=e;i<r.length;i++){var s=r[i];if(""!==s.className)for(var a=0,l=n;a<l.length;a++){var u=l[a];s.classList.remove(u)}}return e}function o(e){var t=[];return"string"==typeof e?t.push(e):t=e,t}function l(e){var t=e;return""===t.style.visibility&&t.offsetWidth>0}function u(e,t){for(var n=document.createDocumentFragment(),i=0,r=e;i<r.length;i++){var s=r[i];n.appendChild(s)}return t.insertBefore(n,t.firstElementChild),e}function c(e,t){for(var n=document.createDocumentFragment(),i=0,r=e;i<r.length;i++){var s=r[i];n.appendChild(s)}return t.appendChild(n),e}function d(e){return e.parentNode.removeChild(e)}function h(e){var t=e.parentNode;n.EventHandler.clearEvents(e),t.removeChild(e)}function p(e,t){for(var n=Object.keys(t),i=e,r=0,s=n;r<s.length;r++){var a=s[r];i.setAttribute(a,t[a])}return i}function v(e,t){return void 0===t&&(t=document),t.querySelector(e)}function m(e,t){return void 0===t&&(t=document),t.querySelectorAll(e)}function f(e,t){var n=e;if("function"==typeof n.closest)return n.closest(t);for(;n&&1===n.nodeType;){if(L(n,t))return n;n=n.parentNode}return null}function y(e){for(var t=[],n=Array.prototype.slice.call(e.parentNode.childNodes),i=0,r=n;i<r.length;i++){var s=r[i];s.nodeType===Node.ELEMENT_NODE&&e!==s&&t.push(s)}return t}function b(e,t,n){var r=e.getAttribute(t);return i.isNullOrUndefined(r)&&(e.setAttribute(t,n.toString()),r=n),r}function g(e,t){void 0!==t&&Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function E(e,t,n){s([e],t),a([e],n)}function L(e,t){var n=e.matches||e.msMatchesSelector||e.webkitMatchesSelector;return n?n.call(e,t):-1!==[].indexOf.call(document.querySelectorAll(t),e)}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=r,t.addClass=s,t.removeClass=a,t.isVisible=l,t.prepend=u,t.append=c,t.detach=d,t.remove=h,t.attributes=p,t.select=v,t.selectAll=m,t.closest=f,t.siblings=y,t.getAttributeOrDefault=b,t.setStyleAttribute=g,t.classList=E,t.matches=L}.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});var i=function(){function e(){}return e.addOrGetEventData=function(e){return"__eventList"in e?e.__eventList.events:(e.__eventList={},e.__eventList.events=[])},e.add=function(t,i,r,s,a){var o,l=e.addOrGetEventData(t);o=a?n.debounce(r,a):r,s&&(o=o.bind(s));for(var u=i.split(" "),c=0;c<u.length;c++)l.push({name:u[c],listener:r,debounce:o}),t.addEventListener(u[c],o)},e.remove=function(t,n,i){for(var r=e.addOrGetEventData(t),s=n.split(" "),a=0;a<s.length;a++)!function(e){var n,a=-1;r&&0!==r.length&&r.some(function(t,r){return t.name===s[e]&&t.listener.toString()===i.toString()&&(a=r,n=t.debounce,!0)}),-1!==a&&r.splice(a,1),t.removeEventListener(s[e],n)}(a)},e.clearEvents=function(t){var i,r;i=e.addOrGetEventData(t),r=n.extend([],r,i);for(var s=0;s<r.length;s++)t.removeEventListener(r[s].name,r[s].debounce),i.shift()},e.trigger=function(t,n,i){for(var r=e.addOrGetEventData(t),s=0,a=r;s<a.length;s++){var o=a[s];o.name===n&&o.debounce.call(this,i)}},e}();t.EventHandler=i}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t],void 0!==(r=function(e,t){"use strict";function n(e,t){var n=t;return n.unshift(void 0),new(Function.prototype.bind.apply(e,n))}function i(e){var t,n=new Uint16Array(5);(window.msCrypto||window.crypto).getRandomValues(n);var i="ej2"+T(n),r=function(n){n.source===window&&"string"==typeof n.data&&n.data.length<=32&&n.data===i&&(e(),t())};return window.addEventListener("message",r,!1),window.postMessage(i,"*"),t=function(){window.removeEventListener("message",r)}}function r(e,t){for(var n=t,i=e.split("."),r=0;r<i.length&&!h(n);r++)n=n[i[r]];return n}function s(e,t,n){var i,r,s=e.split("."),a=n||{},o=a,l=s.length;for(i=0;i<l;i++)r=s[i],i+1===l?o[r]=void 0===t?{}:t:d(o[r])&&(o[r]={}),o=o[r];return a}function a(e,t){delete e[t]}function o(e){var t={};return!d(e)&&e.constructor===t.constructor}function l(e,t){return e[t]}function u(e,t){if(!d(t))for(var n=e,i=t,r=Object.keys(t),s=0,a=r;s<a.length;s++){var o=a[s];n[o]=i[o]}}function c(e,t,n,i){var r=e||{},s=arguments.length;i&&(s-=1);for(var a=arguments,l=1;l<s;l++)!function(e){if(!a[e])return"continue";var t=a[e];Object.keys(t).forEach(function(e){var n,s=r[e],a=t[e];i&&o(a)?(n=o(s)?s:{},r[e]=c({},n,a,!0)):r[e]=a})}(l);return r}function d(e){return void 0===e||null===e}function h(e){return void 0===e}function p(e){return e+"_"+A++}function v(e,t){var n,i=this;return function(){for(var r=[],s=0;s<arguments.length;s++)r[s]=arguments[s];var a=r[0],o=function(){return n=null,e.call(i,a)};clearTimeout(n),n=setTimeout(o,t)}}function m(e){for(var t=[],n=Object.keys(e),i=0,r=n;i<r.length;i++){var s=r[i];t.push(encodeURIComponent(s)+"="+encodeURIComponent(""+e[s]))}return t.join("&")}function f(e){var t=Object.prototype.toString;return"[object Array]"===t.call(e)&&"[object Object]"===t.call(e[0])}function y(e,t){var n=e;return n===t||!(n===document||!n)&&y(n.parentNode,t)}function b(e){try{throw new Error(e)}catch(e){throw e.message+"\n"+e.stack}}function g(e,t){var n=document.createElement("div"),i=[].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")),r="";d(t)&&(t=window.open("","print","height=452,width=1024,tabbar=no")),n.appendChild(e.cloneNode(!0));for(var s=0,a=i.length;s<a;s++)r+=i[s].outerHTML;t.document.write("<!DOCTYPE html> <html><head>"+r+"</head><body>"+n.innerHTML+"<script> (function() { window.ready = true; })(); <\/script></body></html>"),t.document.close(),t.focus();var o=setInterval(function(){t.ready&&(t.print(),t.close(),clearInterval(o))},500);return t}function E(e){var t=e+"";return"auto"===t||-1!==t.indexOf("%")||-1!==t.indexOf("px")?t:t+"px"}function L(e,t){var n="string"==typeof e?document.querySelector(e):e;if(n[N])for(var i=0,r=n[N];i<r.length;i++){var s=r[i];if(s instanceof t)return s}return null}function O(e,t){var n="string"==typeof e?document.querySelector(e):e;n[N]?n[N].push(t):n[N]=[t]}function T(e){for(var t="",n=0;n<5;n++)t+=(n?",":"")+e[n];return t}Object.defineProperty(t,"__esModule",{value:!0});var N="ej2_instances",A=0;t.createInstance=n,t.setImmediate=i,t.getValue=r,t.setValue=s,t.deleteObject=a,t.isObject=o,t.getEnumValue=l,t.merge=u,t.extend=c,t.isNullOrUndefined=d,t.isUndefined=h,t.getUniqueID=p,t.debounce=v,t.queryParams=m,t.isObjectArray=f,t.compareElementParent=y,t.throwError=b,t.print=g,t.formatUnit=E,t.getInstance=L,t.addInstance=O}.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;i=[n,t,n(4),n(8)],void 0!==(r=function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={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(i.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(t.container=f(e,r.INPUTGROUP,r.INPUTCUSTOMTAG,"span"),e.element.parentNode.insertBefore(t.container,e.element),n.addClass([e.element],r.INPUT),t.container.appendChild(e.element)):u(e,t),e.element.addEventListener("focus",function(){var e=p(this);e.classList.contains("e-input-group")&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=p(this);e.classList.contains("e-input-group")&&e.classList.remove("e-input-focus")}),i.isNullOrUndefined(e.properties)||i.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(t.clearButton=v(e.element,t.container),t.container.classList.contains(r.FLOATINPUT)&&n.addClass([t.container],r.INPUTGROUP)),!i.isNullOrUndefined(e.buttons))for(var s=0;s<e.buttons.length;s++)t.buttons.push(P(e.buttons[s],t.container));return t=c(e,t),C=t,t}function s(){var e=p(this).getElementsByClassName("e-float-text")[0];n.addClass([e],r.LABELTOP),e.classList.contains(r.LABELBOTTOM)&&n.removeClass([e],r.LABELBOTTOM)}function a(){var e=p(this);if(""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];t.classList.contains(r.LABELTOP)&&n.removeClass([t],r.LABELTOP),n.addClass([t],r.LABELBOTTOM)}}function o(e){e.addEventListener("focus",s),e.addEventListener("blur",a)}function l(e){e.removeEventListener("focus",s),e.removeEventListener("blur",a)}function u(e,t){var s,a;"Auto"===e.floatLabelType&&o(e.element),i.isNullOrUndefined(t.container)?(t.container=f(e,r.FLOATINPUT,r.FLOATCUSTOMTAG,"div"),e.element.parentNode.insertBefore(t.container,e.element)):(i.isNullOrUndefined(e.customTag)||t.container.classList.add(r.FLOATCUSTOMTAG),t.container.classList.add(r.FLOATINPUT)),n.attributes(e.element,{required:""}),s=n.createElement("span",{className:r.FLOATLINE}),a=n.createElement("label",{className:r.FLOATTEXT}),i.isNullOrUndefined(e.element.id)||""===e.element.id||(a.id="label_"+e.element.id.replace(/ /g,"_"),n.attributes(e.element,{"aria-labelledby":a.id})),i.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(a.innerHTML=e.element.placeholder,e.element.removeAttribute("placeholder")),i.isNullOrUndefined(e.properties)||i.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(a.innerHTML=e.properties.placeholder),a.innerHTML||t.container.classList.add(r.NOFLOATLABEL),t.container.appendChild(e.element),t.container.appendChild(s),t.container.appendChild(a),h(e.element.value,a),"Always"===e.floatLabelType&&(a.classList.contains(r.LABELBOTTOM)&&n.removeClass([a],r.LABELBOTTOM),n.addClass([a],r.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){h(e.element.value,a)}),e.element.addEventListener("blur",function(t){h(e.element.value,a)}))}function c(e,t){if(!i.isNullOrUndefined(e.properties))for(var n=0,r=Object.keys(e.properties);n<r.length;n++){var s=r[n];switch(s){case"cssClass":y(e.properties.cssClass,[t.container]);break;case"enabled":L(e.properties.enabled,e.element);break;case"enableRtl":E(e.properties.enableRtl,[t.container]);break;case"placeholder":b(e.properties.placeholder,e.element);break;case"readonly":g(e.properties.readonly,e.element)}}return t}function d(e,t){e?n.removeClass([t],r.CLEARICONHIDE):n.addClass([t],r.CLEARICONHIDE)}function h(e,t){e?(n.addClass([t],r.LABELTOP),t.classList.contains(r.LABELBOTTOM)&&n.removeClass([t],r.LABELBOTTOM)):(t.classList.contains(r.LABELTOP)&&n.removeClass([t],r.LABELTOP),n.addClass([t],r.LABELBOTTOM))}function p(e){return e.parentNode}function v(e,t){var s=n.createElement("span",{className:r.CLEARICON});return t.appendChild(s),!i.isNullOrUndefined(C.container)&&C.container.classList.contains(r.FLOATINPUT)&&n.addClass([C.container],r.INPUTGROUP),d(e.value,s),m(e,s),s}function m(e,t){t.addEventListener("click",function(i){e.classList.contains(r.DISABLE)||e.readOnly||(i.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",n.addClass([t],r.CLEARICONHIDE))}),e.addEventListener("input",function(n){d(e.value,t)}),e.addEventListener("focus",function(n){d(e.value,t)}),e.addEventListener("blur",function(n){d(e.value,t)})}function f(e,t,r,s){var a;return i.isNullOrUndefined(e.customTag)?a=n.createElement(s,{className:t}):(a=n.createElement(e.customTag,{className:t}),a.classList.add(r)),a}function y(e,t,r){i.isNullOrUndefined(r)||""===r||n.removeClass(t,r),i.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function b(e,t){var s;s=p(t),s.classList.contains(r.FLOATINPUT)?i.isNullOrUndefined(e)||""===e?(s.classList.add(r.NOFLOATLABEL),s.getElementsByClassName(r.FLOATTEXT)[0].textContent=""):(s.getElementsByClassName(r.FLOATTEXT)[0].textContent=e,s.classList.remove(r.NOFLOATLABEL)):i.isNullOrUndefined(e)||""===e?(t.removeAttribute("placeholder"),t.removeAttribute("aria-placeholder")):n.attributes(t,{placeholder:e,"aria-placeholder":e})}function g(e,t){e?n.attributes(t,{readonly:""}):t.removeAttribute("readonly")}function E(e,t){e?n.addClass(t,r.RTL):n.removeClass(t,r.RTL)}function L(e,t){var n={disabled:"disabled","aria-disabled":"true"};e?(t.classList.remove(r.DISABLE),O(n,t)):(t.classList.add(r.DISABLE),T(n,t))}function O(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var s=i[n],a=void 0;a=p(t),"disabled"===s&&t.classList.remove(r.DISABLE),"disabled"===s&&a.classList.contains(r.INPUTGROUP)&&a.classList.remove(r.DISABLE),"placeholder"===s&&a.classList.contains(r.FLOATINPUT)?a.getElementsByClassName(r.FLOATTEXT)[0].textContent="":t.removeAttribute(s)}}function T(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var s=i[n],a=void 0;a=p(t),"disabled"===s&&t.classList.add(r.DISABLE),"disabled"===s&&a.classList.contains(r.INPUTGROUP)&&a.classList.add(r.DISABLE),"placeholder"===s&&a.classList.contains(r.FLOATINPUT)?a.getElementsByClassName(r.FLOATTEXT)[0].textContent=e[s]:t.setAttribute(s,e[s])}}function N(e){var t=e.container;if(!i.isNullOrUndefined(t)&&t.classList.contains(r.FLOATINPUT)){var s=t.querySelector("input");n.detach(t.querySelector("."+r.FLOATLINE)),n.detach(t.querySelector("."+r.FLOATTEXT)),n.classList(t,[r.INPUTGROUP],[r.FLOATINPUT]),l(s),s.classList.add(r.INPUT),s.removeAttribute("required")}}function A(e,t,s){var a={element:e,floatLabelType:t,properties:{placeholder:s}},o=n.closest(e,"."+r.INPUTGROUP),l=o.querySelector(".e-input-group-icon");if(u(a,{container:o}),i.isNullOrUndefined(l)&&(l=o.querySelector(".e-input-group-btn")),i.isNullOrUndefined(l)&&(l=o.querySelector(".e-clear-icon")),i.isNullOrUndefined(l))o.classList.remove(r.INPUTGROUP);else{var c=o.querySelector("."+r.FLOATLINE),d=o.querySelector("."+r.FLOATTEXT);o.insertBefore(e,l),o.insertBefore(c,l),o.insertBefore(d,l)}}function P(e,t){var i=n.createElement("span",{className:e});return t.appendChild(i),t.classList.contains(r.INPUTGROUP)||t.classList.add(r.INPUTGROUP),i.addEventListener("mousedown",function(){this.classList.add("e-input-btn-ripple")}),i.addEventListener("mouseup",function(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}),i}var C={container:null,buttons:[],clearButton:null};e.createInput=t,e.setCssClass=y,e.setPlaceholder=b,e.setReadonly=g,e.setEnableRtl=E,e.setEnabled=L,e.removeAttributes=O,e.addAttributes=T,e.removeFloating=N,e.addFloating=A,e.appendSpan=P}(t.Input||(t.Input={}))}.apply(t,i))&&(e.exports=r)},function(e,t,n){var i,r;i=[n,t,n(9)],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)}])});

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

import { createElement, attributes, addClass, removeClass } from '@syncfusion/ej2-base/dom';
import { createElement, attributes, addClass, removeClass, detach, classList, closest } from '@syncfusion/ej2-base/dom';
import { isNullOrUndefined } from '@syncfusion/ej2-base/util';

@@ -15,2 +15,3 @@ var CLASSNAMES = {

LABELBOTTOM: 'e-label-bottom',
NOFLOATLABEL: 'e-no-float-label',
INPUTCUSTOMTAG: 'e-input-custom-tag',

@@ -35,59 +36,3 @@ FLOATCUSTOMTAG: 'e-float-custom-tag'

else {
var inputElement = void 0;
var floatLinelement = void 0;
var floatLabelElement_1;
if (args.floatLabelType === 'Auto') {
args.element.addEventListener('focus', function () {
var label = getParentNode(this).getElementsByClassName('e-float-text')[0];
addClass([label], CLASSNAMES.LABELTOP);
if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {
removeClass([label], CLASSNAMES.LABELBOTTOM);
}
});
args.element.addEventListener('blur', function () {
var parent = getParentNode(this);
if (parent.getElementsByTagName('input')[0].value === '') {
var label = parent.getElementsByClassName('e-float-text')[0];
if (label.classList.contains(CLASSNAMES.LABELTOP)) {
removeClass([label], CLASSNAMES.LABELTOP);
}
addClass([label], CLASSNAMES.LABELBOTTOM);
}
});
}
inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div');
args.element.parentNode.insertBefore(inputObject.container, args.element);
attributes(args.element, { 'required': 'true' });
floatLinelement = createElement('span', { className: CLASSNAMES.FLOATLINE });
floatLabelElement_1 = createElement('label', { className: CLASSNAMES.FLOATTEXT });
if (!isNullOrUndefined(args.element.id) && args.element.id !== '') {
floatLabelElement_1.id = 'label_' + args.element.id.replace(/ /g, '_');
attributes(args.element, { 'aria-labelledby': floatLabelElement_1.id });
}
if (!isNullOrUndefined(args.element.placeholder) && args.element.placeholder !== '') {
floatLabelElement_1.innerHTML = args.element.placeholder;
args.element.removeAttribute('placeholder');
}
if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.placeholder) &&
args.properties.placeholder !== '') {
floatLabelElement_1.innerHTML = args.properties.placeholder;
}
inputObject.container.appendChild(args.element);
inputObject.container.appendChild(floatLinelement);
inputObject.container.appendChild(floatLabelElement_1);
updateLabelState(args.element.value, floatLabelElement_1);
if (args.floatLabelType === 'Always') {
if (floatLabelElement_1.classList.contains(CLASSNAMES.LABELBOTTOM)) {
removeClass([floatLabelElement_1], CLASSNAMES.LABELBOTTOM);
}
addClass([floatLabelElement_1], CLASSNAMES.LABELTOP);
}
if (args.floatLabelType === 'Auto') {
args.element.addEventListener('input', function (event) {
updateLabelState(args.element.value, floatLabelElement_1);
});
args.element.addEventListener('blur', function (event) {
updateLabelState(args.element.value, floatLabelElement_1);
});
}
createFloatingInput(args, inputObject);
}

@@ -107,3 +52,3 @@ args.element.addEventListener('focus', function () {

if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.showClearButton) && args.properties.showClearButton) {
createClearButton(args.element, inputObject.container);
inputObject.clearButton = createClearButton(args.element, inputObject.container);
if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {

@@ -123,2 +68,81 @@ addClass([inputObject.container], CLASSNAMES.INPUTGROUP);

Input.createInput = createInput;
function _focusFn() {
var label = getParentNode(this).getElementsByClassName('e-float-text')[0];
addClass([label], CLASSNAMES.LABELTOP);
if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {
removeClass([label], CLASSNAMES.LABELBOTTOM);
}
}
function _blurFn() {
var parent = getParentNode(this);
if (parent.getElementsByTagName('input')[0].value === '') {
var label = parent.getElementsByClassName('e-float-text')[0];
if (label.classList.contains(CLASSNAMES.LABELTOP)) {
removeClass([label], CLASSNAMES.LABELTOP);
}
addClass([label], CLASSNAMES.LABELBOTTOM);
}
}
function wireFloatingEvents(element) {
element.addEventListener('focus', _focusFn);
element.addEventListener('blur', _blurFn);
}
function unwireFloatingEvents(element) {
element.removeEventListener('focus', _focusFn);
element.removeEventListener('blur', _blurFn);
}
function createFloatingInput(args, inputObject) {
var inputElement;
var floatLinelement;
var floatLabelElement;
if (args.floatLabelType === 'Auto') {
wireFloatingEvents(args.element);
}
if (isNullOrUndefined(inputObject.container)) {
inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div');
args.element.parentNode.insertBefore(inputObject.container, args.element);
}
else {
if (!isNullOrUndefined(args.customTag)) {
inputObject.container.classList.add(CLASSNAMES.FLOATCUSTOMTAG);
}
inputObject.container.classList.add(CLASSNAMES.FLOATINPUT);
}
attributes(args.element, { 'required': '' });
floatLinelement = createElement('span', { className: CLASSNAMES.FLOATLINE });
floatLabelElement = createElement('label', { className: CLASSNAMES.FLOATTEXT });
if (!isNullOrUndefined(args.element.id) && args.element.id !== '') {
floatLabelElement.id = 'label_' + args.element.id.replace(/ /g, '_');
attributes(args.element, { 'aria-labelledby': floatLabelElement.id });
}
if (!isNullOrUndefined(args.element.placeholder) && args.element.placeholder !== '') {
floatLabelElement.innerHTML = args.element.placeholder;
args.element.removeAttribute('placeholder');
}
if (!isNullOrUndefined(args.properties) && !isNullOrUndefined(args.properties.placeholder) &&
args.properties.placeholder !== '') {
floatLabelElement.innerHTML = args.properties.placeholder;
}
if (!floatLabelElement.innerHTML) {
inputObject.container.classList.add(CLASSNAMES.NOFLOATLABEL);
}
inputObject.container.appendChild(args.element);
inputObject.container.appendChild(floatLinelement);
inputObject.container.appendChild(floatLabelElement);
updateLabelState(args.element.value, floatLabelElement);
if (args.floatLabelType === 'Always') {
if (floatLabelElement.classList.contains(CLASSNAMES.LABELBOTTOM)) {
removeClass([floatLabelElement], CLASSNAMES.LABELBOTTOM);
}
addClass([floatLabelElement], CLASSNAMES.LABELTOP);
}
if (args.floatLabelType === 'Auto') {
args.element.addEventListener('input', function (event) {
updateLabelState(args.element.value, floatLabelElement);
});
args.element.addEventListener('blur', function (event) {
updateLabelState(args.element.value, floatLabelElement);
});
}
}
function setPropertyValue(args, inputObject) {

@@ -184,2 +208,3 @@ if (!isNullOrUndefined(args.properties)) {

wireClearBtnEvents(element, button);
return button;
}

@@ -233,3 +258,8 @@ function wireClearBtnEvents(element, button) {

parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = placeholder;
parentElement.classList.remove(CLASSNAMES.NOFLOATLABEL);
}
else {
parentElement.classList.add(CLASSNAMES.NOFLOATLABEL);
parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = '';
}
}

@@ -317,2 +347,39 @@ else {

Input.addAttributes = addAttributes;
function removeFloating(input) {
var container = input.container;
if (!isNullOrUndefined(container) && container.classList.contains(CLASSNAMES.FLOATINPUT)) {
var inputEle = container.querySelector('input');
detach(container.querySelector('.' + CLASSNAMES.FLOATLINE));
detach(container.querySelector('.' + CLASSNAMES.FLOATTEXT));
classList(container, [CLASSNAMES.INPUTGROUP], [CLASSNAMES.FLOATINPUT]);
unwireFloatingEvents(inputEle);
inputEle.classList.add(CLASSNAMES.INPUT);
inputEle.removeAttribute('required');
}
}
Input.removeFloating = removeFloating;
function addFloating(input, type, placeholder) {
var args = { element: input, floatLabelType: type, properties: { placeholder: placeholder } };
var container = closest(input, '.' + CLASSNAMES.INPUTGROUP);
var iconEle = container.querySelector('.e-input-group-icon');
var inputObj = { container: container };
createFloatingInput(args, inputObj);
if (isNullOrUndefined(iconEle)) {
iconEle = container.querySelector('.e-input-group-btn');
}
if (isNullOrUndefined(iconEle)) {
iconEle = container.querySelector('.e-clear-icon');
}
if (isNullOrUndefined(iconEle)) {
container.classList.remove(CLASSNAMES.INPUTGROUP);
}
else {
var floatLine = container.querySelector('.' + CLASSNAMES.FLOATLINE);
var floatText = container.querySelector('.' + CLASSNAMES.FLOATTEXT);
container.insertBefore(input, iconEle);
container.insertBefore(floatLine, iconEle);
container.insertBefore(floatText, iconEle);
}
}
Input.addFloating = addFloating;
function appendSpan(iconClass, container) {

@@ -319,0 +386,0 @@ var button = createElement('span', { className: iconClass });

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

import { createElement, attributes, addClass, removeClass, setStyleAttribute, detach } from '@syncfusion/ej2-base/dom';
import { isNullOrUndefined, isUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base/util';
import { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base/util';
import { Internationalization, getNumericObject } from '@syncfusion/ej2-base';

@@ -37,2 +37,3 @@ import { Input } from '../input/input';

var _this = _super.call(this, options, element) || this;
_this.isPrevFocused = false;
_this.decimalSeparator = '.';

@@ -163,5 +164,3 @@ _this.intRegExp = new RegExp('/^(-)?(\d*)$/');

this.element.removeAttribute('name');
if (!isUndefined(this.inputName)) {
attributes(this.hiddenInput, { 'name': this.inputName });
}
attributes(this.hiddenInput, { 'name': this.inputName });
this.container.insertBefore(this.hiddenInput, this.element);

@@ -174,7 +173,11 @@ if (this.inputStyle !== null) {

this.spinDown = Input.appendSpan(SPINICON + ' ' + SPINDOWN, this.container);
attributes(this.spinDown, { 'title': this.l10n.getConstant('decrementTitle'),
'aria-label': this.l10n.getConstant('decrementTitle') });
attributes(this.spinDown, {
'title': this.l10n.getConstant('decrementTitle'),
'aria-label': this.l10n.getConstant('decrementTitle')
});
this.spinUp = Input.appendSpan(SPINICON + ' ' + SPINUP, this.container);
attributes(this.spinUp, { 'title': this.l10n.getConstant('incrementTitle'),
'aria-label': this.l10n.getConstant('incrementTitle') });
attributes(this.spinUp, {
'title': this.l10n.getConstant('incrementTitle'),
'aria-label': this.l10n.getConstant('incrementTitle')
});
this.wireSpinBtnEvents();

@@ -479,3 +482,5 @@ };

this.element.value = formatValue;
this.element.setSelectionRange(formatValue.length, formatValue.length);
if (!this.isPrevFocused) {
this.element.setSelectionRange(0, formatValue.length);
}
}

@@ -488,10 +493,24 @@ if (!Browser.isDevice) {

NumericTextBox.prototype.focusOut = function (event) {
this.isFocused = false;
if (!this.element.value.length) {
this.setProperties({ value: null }, true);
if (this.isPrevFocused) {
event.preventDefault();
if (Browser.isDevice) {
var value_1 = this.element.value;
this.element.focus();
this.isPrevFocused = false;
var ele_1 = this.element;
setTimeout(function () {
ele_1.value = value_1;
}, 200);
}
}
var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);
this.updateValue(parsedInput);
if (!Browser.isDevice) {
EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
else {
this.isFocused = false;
if (!this.element.value.length) {
this.setProperties({ value: null }, true);
}
var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);
this.updateValue(parsedInput);
if (!Browser.isDevice) {
EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
}
}

@@ -502,2 +521,5 @@ };

var _this = this;
if (this.isFocused) {
this.isPrevFocused = true;
}
if (!this.getElementData(event)) {

@@ -520,2 +542,8 @@ return;

NumericTextBox.prototype.mouseUpOnSpinner = function (event) {
if (this.isPrevFocused) {
this.element.focus();
if (!Browser.isDevice) {
this.isPrevFocused = false;
}
}
if (!Browser.isDevice) {

@@ -701,2 +729,5 @@ event.preventDefault();

__decorate([
Property(false)
], NumericTextBox.prototype, "enablePersistence", void 0);
__decorate([
Property('n2')

@@ -703,0 +734,0 @@ ], NumericTextBox.prototype, "format", void 0);

{
"_args": [
[
{
"raw": "@syncfusion/ej2-inputs@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-inputs",
"name": "@syncfusion/ej2-inputs",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2"
]
],
"_from": "@syncfusion/ej2-inputs@*",
"_id": "@syncfusion/ej2-inputs@1.0.10",
"_inCache": true,
"_location": "/@syncfusion/ej2-inputs",
"_nodeVersion": "6.11.0",
"_npmUser": {
"name": "ej2",
"email": "pipeline@syncfusion.com"
},
"_npmVersion": "3.10.10",
"_phantomChildren": {},
"_requested": {
"raw": "@syncfusion/ej2-inputs@*",
"scope": "@syncfusion",
"escapedName": "@syncfusion%2fej2-inputs",
"name": "@syncfusion/ej2-inputs",
"rawSpec": "*",
"spec": "*",
"type": "range"
},
"_requiredBy": [
"/@syncfusion/ej2",
"/@syncfusion/ej2-ng-inputs"
],
"_resolved": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-inputs/-/ej2-inputs-1.0.10.tgz",
"_shasum": "cb28ee246883845af6913a5ed93f61fdbdf95b0f",
"_shrinkwrap": null,
"_spec": "@syncfusion/ej2-inputs@*",
"_where": "C:\\Users\\ajithr\\Desktop\\ej2-release\\node_modules\\@syncfusion\\ej2",
"author": {
"name": "Syncfusion Inc."
},
"bugs": {
"url": "https://github.com/syncfusion/ej2-inputs/issues"
},
"name": "@syncfusion/ej2-inputs",
"version": "1.0.11",
"description": "Essential JS 2 TextBoxes",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"module": "dist/es6/index.js",
"dependencies": {
"@syncfusion/ej2-base": "^1.0.10"
"@syncfusion/ej2-base": "^1.0.11"
},
"description": "Essential JS 2 TextBoxes",
"devDependencies": {

@@ -61,8 +17,2 @@ "@types/chai": "^3.4.28",

},
"dist": {
"shasum": "cb28ee246883845af6913a5ed93f61fdbdf95b0f",
"tarball": "http://syncdeskn6525:8081/repository/ej2-production/@syncfusion/ej2-inputs/-/ej2-inputs-1.0.10.tgz"
},
"gitHead": "9119135359ab2cfe5f25fc18be4cd52fdc86a094",
"homepage": "https://github.com/syncfusion/ej2-inputs#readme",
"keywords": [

@@ -92,24 +42,6 @@ "ej2",

],
"license": "SEE LICENSE IN license",
"maintainers": [
{
"name": "ej2",
"email": "pipeline@syncfusion.com"
}
],
"module": "dist/es6/index.js",
"name": "@syncfusion/ej2-inputs",
"optionalDependencies": {},
"readme": "A package of Essential JS 2 Input textbox components. It comes with full support and is available under commercial and community licenses – please visit www.syncfusion.com to get started.\n\n## Resources\n* [NumericTextBoxes Demos](http://ej2.syncfusion.com/demos/#/numerictextbox/default.html)\n* [TextBox Demos](http://ej2.syncfusion.com/demos/#/textboxes/default.html)\n\n# 1.0.10\n## Numeric TextBox\n### New Features\n-\tProvided floating label support for Numeric TextBox.\n\n### Bug Fixes\n- Fixed-Numeric value get incremented when tap on the spinner and swipe the document.\n\n## TextBox\n### New Features\n* Provided floating label support for textarea element.\n* Provided option to show/hide clear button to reset the value in input element.\n* Added option to float label always, float label on focus, and disable floating support in the input element.\n",
"readmeFilename": "ReadMe.md",
"repository": {
"type": "git",
"url": "git+https://github.com/syncfusion/ej2-inputs.git"
},
"scripts": {
"ci-publish": "gulp ci-publish",
"compile": "gulp ci-compile",
"test": "gulp ci-test"
},
"version": "1.0.10"
"url": "https://github.com/syncfusion/ej2-inputs.git"
}
}

@@ -7,14 +7,4 @@ A package of Essential JS 2 Input textbox components. It comes with full support and is available under commercial and community licenses – please visit www.syncfusion.com to get started.

# 1.0.10
## Numeric TextBox
### New Features
- Provided floating label support for Numeric TextBox.
## Changelog
### Bug Fixes
- Fixed-Numeric value get incremented when tap on the spinner and swipe the document.
## TextBox
### New Features
* Provided floating label support for textarea element.
* Provided option to show/hide clear button to reset the value in input element.
* Added option to float label always, float label on focus, and disable floating support in the input element.
Check the changelog [here](https://github.com/syncfusion/ej2-inputs/blob/master/CHANGELOG.md)

@@ -95,2 +95,4 @@ /**

}, element: HTMLInputElement | HTMLElement): void;
function removeFloating(input: InputObject): void;
function addFloating(input: HTMLInputElement, type: FloatLabelType, placeholder: string): void;
/**

@@ -97,0 +99,0 @@ * Creates a new span element with the given icons added and append it in container element.

@@ -16,2 +16,3 @@ define(["require", "exports", "@syncfusion/ej2-base/dom", "@syncfusion/ej2-base/util"], function (require, exports, dom_1, util_1) {

LABELBOTTOM: 'e-label-bottom',
NOFLOATLABEL: 'e-no-float-label',
INPUTCUSTOMTAG: 'e-input-custom-tag',

@@ -36,59 +37,3 @@ FLOATCUSTOMTAG: 'e-float-custom-tag'

else {
var inputElement = void 0;
var floatLinelement = void 0;
var floatLabelElement_1;
if (args.floatLabelType === 'Auto') {
args.element.addEventListener('focus', function () {
var label = getParentNode(this).getElementsByClassName('e-float-text')[0];
dom_1.addClass([label], CLASSNAMES.LABELTOP);
if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {
dom_1.removeClass([label], CLASSNAMES.LABELBOTTOM);
}
});
args.element.addEventListener('blur', function () {
var parent = getParentNode(this);
if (parent.getElementsByTagName('input')[0].value === '') {
var label = parent.getElementsByClassName('e-float-text')[0];
if (label.classList.contains(CLASSNAMES.LABELTOP)) {
dom_1.removeClass([label], CLASSNAMES.LABELTOP);
}
dom_1.addClass([label], CLASSNAMES.LABELBOTTOM);
}
});
}
inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div');
args.element.parentNode.insertBefore(inputObject.container, args.element);
dom_1.attributes(args.element, { 'required': 'true' });
floatLinelement = dom_1.createElement('span', { className: CLASSNAMES.FLOATLINE });
floatLabelElement_1 = dom_1.createElement('label', { className: CLASSNAMES.FLOATTEXT });
if (!util_1.isNullOrUndefined(args.element.id) && args.element.id !== '') {
floatLabelElement_1.id = 'label_' + args.element.id.replace(/ /g, '_');
dom_1.attributes(args.element, { 'aria-labelledby': floatLabelElement_1.id });
}
if (!util_1.isNullOrUndefined(args.element.placeholder) && args.element.placeholder !== '') {
floatLabelElement_1.innerHTML = args.element.placeholder;
args.element.removeAttribute('placeholder');
}
if (!util_1.isNullOrUndefined(args.properties) && !util_1.isNullOrUndefined(args.properties.placeholder) &&
args.properties.placeholder !== '') {
floatLabelElement_1.innerHTML = args.properties.placeholder;
}
inputObject.container.appendChild(args.element);
inputObject.container.appendChild(floatLinelement);
inputObject.container.appendChild(floatLabelElement_1);
updateLabelState(args.element.value, floatLabelElement_1);
if (args.floatLabelType === 'Always') {
if (floatLabelElement_1.classList.contains(CLASSNAMES.LABELBOTTOM)) {
dom_1.removeClass([floatLabelElement_1], CLASSNAMES.LABELBOTTOM);
}
dom_1.addClass([floatLabelElement_1], CLASSNAMES.LABELTOP);
}
if (args.floatLabelType === 'Auto') {
args.element.addEventListener('input', function (event) {
updateLabelState(args.element.value, floatLabelElement_1);
});
args.element.addEventListener('blur', function (event) {
updateLabelState(args.element.value, floatLabelElement_1);
});
}
createFloatingInput(args, inputObject);
}

@@ -108,3 +53,3 @@ args.element.addEventListener('focus', function () {

if (!util_1.isNullOrUndefined(args.properties) && !util_1.isNullOrUndefined(args.properties.showClearButton) && args.properties.showClearButton) {
createClearButton(args.element, inputObject.container);
inputObject.clearButton = createClearButton(args.element, inputObject.container);
if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) {

@@ -124,2 +69,81 @@ dom_1.addClass([inputObject.container], CLASSNAMES.INPUTGROUP);

Input.createInput = createInput;
function _focusFn() {
var label = getParentNode(this).getElementsByClassName('e-float-text')[0];
dom_1.addClass([label], CLASSNAMES.LABELTOP);
if (label.classList.contains(CLASSNAMES.LABELBOTTOM)) {
dom_1.removeClass([label], CLASSNAMES.LABELBOTTOM);
}
}
function _blurFn() {
var parent = getParentNode(this);
if (parent.getElementsByTagName('input')[0].value === '') {
var label = parent.getElementsByClassName('e-float-text')[0];
if (label.classList.contains(CLASSNAMES.LABELTOP)) {
dom_1.removeClass([label], CLASSNAMES.LABELTOP);
}
dom_1.addClass([label], CLASSNAMES.LABELBOTTOM);
}
}
function wireFloatingEvents(element) {
element.addEventListener('focus', _focusFn);
element.addEventListener('blur', _blurFn);
}
function unwireFloatingEvents(element) {
element.removeEventListener('focus', _focusFn);
element.removeEventListener('blur', _blurFn);
}
function createFloatingInput(args, inputObject) {
var inputElement;
var floatLinelement;
var floatLabelElement;
if (args.floatLabelType === 'Auto') {
wireFloatingEvents(args.element);
}
if (util_1.isNullOrUndefined(inputObject.container)) {
inputObject.container = createInputContainer(args, CLASSNAMES.FLOATINPUT, CLASSNAMES.FLOATCUSTOMTAG, 'div');
args.element.parentNode.insertBefore(inputObject.container, args.element);
}
else {
if (!util_1.isNullOrUndefined(args.customTag)) {
inputObject.container.classList.add(CLASSNAMES.FLOATCUSTOMTAG);
}
inputObject.container.classList.add(CLASSNAMES.FLOATINPUT);
}
dom_1.attributes(args.element, { 'required': '' });
floatLinelement = dom_1.createElement('span', { className: CLASSNAMES.FLOATLINE });
floatLabelElement = dom_1.createElement('label', { className: CLASSNAMES.FLOATTEXT });
if (!util_1.isNullOrUndefined(args.element.id) && args.element.id !== '') {
floatLabelElement.id = 'label_' + args.element.id.replace(/ /g, '_');
dom_1.attributes(args.element, { 'aria-labelledby': floatLabelElement.id });
}
if (!util_1.isNullOrUndefined(args.element.placeholder) && args.element.placeholder !== '') {
floatLabelElement.innerHTML = args.element.placeholder;
args.element.removeAttribute('placeholder');
}
if (!util_1.isNullOrUndefined(args.properties) && !util_1.isNullOrUndefined(args.properties.placeholder) &&
args.properties.placeholder !== '') {
floatLabelElement.innerHTML = args.properties.placeholder;
}
if (!floatLabelElement.innerHTML) {
inputObject.container.classList.add(CLASSNAMES.NOFLOATLABEL);
}
inputObject.container.appendChild(args.element);
inputObject.container.appendChild(floatLinelement);
inputObject.container.appendChild(floatLabelElement);
updateLabelState(args.element.value, floatLabelElement);
if (args.floatLabelType === 'Always') {
if (floatLabelElement.classList.contains(CLASSNAMES.LABELBOTTOM)) {
dom_1.removeClass([floatLabelElement], CLASSNAMES.LABELBOTTOM);
}
dom_1.addClass([floatLabelElement], CLASSNAMES.LABELTOP);
}
if (args.floatLabelType === 'Auto') {
args.element.addEventListener('input', function (event) {
updateLabelState(args.element.value, floatLabelElement);
});
args.element.addEventListener('blur', function (event) {
updateLabelState(args.element.value, floatLabelElement);
});
}
}
function setPropertyValue(args, inputObject) {

@@ -185,2 +209,3 @@ if (!util_1.isNullOrUndefined(args.properties)) {

wireClearBtnEvents(element, button);
return button;
}

@@ -234,3 +259,8 @@ function wireClearBtnEvents(element, button) {

parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = placeholder;
parentElement.classList.remove(CLASSNAMES.NOFLOATLABEL);
}
else {
parentElement.classList.add(CLASSNAMES.NOFLOATLABEL);
parentElement.getElementsByClassName(CLASSNAMES.FLOATTEXT)[0].textContent = '';
}
}

@@ -318,2 +348,39 @@ else {

Input.addAttributes = addAttributes;
function removeFloating(input) {
var container = input.container;
if (!util_1.isNullOrUndefined(container) && container.classList.contains(CLASSNAMES.FLOATINPUT)) {
var inputEle = container.querySelector('input');
dom_1.detach(container.querySelector('.' + CLASSNAMES.FLOATLINE));
dom_1.detach(container.querySelector('.' + CLASSNAMES.FLOATTEXT));
dom_1.classList(container, [CLASSNAMES.INPUTGROUP], [CLASSNAMES.FLOATINPUT]);
unwireFloatingEvents(inputEle);
inputEle.classList.add(CLASSNAMES.INPUT);
inputEle.removeAttribute('required');
}
}
Input.removeFloating = removeFloating;
function addFloating(input, type, placeholder) {
var args = { element: input, floatLabelType: type, properties: { placeholder: placeholder } };
var container = dom_1.closest(input, '.' + CLASSNAMES.INPUTGROUP);
var iconEle = container.querySelector('.e-input-group-icon');
var inputObj = { container: container };
createFloatingInput(args, inputObj);
if (util_1.isNullOrUndefined(iconEle)) {
iconEle = container.querySelector('.e-input-group-btn');
}
if (util_1.isNullOrUndefined(iconEle)) {
iconEle = container.querySelector('.e-clear-icon');
}
if (util_1.isNullOrUndefined(iconEle)) {
container.classList.remove(CLASSNAMES.INPUTGROUP);
}
else {
var floatLine = container.querySelector('.' + CLASSNAMES.FLOATLINE);
var floatText = container.querySelector('.' + CLASSNAMES.FLOATTEXT);
container.insertBefore(input, iconEle);
container.insertBefore(floatLine, iconEle);
container.insertBefore(floatText, iconEle);
}
}
Input.addFloating = addFloating;
function appendSpan(iconClass, container) {

@@ -320,0 +387,0 @@ var button = dom_1.createElement('span', { className: iconClass });

@@ -13,15 +13,16 @@ import{NumericTextBox} from "./numerictextbox";

/**
* Specifies the callback function for change event and it triggers after the textbox value is changed.
* Triggers when the value of the NumericTextBox changes.
*/
change(value:Function): BuilderProperties;
/**
* Specifies the callback function for create event and it triggers after the numeric textbox control is created successfully.
* Triggers when the NumericTextBox component is created.
*/
created(value:Function): BuilderProperties;
/**
* Specifies the callback function for destroy event and it triggers when the numeric textbox control is destroyed successfully.
* Triggers when the NumericTextBox component is destroyed.
*/
destroyed(value:Function): BuilderProperties;
/**
* Specifies the root CSS class name to be added in the text boxes which allow you to customize the appearance.
* Gets or Sets the CSS classes to root element of the NumericTextBox which helps to customize the
complete UI styles.
*/

@@ -35,32 +36,35 @@ cssClass(value:string): BuilderProperties;

/**
* Specifies the number precision applied to the textbox value when the numeric textbox is focused.
* Specifies the number precision applied to the textbox value when the NumericTextBox is focused.
*/
decimals(value:number): BuilderProperties;
/**
* Enable or disable persisting component's state between page reloads.
* Sets a value that enables or disables the persisting state of the NumericTextBox after reloading the page.
*/
enablePersistence(value:boolean): BuilderProperties;
/**
* Specifies the right to left direction to numeric textbox.
* Sets a value that enables or disables the RTL mode on the NumericTextBox. If it is true,
NumericTextBox will display the content in the right to left direction.
*/
enableRtl(value:boolean): BuilderProperties;
/**
* Specifies a value that indicates whether the numeric textbox control is enabled or not.
* Sets a value that enables or disables the NumericTextBox control.
*/
enabled(value:boolean): BuilderProperties;
/**
* Specifies a value that indicates floating label functionality.
Specifies how the floating label works.
* Sets the type of floating label which enables or disables the floating label in the NumericTextBox.
The <b><a href="http://ej2.syncfusion.com/documentation/numerictextbox/
api-numericTextBox.html#placeholder-string" target="_blank">placeholder</a></b> value acts as a label
and floats above the NumericTextBox based on the below values.
Possible values are:
* Never - Never floats the label in the numeric textbox when the placeholder is available.
* Always - The floating label will always float above the numeric textbox.
* Auto - The floating label will float above the numeric textbox after focusing or entering a value in the numeric textbox.
* Never - Never floats the label in the NumericTextBox when the placeholder is available.
* Always - The floating label always floats above the NumericTextBox.
* Auto - The floating label floats above the NumericTextBox after focusing it or when enters the value in it.
*/
floatLabelType(value:FloatLabelType): BuilderProperties;
/**
* Specifies the number format that indicates the display format for the value of the numeric textbox.
* Specifies the number format that indicates the display format for the value of the NumericTextBox.
*/
format(value:string): BuilderProperties;
/**
* Specifies the height of the numeric textbox.
* Specifies the height of the NumericTextBox.
*/

@@ -82,21 +86,45 @@ height(value:number|string): BuilderProperties;

/**
* The hint displayed by the numeric textbox when it is empty.
* Gets or sets the string shown as a hint/placeholder when the NumericTextBox is empty.
It acts as a label and floats above the NumericTextBox based on the
<b><a href="http://ej2.syncfusion.com/documentation/numerictextbox
/api-numericTextBox.html#floatlabeltype-string" target="_blank">floatLabelType.</a></b>
*/
placeholder(value:string): BuilderProperties;
/**
* Toggles the readonly state of the numeric textbox. When the numeric is readonly, it does not allow user interactions.
* Sets a value that enables or disables the readonly state on the NumericTextBox. If it is true,
NumericTextBox will not allow your input.
*/
readonly(value:boolean): BuilderProperties;
/**
* Specifies whether the up and down spin buttons should be displayed in numeric textbox.
* Specifies whether the up and down spin buttons should be displayed in NumericTextBox.
*/
showSpinButton(value:boolean): BuilderProperties;
/**
* Specifies the incremental or decremental step size for the numeric textbox.
* Specifies the incremental or decremental step size for the NumericTextBox.
*/
step(value:number): BuilderProperties;
/**
* Specifies a value that indicates whether the numeric textbox control allows the value for the specified range.
If it is false, it allows the value outside of the range, but it highlights the textbox with error class.
Otherwise it is internally changed to the correct appropriate value.
* Specifies a value that indicates whether the NumericTextBox control allows the value for the specified range.
* If it is true, the input value will be restricted between the min and max range.
The typed value gets modified to fit the range on focused out state.
```html
<input type='text' id="numeric"/>
```
```typescript
<script>
var numericObj = new NumericTextBox({ min: 10, max: 20, value: 15 });
numericObj.appendTo("#numeric");
</script>
```
* Else, it allows any value even out of range value,
At that time of wrong value entered, the error class will be added to the component to highlight the error.
```html
<input type='text' id="numeric"/>
```
```typescript
<script>
var numericObj = new NumericTextBox({ strictMode: false, min: 10, max: 20, value: 15 });
numericObj.appendTo("#numeric");
</script>
```
*/

@@ -109,9 +137,9 @@ strictMode(value:boolean): BuilderProperties;

/**
* Specifies the value of the numeric textbox.
* Sets the value of the NumericTextBox.
*/
value(value:number): BuilderProperties;
/**
* Specifies the width of the numeric textbox.
* Specifies the width of the NumericTextBox.
*/
width(value:number|string): BuilderProperties;
}

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

import { Component, EventHandler, Property, Event, Browser, CreateBuilder, L10n, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';import { createElement, attributes, addClass, removeClass, setStyleAttribute, detach } from '@syncfusion/ej2-base/dom';import { isNullOrUndefined, isUndefined, getValue, formatUnit, setValue, merge} from '@syncfusion/ej2-base/util';import { Internationalization , NumberFormatOptions, getNumericObject} from '@syncfusion/ej2-base';import { NumericTextBoxHelper } from './numerictextbox-builder';import { Input, InputObject, FloatLabelType } from '../input/input';
import { Component, EventHandler, Property, Event, Browser, CreateBuilder, L10n, EmitType } from '@syncfusion/ej2-base';import { NotifyPropertyChanges, INotifyPropertyChanged, BaseEventArgs } from '@syncfusion/ej2-base';import { createElement, attributes, addClass, removeClass, setStyleAttribute, detach } from '@syncfusion/ej2-base/dom';import { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base/util';import { Internationalization, NumberFormatOptions, getNumericObject } from '@syncfusion/ej2-base';import { NumericTextBoxHelper } from './numerictextbox-builder';import { Input, InputObject, FloatLabelType } from '../input/input';
import {ChangeEventArgs} from "./numerictextbox";

@@ -11,6 +11,6 @@ import {ComponentModel} from '@syncfusion/ej2-base';

/**
* Specifies the root CSS class name to be added in the text boxes which allow you to customize the appearance. * @default null */ cssClass?: string;
* Gets or Sets the CSS classes to root element of the NumericTextBox which helps to customize the * complete UI styles. * @default null */ cssClass?: string;
/**
* Specifies the value of the numeric textbox. * @default null */ value?: number;
* Sets the value of the NumericTextBox. * @default null */ value?: number;

@@ -24,36 +24,39 @@ /**

/**
* Specifies the incremental or decremental step size for the numeric textbox. * @default 1 */ step?: number;
* Specifies the incremental or decremental step size for the NumericTextBox. * @default 1 */ step?: number;
/**
* Specifies the width of the numeric textbox. * @default null */ width?: number | string;
* Specifies the width of the NumericTextBox. * @default null */ width?: number | string;
/**
* Specifies the height of the numeric textbox. * @default null */ height?: number | string;
* Specifies the height of the NumericTextBox. * @default null */ height?: number | string;
/**
* The hint displayed by the numeric textbox when it is empty. * @default null */ placeholder?: string;
* Gets or sets the string shown as a hint/placeholder when the NumericTextBox is empty. * It acts as a label and floats above the NumericTextBox based on the * <b><a href="http://ej2.syncfusion.com/documentation/numerictextbox * /api-numericTextBox.html#floatlabeltype-string" target="_blank">floatLabelType.</a></b> * @default null */ placeholder?: string;
/**
* Specifies whether the up and down spin buttons should be displayed in numeric textbox. * @default true */ showSpinButton?: boolean;
* Specifies whether the up and down spin buttons should be displayed in NumericTextBox. * @default true */ showSpinButton?: boolean;
/**
* Toggles the readonly state of the numeric textbox. When the numeric is readonly, it does not allow user interactions. * @default false */ readonly?: boolean;
* Sets a value that enables or disables the readonly state on the NumericTextBox. If it is true, * NumericTextBox will not allow your input. * @default false */ readonly?: boolean;
/**
* Specifies a value that indicates whether the numeric textbox control is enabled or not. * @default true */ enabled?: boolean;
* Sets a value that enables or disables the NumericTextBox control. * @default true */ enabled?: boolean;
/**
* Specifies the right to left direction to numeric textbox. * @default false */ enableRtl?: boolean;
* Sets a value that enables or disables the RTL mode on the NumericTextBox. If it is true, * NumericTextBox will display the content in the right to left direction. * @default false */ enableRtl?: boolean;
/**
* Specifies the number format that indicates the display format for the value of the numeric textbox. * @default 'n2' */ format?: string;
* Sets a value that enables or disables the persisting state of the NumericTextBox after reloading the page. * @default false */ enablePersistence?: boolean;
/**
* Specifies the number precision applied to the textbox value when the numeric textbox is focused. * @default null */ decimals?: number;
* Specifies the number format that indicates the display format for the value of the NumericTextBox. * @default 'n2' */ format?: string;
/**
* Specifies the number precision applied to the textbox value when the NumericTextBox is focused. * @default null */ decimals?: number;
/**
* Specifies the currency code to use in currency formatting. * Possible values are the ISO 4217 currency codes, such as 'USD' for the US dollar,'EUR' for the euro. * @default null */ currency?: string;
/**
* Specifies a value that indicates whether the numeric textbox control allows the value for the specified range. * If it is false, it allows the value outside of the range, but it highlights the textbox with error class. * Otherwise it is internally changed to the correct appropriate value. * @default true */ strictMode?: boolean;
* Specifies a value that indicates whether the NumericTextBox control allows the value for the specified range. * * If it is true, the input value will be restricted between the min and max range. * The typed value gets modified to fit the range on focused out state. * ```html * <input type='text' id="numeric"/> * ``` * ```typescript * <script> * var numericObj = new NumericTextBox({ min: 10, max: 20, value: 15 }); * numericObj.appendTo("#numeric"); * </script> * ``` * * Else, it allows any value even out of range value, * At that time of wrong value entered, the error class will be added to the component to highlight the error. * ```html * <input type='text' id="numeric"/> * ``` * ```typescript * <script> * var numericObj = new NumericTextBox({ strictMode: false, min: 10, max: 20, value: 15 }); * numericObj.appendTo("#numeric"); * </script> * ``` * @default true */ strictMode?: boolean;

@@ -64,13 +67,13 @@ /**

/**
* Specifies a value that indicates floating label functionality. * Specifies how the floating label works. * Possible values are: * * Never - Never floats the label in the numeric textbox when the placeholder is available. * * Always - The floating label will always float above the numeric textbox. * * Auto - The floating label will float above the numeric textbox after focusing or entering a value in the numeric textbox. */ floatLabelType?: FloatLabelType;
* Sets the type of floating label which enables or disables the floating label in the NumericTextBox. * The <b><a href="http://ej2.syncfusion.com/documentation/numerictextbox/ * api-numericTextBox.html#placeholder-string" target="_blank">placeholder</a></b> value acts as a label * and floats above the NumericTextBox based on the below values. * Possible values are: * * Never - Never floats the label in the NumericTextBox when the placeholder is available. * * Always - The floating label always floats above the NumericTextBox. * * Auto - The floating label floats above the NumericTextBox after focusing it or when enters the value in it. * @default Auto */ floatLabelType?: FloatLabelType;
/**
* Specifies the callback function for create event and it triggers after the numeric textbox control is created successfully. * @event */ created?: EmitType<Object>;
* Triggers when the NumericTextBox component is created. * @event */ created?: EmitType<Object>;
/**
* Specifies the callback function for destroy event and it triggers when the numeric textbox control is destroyed successfully. * @event */ destroyed?: EmitType<Object>;
* Triggers when the NumericTextBox component is destroyed. * @event */ destroyed?: EmitType<Object>;
/**
* Specifies the callback function for change event and it triggers after the textbox value is changed. * @event */ change?: EmitType<ChangeEventArgs>;
* Triggers when the value of the NumericTextBox changes. * @event */ change?: EmitType<ChangeEventArgs>;
}

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

* <input type='text' id="numeric"/>
* ```
* ```typescript
* <script>

@@ -27,2 +29,3 @@ * var numericObj = new NumericTextBox({ value: 10 });

private isFocused;
private isPrevFocused;
private instance;

@@ -39,3 +42,4 @@ private cultureInfo;

/**
* Specifies the root CSS class name to be added in the text boxes which allow you to customize the appearance.
* Gets or Sets the CSS classes to root element of the NumericTextBox which helps to customize the
* complete UI styles.
* @default null

@@ -45,3 +49,3 @@ */

/**
* Specifies the value of the numeric textbox.
* Sets the value of the NumericTextBox.
* @default null

@@ -61,3 +65,3 @@ */

/**
* Specifies the incremental or decremental step size for the numeric textbox.
* Specifies the incremental or decremental step size for the NumericTextBox.
* @default 1

@@ -67,3 +71,3 @@ */

/**
* Specifies the width of the numeric textbox.
* Specifies the width of the NumericTextBox.
* @default null

@@ -73,3 +77,3 @@ */

/**
* Specifies the height of the numeric textbox.
* Specifies the height of the NumericTextBox.
* @default null

@@ -79,3 +83,6 @@ */

/**
* The hint displayed by the numeric textbox when it is empty.
* Gets or sets the string shown as a hint/placeholder when the NumericTextBox is empty.
* It acts as a label and floats above the NumericTextBox based on the
* <b><a href="http://ej2.syncfusion.com/documentation/numerictextbox
* /api-numericTextBox.html#floatlabeltype-string" target="_blank">floatLabelType.</a></b>
* @default null

@@ -85,3 +92,3 @@ */

/**
* Specifies whether the up and down spin buttons should be displayed in numeric textbox.
* Specifies whether the up and down spin buttons should be displayed in NumericTextBox.
* @default true

@@ -91,3 +98,4 @@ */

/**
* Toggles the readonly state of the numeric textbox. When the numeric is readonly, it does not allow user interactions.
* Sets a value that enables or disables the readonly state on the NumericTextBox. If it is true,
* NumericTextBox will not allow your input.
* @default false

@@ -97,3 +105,3 @@ */

/**
* Specifies a value that indicates whether the numeric textbox control is enabled or not.
* Sets a value that enables or disables the NumericTextBox control.
* @default true

@@ -103,3 +111,4 @@ */

/**
* Specifies the right to left direction to numeric textbox.
* Sets a value that enables or disables the RTL mode on the NumericTextBox. If it is true,
* NumericTextBox will display the content in the right to left direction.
* @default false

@@ -109,3 +118,8 @@ */

/**
* Specifies the number format that indicates the display format for the value of the numeric textbox.
* Sets a value that enables or disables the persisting state of the NumericTextBox after reloading the page.
* @default false
*/
enablePersistence: boolean;
/**
* Specifies the number format that indicates the display format for the value of the NumericTextBox.
* @default 'n2'

@@ -115,3 +129,3 @@ */

/**
* Specifies the number precision applied to the textbox value when the numeric textbox is focused.
* Specifies the number precision applied to the textbox value when the NumericTextBox is focused.
* @default null

@@ -127,5 +141,25 @@ */

/**
* Specifies a value that indicates whether the numeric textbox control allows the value for the specified range.
* If it is false, it allows the value outside of the range, but it highlights the textbox with error class.
* Otherwise it is internally changed to the correct appropriate value.
* Specifies a value that indicates whether the NumericTextBox control allows the value for the specified range.
* * If it is true, the input value will be restricted between the min and max range.
* The typed value gets modified to fit the range on focused out state.
* ```html
* <input type='text' id="numeric"/>
* ```
* ```typescript
* <script>
* var numericObj = new NumericTextBox({ min: 10, max: 20, value: 15 });
* numericObj.appendTo("#numeric");
* </script>
* ```
* * Else, it allows any value even out of range value,
* At that time of wrong value entered, the error class will be added to the component to highlight the error.
* ```html
* <input type='text' id="numeric"/>
* ```
* ```typescript
* <script>
* var numericObj = new NumericTextBox({ strictMode: false, min: 10, max: 20, value: 15 });
* numericObj.appendTo("#numeric");
* </script>
* ```
* @default true

@@ -140,12 +174,15 @@ */

/**
* Specifies a value that indicates floating label functionality.
* Specifies how the floating label works.
* Sets the type of floating label which enables or disables the floating label in the NumericTextBox.
* The <b><a href="http://ej2.syncfusion.com/documentation/numerictextbox/
* api-numericTextBox.html#placeholder-string" target="_blank">placeholder</a></b> value acts as a label
* and floats above the NumericTextBox based on the below values.
* Possible values are:
* * Never - Never floats the label in the numeric textbox when the placeholder is available.
* * Always - The floating label will always float above the numeric textbox.
* * Auto - The floating label will float above the numeric textbox after focusing or entering a value in the numeric textbox.
* * Never - Never floats the label in the NumericTextBox when the placeholder is available.
* * Always - The floating label always floats above the NumericTextBox.
* * Auto - The floating label floats above the NumericTextBox after focusing it or when enters the value in it.
* @default Auto
*/
floatLabelType: FloatLabelType;
/**
* Specifies the callback function for create event and it triggers after the numeric textbox control is created successfully.
* Triggers when the NumericTextBox component is created.
* @event

@@ -155,3 +192,3 @@ */

/**
* Specifies the callback function for destroy event and it triggers when the numeric textbox control is destroyed successfully.
* Triggers when the NumericTextBox component is destroyed.
* @event

@@ -161,3 +198,3 @@ */

/**
* Specifies the callback function for change event and it triggers after the textbox value is changed.
* Triggers when the value of the NumericTextBox changes.
* @event

@@ -214,4 +251,4 @@ */

/**
* Increment the numeric textbox value with specified step value.
* @param {number} step - Specifies the value used to increment the numeric textbox value.
* Increments the NumericTextBox value with the specified step value.
* @param {number} step - Specifies the value used to increment the NumericTextBox value.
* if its not given then numeric value will be incremented based on the step property value.

@@ -221,4 +258,4 @@ */

/**
* Decrement the numeric textbox value with specified step value.
* @param {number} step - Specifies the value used to decrement the numeric textbox value.
* Decrements the NumericTextBox value with specified step value.
* @param {number} step - Specifies the value used to decrement the NumericTextBox value.
* if its not given then numeric value will be decremented based on the step property value.

@@ -228,11 +265,15 @@ */

/**
* To destroy the Numeric textbox widget.
* 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.
* @method destroy
* @return {void}
*/
destroy(): void;
/**
* Returns the numeric textbox value.
* Returns the value of NumericTextBox with the format applied to the NumericTextBox.
*/
getText(): string;
/**
* Get the properties and its values that has been maintained in the persisted state.
* Gets the properties to be maintained in the persisted state.
* @return {string}

@@ -242,3 +283,3 @@ */

/**
* Called internally if any of the property value is changed.
* Calls internally if any of the property value is changed.
* @private

@@ -248,3 +289,3 @@ */

/**
* Get component name
* Gets the component name
* @private

@@ -255,7 +296,7 @@ */

export interface ChangeEventArgs extends BaseEventArgs {
/** returns the entered value of the numeric textbox. */
/** Returns the entered value of the NumericTextBox. */
value?: number;
/** returns the previously entered value of the numeric textbox. */
/** Returns the previously entered value of the NumericTextBox. */
previousValue?: number;
/** returns the event parameters from numeric textbox. */
/** Returns the event parameters from NumericTextBox. */
event?: Event;

@@ -262,0 +303,0 @@ }

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

var _this = _super.call(this, options, element) || this;
_this.isPrevFocused = false;
_this.decimalSeparator = '.';

@@ -159,5 +160,3 @@ _this.intRegExp = new RegExp('/^(-)?(\d*)$/');

this.element.removeAttribute('name');
if (!util_1.isUndefined(this.inputName)) {
dom_1.attributes(this.hiddenInput, { 'name': this.inputName });
}
dom_1.attributes(this.hiddenInput, { 'name': this.inputName });
this.container.insertBefore(this.hiddenInput, this.element);

@@ -170,7 +169,11 @@ if (this.inputStyle !== null) {

this.spinDown = input_1.Input.appendSpan(SPINICON + ' ' + SPINDOWN, this.container);
dom_1.attributes(this.spinDown, { 'title': this.l10n.getConstant('decrementTitle'),
'aria-label': this.l10n.getConstant('decrementTitle') });
dom_1.attributes(this.spinDown, {
'title': this.l10n.getConstant('decrementTitle'),
'aria-label': this.l10n.getConstant('decrementTitle')
});
this.spinUp = input_1.Input.appendSpan(SPINICON + ' ' + SPINUP, this.container);
dom_1.attributes(this.spinUp, { 'title': this.l10n.getConstant('incrementTitle'),
'aria-label': this.l10n.getConstant('incrementTitle') });
dom_1.attributes(this.spinUp, {
'title': this.l10n.getConstant('incrementTitle'),
'aria-label': this.l10n.getConstant('incrementTitle')
});
this.wireSpinBtnEvents();

@@ -475,3 +478,5 @@ };

this.element.value = formatValue;
this.element.setSelectionRange(formatValue.length, formatValue.length);
if (!this.isPrevFocused) {
this.element.setSelectionRange(0, formatValue.length);
}
}

@@ -484,10 +489,24 @@ if (!ej2_base_1.Browser.isDevice) {

NumericTextBox.prototype.focusOut = function (event) {
this.isFocused = false;
if (!this.element.value.length) {
this.setProperties({ value: null }, true);
if (this.isPrevFocused) {
event.preventDefault();
if (ej2_base_1.Browser.isDevice) {
var value_1 = this.element.value;
this.element.focus();
this.isPrevFocused = false;
var ele_1 = this.element;
setTimeout(function () {
ele_1.value = value_1;
}, 200);
}
}
var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);
this.updateValue(parsedInput);
if (!ej2_base_1.Browser.isDevice) {
ej2_base_1.EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
else {
this.isFocused = false;
if (!this.element.value.length) {
this.setProperties({ value: null }, true);
}
var parsedInput = this.instance.getNumberParser({ format: 'n' })(this.element.value);
this.updateValue(parsedInput);
if (!ej2_base_1.Browser.isDevice) {
ej2_base_1.EventHandler.remove(this.element, 'mousewheel DOMMouseScroll', this.mouseWheel);
}
}

@@ -498,2 +517,5 @@ };

var _this = this;
if (this.isFocused) {
this.isPrevFocused = true;
}
if (!this.getElementData(event)) {

@@ -516,2 +538,8 @@ return;

NumericTextBox.prototype.mouseUpOnSpinner = function (event) {
if (this.isPrevFocused) {
this.element.focus();
if (!ej2_base_1.Browser.isDevice) {
this.isPrevFocused = false;
}
}
if (!ej2_base_1.Browser.isDevice) {

@@ -697,2 +725,5 @@ event.preventDefault();

__decorate([
ej2_base_1.Property(false)
], NumericTextBox.prototype, "enablePersistence", void 0);
__decorate([
ej2_base_1.Property('n2')

@@ -699,0 +730,0 @@ ], NumericTextBox.prototype, "format", void 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 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