@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.
Files changed (57) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.js +2 -2
  3. package/dist/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue2.js +41 -33
  4. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue.js +3 -3
  5. package/dist/components/2_chatinput_elements/FileUploader/FileUploader.vue2.js +87 -103
  6. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue.js +1 -1
  7. package/dist/components/2_chatlist_elements/ChatItem/ChatItem.vue2.js +171 -152
  8. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue.js +2 -2
  9. package/dist/components/2_elements/AudioRecorder/AudioRecorder.vue2.js +52 -79
  10. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue.js +2 -2
  11. package/dist/components/2_elements/VideoRecorder/VideoRecorder.vue2.js +35 -64
  12. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +2 -2
  13. package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +4 -0
  14. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +3 -3
  15. package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +4 -0
  16. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue.js +3 -3
  17. package/dist/components/2_feed_elements/FileMessage/FileMessage.vue2.js +33 -29
  18. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +2 -2
  19. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +62 -58
  20. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue.js +1 -1
  21. package/dist/components/2_feed_elements/MissedCallMessage/MissedCallMessage.vue2.js +27 -23
  22. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue.js +2 -2
  23. package/dist/components/2_feed_elements/TextMessage/TextMessage.vue2.js +49 -41
  24. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +1 -1
  25. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +105 -101
  26. package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +2 -2
  27. package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +223 -149
  28. package/dist/components/3_compounds/ChatList/composables/useChatListFilter.js +18 -13
  29. package/dist/functions/renderAppleEmojis.js +127 -70
  30. package/dist/hooks/uploadFile/generatePreview.js +23 -11
  31. package/dist/hooks/useMessageDraft.js +61 -32
  32. package/dist/index.js +113 -112
  33. package/dist/themes/dark.css +1 -1
  34. package/dist/themes/default.css +1 -1
  35. package/dist/themes/glass.css +1 -1
  36. package/dist/themes/green.css +1 -1
  37. package/dist/themes/mobilon1.css +1 -1
  38. package/dist/types/apps/data/messages.d.ts +52 -0
  39. package/dist/types/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.d.ts +2 -2
  40. package/dist/types/components/2_blocks/CommunicationPanel/stories/CommunicationPanel.stories.d.ts +2 -2
  41. package/dist/types/components/2_chatinput_elements/ButtonEmojiPicker/ButtonEmojiPicker.vue.d.ts +15 -0
  42. package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +34 -0
  43. package/dist/types/components/2_feed_elements/CallMessage/styles/types.d.ts +26 -0
  44. package/dist/types/components/2_feed_elements/FileMessage/styles/types.d.ts +30 -0
  45. package/dist/types/components/2_feed_elements/ImageMessage/styles/types.d.ts +34 -0
  46. package/dist/types/components/2_feed_elements/StickerMessage/styles/types.d.ts +4 -0
  47. package/dist/types/components/2_feed_elements/TextMessage/styles/types.d.ts +38 -2
  48. package/dist/types/components/2_feed_elements/TypingMessage/styles/types.d.ts +2 -0
  49. package/dist/types/components/2_feed_elements/VideoMessage/styles/types.d.ts +34 -0
  50. package/dist/types/components/3_compounds/ChatInput/ChatInput.vue.d.ts +3 -3
  51. package/dist/types/components/3_compounds/ChatInput/styles/types.d.ts +2 -0
  52. package/dist/types/components/3_compounds/Feed/composables/useFeedReply.d.ts +1 -27
  53. package/dist/types/functions/renderAppleEmojis.d.ts +17 -2
  54. package/dist/types/hooks/uploadFile/generatePreview.d.ts +2 -0
  55. package/dist/types/hooks/uploadFile/uploadFile.d.ts +9 -17
  56. package/dist/types/hooks/useMessageDraft.d.ts +27 -29
  57. package/package.json +1 -1
