@mobilon-dev/chotto 0.3.91 → 0.3.93

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