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