@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.
@@ -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 e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-1ca829e7"]]);
5
5
  export {
6
- p as default
6
+ e 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 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 N } from "../../../locale/useLocale.js";
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 Vt } from "../../../hooks/useTheme.js";
8
- import { useEmojiNative as Nt } from "../../../hooks/useEmojiNative.js";
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 { 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 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
- }, Qt = { class: "chat-item__info-container" }, Zt = ["innerHTML"], te = {
34
+ }, ne = { class: "chat-item__info-container" }, ie = ["innerHTML"], oe = {
35
35
  key: 1,
36
36
  class: "chat-item__name"
37
- }, ee = {
37
+ }, ce = {
38
38
  key: 0,
39
39
  class: "chat-item__last-message"
40
- }, ne = ["innerHTML"], ie = {
41
- key: 2,
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
- }, oe = { class: "chat-item__details-container" }, ce = {
49
+ }, de = { class: "chat-item__details-container" }, he = {
44
50
  key: 0,
45
51
  class: "chat-item__time"
46
- }, se = { class: "chat-item__status-unread-container" }, ae = {
52
+ }, fe = { class: "chat-item__status-unread-container" }, ge = {
47
53
  key: 1,
48
54
  class: "chat-item__unread"
49
- }, re = {
55
+ }, ve = {
50
56
  key: 2,
51
57
  class: "chat-item__status-chat-container"
52
- }, le = {
58
+ }, ye = {
53
59
  key: 0,
54
60
  class: "chat-item__fixed pi pi-thumbtack"
55
- }, ue = {
61
+ }, pe = {
56
62
  key: 0,
57
63
  id: "noSelectButton",
58
64
  class: "chat-item__menu-button"
59
- }, me = {
65
+ }, _e = {
60
66
  key: 1,
61
67
  id: "noSelectButton",
62
68
  class: "chat-item__menu-button"
63
- }, de = {
69
+ }, ke = {
64
70
  key: 0,
65
71
  class: "dialog__container"
66
- }, he = ["onClick"], fe = ["src"], ge = {
72
+ }, xe = ["onClick"], Ce = ["src"], we = {
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
+ }, 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: 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
+ 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
- }, 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);
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
- }, it = () => {
90
- document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
91
- 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");
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
- }, 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
+ }, 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 || ((m = t == null ? void 0 : t.data) == null ? void 0 : m.isVoiceMessage)) === !0 ? "Голосовое сообщение" : "Аудиофайл";
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 n = (a = t == null ? void 0 : t.data) == null ? void 0 : a.text;
107
- if (n)
108
- return n;
109
- const i = (f = t == null ? void 0 : t.data) == null ? void 0 : f.filename;
110
- return i || "";
111
- }, rt = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, j = u(() => {
112
- var n, i, m;
113
- if (e.chat.typing)
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 = rt(e.chat.lastMessage);
125
+ const t = mt(e.chat.lastMessage);
116
126
  if (!t)
117
127
  return null;
118
128
  if (t === "message.sticker")
119
- return G;
129
+ return Q;
120
130
  if (t === "message.image")
121
- return zt;
131
+ return Gt;
122
132
  if (t === "message.video")
123
- return qt;
133
+ return Kt;
124
134
  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;
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 Ot;
139
+ return Jt;
130
140
  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;
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
- }), 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(
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 ? T = setInterval(() => {
144
- p.value < 2 ? p.value += 1 : p.value = 0;
145
- }, 1e3) : (p.value = 0, T && (clearInterval(T), T = void 0));
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 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);
158
- if (n) {
159
- const i = t.clientX, m = t.clientY;
160
- 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";
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
- }, pt = () => {
170
- }, kt = () => {
171
- }, F = (t) => {
179
+ }, xt = () => {
180
+ }, Ct = () => {
181
+ }, O = (t) => {
172
182
  if (e.contextMenuTrigger === "rightClick" && k.value) {
173
- const n = t.target, i = document.getElementById("context-menu-rightclick-" + v);
174
- (!i || !i.contains(n)) && S();
183
+ const i = t.target, o = document.getElementById("context-menu-rightclick-" + y);
184
+ (!o || !o.contains(i)) && A();
175
185
  }
176
- }, W = () => {
177
- e.contextMenuTrigger === "rightClick" && k.value && S();
186
+ }, P = () => {
187
+ e.contextMenuTrigger === "rightClick" && k.value && A();
178
188
  };
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);
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
- }), Mt(() => {
185
- document.removeEventListener("click", F), window.removeEventListener("scroll", W, !0);
186
- }), (t, n) => (o(), s("div", null, [
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: K,
190
- class: b(["chat-item__container", et()]),
191
- onMouseenter: ft,
192
- onMouseleave: gt,
193
- onClick: Z,
194
- onContextmenu: Tt(vt, ["prevent"])
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", Gt, [
206
+ l("div", Zt, [
197
207
  l("span", {
198
208
  class: "chat-item__status-user",
199
- style: z({ backgroundColor: e.chat.status })
209
+ style: G({ backgroundColor: e.chat.status })
200
210
  }, null, 4),
201
- e.chat.avatar ? (o(), s("img", {
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, Jt)) : (o(), s("div", Kt, [
207
- L(Dt)
216
+ }, null, 8, te)) : (n(), a("div", ee, [
217
+ N($t)
208
218
  ]))
209
219
  ]),
210
- l("div", Qt, [
211
- L(P, {
220
+ l("div", ne, [
221
+ N(K, {
212
222
  text: c.chat.name,
213
223
  position: "bottom"
214
224
  }, {
215
- default: V(() => [
216
- mt.value ? (o(), s("div", {
225
+ default: U(() => [
226
+ ft.value ? (n(), a("div", {
217
227
  key: 0,
218
228
  class: "chat-item__name",
219
- innerHTML: ht.value
220
- }, null, 8, Zt)) : (o(), s("div", te, g(c.chat.name), 1))
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
- L(P, {
225
- text: lt.value,
234
+ N(K, {
235
+ text: ht.value,
226
236
  position: "bottom"
227
237
  }, {
228
- default: V(() => [
229
- c.chat.lastMessage || c.chat.typing ? (o(), s("div", ee, [
230
- j.value ? (o(), d(Et(j.value), {
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
- ut.value ? (o(), s("span", {
235
- key: 1,
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: dt.value
238
- }, null, 8, ne)) : (o(), s("span", ie, g(A.value), 1))
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", 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, {
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: R,
252
- onButtonClick: Q,
253
- onMenuMouseLeave: n[0] || (n[0] = (i) => y.value = !1)
268
+ onClick: Y,
269
+ onButtonClick: et,
270
+ onMenuMouseLeave: i[0] || (i[0] = (o) => p.value = !1)
254
271
  }, {
255
- default: V(() => [...n[2] || (n[2] = [
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
- (o(), d(St, { to: "body" }, [
261
- c.contextMenuTrigger === "rightClick" && c.chat.actions && k.value ? (o(), d(Ht, {
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-" + h(v),
280
+ id: "context-menu-rightclick-" + m(y),
264
281
  actions: c.chat.actions,
265
- "data-theme": h(H)().theme ? h(H)().theme : "light",
266
- onClick: R,
267
- onMouseenter: pt,
268
- onMouseleave: kt
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", se, [
272
- h(Lt).includes(c.chat["lastMessage.status"]) ? (o(), s("div", {
288
+ l("div", fe, [
289
+ m(Nt).includes(c.chat["lastMessage.status"]) ? (n(), a("div", {
273
290
  key: 0,
274
- class: b(["chat-item__status-message", ct.value])
291
+ class: H(["chat-item__status-message", rt.value])
275
292
  }, [
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 }))
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
- st.value ? (o(), s("div", ae, g(at.value), 1)) : r("", !0)
295
+ lt.value ? (n(), a("div", ge, f(ut.value), 1)) : r("", !0)
279
296
  ]),
280
- c.chat.countUnread < 1 ? (o(), s("div", re, [
281
- c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span", le)) : r("", !0)
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 ? (o(), s("div", {
301
+ e.showDialogs && c.chat.dialogs ? (n(), a("div", {
285
302
  key: 0,
286
303
  class: "chat-item__dialog-buttons",
287
- onClick: n[1] || (n[1] = (i) => M("expand", e.chat))
304
+ onClick: i[1] || (i[1] = (o) => M("expand", e.chat))
288
305
  }, [
289
- e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button", ue, [...n[3] || (n[3] = [
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 ? (o(), s("button", me, [...n[4] || (n[4] = [
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 ? (o(), s("div", de, [
304
- (o(!0), s(At, null, Bt(ot(), (i) => (o(), s("div", {
305
- key: i.dialogId,
306
- class: b(["dialog__item", nt(i)]),
307
- onClick: (m) => tt(i)
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
- i.icon ? (o(), s("img", {
326
+ o.icon ? (n(), a("img", {
310
327
  key: 0,
311
328
  class: "dialog__icon",
312
- src: i.icon,
329
+ src: o.icon,
313
330
  height: "16",
314
331
  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)
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
- i.countUnread > 0 ? (o(), s("div", {
337
+ o.countUnread > 0 ? (n(), a("div", {
321
338
  key: 2,
322
339
  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))
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
- Ge as default
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-09b63886"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-4e84db83"]]);
5
5
  export {
6
6
  m as default
7
7
  };