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.14 to 1.0.16

4

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

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var n=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return e[i].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var i,s;i=[n,t,n(1),n(5)],void 0!==(s=function(e,t,n,i){"use strict";function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),s(n),s(i)}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s;i=[n,t,n(2)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,n,a):s(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};i=[n,t,n(3),n(3),n(3),n(3),n(3),n(4)],void 0!==(s=function(e,t,n,i,s,o,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-input-group-icon",h=new RegExp("/^(-)?(d*)$/"),d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.isPrevFocused=!1,i.decimalSeparator=".",i.intRegExp=new RegExp("/^(-)?(d*)$/"),i.isCalled=!1,i}return r(t,e),t.prototype.preRender=function(){var e=o.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),this.angularTagName=null,"EJ-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var t=s.createElement("input"),i=0;for(i;i<this.element.attributes.length;i++)t.setAttribute(this.element.attributes[i].nodeName,this.element.attributes[i].nodeValue),t.innerHTML=this.element.innerHTML;this.element.parentNode.appendChild(t),this.element.parentNode.removeChild(this.element),this.element=t,o.setValue("ej2_instances",e,this.element)}s.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off","aria-live":"assertive"});var r={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:""};this.l10n=new n.L10n("numerictextbox",r,this.locale),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.checkAttributes(),this.prevValue=this.value,this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),o.isNullOrUndefined(this.width)||s.setStyleAttribute(this.container,{width:o.formatUnit(this.width)}),this.changeValue(this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0))},t.prototype.checkAttributes=function(){for(var e=["value","min","max","step","disabled","readonly","style","name"],t=0,n=e;t<n.length;t++){var i=n[t];if(!o.isNullOrUndefined(this.element.getAttribute(i)))switch(i){case"disabled":var s="disabled"!==this.element.getAttribute(i)&&"true"!==this.element.getAttribute(i);this.setProperties({enabled:s},!0);break;case"readonly":var r="readonly"===this.element.getAttribute(i)||"true"===this.element.getAttribute(i);this.setProperties({readonly:r},!0);break;case"style":this.inputStyle=this.element.getAttribute(i);break;case"name":this.inputName=this.element.getAttribute(i);break;default:var a=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(i));(null!==a&&!isNaN(a)||"value"===i)&&this.setProperties(o.setValue(i,a,{}),!0)}}},t.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},t.prototype.initCultureFunc=function(){this.instance=new l.Internationalization(this.locale)},t.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==o.getValue("currency",this)&&o.setValue("currency",this.currency,this.cultureInfo)},t.prototype.createWrapper=function(){var e=u.Input.createInput({element:this.element,customTag:this.angularTagName,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:this.cssClass,enableRtl:this.enableRtl,enabled:this.enabled}});this.container=e.container,s.addClass([this.container],"e-numeric"),this.readonly&&s.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=s.createElement("input",{attrs:{type:"hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),s.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.element),null!==this.inputStyle&&s.attributes(this.container,{style:this.inputStyle})},t.prototype.spinBtnCreation=function(){this.spinDown=u.Input.appendSpan(c+" e-spin-down",this.container),s.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),this.spinUp=u.Input.appendSpan(c+" e-spin-up",this.container),s.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},t.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),s.attributes(this.element,{"aria-valuemin":this.min.toString(),"aria-valuemax":this.max.toString()})},t.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},t.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},t.prototype.action=function(e){var t=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(t,this.step,e)),this.raiseChangeEvent()},t.prototype.checkErrorClass=function(){this.isValidState?s.removeClass([this.container],"e-error"):s.addClass([this.container],"e-error"),s.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"focus",this.focusIn,this),n.EventHandler.add(this.element,"blur",this.focusOut,this),n.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),n.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),n.EventHandler.add(this.element,"change",this.changeHandler,this),n.EventHandler.add(this.element,"paste",this.pasteHandler,this)},t.prototype.wireSpinBtnEvents=function(){n.EventHandler.add(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},t.prototype.unwireEvents=function(){n.EventHandler.remove(this.element,"focus",this.focusIn),n.EventHandler.remove(this.element,"blur",this.focusOut),n.EventHandler.remove(this.element,"keydown",this.keyDownHandler),n.EventHandler.remove(this.element,"keypress",this.keyPressHandler),n.EventHandler.remove(this.element,"change",this.changeHandler),n.EventHandler.remove(this.element,"paste",this.pasteHandler)},t.prototype.unwireSpinBtnEvents=function(){n.EventHandler.remove(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner)},t.prototype.changeHandler=function(e){this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},t.prototype.raiseChangeEvent=function(e){if(this.prevValue!==this.value){var t={};this.changeEventArgs={value:this.value,previousValue:this.prevValue},e&&(this.changeEventArgs.event=e),o.merge(t,this.changeEventArgs),this.prevValue=this.value,this.trigger("change",t)}},t.prototype.pasteHandler=function(){var e=this,t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||(e.element.value=t)})},t.prototype.keyDownHandler=function(e){switch(e.keyCode){case 38:e.preventDefault(),this.action("increment");break;case 40:e.preventDefault(),this.action("decrement")}},t.prototype.performAction=function(e,t,n){(null===e||isNaN(e))&&(e=0);var i="increment"===n?e+t:e-t;return i=this.correctRounding(e,t,i),this.strictMode?this.trimValue(i):i},t.prototype.correctRounding=function(e,t,n){var i=new RegExp("[,.](.*)"),s=(e.toString(),t.toString(),i.test(e.toString())),r=i.test(t.toString());if(s||r){var a=s?i.exec(e.toString())[0].length:0,o=r?i.exec(t.toString())[0].length:0,l=Math.max(a,o);return e=this.roundValue(n,l)}return n},t.prototype.roundValue=function(e,t){t=t||0;var n=Math.pow(10,t);return e*=n,e=Math.round(e)/n},t.prototype.updateValue=function(e,t){null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.raiseChangeEvent(t)},t.prototype.changeValue=function(e){if(e||0===e){var t=void 0,n=e.toString().split(".")[1];t=n&&n.length?n.length:0,null!==this.decimals&&(t=t<this.decimals?t:this.decimals),this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},t.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber();this.element.value=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value),s.attributes(this.element,{"aria-valuenow":e}),this.hiddenInput.value=e}else this.element.value="",this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},t.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},t.prototype.formatNumber=function(){var e,t=this.value,n=t.toString().split(".")[1];return e=n&&n.length?n.length:0,null!==this.decimals&&(e=e<this.decimals?e:this.decimals),this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},t.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},t.prototype.roundNumber=function(e,t){var n=e,i=t||0,s=n.toString().split("e");n=Math.round(Number(s[0]+"e"+(s[1]?Number(s[1])+i:i)));var r=n.toString().split("e");return n=Number(r[0]+"e"+(r[1]?Number(r[1])-i:-i)),Number(n.toFixed(i))},t.prototype.cancelEvent=function(e){return e.preventDefault(),!1},t.prototype.keyPressHandler=function(e){if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var t=String.fromCharCode(e.which),n=this.element.value;return n=n.substring(0,this.element.selectionStart)+t+n.substring(this.element.selectionEnd),!!this.numericRegex().test(n)||(e.preventDefault(),e.stopPropagation(),!1)},t.prototype.numericRegex=function(){var e=l.getNumericObject(this.locale),t=o.getValue("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals?h:(this.decimals&&this.validateDecimalOnType&&(n="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+t+"\\d"+n+")?)|("+t+"\\d"+n+")))?$"))},t.prototype.mouseWheel=function(e){e.preventDefault();var t,n=e;n.wheelDelta?t=n.wheelDelta/120:n.detail&&(t=-n.detail/3),t>0?this.action("increment"):t<0&&this.action("decrement"),this.cancelEvent(e)},t.prototype.focusIn=function(e){if(this.enabled&&!this.readonly){if(this.isFocused=!0,s.removeClass([this.container],"e-error"),this.prevValue=this.value,this.value||0===this.value){var t=this.formatNumber();this.element.value=t,this.isPrevFocused||this.element.setSelectionRange(0,t.length)}n.Browser.isDevice||n.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOut=function(e){if(this.isPrevFocused){if(e.preventDefault(),n.Browser.isDevice){var t=this.element.value;this.element.focus(),this.isPrevFocused=!1;var i=this.element;setTimeout(function(){i.value=t},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var s=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(s),n.Browser.isDevice||n.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){var i=(this.getElementData(e),e.currentTarget),s=i.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.add(i,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){t.isCalled=!0,t.action(s)},150),n.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},t.prototype.touchMoveOnSpinner=function(e){document.elementFromPoint(e.clientX,e.clientY).classList.contains(c)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(this.isPrevFocused&&(this.element.focus(),n.Browser.isDevice||(this.isPrevFocused=!1)),n.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var t=e.currentTarget,i=t.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.remove(t,"mouseleave",this.mouseUpClick),this.isCalled||this.action(i),this.isCalled=!1,n.EventHandler.remove(document,"mouseup",this.mouseUpClick)}},t.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},t.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,n.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),n.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},t.prototype.increment=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"increment"))},t.prototype.decrement=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"decrement"))},t.prototype.destroy=function(){this.unwireEvents(),s.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),s.detach(this.spinUp),s.detach(this.spinDown)),this.container.parentElement.appendChild(this.cloneElement),s.detach(this.container),e.prototype.destroy.call(this)},t.prototype.getText=function(){return this.element.value},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];switch(r){case"width":s.setStyleAttribute(this.container,{width:o.formatUnit(e.width)});break;case"cssClass":u.Input.setCssClass(e.cssClass,[this.container],t.cssClass);break;case"enabled":u.Input.setEnabled(e.enabled,this.element);break;case"enableRtl":u.Input.setEnableRtl(e.enableRtl,[this.container]);break;case"readonly":u.Input.setReadonly(e.readonly,this.element),this.readonly?s.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"placeholder":u.Input.setPlaceholder(e.placeholder,this.element);break;case"step":this.step=e.step,this.validateStep();break;case"showSpinButton":e.showSpinButton?this.spinBtnCreation():(s.detach(this.spinUp),s.detach(this.spinDown));break;case"value":this.updateValue(e.value);break;case"min":case"max":o.setValue(r,o.getValue(r,e),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=e.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.updatePlaceholder(),u.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":o.setValue(r,o.getValue(r,e),this.cultureInfo),this.updateValue(this.value);break;case"format":o.setValue(r,o.getValue(r,e),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=e.decimals,this.updateValue(this.value)}}},t.prototype.getModuleName=function(){return"numerictextbox"},t}(n.Component);a([n.Property("")],d.prototype,"cssClass",void 0),a([n.Property(null)],d.prototype,"value",void 0),a([n.Property(-Number.MAX_VALUE)],d.prototype,"min",void 0),a([n.Property(Number.MAX_VALUE)],d.prototype,"max",void 0),a([n.Property(1)],d.prototype,"step",void 0),a([n.Property(null)],d.prototype,"width",void 0),a([n.Property(null)],d.prototype,"placeholder",void 0),a([n.Property(!0)],d.prototype,"showSpinButton",void 0),a([n.Property(!1)],d.prototype,"readonly",void 0),a([n.Property(!0)],d.prototype,"enabled",void 0),a([n.Property(!1)],d.prototype,"enableRtl",void 0),a([n.Property(!1)],d.prototype,"enablePersistence",void 0),a([n.Property("n2")],d.prototype,"format",void 0),a([n.Property(null)],d.prototype,"decimals",void 0),a([n.Property(null)],d.prototype,"currency",void 0),a([n.Property(!0)],d.prototype,"strictMode",void 0),a([n.Property(!1)],d.prototype,"validateDecimalOnType",void 0),a([n.Property("Auto")],d.prototype,"floatLabelType",void 0),a([n.Event()],d.prototype,"created",void 0),a([n.Event()],d.prototype,"destroyed",void 0),a([n.Event()],d.prototype,"change",void 0),d=a([i.NotifyPropertyChanges],d),t.NumericTextBox=d,t.numerictextboxHelper=n.CreateBuilder(d)}.apply(t,i))&&(e.exports=s)},function(t,n){t.exports=e},function(e,t,n){var i,s;i=[n,t,n(3)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"};!function(e){function t(e){var t={container:null,buttons:[],clearButton:null};if(n.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(t.container=f(e,i.INPUTGROUP,i.INPUTCUSTOMTAG,"span"),e.element.parentNode.insertBefore(t.container,e.element),n.addClass([e.element],i.INPUT),t.container.appendChild(e.element)):l(e,t),e.element.addEventListener("focus",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.remove("e-input-focus")}),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(t.clearButton=p(e.element,t.container),t.container.classList.contains(i.FLOATINPUT)&&n.addClass([t.container],i.INPUTGROUP)),!n.isNullOrUndefined(e.buttons))for(var s=0;s<e.buttons.length;s++)t.buttons.push(A(e.buttons[s],t.container));return t=u(e,t),P=t,t}function s(){var e=d(this).getElementsByClassName("e-float-text")[0];n.addClass([e],i.LABELTOP),e.classList.contains(i.LABELBOTTOM)&&n.removeClass([e],i.LABELBOTTOM)}function r(){var e=d(this);if(""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM)}}function a(e){e.addEventListener("focus",s),e.addEventListener("blur",r)}function o(e){e.removeEventListener("focus",s),e.removeEventListener("blur",r)}function l(e,t){var s,r;"Auto"===e.floatLabelType&&a(e.element),n.isNullOrUndefined(t.container)?(t.container=f(e,i.FLOATINPUT,i.FLOATCUSTOMTAG,"div"),e.element.parentNode.insertBefore(t.container,e.element)):(n.isNullOrUndefined(e.customTag)||t.container.classList.add(i.FLOATCUSTOMTAG),t.container.classList.add(i.FLOATINPUT)),n.attributes(e.element,{required:"true"}),s=n.createElement("span",{className:i.FLOATLINE}),r=n.createElement("label",{className:i.FLOATTEXT}),n.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),n.attributes(e.element,{"aria-labelledby":r.id})),n.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerHTML=e.element.placeholder,e.element.removeAttribute("placeholder")),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerHTML=e.properties.placeholder),r.innerHTML||t.container.classList.add(i.NOFLOATLABEL),t.container.appendChild(e.element),t.container.appendChild(s),t.container.appendChild(r),h(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(i.LABELBOTTOM)&&n.removeClass([r],i.LABELBOTTOM),n.addClass([r],i.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){h(e.element.value,r)}),e.element.addEventListener("blur",function(t){h(e.element.value,r)}))}function u(e,t){if(!n.isNullOrUndefined(e.properties))for(var i=0,s=Object.keys(e.properties);i<s.length;i++){var r=s[i];switch(r){case"cssClass":y(e.properties.cssClass,[t.container]);break;case"enabled":O(e.properties.enabled,e.element);break;case"enableRtl":L(e.properties.enableRtl,[t.container]);break;case"placeholder":b(e.properties.placeholder,e.element);break;case"readonly":E(e.properties.readonly,e.element)}}return t}function c(e,t){e?n.removeClass([t],i.CLEARICONHIDE):n.addClass([t],i.CLEARICONHIDE)}function h(e,t){e?(n.addClass([t],i.LABELTOP),t.classList.contains(i.LABELBOTTOM)&&n.removeClass([t],i.LABELBOTTOM)):(t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM))}function d(e){return e.parentNode}function p(e,t){n.attributes(e,{required:""});var s=n.createElement("span",{className:i.CLEARICON});return t.appendChild(s),!n.isNullOrUndefined(P.container)&&P.container.classList.contains(i.FLOATINPUT)&&n.addClass([P.container],i.INPUTGROUP),n.addClass([s],i.CLEARICONHIDE),m(e,s),s}function m(e,t){t.addEventListener("click",function(s){e.classList.contains(i.DISABLE)||e.readOnly||(s.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",n.addClass([t],i.CLEARICONHIDE))}),e.addEventListener("input",function(n){c(e.value,t)}),e.addEventListener("focus",function(n){c(e.value,t)}),e.addEventListener("blur",function(e){setTimeout(function(){n.addClass([t],i.CLEARICONHIDE)},200)})}function v(e,t){if(d(e).classList.contains(i.FLOATINPUT)&&"Auto"===t){var n=d(e).getElementsByClassName("e-float-text")[0];h(e.value,n)}}function f(e,t,i,s){var r;return n.isNullOrUndefined(e.customTag)?r=n.createElement(s,{className:t}):(r=n.createElement(e.customTag,{className:t}),r.classList.add(i)),r}function y(e,t,i){n.isNullOrUndefined(i)||""===i||n.removeClass(t,i),n.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function b(e,t){var s;s=d(t),s.classList.contains(i.FLOATINPUT)?n.isNullOrUndefined(e)||""===e?(s.classList.add(i.NOFLOATLABEL),s.getElementsByClassName(i.FLOATTEXT)[0].textContent=""):(s.getElementsByClassName(i.FLOATTEXT)[0].textContent=e,s.classList.remove(i.NOFLOATLABEL)):n.isNullOrUndefined(e)||""===e?(t.removeAttribute("placeholder"),t.removeAttribute("aria-placeholder")):n.attributes(t,{placeholder:e,"aria-placeholder":e})}function E(e,t,i){e?n.attributes(t,{readonly:""}):t.removeAttribute("readonly"),n.isNullOrUndefined(i)||v(t,i)}function L(e,t){e?n.addClass(t,i.RTL):n.removeClass(t,i.RTL)}function O(e,t,s){var r={disabled:"disabled","aria-disabled":"true"};e?(t.classList.remove(i.DISABLE),T(r,t)):(t.classList.add(i.DISABLE),g(r,t)),n.isNullOrUndefined(s)||v(t,s)}function T(e,t){for(var n=0,s=Object.keys(e);n<s.length;n++){var r=s[n],a=void 0;a=d(t),"disabled"===r&&t.classList.remove(i.DISABLE),"disabled"===r&&a.classList.contains(i.INPUTGROUP)&&a.classList.remove(i.DISABLE),"placeholder"===r&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent="":t.removeAttribute(r)}}function g(e,t){for(var n=0,s=Object.keys(e);n<s.length;n++){var r=s[n],a=void 0;a=d(t),"disabled"===r&&t.classList.add(i.DISABLE),"disabled"===r&&a.classList.contains(i.INPUTGROUP)&&a.classList.add(i.DISABLE),"placeholder"===r&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent=e[r]:t.setAttribute(r,e[r])}}function N(e){var t=e.container;if(!n.isNullOrUndefined(t)&&t.classList.contains(i.FLOATINPUT)){var s=t.querySelector("input"),r=t.querySelector("."+i.FLOATTEXT).textContent,a=null!==t.querySelector(".e-clear-icon");n.detach(t.querySelector("."+i.FLOATLINE)),n.detach(t.querySelector("."+i.FLOATTEXT)),n.classList(t,[i.INPUTGROUP],[i.FLOATINPUT]),o(s),n.attributes(s,{placeholder:r}),s.classList.add(i.INPUT),a||s.removeAttribute("required")}}function C(e,t,s){var r=n.closest(e,"."+i.INPUTGROUP);if("Never"!==t){var a={element:e,floatLabelType:t,properties:{placeholder:s}},o=r.querySelector(".e-clear-icon"),u={container:r};if(e.classList.remove(i.INPUT),l(a,u),n.isNullOrUndefined(o)&&(o=r.querySelector(".e-input-group-icon")),n.isNullOrUndefined(o))r.classList.remove(i.INPUTGROUP);else{var c=r.querySelector("."+i.FLOATLINE),h=r.querySelector("."+i.FLOATTEXT);r.insertBefore(e,o),r.insertBefore(c,o),r.insertBefore(h,o)}}}function A(e,t){var s=n.createElement("span",{className:e});return t.appendChild(s),t.classList.contains(i.INPUTGROUP)||t.classList.add(i.INPUTGROUP),s.addEventListener("mousedown",function(){t.classList.contains("e-disabled")||t.querySelector("input").readOnly||this.classList.add("e-input-btn-ripple")}),s.addEventListener("mouseup",function(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}),s}var P={container:null,buttons:[],clearButton:null};e.createInput=t,e.setCssClass=y,e.setPlaceholder=b,e.setReadonly=E,e.setEnableRtl=L,e.setEnabled=O,e.removeAttributes=T,e.addAttributes=g,e.removeFloating=N,e.addFloating=C,e.appendSpan=A}(t.Input||(t.Input={}))}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s;i=[n,t,n(4)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=s)}])});
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@syncfusion/ej2-base"));else if("function"==typeof define&&define.amd)define(["@syncfusion/ej2-base"],t);else{var n=t("object"==typeof exports?require("@syncfusion/ej2-base"):e["@syncfusion/ej2-base"]);for(var i in n)("object"==typeof exports?exports:e)[i]=n[i]}}(this,function(e){return function(e){function t(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return e[i].call(s.exports,s,s.exports,t),s.loaded=!0,s.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){var i,s;i=[n,t,n(1),n(5)],void 0!==(s=function(e,t,n,i){"use strict";function s(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),s(n),s(i)}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s;i=[n,t,n(2)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s,r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),a=this&&this.__decorate||function(e,t,n,i){var s,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var o=e.length-1;o>=0;o--)(s=e[o])&&(a=(r<3?s(a):r>3?s(t,n,a):s(t,n))||a);return r>3&&a&&Object.defineProperty(t,n,a),a};i=[n,t,n(3),n(3),n(3),n(3),n(3),n(4)],void 0!==(s=function(e,t,n,i,s,o,l,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var c="e-input-group-icon",h=new RegExp("/^(-)?(d*)$/"),d=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.isPrevFocused=!1,i.decimalSeparator=".",i.intRegExp=new RegExp("/^(-)?(d*)$/"),i.isCalled=!1,i}return r(t,e),t.prototype.preRender=function(){var e=o.getValue("ej2_instances",this.element);if(this.cloneElement=this.element.cloneNode(!0),this.angularTagName=null,"EJ-NUMERICTEXTBOX"===this.element.tagName){this.angularTagName=this.element.tagName;var t=s.createElement("input"),i=0;for(i;i<this.element.attributes.length;i++)t.setAttribute(this.element.attributes[i].nodeName,this.element.attributes[i].nodeValue),t.innerHTML=this.element.innerHTML;this.element.parentNode.appendChild(t),this.element.parentNode.removeChild(this.element),this.element=t,o.setValue("ej2_instances",e,this.element)}s.attributes(this.element,{role:"spinbutton",tabindex:"0",autocomplete:"off","aria-live":"assertive"});var r={incrementTitle:"Increment value",decrementTitle:"Decrement value",placeholder:""};this.l10n=new n.L10n("numerictextbox",r,this.locale),this.isValidState=!0,this.inputStyle=null,this.inputName=null,this.cultureInfo={},this.initCultureInfo(),this.initCultureFunc(),this.checkAttributes(),this.prevValue=this.value,this.validateMinMax(),this.validateStep(),null===this.placeholder&&this.updatePlaceholder()},t.prototype.render=function(){"input"===this.element.tagName.toLowerCase()&&(this.createWrapper(),this.showSpinButton&&this.spinBtnCreation(),o.isNullOrUndefined(this.width)||s.setStyleAttribute(this.container,{width:o.formatUnit(this.width)}),this.changeValue(this.value),this.wireEvents(),null===this.value||isNaN(this.value)||this.decimals&&this.setProperties({value:this.roundNumber(this.value,this.decimals)},!0))},t.prototype.checkAttributes=function(){for(var e=["value","min","max","step","disabled","readonly","style","name"],t=0,n=e;t<n.length;t++){var i=n[t];if(!o.isNullOrUndefined(this.element.getAttribute(i)))switch(i){case"disabled":var s="disabled"!==this.element.getAttribute(i)&&"true"!==this.element.getAttribute(i);this.setProperties({enabled:s},!0);break;case"readonly":var r="readonly"===this.element.getAttribute(i)||"true"===this.element.getAttribute(i);this.setProperties({readonly:r},!0);break;case"style":this.inputStyle=this.element.getAttribute(i);break;case"name":this.inputName=this.element.getAttribute(i);break;default:var a=this.instance.getNumberParser({format:"n"})(this.element.getAttribute(i));(null!==a&&!isNaN(a)||"value"===i)&&this.setProperties(o.setValue(i,a,{}),!0)}}},t.prototype.updatePlaceholder=function(){this.setProperties({placeholder:this.l10n.getConstant("placeholder")},!0)},t.prototype.initCultureFunc=function(){this.instance=new l.Internationalization(this.locale)},t.prototype.initCultureInfo=function(){this.cultureInfo.format=this.format,null!==o.getValue("currency",this)&&o.setValue("currency",this.currency,this.cultureInfo)},t.prototype.createWrapper=function(){var e=u.Input.createInput({element:this.element,customTag:this.angularTagName,floatLabelType:this.floatLabelType,properties:{readonly:this.readonly,placeholder:this.placeholder,cssClass:this.cssClass,enableRtl:this.enableRtl,enabled:this.enabled}});this.container=e.container,s.addClass([this.container],"e-numeric"),this.readonly&&s.attributes(this.element,{"aria-readonly":"true"}),this.hiddenInput=s.createElement("input",{attrs:{type:"hidden"}}),this.inputName=null!==this.inputName?this.inputName:this.element.id,this.element.removeAttribute("name"),s.attributes(this.hiddenInput,{name:this.inputName}),this.container.insertBefore(this.hiddenInput,this.element),null!==this.inputStyle&&s.attributes(this.container,{style:this.inputStyle})},t.prototype.spinBtnCreation=function(){this.spinDown=u.Input.appendSpan(c+" e-spin-down",this.container),s.attributes(this.spinDown,{title:this.l10n.getConstant("decrementTitle"),"aria-label":this.l10n.getConstant("decrementTitle")}),this.spinUp=u.Input.appendSpan(c+" e-spin-up",this.container),s.attributes(this.spinUp,{title:this.l10n.getConstant("incrementTitle"),"aria-label":this.l10n.getConstant("incrementTitle")}),this.wireSpinBtnEvents()},t.prototype.validateMinMax=function(){("number"!=typeof this.min||isNaN(this.min))&&this.setProperties({min:-Number.MAX_VALUE},!0),("number"!=typeof this.max||isNaN(this.max))&&this.setProperties({max:Number.MAX_VALUE},!0),null!==this.decimals&&(this.min!==-Number.MAX_VALUE&&this.setProperties({min:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.min))},!0),this.max!==Number.MAX_VALUE&&this.setProperties({max:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.max))},!0)),this.setProperties({min:this.min>this.max?this.max:this.min},!0),s.attributes(this.element,{"aria-valuemin":this.min.toString(),"aria-valuemax":this.max.toString()})},t.prototype.formattedValue=function(e,t){return this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(t)},t.prototype.validateStep=function(){null!==this.decimals&&this.setProperties({step:this.instance.getNumberParser({format:"n"})(this.formattedValue(this.decimals,this.step))},!0)},t.prototype.action=function(e){var t=this.isFocused?this.instance.getNumberParser({format:"n"})(this.element.value):this.value;this.changeValue(this.performAction(t,this.step,e)),this.raiseChangeEvent()},t.prototype.checkErrorClass=function(){this.isValidState?s.removeClass([this.container],"e-error"):s.addClass([this.container],"e-error"),s.attributes(this.element,{"aria-invalid":this.isValidState?"false":"true"})},t.prototype.wireEvents=function(){n.EventHandler.add(this.element,"focus",this.focusIn,this),n.EventHandler.add(this.element,"blur",this.focusOut,this),n.EventHandler.add(this.element,"keydown",this.keyDownHandler,this),n.EventHandler.add(this.element,"keypress",this.keyPressHandler,this),n.EventHandler.add(this.element,"change",this.changeHandler,this),n.EventHandler.add(this.element,"paste",this.pasteHandler,this)},t.prototype.wireSpinBtnEvents=function(){n.EventHandler.add(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner,this),n.EventHandler.add(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this),n.EventHandler.add(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner,this)},t.prototype.unwireEvents=function(){n.EventHandler.remove(this.element,"focus",this.focusIn),n.EventHandler.remove(this.element,"blur",this.focusOut),n.EventHandler.remove(this.element,"keydown",this.keyDownHandler),n.EventHandler.remove(this.element,"keypress",this.keyPressHandler),n.EventHandler.remove(this.element,"change",this.changeHandler),n.EventHandler.remove(this.element,"paste",this.pasteHandler)},t.prototype.unwireSpinBtnEvents=function(){n.EventHandler.remove(this.spinUp,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchStartEvent,this.mouseDownOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchEndEvent,this.mouseUpOnSpinner),n.EventHandler.remove(this.spinUp,n.Browser.touchMoveEvent,this.touchMoveOnSpinner),n.EventHandler.remove(this.spinDown,n.Browser.touchMoveEvent,this.touchMoveOnSpinner)},t.prototype.changeHandler=function(e){this.element.value.length||this.setProperties({value:null},!0);var t=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(t,e)},t.prototype.raiseChangeEvent=function(e){if(this.prevValue!==this.value){var t={};this.changeEventArgs={value:this.value,previousValue:this.prevValue},e&&(this.changeEventArgs.event=e),o.merge(t,this.changeEventArgs),this.prevValue=this.value,this.trigger("change",t)}},t.prototype.pasteHandler=function(){var e=this,t=this.element.value;setTimeout(function(){e.numericRegex().test(e.element.value)||(e.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("[,.](.*)"),s=(e.toString(),t.toString(),i.test(e.toString())),r=i.test(t.toString());if(s||r){var a=s?i.exec(e.toString())[0].length:0,o=r?i.exec(t.toString())[0].length:0,l=Math.max(a,o);return e=this.roundValue(n,l)}return n},t.prototype.roundValue=function(e,t){t=t||0;var n=Math.pow(10,t);return e*=n,e=Math.round(e)/n},t.prototype.updateValue=function(e,t){null===e||isNaN(e)||this.decimals&&(e=this.roundNumber(e,this.decimals)),this.changeValue(null===e||isNaN(e)?null:this.strictMode?this.trimValue(e):e),this.raiseChangeEvent(t)},t.prototype.changeValue=function(e){if(e||0===e){var t=void 0,n=e.toString().split(".")[1];t=n&&n.length?n.length:0,null!==this.decimals&&(t=t<this.decimals?t:this.decimals),this.setProperties({value:this.roundNumber(e,t)},!0)}else e=null,this.setProperties({value:e},!0);this.modifyText(),this.strictMode||this.validateState()},t.prototype.modifyText=function(){if(this.value||0===this.value){var e=this.formatNumber();this.element.value=this.isFocused?e:this.instance.getNumberFormat(this.cultureInfo)(this.value),s.attributes(this.element,{"aria-valuenow":e}),this.hiddenInput.value=e}else this.element.value="",this.element.removeAttribute("aria-valuenow"),this.hiddenInput.value=null},t.prototype.validateState=function(){this.isValidState=!0,(this.value||0===this.value)&&(this.isValidState=!(this.value>this.max||this.value<this.min)),this.checkErrorClass()},t.prototype.formatNumber=function(){var e,t=this.value,n=t.toString().split(".")[1];return e=n&&n.length?n.length:0,null!==this.decimals&&(e=e<this.decimals?e:this.decimals),this.instance.getNumberFormat({maximumFractionDigits:e,minimumFractionDigits:e,useGrouping:!1})(this.value)},t.prototype.trimValue=function(e){return e>this.max?this.max:e<this.min?this.min:e},t.prototype.roundNumber=function(e,t){var n=e,i=t||0,s=n.toString().split("e");n=Math.round(Number(s[0]+"e"+(s[1]?Number(s[1])+i:i)));var r=n.toString().split("e");return n=Number(r[0]+"e"+(r[1]?Number(r[1])-i:-i)),Number(n.toFixed(i))},t.prototype.cancelEvent=function(e){return e.preventDefault(),!1},t.prototype.keyPressHandler=function(e){if(0===e.which||e.metaKey||e.ctrlKey||8===e.keyCode||13===e.keyCode)return!0;var t=String.fromCharCode(e.which),n=this.element.value;return n=n.substring(0,this.element.selectionStart)+t+n.substring(this.element.selectionEnd),!!this.numericRegex().test(n)||(e.preventDefault(),e.stopPropagation(),!1)},t.prototype.numericRegex=function(){var e=l.getNumericObject(this.locale),t=o.getValue("decimal",e),n="*";return"."===t&&(t="\\"+t),0===this.decimals?h:(this.decimals&&this.validateDecimalOnType&&(n="{0,"+this.decimals+"}"),new RegExp("^(-)?(((\\d+("+t+"\\d"+n+")?)|("+t+"\\d"+n+")))?$"))},t.prototype.mouseWheel=function(e){e.preventDefault();var t,n=e;n.wheelDelta?t=n.wheelDelta/120:n.detail&&(t=-n.detail/3),t>0?this.action("increment"):t<0&&this.action("decrement"),this.cancelEvent(e)},t.prototype.focusIn=function(e){if(this.enabled&&!this.readonly){if(this.isFocused=!0,s.removeClass([this.container],"e-error"),this.prevValue=this.value,this.value||0===this.value){var t=this.formatNumber();this.element.value=t,this.isPrevFocused||this.element.setSelectionRange(0,t.length)}n.Browser.isDevice||n.EventHandler.add(this.element,"mousewheel DOMMouseScroll",this.mouseWheel,this)}},t.prototype.focusOut=function(e){if(this.isPrevFocused){if(e.preventDefault(),n.Browser.isDevice){var t=this.element.value;this.element.focus(),this.isPrevFocused=!1;var i=this.element;setTimeout(function(){i.value=t},200)}}else{this.isFocused=!1,this.element.value.length||this.setProperties({value:null},!0);var s=this.instance.getNumberParser({format:"n"})(this.element.value);this.updateValue(s),n.Browser.isDevice||n.EventHandler.remove(this.element,"mousewheel DOMMouseScroll",this.mouseWheel)}},t.prototype.mouseDownOnSpinner=function(e){var t=this;if(this.isFocused&&(this.isPrevFocused=!0,e.preventDefault()),this.getElementData(e)){var i=(this.getElementData(e),e.currentTarget),s=i.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.add(i,"mouseleave",this.mouseUpClick,this),this.timeOut=setInterval(function(){t.isCalled=!0,t.action(s)},150),n.EventHandler.add(document,"mouseup",this.mouseUpClick,this)}},t.prototype.touchMoveOnSpinner=function(e){document.elementFromPoint(e.clientX,e.clientY).classList.contains(c)||clearInterval(this.timeOut)},t.prototype.mouseUpOnSpinner=function(e){if(this.isPrevFocused&&(this.element.focus(),n.Browser.isDevice||(this.isPrevFocused=!1)),n.Browser.isDevice||e.preventDefault(),this.getElementData(e)){var t=e.currentTarget,i=t.classList.contains("e-spin-up")?"increment":"decrement";n.EventHandler.remove(t,"mouseleave",this.mouseUpClick),this.isCalled||this.action(i),this.isCalled=!1,n.EventHandler.remove(document,"mouseup",this.mouseUpClick)}},t.prototype.getElementData=function(e){return!(e.which&&3===e.which||e.button&&2===e.button||!this.enabled||this.readonly)&&(clearInterval(this.timeOut),!0)},t.prototype.mouseUpClick=function(e){e.stopPropagation(),clearInterval(this.timeOut),this.isCalled=!1,n.EventHandler.remove(this.spinUp,"mouseleave",this.mouseUpClick),n.EventHandler.remove(this.spinDown,"mouseleave",this.mouseUpClick)},t.prototype.increment=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"increment"))},t.prototype.decrement=function(e){void 0===e&&(e=this.step),this.changeValue(this.performAction(this.value,e,"decrement"))},t.prototype.destroy=function(){this.unwireEvents(),s.detach(this.hiddenInput),this.showSpinButton&&(this.unwireSpinBtnEvents(),s.detach(this.spinUp),s.detach(this.spinDown)),this.container.parentElement.appendChild(this.cloneElement),s.detach(this.container),e.prototype.destroy.call(this)},t.prototype.getText=function(){return this.element.value},t.prototype.getPersistData=function(){var e=["value"];return this.addOnPersist(e)},t.prototype.onPropertyChanged=function(e,t){for(var n=0,i=Object.keys(e);n<i.length;n++){var r=i[n];switch(r){case"width":s.setStyleAttribute(this.container,{width:o.formatUnit(e.width)});break;case"cssClass":u.Input.setCssClass(e.cssClass,[this.container],t.cssClass);break;case"enabled":u.Input.setEnabled(e.enabled,this.element);break;case"enableRtl":u.Input.setEnableRtl(e.enableRtl,[this.container]);break;case"readonly":u.Input.setReadonly(e.readonly,this.element),this.readonly?s.attributes(this.element,{"aria-readonly":"true"}):this.element.removeAttribute("aria-readonly");break;case"placeholder":u.Input.setPlaceholder(e.placeholder,this.element);break;case"step":this.step=e.step,this.validateStep();break;case"showSpinButton":e.showSpinButton?this.spinBtnCreation():(s.detach(this.spinUp),s.detach(this.spinDown));break;case"value":this.updateValue(e.value);break;case"min":case"max":o.setValue(r,o.getValue(r,e),this),this.validateMinMax(),this.updateValue(this.value);break;case"strictMode":this.strictMode=e.strictMode,this.updateValue(this.value),this.validateState();break;case"locale":this.initCultureFunc(),this.l10n.setLocale(this.locale),this.updatePlaceholder(),u.Input.setPlaceholder(this.placeholder,this.element),this.updateValue(this.value);break;case"currency":o.setValue(r,o.getValue(r,e),this.cultureInfo),this.updateValue(this.value);break;case"format":o.setValue(r,o.getValue(r,e),this),this.initCultureInfo(),this.updateValue(this.value);break;case"decimals":this.decimals=e.decimals,this.updateValue(this.value)}}},t.prototype.getModuleName=function(){return"numerictextbox"},t}(n.Component);a([n.Property("")],d.prototype,"cssClass",void 0),a([n.Property(null)],d.prototype,"value",void 0),a([n.Property(-Number.MAX_VALUE)],d.prototype,"min",void 0),a([n.Property(Number.MAX_VALUE)],d.prototype,"max",void 0),a([n.Property(1)],d.prototype,"step",void 0),a([n.Property(null)],d.prototype,"width",void 0),a([n.Property(null)],d.prototype,"placeholder",void 0),a([n.Property(!0)],d.prototype,"showSpinButton",void 0),a([n.Property(!1)],d.prototype,"readonly",void 0),a([n.Property(!0)],d.prototype,"enabled",void 0),a([n.Property(!1)],d.prototype,"enableRtl",void 0),a([n.Property(!1)],d.prototype,"enablePersistence",void 0),a([n.Property("n2")],d.prototype,"format",void 0),a([n.Property(null)],d.prototype,"decimals",void 0),a([n.Property(null)],d.prototype,"currency",void 0),a([n.Property(!0)],d.prototype,"strictMode",void 0),a([n.Property(!1)],d.prototype,"validateDecimalOnType",void 0),a([n.Property("Never")],d.prototype,"floatLabelType",void 0),a([n.Event()],d.prototype,"created",void 0),a([n.Event()],d.prototype,"destroyed",void 0),a([n.Event()],d.prototype,"change",void 0),d=a([i.NotifyPropertyChanges],d),t.NumericTextBox=d,t.numerictextboxHelper=n.CreateBuilder(d)}.apply(t,i))&&(e.exports=s)},function(t,n){t.exports=e},function(e,t,n){var i,s;i=[n,t,n(3)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={RTL:"e-rtl",DISABLE:"e-disabled",INPUT:"e-input",INPUTGROUP:"e-input-group",FLOATINPUT:"e-float-input",FLOATLINE:"e-float-line",FLOATTEXT:"e-float-text",CLEARICON:"e-clear-icon",CLEARICONHIDE:"e-clear-icon-hide",LABELTOP:"e-label-top",LABELBOTTOM:"e-label-bottom",NOFLOATLABEL:"e-no-float-label",INPUTCUSTOMTAG:"e-input-custom-tag",FLOATCUSTOMTAG:"e-float-custom-tag"};!function(e){function t(e){var t={container:null,buttons:[],clearButton:null};if(n.isNullOrUndefined(e.floatLabelType)||"Never"===e.floatLabelType?(t.container=f(e,i.INPUTGROUP,i.INPUTCUSTOMTAG,"span"),e.element.parentNode.insertBefore(t.container,e.element),n.addClass([e.element],i.INPUT),t.container.appendChild(e.element)):l(e,t),e.element.addEventListener("focus",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.add("e-input-focus")}),e.element.addEventListener("blur",function(){var e=d(this);e.classList.contains("e-input-group")&&e.classList.remove("e-input-focus")}),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.showClearButton)||!e.properties.showClearButton||(t.clearButton=p(e.element,t.container),t.container.classList.contains(i.FLOATINPUT)&&n.addClass([t.container],i.INPUTGROUP)),!n.isNullOrUndefined(e.buttons))for(var s=0;s<e.buttons.length;s++)t.buttons.push(P(e.buttons[s],t.container));return t=u(e,t),A=t,t}function s(){var e=d(this).getElementsByClassName("e-float-text")[0];n.addClass([e],i.LABELTOP),e.classList.contains(i.LABELBOTTOM)&&n.removeClass([e],i.LABELBOTTOM)}function r(){var e=d(this);if(""===e.getElementsByTagName("input")[0].value){var t=e.getElementsByClassName("e-float-text")[0];t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM)}}function a(e){e.addEventListener("focus",s),e.addEventListener("blur",r)}function o(e){e.removeEventListener("focus",s),e.removeEventListener("blur",r)}function l(e,t){var s,r;"Auto"===e.floatLabelType&&a(e.element),n.isNullOrUndefined(t.container)?(t.container=f(e,i.FLOATINPUT,i.FLOATCUSTOMTAG,"div"),e.element.parentNode.insertBefore(t.container,e.element)):(n.isNullOrUndefined(e.customTag)||t.container.classList.add(i.FLOATCUSTOMTAG),t.container.classList.add(i.FLOATINPUT)),n.attributes(e.element,{required:"true"}),s=n.createElement("span",{className:i.FLOATLINE}),r=n.createElement("label",{className:i.FLOATTEXT}),n.isNullOrUndefined(e.element.id)||""===e.element.id||(r.id="label_"+e.element.id.replace(/ /g,"_"),n.attributes(e.element,{"aria-labelledby":r.id})),n.isNullOrUndefined(e.element.placeholder)||""===e.element.placeholder||(r.innerHTML=e.element.placeholder,e.element.removeAttribute("placeholder")),n.isNullOrUndefined(e.properties)||n.isNullOrUndefined(e.properties.placeholder)||""===e.properties.placeholder||(r.innerHTML=e.properties.placeholder),r.innerHTML||t.container.classList.add(i.NOFLOATLABEL),t.container.appendChild(e.element),t.container.appendChild(s),t.container.appendChild(r),h(e.element.value,r),"Always"===e.floatLabelType&&(r.classList.contains(i.LABELBOTTOM)&&n.removeClass([r],i.LABELBOTTOM),n.addClass([r],i.LABELTOP)),"Auto"===e.floatLabelType&&(e.element.addEventListener("input",function(t){h(e.element.value,r)}),e.element.addEventListener("blur",function(t){h(e.element.value,r)}))}function u(e,t){if(!n.isNullOrUndefined(e.properties))for(var i=0,s=Object.keys(e.properties);i<s.length;i++){var r=s[i];switch(r){case"cssClass":y(e.properties.cssClass,[t.container]);break;case"enabled":O(e.properties.enabled,e.element);break;case"enableRtl":L(e.properties.enableRtl,[t.container]);break;case"placeholder":b(e.properties.placeholder,e.element);break;case"readonly":E(e.properties.readonly,e.element)}}return t}function c(e,t){e?n.removeClass([t],i.CLEARICONHIDE):n.addClass([t],i.CLEARICONHIDE)}function h(e,t){e?(n.addClass([t],i.LABELTOP),t.classList.contains(i.LABELBOTTOM)&&n.removeClass([t],i.LABELBOTTOM)):(t.classList.contains(i.LABELTOP)&&n.removeClass([t],i.LABELTOP),n.addClass([t],i.LABELBOTTOM))}function d(e){return e.parentNode}function p(e,t){n.attributes(e,{required:""});var s=n.createElement("span",{className:i.CLEARICON});return t.appendChild(s),!n.isNullOrUndefined(A.container)&&A.container.classList.contains(i.FLOATINPUT)&&n.addClass([A.container],i.INPUTGROUP),n.addClass([s],i.CLEARICONHIDE),m(e,s),s}function m(e,t){t.addEventListener("click",function(s){e.classList.contains(i.DISABLE)||e.readOnly||(s.preventDefault(),e!==document.activeElement&&e.focus(),e.value="",n.addClass([t],i.CLEARICONHIDE))}),e.addEventListener("input",function(n){c(e.value,t)}),e.addEventListener("focus",function(n){c(e.value,t)}),e.addEventListener("blur",function(e){setTimeout(function(){n.addClass([t],i.CLEARICONHIDE)},200)})}function v(e,t){if(d(e).classList.contains(i.FLOATINPUT)&&"Auto"===t){var n=d(e).getElementsByClassName("e-float-text")[0];h(e.value,n)}}function f(e,t,i,s){var r;return n.isNullOrUndefined(e.customTag)?r=n.createElement(s,{className:t}):(r=n.createElement(e.customTag,{className:t}),r.classList.add(i)),r}function y(e,t,i){n.isNullOrUndefined(i)||""===i||n.removeClass(t,i),n.isNullOrUndefined(e)||""===e||n.addClass(t,e)}function b(e,t){var s;s=d(t),s.classList.contains(i.FLOATINPUT)?n.isNullOrUndefined(e)||""===e?(s.classList.add(i.NOFLOATLABEL),s.getElementsByClassName(i.FLOATTEXT)[0].textContent=""):(s.getElementsByClassName(i.FLOATTEXT)[0].textContent=e,s.classList.remove(i.NOFLOATLABEL)):n.isNullOrUndefined(e)||""===e?(t.removeAttribute("placeholder"),t.removeAttribute("aria-placeholder")):n.attributes(t,{placeholder:e,"aria-placeholder":e})}function E(e,t,i){e?n.attributes(t,{readonly:""}):t.removeAttribute("readonly"),n.isNullOrUndefined(i)||v(t,i)}function L(e,t){e?n.addClass(t,i.RTL):n.removeClass(t,i.RTL)}function O(e,t,s){var r={disabled:"disabled","aria-disabled":"true"};e?(t.classList.remove(i.DISABLE),T(r,t)):(t.classList.add(i.DISABLE),g(r,t)),n.isNullOrUndefined(s)||v(t,s)}function T(e,t){for(var n=0,s=Object.keys(e);n<s.length;n++){var r=s[n],a=void 0;a=d(t),"disabled"===r&&t.classList.remove(i.DISABLE),"disabled"===r&&a.classList.contains(i.INPUTGROUP)&&a.classList.remove(i.DISABLE),"placeholder"===r&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent="":t.removeAttribute(r)}}function g(e,t){for(var n=0,s=Object.keys(e);n<s.length;n++){var r=s[n],a=void 0;a=d(t),"disabled"===r&&t.classList.add(i.DISABLE),"disabled"===r&&a.classList.contains(i.INPUTGROUP)&&a.classList.add(i.DISABLE),"placeholder"===r&&a.classList.contains(i.FLOATINPUT)?a.getElementsByClassName(i.FLOATTEXT)[0].textContent=e[r]:t.setAttribute(r,e[r])}}function N(e){var t=e.container;if(!n.isNullOrUndefined(t)&&t.classList.contains(i.FLOATINPUT)){var s=t.querySelector("input"),r=t.querySelector("."+i.FLOATTEXT).textContent,a=null!==t.querySelector(".e-clear-icon");n.detach(t.querySelector("."+i.FLOATLINE)),n.detach(t.querySelector("."+i.FLOATTEXT)),n.classList(t,[i.INPUTGROUP],[i.FLOATINPUT]),o(s),n.attributes(s,{placeholder:r}),s.classList.add(i.INPUT),a||s.removeAttribute("required")}}function C(e,t,s){var r=n.closest(e,"."+i.INPUTGROUP);if("Never"!==t){var a={element:e,floatLabelType:t,properties:{placeholder:s}},o=r.querySelector(".e-clear-icon"),u={container:r};if(e.classList.remove(i.INPUT),l(a,u),n.isNullOrUndefined(o)&&(o=r.querySelector(".e-input-group-icon")),n.isNullOrUndefined(o))r.classList.remove(i.INPUTGROUP);else{var c=r.querySelector("."+i.FLOATLINE),h=r.querySelector("."+i.FLOATTEXT);r.insertBefore(e,o),r.insertBefore(c,o),r.insertBefore(h,o)}}}function P(e,t){var s=n.createElement("span",{className:e});return t.appendChild(s),t.classList.contains(i.INPUTGROUP)||t.classList.add(i.INPUTGROUP),s.addEventListener("mousedown",function(){t.classList.contains("e-disabled")||t.querySelector("input").readOnly||this.classList.add("e-input-btn-ripple")}),s.addEventListener("mouseup",function(){var e=this;setTimeout(function(){e.classList.remove("e-input-btn-ripple")},500)}),s}var A={container:null,buttons:[],clearButton:null};e.createInput=t,e.setCssClass=y,e.setPlaceholder=b,e.setReadonly=E,e.setEnableRtl=L,e.setEnabled=O,e.removeAttributes=T,e.addAttributes=g,e.removeFloating=N,e.addFloating=C,e.appendSpan=P}(t.Input||(t.Input={}))}.apply(t,i))&&(e.exports=s)},function(e,t,n){var i,s;i=[n,t,n(4)],void 0!==(s=function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n)}.apply(t,i))&&(e.exports=s)}])});

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

__decorate([
Property('Auto')
Property('Never')
], NumericTextBox.prototype, "floatLabelType", void 0);

@@ -734,0 +734,0 @@ __decorate([

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

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

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

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

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

* 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
The <b><a href="#placeholder-string" target="_blank">placeholder</a></b> acts as a label
and floats above the NumericTextBox based on the below values.

@@ -83,4 +82,3 @@ Possible values are:

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>
<b><a href="#floatlabeltype-string" target="_blank">floatLabelType.</a></b>
*/

@@ -87,0 +85,0 @@ placeholder(value:string): BuilderProperties;

@@ -50,4 +50,3 @@ 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';import { isNullOrUndefined, getValue, formatUnit, setValue, merge } from '@syncfusion/ej2-base';import { Internationalization, NumberFormatOptions, getNumericObject } from '@syncfusion/ej2-base';import { NumericTextBoxHelper } from './numerictextbox-builder';import { Input, InputObject, FloatLabelType } from '../input/input';

* 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>
* <b><a href="#floatlabeltype-string" target="_blank">floatLabelType.</a></b>
* @default null

@@ -144,4 +143,3 @@ */

* 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
* The <b><a href="#placeholder-string" target="_blank">placeholder</a></b> acts as a label
* and floats above the NumericTextBox based on the below values.

@@ -152,3 +150,3 @@ * Possible values are:

* * Auto - The floating label floats above the NumericTextBox after focusing it or when enters the value in it.
* @default Auto
* @default Never
*/

@@ -155,0 +153,0 @@ floatLabelType?: FloatLabelType;

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

* 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>
* <b><a href="#floatlabeltype-string" target="_blank">floatLabelType.</a></b>
* @default null

@@ -156,4 +155,3 @@ */

* 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
* The <b><a href="#placeholder-string" target="_blank">placeholder</a></b> acts as a label
* and floats above the NumericTextBox based on the below values.

@@ -164,3 +162,3 @@ * Possible values are:

* * Auto - The floating label floats above the NumericTextBox after focusing it or when enters the value in it.
* @default Auto
* @default Never
*/

@@ -167,0 +165,0 @@ floatLabelType: FloatLabelType;

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

__decorate([
ej2_base_1.Property('Auto')
ej2_base_1.Property('Never')
], NumericTextBox.prototype, "floatLabelType", void 0);

@@ -731,0 +731,0 @@ __decorate([

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

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

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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