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