@progress/kendo-vue-inputs
Advanced tools
Comparing version 0.4.3-dev.202001211013 to 0.4.3
@@ -1,1 +0,1 @@ | ||
System.register("@progress/kendo-vue-inputs",["@progress/kendo-vue-common","@progress/kendo-vue-intl","vue-class-component"],function(s){var o,a,l;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){a=e(t)},function(t){l=e(t)}],execute:function(){function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var i,n;n={},r.m=i=[function(t,e){t.exports=l},function(t,e){t.exports=o},function(t,i,e){"use strict";function n(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"__esModule",{value:!0}),n(e(3)),n(e(4)),function(t){for(var e in t)s(e,t[e])}(i)},function(t,e,i){"use strict";var n,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s,o,u=(o=i(0))&&o.__esModule?o:{default:o},p=i(1),h=(s=p.VueComponent,r(c,s),c.prototype.created=function(){this.valueDuringOnChange=void 0,this.currentValue=this.$props.defaultValue},c.prototype.mounted=function(){this.input=this.$refs.input,this.hasMounted=!0},c.prototype.updated=function(){this.setValidity()},c.prototype.handleFocus=function(t){this.focused=!0},c.prototype.handleBlur=function(t){this.focused=!1},c.prototype.focus=function(){this.input&&this.input.focus()},Object.defineProperty(c.prototype,"spanClassNames",{get:function(){var t=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox-container":!0,"k-state-focused":this.focused,"k-state-empty":!(this.computedValue||this.$props.placeholder||this.isEmpty),"k-state-invalid":!t&&void 0!==t,"k-rtl":"rtl"===this.$props.dir}},enumerable:!0,configurable:!0}),c.prototype.inputClassNames=function(){var t=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox":!0,"k-state-invalid":!t&&void 0!==t}},Object.defineProperty(c.prototype,"computedValue",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:this.currentValue},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"name",{get:function(){return this.$props.name},enumerable:!0,configurable:!0}),c.prototype.validity=function(){var t={badInput:!!this.input&&this.input.validity.badInput,patternMismatch:!!this.input&&this.input.validity.patternMismatch,rangeOverflow:!!this.input&&this.input.validity.rangeOverflow,rangeUnderflow:!!this.input&&this.input.validity.rangeUnderflow,stepMismatch:!!this.input&&this.input.validity.stepMismatch,tooLong:!!this.input&&this.input.validity.tooLong,typeMismatch:!!this.input&&this.input.validity.typeMismatch,valueMissing:!!this.input&&this.input.validity.valueMissing};return a(a({},t),{customError:void 0!==this.$props.validationMessage,valid:void 0!==this.$props.valid?this.$props.valid:!this.input||!this.isInvalid(t)})},c.prototype.render=function(t){var e=this.$props,i=e.label,n=e.id,r=e.required,s=n||this.inputId,o=t("input",{domProps:a(a({},this.$attrs),{id:s,required:r,value:this.computedValue}),class:a({},this.inputClassNames()),ref:"input",on:{change:this.handleChange,input:this.$listeners.input||this.$listeners.changemodel?this.handleInput:p.noop,animationstart:this.handleAutoFill,animationend:this.handleAutoFillEnd}});return i?t("span",{class:this.spanClassNames,on:{focusin:this.handleFocus,focusout:this.handleBlur},attrs:{dir:this.$props.dir}},[o,i?n?t("label",{attrs:{for:n},class:"k-label"},[i]):t("span",{class:"k-label"},[i]):null]):o},c.prototype.isInvalid=function(t){var e=!1;for(var i in t)t.hasOwnProperty(i)&&(e=e||t[i]);return e},c.prototype.setValidity=function(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")},c.prototype.handleInput=function(t){this.currentValue=t.target.value,this.valueDuringOnChange=t.target.value,this.$nextTick(function(){this.$emit("input",{event:t,value:t.target.value,component:this,target:t.target,validity:this.validity()}),this.$emit("changemodel",t.target.value),this.valueDuringOnChange=void 0})},c.prototype.handleChange=function(t){this.currentValue=t.target.value,this.valueDuringOnChange=t.target.value,this.$nextTick(function(){this.$emit("change",{event:t,value:t.target.value,component:this,target:t.target,validity:this.validity()}),this.$emit("changemodel",t.target.value),this.valueDuringOnChange=void 0})},c.prototype.handleAutoFill=function(t){if("autoFillStart"===t.animationName){var e=t.target.parentNode;e&&e.classList.contains("k-state-empty")&&(this.isEmpty=!0)}},c.prototype.handleAutoFillEnd=function(t){"autoFillEnd"===t.animationName&&t.target.parentNode&&(this.isEmpty=!1)},function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(o=(s<3?r(o):3<s?r(e,i,o):r(e,i))||o);return 3<s&&o&&Object.defineProperty(e,i,o),o}([u.default({model:{event:"changemodel"},inheritAttrs:!1,props:{defaultValue:{type:String,default:""},value:{type:String},label:{type:String},placeholder:String,required:{type:Boolean,default:!1},dir:String,valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String},validityStyles:{type:Boolean,default:!0}}})],c));function c(){var t=null!==s&&s.apply(this,arguments)||this;return t.hasMounted=!1,t.isEmpty=!1,t.currentValue="",t.valueDuringOnChange="",t.inputId=p.guid(),t.focused=!1,t}e.Input=h},function(t,e,i){"use strict";var n,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s,o,a=(o=i(0))&&o.__esModule?o:{default:o},u=i(5),p=i(1),h=i(6),c=(s=p.VueComponent,r(d,s),d.prototype.created=function(){this.looselyFormattedText=null,(this.valueDuringOnChange=void 0)!==this.$props.value?this.currentValue=this.$props.value:void 0!==this.$props.defaultValue?this.currentValue=this.$props.defaultValue:this.currentValue=null},d.prototype.mounted=function(){this.input=this.$refs.input,this.elementWrapper=this.$refs.elementWrapper,this.hasMounted=!0,this.input&&(this.textBeforeInput=this.input.value),this.setValidity()},Object.defineProperty(d.prototype,"computedValue",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this.currentValue},enumerable:!0,configurable:!0}),d.prototype.validity=function(){var t=void 0!==this.$props.validationMessage,e=!this.$props.required||null!==this.computedValue;return{customError:t,valid:void 0!==this.$props.valid?this.$props.valid:e,valueMissing:null===this.computedValue}},d.prototype.focus=function(){this.input&&this.input.focus()},d.prototype.updated=function(){if((!document||document.activeElement===this.input)&&this.input&&null!==this.looselyFormattedText)if(this.input.value!==this.looselyFormattedText)this.input.selectionStart=this.selectionStart,this.input.selectionEnd=this.selectionEnd;else{var t=void 0,e=this.looselyFormattedText.indexOf(this.symbols.decimal);t=0<=e&&e<this.selectionStart?this.selectionEnd:this.selectionEnd-(this.looselyFormattedText.length-this.input.value.length);var i=this.input.value.indexOf(this.symbols.decimal);(this.decimalSelect||null===this.currentValue&&0<=i||-1===e&&0<=i)&&(t=this.selectionStart<i+2&&0<=e?i+1:i),this.decimalSelect||(t=this.selectionEnd-(this.looselyFormattedText.length-this.input.value.length)),this.looselyFormattedText[0]===this.symbols.decimal&&(t=void 0!==this.currentValue?this.formatNumber(this.currentValue).length:0),this.input.selectionStart=this.input.selectionEnd=t}this.input&&(this.textBeforeInput=this.input.value),this.setValidity()},Object.defineProperty(d.prototype,"valueAsLocalString",{get:function(){return this.intl=u.provideIntlService(this),this.symbols=this.intl.numberSymbols(),null!==this.looselyFormattedText&&!this.decimalSelect&&this.parseNumber(this.looselyFormattedText)===this.currentValue&&this.formatNumber(this.currentValue).length<this.looselyFormattedText.length&&0===this.looselyFormattedText.indexOf(this.formatNumber(this.currentValue))?this.looselyFormattedText:this.formatNumber(this.currentValue)},enumerable:!0,configurable:!0}),d.prototype.handleFocus=function(t){this.focused=!0},d.prototype.handleBlur=function(t){this.focused=!1},Object.defineProperty(d.prototype,"spanClassNames",{get:function(){var t=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox-container":!0,"k-state-focused":this.focused,"k-state-empty":!(this.computedValue||this.$props.placeholder||this.isEmpty),"k-state-invalid":!t&&void 0!==t,"k-rtl":"rtl"===this.$props.dir}},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"wrapperClassNames",{get:function(){var t=!this.$props.validityStyles||this.validity().valid;return{"k-numeric-wrap":!0,"k-state-disabled":this.$props.disabled,"k-state-invalid":!t||this.isInvalid}},enumerable:!0,configurable:!0}),d.prototype.render=function(t){var e=this.$props.id||this._inputId,i=u.provideLocalizationService(this);void 0!==this.$props.value&&this.$props.value!==this.currentValue&&(this.currentValue=this.$props.value);var n=t("span",{attrs:{dir:this.$props.dir,"aria-disabled":this.$props.disabled?"true":void 0},class:"k-widget k-numerictextbox"},[t("span",{class:this.wrapperClassNames,ref:"elementWrapper"},[t("input",{attrs:{tabIndex:this.$props.tabIndex,accessKey:this.$props.accessKey,disabled:this.$props.disabled,title:this.$props.title,"aria-valuemin":this.$props.min,"aria-valuemax":this.$props.max,placeholder:this.$props.placeholder,type:this.$props.inputType||"tel",spellCheck:!1,autoComplete:"off",autoCorrect:"off",id:e,"aria-valuenow":null!==this.currentValue?this.currentValue:void 0,name:this.$props.name},class:"k-input k-formatted-value",domProps:{value:this.valueAsLocalString},on:{wheel:this.wheel,keydown:this.keyDown,input:this.elementChange},ref:"input"}),this.$slots.default,this.$props.spinners&&t("span",{class:"k-select",on:{mousedown:this.spinnersWrapperMouseDown}},[t("span",{class:"k-link k-link-increase",attrs:{"aria-label":i.toLanguageString(h.numericIncreaseValue,h.messages[h.numericIncreaseValue]),title:i.toLanguageString(h.numericIncreaseValue,h.messages[h.numericIncreaseValue])},on:{click:this.increase}},[t("span",{class:"k-icon k-i-arrow-n"})]),t("span",{class:"k-link k-link-decrease",attrs:{"aria-label":i.toLanguageString(h.numericDecreaseValue,h.messages[h.numericDecreaseValue]),title:i.toLanguageString(h.numericDecreaseValue,h.messages[h.numericDecreaseValue])},on:{click:this.decrease}},[t("span",{class:"k-icon k-i-arrow-s"})])])])]);return this.$props.label?t("span",{class:this.spanClassNames,on:{focusin:this.handleFocus,focusout:this.handleBlur},attrs:{dir:this.$props.dir}},[n,this.$props.label?this.$props.id?t("label",{attrs:{for:this.$props.id},class:"k-label"},[this.$props.label]):t("span",{class:"k-label"},[this.$props.label]):null]):n},d.prototype.setValidity=function(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"Please enter a valid value!")},d.prototype.formatNumber=function(t){return null==t?"":this.intl.formatNumber(t,this.$props.format).toString()},d.prototype.parseNumber=function(t){return this.intl.parseNumber(t,this.$props.format)},d.prototype.elementChange=function(t){var e=this;if(this.input){var i=this.input,n={value:this.currentValue,looselyFormattedText:i.value,selectionStart:this.input.selectionStart,selectionEnd:this.input.selectionEnd,decimalSelect:!1},r=i.value,s=this.symbols.minusSign;if(r===s)return n.value=null,void this.triggerChange(n,t);if(r.split(s).length!==this.textBeforeInput.split(s).length&&r.length===this.textBeforeInput.length+s.length)return n.value=-this.parseNumber(this.textBeforeInput),void this.triggerChange(n,t);var o=this.symbols.decimal;if(2<r.split(RegExp("\\"+o)).length)return n.decimalSelect=!0,void this.triggerChange(n,t);if(1<r.length&&-1===r.indexOf(o)&&0<=this.textBeforeInput.indexOf(o)&&r.length+o.length===this.textBeforeInput.length)return n.decimalSelect=!0,void this.triggerChange(n,t);var a=this.parseNumber(r);if(a===this.currentValue&&0<r.length&&r[r.length-1]===o&&-1<(this.formatNumber(1.1)||"").toString().indexOf(o))return n.looselyFormattedText=r,void this.triggerChange(n,t);var l=(null===a||isNaN(a))&&0<r.length&&r!==this.symbols.minusSign,u=this.elementWrapper;if(r.length>this.textBeforeInput.length&&this.parseNumber(r)===this.parseNumber(r.slice(0,i.selectionStart))&&(null===this.parseNumber(r.slice(i.selectionStart-1))||isNaN(this.parseNumber(r.slice(i.selectionStart-1))))&&(l=!0),l)return u&&-1===u.className.indexOf("k-state-invalid")&&(this.isInvalid=!0,setTimeout(function(){e.isInvalid=!1},50)),n.looselyFormattedText=this.textBeforeInput,n.selectionStart=n.selectionEnd=i.selectionEnd+this.textBeforeInput.length-i.value.length,void this.triggerChange(n,t);n.value=a,this.triggerChange(n,t)}},d.prototype.nonInputActions=function(t,e){var i={value:t,looselyFormattedText:null,selectionStart:0,selectionEnd:0,decimalSelect:!1};this.triggerChange(i,e)},d.prototype.triggerChange=function(t,e){if(!this.$props.disabled){this.valueDuringOnChange=this.ranged(this.parseNumber(this.formatNumber(this.ranged(t.value))));var i=this.valueDuringOnChange!==this.currentValue;void 0!==this.$props.value?this.currentValue=this.$props.value:this.currentValue=this.valueDuringOnChange,this.looselyFormattedText=t.looselyFormattedText,this.selectionStart=t.selectionStart,this.selectionEnd=t.selectionEnd,this.decimalSelect=t.decimalSelect,i&&(this.$emit("change",{event:e,value:this.valueDuringOnChange,component:this,target:{name:this.$props.name,value:this.valueDuringOnChange},validity:this.validity()}),this.$emit("changemodel",this.valueDuringOnChange)),this.valueDuringOnChange=void 0}},d.prototype.ranged=function(t){return null==t?t:1<t||t<1||1===t?void 0!==this.$props.max&&void 0!==this.$props.min&&this.$props.max<this.$props.min?null:(void 0!==this.$props.max&&t>this.$props.max&&(t=this.$props.max),void 0!==this.$props.min&&t<this.$props.min&&(t=this.$props.min),t):null},d.prototype.increase=function(t){this.nonInputActions((this.currentValue||0)+(this.$props.step||0),t)},d.prototype.decrease=function(t){this.nonInputActions((this.currentValue||0)-(this.$props.step||0),t)},d.prototype.wheel=function(t){document&&document.activeElement===this.input&&this.input&&(t.deltaY<0&&(t.preventDefault(),this.increase(t)),0<t.deltaY&&(t.preventDefault(),this.decrease(t)))},d.prototype.keyDown=function(t){switch(t.keyCode){case 38:this.increase(t);break;case 40:this.decrease(t);break;case 110:var e=this.input;if(e){var i=e.value,n=e.selectionStart,r=e.selectionEnd;e.value=i.slice(0,n)+this.symbols.decimal+i.slice(r),e.selectionStart=e.selectionEnd=n+1,this.elementChange(t)}break;default:return}t.preventDefault()},d.prototype.spinnersWrapperMouseDown=function(t){document&&this.input&&(t.preventDefault(),document.activeElement!==this.input&&this.input.focus())},function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(o=(s<3?r(o):3<s?r(e,i,o):r(e,i))||o);return 3<s&&o&&Object.defineProperty(e,i,o),o}([a.default({model:{event:"changemodel"},inheritAttrs:!1,props:{value:Number,defaultValue:Number,step:{type:Number,default:1},format:[String,Object],tabIndex:Number,accessKey:String,title:String,placeholder:String,min:Number,max:Number,spinners:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},dir:String,name:String,label:String,validationMessage:String,validityStyles:{type:Boolean,default:!0},valid:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},id:String},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}}})],d));function d(){var t=null!==s&&s.apply(this,arguments)||this;return t.hasMounted=!1,t.isInvalid=!1,t.isEmpty=!1,t.currentValue=0,t.valueDuringOnChange=0,t.looselyFormattedText="",t.selectionStart=0,t.selectionEnd=0,t.decimalSelect=!1,t.focused=!1,t.textBeforeInput="",t._inputId=p.guid(),t}e.NumericTextBox=c},function(t,e){t.exports=a},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.numericIncreaseValue="numerictextbox.increment",e.numericDecreaseValue="numerictextbox.decrement",e.sliderIncreaseValue="slider.increment",e.sliderDecreaseValue="slider.decrement",e.sliderDragTitle="slider.dragTitle",e.colorGradientR="colorGradient.r",e.colorGradientG="colorGradient.g",e.colorGradientB="colorGradient.b",e.colorGradientA="colorGradient.a",e.colorGradientHex="colorGradient.hex",e.messages=((n={})[e.numericIncreaseValue]="Increase value",n[e.numericDecreaseValue]="Decrease value",n[e.sliderIncreaseValue]="Increase",n[e.sliderDecreaseValue]="Decrease",n[e.sliderDragTitle]="Drag",n[e.colorGradientR]="r",n[e.colorGradientG]="g",n[e.colorGradientB]="b",n[e.colorGradientA]="a",n[e.colorGradientHex]="hex",n)}],r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}}}); | ||
System.register("@progress/kendo-vue-inputs",["vue-class-component","@progress/kendo-vue-common","@progress/kendo-vue-intl"],function(s){var o,a,l;function e(t){return t.__useDefault?t.default:t}return{setters:[function(t){o=e(t)},function(t){a=e(t)},function(t){l=e(t)}],execute:function(){function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var i,n;n={},r.m=i=[function(t,e){t.exports=o},function(t,e){t.exports=a},function(t,i,e){"use strict";function n(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"__esModule",{value:!0}),n(e(3)),n(e(4)),function(t){for(var e in t)s(e,t[e])}(i)},function(t,e,i){"use strict";var n,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0});var s,o,u=(o=i(0))&&o.__esModule?o:{default:o},p=i(1),h=(s=p.VueComponent,r(c,s),c.prototype.created=function(){this.valueDuringOnChange=void 0,this.currentValue=this.$props.defaultValue},c.prototype.mounted=function(){this.input=this.$refs.input,this.hasMounted=!0},c.prototype.updated=function(){this.setValidity()},c.prototype.handleFocus=function(t){this.focused=!0},c.prototype.handleBlur=function(t){this.focused=!1},c.prototype.focus=function(){this.input&&this.input.focus()},Object.defineProperty(c.prototype,"spanClassNames",{get:function(){var t=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox-container":!0,"k-state-focused":this.focused,"k-state-empty":!(this.computedValue||this.$props.placeholder||this.isEmpty),"k-state-invalid":!t&&void 0!==t,"k-rtl":"rtl"===this.$props.dir}},enumerable:!0,configurable:!0}),c.prototype.inputClassNames=function(){var t=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox":!0,"k-state-invalid":!t&&void 0!==t}},Object.defineProperty(c.prototype,"computedValue",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:void 0!==this.$props.value?this.$props.value:this.currentValue},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"name",{get:function(){return this.$props.name},enumerable:!0,configurable:!0}),c.prototype.validity=function(){var t={badInput:!!this.input&&this.input.validity.badInput,patternMismatch:!!this.input&&this.input.validity.patternMismatch,rangeOverflow:!!this.input&&this.input.validity.rangeOverflow,rangeUnderflow:!!this.input&&this.input.validity.rangeUnderflow,stepMismatch:!!this.input&&this.input.validity.stepMismatch,tooLong:!!this.input&&this.input.validity.tooLong,typeMismatch:!!this.input&&this.input.validity.typeMismatch,valueMissing:!!this.input&&this.input.validity.valueMissing};return a(a({},t),{customError:void 0!==this.$props.validationMessage,valid:void 0!==this.$props.valid?this.$props.valid:!this.input||!this.isInvalid(t)})},c.prototype.render=function(t){var e=this.$props,i=e.label,n=e.id,r=e.required,s=n||this.inputId,o=t("input",{domProps:a(a({},this.$attrs),{id:s,required:r,value:this.computedValue}),class:a({},this.inputClassNames()),ref:"input",on:{change:this.handleChange,input:this.$listeners.input||this.$listeners.changemodel?this.handleInput:p.noop,animationstart:this.handleAutoFill,animationend:this.handleAutoFillEnd}});return i?t("span",{class:this.spanClassNames,on:{focusin:this.handleFocus,focusout:this.handleBlur},attrs:{dir:this.$props.dir}},[o,i?n?t("label",{attrs:{for:n},class:"k-label"},[i]):t("span",{class:"k-label"},[i]):null]):o},c.prototype.isInvalid=function(t){var e=!1;for(var i in t)t.hasOwnProperty(i)&&(e=e||t[i]);return e},c.prototype.setValidity=function(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")},c.prototype.handleInput=function(t){this.currentValue=t.target.value,this.valueDuringOnChange=t.target.value,this.$nextTick(function(){this.$emit("input",{event:t,value:t.target.value,component:this,target:t.target,validity:this.validity()}),this.$emit("changemodel",t.target.value),this.valueDuringOnChange=void 0})},c.prototype.handleChange=function(t){this.currentValue=t.target.value,this.valueDuringOnChange=t.target.value,this.$nextTick(function(){this.$emit("change",{event:t,value:t.target.value,component:this,target:t.target,validity:this.validity()}),this.$emit("changemodel",t.target.value),this.valueDuringOnChange=void 0})},c.prototype.handleAutoFill=function(t){if("autoFillStart"===t.animationName){var e=t.target.parentNode;e&&e.classList.contains("k-state-empty")&&(this.isEmpty=!0)}},c.prototype.handleAutoFillEnd=function(t){"autoFillEnd"===t.animationName&&t.target.parentNode&&(this.isEmpty=!1)},function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(o=(s<3?r(o):3<s?r(e,i,o):r(e,i))||o);return 3<s&&o&&Object.defineProperty(e,i,o),o}([u.default({model:{event:"changemodel"},inheritAttrs:!1,props:{defaultValue:{type:String,default:""},value:{type:String},label:{type:String},placeholder:String,required:{type:Boolean,default:!1},dir:String,valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String},validityStyles:{type:Boolean,default:!0}}})],c));function c(){var t=null!==s&&s.apply(this,arguments)||this;return t.hasMounted=!1,t.isEmpty=!1,t.currentValue="",t.valueDuringOnChange="",t.inputId=p.guid(),t.focused=!1,t}e.Input=h},function(t,e,i){"use strict";var n,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});Object.defineProperty(e,"__esModule",{value:!0});var s,o,a=(o=i(0))&&o.__esModule?o:{default:o},u=i(5),p=i(1),h=i(6),c=(s=p.VueComponent,r(d,s),d.prototype.created=function(){this.looselyFormattedText=null,(this.valueDuringOnChange=void 0)!==this.$props.value?this.currentValue=this.$props.value:void 0!==this.$props.defaultValue?this.currentValue=this.$props.defaultValue:this.currentValue=null},d.prototype.mounted=function(){this.input=this.$refs.input,this.elementWrapper=this.$refs.elementWrapper,this.hasMounted=!0,this.input&&(this.textBeforeInput=this.input.value),this.setValidity()},Object.defineProperty(d.prototype,"computedValue",{get:function(){return void 0!==this.valueDuringOnChange?this.valueDuringOnChange:this.currentValue},enumerable:!0,configurable:!0}),d.prototype.validity=function(){var t=void 0!==this.$props.validationMessage,e=!this.$props.required||null!==this.computedValue;return{customError:t,valid:void 0!==this.$props.valid?this.$props.valid:e,valueMissing:null===this.computedValue}},d.prototype.focus=function(){this.input&&this.input.focus()},d.prototype.updated=function(){if((!document||document.activeElement===this.input)&&this.input&&null!==this.looselyFormattedText)if(this.input.value!==this.looselyFormattedText)this.input.selectionStart=this.selectionStart,this.input.selectionEnd=this.selectionEnd;else{var t=void 0,e=this.looselyFormattedText.indexOf(this.symbols.decimal);t=0<=e&&e<this.selectionStart?this.selectionEnd:this.selectionEnd-(this.looselyFormattedText.length-this.input.value.length);var i=this.input.value.indexOf(this.symbols.decimal);(this.decimalSelect||null===this.currentValue&&0<=i||-1===e&&0<=i)&&(t=this.selectionStart<i+2&&0<=e?i+1:i),this.decimalSelect||(t=this.selectionEnd-(this.looselyFormattedText.length-this.input.value.length)),this.looselyFormattedText[0]===this.symbols.decimal&&(t=void 0!==this.currentValue?this.formatNumber(this.currentValue).length:0),this.input.selectionStart=this.input.selectionEnd=t}this.input&&(this.textBeforeInput=this.input.value),this.setValidity()},Object.defineProperty(d.prototype,"valueAsLocalString",{get:function(){return this.intl=u.provideIntlService(this),this.symbols=this.intl.numberSymbols(),null!==this.looselyFormattedText&&!this.decimalSelect&&this.parseNumber(this.looselyFormattedText)===this.currentValue&&this.formatNumber(this.currentValue).length<this.looselyFormattedText.length&&0===this.looselyFormattedText.indexOf(this.formatNumber(this.currentValue))?this.looselyFormattedText:this.formatNumber(this.currentValue)},enumerable:!0,configurable:!0}),d.prototype.handleFocus=function(t){this.focused=!0},d.prototype.handleBlur=function(t){this.focused=!1},Object.defineProperty(d.prototype,"spanClassNames",{get:function(){var t=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-textbox-container":!0,"k-state-focused":this.focused,"k-state-empty":!(this.computedValue||this.$props.placeholder||this.isEmpty),"k-state-invalid":!t&&void 0!==t,"k-rtl":"rtl"===this.$props.dir}},enumerable:!0,configurable:!0}),Object.defineProperty(d.prototype,"wrapperClassNames",{get:function(){var t=!this.$props.validityStyles||this.validity().valid;return{"k-numeric-wrap":!0,"k-state-disabled":this.$props.disabled,"k-state-invalid":!t||this.isInvalid}},enumerable:!0,configurable:!0}),d.prototype.render=function(t){var e=this.$props.id||this._inputId,i=u.provideLocalizationService(this);void 0!==this.$props.value&&this.$props.value!==this.currentValue&&(this.currentValue=this.$props.value);var n=t("span",{attrs:{dir:this.$props.dir,"aria-disabled":this.$props.disabled?"true":void 0},class:"k-widget k-numerictextbox"},[t("span",{class:this.wrapperClassNames,ref:"elementWrapper"},[t("input",{attrs:{tabIndex:this.$props.tabIndex,accessKey:this.$props.accessKey,disabled:this.$props.disabled,title:this.$props.title,"aria-valuemin":this.$props.min,"aria-valuemax":this.$props.max,placeholder:this.$props.placeholder,type:this.$props.inputType||"tel",spellCheck:!1,autoComplete:"off",autoCorrect:"off",id:e,"aria-valuenow":null!==this.currentValue?this.currentValue:void 0,name:this.$props.name},class:"k-input k-formatted-value",domProps:{value:this.valueAsLocalString},on:{wheel:this.wheel,keydown:this.keyDown,input:this.elementChange},ref:"input"}),this.$slots.default,this.$props.spinners&&t("span",{class:"k-select",on:{mousedown:this.spinnersWrapperMouseDown}},[t("span",{class:"k-link k-link-increase",attrs:{"aria-label":i.toLanguageString(h.numericIncreaseValue,h.messages[h.numericIncreaseValue]),title:i.toLanguageString(h.numericIncreaseValue,h.messages[h.numericIncreaseValue])},on:{click:this.increase}},[t("span",{class:"k-icon k-i-arrow-n"})]),t("span",{class:"k-link k-link-decrease",attrs:{"aria-label":i.toLanguageString(h.numericDecreaseValue,h.messages[h.numericDecreaseValue]),title:i.toLanguageString(h.numericDecreaseValue,h.messages[h.numericDecreaseValue])},on:{click:this.decrease}},[t("span",{class:"k-icon k-i-arrow-s"})])])])]);return this.$props.label?t("span",{class:this.spanClassNames,on:{focusin:this.handleFocus,focusout:this.handleBlur},attrs:{dir:this.$props.dir}},[n,this.$props.label?this.$props.id?t("label",{attrs:{for:this.$props.id},class:"k-label"},[this.$props.label]):t("span",{class:"k-label"},[this.$props.label]):null]):n},d.prototype.setValidity=function(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"Please enter a valid value!")},d.prototype.formatNumber=function(t){return null==t?"":this.intl.formatNumber(t,this.$props.format).toString()},d.prototype.parseNumber=function(t){return this.intl.parseNumber(t,this.$props.format)},d.prototype.elementChange=function(t){var e=this;if(this.input){var i=this.input,n={value:this.currentValue,looselyFormattedText:i.value,selectionStart:this.input.selectionStart,selectionEnd:this.input.selectionEnd,decimalSelect:!1},r=i.value,s=this.symbols.minusSign;if(r===s)return n.value=null,void this.triggerChange(n,t);if(r.split(s).length!==this.textBeforeInput.split(s).length&&r.length===this.textBeforeInput.length+s.length)return n.value=-this.parseNumber(this.textBeforeInput),void this.triggerChange(n,t);var o=this.symbols.decimal;if(2<r.split(RegExp("\\"+o)).length)return n.decimalSelect=!0,void this.triggerChange(n,t);if(1<r.length&&-1===r.indexOf(o)&&0<=this.textBeforeInput.indexOf(o)&&r.length+o.length===this.textBeforeInput.length)return n.decimalSelect=!0,void this.triggerChange(n,t);var a=this.parseNumber(r);if(a===this.currentValue&&0<r.length&&r[r.length-1]===o&&-1<(this.formatNumber(1.1)||"").toString().indexOf(o))return n.looselyFormattedText=r,void this.triggerChange(n,t);var l=(null===a||isNaN(a))&&0<r.length&&r!==this.symbols.minusSign,u=this.elementWrapper;if(r.length>this.textBeforeInput.length&&this.parseNumber(r)===this.parseNumber(r.slice(0,i.selectionStart))&&(null===this.parseNumber(r.slice(i.selectionStart-1))||isNaN(this.parseNumber(r.slice(i.selectionStart-1))))&&(l=!0),l)return u&&-1===u.className.indexOf("k-state-invalid")&&(this.isInvalid=!0,setTimeout(function(){e.isInvalid=!1},50)),n.looselyFormattedText=this.textBeforeInput,n.selectionStart=n.selectionEnd=i.selectionEnd+this.textBeforeInput.length-i.value.length,void this.triggerChange(n,t);n.value=a,this.triggerChange(n,t)}},d.prototype.nonInputActions=function(t,e){var i={value:t,looselyFormattedText:null,selectionStart:0,selectionEnd:0,decimalSelect:!1};this.triggerChange(i,e)},d.prototype.triggerChange=function(t,e){if(!this.$props.disabled){this.valueDuringOnChange=this.ranged(this.parseNumber(this.formatNumber(this.ranged(t.value))));var i=this.valueDuringOnChange!==this.currentValue;void 0!==this.$props.value?this.currentValue=this.$props.value:this.currentValue=this.valueDuringOnChange,this.looselyFormattedText=t.looselyFormattedText,this.selectionStart=t.selectionStart,this.selectionEnd=t.selectionEnd,this.decimalSelect=t.decimalSelect,i&&(this.$emit("change",{event:e,value:this.valueDuringOnChange,component:this,target:{name:this.$props.name,value:this.valueDuringOnChange},validity:this.validity()}),this.$emit("changemodel",this.valueDuringOnChange)),this.valueDuringOnChange=void 0}},d.prototype.ranged=function(t){return null==t?t:1<t||t<1||1===t?void 0!==this.$props.max&&void 0!==this.$props.min&&this.$props.max<this.$props.min?null:(void 0!==this.$props.max&&t>this.$props.max&&(t=this.$props.max),void 0!==this.$props.min&&t<this.$props.min&&(t=this.$props.min),t):null},d.prototype.increase=function(t){this.nonInputActions((this.currentValue||0)+(this.$props.step||0),t)},d.prototype.decrease=function(t){this.nonInputActions((this.currentValue||0)-(this.$props.step||0),t)},d.prototype.wheel=function(t){document&&document.activeElement===this.input&&this.input&&(t.deltaY<0&&(t.preventDefault(),this.increase(t)),0<t.deltaY&&(t.preventDefault(),this.decrease(t)))},d.prototype.keyDown=function(t){switch(t.keyCode){case 38:this.increase(t);break;case 40:this.decrease(t);break;case 110:var e=this.input;if(e){var i=e.value,n=e.selectionStart,r=e.selectionEnd;e.value=i.slice(0,n)+this.symbols.decimal+i.slice(r),e.selectionStart=e.selectionEnd=n+1,this.elementChange(t)}break;default:return}t.preventDefault()},d.prototype.spinnersWrapperMouseDown=function(t){document&&this.input&&(t.preventDefault(),document.activeElement!==this.input&&this.input.focus())},function(t,e,i,n){var r,s=arguments.length,o=s<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"===("undefined"==typeof Reflect?"undefined":l(Reflect))&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var a=t.length-1;0<=a;a--)(r=t[a])&&(o=(s<3?r(o):3<s?r(e,i,o):r(e,i))||o);return 3<s&&o&&Object.defineProperty(e,i,o),o}([a.default({model:{event:"changemodel"},inheritAttrs:!1,props:{value:Number,defaultValue:Number,step:{type:Number,default:1},format:[String,Object],tabIndex:Number,accessKey:String,title:String,placeholder:String,min:Number,max:Number,spinners:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},dir:String,name:String,label:String,validationMessage:String,validityStyles:{type:Boolean,default:!0},valid:{type:Boolean,default:void 0},required:{type:Boolean,default:!1},id:String},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}}})],d));function d(){var t=null!==s&&s.apply(this,arguments)||this;return t.hasMounted=!1,t.isInvalid=!1,t.isEmpty=!1,t.currentValue=0,t.valueDuringOnChange=0,t.looselyFormattedText="",t.selectionStart=0,t.selectionEnd=0,t.decimalSelect=!1,t.focused=!1,t.textBeforeInput="",t._inputId=p.guid(),t}e.NumericTextBox=c},function(t,e){t.exports=l},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.numericIncreaseValue="numerictextbox.increment",e.numericDecreaseValue="numerictextbox.decrement",e.sliderIncreaseValue="slider.increment",e.sliderDecreaseValue="slider.decrement",e.sliderDragTitle="slider.dragTitle",e.colorGradientR="colorGradient.r",e.colorGradientG="colorGradient.g",e.colorGradientB="colorGradient.b",e.colorGradientA="colorGradient.a",e.colorGradientHex="colorGradient.hex",e.messages=((n={})[e.numericIncreaseValue]="Increase value",n[e.numericDecreaseValue]="Decrease value",n[e.sliderIncreaseValue]="Increase",n[e.sliderDecreaseValue]="Decrease",n[e.sliderDragTitle]="Drag",n[e.colorGradientR]="r",n[e.colorGradientG]="g",n[e.colorGradientB]="b",n[e.colorGradientA]="a",n[e.colorGradientHex]="hex",n)}],r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=2)}}}); |
{ | ||
"name": "@progress/kendo-vue-inputs", | ||
"description": "KendoVue Input package", | ||
"version": "0.4.3-dev.202001211013", | ||
"version": "0.4.3", | ||
"repository": { | ||
@@ -41,6 +41,6 @@ "type": "git", | ||
"dependencies": { | ||
"@progress/kendo-vue-common": "0.4.3-dev.202001211013" | ||
"@progress/kendo-vue-common": "0.4.3" | ||
}, | ||
"devDependencies": { | ||
"@progress/kendo-vue-intl": "0.4.3-dev.202001211013", | ||
"@progress/kendo-vue-intl": "0.4.3", | ||
"cldr-core": "^34.0.0", | ||
@@ -47,0 +47,0 @@ "cldr-dates-full": "^34.0.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
199847
+ Added@progress/kendo-vue-common@0.4.3(transitive)
- Removed@progress/kendo-vue-common@0.4.3-dev.202001211013(transitive)