@progress/kendo-vue-inputs 7.1.0-develop.6 → 7.1.0-develop.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/input/Input.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("@progress/kendo-vue-common"),c=require("../package-metadata.js"),f=require("@progress/kendo-vue-labels");function m(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!a.isVNode(t)}const y=a.defineComponent({model:{event:"changemodel"},emits:{input:t=>!0,change:t=>!0,changemodel:t=>!0,"update:modelValue":t=>!0,focus:t=>!0,blur:t=>!0,keyup:t=>!0,keydown:t=>!0,keypress:t=>!0},props:{modelValue:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:void 0},defaultValue:{type:[String,Number],default:""},value:{type:[String,Number]},label:{type:String},placeholder:{type:String},required:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large"].includes(t)}},rounded:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large","full"].includes(t)}},fillMode:{type:String,default:"solid",validator:function(t){return[null,"solid","flat","outline"].includes(t)}},dir:{type:String},id:String,valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String},validityStyles:{type:Boolean,default:!0},inputClass:String,tabIndex:Number,ariaLabel:String,ariaLabelledBy:String,ariaDescribedBy:String},data:function(){return{hasMounted:!1,autofill:!1,currentValue:"",valueDuringOnChange:"",focused:!1}},created(){n.validatePackage(c.packageMetadata),this._input=void 0,this._inputId=n.guid(),this.$data.valueDuringOnChange=void 0,this.$data.currentValue=this.$props.defaultValue},mounted(){this._input=this.inputRef,this.$data.hasMounted=!0,this.setValidity()},updated(){this.setValidity(),this.updateValidClass()},setup(){return{inputRef:a.ref(null)}},render(){const t=!this.$props.validityStyles||this.validity().valid,{label:e,id:i,required:l,tabIndex:u,ariaLabel:r,ariaLabelledBy:o,ariaDescribedBy:p}=this.$props,d=i||this._inputId,s=a.h("input",{...this.$attrs,placeholder:this.$props.placeholder,id:d,tabindex:u,required:l,ariaLabel:r,ariaLabelledby:o,ariaDescribedby:p,ariaDisabled:this.$props.disabled,disabled:this.$props.disabled,value:this.computedValue,class:this.inputInnerClass,ref:h=>{this.inputRef=h},onKeydown:this.handleKeydown,onKeyup:this.handleKeyup,onKeypress:this.handleKeypress,onChange:this.handleChange,onFocus:this.emitFocus,onBlur:this.emitBlur,onInput:this.handleInput,onAnimationstart:this.handleAutoFill,onAnimationend:this.handleAutoFillEnd});return e?a.createVNode(f.FloatingLabel,{label:e,editorId:d,editorValue:this.computedValue,editorValid:t,editorDisabled:this.$props.disabled,editorPlaceholder:this.$data.focused?this.$props.placeholder:"",dir:this.$props.dir},m(s)?s:{default:()=>[s]}):s},methods:{updateValidClass(){this._input.classList.toggle("k-invalid",!this.validity().valid)},emitFocus(t){this.$emit("focus",{event:t}),this.$data.focused=!0},emitBlur(t){this.$emit("blur",{event:t}),this.$data.focused=!1},handleKeydown(t){this.$emit("keydown",t)},handleKeyup(t){this.$emit("keyup",t)},handleKeypress(t){this.$emit("keypress",t)},clearClick(t){this.emitUpdate(t,"change","")},focus(){this._input&&this._input.focus()},validity(){const t={badInput:this._input?this._input.validity.badInput:!1,patternMismatch:this._input?this._input.validity.patternMismatch:!1,rangeOverflow:this._input?this._input.validity.rangeOverflow:!1,rangeUnderflow:this._input?this._input.validity.rangeUnderflow:!1,stepMismatch:this._input?this._input.validity.stepMismatch:!1,tooLong:this._input?this._input.validity.tooLong:!1,tooShort:this._input?this._input.validity.tooShort:!1,typeMismatch:this._input?this._input.validity.typeMismatch:!1,valueMissing:this._input?this._input.validity.valueMissing:!1};return{...t,customError:this.$props.validationMessage!==void 0,valid:this.$props.valid!==void 0?this.$props.valid:this._input?!this.isInvalid(t):!0}},isInvalid(t){let e=!1;for(let i in t)t.hasOwnProperty(i)&&(e=e||t[i]);return e},setValidity(){this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")},handleInput(t){this.emitUpdate(t,"input",t.target.value)},handleChange(t){this.emitUpdate(t,"change",t.target.value)},emitUpdate(t,e,i){this.disabled||(this.$data.currentValue=i,this.$data.valueDuringOnChange=i,this.$nextTick(()=>{this.$emit("changemodel",i),this.$emit("update:modelValue",i),this.$emit(e,{event:t,value:i,component:this,target:t.target,validity:this.validity()}),this.$data.valueDuringOnChange=void 0}))},handleAutoFill(t){if(t.animationName==="autoFillStart"){let e=t.target.parentNode;e&&e.classList.contains("k-empty")&&(this.$data.autofill=!0,e.classList.remove("k-empty"))}},handleAutoFillEnd(t){t.animationName==="autoFillEnd"&&t.target.parentNode&&(this.$data.autofill=!1)},name:function(){return this.$props.name}},computed:{spanClassNames(){const t=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.$data.focused,"k-empty":!(this.computedValue===0||this.computedValue||this.$props.placeholder||this.$data.autofill),"k-autofill":this.$data.autofill,"k-invalid":!t&&t!==void 0,"k-rtl":this.$props.dir==="rtl"}},inputInnerClass(){const{size:t,fillMode:e,rounded:i}=this.$props,l=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-input":!0,[`k-input-${n.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${n.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-invalid":!l,"k-required":this.required,"k-disabled":this.$props.disabled,[this.inputClass]:this.inputClass}},computedValue(){return this.$data.valueDuringOnChange!==void 0?this.$data.valueDuringOnChange:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.$data.currentValue}}});exports.Input=y;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),n=require("@progress/kendo-vue-common"),c=require("../package-metadata.js"),f=require("@progress/kendo-vue-labels");function y(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!a.isVNode(t)}const m=a.defineComponent({model:{event:"changemodel"},emits:{input:t=>!0,change:t=>!0,changemodel:t=>!0,"update:modelValue":t=>!0,focus:t=>!0,blur:t=>!0,keyup:t=>!0,keydown:t=>!0,keypress:t=>!0},props:{modelValue:{type:[String,Number],default:void 0},disabled:{type:Boolean,default:void 0},defaultValue:{type:[String,Number],default:""},value:{type:[String,Number]},label:{type:String},placeholder:{type:String},required:{type:Boolean,default:!1},size:{type:String,validator:function(t){return["small","medium","large"].includes(t)}},rounded:{type:String,validator:function(t){return["none","small","medium","large","full"].includes(t)}},fillMode:{type:String,validator:function(t){return["solid","flat","outline"].includes(t)}},dir:{type:String},id:String,valid:{type:Boolean,default:void 0},validate:{type:Boolean},validationMessage:{type:String},validityStyles:{type:Boolean,default:!0},inputClass:String,tabIndex:Number,ariaLabel:String,ariaLabelledBy:String,ariaDescribedBy:String},data:function(){return{hasMounted:!1,autofill:!1,currentValue:"",valueDuringOnChange:"",focused:!1}},created(){n.validatePackage(c.packageMetadata),this._input=void 0,this._inputId=n.guid(),this.$data.valueDuringOnChange=void 0,this.$data.currentValue=this.$props.defaultValue},mounted(){this._input=this.inputRef,this.$data.hasMounted=!0,this.setValidity()},updated(){this.setValidity(),this.updateValidClass()},setup(){return{inputRef:a.ref(null)}},render(){const t=!this.$props.validityStyles||this.validity().valid,{label:e,id:i,required:l,tabIndex:u,ariaLabel:r,ariaLabelledBy:o,ariaDescribedBy:p}=this.$props,d=i||this._inputId,s=a.h("input",{...this.$attrs,placeholder:this.$props.placeholder,id:d,tabindex:u,required:l,ariaLabel:r,ariaLabelledby:o,ariaDescribedby:p,ariaDisabled:this.$props.disabled,disabled:this.$props.disabled,value:this.computedValue,class:this.inputInnerClass,ref:h=>{this.inputRef=h},onKeydown:this.handleKeydown,onKeyup:this.handleKeyup,onKeypress:this.handleKeypress,onChange:this.handleChange,onFocus:this.emitFocus,onBlur:this.emitBlur,onInput:this.handleInput,onAnimationstart:this.handleAutoFill,onAnimationend:this.handleAutoFillEnd});return e?a.createVNode(f.FloatingLabel,{label:e,editorId:d,editorValue:this.computedValue,editorValid:t,editorDisabled:this.$props.disabled,editorPlaceholder:this.$data.focused?this.$props.placeholder:"",dir:this.$props.dir},y(s)?s:{default:()=>[s]}):s},methods:{updateValidClass(){this._input.classList.toggle("k-invalid",!this.validity().valid)},emitFocus(t){this.$emit("focus",{event:t}),this.$data.focused=!0},emitBlur(t){this.$emit("blur",{event:t}),this.$data.focused=!1},handleKeydown(t){this.$emit("keydown",t)},handleKeyup(t){this.$emit("keyup",t)},handleKeypress(t){this.$emit("keypress",t)},clearClick(t){this.emitUpdate(t,"change","")},focus(){this._input&&this._input.focus()},validity(){const t={badInput:this._input?this._input.validity.badInput:!1,patternMismatch:this._input?this._input.validity.patternMismatch:!1,rangeOverflow:this._input?this._input.validity.rangeOverflow:!1,rangeUnderflow:this._input?this._input.validity.rangeUnderflow:!1,stepMismatch:this._input?this._input.validity.stepMismatch:!1,tooLong:this._input?this._input.validity.tooLong:!1,tooShort:this._input?this._input.validity.tooShort:!1,typeMismatch:this._input?this._input.validity.typeMismatch:!1,valueMissing:this._input?this._input.validity.valueMissing:!1};return{...t,customError:this.$props.validationMessage!==void 0,valid:this.$props.valid!==void 0?this.$props.valid:this._input?!this.isInvalid(t):!0}},isInvalid(t){let e=!1;for(let i in t)t.hasOwnProperty(i)&&(e=e||t[i]);return e},setValidity(){this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")},handleInput(t){this.emitUpdate(t,"input",t.target.value)},handleChange(t){this.emitUpdate(t,"change",t.target.value)},emitUpdate(t,e,i){this.disabled||(this.$data.currentValue=i,this.$data.valueDuringOnChange=i,this.$nextTick(()=>{this.$emit("changemodel",i),this.$emit("update:modelValue",i),this.$emit(e,{event:t,value:i,component:this,target:t.target,validity:this.validity()}),this.$data.valueDuringOnChange=void 0}))},handleAutoFill(t){if(t.animationName==="autoFillStart"){let e=t.target.parentNode;e&&e.classList.contains("k-empty")&&(this.$data.autofill=!0,e.classList.remove("k-empty"))}},handleAutoFillEnd(t){t.animationName==="autoFillEnd"&&t.target.parentNode&&(this.$data.autofill=!1)},name:function(){return this.$props.name}},computed:{spanClassNames(){const t=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.$data.focused,"k-empty":!(this.computedValue===0||this.computedValue||this.$props.placeholder||this.$data.autofill),"k-autofill":this.$data.autofill,"k-invalid":!t&&t!==void 0,"k-rtl":this.$props.dir==="rtl"}},inputInnerClass(){const{size:t,fillMode:e,rounded:i}=this.$props,l=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-input":!0,[`k-input-${n.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${n.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-invalid":!l,"k-required":this.required,"k-disabled":this.$props.disabled,[this.inputClass]:this.inputClass}},computedValue(){return this.$data.valueDuringOnChange!==void 0?this.$data.valueDuringOnChange:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.$data.currentValue}}});exports.Input=m;
package/input/Input.mjs CHANGED
@@ -55,23 +55,20 @@ const M = /* @__PURE__ */ h({
55
55
  },
56
56
  size: {
57
57
  type: String,
58
- default: "medium",
59
58
  validator: function(t) {
60
- return [null, "small", "medium", "large"].includes(t);
59
+ return ["small", "medium", "large"].includes(t);
61
60
  }
62
61
  },
63
62
  rounded: {
64
63
  type: String,
65
- default: "medium",
66
64
  validator: function(t) {
67
- return [null, "small", "medium", "large", "full"].includes(t);
65
+ return ["none", "small", "medium", "large", "full"].includes(t);
68
66
  }
69
67
  },
70
68
  fillMode: {
71
69
  type: String,
72
- default: "solid",
73
70
  validator: function(t) {
74
- return [null, "solid", "flat", "outline"].includes(t);
71
+ return ["solid", "flat", "outline"].includes(t);
75
72
  }
76
73
  },
77
74
  dir: {
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),v=require("./masking.service.js"),p=require("./utils.js"),s=require("@progress/kendo-vue-common"),$=require("../package-metadata.js"),c=require("@progress/kendo-svg-icons"),V=n.defineComponent({model:{event:"changemodel"},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,"update:modelValue":e=>!0,"update:modelRawValue":e=>!0,changemodel:e=>!0},props:{type:{type:String,default:"text"},modelValue:String,modelRawValue:String,value:String,defaultValue:String,placeholder:String,title:String,dir:String,id:String,ariaLabelledBy:String,ariaDescribedBy:String,tabIndex:Number,accessKey:String,disabled:Boolean,readonly:Boolean,size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},rounded:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}},prompt:{type:String,default:"_"},promptPlaceholder:{type:String,default:" "},includeLiterals:{type:Boolean,default:!1},maskValidation:{type:Boolean,default:!0},mask:String,rules:{type:Object,default:function(){return p.defaultRules}},selection:Object,name:String,label:String,validationMessage:String,required:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:s.templateDefinition,inputSuffix:s.templateDefinition,showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,inputAttributes:Object},data(){return{currentValue:void 0,currentFocused:!1,inputValue:void 0,currentSelection:[null,null]}},created(){s.validatePackage($.packageMetadata),this.hasMounted=!1,this.valueDuringOnChange=void 0,this.inputId=`k-${s.guid()}`,this.service=new v.MaskingService,this.isPasted=!1},setup(){return{inputRef:n.ref(null)}},mounted(){this.hasMounted=!0,this.element=this.input=this.inputRef,this.updateService(),this.setValidity()},watch:{currentFocused:function(e,t){this.prevCurrentFocused=t},selection:function(e,t){this.prevSelection=t},includeLiterals:function(e,t){this.prevIncludeLiterals=t},mask:function(e,t){this.prevMask=t},prompt:function(e,t){this.prevPrompt=t},promptPlaceholder:function(e,t){this.prevPromptPlaceholder=t},rules:function(e,t){this.prevRules=t}},updated(){if(this.element&&this.currentFocused){let[t,i]=this.currentSelection;const a=this.prevSelection,l=this.$props.selection;(!a&&l||a&&l&&(a.start!==l.start||a.end!==l.end))&&(t=l.start,i=l.end),t!==null&&i!==null&&this.element.setSelectionRange(t,i)}const e={includeLiterals:this.prevIncludeLiterals,mask:this.prevMask,prompt:this.prevPrompt,promptPlaceholder:this.prevPromptPlaceholder,rules:this.prevRules};p.maskingChanged(e,this.$props)&&this.updateService(),this.setValidity()},computed:{computedRules(){return Object.assign({},p.defaultRules,this.$props.rules)},spanClassNames(){const e=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.currentFocused,"k-empty":!this.computedValue(),"k-invalid":!e&&e!==void 0,"k-rtl":this.$props.dir==="rtl","k-loading":this.showLoadingIcon,[this.wrapperClass]:this.wrapperClass}},wrapperSpanClass(){const{size:e,fillMode:t,rounded:i}=this.$props,a=!this.$props.validityStyles||this.validity().valid;return{"k-maskedtextbox":!0,"k-input":!0,[`k-input-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${t}`]:t,[`k-rounded-${s.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-invalid":!a,"k-required":this.required,"k-disabled":this.$props.disabled,"k-loading":this.showLoadingIcon,[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,[this.inputClass]:this.inputClass}}},methods:{focus(){this.input&&this.input.focus()},computedValue(){let e;return this.valueDuringOnChange!==void 0?e=this.valueDuringOnChange:this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:this.currentValue!==void 0?e=this.currentValue:this.$props.defaultValue!==void 0&&(e=this.$props.defaultValue),e||""},rawValue(){return this.service.rawValue(this.computedValue())},validity(){const e=this.computedValue(),t=this.service.validationValue(e),i=this.$props.validationMessage!==void 0,a=this.$props.valid!==void 0?this.$props.valid:(!this.$props.required||!!t)&&(!this.$props.maskValidation||!this.$props.prompt||e.indexOf(this.$props.prompt)===-1);return{customError:i,valid:a,valueMissing:!t}},pasteHandler(e){const{selectionStart:t,selectionEnd:i}=e.target;i!==t&&(this.isPasted=!0,this.currentSelection=[t||0,i||0])},clearClick(e){this.triggerOnChange("",e)},onChangeHandler(e){const t=e.currentTarget,i=this.inputValue=t.value,a=this.currentSelection[0]||0,l=this.currentSelection[1]||0;if(!this.$props.mask){this.isPasted=!1,this.currentSelection=[null,null],this.triggerOnChange(i,e);return}const u=this.computedValue();let r;if(this.isPasted){this.isPasted=!1;const o=u.length-l,d=i.length-o;r=this.service.maskInRange(i.slice(a,d),u,a,l)}else r=this.service.maskInput(i,u,t.selectionStart||0);this.currentSelection=[r.selection,r.selection],this.triggerOnChange(r.value,e),this.inputValue=void 0},focusHandler(e){this.currentFocused||(this.currentFocused=!0,this.$emit("focus",{event:e,target:this}))},blurHandler(e){this.currentFocused&&(this.currentFocused=!1,this.$emit("blur",{event:e,target:this}))},triggerOnChange(e,t){this.currentValue=e,this.valueDuringOnChange=e,this.$emit("change",{event:t,selectionStart:this.currentSelection[0],selectionEnd:this.currentSelection[1],value:this.computedValue(),component:this,target:{name:this.$props.name,value:this.computedValue(),rawValue:this.rawValue()},validity:this.validity()}),this.$emit("update:modelValue",this.computedValue()),this.$emit("update:modelRawValue",this.rawValue()),this.$emit("changemodel",this.computedValue()),this.valueDuringOnChange=void 0},updateService(e){const t=Object.assign({includeLiterals:this.$props.includeLiterals,mask:this.$props.mask,prompt:this.$props.prompt,promptPlaceholder:this.$props.promptPlaceholder,rules:this.$props.rules},e);this.service.update(t)},setValidity(){this.element&&this.element.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")}},render(){const e=this.$props.id||this.inputId,{iconName:t,showValidationIcon:i,showLoadingIcon:a,showClearButton:l,inputAttributes:u}=this.$props,r=!this.$props.validityStyles||this.validity().valid,o=this.computedValue();this.inputValue;const d=s.templateRendering.call(this,this.$props.inputPrefix,s.getListeners.call(this)),f=s.templateRendering.call(this,this.$props.inputSuffix,s.getListeners.call(this)),m=s.getTemplate.call(this,{h:n.h,template:d,additionalProps:{value:o,valid:r}}),g=s.getTemplate.call(this,{h:n.h,template:f,additionalProps:{value:o,valid:r}}),h=n.createVNode("span",{dir:this.$props.dir,class:this.wrapperSpanClass,style:this.$props.label?void 0:{width:this.$props.width}},[t&&n.createVNode(s.Icon,{name:t,class:"k-input-icon"},null),this.$props.inputPrefix&&n.createVNode("span",{class:"k-input-prefix"},[m]),n.createVNode("input",n.mergeProps({type:this.$props.type,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:!1,class:this.inputInnerClass,value:o,id:e,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-disabled":this.$props.disabled,name:this.$props.name,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,!0),accesskey:this.$props.accessKey,title:this.$props.title,disabled:this.$props.disabled||void 0,readonly:this.$props.readonly||void 0,placeholder:this.$props.placeholder,"aria-placeholder":this.$props.placeholder,required:this.$props.required,ref:s.setRef(this,"input")},u,{onInput:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragstart:p.returnFalse,onDrop:p.returnFalse}),null),this.$props.inputSuffix&&n.createVNode("span",{class:"k-input-suffix"},[g]),i&&r&&n.createVNode(s.Icon,{name:"check",icon:c.checkIcon,class:"k-input-validation-icon"},null),i&&!r&&n.createVNode(s.Icon,{name:"exclamation-circle",icon:c.exclamationCircleIcon,class:"k-input-validation-icon"},null),a&&n.createVNode(s.Icon,{name:"loading",class:"k-input-loading-icon"},null),l&&o&&n.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[n.createVNode(s.Icon,{name:"x",icon:c.xIcon},null)])]);return this.$props.label?n.createVNode("span",{class:this.spanClassNames,dir:this.$props.dir},[h,this.$props.label?e?n.createVNode("label",{for:e,class:"k-floating-label"},[this.$props.label]):n.createVNode("span",{class:"k-label"},[this.$props.label]):null]):h}});exports.MaskedTextBox=V;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),v=require("./masking.service.js"),p=require("./utils.js"),s=require("@progress/kendo-vue-common"),$=require("../package-metadata.js"),c=require("@progress/kendo-svg-icons"),V=n.defineComponent({model:{event:"changemodel"},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,"update:modelValue":e=>!0,"update:modelRawValue":e=>!0,changemodel:e=>!0},props:{type:{type:String,default:"text"},modelValue:String,modelRawValue:String,value:String,defaultValue:String,placeholder:String,title:String,dir:String,id:String,ariaLabelledBy:String,ariaDescribedBy:String,tabIndex:Number,accessKey:String,disabled:Boolean,readonly:Boolean,size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},rounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}},prompt:{type:String,default:"_"},promptPlaceholder:{type:String,default:" "},includeLiterals:{type:Boolean,default:!1},maskValidation:{type:Boolean,default:!0},mask:String,rules:{type:Object,default:function(){return p.defaultRules}},selection:Object,name:String,label:String,validationMessage:String,required:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:s.templateDefinition,inputSuffix:s.templateDefinition,showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,inputAttributes:Object},data(){return{currentValue:void 0,currentFocused:!1,inputValue:void 0,currentSelection:[null,null]}},created(){s.validatePackage($.packageMetadata),this.hasMounted=!1,this.valueDuringOnChange=void 0,this.inputId=`k-${s.guid()}`,this.service=new v.MaskingService,this.isPasted=!1},setup(){return{inputRef:n.ref(null)}},mounted(){this.hasMounted=!0,this.element=this.input=this.inputRef,this.updateService(),this.setValidity()},watch:{currentFocused:function(e,t){this.prevCurrentFocused=t},selection:function(e,t){this.prevSelection=t},includeLiterals:function(e,t){this.prevIncludeLiterals=t},mask:function(e,t){this.prevMask=t},prompt:function(e,t){this.prevPrompt=t},promptPlaceholder:function(e,t){this.prevPromptPlaceholder=t},rules:function(e,t){this.prevRules=t}},updated(){if(this.element&&this.currentFocused){let[t,i]=this.currentSelection;const a=this.prevSelection,r=this.$props.selection;(!a&&r||a&&r&&(a.start!==r.start||a.end!==r.end))&&(t=r.start,i=r.end),t!==null&&i!==null&&this.element.setSelectionRange(t,i)}const e={includeLiterals:this.prevIncludeLiterals,mask:this.prevMask,prompt:this.prevPrompt,promptPlaceholder:this.prevPromptPlaceholder,rules:this.prevRules};p.maskingChanged(e,this.$props)&&this.updateService(),this.setValidity()},computed:{computedRules(){return Object.assign({},p.defaultRules,this.$props.rules)},spanClassNames(){const e=!this.hasMounted||!this.$props.validityStyles||this.validity().valid;return{"k-floating-label-container":!0,"k-focus":this.currentFocused,"k-empty":!this.computedValue(),"k-invalid":!e&&e!==void 0,"k-rtl":this.$props.dir==="rtl","k-loading":this.showLoadingIcon,[this.wrapperClass]:this.wrapperClass}},wrapperSpanClass(){const{size:e,fillMode:t,rounded:i}=this.$props,a=!this.$props.validityStyles||this.validity().valid;return{"k-maskedtextbox":!0,"k-input":!0,[`k-input-${s.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${t}`]:t,[`k-rounded-${s.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-invalid":!a,"k-required":this.required,"k-disabled":this.$props.disabled,"k-loading":this.showLoadingIcon,[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,[this.inputClass]:this.inputClass}}},methods:{focus(){this.input&&this.input.focus()},computedValue(){let e;return this.valueDuringOnChange!==void 0?e=this.valueDuringOnChange:this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:this.currentValue!==void 0?e=this.currentValue:this.$props.defaultValue!==void 0&&(e=this.$props.defaultValue),e||""},rawValue(){return this.service.rawValue(this.computedValue())},validity(){const e=this.computedValue(),t=this.service.validationValue(e),i=this.$props.validationMessage!==void 0,a=this.$props.valid!==void 0?this.$props.valid:(!this.$props.required||!!t)&&(!this.$props.maskValidation||!this.$props.prompt||e.indexOf(this.$props.prompt)===-1);return{customError:i,valid:a,valueMissing:!t}},pasteHandler(e){const{selectionStart:t,selectionEnd:i}=e.target;i!==t&&(this.isPasted=!0,this.currentSelection=[t||0,i||0])},clearClick(e){this.triggerOnChange("",e)},onChangeHandler(e){const t=e.currentTarget,i=this.inputValue=t.value,a=this.currentSelection[0]||0,r=this.currentSelection[1]||0;if(!this.$props.mask){this.isPasted=!1,this.currentSelection=[null,null],this.triggerOnChange(i,e);return}const u=this.computedValue();let l;if(this.isPasted){this.isPasted=!1;const o=u.length-r,d=i.length-o;l=this.service.maskInRange(i.slice(a,d),u,a,r)}else l=this.service.maskInput(i,u,t.selectionStart||0);this.currentSelection=[l.selection,l.selection],this.triggerOnChange(l.value,e),this.inputValue=void 0},focusHandler(e){this.currentFocused||(this.currentFocused=!0,this.$emit("focus",{event:e,target:this}))},blurHandler(e){this.currentFocused&&(this.currentFocused=!1,this.$emit("blur",{event:e,target:this}))},triggerOnChange(e,t){this.currentValue=e,this.valueDuringOnChange=e,this.$emit("change",{event:t,selectionStart:this.currentSelection[0],selectionEnd:this.currentSelection[1],value:this.computedValue(),component:this,target:{name:this.$props.name,value:this.computedValue(),rawValue:this.rawValue()},validity:this.validity()}),this.$emit("update:modelValue",this.computedValue()),this.$emit("update:modelRawValue",this.rawValue()),this.$emit("changemodel",this.computedValue()),this.valueDuringOnChange=void 0},updateService(e){const t=Object.assign({includeLiterals:this.$props.includeLiterals,mask:this.$props.mask,prompt:this.$props.prompt,promptPlaceholder:this.$props.promptPlaceholder,rules:this.$props.rules},e);this.service.update(t)},setValidity(){this.element&&this.element.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||"")}},render(){const e=this.$props.id||this.inputId,{iconName:t,showValidationIcon:i,showLoadingIcon:a,showClearButton:r,inputAttributes:u}=this.$props,l=!this.$props.validityStyles||this.validity().valid,o=this.computedValue();this.inputValue;const d=s.templateRendering.call(this,this.$props.inputPrefix,s.getListeners.call(this)),f=s.templateRendering.call(this,this.$props.inputSuffix,s.getListeners.call(this)),m=s.getTemplate.call(this,{h:n.h,template:d,additionalProps:{value:o,valid:l}}),g=s.getTemplate.call(this,{h:n.h,template:f,additionalProps:{value:o,valid:l}}),h=n.createVNode("span",{dir:this.$props.dir,class:this.wrapperSpanClass,style:this.$props.label?void 0:{width:this.$props.width}},[t&&n.createVNode(s.Icon,{name:t,class:"k-input-icon"},null),this.$props.inputPrefix&&n.createVNode("span",{class:"k-input-prefix"},[m]),n.createVNode("input",n.mergeProps({type:this.$props.type,autocomplete:"off",autocorrect:"off",autocapitalize:"off",spellcheck:!1,class:this.inputInnerClass,value:o,id:e,"aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-disabled":this.$props.disabled,name:this.$props.name,tabindex:s.getTabIndex(this.$props.tabIndex,this.$props.disabled,!0),accesskey:this.$props.accessKey,title:this.$props.title,disabled:this.$props.disabled||void 0,readonly:this.$props.readonly||void 0,placeholder:this.$props.placeholder,"aria-placeholder":this.$props.placeholder,required:this.$props.required,ref:s.setRef(this,"input")},u,{onInput:this.onChangeHandler,onPaste:this.pasteHandler,onFocus:this.focusHandler,onBlur:this.blurHandler,onDragstart:p.returnFalse,onDrop:p.returnFalse}),null),this.$props.inputSuffix&&n.createVNode("span",{class:"k-input-suffix"},[g]),i&&l&&n.createVNode(s.Icon,{name:"check",icon:c.checkIcon,class:"k-input-validation-icon"},null),i&&!l&&n.createVNode(s.Icon,{name:"exclamation-circle",icon:c.exclamationCircleIcon,class:"k-input-validation-icon"},null),a&&n.createVNode(s.Icon,{name:"loading",class:"k-input-loading-icon"},null),r&&o&&n.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[n.createVNode(s.Icon,{name:"x",icon:c.xIcon},null)])]);return this.$props.label?n.createVNode("span",{class:this.spanClassNames,dir:this.$props.dir},[h,this.$props.label?e?n.createVNode("label",{for:e,class:"k-floating-label"},[this.$props.label]):n.createVNode("span",{class:"k-label"},[this.$props.label]):null]):h}});exports.MaskedTextBox=V;
@@ -44,23 +44,20 @@ const z = /* @__PURE__ */ b({
44
44
  readonly: Boolean,
45
45
  size: {
46
46
  type: String,
47
- default: "medium",
48
47
  validator: function(e) {
49
- return [null, "small", "medium", "large"].includes(e);
48
+ return ["small", "medium", "large"].includes(e);
50
49
  }
51
50
  },
52
51
  rounded: {
53
52
  type: String,
54
- default: "medium",
55
53
  validator: function(e) {
56
- return [null, "small", "medium", "large", "full"].includes(e);
54
+ return ["none", "small", "medium", "large", "full"].includes(e);
57
55
  }
58
56
  },
59
57
  fillMode: {
60
58
  type: String,
61
- default: "solid",
62
59
  validator: function(e) {
63
- return [null, "solid", "flat", "outline"].includes(e);
60
+ return ["solid", "flat", "outline"].includes(e);
64
61
  }
65
62
  },
66
63
  prompt: {
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),a=require("@progress/kendo-vue-common"),$=require("@progress/kendo-vue-intl"),g=require("@progress/kendo-vue-buttons"),r=require("../messages/main.js"),i=require("./utils/main.js"),S=require("../package-metadata.js"),h=require("@progress/kendo-svg-icons"),k="Please enter a valid value!",y=s.defineComponent({model:{event:"changemodel"},emits:{change:t=>!0,changemodel:t=>!0,"update:modelValue":t=>!0,focus:t=>!0,blur:t=>!0},props:{modelValue:Number,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},size:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large"].includes(t)}},rounded:{type:String,default:"medium",validator:function(t){return[null,"small","medium","large","full"].includes(t)}},fillMode:{type:String,default:"solid",validator:function(t){return[null,"solid","flat","outline"].includes(t)}},required:{type:Boolean,default:!1},id:String,ariaLabel:String,iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,inputType:{type:String,default:"tel"},wrapperClass:String,inputAttributes:Object},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data(){return{hasMounted:!1,isInvalid:!1,isEmpty:!1,currentValue:0,valueDuringOnChange:0,currentLooseValue:"",selectionStart:0,selectionEnd:0,decimalSelect:!1,focused:!1,forceUpdate:!1}},created(){a.validatePackage(S.packageMetadata),this._textBeforeInput="",this._inputId=a.guid(),this.$data.currentLooseValue=null,this.$data.valueDuringOnChange=void 0,this._intl=$.provideIntlService(this),this._symbols=this._intl.numberSymbols(),this.$props.value!==void 0?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0?this.$data.currentValue=this.$props.modelValue:this.$props.defaultValue!==void 0?this.$data.currentValue=this.$props.defaultValue:this.$data.currentValue=null},mounted(){this._input=a.getRef(this,"input"),this._elementWrapper=this.elementWrapperRef,this.$data.hasMounted=!0,this._input&&(this._textBeforeInput=this._input.value),this.setValidity()},updated(){!(a.canUseDOM&&document.activeElement!==this._input||!this._input)&&this.$data.currentLooseValue!==null&&this.$data.forceUpdate&&this._input.type!=="number"&&(this._input.selectionStart=this.$data.selectionStart,this._input.selectionEnd=this.$data.selectionEnd,this.$data.forceUpdate=!1),this._input&&(this._textBeforeInput=this._input.value),this.setValidity()},computed:{computedValue(){return this.$data.valueDuringOnChange!==void 0?this.$data.valueDuringOnChange:this.$data.currentValue},looseValue(){return i.formatValue(this.$data.focused?this.$data.currentLooseValue:i.getStateOrPropsValue(this.$props.value,this.$data.currentValue),this.$props.format,this._intl)},spanClassNames(){const t=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid,e=this.computedValue;return{"k-floating-label-container":!0,"k-focus":this.$data.focused,"k-empty":!(e===0||e||this.$props.placeholder),"k-invalid":!t&&t!==void 0,"k-rtl":this.$props.dir==="rtl",[this.inputClass]:this.inputClass}},wrapperClassNames(){const{size:t,fillMode:e,rounded:n,required:l,disabled:d}=this.$props,u=!this.$props.validityStyles||this.validity().valid;return{"k-input":!0,"k-numerictextbox":!0,[`k-input-${a.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${a.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-invalid":!u,"k-required":l,"k-disabled":d,"k-loading":this.showLoadingIcon,[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,[this.inputClass]:this.inputClass}}},methods:{validity(){const t=this.$props.validationMessage!==void 0,e=!this.$data.valueIsOutOfRange&&(!this.$props.required||this.computedValue!==null),n=this.$props.valid!==void 0?this.$props.valid:e;return{customError:t,valid:n,valueMissing:this.computedValue===null}},clearClick(t){this.$props.value!==void 0?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0?this.$data.currentValue=this.$props.modelValue:this.$data.currentValue=null,this.$emit("changemodel",null),this.$emit("update:modelValue",null),this.$emit("change",{event:t,value:null,component:this,target:{name:this.$props.name,value:null},validity:this.validity()})},focus(){this._input&&this._input.focus()},emitFocus(t){this.$data.currentLooseValue=this._prevLooseValue,this.$data.focused=!0,this.$emit("focus",{event:t})},emitBlur(t){this.$data.eventValue=null,this.$data.prevLooseValue="",this.$data.currentLooseValue="",this.$data.focused=!1,this.$data.selectionStart=void 0,this.$data.selectionEnd=void 0,this.$data.decimalSelect=!1,this.$data.valueIsCorrected=!1,this.$data.valueIsOutOfRange=!1,this.$emit("blur",{event:t})},handleFocus(t){this.$data.focused=!0},handleBlur(t){this.$data.focused=!1},setValidity(){this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||k)},getCurrentState(){return{eventValue:i.getStateOrPropsValue(this.$props.value,this.$data.currentValue),prevLooseValue:this._prevLooseValue,currentLooseValue:this._input.value,selectionStart:this._input.selectionStart,selectionEnd:this._input.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:this._isPaste,focused:this.$data.focused}},parseNumber(t){return this._intl.parseNumber(t,this.$props.format)},elementChange(t){const e=this.getCurrentState();this._isPaste=!1,this.triggerChange(t,i.sanitizeNumber(e,this.$props.format,this._intl))},triggerChange(t,e){if(this.$props.disabled)return;this.$data.valueDuringOnChange=e.eventValue,this.$data.currentValue=e.eventValue;const n=i.formatValue(i.rangeValue(e.eventValue,this.$props.min,this.$props.max),this.$props.format,this._intl),l=i.rangeValue(this.parseNumber(n),this.$props.min,this.$props.max);if(l!==e.eventValue&&(e.valueIsOutOfRange=!0,e.eventValue=l,this.$data.valueDuringOnChange=l,this.$data.currentValue=l),e.valueIsCorrected){const u=this._elementWrapper;u&&u.className.indexOf("k-invalid")===-1&&(this.$data.isInvalid=!0,setTimeout(()=>{this.$data.isInvalid=!1},50))}const d=this.$props.value!==e.eventValue;this.$props.value!==void 0?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0?this.$data.currentValue=this.$props.modelValue:this.$data.currentValue=this.$data.valueDuringOnChange,this.$data.prevLooseValue=e.prevLooseValue,this.$data.currentLooseValue=void 0,this.$data.currentLooseValue=e.currentLooseValue,this.$data.selectionStart=e.selectionStart,this.$data.selectionEnd=e.selectionEnd,this.$data.decimalSelect=e.decimalSelect,this.$data.valueIsCorrected=e.valueIsCorrected,this.$data.valueIsOutOfRange=e.valueIsOutOfRange,this.$data.focused=e.focused,this.$data.isPaste=e.isPaste,this.$data.forceUpdate=!this.$data.forceUpdate,d&&(this.$emit("changemodel",this.$data.valueDuringOnChange),this.$emit("update:modelValue",this.$data.valueDuringOnChange),this.$emit("change",{event:t,value:this.$data.valueDuringOnChange,component:this,target:{name:this.$props.name,value:this.$data.valueDuringOnChange},validity:this.validity()})),this.$data.valueDuringOnChange=void 0},onPasteHandler(t){this._isPaste=!0},increase(t){const e=this.getCurrentState();i.increaseValue(this.parseNumber(String(e.currentLooseValue)),e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl),this.triggerChange(t,e)},decrease(t){const e=this.getCurrentState();i.decreaseValue(this.parseNumber(String(e.currentLooseValue)),e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl),this.triggerChange(t,e)},wheel(t){!a.canUseDOM||document.activeElement!==this._input||!this._input||(t.deltaY<0&&(t.preventDefault(),this.increase(t)),t.deltaY>0&&(t.preventDefault(),this.decrease(t)))},keyDown(t){let e=this.getCurrentState(),n,l,d,u;const c=this.parseNumber(String(e.currentLooseValue));if(e.selectionEnd>e.selectionStart&&e.selectionEnd-e.selectionStart===String(e.currentLooseValue).length){const o=this._intl.numberSymbols(),p=o&&t.key===o.minusSign,m=o&&t.key===o.decimal;this.$data.isPaste=!p&&!m;return}switch(t.keyCode){case 38:i.increaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 40:i.decreaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 13:n=i.formatValue(i.rangeValue(c,this.$props.min,this.$props.max),this.$props.format,this._intl),l=i.rangeValue(this.parseNumber(n),this.$props.min,this.$props.max),e.eventValue=l,e.currentLooseValue=i.formatValue(l,this.$props.format,this._intl),e.selectionStart=e.selectionEnd=e.currentLooseValue.length;break;case 110:d=this._input,u=this._intl.numberSymbols(),d&&(e.currentLooseValue=e.currentLooseValue.slice(0,e.selectionStart)+u.decimal+e.currentLooseValue.slice(e.selectionEnd),e.selectionStart=e.selectionEnd=e.selectionStart+1,e=i.sanitizeNumber(e,this.$props.format,this._intl));break;default:return}t.preventDefault(),this.triggerChange(t,e)},spinnersWrapperMouseDown(t){a.canUseDOM&&this._input&&(t.preventDefault(),document.activeElement!==this._input&&this._input.focus())}},setup(){const t=s.ref(null),e=s.ref(null),n=s.inject("kendoLocalizationService",{}),l=s.inject("kendoIntlService",{});return{inputRef:t,elementWrapperRef:e,kendoLocalizationService:n,kendoIntlService:l}},render(){const{iconName:t,showValidationIcon:e,showLoadingIcon:n,showClearButton:l,inputAttributes:d}=this.$props,u=this.$props.id||this._inputId,c=a.getDefaultSlots(this),o=$.provideLocalizationService(this),p=this.validity().valid;this.$props.value!==void 0&&this.$props.value!==this.$data.currentValue?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0&&this.$props.modelValue!==this.$data.currentValue&&(this.$data.currentValue=this.$props.modelValue),this._prevLooseValue=this.$data.currentLooseValue?this.looseValue:this.looseValue;const m=a.templateRendering.call(this,this.$props.inputPrefix,a.getListeners.call(this)),V=a.templateRendering.call(this,this.$props.inputSuffix,a.getListeners.call(this)),v=a.getTemplate.call(this,{h:s.h,template:m,additionalProps:{value:this.computedValue,valid:p}}),b=a.getTemplate.call(this,{h:s.h,template:V,additionalProps:{value:this.computedValue,valid:p}}),f=s.createVNode("span",{dir:this.$props.dir,class:this.wrapperClassNames,style:this.$attrs.style},[t&&s.createVNode(a.Icon,{name:t,class:"k-input-icon"},null),this.$props.inputPrefix&&s.createVNode("span",{class:"k-input-prefix"},[v]),s.createVNode("input",s.mergeProps({tabindex:this.$props.tabIndex,accesskey:this.$props.accessKey,disabled:this.$props.disabled,title:this.$props.title,"aria-label":this.$props.ariaLabel,"aria-valuemin":this.$props.min,"aria-valuemax":this.$props.max,"aria-disabled":this.$props.disabled?"true":void 0,placeholder:this.$props.placeholder,type:this.$props.inputType,spellcheck:!1,autocomplete:"off",autocorrect:"off",class:this.inputInnerClass,id:u,role:"spinbutton",value:this.looseValue,name:this.$props.name,onWheel:this.wheel,onKeydown:this.keyDown,onInput:this.elementChange,onFocus:this.emitFocus,onBlur:this.emitBlur,onPaste:this.onPasteHandler,ref:a.setRef(this,"input")},d),null),this.$props.inputSuffix&&s.createVNode("span",{class:"k-input-suffix"},[b]),e&&p&&s.createVNode(a.Icon,{name:"check",icon:h.checkIcon,class:"k-input-validation-icon"},null),e&&!p&&s.createVNode(a.Icon,{name:"exclamation-circle",icon:h.exclamationCircleIcon,class:"k-input-validation-icon"},null),n&&s.createVNode(a.Icon,{name:"loading",class:"k-input-loading-icon"},null),l&&this.computedValue!==void 0&&this.computedValue!==null&&s.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[s.createVNode(a.Icon,{name:"x",icon:h.xIcon},null)]),c,this.$props.spinners&&s.createVNode("span",{class:"k-input-spinner k-spin-button",onMousedown:this.spinnersWrapperMouseDown},[s.createVNode(g.Button,{type:"button",tabIndex:-1,icon:"caret-alt-up",svgIcon:h.caretAltUpIcon,class:"k-spinner-increase",rounded:null,"aria-label":o.toLanguageString(r.numericIncreaseValue,r.messages[r.numericIncreaseValue]),title:o.toLanguageString(r.numericIncreaseValue,r.messages[r.numericIncreaseValue]),onClick:this.increase},null),s.createVNode(g.Button,{type:"button",tabIndex:-1,class:"k-spinner-decrease",icon:"caret-alt-down",svgIcon:h.caretAltDownIcon,rounded:null,"aria-label":o.toLanguageString(r.numericDecreaseValue,r.messages[r.numericDecreaseValue]),title:o.toLanguageString(r.numericDecreaseValue,r.messages[r.numericDecreaseValue]),onClick:this.decrease},null)])]);return this.$props.label?s.createVNode("span",{class:this.spanClassNames,onFocusin:this.handleFocus,onFocusout:this.handleBlur,dir:this.$props.dir},[f,this.$props.label?u?s.createVNode("label",{for:u,class:"k-floating-label"},[this.$props.label]):s.createVNode("span",{class:"k-label"},[this.$props.label]):null]):f}});exports.NumericTextBox=y;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),a=require("@progress/kendo-vue-common"),$=require("@progress/kendo-vue-intl"),g=require("@progress/kendo-vue-buttons"),r=require("../messages/main.js"),i=require("./utils/main.js"),S=require("../package-metadata.js"),h=require("@progress/kendo-svg-icons"),k="Please enter a valid value!",y=s.defineComponent({model:{event:"changemodel"},emits:{change:t=>!0,changemodel:t=>!0,"update:modelValue":t=>!0,focus:t=>!0,blur:t=>!0},props:{modelValue:Number,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},size:{type:String,validator:function(t){return["small","medium","large"].includes(t)}},rounded:{type:String,validator:function(t){return["none","small","medium","large","full"].includes(t)}},fillMode:{type:String,validator:function(t){return["solid","flat","outline"].includes(t)}},required:{type:Boolean,default:!1},id:String,ariaLabel:String,iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,inputType:{type:String,default:"tel"},wrapperClass:String,inputAttributes:Object},inject:{kendoIntlService:{default:null},kendoLocalizationService:{default:null}},data(){return{hasMounted:!1,isInvalid:!1,isEmpty:!1,currentValue:0,valueDuringOnChange:0,currentLooseValue:"",selectionStart:0,selectionEnd:0,decimalSelect:!1,focused:!1,forceUpdate:!1}},created(){a.validatePackage(S.packageMetadata),this._textBeforeInput="",this._inputId=a.guid(),this.$data.currentLooseValue=null,this.$data.valueDuringOnChange=void 0,this._intl=$.provideIntlService(this),this._symbols=this._intl.numberSymbols(),this.$props.value!==void 0?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0?this.$data.currentValue=this.$props.modelValue:this.$props.defaultValue!==void 0?this.$data.currentValue=this.$props.defaultValue:this.$data.currentValue=null},mounted(){this._input=a.getRef(this,"input"),this._elementWrapper=this.elementWrapperRef,this.$data.hasMounted=!0,this._input&&(this._textBeforeInput=this._input.value),this.setValidity()},updated(){!(a.canUseDOM&&document.activeElement!==this._input||!this._input)&&this.$data.currentLooseValue!==null&&this.$data.forceUpdate&&this._input.type!=="number"&&(this._input.selectionStart=this.$data.selectionStart,this._input.selectionEnd=this.$data.selectionEnd,this.$data.forceUpdate=!1),this._input&&(this._textBeforeInput=this._input.value),this.setValidity()},computed:{computedValue(){return this.$data.valueDuringOnChange!==void 0?this.$data.valueDuringOnChange:this.$data.currentValue},looseValue(){return i.formatValue(this.$data.focused?this.$data.currentLooseValue:i.getStateOrPropsValue(this.$props.value,this.$data.currentValue),this.$props.format,this._intl)},spanClassNames(){const t=!this.$data.hasMounted||!this.$props.validityStyles||this.validity().valid,e=this.computedValue;return{"k-floating-label-container":!0,"k-focus":this.$data.focused,"k-empty":!(e===0||e||this.$props.placeholder),"k-invalid":!t&&t!==void 0,"k-rtl":this.$props.dir==="rtl",[this.inputClass]:this.inputClass}},wrapperClassNames(){const{size:t,fillMode:e,rounded:n,required:l,disabled:d}=this.$props,u=!this.$props.validityStyles||this.validity().valid;return{"k-input":!0,"k-numerictextbox":!0,[`k-input-${a.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${a.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-invalid":!u,"k-required":l,"k-disabled":d,"k-loading":this.showLoadingIcon,[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,[this.inputClass]:this.inputClass}}},methods:{validity(){const t=this.$props.validationMessage!==void 0,e=!this.$data.valueIsOutOfRange&&(!this.$props.required||this.computedValue!==null),n=this.$props.valid!==void 0?this.$props.valid:e;return{customError:t,valid:n,valueMissing:this.computedValue===null}},clearClick(t){this.$props.value!==void 0?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0?this.$data.currentValue=this.$props.modelValue:this.$data.currentValue=null,this.$emit("changemodel",null),this.$emit("update:modelValue",null),this.$emit("change",{event:t,value:null,component:this,target:{name:this.$props.name,value:null},validity:this.validity()})},focus(){this._input&&this._input.focus()},emitFocus(t){this.$data.currentLooseValue=this._prevLooseValue,this.$data.focused=!0,this.$emit("focus",{event:t})},emitBlur(t){this.$data.eventValue=null,this.$data.prevLooseValue="",this.$data.currentLooseValue="",this.$data.focused=!1,this.$data.selectionStart=void 0,this.$data.selectionEnd=void 0,this.$data.decimalSelect=!1,this.$data.valueIsCorrected=!1,this.$data.valueIsOutOfRange=!1,this.$emit("blur",{event:t})},handleFocus(t){this.$data.focused=!0},handleBlur(t){this.$data.focused=!1},setValidity(){this._input&&this._input.setCustomValidity&&this._input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||k)},getCurrentState(){return{eventValue:i.getStateOrPropsValue(this.$props.value,this.$data.currentValue),prevLooseValue:this._prevLooseValue,currentLooseValue:this._input.value,selectionStart:this._input.selectionStart,selectionEnd:this._input.selectionEnd,decimalSelect:!1,valueIsCorrected:!1,valueIsOutOfRange:!1,isPaste:this._isPaste,focused:this.$data.focused}},parseNumber(t){return this._intl.parseNumber(t,this.$props.format)},elementChange(t){const e=this.getCurrentState();this._isPaste=!1,this.triggerChange(t,i.sanitizeNumber(e,this.$props.format,this._intl))},triggerChange(t,e){if(this.$props.disabled)return;this.$data.valueDuringOnChange=e.eventValue,this.$data.currentValue=e.eventValue;const n=i.formatValue(i.rangeValue(e.eventValue,this.$props.min,this.$props.max),this.$props.format,this._intl),l=i.rangeValue(this.parseNumber(n),this.$props.min,this.$props.max);if(l!==e.eventValue&&(e.valueIsOutOfRange=!0,e.eventValue=l,this.$data.valueDuringOnChange=l,this.$data.currentValue=l),e.valueIsCorrected){const u=this._elementWrapper;u&&u.className.indexOf("k-invalid")===-1&&(this.$data.isInvalid=!0,setTimeout(()=>{this.$data.isInvalid=!1},50))}const d=this.$props.value!==e.eventValue;this.$props.value!==void 0?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0?this.$data.currentValue=this.$props.modelValue:this.$data.currentValue=this.$data.valueDuringOnChange,this.$data.prevLooseValue=e.prevLooseValue,this.$data.currentLooseValue=void 0,this.$data.currentLooseValue=e.currentLooseValue,this.$data.selectionStart=e.selectionStart,this.$data.selectionEnd=e.selectionEnd,this.$data.decimalSelect=e.decimalSelect,this.$data.valueIsCorrected=e.valueIsCorrected,this.$data.valueIsOutOfRange=e.valueIsOutOfRange,this.$data.focused=e.focused,this.$data.isPaste=e.isPaste,this.$data.forceUpdate=!this.$data.forceUpdate,d&&(this.$emit("changemodel",this.$data.valueDuringOnChange),this.$emit("update:modelValue",this.$data.valueDuringOnChange),this.$emit("change",{event:t,value:this.$data.valueDuringOnChange,component:this,target:{name:this.$props.name,value:this.$data.valueDuringOnChange},validity:this.validity()})),this.$data.valueDuringOnChange=void 0},onPasteHandler(t){this._isPaste=!0},increase(t){const e=this.getCurrentState();i.increaseValue(this.parseNumber(String(e.currentLooseValue)),e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl),this.triggerChange(t,e)},decrease(t){const e=this.getCurrentState();i.decreaseValue(this.parseNumber(String(e.currentLooseValue)),e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl),this.triggerChange(t,e)},wheel(t){!a.canUseDOM||document.activeElement!==this._input||!this._input||(t.deltaY<0&&(t.preventDefault(),this.increase(t)),t.deltaY>0&&(t.preventDefault(),this.decrease(t)))},keyDown(t){let e=this.getCurrentState(),n,l,d,u;const c=this.parseNumber(String(e.currentLooseValue));if(e.selectionEnd>e.selectionStart&&e.selectionEnd-e.selectionStart===String(e.currentLooseValue).length){const o=this._intl.numberSymbols(),p=o&&t.key===o.minusSign,m=o&&t.key===o.decimal;this.$data.isPaste=!p&&!m;return}switch(t.keyCode){case 38:i.increaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 40:i.decreaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 13:n=i.formatValue(i.rangeValue(c,this.$props.min,this.$props.max),this.$props.format,this._intl),l=i.rangeValue(this.parseNumber(n),this.$props.min,this.$props.max),e.eventValue=l,e.currentLooseValue=i.formatValue(l,this.$props.format,this._intl),e.selectionStart=e.selectionEnd=e.currentLooseValue.length;break;case 110:d=this._input,u=this._intl.numberSymbols(),d&&(e.currentLooseValue=e.currentLooseValue.slice(0,e.selectionStart)+u.decimal+e.currentLooseValue.slice(e.selectionEnd),e.selectionStart=e.selectionEnd=e.selectionStart+1,e=i.sanitizeNumber(e,this.$props.format,this._intl));break;default:return}t.preventDefault(),this.triggerChange(t,e)},spinnersWrapperMouseDown(t){a.canUseDOM&&this._input&&(t.preventDefault(),document.activeElement!==this._input&&this._input.focus())}},setup(){const t=s.ref(null),e=s.ref(null),n=s.inject("kendoLocalizationService",{}),l=s.inject("kendoIntlService",{});return{inputRef:t,elementWrapperRef:e,kendoLocalizationService:n,kendoIntlService:l}},render(){const{iconName:t,showValidationIcon:e,showLoadingIcon:n,showClearButton:l,inputAttributes:d}=this.$props,u=this.$props.id||this._inputId,c=a.getDefaultSlots(this),o=$.provideLocalizationService(this),p=this.validity().valid;this.$props.value!==void 0&&this.$props.value!==this.$data.currentValue?this.$data.currentValue=this.$props.value:this.$props.modelValue!==void 0&&this.$props.modelValue!==this.$data.currentValue&&(this.$data.currentValue=this.$props.modelValue),this._prevLooseValue=this.$data.currentLooseValue?this.looseValue:this.looseValue;const m=a.templateRendering.call(this,this.$props.inputPrefix,a.getListeners.call(this)),V=a.templateRendering.call(this,this.$props.inputSuffix,a.getListeners.call(this)),v=a.getTemplate.call(this,{h:s.h,template:m,additionalProps:{value:this.computedValue,valid:p}}),b=a.getTemplate.call(this,{h:s.h,template:V,additionalProps:{value:this.computedValue,valid:p}}),f=s.createVNode("span",{dir:this.$props.dir,class:this.wrapperClassNames,style:this.$attrs.style},[t&&s.createVNode(a.Icon,{name:t,class:"k-input-icon"},null),this.$props.inputPrefix&&s.createVNode("span",{class:"k-input-prefix"},[v]),s.createVNode("input",s.mergeProps({tabindex:this.$props.tabIndex,accesskey:this.$props.accessKey,disabled:this.$props.disabled,title:this.$props.title,"aria-label":this.$props.ariaLabel,"aria-valuemin":this.$props.min,"aria-valuemax":this.$props.max,"aria-disabled":this.$props.disabled?"true":void 0,placeholder:this.$props.placeholder,type:this.$props.inputType,spellcheck:!1,autocomplete:"off",autocorrect:"off",class:this.inputInnerClass,id:u,role:"spinbutton",value:this.looseValue,name:this.$props.name,onWheel:this.wheel,onKeydown:this.keyDown,onInput:this.elementChange,onFocus:this.emitFocus,onBlur:this.emitBlur,onPaste:this.onPasteHandler,ref:a.setRef(this,"input")},d),null),this.$props.inputSuffix&&s.createVNode("span",{class:"k-input-suffix"},[b]),e&&p&&s.createVNode(a.Icon,{name:"check",icon:h.checkIcon,class:"k-input-validation-icon"},null),e&&!p&&s.createVNode(a.Icon,{name:"exclamation-circle",icon:h.exclamationCircleIcon,class:"k-input-validation-icon"},null),n&&s.createVNode(a.Icon,{name:"loading",class:"k-input-loading-icon"},null),l&&this.computedValue!==void 0&&this.computedValue!==null&&s.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[s.createVNode(a.Icon,{name:"x",icon:h.xIcon},null)]),c,this.$props.spinners&&s.createVNode("span",{class:"k-input-spinner k-spin-button",onMousedown:this.spinnersWrapperMouseDown},[s.createVNode(g.Button,{type:"button",tabIndex:-1,icon:"caret-alt-up",svgIcon:h.caretAltUpIcon,class:"k-spinner-increase",rounded:null,"aria-label":o.toLanguageString(r.numericIncreaseValue,r.messages[r.numericIncreaseValue]),title:o.toLanguageString(r.numericIncreaseValue,r.messages[r.numericIncreaseValue]),onClick:this.increase},null),s.createVNode(g.Button,{type:"button",tabIndex:-1,class:"k-spinner-decrease",icon:"caret-alt-down",svgIcon:h.caretAltDownIcon,rounded:null,"aria-label":o.toLanguageString(r.numericDecreaseValue,r.messages[r.numericDecreaseValue]),title:o.toLanguageString(r.numericDecreaseValue,r.messages[r.numericDecreaseValue]),onClick:this.decrease},null)])]);return this.$props.label?s.createVNode("span",{class:this.spanClassNames,onFocusin:this.handleFocus,onFocusout:this.handleBlur,dir:this.$props.dir},[f,this.$props.label?u?s.createVNode("label",{for:u,class:"k-floating-label"},[this.$props.label]):s.createVNode("span",{class:"k-label"},[this.$props.label]):null]):f}});exports.NumericTextBox=y;
@@ -61,23 +61,20 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
61
61
  },
62
62
  size: {
63
63
  type: String,
64
- default: "medium",
65
64
  validator: function(t) {
66
- return [null, "small", "medium", "large"].includes(t);
65
+ return ["small", "medium", "large"].includes(t);
67
66
  }
68
67
  },
69
68
  rounded: {
70
69
  type: String,
71
- default: "medium",
72
70
  validator: function(t) {
73
- return [null, "small", "medium", "large", "full"].includes(t);
71
+ return ["none", "small", "medium", "large", "full"].includes(t);
74
72
  }
75
73
  },
76
74
  fillMode: {
77
75
  type: String,
78
- default: "solid",
79
76
  validator: function(t) {
80
- return [null, "solid", "flat", "outline"].includes(t);
77
+ return ["solid", "flat", "outline"].includes(t);
81
78
  }
82
79
  },
83
80
  required: {
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-inputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1769676059,version:"7.1.0-develop.6",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-vue-inputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate: 1770355203,version:"7.1.0-develop.7",licensingDocsUrl:"https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"};exports.packageMetadata=e;
@@ -10,8 +10,8 @@ const e = {
10
10
  productName: "Kendo UI for Vue",
11
11
  productCode: "KENDOUIVUE",
12
12
  productCodes: ["KENDOUIVUE"],
13
- publishDate: 1769676059,
14
- version: "7.1.0-develop.6",
13
+ publishDate: 1770355203,
14
+ version: "7.1.0-develop.7",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
16
16
  };
17
17
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-vue-inputs",
3
- "version": "7.1.0-develop.6",
3
+ "version": "7.1.0-develop.7",
4
4
  "description": "TODO",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -20,13 +20,13 @@
20
20
  "peerDependencies": {
21
21
  "@progress/kendo-drawing": "^1.21.1",
22
22
  "@progress/kendo-licensing": "^1.7.2",
23
- "@progress/kendo-vue-animation": "7.1.0-develop.6",
24
- "@progress/kendo-vue-buttons": "7.1.0-develop.6",
25
- "@progress/kendo-vue-common": "7.1.0-develop.6",
26
- "@progress/kendo-vue-dialogs": "7.1.0-develop.6",
27
- "@progress/kendo-vue-intl": "7.1.0-develop.6",
28
- "@progress/kendo-vue-labels": "7.1.0-develop.6",
29
- "@progress/kendo-vue-popup": "7.1.0-develop.6",
23
+ "@progress/kendo-vue-animation": "7.1.0-develop.7",
24
+ "@progress/kendo-vue-buttons": "7.1.0-develop.7",
25
+ "@progress/kendo-vue-common": "7.1.0-develop.7",
26
+ "@progress/kendo-vue-dialogs": "7.1.0-develop.7",
27
+ "@progress/kendo-vue-intl": "7.1.0-develop.7",
28
+ "@progress/kendo-vue-labels": "7.1.0-develop.7",
29
+ "@progress/kendo-vue-popup": "7.1.0-develop.7",
30
30
  "@progress/kendo-svg-icons": "^4.4.0",
31
31
  "vue": "^3.0.2"
32
32
  },
@@ -49,7 +49,7 @@
49
49
  "package": {
50
50
  "productName": "Kendo UI for Vue",
51
51
  "productCode": "KENDOUIVUE",
52
- "publishDate": 1769676059,
52
+ "publishDate": 1770355203,
53
53
  "licensingDocsUrl": "https://www.telerik.com/kendo-vue-ui/my-license/?utm_medium=product&utm_source=kendovue&utm_campaign=kendo-ui-vue-purchase-license-keys-warning"
54
54
  }
55
55
  },
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),t=require("@progress/kendo-vue-common"),B=require("../package-metadata.js"),N=a.defineComponent({name:"KendoRadioButton",props:{ariaDescribedBy:String,checked:Boolean,disabled:Boolean,className:String,content:[String,Number,Boolean,Object],dataItem:Object,id:String,label:String,labelRender:[String,Number,Boolean,Object],item:[String,Number,Boolean,Object],labelPlacement:String,name:String,index:Number,tag:{type:String,default:"div"},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},tabIndex:Number,value:[String,Number,Object],valid:{type:Boolean,default:void 0},role:String},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0},created(){this.calculatedId=t.guid(),t.validatePackage(B.packageMetadata)},mounted(){this.input=t.getRef(this,"input")},computed:{inputClassName(){return{"k-radio":!0,[`k-radio-${t.kendoThemeMaps.sizeMap[this.$props.size]}`]:this.$props.size,"k-invalid":this.$props.valid===!1,[this.$props.className]:this.$props.className}}},methods:{focusElement(){this.input&&this.input.focus()},handleChange(e){this.$emit("change",{event:e,value:this.$props.value})},handleFocus(e){this.$props.disabled||this.$emit("focus",{event:e,target:this})},handleBlur(e){this.$props.disabled||this.$emit("blur",{event:e,target:this})}},setup(){return{inputRef:a.ref(null)}},render(){const e=t.getDefaultSlots(this),{ariaDescribedBy:h,checked:p,disabled:n,id:s,label:r,labelRender:i,labelPlacement:m,name:b,tabIndex:g,value:f,tag:d,role:S}=this.$props;let l=r;if(i){const v=i?t.templateRendering.call(this,i,t.getListeners.call(this)):null;l=t.getTemplate.call(this,{h:a.h,template:v})}const o=t.getTemplate.call(this,{h:a.h,template:this.$props.content}),u=l!==void 0?a.createVNode("label",{class:"k-radio-label",for:s||this.calculatedId,style:{userSelect:"none"},"aria-label":r},[l]):null,c=a.createVNode("input",{role:S,type:"radio",id:s||this.calculatedId,name:b,class:this.inputClassName,ref:t.setRef(this,"input"),disabled:n,tabindex:t.getTabIndex(g,n),checked:p,style:this.$attrs.style,"aria-describedby":h,value:f,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur},null),$=m==="before"?a.h(d,[u,c,o,e]):a.h(d,[c,u,o,e]);return t.getTemplate.call(this,{h:a.h,template:this.$props.item,defaultRendering:$,defaultSlots:e,additionalListeners:{change:this.handleChange,focus:this.handleFocus,blur:this.handleBlur},additionalProps:{dataItem:this.$props.dataItem}})}});exports.RadioButton=N;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),t=require("@progress/kendo-vue-common"),B=require("../package-metadata.js"),N=a.defineComponent({name:"KendoRadioButton",props:{ariaDescribedBy:String,checked:Boolean,disabled:Boolean,className:String,content:[String,Number,Boolean,Object],dataItem:Object,id:String,label:String,labelRender:[String,Number,Boolean,Object],item:[String,Number,Boolean,Object],labelPlacement:String,name:String,index:Number,tag:{type:String,default:"div"},size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},tabIndex:Number,value:[String,Number,Object],valid:{type:Boolean,default:void 0},role:String},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0},created(){this.calculatedId=t.guid(),t.validatePackage(B.packageMetadata)},mounted(){this.input=t.getRef(this,"input")},computed:{inputClassName(){return{"k-radio":!0,[`k-radio-${t.kendoThemeMaps.sizeMap[this.$props.size]}`]:this.$props.size,"k-invalid":this.$props.valid===!1,[this.$props.className]:this.$props.className}}},methods:{focusElement(){this.input&&this.input.focus()},handleChange(e){this.$emit("change",{event:e,value:this.$props.value})},handleFocus(e){this.$props.disabled||this.$emit("focus",{event:e,target:this})},handleBlur(e){this.$props.disabled||this.$emit("blur",{event:e,target:this})}},setup(){return{inputRef:a.ref(null)}},render(){const e=t.getDefaultSlots(this),{ariaDescribedBy:h,checked:p,disabled:l,id:s,label:r,labelRender:i,labelPlacement:m,name:b,tabIndex:g,value:f,tag:d,role:S}=this.$props;let n=r;if(i){const v=i?t.templateRendering.call(this,i,t.getListeners.call(this)):null;n=t.getTemplate.call(this,{h:a.h,template:v})}const o=t.getTemplate.call(this,{h:a.h,template:this.$props.content}),u=n!==void 0?a.createVNode("label",{class:"k-radio-label",for:s||this.calculatedId,style:{userSelect:"none"},"aria-label":r},[n]):null,c=a.createVNode("input",{role:S,type:"radio",id:s||this.calculatedId,name:b,class:this.inputClassName,ref:t.setRef(this,"input"),disabled:l,tabindex:t.getTabIndex(g,l),checked:p,style:this.$attrs.style,"aria-describedby":h,value:f,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur},null),$=m==="before"?a.h(d,[u,c,o,e]):a.h(d,[c,u,o,e]);return t.getTemplate.call(this,{h:a.h,template:this.$props.item,defaultRendering:$,defaultSlots:e,additionalListeners:{change:this.handleChange,focus:this.handleFocus,blur:this.handleBlur},additionalProps:{dataItem:this.$props.dataItem}})}});exports.RadioButton=N;
@@ -30,9 +30,8 @@ const M = /* @__PURE__ */ N({
30
30
  },
31
31
  size: {
32
32
  type: String,
33
- default: "medium",
34
33
  validator: function(e) {
35
- return [null, "small", "medium", "large"].includes(e);
34
+ return ["small", "medium", "large"].includes(e);
36
35
  }
37
36
  },
38
37
  tabIndex: Number,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),p=require("@progress/kendo-vue-buttons"),i=require("@progress/kendo-vue-common"),c=require("./SignatureDialog.js"),m=require("./SignatureBottomActions.js"),g=require("./SignatureLine.js"),f=require("@progress/kendo-vue-intl"),a=require("../messages/main.js"),v=require("../package-metadata.js"),C=require("./SignatureCanvas.js"),S=require("./utils/main.js"),y=require("@progress/kendo-svg-icons"),$=250,k=84,b=3,z=2,O="#000000",V="#ffffff",B=s.defineComponent({name:"KendoSignature",model:{event:"changemodel"},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,open:e=>!0,close:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0},inject:{kendoLocalizationService:{default:null}},props:{strokeWidth:{type:Number,default:1},smooth:Boolean,popupScale:{type:Number,default:b},exportScale:{type:Number,default:z},modelValue:String,name:String,value:String,tabIndex:Number,dir:String,ariaDescribedBy:String,ariaLabelledBy:String,ariaLabel:String,hideLine:Boolean,open:{type:Boolean,default:void 0},readOnly:Boolean,disabled:Boolean,validationMessage:String,maximizable:{type:Boolean,default:!0},color:String,backgroundColor:String,validityStyles:{type:Boolean,default:!0},required:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},rounded:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large","full"].includes(e)}},fillMode:{type:String,default:"solid",validator:function(e){return[null,"solid","flat","outline"].includes(e)}}},created(){i.validatePackage(v.packageMetadata)},computed:{wrapperClass(){return{...this.openWrapperClass,"k-signature-maximized":!1}},openWrapperClass(){const e=!this.validityStyles||this.validityGetter().valid;return{"k-input":!0,"k-signature":!0,"k-signature-maximized":!0,[`k-signature-${i.kendoThemeMaps.sizeMap[this.$props.size]||this.$props.size}`]:this.$props.size,[`k-input-${this.$props.fillMode}`]:this.$props.fillMode,[`k-rounded-${i.kendoThemeMaps.roundedMap[this.$props.rounded]||this.$props.rounded}`]:this.$props.rounded,"k-invalid":!e,"k-required":this.$props.required,"k-disabled":this.$props.disabled,"k-focus":this.focused}},computedValue(){return this.value!==void 0?this.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.currentValue},computedOpen(){return this.open!==void 0?this.open:this.currentOpen},computedColor(){let e=O;return!this.$props.color&&typeof document!="undefined"&&this.$el&&(e=getComputedStyle(this.$el).color),this.$props.color||e},computedBgColor(){let e=V;return!this.$props.backgroundColor&&typeof document!="undefined"&&this.$el&&(e=getComputedStyle(this.$el).backgroundColor),this.$props.backgroundColor||e}},watch:{computedValue(e){e!==this.currentValue&&this.loadImage(e)},computedOpen(){this.loadImage(this.computedValue)}},data(){return{focused:!1,isDrawing:!1,currentValue:void 0,popupValue:void 0,currentOpen:!1}},mounted(){this.setRefs()},updated(){this.setRefs()},setup(){return{inputRef:s.ref(null)}},render(){const e=f.provideLocalizationService(this),t=!(this.computedOpen||this.isDrawing||!this.$props.maximizable||this.$props.disabled),n=!(!this.computedValue||this.isDrawing||this.$props.readOnly||this.$props.disabled),r=e.toLanguageString(a.signatureMaximize,a.messages[a.signatureMaximize]),l=e.toLanguageString(a.signatureClear,a.messages[a.signatureClear]),u=s.createVNode("div",{class:"k-signature-actions k-signature-actions-top"},[t&&s.createVNode(p.Button,{class:"k-signature-action k-signature-maximize",ref:i.setRef(this,"maximizeButton"),icon:"hyperlink-open",svgIcon:y.hyperlinkOpenIcon,shape:null,fillMode:"flat",size:this.$props.size,onClick:this.onMaximizeClick,"aria-label":r,title:r},null)]),d=!this.$props.hideLine&&s.createVNode(g.SignatureLine,null,null),h=s.createVNode(m.SignatureBottomActions,{showClear:n,size:this.size,onClear:this.onClear,title:l},null);return s.createVNode("div",{dir:this.$props.dir,class:this.wrapperClass,onFocus:this.onFocus,onBlur:this.onBlur},[s.createVNode(C.SignatureCanvas,{ref:i.setRef(this,"canvas"),name:this.name,value:this.computedValue,tabIndex:this.tabIndex,disabled:this.disabled,readOnly:this.readOnly,color:this.computedColor,backgroundColor:this.computedBgColor,strokeWidth:this.strokeWidth,smooth:this.smooth,popupScale:1,scale:this.exportScale,onChange:this.onValueChange,elementSize:this.elementSize,onDraw:this.onDraw,onDrawend:this.onDrawEnd},null),u,d,h,this.computedOpen&&s.createVNode(c.SignatureDialog,{ref:i.setRef(this,"dialog"),openWrapperClass:this.openWrapperClass,popupWidth:this.popupWidth,popupHeight:this.popupHeight,showClear:n,onClose:this.onMinimizeClick,onClear:this.onClear,onOverlayclick:this.onOverlayClick,onFocus:this.onFocus,onBlur:this.onBlur,value:this.computedValue,tabIndex:this.tabIndex,disabled:this.disabled,readOnly:this.readOnly,color:this.computedColor,backgroundColor:this.computedBgColor,strokeWidth:this.strokeWidth,smooth:this.smooth,popupScale:this.$props.popupScale,scale:1/this.popupScale*this.exportScale,onChange:this.onValueChange,elementSize:this.elementSize,onDraw:this.onDraw,onDrawend:this.onDrawEnd},null)])},methods:{setRefs(){this.canvas=i.getRef(this,"canvas"),this.minimizeButton=i.getRef(this,"minimizeButton"),this.maximizeButton=i.getRef(this,"maximizeButton"),this.dialog=i.getRef(this,"dialog"),this.popupWidth=this.popupSize().width,this.popupHeight=this.popupSize().height},onOverlayClick(){this.currentOpen=!1},onValueChange(e){this.currentValue=e,this.$emit("changemodel",e),this.$emit("update:modelValue",e),this.$emit("change",{value:e})},onDialogChange(e){this.onValueChange(e.value)},reset(){this.clear(),this.onValueChange()},clear(){this.canvas&&this.canvas.clear(),this.dialog&&this.dialog.openCanvas&&this.dialog.openCanvas.clear()},loadImage(e){this.canvas&&this.canvas.loadImage(e),this.dialog&&this.dialog.openCanvas&&this.dialog.openCanvas.loadImage(e)},onDialogClose(e){var t;this.onMinimizeClick(e),(t=this.maximizeButton||this.canvas.$el)==null||t.focus()},exportImage(e){var n;const{width:t,height:o}=e;return(n=this.canvas.instance)==null?void 0:n.exportImage({width:t*this.exportScale,height:o*this.exportScale})},validityGetter(){const e=this.$props.validationMessage!==void 0,o=!this.computedValue,n=this.$props.valid!==void 0?this.$props.valid:!this.required||!o;return{customError:e,valid:n,valueMissing:o}},focusElement(){this.canvas.$el.focus()},getImperativeHandle(){const e={element:this.$el,focus:this.focusElement()};return Object.defineProperty(e,"name",{get:()=>this.name}),Object.defineProperty(e,"value",{get:()=>this.computedValue}),Object.defineProperty(e,"validity",{get:()=>this.validityGetter()}),Object.defineProperty(e,"validityStyles",{get:()=>this.validityStyles}),Object.defineProperty(e,"required",{get:()=>this.required}),Object.defineProperty(e,"color",{get:()=>this.computedColor}),Object.defineProperty(e,"backgroundColor",{get:()=>this.computedBgColor}),e},onFocus(e){this.focused||this.computedOpen||(this.focused(!0),this.$emit("focus",{event:e,...this.getImperativeHandle()}))},onBlur(e){S.hasParent(e.relatedTarget,this.$el)||(this.focused=!1,this.$emit("blur",{event:e,...this.getImperativeHandle()}))},onMaximizeClick:async function(t){this.exportImage(this.popupSize()).then(o=>{this.currentValue=o}),this.currentOpen=!0,this.$emit("open",{event:t,...this.getImperativeHandle()})},onMinimizeClick(e){this.currentOpen=!1,this.$emit("close",{event:e,...this.getImperativeHandle()})},onClear(){this.reset(),this.focusElement()},elementSize(){const e=this.$props.width||this.$el&&this.$el.offsetWidth||$,t=this.$props.height||this.$el&&this.$el.offsetHeight||k;return{width:e,height:t}},popupSize(){const{width:e,height:t}=this.elementSize();return{width:e*this.popupScale,height:t*this.popupScale}},onDraw(){this.isDrawing=!0},onDrawEnd(){this.isDrawing=!1}}});exports.Signature=B;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),p=require("@progress/kendo-vue-buttons"),i=require("@progress/kendo-vue-common"),c=require("./SignatureDialog.js"),m=require("./SignatureBottomActions.js"),g=require("./SignatureLine.js"),f=require("@progress/kendo-vue-intl"),a=require("../messages/main.js"),v=require("../package-metadata.js"),C=require("./SignatureCanvas.js"),S=require("./utils/main.js"),y=require("@progress/kendo-svg-icons"),$=250,k=84,b=3,z=2,O="#000000",V="#ffffff",B=s.defineComponent({name:"KendoSignature",model:{event:"changemodel"},emits:{change:e=>!0,focus:e=>!0,blur:e=>!0,open:e=>!0,close:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0},inject:{kendoLocalizationService:{default:null}},props:{strokeWidth:{type:Number,default:1},smooth:Boolean,popupScale:{type:Number,default:b},exportScale:{type:Number,default:z},modelValue:String,name:String,value:String,tabIndex:Number,dir:String,ariaDescribedBy:String,ariaLabelledBy:String,ariaLabel:String,hideLine:Boolean,open:{type:Boolean,default:void 0},readOnly:Boolean,disabled:Boolean,validationMessage:String,maximizable:{type:Boolean,default:!0},color:String,backgroundColor:String,validityStyles:{type:Boolean,default:!0},required:{type:Boolean,default:!1},valid:{type:Boolean,default:void 0},size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},rounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},fillMode:{type:String,validator:function(e){return["solid","flat","outline"].includes(e)}}},created(){i.validatePackage(v.packageMetadata)},computed:{wrapperClass(){return{...this.openWrapperClass,"k-signature-maximized":!1}},openWrapperClass(){const e=!this.validityStyles||this.validityGetter().valid;return{"k-input":!0,"k-signature":!0,"k-signature-maximized":!0,[`k-signature-${i.kendoThemeMaps.sizeMap[this.$props.size]||this.$props.size}`]:this.$props.size,[`k-input-${this.$props.fillMode}`]:this.$props.fillMode,[`k-rounded-${i.kendoThemeMaps.roundedMap[this.$props.rounded]||this.$props.rounded}`]:this.$props.rounded,"k-invalid":!e,"k-required":this.$props.required,"k-disabled":this.$props.disabled,"k-focus":this.focused}},computedValue(){return this.value!==void 0?this.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.currentValue},computedOpen(){return this.open!==void 0?this.open:this.currentOpen},computedColor(){let e=O;return!this.$props.color&&typeof document!="undefined"&&this.$el&&(e=getComputedStyle(this.$el).color),this.$props.color||e},computedBgColor(){let e=V;return!this.$props.backgroundColor&&typeof document!="undefined"&&this.$el&&(e=getComputedStyle(this.$el).backgroundColor),this.$props.backgroundColor||e}},watch:{computedValue(e){e!==this.currentValue&&this.loadImage(e)},computedOpen(){this.loadImage(this.computedValue)}},data(){return{focused:!1,isDrawing:!1,currentValue:void 0,popupValue:void 0,currentOpen:!1}},mounted(){this.setRefs()},updated(){this.setRefs()},setup(){return{inputRef:s.ref(null)}},render(){const e=f.provideLocalizationService(this),t=!(this.computedOpen||this.isDrawing||!this.$props.maximizable||this.$props.disabled),n=!(!this.computedValue||this.isDrawing||this.$props.readOnly||this.$props.disabled),r=e.toLanguageString(a.signatureMaximize,a.messages[a.signatureMaximize]),l=e.toLanguageString(a.signatureClear,a.messages[a.signatureClear]),u=s.createVNode("div",{class:"k-signature-actions k-signature-actions-top"},[t&&s.createVNode(p.Button,{class:"k-signature-action k-signature-maximize",ref:i.setRef(this,"maximizeButton"),icon:"hyperlink-open",svgIcon:y.hyperlinkOpenIcon,fillMode:"flat",size:this.$props.size,onClick:this.onMaximizeClick,"aria-label":r,title:r},null)]),d=!this.$props.hideLine&&s.createVNode(g.SignatureLine,null,null),h=s.createVNode(m.SignatureBottomActions,{showClear:n,size:this.size,onClear:this.onClear,title:l},null);return s.createVNode("div",{dir:this.$props.dir,class:this.wrapperClass,onFocus:this.onFocus,onBlur:this.onBlur},[s.createVNode(C.SignatureCanvas,{ref:i.setRef(this,"canvas"),name:this.name,value:this.computedValue,tabIndex:this.tabIndex,disabled:this.disabled,readOnly:this.readOnly,color:this.computedColor,backgroundColor:this.computedBgColor,strokeWidth:this.strokeWidth,smooth:this.smooth,popupScale:1,scale:this.exportScale,onChange:this.onValueChange,elementSize:this.elementSize,onDraw:this.onDraw,onDrawend:this.onDrawEnd},null),u,d,h,this.computedOpen&&s.createVNode(c.SignatureDialog,{ref:i.setRef(this,"dialog"),openWrapperClass:this.openWrapperClass,popupWidth:this.popupWidth,popupHeight:this.popupHeight,showClear:n,onClose:this.onMinimizeClick,onClear:this.onClear,onOverlayclick:this.onOverlayClick,onFocus:this.onFocus,onBlur:this.onBlur,value:this.computedValue,tabIndex:this.tabIndex,disabled:this.disabled,readOnly:this.readOnly,color:this.computedColor,backgroundColor:this.computedBgColor,strokeWidth:this.strokeWidth,smooth:this.smooth,popupScale:this.$props.popupScale,scale:1/this.popupScale*this.exportScale,onChange:this.onValueChange,elementSize:this.elementSize,onDraw:this.onDraw,onDrawend:this.onDrawEnd},null)])},methods:{setRefs(){this.canvas=i.getRef(this,"canvas"),this.minimizeButton=i.getRef(this,"minimizeButton"),this.maximizeButton=i.getRef(this,"maximizeButton"),this.dialog=i.getRef(this,"dialog"),this.popupWidth=this.popupSize().width,this.popupHeight=this.popupSize().height},onOverlayClick(){this.currentOpen=!1},onValueChange(e){this.currentValue=e,this.$emit("changemodel",e),this.$emit("update:modelValue",e),this.$emit("change",{value:e})},onDialogChange(e){this.onValueChange(e.value)},reset(){this.clear(),this.onValueChange()},clear(){this.canvas&&this.canvas.clear(),this.dialog&&this.dialog.openCanvas&&this.dialog.openCanvas.clear()},loadImage(e){this.canvas&&this.canvas.loadImage(e),this.dialog&&this.dialog.openCanvas&&this.dialog.openCanvas.loadImage(e)},onDialogClose(e){var t;this.onMinimizeClick(e),(t=this.maximizeButton||this.canvas.$el)==null||t.focus()},exportImage(e){var n;const{width:t,height:o}=e;return(n=this.canvas.instance)==null?void 0:n.exportImage({width:t*this.exportScale,height:o*this.exportScale})},validityGetter(){const e=this.$props.validationMessage!==void 0,o=!this.computedValue,n=this.$props.valid!==void 0?this.$props.valid:!this.required||!o;return{customError:e,valid:n,valueMissing:o}},focusElement(){this.canvas.$el.focus()},getImperativeHandle(){const e={element:this.$el,focus:this.focusElement()};return Object.defineProperty(e,"name",{get:()=>this.name}),Object.defineProperty(e,"value",{get:()=>this.computedValue}),Object.defineProperty(e,"validity",{get:()=>this.validityGetter()}),Object.defineProperty(e,"validityStyles",{get:()=>this.validityStyles}),Object.defineProperty(e,"required",{get:()=>this.required}),Object.defineProperty(e,"color",{get:()=>this.computedColor}),Object.defineProperty(e,"backgroundColor",{get:()=>this.computedBgColor}),e},onFocus(e){this.focused||this.computedOpen||(this.focused(!0),this.$emit("focus",{event:e,...this.getImperativeHandle()}))},onBlur(e){S.hasParent(e.relatedTarget,this.$el)||(this.focused=!1,this.$emit("blur",{event:e,...this.getImperativeHandle()}))},onMaximizeClick:async function(t){this.exportImage(this.popupSize()).then(o=>{this.currentValue=o}),this.currentOpen=!0,this.$emit("open",{event:t,...this.getImperativeHandle()})},onMinimizeClick(e){this.currentOpen=!1,this.$emit("close",{event:e,...this.getImperativeHandle()})},onClear(){this.reset(),this.focusElement()},elementSize(){const e=this.$props.width||this.$el&&this.$el.offsetWidth||$,t=this.$props.height||this.$el&&this.$el.offsetHeight||k;return{width:e,height:t}},popupSize(){const{width:e,height:t}=this.elementSize();return{width:e*this.popupScale,height:t*this.popupScale}},onDraw(){this.isDrawing=!0},onDrawEnd(){this.isDrawing=!1}}});exports.Signature=B;
@@ -86,23 +86,20 @@ const D = 250, x = 84, V = 3, I = 2, L = "#000000", E = "#ffffff", N = /* @__PUR
86
86
  },
87
87
  size: {
88
88
  type: String,
89
- default: "medium",
90
89
  validator: function(e) {
91
- return [null, "small", "medium", "large"].includes(e);
90
+ return ["small", "medium", "large"].includes(e);
92
91
  }
93
92
  },
94
93
  rounded: {
95
94
  type: String,
96
- default: "medium",
97
95
  validator: function(e) {
98
- return [null, "small", "medium", "large", "full"].includes(e);
96
+ return ["none", "small", "medium", "large", "full"].includes(e);
99
97
  }
100
98
  },
101
99
  fillMode: {
102
100
  type: String,
103
- default: "solid",
104
101
  validator: function(e) {
105
- return [null, "solid", "flat", "outline"].includes(e);
102
+ return ["solid", "flat", "outline"].includes(e);
106
103
  }
107
104
  }
108
105
  },
@@ -182,7 +179,6 @@ const D = 250, x = 84, V = 3, I = 2, L = "#000000", E = "#ffffff", N = /* @__PUR
182
179
  ref: a(this, "maximizeButton"),
183
180
  icon: "hyperlink-open",
184
181
  svgIcon: w,
185
- shape: null,
186
182
  fillMode: "flat",
187
183
  size: this.$props.size,
188
184
  onClick: this.onMaximizeClick,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("@progress/kendo-vue-buttons"),s=require("@progress/kendo-svg-icons"),r=t.defineComponent({name:"KendoSignatureBottomActions",emits:{clear:null},props:{showClear:Boolean,size:String,title:String},methods:{onClear(e){this.$emit("clear",e)}},render(){const{showClear:e,title:o,size:n}=this.$props;return t.createVNode("div",{class:"k-signature-actions k-signature-actions-bottom"},[e&&t.createVNode(i.Button,{class:"k-signature-action k-signature-clear",icon:"x",svgIcon:s.xIcon,shape:null,fillMode:"flat",size:n,onClick:this.onClear,"aria-label":o,title:o},null)])}});exports.SignatureBottomActions=r;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("@progress/kendo-vue-buttons"),r=require("@progress/kendo-svg-icons"),s=t.defineComponent({name:"KendoSignatureBottomActions",emits:{clear:null},props:{showClear:Boolean,size:String,title:String},methods:{onClear(e){this.$emit("clear",e)}},render(){const{showClear:e,title:o,size:n}=this.$props;return t.createVNode("div",{class:"k-signature-actions k-signature-actions-bottom"},[e&&t.createVNode(i.Button,{class:"k-signature-action k-signature-clear",icon:"x",svgIcon:r.xIcon,fillMode:"flat",size:n,onClick:this.onClear,"aria-label":o,title:o},null)])}});exports.SignatureBottomActions=s;
@@ -35,7 +35,6 @@ const m = /* @__PURE__ */ n({
35
35
  class: "k-signature-action k-signature-clear",
36
36
  icon: "x",
37
37
  svgIcon: s,
38
- shape: null,
39
38
  fillMode: "flat",
40
39
  size: i,
41
40
  onClick: this.onClear,
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),D=require("@progress/kendo-vue-dialogs"),y=require("./SignatureBottomActions.js"),N=require("./SignatureLine.js"),V=require("@progress/kendo-vue-buttons"),B=require("@progress/kendo-vue-intl"),o=require("@progress/kendo-vue-common"),$=require("@progress/kendo-svg-icons"),q=require("./SignatureCanvas.js"),n=require("../messages/main.js"),O=i.defineComponent({name:"KendoSignatureDialog",emits:{change:null,clear:null,close:null,focus:null,blur:null,overlayclick:null,draw:null,drawend:null},props:{openWrapperClass:Object,size:String,dir:String,popupWidth:Number,popupHeight:Number,showClear:Boolean,strokeWidth:Number,popupScale:Number,scale:Number,value:String,tabIndex:Number,disabled:Boolean,readOnly:Boolean,color:String,backgroundColor:String,elementSize:Function,smooth:Boolean},inject:{kendoLocalizationService:{default:null}},data(){return{isDrawing:!1}},mounted(){this.openCanvas=o.getRef(this,"openCanvas")},render(){const{showClear:e,popupWidth:r,popupHeight:s,dir:l,size:u,value:c,tabIndex:d,disabled:g,readOnly:h,color:p,backgroundColor:m,strokeWidth:C,smooth:k,popupScale:S,scale:b,elementSize:v}=this.$props,t=B.provideLocalizationService(this),a=t.toLanguageString(n.signatureMinimize,n.messages[n.signatureMinimize]),w=t.toLanguageString(n.signatureClear,n.messages[n.signatureClear]),f=!this.$props.hideLine&&i.createVNode(N.SignatureLine,null,null),z=i.createVNode(y.SignatureBottomActions,{showClear:e,size:u,onClear:this.onClear,title:w},null);return i.createVNode(D.Dialog,{ref:o.setRef(this,"dialog"),onOverlayclick:this.onOverlayClick},{default:()=>[i.createVNode("div",{style:{width:r+"px",height:s+"px"},dir:l,class:this.openWrapperClass,onFocus:this.onFocus,onBlur:this.onBlur},[i.createVNode(q.SignatureCanvas,{ref:o.setRef(this,"openCanvas"),value:c,tabIndex:d,disabled:g,readOnly:h,color:p,backgroundColor:m,strokeWidth:C,smooth:k,popupScale:S,scale:b,onChange:this.onValueChange,elementSize:v,onDraw:this.onDraw,onDrawend:this.onDrawEnd},null),i.createVNode("div",{class:"k-signature-actions k-signature-actions-top"},[!this.isDrawing&&i.createVNode(V.Button,{class:"k-signature-action k-signature-minimize k-rotate-180",ref:o.setRef(this,"minimizeButton"),icon:"hyperlink-open",svgIcon:$.hyperlinkOpenIcon,shape:null,fillMode:"flat",size:this.$props.size,onClick:this.onMinimizeClick,"aria-label":a,title:a},null)]),f,z])]})},methods:{onDraw(){this.isDrawing=!0,this.$emit("draw")},onDrawEnd(){this.isDrawing=!1,this.$emit("drawend")},onValueChange(e){this.$emit("change",e)},onClear(){this.$emit("clear")},onMinimizeClick(){this.$emit("close")},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e)},onOverlayClick(e){this.$emit("overlayclick",e)}}});exports.SignatureDialog=O;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),D=require("@progress/kendo-vue-dialogs"),y=require("./SignatureBottomActions.js"),N=require("./SignatureLine.js"),V=require("@progress/kendo-vue-buttons"),B=require("@progress/kendo-vue-intl"),o=require("@progress/kendo-vue-common"),$=require("@progress/kendo-svg-icons"),q=require("./SignatureCanvas.js"),n=require("../messages/main.js"),O=i.defineComponent({name:"KendoSignatureDialog",emits:{change:null,clear:null,close:null,focus:null,blur:null,overlayclick:null,draw:null,drawend:null},props:{openWrapperClass:Object,size:String,dir:String,popupWidth:Number,popupHeight:Number,showClear:Boolean,strokeWidth:Number,popupScale:Number,scale:Number,value:String,tabIndex:Number,disabled:Boolean,readOnly:Boolean,color:String,backgroundColor:String,elementSize:Function,smooth:Boolean},inject:{kendoLocalizationService:{default:null}},data(){return{isDrawing:!1}},mounted(){this.openCanvas=o.getRef(this,"openCanvas")},render(){const{showClear:e,popupWidth:r,popupHeight:s,dir:l,size:u,value:c,tabIndex:d,disabled:g,readOnly:h,color:p,backgroundColor:m,strokeWidth:C,smooth:k,popupScale:S,scale:b,elementSize:v}=this.$props,t=B.provideLocalizationService(this),a=t.toLanguageString(n.signatureMinimize,n.messages[n.signatureMinimize]),w=t.toLanguageString(n.signatureClear,n.messages[n.signatureClear]),f=!this.$props.hideLine&&i.createVNode(N.SignatureLine,null,null),z=i.createVNode(y.SignatureBottomActions,{showClear:e,size:u,onClear:this.onClear,title:w},null);return i.createVNode(D.Dialog,{ref:o.setRef(this,"dialog"),onOverlayclick:this.onOverlayClick},{default:()=>[i.createVNode("div",{style:{width:r+"px",height:s+"px"},dir:l,class:this.openWrapperClass,onFocus:this.onFocus,onBlur:this.onBlur},[i.createVNode(q.SignatureCanvas,{ref:o.setRef(this,"openCanvas"),value:c,tabIndex:d,disabled:g,readOnly:h,color:p,backgroundColor:m,strokeWidth:C,smooth:k,popupScale:S,scale:b,onChange:this.onValueChange,elementSize:v,onDraw:this.onDraw,onDrawend:this.onDrawEnd},null),i.createVNode("div",{class:"k-signature-actions k-signature-actions-top"},[!this.isDrawing&&i.createVNode(V.Button,{class:"k-signature-action k-signature-minimize k-rotate-180",ref:o.setRef(this,"minimizeButton"),icon:"hyperlink-open",svgIcon:$.hyperlinkOpenIcon,fillMode:"flat",size:this.$props.size,onClick:this.onMinimizeClick,"aria-label":a,title:a},null)]),f,z])]})},methods:{onDraw(){this.isDrawing=!0,this.$emit("draw")},onDrawEnd(){this.isDrawing=!1,this.$emit("drawend")},onValueChange(e){this.$emit("change",e)},onClear(){this.$emit("clear")},onMinimizeClick(){this.$emit("close")},onFocus(e){this.$emit("focus",e)},onBlur(e){this.$emit("blur",e)},onOverlayClick(e){this.$emit("overlayclick",e)}}});exports.SignatureDialog=O;
@@ -14,7 +14,7 @@ import { provideLocalizationService as W } from "@progress/kendo-vue-intl";
14
14
  import { setRef as o, getRef as x } from "@progress/kendo-vue-common";
15
15
  import { hyperlinkOpenIcon as I } from "@progress/kendo-svg-icons";
16
16
  import { SignatureCanvas as F } from "./SignatureCanvas.mjs";
17
- import { signatureMinimize as r, messages as l, signatureClear as a } from "../messages/main.mjs";
17
+ import { signatureMinimize as r, messages as a, signatureClear as l } from "../messages/main.mjs";
18
18
  const J = /* @__PURE__ */ $({
19
19
  name: "KendoSignatureDialog",
20
20
  emits: {
@@ -77,7 +77,7 @@ const J = /* @__PURE__ */ $({
77
77
  popupScale: S,
78
78
  scale: v,
79
79
  elementSize: w
80
- } = this.$props, n = W(this), t = n.toLanguageString(r, l[r]), z = n.toLanguageString(a, l[a]), D = !this.$props.hideLine && i(L, null, null), y = i(O, {
80
+ } = this.$props, n = W(this), t = n.toLanguageString(r, a[r]), z = n.toLanguageString(l, a[l]), D = !this.$props.hideLine && i(L, null, null), y = i(O, {
81
81
  showClear: e,
82
82
  size: p,
83
83
  onClear: this.onClear,
@@ -119,7 +119,6 @@ const J = /* @__PURE__ */ $({
119
119
  ref: o(this, "minimizeButton"),
120
120
  icon: "hyperlink-open",
121
121
  svgIcon: I,
122
- shape: null,
123
122
  fillMode: "flat",
124
123
  size: this.$props.size,
125
124
  onClick: this.onMinimizeClick,
package/switch/Switch.js CHANGED
@@ -5,4 +5,4 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),t=require("@progress/kendo-vue-common"),u=require("@progress/kendo-vue-intl"),r=require("../messages/main.js"),o=require("../package-metadata.js"),h=s.defineComponent({name:"KendoSwitch",model:{event:"changemodel"},emits:{change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,blur:e=>!0},props:{name:String,accessKey:String,checked:{type:Boolean,default:void 0},className:String,disabled:{type:Boolean,default:!1},defaultChecked:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:function(e){return[null,"small","medium","large"].includes(e)}},trackRounded:{type:String,default:"full",validator:function(e){return[null,"small","medium","large","full"].includes(e)}},thumbRounded:{type:String,default:"full",validator:function(e){return[null,"small","medium","large","full"].includes(e)}},dir:String,id:String,ariaLabelledBy:String,ariaDescribedBy:String,offLabel:{type:String,default:"OFF"},onLabel:{type:String,default:"ON"},required:{type:Boolean,default:!1},tabIndex:Number,valid:Boolean,validityStyles:{type:Boolean,default:!1},validationMessage:String,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:void 0}},created(){t.validatePackage(o.packageMetadata),this._id=t.guid(),this.defaultValidationMessage=u.provideLocalizationService(this)},data(){return{currentChecked:this.$props.defaultChecked,valueDuringOnChange:void 0,focused:!1,currentDir:void 0}},computed:{computedValue(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.$props.checked!==void 0?this.$props.checked:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.currentChecked},switchClassName(){const e=!this.validityStyles||this.validity().valid,i=this.$props.trackRounded;return{"k-switch":!0,[`k-switch-${t.kendoThemeMaps.sizeMap[this.$props.size]}`]:this.$props.size,[`k-rounded-${t.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-switch-on":this.computedValue,"k-switch-off":!this.computedValue,"k-focus":this.focused,"k-disabled":this.$props.disabled,"k-invalid":!e}},switchTrackClass(){const e=this.$props.trackRounded;return{"k-switch-track":!0,[`k-rounded-${t.kendoThemeMaps.roundedMap[e]||e}`]:e}},switchThumbClass(){const e=this.$props.thumbRounded;return{"k-switch-thumb":!0,[`k-rounded-${t.kendoThemeMaps.roundedMap[e]||e}`]:e}}},mounted(){this._element=t.getRef(this,"element"),this.input=t.getRef(this,"input"),this.currentDir=this.$props.dir!==void 0?this.$props.dir:t.isRtl(this.$el)?"rtl":"ltr",this.setValidity()},updated(){this.setValidity()},render(){const{disabled:e,id:i,offLabel:a,onLabel:d,tabIndex:n,required:l}=this.$props;return s.createVNode("span",{class:this.switchClassName,role:"switch","aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-checked":this.computedValue,"aria-disabled":e||void 0,dir:this.currentDir,onKeydown:this.handleKeyDown,onClick:this.handleClick,onFocusout:this.handleWrapperBlur,onFocusin:this.handleWrapperFocus,tabindex:t.getTabIndex(n,e,void 0),accesskey:this.$props.accessKey},[s.createVNode("span",{class:this.switchTrackClass,ref:t.setRef(this,"element")},[s.createVNode("input",{type:"checkbox",id:i||this._id,checked:this.$props.checked,ref:t.setRef(this,"input"),tabindex:-1,name:this.$props.name,required:l!==void 0?l:!1,"aria-hidden":!0,value:this.computedValue,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:t.noop},null),s.createVNode("span",{class:"k-switch-label-on"},[d]),s.createVNode("span",{class:"k-switch-label-off"},[a])]),s.createVNode("span",{class:"k-switch-thumb-wrap"},[s.createVNode("span",{class:this.switchThumbClass},null)])])},methods:{focus(){this._element&&this._element.focus()},element(){return this._element},validity(){const e=this.$props.validationMessage!==void 0,i=this.$props.valid!==void 0?this.$props.valid:this.$props.required?!!this.computedValue:!0,a=this.$props.valid!==void 0?this.$props.valid:i;return{customError:e,valid:a,valueMissing:this.computedValue===null}},setValidity(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||this.defaultValidationMessage.toLanguageString(r.switchValidation,r.messages[r.switchValidation]))},limit(e,i,a){const d=a.offsetWidth,n=i.offsetWidth;return e<0?0:e>d-n?d-n:e},toggle(e,i){this.currentChecked=e,this.valueDuringOnChange=e,this.$emit("changemodel",e),this.$emit("update:modelValue",e),this.$emit("change",{event:i,component:this,target:{value:e},name:this.$props.name,value:e,validity:this.validity()}),this.valueDuringOnChange=void 0},handleClick(e){this.eventTimeStamp!==e.timeStamp&&(this.eventTimeStamp=e.timeStamp,this.toggle(!this.computedValue,e))},handleKeyDown(e){if(this.$props.disabled)return;const{keyCode:i}=e;(i===t.Keys.space||i===t.Keys.enter)&&this.toggle(!this.computedValue,e)},handleWrapperFocus(e){this.$props.disabled||(this.focused=!0,this.$emit("focus",{event:e}))},handleWrapperBlur(e){this.$props.disabled||(this.focused=!1,this.$emit("blur",{event:e}))}}});exports.Switch=h;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),t=require("@progress/kendo-vue-common"),o=require("@progress/kendo-vue-intl"),r=require("../messages/main.js"),u=require("../package-metadata.js"),h=s.defineComponent({name:"KendoSwitch",model:{event:"changemodel"},emits:{change:e=>!0,changemodel:e=>!0,"update:modelValue":e=>!0,focus:e=>!0,blur:e=>!0},props:{name:String,accessKey:String,checked:{type:Boolean,default:void 0},className:String,disabled:{type:Boolean,default:!1},defaultChecked:{type:Boolean,default:!1},size:{type:String,validator:function(e){return["small","medium","large"].includes(e)}},trackRounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},thumbRounded:{type:String,validator:function(e){return["none","small","medium","large","full"].includes(e)}},dir:String,id:String,ariaLabelledBy:String,ariaDescribedBy:String,offLabel:{type:String,default:"OFF"},onLabel:{type:String,default:"ON"},required:{type:Boolean,default:!1},tabIndex:Number,valid:Boolean,validityStyles:{type:Boolean,default:!1},validationMessage:String,value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:Boolean,default:void 0}},created(){t.validatePackage(u.packageMetadata),this._id=t.guid(),this.defaultValidationMessage=o.provideLocalizationService(this)},data(){return{currentChecked:this.$props.defaultChecked,valueDuringOnChange:void 0,focused:!1,currentDir:void 0}},computed:{computedValue(){return this.valueDuringOnChange!==void 0?this.valueDuringOnChange:this.$props.checked!==void 0?this.$props.checked:this.$props.value!==void 0?this.$props.value:this.$props.modelValue!==void 0?this.$props.modelValue:this.currentChecked},switchClassName(){const e=!this.validityStyles||this.validity().valid,i=this.$props.trackRounded;return{"k-switch":!0,[`k-switch-${t.kendoThemeMaps.sizeMap[this.$props.size]}`]:this.$props.size,[`k-rounded-${t.kendoThemeMaps.roundedMap[i]||i}`]:i,"k-switch-on":this.computedValue,"k-switch-off":!this.computedValue,"k-focus":this.focused,"k-disabled":this.$props.disabled,"k-invalid":!e}},switchTrackClass(){const e=this.$props.trackRounded;return{"k-switch-track":!0,[`k-rounded-${t.kendoThemeMaps.roundedMap[e]||e}`]:e}},switchThumbClass(){const e=this.$props.thumbRounded;return{"k-switch-thumb":!0,[`k-rounded-${t.kendoThemeMaps.roundedMap[e]||e}`]:e}}},mounted(){this._element=t.getRef(this,"element"),this.input=t.getRef(this,"input"),this.currentDir=this.$props.dir!==void 0?this.$props.dir:t.isRtl(this.$el)?"rtl":"ltr",this.setValidity()},updated(){this.setValidity()},render(){const{disabled:e,id:i,offLabel:a,onLabel:n,tabIndex:d,required:l}=this.$props;return s.createVNode("span",{class:this.switchClassName,role:"switch","aria-labelledby":this.$props.ariaLabelledBy,"aria-describedby":this.$props.ariaDescribedBy,"aria-checked":this.computedValue,"aria-disabled":e||void 0,dir:this.currentDir,onKeydown:this.handleKeyDown,onClick:this.handleClick,onFocusout:this.handleWrapperBlur,onFocusin:this.handleWrapperFocus,tabindex:t.getTabIndex(d,e,void 0),accesskey:this.$props.accessKey},[s.createVNode("span",{class:this.switchTrackClass,ref:t.setRef(this,"element")},[s.createVNode("input",{type:"checkbox",id:i||this._id,checked:this.$props.checked,ref:t.setRef(this,"input"),tabindex:-1,name:this.$props.name,required:l!==void 0?l:!1,"aria-hidden":!0,value:this.computedValue,style:{opacity:0,width:1,border:0,zIndex:-1,position:"absolute",left:"50%"},onChange:t.noop},null),s.createVNode("span",{class:"k-switch-label-on"},[n]),s.createVNode("span",{class:"k-switch-label-off"},[a])]),s.createVNode("span",{class:"k-switch-thumb-wrap"},[s.createVNode("span",{class:this.switchThumbClass},null)])])},methods:{focus(){this._element&&this._element.focus()},element(){return this._element},validity(){const e=this.$props.validationMessage!==void 0,i=this.$props.valid!==void 0?this.$props.valid:this.$props.required?!!this.computedValue:!0,a=this.$props.valid!==void 0?this.$props.valid:i;return{customError:e,valid:a,valueMissing:this.computedValue===null}},setValidity(){this.input&&this.input.setCustomValidity&&this.input.setCustomValidity(this.validity().valid?"":this.$props.validationMessage||this.defaultValidationMessage.toLanguageString(r.switchValidation,r.messages[r.switchValidation]))},limit(e,i,a){const n=a.offsetWidth,d=i.offsetWidth;return e<0?0:e>n-d?n-d:e},toggle(e,i){this.currentChecked=e,this.valueDuringOnChange=e,this.$emit("changemodel",e),this.$emit("update:modelValue",e),this.$emit("change",{event:i,component:this,target:{value:e},name:this.$props.name,value:e,validity:this.validity()}),this.valueDuringOnChange=void 0},handleClick(e){this.eventTimeStamp!==e.timeStamp&&(this.eventTimeStamp=e.timeStamp,this.toggle(!this.computedValue,e))},handleKeyDown(e){if(this.$props.disabled)return;const{keyCode:i}=e;(i===t.Keys.space||i===t.Keys.enter)&&this.toggle(!this.computedValue,e)},handleWrapperFocus(e){this.$props.disabled||(this.focused=!0,this.$emit("focus",{event:e}))},handleWrapperBlur(e){this.$props.disabled||(this.focused=!1,this.$emit("blur",{event:e}))}}});exports.Switch=h;