@progress/kendo-vue-inputs 10.1.1-develop.1 → 10.2.0-develop.1
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/dist/cdn/js/kendo-vue-inputs.js +1 -1
- package/numerictextbox/NumericTextBox.d.ts +4 -0
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +161 -86
- package/numerictextbox/utils/main.d.ts +13 -0
- package/numerictextbox/utils/main.js +1 -1
- package/numerictextbox/utils/main.mjs +154 -131
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
|
@@ -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 A=11111111111111e-7,Le=.31111111111111117,Ie=1,te=1,re=0,V=/\d/,se=15,Ne=(n,t)=>n!==void 0?n:t,m=(n,t,r)=>n==null?"":typeof n=="string"?n:r.formatNumber(n,t),Ee=/[eE]([-+]?)(\d+)/,Pe=20,Ce=n=>typeof n=="string"?/^c\d*$/i.test(n):!!(n&&n.style==="currency"),Re=(n,t)=>{if(n==null||Number.isNaN(n))return"";let r=Object.is(n,-0)?"-0":String(n);const e=Ee.exec(r);if(e){const u=parseInt(e[2],10)*(e[1]==="-"?-1:1),o=r.split(/[eE]/)[0].replace(/[-.]/g,"").length,a=Math.abs(u)+(u<0?o-1:0);r=n.toFixed(Math.min(a,Pe))}return r.replace(".",t)},Me=n=>{const t=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`^-?(?:(?:\\d+(${t}\\d*)?)|(?:${t}\\d*))?$`)},U=n=>(String(n).split(".")[1]||"").length,oe=(n,t)=>Math.max(U(n),U(t)),ue=n=>Math.min(n,se),Z=(n,t)=>{const r=ue(t);return parseFloat(n.toFixed(r))},Oe=(n,t,r,e,u,o,a)=>{const s=oe(n||0,r||0),c=v(Z((n||0)+(r||0),s),e,u);t.eventValue=c,t.currentLooseValue=m(c,o,a),t.selectionStart=t.selectionEnd=N(t.currentLooseValue,V)},ye=(n,t,r,e,u,o,a)=>{const s=oe(n||0,r||0),c=v(Z((n||0)-(r||0),s),e,u);t.eventValue=c,t.currentLooseValue=m(c,o,a),t.selectionStart=t.selectionEnd=N(t.currentLooseValue,V)},v=(n,t,r)=>n==null?n:!(n>1||n<1||n===1)||r!==void 0&&t!==void 0&&r<t?null:(r!==void 0&&n>r&&(n=r),t!==void 0&&n<t&&(n=t),n),ie=(n,t)=>{const r=t.findIndex(([u,o])=>!!o&&n.indexOf(o)===n.length-o.length);if(r===-1)return-1;const e=t[r][1];return n.length-e.length},ce=(n,t)=>{const r=t.findIndex(([u,o])=>!!u&&n.indexOf(u)===0);return r===-1?-1:t[r][0].length},le=(n,t,r)=>{const e=ie(n,t);if(e!==-1&&r.selectionStart>e){r.selectionStart=r.selectionEnd=e;return}r.selectionStart>n.length&&(r.selectionStart=r.selectionEnd=n.length);const u=ce(n,t);u!==-1&&r.selectionStart<u&&(r.selectionStart=r.selectionEnd=u),r.selectionStart===-1&&(r.selectionStart=r.selectionEnd=0)},x=(n,t,r,e)=>{n.selectionStart=n.selectionEnd=t,le(r,e,n)},D=(n,t,r,e)=>{n.eventValue=e.parseNumber(n.prevLooseValue,t),n.currentLooseValue=n.prevLooseValue,n.valueIsCorrected=!0,x(n,n.selectionStart,n.currentLooseValue,r)},G=(n,t,r)=>t.split(n).length!==r.split(n).length&&t.length===r.length+n.length,ae=(n,t)=>{const r=String(n.currentLooseValue),e=String(n.prevLooseValue);return G(t.minusSign,r,e)||G("-",r,e)||G("−",r,e)},de=(n,t)=>{const r=String(n.currentLooseValue),e=String(n.prevLooseValue);return r.indexOf(t.minusSign)===-1&&e.indexOf(t.minusSign)!==-1},ge=(n,t)=>String(n.currentLooseValue).split(t.decimal).length>2,fe=(n,t)=>{const r=t.formatNumber(A,n),e=t.formatNumber(-A,n),u=t.formatNumber(re,n),o=t.formatNumber(te,n),a=M(r),s=M(e),c=M(u),l=M(o),E=O(r),P=O(e),h=O(u),L=O(o);return{positiveInfo:[a,E],negativeInfo:[s,P],zeroInfo:[c,h],oneInfo:[l,L]}},me=(n,t)=>{const r=t.formatNumber(A,n),e=t.formatNumber(-A,n),u=t.formatNumber(re,n),o=t.formatNumber(te,n),a=t.numberSymbols(),s=new RegExp(`[\\d\\${a.decimal}${a.group}]`,"g");return[r,e,u,o].map(l=>l.replace(s,"")).join("").split("").filter((l,E,P)=>P.indexOf(l)===E).join("")},F=(n,t)=>{const r=n.indexOf(t.decimal);return r>-1?r:N(n,V)},S=n=>n.split("").reverse().join(""),N=(n,t)=>n.length-S(n).search(t),M=n=>n.split(n[n.search(V)])[0],O=n=>{const t=S(n);return S(t.split(t[t.search(V)])[0])},$=(n,t)=>n.search(t),X=(n,t)=>{const r=n.indexOf(t);return r>-1?n.length-r-1:0},z=(n,t,r,e,u)=>{const o=n.replace(u,"")[0]==="0",a=t.replace(u,"")[0]==="0";if(o&&!a)return r-1;if(a&&e)return r+1;let s=0;for(let l=0;l<r;l++)V.test(n.charAt(l))&&s++;let c=0;for(;s>0&&t.length>c;)V.test(t.charAt(c))&&s--,c++;return c},De=(n,t,r)=>{const e={...n},{prevLooseValue:u}=e,o=r.numberSymbols(),a=me(t,r),s=String(e.currentLooseValue),c=String(u),l=new RegExp(`[^\\d\\${o.decimal}]`,"g"),E=new RegExp(`[^\\d\\${o.decimal}\\${o.group}]`,"g"),P=new RegExp(`[\\d\\${o.decimal}\\${o.group}]`),h=s.replace(l,""),L=$(s,V),C=L===-1?-1:N(s,V),_=s.indexOf(o.decimal),W=(s.substring(0,L)+s.substring(L,C).replace(E,"")+s.substring(C,s.length)).split("").filter(d=>a.indexOf(d)!==-1||d.search(P)!==-1).join(""),k=r.formatNumber(Le,t).replace(l,""),q=k.indexOf(o.decimal),I=q>-1?k.length-q-1:0,H=r.formatNumber(Ie,t).replace(l,""),J=H.indexOf(o.decimal),y=J>-1?H.length-J-1:0,{positiveInfo:Ve,negativeInfo:pe,zeroInfo:xe,oneInfo:be}=fe(t,r),g=[Ve,pe,xe,be],he=g.findIndex(d=>d.findIndex(p=>!!p)!==-1)!==1,R=s.length>0&&s.length<c.length,K=typeof t=="string"&&t[0]==="p"&&s&&s.indexOf(o.percentSign)===-1,Q=!!(e.currentLooseValue&&u)&&(a+o.decimal+o.group).split("").findIndex(d=>s.split("").filter(p=>p===d).length<c.split("").filter(p=>p===d).length&&s.length+1===c.length?!(d===o.decimal&&X(c.replace(l,""),o.decimal)===0):!1)>-1;if(!e.isPaste){if(s==="")return e.eventValue=null,e.currentLooseValue="",e;if(R&&!Q){if(e.eventValue=r.parseNumber(s,t),e.currentLooseValue=s,s.includes(o.group)){const f=m(e.eventValue,t,r),i=_===-1?f:f.split(o.decimal)[0]+s.substring(_);i!==s&&(x(e,z(s,i,e.selectionEnd,R,l),i,g),e.currentLooseValue=i)}return e}if(e.currentLooseValue===o.minusSign&&r.formatNumber(-0,t)!==c)return e.eventValue=-0,e.currentLooseValue=m(e.eventValue,t,r),x(e,F(e.currentLooseValue,o),e.currentLooseValue,g),e;if(e.currentLooseValue===o.decimal){e.eventValue=0;const f=m(e.eventValue,t,r);if(y===0&&I>0){const i=N(f,V);e.currentLooseValue=f.substring(0,i)+o.decimal+f.substring(i)}else e.currentLooseValue=f;return x(e,F(e.currentLooseValue,o)+1,e.currentLooseValue,g),e}if(ae(e,o)){const f=r.parseNumber(u,t);e.eventValue=-(f!==null?f:0),e.currentLooseValue=m(e.eventValue,t,r);const i=$(e.currentLooseValue,V),b=$(c,V);return x(e,e.selectionEnd-1+(i-b),e.currentLooseValue,g),e}if(de(e,o))return e.eventValue=r.parseNumber(e.currentLooseValue,t),x(e,e.selectionStart,e.currentLooseValue,g),e;if(ge(e,o))return D(e,t,g,r),e;if(K)return e.eventValue=r.parseNumber(s,t)/100,e.currentLooseValue=m(e.eventValue,t,r),e;if(String(e.currentLooseValue).replace(/[^\d]/g,"").length>se||h!==s&&s&&he&&g.findIndex(([i,b])=>{const T=s.indexOf(i),j=s.indexOf(b),Y=T===0,w=j===s.length-b.length,ee=T+i.length!==L&&L!==-1&&s[T+i.length]!==o.decimal,ne=j!==C&&C!==-1&&s[j-1]!==o.decimal;return i&&b?ee||ne?!1:Y&&w:i?ee?!1:Y:b?ne?!1:w:!1})===-1)return D(e,t,g,r),e;if(h[h.length-1]===o.decimal&&I>0)return e.eventValue=r.parseNumber(s,t),e.currentLooseValue=W,e;if(Q)return e.eventValue=r.parseNumber(n.prevLooseValue,t),e.currentLooseValue=n.prevLooseValue,e;const p=X(h,o.decimal),B=h[h.length-1]==="0";if(R&&B&&p<y)return e.eventValue=r.parseNumber(e.currentLooseValue,t),e.currentLooseValue=m(e.eventValue,t,r),e;if(p>0){const f=s.substring(0,_);if(B&&(!f||c.indexOf(f)!==0)){e.eventValue=r.parseNumber(e.currentLooseValue,t);const i=m(e.eventValue,t,r);return x(e,z(s,i,e.selectionEnd,R,l),i,g),e.currentLooseValue=i,e}if(p>I){const i=s.indexOf(o.decimal),b=s.substring(0,i)+s.substring(i,i+1+I)+s.substring(C,String(e.currentLooseValue).length);return e.eventValue=r.parseNumber(b,t),e.currentLooseValue=b,x(e,e.selectionStart,b,g),e}if(y!==I&&p<=I&&B)return e.eventValue=r.parseNumber(e.currentLooseValue,t),e.currentLooseValue=W,e;if(p<y)return e.eventValue=r.parseNumber(e.currentLooseValue,t),e.currentLooseValue=m(e.eventValue,t,r),e}}if(e.eventValue=r.parseNumber(e.currentLooseValue,t),K&&(e.eventValue=e.eventValue/100),typeof e.eventValue=="number"){const d=m(e.eventValue,t,r);s.length===1?x(e,F(d,o),d,g):x(e,z(s,d,e.selectionEnd,R,l),d,g),e.currentLooseValue=d}else e.currentLooseValue=m(r.parseNumber(h),t,r);return e};exports.changeBasedSelection=z;exports.decreaseValue=ye;exports.formatInputValue=Re;exports.formatValue=m;exports.fractionLength=U;exports.getDecimalCount=X;exports.getFirstNumberIndex=$;exports.getFormatPrefixSufix=fe;exports.getFormatSymbols=me;exports.getInitialPosition=F;exports.getLastNumberIndex=N;exports.getMaxCursorPosition=ie;exports.getMinCursorPosition=ce;exports.getPrefix=M;exports.getStateOrPropsValue=Ne;exports.getSuffix=O;exports.increaseValue=Oe;exports.isCurrencyFormat=Ce;exports.isDecimalDuplicated=ge;exports.isMinusSymbolAdded=ae;exports.isMinusSymbolRemoved=de;exports.limitPrecision=ue;exports.numericInputRegex=Me;exports.rangeSelection=le;exports.rangeValue=v;exports.reverseString=S;exports.sanitizeNumber=De;exports.setInvalid=D;exports.setSelection=x;exports.toFixedPrecision=Z;
|
|
@@ -5,176 +5,199 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
const y = 11111111111111e-7, de = 0.31111111111111117, ge = 1, ee = 1, ne = 0, V = /\d/, te = 15, Ce = (n, t) => n !== void 0 ? n : t, m = (n, t, r) => n == null ? "" : typeof n == "string" ? n : r.formatNumber(n, t), fe = /[eE]([-+]?)(\d+)/, me = 20, Re = (n) => typeof n == "string" ? /^c\d*$/i.test(n) : !!(n && n.style === "currency"), Pe = (n, t) => {
|
|
9
|
+
if (n == null || Number.isNaN(n))
|
|
10
|
+
return "";
|
|
11
|
+
let r = Object.is(n, -0) ? "-0" : String(n);
|
|
12
|
+
const e = fe.exec(r);
|
|
13
|
+
if (e) {
|
|
14
|
+
const u = parseInt(e[2], 10) * (e[1] === "-" ? -1 : 1), o = r.split(/[eE]/)[0].replace(/[-.]/g, "").length, a = Math.abs(u) + (u < 0 ? o - 1 : 0);
|
|
15
|
+
r = n.toFixed(Math.min(a, me));
|
|
16
|
+
}
|
|
17
|
+
return r.replace(".", t);
|
|
18
|
+
}, Oe = (n) => {
|
|
19
|
+
const t = n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
20
|
+
return new RegExp(`^-?(?:(?:\\d+(${t}\\d*)?)|(?:${t}\\d*))?$`);
|
|
21
|
+
}, v = (n) => (String(n).split(".")[1] || "").length, re = (n, t) => Math.max(v(n), v(t)), Ve = (n) => Math.min(n, te), se = (n, t) => {
|
|
22
|
+
const r = Ve(t);
|
|
23
|
+
return parseFloat(n.toFixed(r));
|
|
24
|
+
}, De = (n, t, r, e, u, o, a) => {
|
|
25
|
+
const s = re(n || 0, r || 0), i = oe(se((n || 0) + (r || 0), s), e, u);
|
|
26
|
+
t.eventValue = i, t.currentLooseValue = m(i, o, a), t.selectionStart = t.selectionEnd = P(t.currentLooseValue, V);
|
|
27
|
+
}, Me = (n, t, r, e, u, o, a) => {
|
|
28
|
+
const s = re(n || 0, r || 0), i = oe(se((n || 0) - (r || 0), s), e, u);
|
|
29
|
+
t.eventValue = i, t.currentLooseValue = m(i, o, a), t.selectionStart = t.selectionEnd = P(t.currentLooseValue, V);
|
|
30
|
+
}, oe = (n, t, r) => n == null ? n : !(n > 1 || n < 1 || n === 1) || r !== void 0 && t !== void 0 && r < t ? null : (r !== void 0 && n > r && (n = r), t !== void 0 && n < t && (n = t), n), pe = (n, t) => {
|
|
31
|
+
const r = t.findIndex(([u, o]) => !!o && n.indexOf(o) === n.length - o.length);
|
|
19
32
|
if (r === -1)
|
|
20
33
|
return -1;
|
|
21
|
-
const e =
|
|
22
|
-
return
|
|
23
|
-
},
|
|
24
|
-
const r =
|
|
25
|
-
return r === -1 ? -1 :
|
|
26
|
-
},
|
|
27
|
-
const e =
|
|
34
|
+
const e = t[r][1];
|
|
35
|
+
return n.length - e.length;
|
|
36
|
+
}, xe = (n, t) => {
|
|
37
|
+
const r = t.findIndex(([u, o]) => !!u && n.indexOf(u) === 0);
|
|
38
|
+
return r === -1 ? -1 : t[r][0].length;
|
|
39
|
+
}, be = (n, t, r) => {
|
|
40
|
+
const e = pe(n, t);
|
|
28
41
|
if (e !== -1 && r.selectionStart > e) {
|
|
29
42
|
r.selectionStart = r.selectionEnd = e;
|
|
30
43
|
return;
|
|
31
44
|
}
|
|
32
|
-
r.selectionStart >
|
|
33
|
-
const u =
|
|
45
|
+
r.selectionStart > n.length && (r.selectionStart = r.selectionEnd = n.length);
|
|
46
|
+
const u = xe(n, t);
|
|
34
47
|
u !== -1 && r.selectionStart < u && (r.selectionStart = r.selectionEnd = u), r.selectionStart === -1 && (r.selectionStart = r.selectionEnd = 0);
|
|
35
|
-
}, b = (
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
}, B = (
|
|
40
|
-
const r = String(
|
|
41
|
-
return B(
|
|
42
|
-
},
|
|
43
|
-
const r = String(
|
|
44
|
-
return r.indexOf(
|
|
45
|
-
},
|
|
46
|
-
const r =
|
|
48
|
+
}, b = (n, t, r, e) => {
|
|
49
|
+
n.selectionStart = n.selectionEnd = t, be(r, e, n);
|
|
50
|
+
}, A = (n, t, r, e) => {
|
|
51
|
+
n.eventValue = e.parseNumber(n.prevLooseValue, t), n.currentLooseValue = n.prevLooseValue, n.valueIsCorrected = !0, b(n, n.selectionStart, n.currentLooseValue, r);
|
|
52
|
+
}, B = (n, t, r) => t.split(n).length !== r.split(n).length && t.length === r.length + n.length, he = (n, t) => {
|
|
53
|
+
const r = String(n.currentLooseValue), e = String(n.prevLooseValue);
|
|
54
|
+
return B(t.minusSign, r, e) || B("-", r, e) || B("−", r, e);
|
|
55
|
+
}, Le = (n, t) => {
|
|
56
|
+
const r = String(n.currentLooseValue), e = String(n.prevLooseValue);
|
|
57
|
+
return r.indexOf(t.minusSign) === -1 && e.indexOf(t.minusSign) !== -1;
|
|
58
|
+
}, Ne = (n, t) => String(n.currentLooseValue).split(t.decimal).length > 2, Ie = (n, t) => {
|
|
59
|
+
const r = t.formatNumber(y, n), e = t.formatNumber(-y, n), u = t.formatNumber(ne, n), o = t.formatNumber(ee, n), a = D(r), s = D(e), i = D(u), l = D(o), I = M(r), E = M(e), h = M(u), L = M(o);
|
|
47
60
|
return {
|
|
48
61
|
positiveInfo: [a, I],
|
|
49
|
-
negativeInfo: [s,
|
|
50
|
-
zeroInfo: [i,
|
|
51
|
-
oneInfo: [l,
|
|
62
|
+
negativeInfo: [s, E],
|
|
63
|
+
zeroInfo: [i, h],
|
|
64
|
+
oneInfo: [l, L]
|
|
52
65
|
};
|
|
53
|
-
},
|
|
54
|
-
const r =
|
|
55
|
-
return [r, e, u, o].map((l) => l.replace(s, "")).join("").split("").filter((l, I,
|
|
56
|
-
},
|
|
57
|
-
const r =
|
|
58
|
-
return r > -1 ? r :
|
|
59
|
-
},
|
|
60
|
-
const
|
|
61
|
-
return
|
|
62
|
-
},
|
|
63
|
-
const r =
|
|
64
|
-
return r > -1 ?
|
|
65
|
-
},
|
|
66
|
-
const o =
|
|
66
|
+
}, Ee = (n, t) => {
|
|
67
|
+
const r = t.formatNumber(y, n), e = t.formatNumber(-y, n), u = t.formatNumber(ne, n), o = t.formatNumber(ee, n), a = t.numberSymbols(), s = new RegExp(`[\\d\\${a.decimal}${a.group}]`, "g");
|
|
68
|
+
return [r, e, u, o].map((l) => l.replace(s, "")).join("").split("").filter((l, I, E) => E.indexOf(l) === I).join("");
|
|
69
|
+
}, T = (n, t) => {
|
|
70
|
+
const r = n.indexOf(t.decimal);
|
|
71
|
+
return r > -1 ? r : P(n, V);
|
|
72
|
+
}, X = (n) => n.split("").reverse().join(""), P = (n, t) => n.length - X(n).search(t), D = (n) => n.split(n[n.search(V)])[0], M = (n) => {
|
|
73
|
+
const t = X(n);
|
|
74
|
+
return X(t.split(t[t.search(V)])[0]);
|
|
75
|
+
}, G = (n, t) => n.search(t), w = (n, t) => {
|
|
76
|
+
const r = n.indexOf(t);
|
|
77
|
+
return r > -1 ? n.length - r - 1 : 0;
|
|
78
|
+
}, U = (n, t, r, e, u) => {
|
|
79
|
+
const o = n.replace(u, "")[0] === "0", a = t.replace(u, "")[0] === "0";
|
|
67
80
|
if (o && !a)
|
|
68
81
|
return r - 1;
|
|
69
82
|
if (a && e)
|
|
70
83
|
return r + 1;
|
|
71
84
|
let s = 0;
|
|
72
85
|
for (let l = 0; l < r; l++)
|
|
73
|
-
|
|
86
|
+
V.test(n.charAt(l)) && s++;
|
|
74
87
|
let i = 0;
|
|
75
|
-
for (; s > 0 &&
|
|
76
|
-
|
|
88
|
+
for (; s > 0 && t.length > i; )
|
|
89
|
+
V.test(t.charAt(i)) && s--, i++;
|
|
77
90
|
return i;
|
|
78
|
-
},
|
|
91
|
+
}, ye = (n, t, r) => {
|
|
79
92
|
const e = {
|
|
80
|
-
...
|
|
93
|
+
...n
|
|
81
94
|
}, {
|
|
82
95
|
prevLooseValue: u
|
|
83
|
-
} = e, o = r.numberSymbols(), a =
|
|
84
|
-
positiveInfo:
|
|
85
|
-
negativeInfo:
|
|
86
|
-
zeroInfo:
|
|
87
|
-
oneInfo:
|
|
88
|
-
} =
|
|
96
|
+
} = e, o = r.numberSymbols(), a = Ee(t, r), s = String(e.currentLooseValue), i = String(u), l = new RegExp(`[^\\d\\${o.decimal}]`, "g"), I = new RegExp(`[^\\d\\${o.decimal}\\${o.group}]`, "g"), E = new RegExp(`[\\d\\${o.decimal}\\${o.group}]`), h = s.replace(l, ""), L = G(s, V), C = L === -1 ? -1 : P(s, V), F = s.indexOf(o.decimal), j = (s.substring(0, L) + s.substring(L, C).replace(I, "") + s.substring(C, s.length)).split("").filter((d) => a.indexOf(d) !== -1 || d.search(E) !== -1).join(""), Z = r.formatNumber(de, t).replace(l, ""), W = Z.indexOf(o.decimal), N = W > -1 ? Z.length - W - 1 : 0, k = r.formatNumber(ge, t).replace(l, ""), q = k.indexOf(o.decimal), O = q > -1 ? k.length - q - 1 : 0, {
|
|
97
|
+
positiveInfo: ue,
|
|
98
|
+
negativeInfo: ce,
|
|
99
|
+
zeroInfo: ie,
|
|
100
|
+
oneInfo: le
|
|
101
|
+
} = Ie(t, r), g = [ue, ce, ie, le], ae = g.findIndex((d) => d.findIndex((p) => !!p) !== -1) !== 1, R = s.length > 0 && s.length < i.length, H = typeof t == "string" && t[0] === "p" && s && s.indexOf(o.percentSign) === -1, J = !!(e.currentLooseValue && u) && (a + o.decimal + o.group).split("").findIndex((d) => s.split("").filter((p) => p === d).length < i.split("").filter((p) => p === d).length && s.length + 1 === i.length ? !(d === o.decimal && w(i.replace(l, ""), o.decimal) === 0) : !1) > -1;
|
|
89
102
|
if (!e.isPaste) {
|
|
90
103
|
if (s === "")
|
|
91
104
|
return e.eventValue = null, e.currentLooseValue = "", e;
|
|
92
|
-
if (
|
|
93
|
-
|
|
105
|
+
if (R && !J) {
|
|
106
|
+
if (e.eventValue = r.parseNumber(s, t), e.currentLooseValue = s, s.includes(o.group)) {
|
|
107
|
+
const f = m(e.eventValue, t, r), c = F === -1 ? f : f.split(o.decimal)[0] + s.substring(F);
|
|
108
|
+
c !== s && (b(e, U(s, c, e.selectionEnd, R, l), c, g), e.currentLooseValue = c);
|
|
109
|
+
}
|
|
110
|
+
return e;
|
|
111
|
+
}
|
|
112
|
+
if (e.currentLooseValue === o.minusSign && r.formatNumber(-0, t) !== i)
|
|
113
|
+
return e.eventValue = -0, e.currentLooseValue = m(e.eventValue, t, r), b(e, T(e.currentLooseValue, o), e.currentLooseValue, g), e;
|
|
94
114
|
if (e.currentLooseValue === o.decimal) {
|
|
95
115
|
e.eventValue = 0;
|
|
96
|
-
const f =
|
|
97
|
-
if (
|
|
98
|
-
const c =
|
|
116
|
+
const f = m(e.eventValue, t, r);
|
|
117
|
+
if (O === 0 && N > 0) {
|
|
118
|
+
const c = P(f, V);
|
|
99
119
|
e.currentLooseValue = f.substring(0, c) + o.decimal + f.substring(c);
|
|
100
120
|
} else
|
|
101
121
|
e.currentLooseValue = f;
|
|
102
|
-
return b(e,
|
|
122
|
+
return b(e, T(e.currentLooseValue, o) + 1, e.currentLooseValue, g), e;
|
|
103
123
|
}
|
|
104
|
-
if (
|
|
105
|
-
const f = r.parseNumber(u,
|
|
106
|
-
e.eventValue = -(f !== null ? f : 0), e.currentLooseValue =
|
|
107
|
-
const c =
|
|
108
|
-
return b(e, e.selectionEnd - 1 + (c -
|
|
124
|
+
if (he(e, o)) {
|
|
125
|
+
const f = r.parseNumber(u, t);
|
|
126
|
+
e.eventValue = -(f !== null ? f : 0), e.currentLooseValue = m(e.eventValue, t, r);
|
|
127
|
+
const c = G(e.currentLooseValue, V), x = G(i, V);
|
|
128
|
+
return b(e, e.selectionEnd - 1 + (c - x), e.currentLooseValue, g), e;
|
|
109
129
|
}
|
|
110
|
-
if (
|
|
111
|
-
return e.eventValue = r.parseNumber(e.currentLooseValue,
|
|
112
|
-
if (
|
|
113
|
-
return
|
|
114
|
-
if (
|
|
115
|
-
return e.eventValue = r.parseNumber(s,
|
|
116
|
-
if (String(e.currentLooseValue).replace(/[^\d]/g, "").length >
|
|
117
|
-
const
|
|
118
|
-
return c &&
|
|
130
|
+
if (Le(e, o))
|
|
131
|
+
return e.eventValue = r.parseNumber(e.currentLooseValue, t), b(e, e.selectionStart, e.currentLooseValue, g), e;
|
|
132
|
+
if (Ne(e, o))
|
|
133
|
+
return A(e, t, g, r), e;
|
|
134
|
+
if (H)
|
|
135
|
+
return e.eventValue = r.parseNumber(s, t) / 100, e.currentLooseValue = m(e.eventValue, t, r), e;
|
|
136
|
+
if (String(e.currentLooseValue).replace(/[^\d]/g, "").length > te || h !== s && s && ae && g.findIndex(([c, x]) => {
|
|
137
|
+
const _ = s.indexOf(c), z = s.indexOf(x), K = _ === 0, Q = z === s.length - x.length, S = _ + c.length !== L && L !== -1 && s[_ + c.length] !== o.decimal, Y = z !== C && C !== -1 && s[z - 1] !== o.decimal;
|
|
138
|
+
return c && x ? S || Y ? !1 : K && Q : c ? S ? !1 : K : x ? Y ? !1 : Q : !1;
|
|
119
139
|
}) === -1)
|
|
120
|
-
return
|
|
121
|
-
if (
|
|
122
|
-
return e.eventValue = r.parseNumber(s,
|
|
123
|
-
if (
|
|
124
|
-
return e.eventValue = r.parseNumber(
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
127
|
-
return e.eventValue = r.parseNumber(e.currentLooseValue,
|
|
128
|
-
if (
|
|
129
|
-
const f = s.substring(0,
|
|
130
|
-
if (
|
|
131
|
-
e.eventValue = r.parseNumber(e.currentLooseValue,
|
|
132
|
-
const c =
|
|
133
|
-
return b(e,
|
|
140
|
+
return A(e, t, g, r), e;
|
|
141
|
+
if (h[h.length - 1] === o.decimal && N > 0)
|
|
142
|
+
return e.eventValue = r.parseNumber(s, t), e.currentLooseValue = j, e;
|
|
143
|
+
if (J)
|
|
144
|
+
return e.eventValue = r.parseNumber(n.prevLooseValue, t), e.currentLooseValue = n.prevLooseValue, e;
|
|
145
|
+
const p = w(h, o.decimal), $ = h[h.length - 1] === "0";
|
|
146
|
+
if (R && $ && p < O)
|
|
147
|
+
return e.eventValue = r.parseNumber(e.currentLooseValue, t), e.currentLooseValue = m(e.eventValue, t, r), e;
|
|
148
|
+
if (p > 0) {
|
|
149
|
+
const f = s.substring(0, F);
|
|
150
|
+
if ($ && (!f || i.indexOf(f) !== 0)) {
|
|
151
|
+
e.eventValue = r.parseNumber(e.currentLooseValue, t);
|
|
152
|
+
const c = m(e.eventValue, t, r);
|
|
153
|
+
return b(e, U(s, c, e.selectionEnd, R, l), c, g), e.currentLooseValue = c, e;
|
|
134
154
|
}
|
|
135
|
-
if (
|
|
136
|
-
const c = s.indexOf(o.decimal),
|
|
137
|
-
return e.eventValue = r.parseNumber(
|
|
155
|
+
if (p > N) {
|
|
156
|
+
const c = s.indexOf(o.decimal), x = s.substring(0, c) + s.substring(c, c + 1 + N) + s.substring(C, String(e.currentLooseValue).length);
|
|
157
|
+
return e.eventValue = r.parseNumber(x, t), e.currentLooseValue = x, b(e, e.selectionStart, x, g), e;
|
|
138
158
|
}
|
|
139
|
-
if (
|
|
140
|
-
return e.eventValue = r.parseNumber(e.currentLooseValue,
|
|
141
|
-
if (
|
|
142
|
-
return e.eventValue = r.parseNumber(e.currentLooseValue,
|
|
159
|
+
if (O !== N && p <= N && $)
|
|
160
|
+
return e.eventValue = r.parseNumber(e.currentLooseValue, t), e.currentLooseValue = j, e;
|
|
161
|
+
if (p < O)
|
|
162
|
+
return e.eventValue = r.parseNumber(e.currentLooseValue, t), e.currentLooseValue = m(e.eventValue, t, r), e;
|
|
143
163
|
}
|
|
144
164
|
}
|
|
145
|
-
if (e.eventValue = r.parseNumber(e.currentLooseValue,
|
|
146
|
-
const
|
|
147
|
-
s.length === 1 ? b(e,
|
|
165
|
+
if (e.eventValue = r.parseNumber(e.currentLooseValue, t), H && (e.eventValue = e.eventValue / 100), typeof e.eventValue == "number") {
|
|
166
|
+
const d = m(e.eventValue, t, r);
|
|
167
|
+
s.length === 1 ? b(e, T(d, o), d, g) : b(e, U(s, d, e.selectionEnd, R, l), d, g), e.currentLooseValue = d;
|
|
148
168
|
} else
|
|
149
|
-
e.currentLooseValue =
|
|
169
|
+
e.currentLooseValue = m(r.parseNumber(h), t, r);
|
|
150
170
|
return e;
|
|
151
171
|
};
|
|
152
172
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
173
|
+
U as changeBasedSelection,
|
|
174
|
+
Me as decreaseValue,
|
|
175
|
+
Pe as formatInputValue,
|
|
176
|
+
m as formatValue,
|
|
177
|
+
v as fractionLength,
|
|
178
|
+
w as getDecimalCount,
|
|
179
|
+
G as getFirstNumberIndex,
|
|
180
|
+
Ie as getFormatPrefixSufix,
|
|
181
|
+
Ee as getFormatSymbols,
|
|
182
|
+
T as getInitialPosition,
|
|
183
|
+
P as getLastNumberIndex,
|
|
184
|
+
pe as getMaxCursorPosition,
|
|
185
|
+
xe as getMinCursorPosition,
|
|
186
|
+
D as getPrefix,
|
|
187
|
+
Ce as getStateOrPropsValue,
|
|
188
|
+
M as getSuffix,
|
|
189
|
+
De as increaseValue,
|
|
190
|
+
Re as isCurrencyFormat,
|
|
191
|
+
Ne as isDecimalDuplicated,
|
|
192
|
+
he as isMinusSymbolAdded,
|
|
193
|
+
Le as isMinusSymbolRemoved,
|
|
194
|
+
Ve as limitPrecision,
|
|
195
|
+
Oe as numericInputRegex,
|
|
196
|
+
be as rangeSelection,
|
|
197
|
+
oe as rangeValue,
|
|
198
|
+
X as reverseString,
|
|
199
|
+
ye as sanitizeNumber,
|
|
200
|
+
A as setInvalid,
|
|
178
201
|
b as setSelection,
|
|
179
|
-
|
|
202
|
+
se as toFixedPrecision
|
|
180
203
|
};
|
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: 1791972745,version:"10.2.0-develop.1",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: "10.
|
|
13
|
+
publishDate: 1791972745,
|
|
14
|
+
version: "10.2.0-develop.1",
|
|
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": "10.
|
|
3
|
+
"version": "10.2.0-develop.1",
|
|
4
4
|
"description": "TODO",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@progress/kendo-drawing": "^1.21.1",
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-vue-animation": "10.
|
|
30
|
-
"@progress/kendo-vue-buttons": "10.
|
|
31
|
-
"@progress/kendo-vue-common": "10.
|
|
32
|
-
"@progress/kendo-vue-dialogs": "10.
|
|
33
|
-
"@progress/kendo-vue-intl": "10.
|
|
34
|
-
"@progress/kendo-vue-labels": "10.
|
|
35
|
-
"@progress/kendo-vue-popup": "10.
|
|
29
|
+
"@progress/kendo-vue-animation": "10.2.0-develop.1",
|
|
30
|
+
"@progress/kendo-vue-buttons": "10.2.0-develop.1",
|
|
31
|
+
"@progress/kendo-vue-common": "10.2.0-develop.1",
|
|
32
|
+
"@progress/kendo-vue-dialogs": "10.2.0-develop.1",
|
|
33
|
+
"@progress/kendo-vue-intl": "10.2.0-develop.1",
|
|
34
|
+
"@progress/kendo-vue-labels": "10.2.0-develop.1",
|
|
35
|
+
"@progress/kendo-vue-popup": "10.2.0-develop.1",
|
|
36
36
|
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
37
37
|
"vue": "^3.0.2"
|
|
38
38
|
},
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"package": {
|
|
56
56
|
"productName": "Kendo UI for Vue",
|
|
57
57
|
"productCode": "KENDOUIVUE",
|
|
58
|
-
"publishDate":
|
|
58
|
+
"publishDate": 1791972745,
|
|
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
|
},
|