@mobilon-dev/chotto 0.3.92 → 0.3.94
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/chotto.css +1 -1
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +1 -1
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +208 -195
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +128 -120
- package/dist/components/3_compounds/Feed/Feed.vue.js +3 -3
- package/dist/components/3_compounds/Feed/Feed.vue2.js +147 -157
- package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +81 -48
- package/dist/hooks/useMessageDraft.js +94 -51
- package/dist/index.js +98 -97
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/components/3_compounds/Feed/composables/useFeedScroll.d.ts +5 -7
- package/dist/types/hooks/useMessageDraft.d.ts +9 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useImmediateDebouncedRef as
|
|
3
|
-
import { useMessageDraft as
|
|
1
|
+
import { defineComponent as be, inject as we, watch as d, ref as E, computed as _, nextTick as S, unref as u, onMounted as Ce, onUnmounted as Ae, createElementBlock as k, openBlock as F, createElementVNode as h, createVNode as O, normalizeClass as z, createBlock as Ee, createCommentVNode as U, renderSlot as Y, toDisplayString as Fe, withDirectives as Me, withKeys as Re, vModelText as He } from "vue";
|
|
2
|
+
import { useImmediateDebouncedRef as ke } from "../../../hooks/useImmediateDebouncedRef.js";
|
|
3
|
+
import { useMessageDraft as Le, commitChatDraftToList as De } from "../../../hooks/useMessageDraft.js";
|
|
4
4
|
import "../../../hooks/useSearchModel.js";
|
|
5
5
|
import "../../../hooks/useTheme.js";
|
|
6
|
-
import { useEmojiNative as
|
|
6
|
+
import { useEmojiNative as Pe } from "../../../hooks/useEmojiNative.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { t as I } from "../../../locale/useLocale.js";
|
|
@@ -11,18 +11,18 @@ import { t as I } from "../../../locale/useLocale.js";
|
|
|
11
11
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
12
12
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
13
13
|
import "../../../functions/parseMarkdown.js";
|
|
14
|
-
import { textToAppleEmojiHtml as
|
|
15
|
-
import { hideEditPreview as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
const
|
|
14
|
+
import { textToAppleEmojiHtml as We, textContainsEmoji as qe, previousGraphemeIndex as V, nextGraphemeIndex as $, snapIndexToGrapheme as J } from "../../../functions/renderAppleEmojis.js";
|
|
15
|
+
import { hideEditPreview as Be } from "../../../hooks/messages/useStartEdit.js";
|
|
16
|
+
import ze from "./icons/SendIcon.vue.js";
|
|
17
|
+
import Ke from "../../2_chatinput_elements/TextFormatToolbar/TextFormatToolbar.vue.js";
|
|
18
|
+
import je from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
|
|
19
|
+
const Ne = { class: "chat-input__container" }, Ge = ["id"], Oe = ["id"], Ue = { class: "chat-input__inline-buttons" }, Ye = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "chat-input__input chat-input__disabled-placeholder"
|
|
22
|
-
},
|
|
22
|
+
}, Ve = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "chat-input__input-wrap"
|
|
25
|
-
},
|
|
25
|
+
}, $e = ["innerHTML"], Je = ["disabled", "placeholder"], Qe = ["disabled"], Xe = { class: "" }, Ze = { class: "chat-input__third-line" }, K = 40, xt = /* @__PURE__ */ be({
|
|
26
26
|
__name: "ChatInput",
|
|
27
27
|
props: {
|
|
28
28
|
state: {
|
|
@@ -51,18 +51,26 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
emits: ["send", "typing"],
|
|
54
|
-
setup(T, { emit:
|
|
55
|
-
const L =
|
|
54
|
+
setup(T, { emit: Q }) {
|
|
55
|
+
const L = Q, b = we("chatAppId"), { resetMessage: X, getMessage: l, setMessageText: M, setForceSendMessage: Z, resetEdit: ee, resetMessageFile: te } = Le(b), { isNative: ne } = Pe(b);
|
|
56
|
+
let j = l().id;
|
|
57
|
+
d(
|
|
58
|
+
() => l().id,
|
|
59
|
+
(e) => {
|
|
60
|
+
j = e;
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
const n = E(), m = E(), v = E(null), w = E(!1), ie = ke("", 2e3), D = _(() => {
|
|
56
64
|
var e;
|
|
57
|
-
return (e =
|
|
58
|
-
}),
|
|
59
|
-
() =>
|
|
65
|
+
return (e = l().file) == null ? void 0 : e.preview;
|
|
66
|
+
}), oe = _(
|
|
67
|
+
() => We(l().text || "", v.value)
|
|
60
68
|
), g = _(
|
|
61
|
-
() => !
|
|
69
|
+
() => !ne.value && qe(l().text || "")
|
|
62
70
|
), c = () => {
|
|
63
71
|
if (!m.value || !n.value) return;
|
|
64
|
-
const e = n.value, t = m.value,
|
|
65
|
-
t.style.right =
|
|
72
|
+
const e = n.value, t = m.value, o = Math.max(0, e.offsetWidth - e.clientWidth);
|
|
73
|
+
t.style.right = o > 0 ? `${o}px` : "", t.scrollTop = e.scrollTop;
|
|
66
74
|
};
|
|
67
75
|
let y = 0;
|
|
68
76
|
function P() {
|
|
@@ -71,64 +79,64 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
71
79
|
function le(e = "nearest") {
|
|
72
80
|
const t = n.value;
|
|
73
81
|
if (!t || !g.value) return;
|
|
74
|
-
const
|
|
82
|
+
const o = t.value, i = J(o, t.selectionStart, e), r = J(o, t.selectionEnd, e);
|
|
75
83
|
(i !== t.selectionStart || r !== t.selectionEnd) && t.setSelectionRange(i, r);
|
|
76
84
|
}
|
|
77
85
|
function W() {
|
|
78
|
-
le("nearest"),
|
|
86
|
+
le("nearest"), f();
|
|
79
87
|
}
|
|
80
|
-
function
|
|
88
|
+
function se(e) {
|
|
81
89
|
if (!g.value || e.key !== "ArrowLeft" && e.key !== "ArrowRight" || e.altKey || e.metaKey || e.ctrlKey) return;
|
|
82
90
|
const t = n.value;
|
|
83
91
|
if (!t) return;
|
|
84
|
-
const
|
|
92
|
+
const o = t.value, i = t.selectionStart !== t.selectionEnd;
|
|
85
93
|
if (e.shiftKey) {
|
|
86
94
|
requestAnimationFrame(() => W());
|
|
87
95
|
return;
|
|
88
96
|
}
|
|
89
97
|
if (i) {
|
|
90
98
|
e.preventDefault();
|
|
91
|
-
const x = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, A = e.key === "ArrowLeft" ?
|
|
92
|
-
t.setSelectionRange(A, A),
|
|
99
|
+
const x = e.key === "ArrowLeft" ? t.selectionStart : t.selectionEnd, A = e.key === "ArrowLeft" ? V(o, x) : $(o, x);
|
|
100
|
+
t.setSelectionRange(A, A), f();
|
|
93
101
|
return;
|
|
94
102
|
}
|
|
95
103
|
e.preventDefault();
|
|
96
|
-
const r = t.selectionStart,
|
|
97
|
-
t.setSelectionRange(
|
|
104
|
+
const r = t.selectionStart, p = e.key === "ArrowLeft" ? V(o, r) : $(o, r);
|
|
105
|
+
t.setSelectionRange(p, p), f();
|
|
98
106
|
}
|
|
99
|
-
function
|
|
107
|
+
function f() {
|
|
100
108
|
if (!g.value) {
|
|
101
109
|
P();
|
|
102
110
|
return;
|
|
103
111
|
}
|
|
104
112
|
y && cancelAnimationFrame(y), y = requestAnimationFrame(() => {
|
|
105
|
-
var
|
|
113
|
+
var p;
|
|
106
114
|
y = 0;
|
|
107
115
|
const e = n.value;
|
|
108
116
|
if (!e) {
|
|
109
117
|
P();
|
|
110
118
|
return;
|
|
111
119
|
}
|
|
112
|
-
const t = e.selectionStart,
|
|
113
|
-
if (t ===
|
|
120
|
+
const t = e.selectionStart, o = e.selectionEnd;
|
|
121
|
+
if (t === o) {
|
|
114
122
|
v.value !== null && (v.value = null, S(c));
|
|
115
123
|
return;
|
|
116
124
|
}
|
|
117
125
|
const i = v.value;
|
|
118
|
-
if (i && i.start === t && i.end ===
|
|
119
|
-
const r = ((
|
|
120
|
-
v.value = { start: t, end:
|
|
126
|
+
if (i && i.start === t && i.end === o) return;
|
|
127
|
+
const r = ((p = m.value) == null ? void 0 : p.scrollTop) ?? 0;
|
|
128
|
+
v.value = { start: t, end: o }, S(() => {
|
|
121
129
|
m.value && (m.value.scrollTop = r), c();
|
|
122
130
|
});
|
|
123
131
|
});
|
|
124
132
|
}
|
|
125
|
-
function
|
|
126
|
-
e.buttons &&
|
|
133
|
+
function ae(e) {
|
|
134
|
+
e.buttons && f();
|
|
127
135
|
}
|
|
128
|
-
function
|
|
129
|
-
document.activeElement === n.value &&
|
|
136
|
+
function N() {
|
|
137
|
+
document.activeElement === n.value && f();
|
|
130
138
|
}
|
|
131
|
-
const a = T,
|
|
139
|
+
const a = T, re = _(() => !!(a.state == "disabled" || l().text == "" && !l().file || l().isRecording)), ue = _(() => {
|
|
132
140
|
var t;
|
|
133
141
|
if (a.inputButtonColor)
|
|
134
142
|
return a.inputButtonColor;
|
|
@@ -136,31 +144,31 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
136
144
|
return "#25D366";
|
|
137
145
|
const e = a.selectedChannel.channelId.toLowerCase();
|
|
138
146
|
return e.includes("whatsapp") || e.includes("waba") ? "#25D366" : e.includes("telegram") ? "#37AFE2" : e.includes("sms") ? "#6C757D" : e.includes("max") ? "#4B0082" : "#25D366";
|
|
139
|
-
}),
|
|
147
|
+
}), ce = _(() => {
|
|
140
148
|
var t;
|
|
141
149
|
if (!((t = a.selectedChannel) != null && t.channelId))
|
|
142
150
|
return I("component.ChatInput.InputPlaceholder");
|
|
143
151
|
const e = a.selectedChannel.channelId.toLowerCase();
|
|
144
152
|
return e.includes("whatsapp") || e.includes("waba") ? I("component.ChatInput.WhatsappInputPlaceholder") : e.includes("telegram") ? I("component.ChatInput.TelegramInputPlaceholder") : e.includes("sms") ? I("component.ChatInput.SmsInputPlaceholder") : e.includes("max") ? I("component.ChatInput.MaxInputPlaceholder") : I("component.ChatInput.InputPlaceholder");
|
|
145
153
|
});
|
|
146
|
-
|
|
147
|
-
() =>
|
|
154
|
+
d(
|
|
155
|
+
() => ie.value,
|
|
148
156
|
() => {
|
|
149
157
|
L("typing");
|
|
150
158
|
}
|
|
151
|
-
),
|
|
159
|
+
), d(
|
|
152
160
|
() => {
|
|
153
161
|
var e;
|
|
154
|
-
return (e =
|
|
162
|
+
return (e = l().edit) == null ? void 0 : e.messageId;
|
|
155
163
|
},
|
|
156
164
|
(e, t) => {
|
|
157
165
|
e != null && e !== t && (w.value = !0, S(() => {
|
|
158
166
|
if (!w.value) return;
|
|
159
|
-
const
|
|
160
|
-
|
|
167
|
+
const o = n.value;
|
|
168
|
+
o && (C(o), w.value = !1, H(o), requestAnimationFrame(() => H(o)));
|
|
161
169
|
}));
|
|
162
170
|
}
|
|
163
|
-
),
|
|
171
|
+
), d(
|
|
164
172
|
() => a.focusOnInputArea,
|
|
165
173
|
() => {
|
|
166
174
|
a.focusOnInputArea && S(() => {
|
|
@@ -169,15 +177,15 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
169
177
|
});
|
|
170
178
|
},
|
|
171
179
|
{ immediate: !0 }
|
|
172
|
-
),
|
|
173
|
-
() =>
|
|
180
|
+
), d(
|
|
181
|
+
() => l().text,
|
|
174
182
|
() => {
|
|
175
183
|
const e = n.value;
|
|
176
184
|
e && (C(e), w.value && (w.value = !1, H(e), requestAnimationFrame(() => H(e))));
|
|
177
185
|
},
|
|
178
186
|
{ immediate: !0, flush: "post" }
|
|
179
|
-
),
|
|
180
|
-
() =>
|
|
187
|
+
), d(
|
|
188
|
+
() => l().id,
|
|
181
189
|
() => {
|
|
182
190
|
const e = n.value;
|
|
183
191
|
e && (R(e), requestAnimationFrame(() => {
|
|
@@ -185,64 +193,64 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
185
193
|
t && C(t);
|
|
186
194
|
}));
|
|
187
195
|
}
|
|
188
|
-
),
|
|
196
|
+
), d(g, (e) => {
|
|
189
197
|
e && S(() => {
|
|
190
198
|
const t = n.value;
|
|
191
199
|
if (!t) return;
|
|
192
|
-
const
|
|
193
|
-
C(t), t.scrollTop =
|
|
200
|
+
const o = t.scrollTop;
|
|
201
|
+
C(t), t.scrollTop = o, c(), requestAnimationFrame(c);
|
|
194
202
|
});
|
|
195
203
|
});
|
|
196
204
|
function R(e) {
|
|
197
|
-
const t =
|
|
205
|
+
const t = l().inputHeight;
|
|
198
206
|
e.style.height = (t || K) + "px", (!t || t <= K) && (e.style.overflowY = "hidden");
|
|
199
207
|
}
|
|
200
|
-
function
|
|
208
|
+
function de(e) {
|
|
201
209
|
const t = parseFloat(e.style.height);
|
|
202
|
-
Number.isFinite(t) && (
|
|
210
|
+
Number.isFinite(t) && (l().inputHeight = t);
|
|
203
211
|
}
|
|
204
212
|
function C(e) {
|
|
205
|
-
const t =
|
|
213
|
+
const t = l().text || "";
|
|
206
214
|
if (e.value !== t || e.clientWidth === 0) {
|
|
207
215
|
R(e);
|
|
208
216
|
return;
|
|
209
217
|
}
|
|
210
|
-
const
|
|
218
|
+
const o = e.scrollTop;
|
|
211
219
|
e.style.height = "auto";
|
|
212
|
-
const i = getComputedStyle(e), r = parseFloat(i.fontSize) || 16,
|
|
220
|
+
const i = getComputedStyle(e), r = parseFloat(i.fontSize) || 16, p = parseFloat(i.lineHeight) || r * 1.4, x = K, A = p * 11, B = e.scrollHeight, ye = t.split(`
|
|
213
221
|
`).length > 1, s = document.createElement("div");
|
|
214
222
|
s.style.position = "absolute", s.style.visibility = "hidden", s.style.whiteSpace = "nowrap", s.style.font = i.font, s.style.fontSize = i.fontSize, s.style.fontFamily = i.fontFamily, s.style.fontWeight = i.fontWeight, s.style.letterSpacing = i.letterSpacing, s.textContent = t, document.body.appendChild(s);
|
|
215
|
-
const
|
|
223
|
+
const xe = s.offsetWidth;
|
|
216
224
|
document.body.removeChild(s);
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
225
|
+
const _e = parseFloat(i.paddingLeft) || 0, Se = parseFloat(i.paddingRight) || 0, Ie = e.clientWidth - _e - Se, Te = xe > Ie, G = ye || Te;
|
|
226
|
+
if (G && B <= x + 1) {
|
|
219
227
|
R(e);
|
|
220
228
|
return;
|
|
221
229
|
}
|
|
222
|
-
t.trim() &&
|
|
230
|
+
t.trim() && G ? B <= A ? (e.style.height = B + "px", e.style.overflowY = "hidden") : (e.style.height = A + "px", e.style.overflowY = "auto", e.scrollTop = o) : (e.style.height = x + "px", e.style.overflowY = "hidden"), de(e), c(), requestAnimationFrame(c);
|
|
223
231
|
}
|
|
224
232
|
function H(e) {
|
|
225
|
-
if (a.state === "disabled" ||
|
|
233
|
+
if (a.state === "disabled" || l().isRecording) return;
|
|
226
234
|
const t = e.value.length;
|
|
227
235
|
e.focus(), e.setSelectionRange(t, t), e.scrollTop = e.scrollHeight, c();
|
|
228
236
|
}
|
|
229
|
-
|
|
230
|
-
() =>
|
|
237
|
+
d(
|
|
238
|
+
() => l().forceSend,
|
|
231
239
|
() => {
|
|
232
|
-
|
|
240
|
+
l().forceSend && (q(), Z(!1));
|
|
233
241
|
}
|
|
234
242
|
);
|
|
235
|
-
const
|
|
243
|
+
const fe = (e) => {
|
|
236
244
|
const t = e.target;
|
|
237
|
-
L("typing", t.value),
|
|
245
|
+
L("typing", t.value), f();
|
|
238
246
|
};
|
|
239
|
-
|
|
247
|
+
Ce(() => {
|
|
240
248
|
const e = n.value;
|
|
241
|
-
e && (R(e), C(e)), document.addEventListener("selectionchange",
|
|
242
|
-
}),
|
|
243
|
-
document.removeEventListener("selectionchange",
|
|
249
|
+
e && (R(e), C(e)), document.addEventListener("selectionchange", N);
|
|
250
|
+
}), Ae(() => {
|
|
251
|
+
De(j), document.removeEventListener("selectionchange", N), y && cancelAnimationFrame(y);
|
|
244
252
|
});
|
|
245
|
-
const
|
|
253
|
+
const pe = (e) => {
|
|
246
254
|
if (e.shiftKey) {
|
|
247
255
|
if (n.value instanceof HTMLTextAreaElement) {
|
|
248
256
|
let t = n.value.selectionStart;
|
|
@@ -259,31 +267,31 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
259
267
|
e.preventDefault();
|
|
260
268
|
} else
|
|
261
269
|
e.preventDefault(), q();
|
|
262
|
-
},
|
|
270
|
+
}, he = (e) => {
|
|
263
271
|
if (n.value) {
|
|
264
272
|
const t = n.value.value;
|
|
265
273
|
n.value.value = e.newText;
|
|
266
|
-
const
|
|
274
|
+
const o = e.newText.length - (t.length - (e.end - e.start)), i = e.start + o;
|
|
267
275
|
M(e.newText), S(() => {
|
|
268
276
|
n.value && (n.value.setSelectionRange(i, i), n.value.focus());
|
|
269
277
|
});
|
|
270
278
|
}
|
|
271
279
|
};
|
|
272
|
-
function he() {
|
|
273
|
-
ee();
|
|
274
|
-
}
|
|
275
280
|
function me() {
|
|
276
|
-
|
|
281
|
+
te();
|
|
277
282
|
}
|
|
278
283
|
function ve() {
|
|
279
|
-
|
|
284
|
+
ee(), M(""), Be(b), n.value && n.value.focus();
|
|
285
|
+
}
|
|
286
|
+
function ge() {
|
|
287
|
+
const e = l();
|
|
280
288
|
return e.edit ? (e.text ?? "").trim() === (e.edit.text ?? "").trim() : !1;
|
|
281
289
|
}
|
|
282
290
|
const q = () => {
|
|
283
|
-
var t,
|
|
284
|
-
const e = E(
|
|
285
|
-
if (e.value.edit &&
|
|
286
|
-
|
|
291
|
+
var t, o;
|
|
292
|
+
const e = E(l());
|
|
293
|
+
if (e.value.edit && ge()) {
|
|
294
|
+
ve();
|
|
287
295
|
return;
|
|
288
296
|
}
|
|
289
297
|
if (e.value.text != "" || e.value.file) {
|
|
@@ -295,78 +303,78 @@ const Ke = { class: "chat-input__container" }, je = ["id"], Ne = ["id"], Ge = {
|
|
|
295
303
|
size: "",
|
|
296
304
|
reply: void 0
|
|
297
305
|
};
|
|
298
|
-
e.value.file ? (i.type = "message." + e.value.file.type, i.url = e.value.file.url, i.filename = e.value.file.name, i.size = (t = e.value.file.size) == null ? void 0 : t.toString(), i.text = (
|
|
306
|
+
e.value.file ? (i.type = "message." + e.value.file.type, i.url = e.value.file.url, i.filename = e.value.file.name, i.size = (t = e.value.file.size) == null ? void 0 : t.toString(), i.text = (o = e == null ? void 0 : e.value) == null ? void 0 : o.text.trim()) : (i.type = "message.text", i.text = e.value.text.trim()), e.value.reply && (i.reply = e.value.reply), e.value.edit && (i.edit = e.value.edit), L("send", i), X(), n.value && n.value.focus();
|
|
299
307
|
}
|
|
300
308
|
};
|
|
301
|
-
return (e, t) => (F(), k("div",
|
|
309
|
+
return (e, t) => (F(), k("div", Ne, [
|
|
302
310
|
h("div", {
|
|
303
311
|
id: "chat-input-reply-line-" + u(b),
|
|
304
312
|
class: "chat-input__reply-line"
|
|
305
|
-
}, null, 8,
|
|
313
|
+
}, null, 8, Ge),
|
|
306
314
|
h("div", {
|
|
307
315
|
id: "chat-input-file-line-" + u(b),
|
|
308
316
|
class: z(["chat-input__file-line", { "chat-input__file-line--visible": !!D.value }])
|
|
309
317
|
}, [
|
|
310
|
-
D.value ? (F(),
|
|
318
|
+
D.value ? (F(), Ee(je, {
|
|
311
319
|
key: 0,
|
|
312
320
|
"file-info": D.value,
|
|
313
|
-
onReset:
|
|
314
|
-
}, null, 8, ["file-info"])) :
|
|
315
|
-
], 10,
|
|
316
|
-
h("div",
|
|
317
|
-
|
|
321
|
+
onReset: me
|
|
322
|
+
}, null, 8, ["file-info"])) : U("", !0)
|
|
323
|
+
], 10, Oe),
|
|
324
|
+
h("div", Ue, [
|
|
325
|
+
Y(e.$slots, "inline-buttons", {}, void 0, !0)
|
|
318
326
|
]),
|
|
319
|
-
T.disabledPlaceholder && (T.state == "disabled" || u(
|
|
327
|
+
T.disabledPlaceholder && (T.state == "disabled" || u(l)().isRecording) ? (F(), k("div", Ye, Fe(T.disabledPlaceholder), 1)) : (F(), k("div", Ve, [
|
|
320
328
|
g.value ? (F(), k("div", {
|
|
321
329
|
key: 0,
|
|
322
330
|
ref_key: "refMirror",
|
|
323
331
|
ref: m,
|
|
324
332
|
class: "chat-input__input-mirror",
|
|
325
333
|
"aria-hidden": "true",
|
|
326
|
-
innerHTML:
|
|
327
|
-
}, null, 8,
|
|
328
|
-
|
|
334
|
+
innerHTML: oe.value
|
|
335
|
+
}, null, 8, $e)) : U("", !0),
|
|
336
|
+
Me(h("textarea", {
|
|
329
337
|
ref_key: "refInput",
|
|
330
338
|
ref: n,
|
|
331
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
339
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => u(l)().text = o),
|
|
332
340
|
rows: "1",
|
|
333
|
-
disabled: T.state == "disabled" || u(
|
|
341
|
+
disabled: T.state == "disabled" || u(l)().isRecording,
|
|
334
342
|
class: z(["chat-input__input", { "chat-input__input--emoji-images": g.value }]),
|
|
335
|
-
placeholder:
|
|
343
|
+
placeholder: ce.value,
|
|
336
344
|
onKeydown: [
|
|
337
|
-
|
|
338
|
-
|
|
345
|
+
se,
|
|
346
|
+
Re(pe, ["enter"])
|
|
339
347
|
],
|
|
340
|
-
onInput:
|
|
348
|
+
onInput: fe,
|
|
341
349
|
onScroll: c,
|
|
342
|
-
onSelect:
|
|
350
|
+
onSelect: f,
|
|
343
351
|
onMouseup: W,
|
|
344
352
|
onKeyup: W,
|
|
345
|
-
onMousemove:
|
|
353
|
+
onMousemove: ae,
|
|
346
354
|
onBlur: P
|
|
347
|
-
}, null, 42,
|
|
348
|
-
[
|
|
355
|
+
}, null, 42, Je), [
|
|
356
|
+
[He, u(l)().text]
|
|
349
357
|
])
|
|
350
358
|
])),
|
|
351
|
-
|
|
359
|
+
O(Ke, {
|
|
352
360
|
textarea: n.value,
|
|
353
|
-
onFormatApplied:
|
|
361
|
+
onFormatApplied: he
|
|
354
362
|
}, null, 8, ["textarea"]),
|
|
355
363
|
h("button", {
|
|
356
|
-
class: z(["chat-input__button", { "chat-input__button-disabled":
|
|
357
|
-
disabled: u(
|
|
364
|
+
class: z(["chat-input__button", { "chat-input__button-disabled": re.value }]),
|
|
365
|
+
disabled: u(l)().isRecording,
|
|
358
366
|
onClick: q
|
|
359
367
|
}, [
|
|
360
|
-
h("span",
|
|
361
|
-
|
|
368
|
+
h("span", Xe, [
|
|
369
|
+
O(u(ze), { color: ue.value }, null, 8, ["color"])
|
|
362
370
|
])
|
|
363
|
-
], 10,
|
|
364
|
-
h("div",
|
|
365
|
-
|
|
371
|
+
], 10, Qe),
|
|
372
|
+
h("div", Ze, [
|
|
373
|
+
Y(e.$slots, "buttons", {}, void 0, !0)
|
|
366
374
|
])
|
|
367
375
|
]));
|
|
368
376
|
}
|
|
369
377
|
});
|
|
370
378
|
export {
|
|
371
|
-
|
|
379
|
+
xt as default
|
|
372
380
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Feed.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd5bf82f"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|