adverich-kun-ui 0.1.408 → 0.1.409
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.
|
@@ -1,56 +1,45 @@
|
|
|
1
|
-
import { useAttrs as
|
|
2
|
-
import { kunTextareaProps as
|
|
3
|
-
import
|
|
1
|
+
import { useAttrs as x, ref as _, getCurrentInstance as ee, computed as a, createElementBlock as l, openBlock as s, mergeProps as E, renderSlot as i, createElementVNode as d, createCommentVNode as u, normalizeClass as g, toDisplayString as y, normalizeProps as I, guardReactiveProps as R, unref as r, createBlock as b, resolveDynamicComponent as m, withKeys as oe, Fragment as te, renderList as ne, withDirectives as re, vShow as se, createTextVNode as le } from "vue";
|
|
2
|
+
import { kunTextareaProps as ae } from "../composables/KunTextareaProps.js";
|
|
3
|
+
import ie from "../composables/useKunTextareaComposable.js";
|
|
4
4
|
import { renderIconSlot as k } from "../../../../utils/renderIcon.js";
|
|
5
|
-
const
|
|
5
|
+
const de = { class: "relative" }, ue = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "absolute left-2 top-2 flex items-center"
|
|
8
|
-
},
|
|
8
|
+
}, pe = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "absolute left-2 top-2 ml-1"
|
|
11
|
-
},
|
|
11
|
+
}, ve = ["value", "rows", "disabled", "readonly", "placeholder"], ce = {
|
|
12
12
|
key: 3,
|
|
13
13
|
class: "absolute right-2 top-2 mr-1"
|
|
14
|
-
},
|
|
14
|
+
}, fe = {
|
|
15
15
|
key: 4,
|
|
16
16
|
class: "absolute right-2 top-2 flex items-center"
|
|
17
|
-
},
|
|
17
|
+
}, ge = {
|
|
18
18
|
key: 5,
|
|
19
19
|
class: "mt-1"
|
|
20
|
-
},
|
|
20
|
+
}, ye = { class: "h-1 w-full bg-gray-200 rounded overflow-hidden" }, be = {
|
|
21
21
|
key: 7,
|
|
22
22
|
class: "text-xs text-right mt-1 text-gray-400"
|
|
23
|
-
},
|
|
23
|
+
}, me = { key: 0 }, $e = {
|
|
24
24
|
__name: "KunTextarea",
|
|
25
|
-
props: { ...
|
|
25
|
+
props: { ...ae },
|
|
26
26
|
emits: ["update:modelValue", "click:clear", "click:control", "update:focused", "mousedown:control"],
|
|
27
|
-
setup(
|
|
28
|
-
const o =
|
|
29
|
-
isFocused:
|
|
30
|
-
internalValue:
|
|
31
|
-
rootRef:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
setup(M, { expose: P, emit: T }) {
|
|
28
|
+
const o = M, F = T, G = x(), p = _(null), K = `textarea-${ee().uid}`, {
|
|
29
|
+
isFocused: v,
|
|
30
|
+
internalValue: c,
|
|
31
|
+
rootRef: V,
|
|
32
|
+
// si no usás, sacalo del composable y de acá
|
|
33
|
+
updateValue: N,
|
|
34
|
+
handleClear: z,
|
|
35
|
+
validate: H,
|
|
36
|
+
reset: L,
|
|
37
|
+
resetValidation: j,
|
|
37
38
|
hasError: f,
|
|
38
|
-
displayedMessages:
|
|
39
|
-
adjustHeight: J
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}, O = (e) => {
|
|
43
|
-
var T;
|
|
44
|
-
if (!o.jsonMode) return;
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
const n = e.target, t = n.selectionStart, g = ((T = n.value.substring(0, t).match(/(^|\n)(\s*)[^\n]*$/)) == null ? void 0 : T[2]) ?? "", M = n.value.slice(0, t) + `
|
|
47
|
-
` + g + n.value.slice(t);
|
|
48
|
-
n.value = M, z(M), ve(() => n.setSelectionRange(t + 1 + g.length, t + 1 + g.length));
|
|
49
|
-
}, Q = () => {
|
|
50
|
-
c.value = !0, C("update:focused", !0);
|
|
51
|
-
}, U = () => {
|
|
52
|
-
c.value = !1, C("update:focused", !1);
|
|
53
|
-
}, A = a(() => c.value || !!v.value || o.dirty), I = a(() => typeof v.value == "string" ? v.value.length : 0), $ = a(() => o.counter === !0 ? 25 : o.counter || null), W = a(() => o.persistentCounter || o.counter && c.value), X = a(() => ["relative w-full flex flex-col", o.class, o.wrapperClass]), Y = a(() => o.persistentClear ? "opacity-100" : "hover:opacity-100 opacity-0 transition-opacity duration-200"), Z = a(() => {
|
|
39
|
+
displayedMessages: C,
|
|
40
|
+
adjustHeight: J,
|
|
41
|
+
handleJsonEnter: B
|
|
42
|
+
} = ie(o, F), S = a(() => v.value || !!c.value || o.dirty), h = a(() => typeof c.value == "string" ? c.value.length : 0), w = a(() => o.counter === !0 ? 25 : o.counter || null), q = a(() => o.persistentCounter || o.counter && v.value), O = a(() => ["relative w-full flex flex-col", o.class, o.wrapperClass]), Q = a(() => o.persistentClear ? "opacity-100" : "hover:opacity-100 opacity-0 transition-opacity duration-200"), A = a(() => {
|
|
54
43
|
const e = o.bgColor ? "" : o.variant === "filled" ? "bg-gray-100 dark:bg-gray-900" : "";
|
|
55
44
|
switch (o.variant) {
|
|
56
45
|
case "filled":
|
|
@@ -64,9 +53,10 @@ const be = { class: "relative" }, ye = {
|
|
|
64
53
|
default:
|
|
65
54
|
return "";
|
|
66
55
|
}
|
|
67
|
-
}),
|
|
56
|
+
}), D = a(
|
|
68
57
|
() => o.density === "compact" ? "p-1" : o.density === "comfortable" ? "p-2" : "p-3"
|
|
69
|
-
)
|
|
58
|
+
);
|
|
59
|
+
a(() => [
|
|
70
60
|
"w-full resize-none p-2 transition-colors duration-150 py-3",
|
|
71
61
|
o.inputClass,
|
|
72
62
|
{
|
|
@@ -84,155 +74,161 @@ const be = { class: "relative" }, ye = {
|
|
|
84
74
|
"resize-none": o.noResize || o.autoGrow,
|
|
85
75
|
resize: !o.noResize && !o.autoGrow
|
|
86
76
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
])
|
|
77
|
+
A.value,
|
|
78
|
+
D.value
|
|
79
|
+
]);
|
|
80
|
+
const U = { label: o.label, isFocused: v, isActive: S, controlRef: p, focus: () => {
|
|
90
81
|
var e;
|
|
91
82
|
return (e = p.value) == null ? void 0 : e.focus();
|
|
92
83
|
}, blur: () => {
|
|
93
84
|
var e;
|
|
94
85
|
return (e = p.value) == null ? void 0 : e.blur();
|
|
95
|
-
}, props: o },
|
|
86
|
+
}, props: o }, $ = { isActive: !!c.value, isFocused: v, controlRef: p, focus: () => {
|
|
96
87
|
var e;
|
|
97
88
|
return (e = p.value) == null ? void 0 : e.focus();
|
|
98
89
|
}, blur: () => {
|
|
99
90
|
var e;
|
|
100
91
|
return (e = p.value) == null ? void 0 : e.blur();
|
|
101
|
-
}, props: o },
|
|
102
|
-
const { class: e, ...
|
|
103
|
-
return
|
|
92
|
+
}, props: o }, W = $, X = $, Y = a(() => {
|
|
93
|
+
const { class: e, ...t } = G;
|
|
94
|
+
return t;
|
|
104
95
|
});
|
|
105
|
-
return
|
|
106
|
-
validate:
|
|
107
|
-
reset:
|
|
108
|
-
resetValidation:
|
|
109
|
-
errorMessages:
|
|
96
|
+
return P({
|
|
97
|
+
validate: H,
|
|
98
|
+
reset: L,
|
|
99
|
+
resetValidation: j,
|
|
100
|
+
errorMessages: C,
|
|
110
101
|
isValid: a(() => !f.value),
|
|
111
|
-
rootRef:
|
|
102
|
+
rootRef: V,
|
|
112
103
|
focus: () => {
|
|
113
104
|
var e;
|
|
114
105
|
return (e = p.value) == null ? void 0 : e.focus();
|
|
115
106
|
}
|
|
116
|
-
}), (e,
|
|
117
|
-
class:
|
|
107
|
+
}), (e, t) => (s(), l("div", E({
|
|
108
|
+
class: O.value,
|
|
118
109
|
ref_key: "rootRef",
|
|
119
|
-
ref:
|
|
120
|
-
},
|
|
121
|
-
i(e.$slots, "label", E({ for:
|
|
122
|
-
e.label ? (
|
|
110
|
+
ref: V
|
|
111
|
+
}, Y.value), [
|
|
112
|
+
i(e.$slots, "label", E({ for: K }, U), () => [
|
|
113
|
+
e.label ? (s(), l("label", {
|
|
123
114
|
key: 0,
|
|
124
|
-
class:
|
|
115
|
+
class: g(["absolute left-2 transition-all duration-200 ease-in-out pointer-events-none select-none z-10", S.value || e.placeholder ? "-top-2.25 text-xs opacity-80" : "top-3 text-sm opacity-80"])
|
|
125
116
|
}, y(e.label), 3)) : u("", !0)
|
|
126
117
|
]),
|
|
127
|
-
d("div",
|
|
128
|
-
e.prependIcon || e.$slots.prepend ? (
|
|
129
|
-
i(e.$slots, "prepend",
|
|
118
|
+
d("div", de, [
|
|
119
|
+
e.prependIcon || e.$slots.prepend ? (s(), l("div", ue, [
|
|
120
|
+
i(e.$slots, "prepend", I(R(r(W))), () => [
|
|
130
121
|
d("div", {
|
|
131
|
-
onClick:
|
|
122
|
+
onClick: t[0] || (t[0] = (n) => e.handleIconClick(n, "prepend"))
|
|
132
123
|
}, [
|
|
133
|
-
(
|
|
124
|
+
(s(), b(m(r(k)(e.prependIcon))))
|
|
134
125
|
])
|
|
135
126
|
])
|
|
136
127
|
])) : u("", !0),
|
|
137
|
-
e.prependInnerIcon || e.$slots["prepend-inner"] ? (
|
|
128
|
+
e.prependInnerIcon || e.$slots["prepend-inner"] ? (s(), l("div", pe, [
|
|
138
129
|
i(e.$slots, "prepend-inner", {}, () => [
|
|
139
130
|
d("div", {
|
|
140
|
-
onClick:
|
|
131
|
+
onClick: t[1] || (t[1] = (n) => e.handleIconClick(n, "prependInner"))
|
|
141
132
|
}, [
|
|
142
|
-
(
|
|
133
|
+
(s(), b(m(r(k)(e.prependInnerIcon))))
|
|
143
134
|
])
|
|
144
135
|
])
|
|
145
136
|
])) : u("", !0),
|
|
146
137
|
d("textarea", {
|
|
147
138
|
ref_key: "textareaRef",
|
|
148
139
|
ref: p,
|
|
149
|
-
value:
|
|
150
|
-
rows: e.
|
|
140
|
+
value: r(c),
|
|
141
|
+
rows: e.rows,
|
|
151
142
|
disabled: e.disabled,
|
|
152
143
|
readonly: e.readonly,
|
|
153
144
|
placeholder: e.placeholder,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
145
|
+
onInput: t[2] || (t[2] = (n) => {
|
|
146
|
+
r(N)(n.target.value), e.autoGrow && r(J)();
|
|
147
|
+
}),
|
|
148
|
+
onFocus: t[3] || (t[3] = (n) => {
|
|
149
|
+
v.value = !0, e.$emit("update:focused", !0);
|
|
150
|
+
}),
|
|
151
|
+
onBlur: t[4] || (t[4] = (n) => {
|
|
152
|
+
v.value = !1, e.$emit("update:focused", !1);
|
|
153
|
+
}),
|
|
154
|
+
onClick: t[5] || (t[5] = (n) => e.$emit("click:control", n)),
|
|
155
|
+
onMousedown: t[6] || (t[6] = (n) => e.$emit("mousedown:control", n)),
|
|
156
|
+
onKeydown: t[7] || (t[7] = oe((...n) => r(B) && r(B)(...n), ["enter"])),
|
|
157
|
+
class: g([[A.value, D.value, e.inputClasses], "py-3"])
|
|
158
|
+
}, null, 42, ve),
|
|
159
|
+
e.clearable && r(c) ? (s(), l("div", {
|
|
164
160
|
key: 2,
|
|
165
|
-
class:
|
|
161
|
+
class: g(["absolute right-2 top-2", Q.value])
|
|
166
162
|
}, [
|
|
167
|
-
i(e.$slots, "clear",
|
|
163
|
+
i(e.$slots, "clear", I(R($)), () => [
|
|
168
164
|
d("button", {
|
|
169
165
|
type: "button",
|
|
170
|
-
onClick:
|
|
166
|
+
onClick: t[8] || (t[8] = (...n) => r(z) && r(z)(...n)),
|
|
171
167
|
class: "text-gray-500 hover:text-gray-700"
|
|
172
168
|
}, [
|
|
173
|
-
(
|
|
169
|
+
(s(), b(m(r(k)(e.clearIcon))))
|
|
174
170
|
])
|
|
175
171
|
])
|
|
176
172
|
], 2)) : u("", !0),
|
|
177
|
-
e.appendInnerIcon || e.$slots["append-inner"] ? (
|
|
173
|
+
e.appendInnerIcon || e.$slots["append-inner"] ? (s(), l("div", ce, [
|
|
178
174
|
i(e.$slots, "append-inner", {}, () => [
|
|
179
175
|
d("div", {
|
|
180
|
-
onClick:
|
|
176
|
+
onClick: t[9] || (t[9] = (n) => e.handleIconClick(n, "appendInner"))
|
|
181
177
|
}, [
|
|
182
|
-
(
|
|
178
|
+
(s(), b(m(r(k)(e.appendInnerIcon))))
|
|
183
179
|
])
|
|
184
180
|
])
|
|
185
181
|
])) : u("", !0),
|
|
186
|
-
e.appendIcon || e.$slots.append ? (
|
|
187
|
-
i(e.$slots, "append",
|
|
182
|
+
e.appendIcon || e.$slots.append ? (s(), l("div", fe, [
|
|
183
|
+
i(e.$slots, "append", I(R(r(X))), () => [
|
|
188
184
|
d("div", {
|
|
189
|
-
onClick:
|
|
185
|
+
onClick: t[10] || (t[10] = (n) => e.handleIconClick(n, "append"))
|
|
190
186
|
}, [
|
|
191
|
-
(
|
|
187
|
+
(s(), b(m(r(k)(e.appendIcon))))
|
|
192
188
|
])
|
|
193
189
|
])
|
|
194
190
|
])) : u("", !0),
|
|
195
|
-
e.loading ? (
|
|
191
|
+
e.loading ? (s(), l("div", ge, [
|
|
196
192
|
i(e.$slots, "loader", {
|
|
197
193
|
color: e.loadingColor,
|
|
198
194
|
isActive: !0
|
|
199
195
|
}, () => [
|
|
200
|
-
d("div",
|
|
196
|
+
d("div", ye, [
|
|
201
197
|
d("div", {
|
|
202
|
-
class:
|
|
198
|
+
class: g(["h-full transition-all duration-300", [e.loadingColor]]),
|
|
203
199
|
style: { width: "100%" }
|
|
204
200
|
}, null, 2)
|
|
205
201
|
])
|
|
206
202
|
])
|
|
207
203
|
])) : u("", !0),
|
|
208
|
-
!e.hideDetails || e.hideDetails === "auto" && (
|
|
204
|
+
!e.hideDetails || e.hideDetails === "auto" && (r(C).length || e.hint) ? (s(), l("div", {
|
|
209
205
|
key: 6,
|
|
210
|
-
class:
|
|
206
|
+
class: g(["text-xs mt-1 space-y-1", { "text-red-500": r(f), "text-gray-500": !r(f) }])
|
|
211
207
|
}, [
|
|
212
208
|
i(e.$slots, "details", {}, () => [
|
|
213
|
-
|
|
214
|
-
key:
|
|
215
|
-
message:
|
|
209
|
+
r(f) ? (s(!0), l(te, { key: 0 }, ne(r(C), (n, Z) => i(e.$slots, "message", {
|
|
210
|
+
key: Z,
|
|
211
|
+
message: n
|
|
216
212
|
}, () => [
|
|
217
|
-
d("div", null, y(
|
|
213
|
+
d("div", null, y(n), 1)
|
|
218
214
|
])), 128)) : e.hint ? i(e.$slots, "hint", {
|
|
219
215
|
key: 1,
|
|
220
216
|
hint: e.hint
|
|
221
217
|
}, () => [
|
|
222
|
-
|
|
223
|
-
[
|
|
218
|
+
re(d("div", null, y(e.hint), 513), [
|
|
219
|
+
[se, e.persistentHint || r(v)]
|
|
224
220
|
])
|
|
225
221
|
]) : u("", !0)
|
|
226
222
|
])
|
|
227
223
|
], 2)) : u("", !0),
|
|
228
|
-
|
|
224
|
+
q.value ? (s(), l("div", be, [
|
|
229
225
|
i(e.$slots, "counter", {
|
|
230
|
-
counter:
|
|
231
|
-
max:
|
|
232
|
-
value:
|
|
226
|
+
counter: h.value,
|
|
227
|
+
max: w.value,
|
|
228
|
+
value: h.value
|
|
233
229
|
}, () => [
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
le(y(h.value), 1),
|
|
231
|
+
w.value ? (s(), l("span", me, " / " + y(w.value), 1)) : u("", !0)
|
|
236
232
|
])
|
|
237
233
|
])) : u("", !0)
|
|
238
234
|
])
|
|
@@ -240,5 +236,5 @@ const be = { class: "relative" }, ye = {
|
|
|
240
236
|
}
|
|
241
237
|
};
|
|
242
238
|
export {
|
|
243
|
-
|
|
239
|
+
$e as default
|
|
244
240
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
1
|
+
import { ref as o, computed as g, watch as A, nextTick as h, onMounted as C, onBeforeUnmount as F } from "vue";
|
|
2
|
+
function L(t, v) {
|
|
3
|
+
const m = o(null), r = o(""), i = o(t.modelValue), H = o(!1), s = o([]), x = o(null), c = g(() => t.formatModel === "json" || t.formatModel === "auto" && typeof t.modelValue == "object");
|
|
4
|
+
function y(e) {
|
|
5
|
+
if (c.value && e != null)
|
|
6
6
|
try {
|
|
7
7
|
return JSON.stringify(e, null, 2);
|
|
8
8
|
} catch {
|
|
@@ -10,8 +10,8 @@ function F(t, v) {
|
|
|
10
10
|
}
|
|
11
11
|
return e ?? "";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
13
|
+
function R(e) {
|
|
14
|
+
if (c.value && typeof e == "string")
|
|
15
15
|
try {
|
|
16
16
|
return JSON.parse(e);
|
|
17
17
|
} catch {
|
|
@@ -19,72 +19,72 @@ function F(t, v) {
|
|
|
19
19
|
}
|
|
20
20
|
return e;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
const n =
|
|
24
|
-
|
|
22
|
+
function J(e) {
|
|
23
|
+
const n = R(e);
|
|
24
|
+
i.value = n, v("update:modelValue", n), v("change", n);
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
const n = JSON.stringify(e),
|
|
28
|
-
n !==
|
|
26
|
+
A(() => t.modelValue, (e) => {
|
|
27
|
+
const n = JSON.stringify(e), a = JSON.stringify(i.value);
|
|
28
|
+
n !== a && (i.value = e, r.value = y(e), t.autoGrow && h(f));
|
|
29
29
|
});
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
t.autoGrow &&
|
|
30
|
+
const f = () => {
|
|
31
|
+
if (!textareaRef.value) return;
|
|
32
|
+
textareaRef.value.style.height = "auto", textareaRef.value.style.overflowY = "hidden";
|
|
33
|
+
const e = textareaRef.value.scrollHeight, n = parseFloat(getComputedStyle(textareaRef.value).lineHeight || "24"), a = Number(t.maxRows || 0);
|
|
34
|
+
if (t.maxRows && a > 0) {
|
|
35
|
+
const u = a * n;
|
|
36
|
+
textareaRef.value.style.height = Math.min(e, u) + "px";
|
|
37
|
+
} else
|
|
38
|
+
textareaRef.value.style.height = e + "px";
|
|
39
|
+
};
|
|
40
|
+
C(() => {
|
|
41
|
+
r.value = y(t.modelValue), h(() => {
|
|
42
|
+
t.autoGrow && f();
|
|
43
43
|
});
|
|
44
|
-
}),
|
|
45
|
-
|
|
44
|
+
}), F(() => {
|
|
45
|
+
x.value && cancelAnimationFrame(x.value);
|
|
46
46
|
});
|
|
47
|
-
const
|
|
47
|
+
const M = g(() => {
|
|
48
48
|
var e;
|
|
49
49
|
return !!(s.value.length || (e = t.errorMessages) != null && e.length);
|
|
50
|
-
}),
|
|
51
|
-
function
|
|
52
|
-
const e = t.rules || [], n = t.required && !
|
|
53
|
-
for (const
|
|
54
|
-
const
|
|
55
|
-
Array.isArray(
|
|
50
|
+
}), N = g(() => M.value ? [...t.errorMessages || [], ...s.value].slice(0, t.maxErrors) : []);
|
|
51
|
+
function O() {
|
|
52
|
+
const e = t.rules || [], n = t.required && !r.value ? null : R(r.value), a = [];
|
|
53
|
+
for (const u of e) {
|
|
54
|
+
const l = typeof u == "function" ? u(n) : u;
|
|
55
|
+
Array.isArray(l) ? a.push(...l) : typeof l == "string" ? a.push(l) : l === !1 && a.push("Campo inválido");
|
|
56
56
|
}
|
|
57
|
-
return s.value =
|
|
57
|
+
return s.value = a, a.length === 0;
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function E() {
|
|
60
60
|
s.value = [];
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
var
|
|
64
|
-
if (!
|
|
65
|
-
const n =
|
|
62
|
+
function I(e) {
|
|
63
|
+
var S;
|
|
64
|
+
if (!c.value || e.key !== "Enter") return;
|
|
65
|
+
const n = m.value;
|
|
66
66
|
if (!n) return;
|
|
67
|
-
const
|
|
68
|
-
`) + 1,
|
|
69
|
-
${((
|
|
70
|
-
|
|
71
|
-
const
|
|
72
|
-
n.setSelectionRange(
|
|
67
|
+
const a = n.selectionStart, u = r.value, l = " ", d = u.slice(0, a), b = u.slice(a), j = d.lastIndexOf(`
|
|
68
|
+
`) + 1, w = `
|
|
69
|
+
${((S = d.slice(j).match(/^\s*/)) == null ? void 0 : S[0]) ?? ""}${l}`;
|
|
70
|
+
r.value = d + w + b, h(() => {
|
|
71
|
+
const V = a + w.length;
|
|
72
|
+
n.setSelectionRange(V, V);
|
|
73
73
|
}), e.preventDefault();
|
|
74
74
|
}
|
|
75
75
|
return {
|
|
76
|
-
inputRef:
|
|
77
|
-
internalValue:
|
|
76
|
+
inputRef: m,
|
|
77
|
+
internalValue: r,
|
|
78
78
|
isFocused: H,
|
|
79
|
-
hasError:
|
|
80
|
-
displayedMessages:
|
|
81
|
-
validate:
|
|
82
|
-
resetValidation:
|
|
83
|
-
updateModel:
|
|
84
|
-
adjustHeight:
|
|
85
|
-
handleJsonEnter:
|
|
79
|
+
hasError: M,
|
|
80
|
+
displayedMessages: N,
|
|
81
|
+
validate: O,
|
|
82
|
+
resetValidation: E,
|
|
83
|
+
updateModel: J,
|
|
84
|
+
adjustHeight: f,
|
|
85
|
+
handleJsonEnter: I
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
88
|
export {
|
|
89
|
-
|
|
89
|
+
L as default
|
|
90
90
|
};
|