@@ -1,65 +1,72 @@
1
- import { defineComponent as ht, inject as ft, useId as gt, ref as I, computed as p, watch as yt, onMounted as vt, nextTick as B, onUnmounted as pt, createElementBlock as s, openBlock as o, createElementVNode as r, createCommentVNode as l, withModifiers as kt, normalizeClass as b, normalizeStyle as W, createVNode as A, withCtx as V, toDisplayString as f, createBlock as m, resolveDynamicComponent as xt, Teleport as _t, unref as d, Fragment as Ct, renderList as wt } from "vue";
2
- import { getStatus as It, statuses as Tt } from "../../../functions/getStatusMessage.js";
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 U } from "../../../locale/useLocale.js";
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 Mt } from "../../../hooks/useTheme.js";
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 $ from "../../1_atoms/Tooltip/Tooltip.vue.js";
15
- import Et from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
16
- import St from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
17
- import Bt from "../../1_icons/AvatarIcon.vue.js";
18
- import bt from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
19
- import At from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
20
- import Vt from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
21
- import Ut from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
22
- import Lt from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
23
- import Dt from "./icons/AudioIcon.vue.js";
24
- import Nt from "./icons/FileIcon.vue.js";
25
- import Rt from "./icons/ImageIcon.vue.js";
26
- import Xt from "./icons/MissedCallIcon.vue.js";
27
- import z from "./icons/StickerIcon.vue.js";
28
- import Yt from "./icons/VideoIcon.vue.js";
29
- import Ft from "./icons/VoiceIcon.vue.js";
30
- const Ht = { class: "chat-item__avatar-container" }, Wt = ["src"], $t = {
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
- }, zt = { class: "chat-item__info-container" }, Ot = { class: "chat-item__name" }, qt = {
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
- }, Pt = { class: "chat-item__last-message-text" }, Gt = { class: "chat-item__details-container" }, Jt = {
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
- }, Kt = { class: "chat-item__status-unread-container" }, Qt = {
46
+ }, se = { class: "chat-item__status-unread-container" }, ae = {
40
47
  key: 1,
41
48
  class: "chat-item__unread"
42
- }, Zt = {
49
+ }, re = {
43
50
  key: 2,
44
51
  class: "chat-item__status-chat-container"
45
- }, jt = {
52
+ }, le = {
46
53
  key: 0,
47
54
  class: "chat-item__fixed pi pi-thumbtack"
48
- }, te = {
55
+ }, ue = {
49
56
  key: 0,
50
57
  id: "noSelectButton",
51
58
  class: "chat-item__menu-button"
52
- }, ee = {
59
+ }, me = {
53
60
  key: 1,
54
61
  id: "noSelectButton",
55
62
  class: "chat-item__menu-button"
56
- }, ne = {
63
+ }, de = {
57
64
  key: 0,
58
65
  class: "dialog__container"
59
- }, ie = ["onClick"], oe = ["src"], ce = {
66
+ }, he = ["onClick"], fe = ["src"], ge = {
60
67
  key: 1,
61
68
  class: "dialog__icon pi pi-user"
62
- }, se = { class: "dialog__text-container" }, ae = { class: "dialog__name" }, re = { class: "dialog__time" }, Xe = /* @__PURE__ */ ht({
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: O }) {
71
- const q = ft("chatAppId"), { getTheme: L } = Mt(q), e = c, T = O, g = gt(), y = I(!1), k = I(!1), E = I(!1), P = I(null), G = () => {
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
- }, J = (t) => {
74
- E.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && T("select", { chat: e.chat, dialog: null }), E.value = !1;
75
- }, K = (t) => {
76
- T("select", { chat: e.chat, dialog: t });
77
- }, Q = () => e.chat.isSelected ? "chat-item__selected" : "", Z = (t) => t.isSelected ? "dialog__selected" : "", D = (t) => {
78
- e.contextMenuTrigger === "rightClick" && S(), T("action", { chat: e.chat, ...t });
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-" + g);
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
- }, j = () => {
89
+ }, it = () => {
83
90
  document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
84
91
  const i = n;
85
- i.id !== "context-menu-rightclick-" + g && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
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
- }, tt = () => 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)) : [], et = p(() => It(e.chat["lastMessage.status"])), nt = p(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), it = p(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
88
- let M;
89
- const v = I(0), N = [U("component.ChatItem.typing") + ".", U("component.ChatItem.typing") + "..", U("component.ChatItem.typing") + "..."], R = (t) => {
90
- var u, a, h;
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 || ((u = t == null ? void 0 : t.data) == null ? void 0 : u.isVoiceMessage)) === !0 ? "Голосовое сообщение" : "Аудиофайл";
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 = (h = t == null ? void 0 : t.data) == null ? void 0 : h.filename;
109
+ const i = (f = t == null ? void 0 : t.data) == null ? void 0 : f.filename;
103
110
  return i || "";
104
- }, ot = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, X = p(() => {
105
- var n, i, u;
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 = ot(e.chat.lastMessage);
115
+ const t = rt(e.chat.lastMessage);
109
116
  if (!t)
110
117
  return null;
111
118
  if (t === "message.sticker")
112
- return z;
119
+ return G;
113
120
  if (t === "message.image")
114
- return Rt;
121
+ return zt;
115
122
  if (t === "message.video")
116
- return Yt;
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 ? Ft : Dt;
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 Xt;
129
+ return Ot;
123
130
  if (t === "message.file") {
124
- const a = e.chat.lastMessage, h = ((u = (i = a == null ? void 0 : a.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
125
- return h.endsWith(".tgs") || h.endsWith(".webp") ? z : Nt;
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
- }), ct = p(() => e.chat.typing ? N[v.value] : R(e.chat.lastMessage)), st = p(() => e.chat.typing ? N[v.value] : R(e.chat.lastMessage));
129
- yt(
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 ? M = setInterval(() => {
133
- v.value < 2 ? v.value += 1 : v.value = 0;
134
- }, 1e3) : (v.value = 0, M && (clearInterval(M), M = void 0));
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 at = () => {
149
+ const ft = () => {
139
150
  e.contextMenuTrigger === "hover" && (y.value = !0);
140
- }, rt = (t) => {
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
- }, lt = (t) => {
143
- e.contextMenuTrigger === "rightClick" && e.chat.actions && ut(t);
144
- }, ut = (t) => {
145
- j(), k.value = !0, B(() => {
146
- const n = document.getElementById("context-menu-rightclick-" + g);
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, u = t.clientY;
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 h = window.innerWidth, H = window.innerHeight, x = window.scrollX || window.pageXOffset, _ = window.scrollY || window.pageYOffset;
153
- let C = i + x, w = u + _;
154
- C + a.width > h + x && (C = i + x - a.width), w + a.height > H + _ && (w = u + _ - a.height), C < x && (C = x), w < _ && (w = _), n.style.top = w + "px", n.style.left = C + "px", n.style.opacity = "1", n.style.display = "inherit";
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
- }, mt = () => {
159
- }, dt = () => {
160
- }, Y = (t) => {
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-" + g);
173
+ const n = t.target, i = document.getElementById("context-menu-rightclick-" + v);
163
174
  (!i || !i.contains(n)) && S();
164
175
  }
165
- }, F = () => {
176
+ }, W = () => {
166
177
  e.contextMenuTrigger === "rightClick" && k.value && S();
167
178
  };
168
- return vt(() => {
169
- e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", Y), window.addEventListener("scroll", F, !0), B(() => {
170
- const t = document.getElementById("context-menu-rightclick-" + g);
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
- }), pt(() => {
174
- document.removeEventListener("click", Y), window.removeEventListener("scroll", F, !0);
184
+ }), Mt(() => {
185
+ document.removeEventListener("click", F), window.removeEventListener("scroll", W, !0);
175
186
  }), (t, n) => (o(), s("div", null, [
176
- r("div", {
187
+ l("div", {
177
188
  ref_key: "containerRef",
178
- ref: P,
179
- class: b(["chat-item__container", Q()]),
180
- onMouseenter: at,
181
- onMouseleave: rt,
182
- onClick: J,
183
- onContextmenu: kt(lt, ["prevent"])
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
- r("div", Ht, [
186
- r("span", {
196
+ l("div", Gt, [
197
+ l("span", {
187
198
  class: "chat-item__status-user",
188
- style: W({ backgroundColor: e.chat.status })
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, Wt)) : (o(), s("div", $t, [
196
- A(Bt)
206
+ }, null, 8, Jt)) : (o(), s("div", Kt, [
207
+ L(Dt)
197
208
  ]))
198
209
  ]),
199
- r("div", zt, [
200
- A($, {
210
+ l("div", Qt, [
211
+ L(P, {
201
212
  text: c.chat.name,
202
213
  position: "bottom"
203
214
  }, {
204
215
  default: V(() => [
205
- r("div", Ot, f(c.chat.name), 1)
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
- A($, {
210
- text: ct.value,
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", qt, [
215
- X.value ? (o(), m(xt(X.value), {
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
- })) : l("", !0),
219
- r("span", Pt, f(st.value), 1)
220
- ])) : l("", !0)
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
- r("div", Gt, [
226
- c.chat["lastActivity.time"] && (!c.chat.actions || !y.value) ? (o(), s("div", Jt, f(c.chat["lastActivity.time"]), 1)) : l("", !0),
227
- y.value && c.chat.actions && c.contextMenuTrigger === "hover" ? (o(), m(Et, {
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: D,
233
- onButtonClick: G,
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
- r("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
256
+ l("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
238
257
  ])]),
239
258
  _: 1
240
- }, 8, ["actions"])) : l("", !0),
241
- (o(), m(_t, { to: "body" }, [
242
- c.contextMenuTrigger === "rightClick" && c.chat.actions && k.value ? (o(), m(St, {
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-" + d(g),
263
+ id: "context-menu-rightclick-" + h(v),
245
264
  actions: c.chat.actions,
246
- "data-theme": d(L)().theme ? d(L)().theme : "light",
247
- onClick: D,
248
- onMouseenter: mt,
249
- onMouseleave: dt
250
- }, null, 8, ["id", "actions", "data-theme"])) : l("", !0)
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
- r("div", Kt, [
253
- d(Tt).includes(c.chat["lastMessage.status"]) ? (o(), s("div", {
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", et.value])
274
+ class: b(["chat-item__status-message", ct.value])
256
275
  }, [
257
- c.chat["lastMessage.status"] === "pending" ? (o(), m(d(At), { key: 0 })) : c.chat["lastMessage.status"] === "error" ? (o(), m(d(bt), { key: 1 })) : c.chat["lastMessage.status"] === "read" ? (o(), m(d(Vt), { key: 2 })) : c.chat["lastMessage.status"] === "received" ? (o(), m(d(Ut), { key: 3 })) : (o(), m(d(Lt), { key: 4 }))
258
- ], 2)) : l("", !0),
259
- nt.value ? (o(), s("div", Qt, f(it.value), 1)) : l("", !0)
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", Zt, [
262
- c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span", jt)) : l("", !0)
263
- ])) : l("", !0)
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) => T("expand", e.chat))
287
+ onClick: n[1] || (n[1] = (i) => M("expand", e.chat))
269
288
  }, [
270
- e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button", te, [...n[3] || (n[3] = [
271
- r("span", {
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
- ])])) : l("", !0),
276
- e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button", ee, [...n[4] || (n[4] = [
277
- r("span", {
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
- ])])) : l("", !0)
282
- ])) : l("", !0)
300
+ ])])) : r("", !0)
301
+ ])) : r("", !0)
283
302
  ], 34),
284
- e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div", ne, [
285
- (o(!0), s(Ct, null, wt(tt(), (i) => (o(), s("div", {
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", Z(i)]),
288
- onClick: (u) => K(i)
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, oe)) : (o(), s("span", ce)),
297
- r("div", se, [
298
- r("div", ae, f(i.name), 1),
299
- r("div", re, f(i["lastActivity.time"]), 1)
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: W(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
305
- }, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : l("", !0)
306
- ], 10, ie))), 128))
307
- ])) : l("", !0)
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
- Xe as default
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 e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-8d9aa63f"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b3be7b0b"]]);
5
5
  export {
6
- e as default
6
+ p as default
7
7
  };