@progress/kendo-vue-inputs 8.4.0-develop.3 → 8.4.0-develop.4
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/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +18 -18
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +12 -12
- package/dist/cdn/js/kendo-vue-inputs.js +1 -1
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +36 -40
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +15 -19
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +15 -10
- package/rating/RatingItem.js +1 -1
- package/rating/RatingItem.mjs +29 -29
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +38 -37
- package/textbox/TextBox.js +1 -1
- package/textbox/TextBox.mjs +20 -24
|
@@ -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
|
|
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;
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as b, h as c, createVNode as
|
|
9
|
-
import { MaskingService as
|
|
8
|
+
import { defineComponent as b, h as c, createVNode as n, mergeProps as C, ref as w } from "vue";
|
|
9
|
+
import { MaskingService as x } from "./masking.service.mjs";
|
|
10
10
|
import { returnFalse as h, defaultRules as f, maskingChanged as P } from "./utils.mjs";
|
|
11
|
-
import { templateDefinition as m, templateRendering as g, getListeners as v, getTemplate as $, Icon as u, setRef as I, getTabIndex as B, kendoThemeMaps as
|
|
11
|
+
import { templateDefinition as m, templateRendering as g, getListeners as v, getTemplate as $, Icon as u, setRef as I, getTabIndex as B, kendoThemeMaps as S, validatePackage as M, guid as O } from "@progress/kendo-vue-common";
|
|
12
12
|
import { packageMetadata as L } from "../package-metadata.mjs";
|
|
13
13
|
import { checkIcon as R, exclamationCircleIcon as F, xIcon as D } from "@progress/kendo-svg-icons";
|
|
14
|
-
const
|
|
14
|
+
const z = /* @__PURE__ */ b({
|
|
15
15
|
model: {
|
|
16
16
|
event: "changemodel"
|
|
17
17
|
},
|
|
@@ -118,11 +118,11 @@ const j = /* @__PURE__ */ b({
|
|
|
118
118
|
};
|
|
119
119
|
},
|
|
120
120
|
created() {
|
|
121
|
-
M(L), this.hasMounted = !1, this.valueDuringOnChange = void 0, this.inputId = `k-${O()}`, this.service = new
|
|
121
|
+
M(L), this.hasMounted = !1, this.valueDuringOnChange = void 0, this.inputId = `k-${O()}`, this.service = new x(), this.isPasted = !1;
|
|
122
122
|
},
|
|
123
123
|
setup() {
|
|
124
124
|
return {
|
|
125
|
-
inputRef:
|
|
125
|
+
inputRef: w(null)
|
|
126
126
|
};
|
|
127
127
|
},
|
|
128
128
|
mounted() {
|
|
@@ -154,8 +154,8 @@ const j = /* @__PURE__ */ b({
|
|
|
154
154
|
updated() {
|
|
155
155
|
if (this.element && this.currentFocused) {
|
|
156
156
|
let [t, i] = this.currentSelection;
|
|
157
|
-
const
|
|
158
|
-
(!
|
|
157
|
+
const s = this.prevSelection, a = this.$props.selection;
|
|
158
|
+
(!s && a || s && a && (s.start !== a.start || s.end !== a.end)) && (t = a.start, i = a.end), t !== null && i !== null && this.element.setSelectionRange(t, i);
|
|
159
159
|
}
|
|
160
160
|
const e = {
|
|
161
161
|
includeLiterals: this.prevIncludeLiterals,
|
|
@@ -187,14 +187,14 @@ const j = /* @__PURE__ */ b({
|
|
|
187
187
|
size: e,
|
|
188
188
|
fillMode: t,
|
|
189
189
|
rounded: i
|
|
190
|
-
} = this.$props,
|
|
190
|
+
} = this.$props, s = !this.$props.validityStyles || this.validity().valid;
|
|
191
191
|
return {
|
|
192
192
|
"k-maskedtextbox": !0,
|
|
193
193
|
"k-input": !0,
|
|
194
|
-
[`k-input-${
|
|
194
|
+
[`k-input-${S.sizeMap[e] || e}`]: e,
|
|
195
195
|
[`k-input-${t}`]: t,
|
|
196
|
-
[`k-rounded-${
|
|
197
|
-
"k-invalid": !
|
|
196
|
+
[`k-rounded-${S.roundedMap[i] || i}`]: i,
|
|
197
|
+
"k-invalid": !s,
|
|
198
198
|
"k-required": this.required,
|
|
199
199
|
"k-disabled": this.$props.disabled,
|
|
200
200
|
"k-loading": this.showLoadingIcon,
|
|
@@ -220,10 +220,10 @@ const j = /* @__PURE__ */ b({
|
|
|
220
220
|
return this.service.rawValue(this.computedValue());
|
|
221
221
|
},
|
|
222
222
|
validity() {
|
|
223
|
-
const e = this.computedValue(), t = this.service.validationValue(e), i = this.$props.validationMessage !== void 0,
|
|
223
|
+
const e = this.computedValue(), t = this.service.validationValue(e), i = this.$props.validationMessage !== void 0, s = this.$props.valid !== void 0 ? this.$props.valid : (!this.$props.required || !!t) && (!this.$props.maskValidation || !this.$props.prompt || e.indexOf(this.$props.prompt) === -1);
|
|
224
224
|
return {
|
|
225
225
|
customError: i,
|
|
226
|
-
valid:
|
|
226
|
+
valid: s,
|
|
227
227
|
valueMissing: !t
|
|
228
228
|
};
|
|
229
229
|
},
|
|
@@ -238,7 +238,7 @@ const j = /* @__PURE__ */ b({
|
|
|
238
238
|
this.triggerOnChange("", e);
|
|
239
239
|
},
|
|
240
240
|
onChangeHandler(e) {
|
|
241
|
-
const t = e.currentTarget, i = this.inputValue = t.value,
|
|
241
|
+
const t = e.currentTarget, i = this.inputValue = t.value, s = this.currentSelection[0] || 0, a = this.currentSelection[1] || 0;
|
|
242
242
|
if (!this.$props.mask) {
|
|
243
243
|
this.isPasted = !1, this.currentSelection = [null, null], this.triggerOnChange(i, e);
|
|
244
244
|
return;
|
|
@@ -248,7 +248,7 @@ const j = /* @__PURE__ */ b({
|
|
|
248
248
|
if (this.isPasted) {
|
|
249
249
|
this.isPasted = !1;
|
|
250
250
|
const r = o.length - a, p = i.length - r;
|
|
251
|
-
l = this.service.maskInRange(i.slice(
|
|
251
|
+
l = this.service.maskInRange(i.slice(s, p), o, s, a);
|
|
252
252
|
} else
|
|
253
253
|
l = this.service.maskInput(i, o, t.selectionStart || 0);
|
|
254
254
|
this.currentSelection = [l.selection, l.selection], this.triggerOnChange(l.value, e), this.inputValue = void 0;
|
|
@@ -298,12 +298,12 @@ const j = /* @__PURE__ */ b({
|
|
|
298
298
|
const e = this.$props.id || this.inputId, {
|
|
299
299
|
iconName: t,
|
|
300
300
|
showValidationIcon: i,
|
|
301
|
-
showLoadingIcon:
|
|
301
|
+
showLoadingIcon: s,
|
|
302
302
|
showClearButton: a,
|
|
303
303
|
inputAttributes: o
|
|
304
304
|
} = this.$props, l = !this.$props.validityStyles || this.validity().valid, r = this.computedValue();
|
|
305
305
|
this.inputValue;
|
|
306
|
-
const p = g.call(this, this.$props.inputPrefix, v.call(this)),
|
|
306
|
+
const p = g.call(this, this.$props.inputPrefix, v.call(this)), k = g.call(this, this.$props.inputSuffix, v.call(this)), V = $.call(this, {
|
|
307
307
|
h: c,
|
|
308
308
|
template: p,
|
|
309
309
|
additionalProps: {
|
|
@@ -312,25 +312,23 @@ const j = /* @__PURE__ */ b({
|
|
|
312
312
|
}
|
|
313
313
|
}), y = $.call(this, {
|
|
314
314
|
h: c,
|
|
315
|
-
template:
|
|
315
|
+
template: k,
|
|
316
316
|
additionalProps: {
|
|
317
317
|
value: r,
|
|
318
318
|
valid: l
|
|
319
319
|
}
|
|
320
|
-
}), d =
|
|
320
|
+
}), d = n("span", {
|
|
321
321
|
dir: this.$props.dir,
|
|
322
322
|
class: this.wrapperSpanClass,
|
|
323
323
|
style: this.$props.label ? void 0 : {
|
|
324
324
|
width: this.$props.width
|
|
325
325
|
}
|
|
326
|
-
}, [t &&
|
|
326
|
+
}, [t && n(u, {
|
|
327
327
|
name: t,
|
|
328
328
|
class: "k-input-icon"
|
|
329
|
-
}, null), this.$props.inputPrefix &&
|
|
330
|
-
class: "k-input-prefix
|
|
331
|
-
}, [V]),
|
|
332
|
-
class: "k-input-separator k-input-separator-vertical"
|
|
333
|
-
}, null), s("input", C({
|
|
329
|
+
}, null), this.$props.inputPrefix && n("span", {
|
|
330
|
+
class: "k-input-prefix"
|
|
331
|
+
}, [V]), n("input", C({
|
|
334
332
|
type: this.$props.type,
|
|
335
333
|
autocomplete: "off",
|
|
336
334
|
autocorrect: "off",
|
|
@@ -341,7 +339,7 @@ const j = /* @__PURE__ */ b({
|
|
|
341
339
|
id: e,
|
|
342
340
|
"aria-labelledby": this.$props.ariaLabelledBy,
|
|
343
341
|
"aria-describedby": this.$props.ariaDescribedBy,
|
|
344
|
-
"aria-disabled": this.$props.disabled
|
|
342
|
+
"aria-disabled": this.$props.disabled,
|
|
345
343
|
name: this.$props.name,
|
|
346
344
|
tabindex: B(this.$props.tabIndex, this.$props.disabled, !0),
|
|
347
345
|
accesskey: this.$props.accessKey,
|
|
@@ -359,39 +357,37 @@ const j = /* @__PURE__ */ b({
|
|
|
359
357
|
onBlur: this.blurHandler,
|
|
360
358
|
onDragstart: h,
|
|
361
359
|
onDrop: h
|
|
362
|
-
}), null), this.$props.inputSuffix &&
|
|
363
|
-
class: "k-input-
|
|
364
|
-
},
|
|
365
|
-
class: "k-input-suffix k-input-suffix-horizontal"
|
|
366
|
-
}, [y]), i && l && s(u, {
|
|
360
|
+
}), null), this.$props.inputSuffix && n("span", {
|
|
361
|
+
class: "k-input-suffix"
|
|
362
|
+
}, [y]), i && l && n(u, {
|
|
367
363
|
name: "check",
|
|
368
364
|
icon: R,
|
|
369
365
|
class: "k-input-validation-icon"
|
|
370
|
-
}, null), i && !l &&
|
|
366
|
+
}, null), i && !l && n(u, {
|
|
371
367
|
name: "exclamation-circle",
|
|
372
368
|
icon: F,
|
|
373
369
|
class: "k-input-validation-icon"
|
|
374
|
-
}, null),
|
|
370
|
+
}, null), s && n(u, {
|
|
375
371
|
name: "loading",
|
|
376
372
|
class: "k-input-loading-icon"
|
|
377
|
-
}, null), a && r &&
|
|
373
|
+
}, null), a && r && n("span", {
|
|
378
374
|
onClick: this.clearClick,
|
|
379
375
|
class: "k-clear-value"
|
|
380
|
-
}, [
|
|
376
|
+
}, [n(u, {
|
|
381
377
|
name: "x",
|
|
382
378
|
icon: D
|
|
383
379
|
}, null)])]);
|
|
384
|
-
return this.$props.label ?
|
|
380
|
+
return this.$props.label ? n("span", {
|
|
385
381
|
class: this.spanClassNames,
|
|
386
382
|
dir: this.$props.dir
|
|
387
|
-
}, [d, this.$props.label ? e ?
|
|
383
|
+
}, [d, this.$props.label ? e ? n("label", {
|
|
388
384
|
for: e,
|
|
389
385
|
class: "k-floating-label"
|
|
390
|
-
}, [this.$props.label]) :
|
|
386
|
+
}, [this.$props.label]) : n("span", {
|
|
391
387
|
class: "k-label"
|
|
392
388
|
}, [this.$props.label]) : null]) : d;
|
|
393
389
|
}
|
|
394
390
|
});
|
|
395
391
|
export {
|
|
396
|
-
|
|
392
|
+
z as MaskedTextBox
|
|
397
393
|
};
|
|
@@ -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"),i=require("@progress/kendo-vue-common"),$=require("@progress/kendo-vue-intl"),V=require("@progress/kendo-vue-buttons"),r=require("../messages/main.js"),a=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(){i.validatePackage(S.packageMetadata),this._textBeforeInput="",this._inputId=i.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=i.getRef(this,"input"),this._elementWrapper=this.elementWrapperRef,this.$data.hasMounted=!0,this._input&&(this._textBeforeInput=this._input.value),this.setValidity()},updated(){!(i.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 a.formatValue(this.$data.focused?this.$data.currentLooseValue:a.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:p}=this.$props,u=!this.$props.validityStyles||this.validity().valid;return{"k-input":!0,"k-numerictextbox":!0,[`k-input-${i.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${i.kendoThemeMaps.roundedMap[n]||n}`]:n,"k-invalid":!u,"k-required":l,"k-disabled":p,"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:a.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,a.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=a.formatValue(a.rangeValue(e.eventValue,this.$props.min,this.$props.max),this.$props.format,this._intl),l=a.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 p=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,p&&(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();a.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();a.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){!i.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,p,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(),d=o&&t.key===o.minusSign,m=o&&t.key===o.decimal;this.$data.isPaste=!d&&!m;return}switch(t.keyCode){case 38:a.increaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 40:a.decreaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 13:n=a.formatValue(a.rangeValue(c,this.$props.min,this.$props.max),this.$props.format,this._intl),l=a.rangeValue(this.parseNumber(n),this.$props.min,this.$props.max),e.eventValue=l,e.currentLooseValue=a.formatValue(l,this.$props.format,this._intl),e.selectionStart=e.selectionEnd=e.currentLooseValue.length;break;case 110:p=this._input,u=this._intl.numberSymbols(),p&&(e.currentLooseValue=e.currentLooseValue.slice(0,e.selectionStart)+u.decimal+e.currentLooseValue.slice(e.selectionEnd),e.selectionStart=e.selectionEnd=e.selectionStart+1,e=a.sanitizeNumber(e,this.$props.format,this._intl));break;default:return}t.preventDefault(),this.triggerChange(t,e)},spinnersWrapperMouseDown(t){i.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:p}=this.$props,u=this.$props.id||this._inputId,c=i.getDefaultSlots(this),o=$.provideLocalizationService(this),d=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=i.templateRendering.call(this,this.$props.inputPrefix,i.getListeners.call(this)),g=i.templateRendering.call(this,this.$props.inputSuffix,i.getListeners.call(this)),v=i.getTemplate.call(this,{h:s.h,template:m,additionalProps:{value:this.computedValue,valid:d}}),b=i.getTemplate.call(this,{h:s.h,template:g,additionalProps:{value:this.computedValue,valid:d}}),f=s.createVNode("span",{dir:this.$props.dir,class:this.wrapperClassNames,style:this.$attrs.style},[t&&s.createVNode(i.Icon,{name:t,class:"k-input-icon"},null),this.$props.inputPrefix&&s.createVNode("span",{class:"k-input-prefix k-input-prefix-horizontal"},[v]),this.$props.inputPrefix&&s.createVNode("span",{class:"k-input-separator k-input-separator-vertical"},null),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:i.setRef(this,"input")},p),null),this.$props.inputSuffix&&s.createVNode("span",{class:"k-input-separator k-input-separator-vertical"},null),this.$props.inputSuffix&&s.createVNode("span",{class:"k-input-suffix k-input-suffix-horizontal"},[b]),e&&d&&s.createVNode(i.Icon,{name:"check",icon:h.checkIcon,class:"k-input-validation-icon"},null),e&&!d&&s.createVNode(i.Icon,{name:"exclamation-circle",icon:h.exclamationCircleIcon,class:"k-input-validation-icon"},null),n&&s.createVNode(i.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(i.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(V.Button,{type:"button",tabIndex:-1,icon:"chevron-up",svgIcon:h.chevronUpIcon,class:"k-spinner-increase",rounded:null,disabled:this.$props.disabled,"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(V.Button,{type:"button",tabIndex:-1,class:"k-spinner-decrease",icon:"chevron-down",svgIcon:h.chevronDownIcon,rounded:null,disabled:this.$props.disabled,"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"),i=require("@progress/kendo-vue-common"),$=require("@progress/kendo-vue-intl"),g=require("@progress/kendo-vue-buttons"),r=require("../messages/main.js"),a=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(){i.validatePackage(S.packageMetadata),this._textBeforeInput="",this._inputId=i.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=i.getRef(this,"input"),this._elementWrapper=this.elementWrapperRef,this.$data.hasMounted=!0,this._input&&(this._textBeforeInput=this._input.value),this.setValidity()},updated(){!(i.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 a.formatValue(this.$data.focused?this.$data.currentLooseValue:a.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-${i.kendoThemeMaps.sizeMap[t]||t}`]:t,[`k-input-${e}`]:e,[`k-rounded-${i.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:a.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,a.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=a.formatValue(a.rangeValue(e.eventValue,this.$props.min,this.$props.max),this.$props.format,this._intl),l=a.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();a.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();a.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){!i.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:a.increaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 40:a.decreaseValue(c,e,this.$props.step,this.$props.min,this.$props.max,this.$props.format,this._intl);break;case 13:n=a.formatValue(a.rangeValue(c,this.$props.min,this.$props.max),this.$props.format,this._intl),l=a.rangeValue(this.parseNumber(n),this.$props.min,this.$props.max),e.eventValue=l,e.currentLooseValue=a.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=a.sanitizeNumber(e,this.$props.format,this._intl));break;default:return}t.preventDefault(),this.triggerChange(t,e)},spinnersWrapperMouseDown(t){i.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=i.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=i.templateRendering.call(this,this.$props.inputPrefix,i.getListeners.call(this)),V=i.templateRendering.call(this,this.$props.inputSuffix,i.getListeners.call(this)),v=i.getTemplate.call(this,{h:s.h,template:m,additionalProps:{value:this.computedValue,valid:p}}),b=i.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(i.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:i.setRef(this,"input")},d),null),this.$props.inputSuffix&&s.createVNode("span",{class:"k-input-suffix"},[b]),e&&p&&s.createVNode(i.Icon,{name:"check",icon:h.checkIcon,class:"k-input-validation-icon"},null),e&&!p&&s.createVNode(i.Icon,{name:"exclamation-circle",icon:h.exclamationCircleIcon,class:"k-input-validation-icon"},null),n&&s.createVNode(i.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(i.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:"chevron-up",svgIcon:h.chevronUpIcon,class:"k-spinner-increase",rounded:null,disabled:this.$props.disabled,"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:"chevron-down",svgIcon:h.chevronDownIcon,rounded:null,disabled:this.$props.disabled,"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;
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as B, h as V, createVNode as i, mergeProps as M, ref as b, inject as S } from "vue";
|
|
9
|
-
import { getDefaultSlots as w, templateRendering as
|
|
9
|
+
import { getDefaultSlots as w, templateRendering as _, getListeners as k, getTemplate as y, Icon as p, setRef as R, canUseDOM as v, kendoThemeMaps as C, getRef as F, validatePackage as z, guid as T } from "@progress/kendo-vue-common";
|
|
10
10
|
import { provideLocalizationService as U, provideIntlService as W } from "@progress/kendo-vue-intl";
|
|
11
|
-
import { Button as
|
|
11
|
+
import { Button as I } from "@progress/kendo-vue-buttons";
|
|
12
12
|
import { numericIncreaseValue as d, messages as h, numericDecreaseValue as c } from "../messages/main.mjs";
|
|
13
|
-
import { sanitizeNumber as
|
|
13
|
+
import { sanitizeNumber as x, formatValue as m, rangeValue as f, decreaseValue as L, increaseValue as O, getStateOrPropsValue as D } from "./utils/main.mjs";
|
|
14
14
|
import { packageMetadata as A } from "../package-metadata.mjs";
|
|
15
15
|
import { checkIcon as j, exclamationCircleIcon as q, xIcon as K, chevronUpIcon as H, chevronDownIcon as Y } from "@progress/kendo-svg-icons";
|
|
16
16
|
const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
@@ -121,10 +121,10 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
121
121
|
};
|
|
122
122
|
},
|
|
123
123
|
created() {
|
|
124
|
-
|
|
124
|
+
z(A), this._textBeforeInput = "", this._inputId = T(), this.$data.currentLooseValue = null, this.$data.valueDuringOnChange = void 0, this._intl = W(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;
|
|
125
125
|
},
|
|
126
126
|
mounted() {
|
|
127
|
-
this._input =
|
|
127
|
+
this._input = F(this, "input"), this._elementWrapper = this.elementWrapperRef, this.$data.hasMounted = !0, this._input && (this._textBeforeInput = this._input.value), this.setValidity();
|
|
128
128
|
},
|
|
129
129
|
updated() {
|
|
130
130
|
!(v && 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();
|
|
@@ -237,7 +237,7 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
237
237
|
},
|
|
238
238
|
elementChange(t) {
|
|
239
239
|
const e = this.getCurrentState();
|
|
240
|
-
this._isPaste = !1, this.triggerChange(t,
|
|
240
|
+
this._isPaste = !1, this.triggerChange(t, x(e, this.$props.format, this._intl));
|
|
241
241
|
},
|
|
242
242
|
triggerChange(t, e) {
|
|
243
243
|
if (this.$props.disabled)
|
|
@@ -295,7 +295,7 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
295
295
|
s = m(f(o, this.$props.min, this.$props.max), this.$props.format, this._intl), a = f(this.parseNumber(s), this.$props.min, this.$props.max), e.eventValue = a, e.currentLooseValue = m(a, this.$props.format, this._intl), e.selectionStart = e.selectionEnd = e.currentLooseValue.length;
|
|
296
296
|
break;
|
|
297
297
|
case 110:
|
|
298
|
-
r = this._input, n = this._intl.numberSymbols(), r && (e.currentLooseValue = e.currentLooseValue.slice(0, e.selectionStart) + n.decimal + e.currentLooseValue.slice(e.selectionEnd), e.selectionStart = e.selectionEnd = e.selectionStart + 1, e =
|
|
298
|
+
r = this._input, n = this._intl.numberSymbols(), r && (e.currentLooseValue = e.currentLooseValue.slice(0, e.selectionStart) + n.decimal + e.currentLooseValue.slice(e.selectionEnd), e.selectionStart = e.selectionEnd = e.selectionStart + 1, e = x(e, this.$props.format, this._intl));
|
|
299
299
|
break;
|
|
300
300
|
default:
|
|
301
301
|
return;
|
|
@@ -324,14 +324,14 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
324
324
|
inputAttributes: r
|
|
325
325
|
} = this.$props, n = this.$props.id || this._inputId, o = w(this), l = U(this), u = this.validity().valid;
|
|
326
326
|
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;
|
|
327
|
-
const $ =
|
|
327
|
+
const $ = _.call(this, this.$props.inputPrefix, k.call(this)), N = _.call(this, this.$props.inputSuffix, k.call(this)), E = y.call(this, {
|
|
328
328
|
h: V,
|
|
329
329
|
template: $,
|
|
330
330
|
additionalProps: {
|
|
331
331
|
value: this.computedValue,
|
|
332
332
|
valid: u
|
|
333
333
|
}
|
|
334
|
-
}),
|
|
334
|
+
}), P = y.call(this, {
|
|
335
335
|
h: V,
|
|
336
336
|
template: N,
|
|
337
337
|
additionalProps: {
|
|
@@ -346,10 +346,8 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
346
346
|
name: t,
|
|
347
347
|
class: "k-input-icon"
|
|
348
348
|
}, null), this.$props.inputPrefix && i("span", {
|
|
349
|
-
class: "k-input-prefix
|
|
350
|
-
}, [
|
|
351
|
-
class: "k-input-separator k-input-separator-vertical"
|
|
352
|
-
}, null), i("input", M({
|
|
349
|
+
class: "k-input-prefix"
|
|
350
|
+
}, [E]), i("input", M({
|
|
353
351
|
tabindex: this.$props.tabIndex,
|
|
354
352
|
accesskey: this.$props.accessKey,
|
|
355
353
|
disabled: this.$props.disabled,
|
|
@@ -376,10 +374,8 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
376
374
|
onPaste: this.onPasteHandler,
|
|
377
375
|
ref: R(this, "input")
|
|
378
376
|
}, r), null), this.$props.inputSuffix && i("span", {
|
|
379
|
-
class: "k-input-
|
|
380
|
-
},
|
|
381
|
-
class: "k-input-suffix k-input-suffix-horizontal"
|
|
382
|
-
}, [E]), e && u && i(p, {
|
|
377
|
+
class: "k-input-suffix"
|
|
378
|
+
}, [P]), e && u && i(p, {
|
|
383
379
|
name: "check",
|
|
384
380
|
icon: j,
|
|
385
381
|
class: "k-input-validation-icon"
|
|
@@ -399,7 +395,7 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
399
395
|
}, null)]), o, this.$props.spinners && i("span", {
|
|
400
396
|
class: "k-input-spinner k-spin-button",
|
|
401
397
|
onMousedown: this.spinnersWrapperMouseDown
|
|
402
|
-
}, [i(
|
|
398
|
+
}, [i(I, {
|
|
403
399
|
type: "button",
|
|
404
400
|
tabIndex: -1,
|
|
405
401
|
icon: "chevron-up",
|
|
@@ -410,7 +406,7 @@ const G = "Please enter a valid value!", ae = /* @__PURE__ */ B({
|
|
|
410
406
|
"aria-label": l.toLanguageString(d, h[d]),
|
|
411
407
|
title: l.toLanguageString(d, h[d]),
|
|
412
408
|
onClick: this.increase
|
|
413
|
-
}, null), i(
|
|
409
|
+
}, null), i(I, {
|
|
414
410
|
type: "button",
|
|
415
411
|
tabIndex: -1,
|
|
416
412
|
class: "k-spinner-decrease",
|
package/package-metadata.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 e={name:"@progress/kendo-vue-inputs",productName:"Kendo UI for Vue",productCode:"KENDOUIVUE",productCodes:["KENDOUIVUE"],publishDate:
|
|
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: 1779123050,version:"8.4.0-develop.4",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;
|
package/package-metadata.mjs
CHANGED
|
@@ -10,8 +10,8 @@ const e = {
|
|
|
10
10
|
productName: "Kendo UI for Vue",
|
|
11
11
|
productCode: "KENDOUIVUE",
|
|
12
12
|
productCodes: ["KENDOUIVUE"],
|
|
13
|
-
publishDate:
|
|
14
|
-
version: "8.4.0-develop.
|
|
13
|
+
publishDate: 1779123050,
|
|
14
|
+
version: "8.4.0-develop.4",
|
|
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": "8.4.0-develop.
|
|
3
|
+
"version": "8.4.0-develop.4",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@progress/kendo-drawing": "^1.21.1",
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-vue-animation": "8.4.0-develop.
|
|
30
|
-
"@progress/kendo-vue-buttons": "8.4.0-develop.
|
|
31
|
-
"@progress/kendo-vue-common": "8.4.0-develop.
|
|
32
|
-
"@progress/kendo-vue-dialogs": "8.4.0-develop.
|
|
33
|
-
"@progress/kendo-vue-intl": "8.4.0-develop.
|
|
34
|
-
"@progress/kendo-vue-labels": "8.4.0-develop.
|
|
35
|
-
"@progress/kendo-vue-popup": "8.4.0-develop.
|
|
36
|
-
"@progress/kendo-svg-icons": "^4.
|
|
29
|
+
"@progress/kendo-vue-animation": "8.4.0-develop.4",
|
|
30
|
+
"@progress/kendo-vue-buttons": "8.4.0-develop.4",
|
|
31
|
+
"@progress/kendo-vue-common": "8.4.0-develop.4",
|
|
32
|
+
"@progress/kendo-vue-dialogs": "8.4.0-develop.4",
|
|
33
|
+
"@progress/kendo-vue-intl": "8.4.0-develop.4",
|
|
34
|
+
"@progress/kendo-vue-labels": "8.4.0-develop.4",
|
|
35
|
+
"@progress/kendo-vue-popup": "8.4.0-develop.4",
|
|
36
|
+
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
37
37
|
"vue": "^3.0.2"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"package": {
|
|
56
56
|
"productName": "Kendo UI for Vue",
|
|
57
57
|
"productCode": "KENDOUIVUE",
|
|
58
|
-
"publishDate":
|
|
58
|
+
"publishDate": 1779123050,
|
|
59
59
|
"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"
|
|
60
60
|
}
|
|
61
61
|
},
|
|
@@ -65,5 +65,10 @@
|
|
|
65
65
|
"repository": {
|
|
66
66
|
"type": "git",
|
|
67
67
|
"url": "git+https://github.com/telerik/kendo-vue.git"
|
|
68
|
+
},
|
|
69
|
+
"peerDependenciesMeta": {
|
|
70
|
+
"@progress/kendo-svg-icons": {
|
|
71
|
+
"optional": true
|
|
72
|
+
}
|
|
68
73
|
}
|
|
69
74
|
}
|
package/rating/RatingItem.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 t=require("vue"),o=require("@progress/kendo-vue-common"),u=require("@progress/kendo-svg-icons"),I=t.defineComponent({name:"KendoVueRatingItem",emits:{click:e=>!0,keydown:null,focus:null,blur:null,mouseenter:e=>!0,mouseleave:e=>!0,mousemove:e=>!0},props:{id:String,tabIndex:Number,half:Boolean,title:String,icon:Object,selected:Boolean,hovered:Boolean,onClick:Function,onKeyDown:Function,onFocus:Function,onBlur:Function,onMouseEnter:Function,svgIconOutline:Object,svgIcon:Object,haveSelectedValue:Boolean,item:String,itemTemplate:Object,dir:{type:String,default:"ltr",validator:function(e){return[null,"ltr","rtl"].includes(e)}},value:{type:Number,required:!0}},setup(){return{inputRef:t.ref(null)}},computed:{wrapperClass(){return o.classNames(`k-rating-item${this.$props.dir==="rtl"?" k-rtl":""}${this.$props.haveSelectedValue||this.$props.selected?" k-selected":""}${this.$props.hovered?" k-hover":""}`)}},render(){const{id:e,dir:r,half:
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("@progress/kendo-vue-common"),u=require("@progress/kendo-svg-icons"),I=t.defineComponent({name:"KendoVueRatingItem",emits:{click:e=>!0,keydown:null,focus:null,blur:null,mouseenter:e=>!0,mouseleave:e=>!0,mousemove:e=>!0},props:{id:String,tabIndex:Number,half:Boolean,title:String,icon:Object,selected:Boolean,hovered:Boolean,onClick:Function,onKeyDown:Function,onFocus:Function,onBlur:Function,onMouseEnter:Function,svgIconOutline:Object,svgIcon:Object,haveSelectedValue:Boolean,item:String,itemTemplate:Object,dir:{type:String,default:"ltr",validator:function(e){return[null,"ltr","rtl"].includes(e)}},value:{type:Number,required:!0}},setup(){return{inputRef:t.ref(null)}},computed:{wrapperClass(){return o.classNames(`k-rating-item${this.$props.dir==="rtl"?" k-rtl":""}${this.$props.haveSelectedValue||this.$props.selected?" k-selected":""}${this.$props.hovered?" k-hover":""}`)}},render(){const{id:e,dir:r,half:i,tabIndex:h,title:d,icon:n,svgIcon:l,svgIconOutline:a,hovered:s,selected:c,haveSelectedValue:m,item:p,itemTemplate:v}=this.$props,g=o.getTemplate.call(this,{h:t.h,template:v,additionalProps:{dir:r,half:i,title:d,icon:n,svgIcon:l,svgIconOutline:a,hovered:s,selected:c,haveSelectedValue:m},additionalListeners:{onclick:this.handleClick,onkeydown:this.handleKeyDown,onfocus:this.handleFocus,onblur:this.handleBlur,onmouseenter:this.handleMouseEnter,onmouseleave:this.handleMouseLeave,onmousemove:this.handleMouseMove}});return t.createVNode("span",{id:e,dir:r,"data-half":i,tabindex:h,title:d,class:this.wrapperClass,onClick:this.handleClick,onKeydown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave,onMousemove:this.handleMouseMove},[p?g:[i&&t.createVNode("span",{class:"k-rating-precision-complement"},[!(n||a)&&t.createVNode(o.Icon,{name:"star",icon:u.starIcon,style:r==="rtl"?{clipPath:"inset(0 50% 0 0)"}:{clipPath:"inset(0 0 0 50%)"},size:"xlarge"},null),(n||a)&&t.createVNode(o.Icon,{name:o.getIconName(`${n}-outline`),icon:a,size:"xlarge"},null)]),i&&t.createVNode("span",{class:"k-rating-precision-part"},[!(n||l)&&t.createVNode(o.Icon,{name:"star",icon:u.starIcon,style:r==="rtl"?{clipPath:"inset(0 0 0 50%)"}:{clipPath:"inset(0 50% 0 0)"},size:"xlarge"},null),(n||l)&&t.createVNode(o.Icon,{name:n?o.getIconName(n):void 0,icon:l,size:"xlarge"},null)]),i&&t.createVNode("span",{style:{width:"24px",height:"24px",display:"block"}},null),!i&&(!(n||l)&&(s||c&&!s)&&t.createVNode(o.Icon,{name:"star",icon:u.starIcon,size:"xlarge"},null)||!(n||l)&&!s&&!c&&t.createVNode(o.Icon,{name:"star",icon:u.starIcon,size:"xlarge"},null)||(n||l)&&(s||c&&!s)&&t.createVNode(o.Icon,{name:n,icon:l,size:"xlarge"},null)||(n||l)&&!s&&t.createVNode(o.Icon,{name:o.getIconName(`${n}-outline`),icon:a,size:"xlarge"},null))]])},methods:{handleClick(e){this.$emit("click",{value:this.$props.value,target:this.$el,event:e})},handleMouseLeave(e){this.$emit("mouseleave",{target:this.$el,event:e})},handleMouseMove(e){this.$emit("mousemove",{value:this.$props.value,target:this.$el,event:e})},handleMouseEnter(e){this.$emit("mouseenter",{target:this.$el,event:e})},handleKeyDown(e){this.$emit("keydown",e)},handleFocus(e){this.$emit("focus",e)},handleBlur(e){this.$emit("blur",e)}}});exports.RatingItem=I;
|