@progress/kendo-vue-inputs 6.5.0-develop.5 → 7.0.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/index.d.mts +4 -4
- package/index.d.ts +4 -4
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +72 -69
- package/numerictextbox/utils/main.js +1 -1
- package/numerictextbox/utils/main.mjs +93 -93
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +9 -9
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +54 -51
|
@@ -5,64 +5,64 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
9
|
-
const r =
|
|
8
|
+
const Q = 11111111111111e-7, ae = 0.31111111111111117, de = 1, Y = 1, w = 0, m = /\d/, ee = 15, Ne = (t, n) => t !== void 0 ? t : n, p = (t, n, r) => t === null && t === void 0 ? "" : typeof t == "string" ? t : r.formatNumber(t, n), H = (t) => (String(t).split(".")[1] || "").length, ne = (t, n) => Math.max(H(t), H(n)), ge = (t) => Math.min(t, ee), te = (t, n) => {
|
|
9
|
+
const r = ge(n);
|
|
10
10
|
return parseFloat(t.toFixed(r));
|
|
11
|
-
}, Ne = (t, n, r, e, u, o, a) => {
|
|
12
|
-
const s = ee(t || 0, r || 0), i = te(ne((t || 0) + (r || 0), s), e, u);
|
|
13
|
-
n.eventValue = i, n.currentLooseValue = p(i, o, a), n.selectionStart = n.selectionEnd = D(n.currentLooseValue, m);
|
|
14
11
|
}, Ie = (t, n, r, e, u, o, a) => {
|
|
15
|
-
const s =
|
|
16
|
-
n.eventValue = i, n.currentLooseValue = p(i, o, a), n.selectionStart = n.selectionEnd =
|
|
17
|
-
},
|
|
12
|
+
const s = ne(t || 0, r || 0), i = re(te((t || 0) + (r || 0), s), e, u);
|
|
13
|
+
n.eventValue = i, n.currentLooseValue = p(i, o, a), n.selectionStart = n.selectionEnd = R(n.currentLooseValue, m);
|
|
14
|
+
}, Ce = (t, n, r, e, u, o, a) => {
|
|
15
|
+
const s = ne(t || 0, r || 0), i = re(te((t || 0) - (r || 0), s), e, u);
|
|
16
|
+
n.eventValue = i, n.currentLooseValue = p(i, o, a), n.selectionStart = n.selectionEnd = R(n.currentLooseValue, m);
|
|
17
|
+
}, re = (t, n, r) => t == null ? t : !(t > 1 || t < 1 || t === 1) || r !== void 0 && n !== void 0 && r < n ? null : (r !== void 0 && t > r && (t = r), n !== void 0 && t < n && (t = n), t), fe = (t, n) => {
|
|
18
18
|
const r = n.findIndex(([u, o]) => !!o && t.indexOf(o) === t.length - o.length);
|
|
19
19
|
if (r === -1)
|
|
20
20
|
return -1;
|
|
21
21
|
const e = n[r][1];
|
|
22
22
|
return t.length - e.length;
|
|
23
|
-
},
|
|
23
|
+
}, me = (t, n) => {
|
|
24
24
|
const r = n.findIndex(([u, o]) => !!u && t.indexOf(u) === 0);
|
|
25
25
|
return r === -1 ? -1 : n[r][0].length;
|
|
26
|
-
},
|
|
27
|
-
const e =
|
|
26
|
+
}, Ve = (t, n, r) => {
|
|
27
|
+
const e = fe(t, n);
|
|
28
28
|
if (e !== -1 && r.selectionStart > e) {
|
|
29
29
|
r.selectionStart = r.selectionEnd = e;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
r.selectionStart > t.length && (r.selectionStart = r.selectionEnd = t.length);
|
|
33
|
-
const u =
|
|
33
|
+
const u = me(t, n);
|
|
34
34
|
u !== -1 && r.selectionStart < u && (r.selectionStart = r.selectionEnd = u), r.selectionStart === -1 && (r.selectionStart = r.selectionEnd = 0);
|
|
35
|
-
},
|
|
36
|
-
t.selectionStart = t.selectionEnd = n,
|
|
35
|
+
}, b = (t, n, r, e) => {
|
|
36
|
+
t.selectionStart = t.selectionEnd = n, Ve(r, e, t);
|
|
37
37
|
}, A = (t, n, r, e) => {
|
|
38
|
-
t.eventValue = e.parseNumber(t.prevLooseValue, n), t.currentLooseValue = t.prevLooseValue, t.valueIsCorrected = !0,
|
|
39
|
-
},
|
|
38
|
+
t.eventValue = e.parseNumber(t.prevLooseValue, n), t.currentLooseValue = t.prevLooseValue, t.valueIsCorrected = !0, b(t, t.selectionStart, t.currentLooseValue, r);
|
|
39
|
+
}, _ = (t, n, r) => n.split(t).length !== r.split(t).length && n.length === r.length + t.length, pe = (t, n) => {
|
|
40
40
|
const r = String(t.currentLooseValue), e = String(t.prevLooseValue);
|
|
41
|
-
return
|
|
42
|
-
},
|
|
41
|
+
return _(n.minusSign, r, e) || _("-", r, e) || _("−", r, e);
|
|
42
|
+
}, xe = (t, n) => {
|
|
43
43
|
const r = String(t.currentLooseValue), e = String(t.prevLooseValue);
|
|
44
44
|
return r.indexOf(n.minusSign) === -1 && e.indexOf(n.minusSign) !== -1;
|
|
45
|
-
},
|
|
46
|
-
const r = n.formatNumber(
|
|
45
|
+
}, be = (t, n) => String(t.currentLooseValue).split(n.decimal).length > 2, he = (t, n) => {
|
|
46
|
+
const r = n.formatNumber(Q, t), e = n.formatNumber(-11111111111111e-7, t), u = n.formatNumber(w, t), o = n.formatNumber(Y, t), a = O(r), s = O(e), i = O(u), l = O(o), I = P(r), C = P(e), x = P(u), h = P(o);
|
|
47
47
|
return {
|
|
48
48
|
positiveInfo: [a, I],
|
|
49
|
-
negativeInfo: [s,
|
|
49
|
+
negativeInfo: [s, C],
|
|
50
50
|
zeroInfo: [i, x],
|
|
51
|
-
oneInfo: [l,
|
|
51
|
+
oneInfo: [l, h]
|
|
52
52
|
};
|
|
53
|
-
},
|
|
54
|
-
const r = n.formatNumber(
|
|
55
|
-
return [r, e, u, o].map((l) => l.replace(s, "")).join("").split("").filter((l, I,
|
|
56
|
-
},
|
|
53
|
+
}, Le = (t, n) => {
|
|
54
|
+
const r = n.formatNumber(Q, t), e = n.formatNumber(-11111111111111e-7, t), u = n.formatNumber(w, t), o = n.formatNumber(Y, t), a = n.numberSymbols(), s = new RegExp(`[\\d\\${a.decimal}${a.group}]`, "g");
|
|
55
|
+
return [r, e, u, o].map((l) => l.replace(s, "")).join("").split("").filter((l, I, C) => C.indexOf(l) === I).join("");
|
|
56
|
+
}, B = (t, n) => {
|
|
57
57
|
const r = t.indexOf(n.decimal);
|
|
58
|
-
return r > -1 ? r :
|
|
59
|
-
},
|
|
60
|
-
const n =
|
|
61
|
-
return
|
|
62
|
-
},
|
|
58
|
+
return r > -1 ? r : R(t, m);
|
|
59
|
+
}, T = (t) => t.split("").reverse().join(""), R = (t, n) => t.length - T(t).search(n), O = (t) => t.split(t[t.search(m)])[0], P = (t) => {
|
|
60
|
+
const n = T(t);
|
|
61
|
+
return T(n.split(n[n.search(m)])[0]);
|
|
62
|
+
}, $ = (t, n) => t.search(n), J = (t, n) => {
|
|
63
63
|
const r = t.indexOf(n);
|
|
64
64
|
return r > -1 ? t.length - r - 1 : 0;
|
|
65
|
-
},
|
|
65
|
+
}, K = (t, n, r, e, u) => {
|
|
66
66
|
const o = t.replace(u, "")[0] === "0", a = n.replace(u, "")[0] === "0";
|
|
67
67
|
if (o && !a)
|
|
68
68
|
return r - 1;
|
|
@@ -80,101 +80,101 @@ const K = 11111111111111e-7, le = 0.31111111111111117, ae = 1, Q = 1, Y = 0, m =
|
|
|
80
80
|
...t
|
|
81
81
|
}, {
|
|
82
82
|
prevLooseValue: u
|
|
83
|
-
} = e, o = r.numberSymbols(), a =
|
|
83
|
+
} = e, o = r.numberSymbols(), a = Le(n, r), s = String(e.currentLooseValue), i = String(u), l = new RegExp(`[^\\d\\${o.decimal}]`, "g"), I = new RegExp(`[^\\d\\${o.decimal}\\${o.group}]`, "g"), C = new RegExp(`[\\d\\${o.decimal}\\${o.group}]`), x = s.replace(l, ""), h = $(s, m), E = h === -1 ? -1 : R(s, m), oe = s.indexOf(o.decimal), G = (s.substring(0, h) + s.substring(h, E).replace(I, "") + s.substring(E, s.length)).split("").filter((V) => a.indexOf(V) !== -1 || V.search(C) !== -1).join(""), U = r.formatNumber(ae, n).replace(l, ""), j = U.indexOf(o.decimal), N = j > -1 ? U.length - j - 1 : 0, v = r.formatNumber(de, n).replace(l, ""), X = v.indexOf(o.decimal), D = X > -1 ? v.length - X - 1 : 0, {
|
|
84
84
|
positiveInfo: se,
|
|
85
|
-
negativeInfo:
|
|
86
|
-
zeroInfo:
|
|
87
|
-
oneInfo:
|
|
88
|
-
} =
|
|
85
|
+
negativeInfo: ue,
|
|
86
|
+
zeroInfo: ce,
|
|
87
|
+
oneInfo: ie
|
|
88
|
+
} = he(n, r), g = [se, ue, ce, ie], le = g.findIndex((V) => V.findIndex((L) => !!L) !== -1) !== 1, M = s.length > 0 && s.length < i.length, Z = typeof n == "string" && n[0] === "p" && s && s.indexOf(o.percentSign) === -1;
|
|
89
89
|
if (!e.isPaste) {
|
|
90
90
|
if (s === "")
|
|
91
91
|
return e.eventValue = null, e.currentLooseValue = "", e;
|
|
92
92
|
if (e.currentLooseValue === o.minusSign && r.formatNumber(-0, n) !== i)
|
|
93
|
-
return e.eventValue = -0, e.currentLooseValue = p(e.eventValue, n, r),
|
|
94
|
-
if (Ve(e, o)) {
|
|
95
|
-
const f = r.parseNumber(u, n);
|
|
96
|
-
e.eventValue = -(f !== null ? f : 0), e.currentLooseValue = p(e.eventValue, n, r);
|
|
97
|
-
const c = T(e.currentLooseValue, m), d = T(i, m);
|
|
98
|
-
return L(e, e.selectionEnd - 1 + (c - d), e.currentLooseValue, g), e;
|
|
99
|
-
}
|
|
100
|
-
if (pe(e, o))
|
|
101
|
-
return e.eventValue = r.parseNumber(e.currentLooseValue, n), L(e, e.selectionStart, e.currentLooseValue, g), e;
|
|
93
|
+
return e.eventValue = -0, e.currentLooseValue = p(e.eventValue, n, r), b(e, B(e.currentLooseValue, o), e.currentLooseValue, g), e;
|
|
102
94
|
if (e.currentLooseValue === o.decimal) {
|
|
103
95
|
e.eventValue = 0;
|
|
104
96
|
const f = p(e.eventValue, n, r);
|
|
105
|
-
if (
|
|
106
|
-
const c =
|
|
97
|
+
if (D === 0 && N > 0) {
|
|
98
|
+
const c = R(f, m);
|
|
107
99
|
e.currentLooseValue = f.substring(0, c) + o.decimal + f.substring(c);
|
|
108
100
|
} else
|
|
109
101
|
e.currentLooseValue = f;
|
|
110
|
-
return
|
|
102
|
+
return b(e, B(e.currentLooseValue, o) + 1, e.currentLooseValue, g), e;
|
|
103
|
+
}
|
|
104
|
+
if (pe(e, o)) {
|
|
105
|
+
const f = r.parseNumber(u, n);
|
|
106
|
+
e.eventValue = -(f !== null ? f : 0), e.currentLooseValue = p(e.eventValue, n, r);
|
|
107
|
+
const c = $(e.currentLooseValue, m), d = $(i, m);
|
|
108
|
+
return b(e, e.selectionEnd - 1 + (c - d), e.currentLooseValue, g), e;
|
|
111
109
|
}
|
|
112
110
|
if (xe(e, o))
|
|
111
|
+
return e.eventValue = r.parseNumber(e.currentLooseValue, n), b(e, e.selectionStart, e.currentLooseValue, g), e;
|
|
112
|
+
if (be(e, o))
|
|
113
113
|
return A(e, n, g, r), e;
|
|
114
|
-
if (
|
|
114
|
+
if (Z)
|
|
115
115
|
return e.eventValue = r.parseNumber(s, n) / 100, e.currentLooseValue = p(e.eventValue, n, r), e;
|
|
116
|
-
if (String(e.currentLooseValue).replace(/[^\d]/g, "").length >
|
|
117
|
-
const
|
|
118
|
-
return c && d ?
|
|
116
|
+
if (String(e.currentLooseValue).replace(/[^\d]/g, "").length > ee || x !== s && s && le && g.findIndex(([c, d]) => {
|
|
117
|
+
const F = s.indexOf(c), z = s.indexOf(d), S = F === 0, W = z === s.length - d.length, k = F + c.length !== h && h !== -1 && s[F + c.length] !== o.decimal, q = z !== E && E !== -1 && s[z - 1] !== o.decimal;
|
|
118
|
+
return c && d ? k || q ? !1 : S && W : c ? k ? !1 : S : d ? q ? !1 : W : !1;
|
|
119
119
|
}) === -1)
|
|
120
120
|
return A(e, n, g, r), e;
|
|
121
121
|
if (x[x.length - 1] === o.decimal && N > 0)
|
|
122
|
-
return e.eventValue = r.parseNumber(s, n), e.currentLooseValue =
|
|
123
|
-
if (e.currentLooseValue && u && (a + o.decimal + o.group).split("").findIndex((c) => s.split("").filter((d) => d === c).length < i.split("").filter((d) => d === c).length && s.length + 1 === i.length ? !(c === o.decimal &&
|
|
122
|
+
return e.eventValue = r.parseNumber(s, n), e.currentLooseValue = G, e;
|
|
123
|
+
if (e.currentLooseValue && u && (a + o.decimal + o.group).split("").findIndex((c) => s.split("").filter((d) => d === c).length < i.split("").filter((d) => d === c).length && s.length + 1 === i.length ? !(c === o.decimal && J(i.replace(l, ""), o.decimal) === 0) : !1) > -1)
|
|
124
124
|
return e.eventValue = r.parseNumber(t.prevLooseValue, n), e.currentLooseValue = t.prevLooseValue, e;
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
125
|
+
const L = J(x, o.decimal), y = x[x.length - 1] === "0";
|
|
126
|
+
if (M && y && L < D)
|
|
127
127
|
return e.eventValue = r.parseNumber(e.currentLooseValue, n), e.currentLooseValue = p(e.eventValue, n, r), e;
|
|
128
|
-
if (
|
|
129
|
-
const f = s.substring(0,
|
|
130
|
-
if (
|
|
128
|
+
if (L > 0) {
|
|
129
|
+
const f = s.substring(0, oe);
|
|
130
|
+
if (y && (!f || i.indexOf(f) !== 0)) {
|
|
131
131
|
e.eventValue = r.parseNumber(e.currentLooseValue, n);
|
|
132
132
|
const c = p(e.eventValue, n, r);
|
|
133
|
-
return
|
|
133
|
+
return b(e, K(s, c, e.selectionEnd, M, l), c, g), e.currentLooseValue = c, e;
|
|
134
134
|
}
|
|
135
|
-
if (
|
|
136
|
-
const c = s.indexOf(o.decimal), d = s.substring(0, c) + s.substring(c, c + 1 + N) + s.substring(
|
|
137
|
-
return e.eventValue = r.parseNumber(d, n), e.currentLooseValue = d,
|
|
135
|
+
if (L > N) {
|
|
136
|
+
const c = s.indexOf(o.decimal), d = s.substring(0, c) + s.substring(c, c + 1 + N) + s.substring(E, String(e.currentLooseValue).length);
|
|
137
|
+
return e.eventValue = r.parseNumber(d, n), e.currentLooseValue = d, b(e, e.selectionStart, d, g), e;
|
|
138
138
|
}
|
|
139
|
-
if (
|
|
140
|
-
return e.eventValue = r.parseNumber(e.currentLooseValue, n), e.currentLooseValue =
|
|
141
|
-
if (
|
|
139
|
+
if (D !== N && L <= N && y)
|
|
140
|
+
return e.eventValue = r.parseNumber(e.currentLooseValue, n), e.currentLooseValue = G, e;
|
|
141
|
+
if (L < D)
|
|
142
142
|
return e.eventValue = r.parseNumber(e.currentLooseValue, n), e.currentLooseValue = p(e.eventValue, n, r), e;
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
if (e.eventValue = r.parseNumber(e.currentLooseValue, n),
|
|
145
|
+
if (e.eventValue = r.parseNumber(e.currentLooseValue, n), Z && (e.eventValue = e.eventValue / 100), typeof e.eventValue == "number") {
|
|
146
146
|
const V = p(e.eventValue, n, r);
|
|
147
|
-
s.length === 1 ?
|
|
147
|
+
s.length === 1 ? b(e, B(V, o), V, g) : b(e, K(s, V, e.selectionEnd, M, l), V, g), e.currentLooseValue = V;
|
|
148
148
|
} else
|
|
149
149
|
e.currentLooseValue = p(r.parseNumber(x), n, r);
|
|
150
150
|
return e;
|
|
151
151
|
};
|
|
152
152
|
export {
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
K as changeBasedSelection,
|
|
154
|
+
Ce as decreaseValue,
|
|
155
155
|
p as formatValue,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
156
|
+
H as fractionLength,
|
|
157
|
+
J as getDecimalCount,
|
|
158
|
+
$ as getFirstNumberIndex,
|
|
159
|
+
he as getFormatPrefixSufix,
|
|
160
|
+
Le as getFormatSymbols,
|
|
161
|
+
B as getInitialPosition,
|
|
162
|
+
R as getLastNumberIndex,
|
|
163
|
+
fe as getMaxCursorPosition,
|
|
164
|
+
me as getMinCursorPosition,
|
|
165
|
+
O as getPrefix,
|
|
166
|
+
Ne as getStateOrPropsValue,
|
|
167
|
+
P as getSuffix,
|
|
168
|
+
Ie as increaseValue,
|
|
169
|
+
be as isDecimalDuplicated,
|
|
170
|
+
pe as isMinusSymbolAdded,
|
|
171
|
+
xe as isMinusSymbolRemoved,
|
|
172
|
+
ge as limitPrecision,
|
|
173
|
+
Ve as rangeSelection,
|
|
174
|
+
re as rangeValue,
|
|
175
|
+
T as reverseString,
|
|
176
176
|
Ee as sanitizeNumber,
|
|
177
177
|
A as setInvalid,
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
b as setSelection,
|
|
179
|
+
te as toFixedPrecision
|
|
180
180
|
};
|
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: 1754408058,version:"7.0.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: "
|
|
13
|
+
publishDate: 1754408058,
|
|
14
|
+
version: "7.0.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": "
|
|
3
|
+
"version": "7.0.0-develop.1",
|
|
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.4.0",
|
|
23
|
-
"@progress/kendo-vue-animation": "
|
|
24
|
-
"@progress/kendo-vue-buttons": "
|
|
25
|
-
"@progress/kendo-vue-common": "
|
|
26
|
-
"@progress/kendo-vue-dialogs": "
|
|
27
|
-
"@progress/kendo-vue-intl": "
|
|
28
|
-
"@progress/kendo-vue-labels": "
|
|
29
|
-
"@progress/kendo-vue-popup": "
|
|
23
|
+
"@progress/kendo-vue-animation": "7.0.0-develop.1",
|
|
24
|
+
"@progress/kendo-vue-buttons": "7.0.0-develop.1",
|
|
25
|
+
"@progress/kendo-vue-common": "7.0.0-develop.1",
|
|
26
|
+
"@progress/kendo-vue-dialogs": "7.0.0-develop.1",
|
|
27
|
+
"@progress/kendo-vue-intl": "7.0.0-develop.1",
|
|
28
|
+
"@progress/kendo-vue-labels": "7.0.0-develop.1",
|
|
29
|
+
"@progress/kendo-vue-popup": "7.0.0-develop.1",
|
|
30
30
|
"@progress/kendo-svg-icons": "^4.0.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":
|
|
52
|
+
"publishDate": 1754408058,
|
|
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
|
},
|
package/textarea/TextArea.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"),i=require("@progress/kendo-vue-common"),N=require("../package-metadata.js"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("@progress/kendo-vue-common"),N=require("../package-metadata.js"),d=require("@progress/kendo-svg-icons"),c=require("./interfaces/TextAreaResize.js"),B=t.defineComponent({name:"KendoTextArea",model:{event:"changemodel"},emits:{input:null,change:null,changemodel:null,"update:modelValue":null,focus:null,blur:null},props:{title:String,ariaDescribedBy:String,ariaLabelledBy:String,autoSize:Boolean,modelValue:{type:[String,Array,Number],default:void 0},defaultValue:[String,Number],dir:String,disabled:Boolean,readOnly:Boolean,rows:Number,id:String,name:String,validationMessage:String,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)}},required:Boolean,placeholder:String,tabIndex:Number,valid:{type:Boolean,default:void 0},value:[String,Array,Number],validityStyles:{type:Boolean,default:!0},iconName:String,inputPrefix:[String,Function],inputSuffix:[String,Function],showValidationIcon:Boolean,showLoadingIcon:Boolean,showClearButton:Boolean,inputClass:String,wrapperClass:String,flow:{type:String,default:"horizontal",validator:function(e){return["horizontal","vertical"].includes(e)}},resizable:{type:String,default:"vertical",validator:function(e){return["both","horizontal","vertical","none"].includes(e)}},inputAttributes:Object},created(){i.validatePackage(N.packageMetadata),this.calculatedId=i.guid()},computed:{resizableClass(){const{resizable:e,autoSize:a}=this.$props;return a||e===c.TextAreaResizeEnum.none?"k-resize-none":e===c.TextAreaResizeEnum.vertical?"k-resize-y":e===c.TextAreaResizeEnum.horizontal?"k-resize-x":"k-resize"},rootClassName(){const{size:e,fillMode:a,rounded:l,required:s,showLoadingIcon:n}=this.$props,r=this.validityStyles===!0?!this.isValid:!1;return{"k-input":!0,"k-textarea":!0,[`k-input-${i.kendoThemeMaps.sizeMap[e]||e}`]:e,[`k-input-${a}`]:a,[`k-rounded-${i.kendoThemeMaps.roundedMap[l]||l}`]:l,"k-disabled":this.$props.disabled,"k-invalid":r,"k-required":s,"k-loading":n,[this.resizableClass]:!0,"!k-flex-col":this.flow==="vertical","!k-flex-row":this.flow==="horizontal",[this.wrapperClass]:this.wrapperClass}},inputInnerClass(){return{"k-input-inner":!0,"!k-resize-none":!0,"!k-overflow-auto":!0,"k-flex":!0,[this.inputClass]:this.inputClass}},prefixRenderClass(){return{"k-input-prefix":!0,"!k-align-items-start":this.flow==="horizontal","k-input-prefix-horizontal":this.flow==="vertical","k-input-prefix-vertical":this.flow==="horizontal"}},suffixRenderClass(){return{"k-input-suffix":!0,"!k-align-items-start":this.flow==="horizontal","k-input-suffix-horizontal":this.flow==="vertical","k-input-suffix-vertical":this.flow==="horizontal"}},suffixIconWrapClass(){return{"k-flex-wrap":!0,"!k-align-items-start":!0}},computedValue(){let e;return this.$props.value!==void 0?e=this.$props.value:this.$props.modelValue!==void 0?e=this.$props.modelValue:e=this.currentValue,e},isValid(){return this.valid!==void 0?this.valid:this.required?!!this.computedValue:!0}},data(){return{currentValue:this.$props.defaultValue,textAreaHeight:"auto",currentDir:"ltr"}},watch:{size(){this.textAreaHeight="auto"},computedValue(){this.textAreaHeight="auto"}},mounted(){this.element=this.elementRef;let e;this.$props.dir!==void 0?e=this.$props.dir:e=i.isRtl(this.$el)?"rtl":"ltr",this.currentDir=e,this.setValidity()},updated(){this.element=this.elementRef,this.setValidity()},render(){const{ariaDescribedBy:e,ariaLabelledBy:a,autoSize:l,disabled:s,readOnly:n,required:r,rows:m,id:g,name:x,placeholder:k,tabIndex:V,iconName:o,showValidationIcon:u,showLoadingIcon:h,showClearButton:p,title:v,inputAttributes:b}=this.$props,C={...b,id:g||this.calculatedId,name:x,disabled:s,rows:m,title:v,placeholder:k,readOnly:n,required:r,tabIndex:i.getTabIndex(V,s),"aria-labelledby":a,"aria-describedby":e,"aria-multiline":!0,"aria-disabled":s||void 0,...this.$attrs},S=i.templateRendering.call(this,this.$props.inputPrefix,i.getListeners.call(this)),y=i.templateRendering.call(this,this.$props.inputSuffix,i.getListeners.call(this)),z=i.getTemplate.call(this,{h:t.h,template:S,additionalProps:{value:this.computedValue,valid:this.isValid,className:this.prefixRenderClass}}),I=i.getTemplate.call(this,{h:t.h,template:y,additionalProps:{value:this.computedValue,valid:this.isValid,className:this.suffixRenderClass}}),$=t.h("textarea",{...C,class:this.inputInnerClass,ref:w=>{this.elementRef=w},style:l?{overflow:"hidden",height:this.textAreaHeight}:{},value:this.computedValue,onChange:this.handleChange,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur}),f=[o&&t.createVNode("span",{class:"k-flex-wrap"},[t.createVNode(i.Icon,{name:o,class:"k-input-icon"},null)]),$,u&&this.isValid&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"check",icon:d.checkCircleIcon,class:"k-input-validation-icon"},null)]),u&&!this.isValid&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"exclamation-circle",icon:d.exclamationCircleIcon,class:"k-input-validation-icon"},null)]),h&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode(i.Icon,{name:"loading",class:"k-input-loading-icon"},null)]),p&&this.computedValue&&t.createVNode("span",{class:this.suffixIconWrapClass},[t.createVNode("span",{onClick:this.clearClick,class:"k-clear-value"},[t.createVNode(i.Icon,{name:"x",icon:d.xIcon},null)])])];return t.createVNode("span",{class:this.rootClassName,dir:this.currentDir==="rtl"?this.currentDir:"",style:this.$attrs.style},[this.$props.inputPrefix&&z,o||u||h||p?t.createVNode("span",{class:"k-hstack k-flex"},[f]):f,this.$props.inputSuffix&&I])},methods:{setValidity(){var e,a;(a=(e=this.element)==null?void 0:e.setCustomValidity)==null||a.call(e,this.isValid?"":this.validationMessage||""),this.element&&(this.textAreaHeight=`${this.element.scrollHeight}px`)},clearClick(e){this.emitUpdate(e,"change","")},focus(){this.element&&this.element.focus()},emitUpdate(e,a,l){const s=l;this.$props.disabled||(this.currentValue=s),this.$props.disabled||(this.$emit("changemodel",s),this.$emit("update:modelValue",s),this.$emit(a,{event:e,component:this,name:this.element.name,value:s}))},handleChange(e){this.emitUpdate(e,"change",e.target.value)},handleInput(e){this.emitUpdate(e,"input",e.target.value)},handleFocus(e){this.$props.disabled||this.$emit("focus",{event:e,component:this,name:this.element.name})},handleBlur(e){this.$props.disabled||this.$emit("blur",{event:e,component:this,name:this.element.name})}}});exports.TextArea=B;
|
package/textarea/TextArea.mjs
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { defineComponent as M, h as d, createVNode as t } from "vue";
|
|
9
|
-
import { getTabIndex as P, templateRendering as
|
|
9
|
+
import { getTabIndex as P, templateRendering as m, getListeners as g, getTemplate as x, Icon as s, isRtl as T, kendoThemeMaps as k, validatePackage as q, guid as D } from "@progress/kendo-vue-common";
|
|
10
10
|
import { packageMetadata as H } from "../package-metadata.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { checkCircleIcon as L, exclamationCircleIcon as W, xIcon as F } from "@progress/kendo-svg-icons";
|
|
12
12
|
import { TextAreaResizeEnum as h } from "./interfaces/TextAreaResize.mjs";
|
|
13
|
-
const
|
|
13
|
+
const G = /* @__PURE__ */ M({
|
|
14
14
|
name: "KendoTextArea",
|
|
15
15
|
model: {
|
|
16
16
|
event: "changemodel"
|
|
@@ -104,27 +104,27 @@ const K = /* @__PURE__ */ M({
|
|
|
104
104
|
resizableClass() {
|
|
105
105
|
const {
|
|
106
106
|
resizable: e,
|
|
107
|
-
autoSize:
|
|
107
|
+
autoSize: i
|
|
108
108
|
} = this.$props;
|
|
109
|
-
return
|
|
109
|
+
return i || e === h.none ? "k-resize-none" : e === h.vertical ? "k-resize-y" : e === h.horizontal ? "k-resize-x" : "k-resize";
|
|
110
110
|
},
|
|
111
111
|
rootClassName() {
|
|
112
112
|
const {
|
|
113
113
|
size: e,
|
|
114
|
-
fillMode:
|
|
114
|
+
fillMode: i,
|
|
115
115
|
rounded: l,
|
|
116
|
-
required:
|
|
116
|
+
required: a,
|
|
117
117
|
showLoadingIcon: n
|
|
118
118
|
} = this.$props, r = this.validityStyles === !0 ? !this.isValid : !1;
|
|
119
119
|
return {
|
|
120
120
|
"k-input": !0,
|
|
121
121
|
"k-textarea": !0,
|
|
122
122
|
[`k-input-${k.sizeMap[e] || e}`]: e,
|
|
123
|
-
[`k-input-${
|
|
123
|
+
[`k-input-${i}`]: i,
|
|
124
124
|
[`k-rounded-${k.roundedMap[l] || l}`]: l,
|
|
125
125
|
"k-disabled": this.$props.disabled,
|
|
126
126
|
"k-invalid": r,
|
|
127
|
-
"k-required":
|
|
127
|
+
"k-required": a,
|
|
128
128
|
"k-loading": n,
|
|
129
129
|
[this.resizableClass]: !0,
|
|
130
130
|
"!k-flex-col": this.flow === "vertical",
|
|
@@ -144,17 +144,17 @@ const K = /* @__PURE__ */ M({
|
|
|
144
144
|
prefixRenderClass() {
|
|
145
145
|
return {
|
|
146
146
|
"k-input-prefix": !0,
|
|
147
|
-
"!k-
|
|
148
|
-
"
|
|
149
|
-
"
|
|
147
|
+
"!k-align-items-start": this.flow === "horizontal",
|
|
148
|
+
"k-input-prefix-horizontal": this.flow === "vertical",
|
|
149
|
+
"k-input-prefix-vertical": this.flow === "horizontal"
|
|
150
150
|
};
|
|
151
151
|
},
|
|
152
152
|
suffixRenderClass() {
|
|
153
153
|
return {
|
|
154
154
|
"k-input-suffix": !0,
|
|
155
|
-
"!k-
|
|
156
|
-
"
|
|
157
|
-
"
|
|
155
|
+
"!k-align-items-start": this.flow === "horizontal",
|
|
156
|
+
"k-input-suffix-horizontal": this.flow === "vertical",
|
|
157
|
+
"k-input-suffix-vertical": this.flow === "horizontal"
|
|
158
158
|
};
|
|
159
159
|
},
|
|
160
160
|
suffixIconWrapClass() {
|
|
@@ -164,7 +164,8 @@ const K = /* @__PURE__ */ M({
|
|
|
164
164
|
};
|
|
165
165
|
},
|
|
166
166
|
computedValue() {
|
|
167
|
-
|
|
167
|
+
let e;
|
|
168
|
+
return this.$props.value !== void 0 ? e = this.$props.value : this.$props.modelValue !== void 0 ? e = this.$props.modelValue : e = this.currentValue, e;
|
|
168
169
|
},
|
|
169
170
|
isValid() {
|
|
170
171
|
return this.valid !== void 0 ? this.valid : this.required ? !!this.computedValue : !0;
|
|
@@ -186,7 +187,9 @@ const K = /* @__PURE__ */ M({
|
|
|
186
187
|
}
|
|
187
188
|
},
|
|
188
189
|
mounted() {
|
|
189
|
-
this.element = this.elementRef
|
|
190
|
+
this.element = this.elementRef;
|
|
191
|
+
let e;
|
|
192
|
+
this.$props.dir !== void 0 ? e = this.$props.dir : e = T(this.$el) ? "rtl" : "ltr", this.currentDir = e, this.setValidity();
|
|
190
193
|
},
|
|
191
194
|
updated() {
|
|
192
195
|
this.element = this.elementRef, this.setValidity();
|
|
@@ -194,13 +197,13 @@ const K = /* @__PURE__ */ M({
|
|
|
194
197
|
render() {
|
|
195
198
|
const {
|
|
196
199
|
ariaDescribedBy: e,
|
|
197
|
-
ariaLabelledBy:
|
|
200
|
+
ariaLabelledBy: i,
|
|
198
201
|
autoSize: l,
|
|
199
|
-
disabled:
|
|
202
|
+
disabled: a,
|
|
200
203
|
readOnly: n,
|
|
201
204
|
required: r,
|
|
202
|
-
rows:
|
|
203
|
-
id:
|
|
205
|
+
rows: v,
|
|
206
|
+
id: b,
|
|
204
207
|
name: C,
|
|
205
208
|
placeholder: V,
|
|
206
209
|
tabIndex: y,
|
|
@@ -208,40 +211,42 @@ const K = /* @__PURE__ */ M({
|
|
|
208
211
|
showValidationIcon: u,
|
|
209
212
|
showLoadingIcon: p,
|
|
210
213
|
showClearButton: c,
|
|
211
|
-
title:
|
|
212
|
-
inputAttributes:
|
|
213
|
-
} = this.$props,
|
|
214
|
-
|
|
215
|
-
id:
|
|
214
|
+
title: S,
|
|
215
|
+
inputAttributes: $
|
|
216
|
+
} = this.$props, w = {
|
|
217
|
+
...$,
|
|
218
|
+
id: b || this.calculatedId,
|
|
216
219
|
name: C,
|
|
217
|
-
disabled:
|
|
218
|
-
rows:
|
|
219
|
-
title:
|
|
220
|
+
disabled: a,
|
|
221
|
+
rows: v,
|
|
222
|
+
title: S,
|
|
220
223
|
placeholder: V,
|
|
221
224
|
readOnly: n,
|
|
222
225
|
required: r,
|
|
223
|
-
tabIndex: P(y,
|
|
224
|
-
"aria-labelledby":
|
|
226
|
+
tabIndex: P(y, a),
|
|
227
|
+
"aria-labelledby": i,
|
|
225
228
|
"aria-describedby": e,
|
|
226
229
|
"aria-multiline": !0,
|
|
227
|
-
"aria-disabled":
|
|
230
|
+
"aria-disabled": a || void 0,
|
|
228
231
|
...this.$attrs
|
|
229
|
-
}, z =
|
|
232
|
+
}, z = m.call(this, this.$props.inputPrefix, g.call(this)), I = m.call(this, this.$props.inputSuffix, g.call(this)), B = x.call(this, {
|
|
230
233
|
h: d,
|
|
231
234
|
template: z,
|
|
232
235
|
additionalProps: {
|
|
233
236
|
value: this.computedValue,
|
|
234
|
-
valid: this.isValid
|
|
237
|
+
valid: this.isValid,
|
|
238
|
+
className: this.prefixRenderClass
|
|
235
239
|
}
|
|
236
240
|
}), A = x.call(this, {
|
|
237
241
|
h: d,
|
|
238
242
|
template: I,
|
|
239
243
|
additionalProps: {
|
|
240
244
|
value: this.computedValue,
|
|
241
|
-
valid: this.isValid
|
|
245
|
+
valid: this.isValid,
|
|
246
|
+
className: this.suffixRenderClass
|
|
242
247
|
}
|
|
243
248
|
}), N = d("textarea", {
|
|
244
|
-
|
|
249
|
+
...w,
|
|
245
250
|
class: this.inputInnerClass,
|
|
246
251
|
ref: (R) => {
|
|
247
252
|
this.elementRef = R;
|
|
@@ -255,7 +260,7 @@ const K = /* @__PURE__ */ M({
|
|
|
255
260
|
onInput: this.handleInput,
|
|
256
261
|
onFocus: this.handleFocus,
|
|
257
262
|
onBlur: this.handleBlur
|
|
258
|
-
}),
|
|
263
|
+
}), f = [o && t("span", {
|
|
259
264
|
class: "k-flex-wrap"
|
|
260
265
|
}, [t(s, {
|
|
261
266
|
name: o,
|
|
@@ -264,12 +269,13 @@ const K = /* @__PURE__ */ M({
|
|
|
264
269
|
class: this.suffixIconWrapClass
|
|
265
270
|
}, [t(s, {
|
|
266
271
|
name: "check",
|
|
272
|
+
icon: L,
|
|
267
273
|
class: "k-input-validation-icon"
|
|
268
274
|
}, null)]), u && !this.isValid && t("span", {
|
|
269
275
|
class: this.suffixIconWrapClass
|
|
270
276
|
}, [t(s, {
|
|
271
277
|
name: "exclamation-circle",
|
|
272
|
-
icon:
|
|
278
|
+
icon: W,
|
|
273
279
|
class: "k-input-validation-icon"
|
|
274
280
|
}, null)]), p && t("span", {
|
|
275
281
|
class: this.suffixIconWrapClass
|
|
@@ -283,23 +289,20 @@ const K = /* @__PURE__ */ M({
|
|
|
283
289
|
class: "k-clear-value"
|
|
284
290
|
}, [t(s, {
|
|
285
291
|
name: "x",
|
|
286
|
-
icon:
|
|
292
|
+
icon: F
|
|
287
293
|
}, null)])])];
|
|
288
294
|
return t("span", {
|
|
289
295
|
class: this.rootClassName,
|
|
290
296
|
dir: this.currentDir === "rtl" ? this.currentDir : "",
|
|
291
297
|
style: this.$attrs.style
|
|
292
|
-
}, [this.$props.inputPrefix && t("span", {
|
|
293
|
-
class: this.prefixRenderClass
|
|
294
|
-
}, [B]), o || u || p || c ? t("span", {
|
|
298
|
+
}, [this.$props.inputPrefix && B, o || u || p || c ? t("span", {
|
|
295
299
|
class: "k-hstack k-flex"
|
|
296
|
-
}, [
|
|
297
|
-
class: this.suffixRenderClass
|
|
298
|
-
}, [A])]);
|
|
300
|
+
}, [f]) : f, this.$props.inputSuffix && A]);
|
|
299
301
|
},
|
|
300
302
|
methods: {
|
|
301
303
|
setValidity() {
|
|
302
|
-
|
|
304
|
+
var e, i;
|
|
305
|
+
(i = (e = this.element) == null ? void 0 : e.setCustomValidity) == null || i.call(e, this.isValid ? "" : this.validationMessage || ""), this.element && (this.textAreaHeight = `${this.element.scrollHeight}px`);
|
|
303
306
|
},
|
|
304
307
|
clearClick(e) {
|
|
305
308
|
this.emitUpdate(e, "change", "");
|
|
@@ -307,13 +310,13 @@ const K = /* @__PURE__ */ M({
|
|
|
307
310
|
focus() {
|
|
308
311
|
this.element && this.element.focus();
|
|
309
312
|
},
|
|
310
|
-
emitUpdate(e,
|
|
311
|
-
const
|
|
312
|
-
this.$props.disabled || (this.currentValue =
|
|
313
|
+
emitUpdate(e, i, l) {
|
|
314
|
+
const a = l;
|
|
315
|
+
this.$props.disabled || (this.currentValue = a), this.$props.disabled || (this.$emit("changemodel", a), this.$emit("update:modelValue", a), this.$emit(i, {
|
|
313
316
|
event: e,
|
|
314
317
|
component: this,
|
|
315
318
|
name: this.element.name,
|
|
316
|
-
value:
|
|
319
|
+
value: a
|
|
317
320
|
}));
|
|
318
321
|
},
|
|
319
322
|
handleChange(e) {
|
|
@@ -339,5 +342,5 @@ const K = /* @__PURE__ */ M({
|
|
|
339
342
|
}
|
|
340
343
|
});
|
|
341
344
|
export {
|
|
342
|
-
|
|
345
|
+
G as TextArea
|
|
343
346
|
};
|