@mobilon-dev/chotto 0.3.99 → 0.3.100
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/1_atoms/EmojiGlyph/EmojiGlyph.vue.js +15 -15
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +1 -1
- package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +79 -65
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +1 -1
- package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +150 -150
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue.js +2 -2
- package/dist/components/2_feed_elements/MessageReactions/MessageReactions.vue2.js +79 -78
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ReplyStickerMessage/ReplyStickerMessage.vue2.js +42 -42
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +68 -68
- package/dist/functions/renderAppleEmojis.js +120 -91
- package/dist/hooks/messages/useMessageLinks.js +15 -15
- package/dist/hooks/useEmojiNative.js +24 -12
- package/dist/node_modules/vue3-emoji-picker-ru/dist/emoji-picker.es.js +581 -555
- 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/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +21 -2
- package/dist/types/functions/renderAppleEmojis.d.ts +13 -10
- package/dist/types/hooks/useEmojiNative.d.ts +5 -2
- package/package.json +2 -2
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Vt, inject as Ht, useId as Nt, ref as M, computed as u, watch as Ut, onMounted as Dt, nextTick as D, onUnmounted as Ft, createElementBlock as c, openBlock as o, createElementVNode as m, createCommentVNode as r, withModifiers as Pt, normalizeClass as F, normalizeStyle as et, createVNode as P, withCtx as R, toDisplayString as f, createBlock as d, resolveDynamicComponent as nt, unref as h, Teleport as Rt, Fragment as Wt, renderList as jt } from "vue";
|
|
2
2
|
import { getStatus as Xt, statuses as Yt } from "../../../functions/getStatusMessage.js";
|
|
3
3
|
import "../../../functions/parseMarkdown.js";
|
|
4
|
-
import { t as
|
|
4
|
+
import { t as L } from "../../../locale/useLocale.js";
|
|
5
5
|
import { getChatDraft as $t } from "../../../hooks/useMessageDraft.js";
|
|
6
6
|
import "../../../hooks/useSearchModel.js";
|
|
7
|
-
import { useTheme as
|
|
8
|
-
import { useEmojiNative as
|
|
7
|
+
import { useTheme as zt } from "../../../hooks/useTheme.js";
|
|
8
|
+
import { useEmojiNative as Ot } from "../../../hooks/useEmojiNative.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
/* empty css */
|
|
11
11
|
/* empty css */
|
|
12
12
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
13
13
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
14
|
-
import { textToAppleEmojiHtml as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
14
|
+
import { textToAppleEmojiHtml as W, textContainsEmoji as it } from "../../../functions/renderAppleEmojis.js";
|
|
15
|
+
import ot from "../../1_atoms/Tooltip/Tooltip.vue.js";
|
|
16
|
+
import qt from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
|
|
17
|
+
import Gt from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
|
|
18
|
+
import Jt from "../../1_icons/AvatarIcon.vue.js";
|
|
19
|
+
import Kt from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
|
|
20
|
+
import Qt from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
|
|
21
|
+
import Zt from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
|
|
22
|
+
import te from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
|
|
23
|
+
import ee from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
|
|
24
|
+
import at from "./icons/AudioIcon.vue.js";
|
|
25
|
+
import j from "./icons/FileIcon.vue.js";
|
|
26
26
|
import ct from "./icons/ImageIcon.vue.js";
|
|
27
|
-
import
|
|
27
|
+
import ne from "./icons/MissedCallIcon.vue.js";
|
|
28
28
|
import X from "./icons/StickerIcon.vue.js";
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
const
|
|
29
|
+
import st from "./icons/VideoIcon.vue.js";
|
|
30
|
+
import rt from "./icons/VoiceIcon.vue.js";
|
|
31
|
+
const ie = { class: "chat-item__avatar-container" }, oe = ["src"], ae = {
|
|
32
32
|
key: 1,
|
|
33
33
|
class: "chat-item__avatar-placeholder"
|
|
34
|
-
}, ce = { class: "chat-item__info-container" },
|
|
34
|
+
}, ce = { class: "chat-item__info-container" }, se = ["innerHTML"], re = {
|
|
35
35
|
key: 1,
|
|
36
36
|
class: "chat-item__name"
|
|
37
|
-
},
|
|
37
|
+
}, le = {
|
|
38
38
|
key: 0,
|
|
39
39
|
class: "chat-item__last-message"
|
|
40
|
-
},
|
|
40
|
+
}, ue = {
|
|
41
41
|
key: 1,
|
|
42
42
|
class: "chat-item__last-message-text chat-item__last-message-text--draft"
|
|
43
|
-
},
|
|
43
|
+
}, me = { class: "chat-item__draft-label" }, de = ["innerHTML"], he = {
|
|
44
44
|
key: 2,
|
|
45
45
|
class: "chat-item__draft-text"
|
|
46
|
-
},
|
|
46
|
+
}, fe = ["innerHTML"], ve = {
|
|
47
47
|
key: 3,
|
|
48
48
|
class: "chat-item__last-message-text"
|
|
49
|
-
},
|
|
49
|
+
}, ge = { class: "chat-item__details-container" }, ye = {
|
|
50
50
|
key: 0,
|
|
51
51
|
class: "chat-item__time"
|
|
52
|
-
},
|
|
52
|
+
}, pe = { class: "chat-item__status-unread-container" }, _e = {
|
|
53
53
|
key: 1,
|
|
54
54
|
class: "chat-item__unread"
|
|
55
|
-
},
|
|
55
|
+
}, ke = {
|
|
56
56
|
key: 2,
|
|
57
57
|
class: "chat-item__status-chat-container"
|
|
58
|
-
},
|
|
58
|
+
}, xe = {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "chat-item__fixed pi pi-thumbtack"
|
|
61
|
-
},
|
|
61
|
+
}, we = {
|
|
62
62
|
key: 0,
|
|
63
63
|
id: "noSelectButton",
|
|
64
64
|
class: "chat-item__menu-button"
|
|
65
|
-
},
|
|
65
|
+
}, Ce = {
|
|
66
66
|
key: 1,
|
|
67
67
|
id: "noSelectButton",
|
|
68
68
|
class: "chat-item__menu-button"
|
|
69
|
-
},
|
|
69
|
+
}, Ie = {
|
|
70
70
|
key: 0,
|
|
71
71
|
class: "dialog__container"
|
|
72
|
-
},
|
|
72
|
+
}, Te = ["onClick"], Me = ["src"], Ee = {
|
|
73
73
|
key: 1,
|
|
74
74
|
class: "dialog__icon pi pi-user"
|
|
75
|
-
},
|
|
75
|
+
}, Se = { class: "dialog__text-container" }, Le = { class: "dialog__name" }, be = { class: "dialog__time" }, rn = /* @__PURE__ */ Vt({
|
|
76
76
|
__name: "ChatItem",
|
|
77
77
|
props: {
|
|
78
78
|
chat: {},
|
|
@@ -80,26 +80,26 @@ const ne = { class: "chat-item__avatar-container" }, ie = ["src"], oe = {
|
|
|
80
80
|
contextMenuTrigger: { default: "hover" }
|
|
81
81
|
},
|
|
82
82
|
emits: ["select", "action", "expand"],
|
|
83
|
-
setup(
|
|
84
|
-
const b =
|
|
85
|
-
|
|
86
|
-
}, mt = (t) => {
|
|
87
|
-
A.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && E("select", { chat: n.chat, dialog: null }), A.value = !1;
|
|
83
|
+
setup(a, { emit: lt }) {
|
|
84
|
+
const b = Ht("chatAppId"), { getTheme: Y } = zt(b), { isNative: $, emojiSrc: A } = Ot(b), n = a, E = lt, y = Nt(), p = M(!1), k = M(!1), B = M(!1), ut = M(null), mt = () => {
|
|
85
|
+
B.value = !0;
|
|
88
86
|
}, dt = (t) => {
|
|
87
|
+
B.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && E("select", { chat: n.chat, dialog: null }), B.value = !1;
|
|
88
|
+
}, ht = (t) => {
|
|
89
89
|
E("select", { chat: n.chat, dialog: t });
|
|
90
|
-
},
|
|
91
|
-
n.contextMenuTrigger === "rightClick" &&
|
|
92
|
-
},
|
|
90
|
+
}, ft = () => n.chat.isSelected ? "chat-item__selected" : "", vt = (t) => t.isSelected ? "dialog__selected" : "", z = (t) => {
|
|
91
|
+
n.contextMenuTrigger === "rightClick" && V(), E("action", { chat: n.chat, ...t });
|
|
92
|
+
}, V = () => {
|
|
93
93
|
const t = document.getElementById("context-menu-rightclick-" + y);
|
|
94
94
|
t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), k.value = !1;
|
|
95
|
-
},
|
|
95
|
+
}, gt = () => {
|
|
96
96
|
document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((e) => {
|
|
97
97
|
const i = e;
|
|
98
98
|
i.id !== "context-menu-rightclick-" + y && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
|
|
99
99
|
});
|
|
100
|
-
},
|
|
101
|
-
let
|
|
102
|
-
const _ = M(0),
|
|
100
|
+
}, yt = () => n.chat.dialogs ? [...n.chat.dialogs].sort((t, e) => Number(t["lastActivity.timestamp"]) > Number(e["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(e["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(e["lastActivity.timestamp"]), 0)) : [], pt = u(() => Xt(n.chat["lastMessage.status"])), _t = u(() => n.chat.showEmptyIndicator || n.chat.countUnread > 0), kt = u(() => n.chat.countUnread > 0 ? n.chat.countUnread > 99 ? "99+" : n.chat.countUnread : n.chat.showEmptyIndicator ? "" : void 0);
|
|
101
|
+
let S;
|
|
102
|
+
const _ = M(0), O = [L("component.ChatItem.typing") + ".", L("component.ChatItem.typing") + "..", L("component.ChatItem.typing") + "..."], q = (t) => {
|
|
103
103
|
var l, s, v;
|
|
104
104
|
if (typeof t == "string")
|
|
105
105
|
return t;
|
|
@@ -114,24 +114,24 @@ const ne = { class: "chat-item__avatar-container" }, ie = ["src"], oe = {
|
|
|
114
114
|
return e;
|
|
115
115
|
const i = (v = t == null ? void 0 : t.data) == null ? void 0 : v.filename;
|
|
116
116
|
return i || "";
|
|
117
|
-
},
|
|
117
|
+
}, xt = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, H = L("component.ChatItem.draft"), N = u(() => {
|
|
118
118
|
const t = $t(String(b ?? ""), n.chat.chatId);
|
|
119
119
|
if (!(!t || t.edit) && !(!t.listPreviewText && !t.listPreviewFile) && !(!(t.text || "").trim() && !t.file))
|
|
120
120
|
return t;
|
|
121
|
-
}), x = u(() => !!
|
|
121
|
+
}), x = u(() => !!N.value), g = u(() => {
|
|
122
122
|
var e;
|
|
123
|
-
const t =
|
|
123
|
+
const t = N.value;
|
|
124
124
|
return t ? t.file ? (((e = t.listPreviewFile) == null ? void 0 : e.name) || t.file.name || "").trim() : (t.listPreviewText || "").trim() : "";
|
|
125
|
-
}),
|
|
126
|
-
const t =
|
|
125
|
+
}), G = u(() => {
|
|
126
|
+
const t = N.value;
|
|
127
127
|
if (!(t != null && t.file)) return null;
|
|
128
128
|
const e = t.listPreviewFile, i = ((e == null ? void 0 : e.type) || t.file.type || "").toLowerCase(), l = ((e == null ? void 0 : e.name) || t.file.name || "").toLowerCase();
|
|
129
|
-
return i === "sticker" || l.endsWith(".tgs") || l.endsWith(".webp") ? X : i === "image" || i.includes("image") ? ct : i === "video" || i.includes("video") ?
|
|
130
|
-
}),
|
|
129
|
+
return i === "sticker" || l.endsWith(".tgs") || l.endsWith(".webp") ? X : i === "image" || i.includes("image") ? ct : i === "video" || i.includes("video") ? st : i === "audio" || i.includes("audio") ? l.includes("voice") || l.includes("голос") ? rt : at : i === "file" || l ? j : j;
|
|
130
|
+
}), wt = u(() => W(g.value || "", null, A.value)), J = u(() => {
|
|
131
131
|
var e, i, l;
|
|
132
132
|
if (n.chat.typing || x.value)
|
|
133
133
|
return null;
|
|
134
|
-
const t =
|
|
134
|
+
const t = xt(n.chat.lastMessage);
|
|
135
135
|
if (!t)
|
|
136
136
|
return null;
|
|
137
137
|
if (t === "message.sticker")
|
|
@@ -139,190 +139,190 @@ const ne = { class: "chat-item__avatar-container" }, ie = ["src"], oe = {
|
|
|
139
139
|
if (t === "message.image")
|
|
140
140
|
return ct;
|
|
141
141
|
if (t === "message.video")
|
|
142
|
-
return
|
|
142
|
+
return st;
|
|
143
143
|
if (t === "message.audio") {
|
|
144
144
|
const s = n.chat.lastMessage;
|
|
145
|
-
return (s.isVoiceMessage || ((e = s == null ? void 0 : s.data) == null ? void 0 : e.isVoiceMessage)) === !0 ?
|
|
145
|
+
return (s.isVoiceMessage || ((e = s == null ? void 0 : s.data) == null ? void 0 : e.isVoiceMessage)) === !0 ? rt : at;
|
|
146
146
|
}
|
|
147
147
|
if (t === "message.missedCall")
|
|
148
|
-
return
|
|
148
|
+
return ne;
|
|
149
149
|
if (t === "message.file") {
|
|
150
150
|
const s = n.chat.lastMessage, v = ((l = (i = s == null ? void 0 : s.data) == null ? void 0 : i.filename) == null ? void 0 : l.toLowerCase()) || "";
|
|
151
|
-
return v.endsWith(".tgs") || v.endsWith(".webp") ? X :
|
|
151
|
+
return v.endsWith(".tgs") || v.endsWith(".webp") ? X : j;
|
|
152
152
|
}
|
|
153
153
|
return null;
|
|
154
|
-
}),
|
|
155
|
-
() => !$.value &&
|
|
156
|
-
),
|
|
157
|
-
() => !$.value &&
|
|
158
|
-
),
|
|
159
|
-
|
|
154
|
+
}), Ct = u(() => n.chat.typing ? O[_.value] : x.value ? g.value ? `${H} ${g.value}` : H : q(n.chat.lastMessage)), U = u(() => n.chat.typing ? O[_.value] : q(n.chat.lastMessage)), K = u(
|
|
155
|
+
() => !$.value && it(g.value || U.value || "")
|
|
156
|
+
), It = u(
|
|
157
|
+
() => !$.value && it(n.chat.name || "")
|
|
158
|
+
), Tt = u(() => W(U.value || "", null, A.value)), Mt = u(() => W(n.chat.name || "", null, A.value));
|
|
159
|
+
Ut(
|
|
160
160
|
() => n.chat.typing,
|
|
161
161
|
() => {
|
|
162
|
-
n.chat.typing ?
|
|
162
|
+
n.chat.typing ? S = setInterval(() => {
|
|
163
163
|
_.value < 2 ? _.value += 1 : _.value = 0;
|
|
164
|
-
}, 1e3) : (_.value = 0,
|
|
164
|
+
}, 1e3) : (_.value = 0, S && (clearInterval(S), S = void 0));
|
|
165
165
|
},
|
|
166
166
|
{ immediate: !0 }
|
|
167
167
|
);
|
|
168
|
-
const
|
|
168
|
+
const Et = () => {
|
|
169
169
|
n.contextMenuTrigger === "hover" && (p.value = !0);
|
|
170
|
-
},
|
|
170
|
+
}, St = (t) => {
|
|
171
171
|
n.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? p.value = !0 : p.value = !1);
|
|
172
172
|
}, Lt = (t) => {
|
|
173
|
-
n.contextMenuTrigger === "rightClick" && n.chat.actions &&
|
|
174
|
-
},
|
|
175
|
-
|
|
173
|
+
n.contextMenuTrigger === "rightClick" && n.chat.actions && bt(t);
|
|
174
|
+
}, bt = (t) => {
|
|
175
|
+
gt(), k.value = !0, D(() => {
|
|
176
176
|
const e = document.getElementById("context-menu-rightclick-" + y);
|
|
177
177
|
if (e) {
|
|
178
178
|
const i = t.clientX, l = t.clientY;
|
|
179
179
|
e.style.display = "inherit";
|
|
180
180
|
const s = e.getBoundingClientRect();
|
|
181
|
-
e.style.display = "none",
|
|
182
|
-
const v = window.innerWidth,
|
|
181
|
+
e.style.display = "none", D(() => {
|
|
182
|
+
const v = window.innerWidth, tt = window.innerHeight, w = window.scrollX || window.pageXOffset, C = window.scrollY || window.pageYOffset;
|
|
183
183
|
let I = i + w, T = l + C;
|
|
184
|
-
I + s.width > v + w && (I = i + w - s.width), T + s.height >
|
|
184
|
+
I + s.width > v + w && (I = i + w - s.width), T + s.height > tt + C && (T = l + C - s.height), I < w && (I = w), T < C && (T = C), e.style.top = T + "px", e.style.left = I + "px", e.style.opacity = "1", e.style.display = "inherit";
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
|
-
}, bt = () => {
|
|
189
188
|
}, At = () => {
|
|
190
|
-
},
|
|
189
|
+
}, Bt = () => {
|
|
190
|
+
}, Q = (t) => {
|
|
191
191
|
if (n.contextMenuTrigger === "rightClick" && k.value) {
|
|
192
192
|
const e = t.target, i = document.getElementById("context-menu-rightclick-" + y);
|
|
193
|
-
(!i || !i.contains(e)) &&
|
|
193
|
+
(!i || !i.contains(e)) && V();
|
|
194
194
|
}
|
|
195
|
-
},
|
|
196
|
-
n.contextMenuTrigger === "rightClick" && k.value &&
|
|
195
|
+
}, Z = () => {
|
|
196
|
+
n.contextMenuTrigger === "rightClick" && k.value && V();
|
|
197
197
|
};
|
|
198
|
-
return
|
|
199
|
-
n.contextMenuTrigger === "rightClick" && (document.addEventListener("click",
|
|
198
|
+
return Dt(() => {
|
|
199
|
+
n.contextMenuTrigger === "rightClick" && (document.addEventListener("click", Q), window.addEventListener("scroll", Z, !0), D(() => {
|
|
200
200
|
const t = document.getElementById("context-menu-rightclick-" + y);
|
|
201
201
|
t && (t.style.display = "none", t.style.opacity = "0");
|
|
202
202
|
}));
|
|
203
|
-
}),
|
|
204
|
-
document.removeEventListener("click",
|
|
205
|
-
}), (t, e) => (o(),
|
|
203
|
+
}), Ft(() => {
|
|
204
|
+
document.removeEventListener("click", Q), window.removeEventListener("scroll", Z, !0);
|
|
205
|
+
}), (t, e) => (o(), c("div", null, [
|
|
206
206
|
m("div", {
|
|
207
207
|
ref_key: "containerRef",
|
|
208
|
-
ref:
|
|
209
|
-
class:
|
|
210
|
-
onMouseenter:
|
|
211
|
-
onMouseleave:
|
|
212
|
-
onClick:
|
|
213
|
-
onContextmenu:
|
|
208
|
+
ref: ut,
|
|
209
|
+
class: F(["chat-item__container", ft()]),
|
|
210
|
+
onMouseenter: Et,
|
|
211
|
+
onMouseleave: St,
|
|
212
|
+
onClick: dt,
|
|
213
|
+
onContextmenu: Pt(Lt, ["prevent"])
|
|
214
214
|
}, [
|
|
215
|
-
m("div",
|
|
215
|
+
m("div", ie, [
|
|
216
216
|
m("span", {
|
|
217
217
|
class: "chat-item__status-user",
|
|
218
|
-
style:
|
|
218
|
+
style: et({ backgroundColor: n.chat.status })
|
|
219
219
|
}, null, 4),
|
|
220
|
-
n.chat.avatar ? (o(),
|
|
220
|
+
n.chat.avatar ? (o(), c("img", {
|
|
221
221
|
key: 0,
|
|
222
222
|
src: n.chat.avatar,
|
|
223
223
|
height: "48",
|
|
224
224
|
width: "48"
|
|
225
|
-
}, null, 8,
|
|
226
|
-
|
|
225
|
+
}, null, 8, oe)) : (o(), c("div", ae, [
|
|
226
|
+
P(Jt)
|
|
227
227
|
]))
|
|
228
228
|
]),
|
|
229
229
|
m("div", ce, [
|
|
230
|
-
|
|
231
|
-
text:
|
|
230
|
+
P(ot, {
|
|
231
|
+
text: a.chat.name,
|
|
232
232
|
position: "bottom"
|
|
233
233
|
}, {
|
|
234
|
-
default:
|
|
235
|
-
|
|
234
|
+
default: R(() => [
|
|
235
|
+
It.value ? (o(), c("div", {
|
|
236
236
|
key: 0,
|
|
237
237
|
class: "chat-item__name",
|
|
238
|
-
innerHTML:
|
|
239
|
-
}, null, 8,
|
|
238
|
+
innerHTML: Mt.value
|
|
239
|
+
}, null, 8, se)) : (o(), c("div", re, f(a.chat.name), 1))
|
|
240
240
|
]),
|
|
241
241
|
_: 1
|
|
242
242
|
}, 8, ["text"]),
|
|
243
|
-
|
|
244
|
-
text:
|
|
243
|
+
P(ot, {
|
|
244
|
+
text: Ct.value,
|
|
245
245
|
position: "bottom"
|
|
246
246
|
}, {
|
|
247
|
-
default:
|
|
248
|
-
|
|
249
|
-
|
|
247
|
+
default: R(() => [
|
|
248
|
+
a.chat.lastMessage || a.chat.typing || x.value ? (o(), c("div", le, [
|
|
249
|
+
J.value && !x.value ? (o(), d(nt(J.value), {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "chat-item__message-icon"
|
|
252
252
|
})) : r("", !0),
|
|
253
|
-
x.value ? (o(),
|
|
254
|
-
m("span",
|
|
255
|
-
|
|
253
|
+
x.value ? (o(), c("span", ue, [
|
|
254
|
+
m("span", me, f(h(H)), 1),
|
|
255
|
+
G.value ? (o(), d(nt(G.value), {
|
|
256
256
|
key: 0,
|
|
257
257
|
class: "chat-item__message-icon"
|
|
258
258
|
})) : r("", !0),
|
|
259
|
-
g.value &&
|
|
259
|
+
g.value && K.value ? (o(), c("span", {
|
|
260
260
|
key: 1,
|
|
261
261
|
class: "chat-item__draft-text",
|
|
262
|
-
innerHTML:
|
|
263
|
-
}, null, 8,
|
|
264
|
-
])) :
|
|
262
|
+
innerHTML: wt.value
|
|
263
|
+
}, null, 8, de)) : g.value ? (o(), c("span", he, f(g.value), 1)) : r("", !0)
|
|
264
|
+
])) : K.value ? (o(), c("span", {
|
|
265
265
|
key: 2,
|
|
266
266
|
class: "chat-item__last-message-text",
|
|
267
|
-
innerHTML:
|
|
268
|
-
}, null, 8,
|
|
267
|
+
innerHTML: Tt.value
|
|
268
|
+
}, null, 8, fe)) : (o(), c("span", ve, f(U.value), 1))
|
|
269
269
|
])) : r("", !0)
|
|
270
270
|
]),
|
|
271
271
|
_: 1
|
|
272
272
|
}, 8, ["text"])
|
|
273
273
|
]),
|
|
274
|
-
m("div",
|
|
275
|
-
|
|
276
|
-
p.value &&
|
|
274
|
+
m("div", ge, [
|
|
275
|
+
a.chat["lastActivity.time"] && (!a.chat.actions || !p.value) ? (o(), c("div", ye, f(a.chat["lastActivity.time"]), 1)) : r("", !0),
|
|
276
|
+
p.value && a.chat.actions && a.contextMenuTrigger === "hover" ? (o(), d(qt, {
|
|
277
277
|
key: 1,
|
|
278
278
|
mode: "click",
|
|
279
279
|
"menu-side": "bottom-right",
|
|
280
|
-
actions:
|
|
281
|
-
onClick:
|
|
282
|
-
onButtonClick:
|
|
280
|
+
actions: a.chat.actions,
|
|
281
|
+
onClick: z,
|
|
282
|
+
onButtonClick: mt,
|
|
283
283
|
onMenuMouseLeave: e[0] || (e[0] = (i) => p.value = !1)
|
|
284
284
|
}, {
|
|
285
|
-
default:
|
|
285
|
+
default: R(() => [...e[2] || (e[2] = [
|
|
286
286
|
m("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
|
|
287
287
|
])]),
|
|
288
288
|
_: 1
|
|
289
289
|
}, 8, ["actions"])) : r("", !0),
|
|
290
|
-
(o(), d(
|
|
291
|
-
|
|
290
|
+
(o(), d(Rt, { to: "body" }, [
|
|
291
|
+
a.contextMenuTrigger === "rightClick" && a.chat.actions && k.value ? (o(), d(Gt, {
|
|
292
292
|
key: 0,
|
|
293
293
|
id: "context-menu-rightclick-" + h(y),
|
|
294
|
-
actions:
|
|
294
|
+
actions: a.chat.actions,
|
|
295
295
|
"data-theme": h(Y)().theme ? h(Y)().theme : "light",
|
|
296
|
-
onClick:
|
|
297
|
-
onMouseenter:
|
|
298
|
-
onMouseleave:
|
|
296
|
+
onClick: z,
|
|
297
|
+
onMouseenter: At,
|
|
298
|
+
onMouseleave: Bt
|
|
299
299
|
}, null, 8, ["id", "actions", "data-theme"])) : r("", !0)
|
|
300
300
|
])),
|
|
301
|
-
m("div",
|
|
302
|
-
h(Yt).includes(
|
|
301
|
+
m("div", pe, [
|
|
302
|
+
h(Yt).includes(a.chat["lastMessage.status"]) ? (o(), c("div", {
|
|
303
303
|
key: 0,
|
|
304
|
-
class:
|
|
304
|
+
class: F(["chat-item__status-message", pt.value])
|
|
305
305
|
}, [
|
|
306
|
-
|
|
306
|
+
a.chat["lastMessage.status"] === "pending" ? (o(), d(h(Qt), { key: 0 })) : a.chat["lastMessage.status"] === "error" ? (o(), d(h(Kt), { key: 1 })) : a.chat["lastMessage.status"] === "read" ? (o(), d(h(Zt), { key: 2 })) : a.chat["lastMessage.status"] === "received" ? (o(), d(h(te), { key: 3 })) : (o(), d(h(ee), { key: 4 }))
|
|
307
307
|
], 2)) : r("", !0),
|
|
308
|
-
|
|
308
|
+
_t.value ? (o(), c("div", _e, f(kt.value), 1)) : r("", !0)
|
|
309
309
|
]),
|
|
310
|
-
|
|
311
|
-
|
|
310
|
+
a.chat.countUnread < 1 ? (o(), c("div", ke, [
|
|
311
|
+
a.chat.isFixedTop || a.chat.isFixedBottom ? (o(), c("span", xe)) : r("", !0)
|
|
312
312
|
])) : r("", !0)
|
|
313
313
|
]),
|
|
314
|
-
n.showDialogs &&
|
|
314
|
+
n.showDialogs && a.chat.dialogs ? (o(), c("div", {
|
|
315
315
|
key: 0,
|
|
316
316
|
class: "chat-item__dialog-buttons",
|
|
317
317
|
onClick: e[1] || (e[1] = (i) => E("expand", n.chat))
|
|
318
318
|
}, [
|
|
319
|
-
n.showDialogs && !
|
|
319
|
+
n.showDialogs && !a.chat.dialogsExpanded ? (o(), c("button", we, [...e[3] || (e[3] = [
|
|
320
320
|
m("span", {
|
|
321
321
|
id: "noSelectButton",
|
|
322
322
|
class: "pi pi-angle-down"
|
|
323
323
|
}, null, -1)
|
|
324
324
|
])])) : r("", !0),
|
|
325
|
-
n.showDialogs &&
|
|
325
|
+
n.showDialogs && a.chat.dialogsExpanded ? (o(), c("button", Ce, [...e[4] || (e[4] = [
|
|
326
326
|
m("span", {
|
|
327
327
|
id: "noSelectButton",
|
|
328
328
|
class: "pi pi-angle-up"
|
|
@@ -330,33 +330,33 @@ const ne = { class: "chat-item__avatar-container" }, ie = ["src"], oe = {
|
|
|
330
330
|
])])) : r("", !0)
|
|
331
331
|
])) : r("", !0)
|
|
332
332
|
], 34),
|
|
333
|
-
n.showDialogs &&
|
|
334
|
-
(o(!0),
|
|
333
|
+
n.showDialogs && a.chat.dialogsExpanded ? (o(), c("div", Ie, [
|
|
334
|
+
(o(!0), c(Wt, null, jt(yt(), (i) => (o(), c("div", {
|
|
335
335
|
key: i.dialogId,
|
|
336
|
-
class:
|
|
337
|
-
onClick: (l) =>
|
|
336
|
+
class: F(["dialog__item", vt(i)]),
|
|
337
|
+
onClick: (l) => ht(i)
|
|
338
338
|
}, [
|
|
339
|
-
i.icon ? (o(),
|
|
339
|
+
i.icon ? (o(), c("img", {
|
|
340
340
|
key: 0,
|
|
341
341
|
class: "dialog__icon",
|
|
342
342
|
src: i.icon,
|
|
343
343
|
height: "16",
|
|
344
344
|
width: "16"
|
|
345
|
-
}, null, 8,
|
|
346
|
-
m("div",
|
|
345
|
+
}, null, 8, Me)) : (o(), c("span", Ee)),
|
|
346
|
+
m("div", Se, [
|
|
347
347
|
m("div", Le, f(i.name), 1),
|
|
348
|
-
m("div",
|
|
348
|
+
m("div", be, f(i["lastActivity.time"]), 1)
|
|
349
349
|
]),
|
|
350
|
-
i.countUnread > 0 ? (o(),
|
|
350
|
+
i.countUnread > 0 ? (o(), c("div", {
|
|
351
351
|
key: 2,
|
|
352
352
|
class: "chat-item__unread",
|
|
353
|
-
style:
|
|
353
|
+
style: et(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
|
|
354
354
|
}, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : r("", !0)
|
|
355
|
-
], 10,
|
|
355
|
+
], 10, Te))), 128))
|
|
356
356
|
])) : r("", !0)
|
|
357
357
|
]));
|
|
358
358
|
}
|
|
359
359
|
});
|
|
360
360
|
export {
|
|
361
|
-
|
|
361
|
+
rn as default
|
|
362
362
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./MessageReactions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2a664cc0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|