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