@mobilon-dev/chotto 0.3.44 → 0.3.45

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 a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-64cee51b"]]);
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-dce06392"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -1,63 +1,65 @@
1
- import { defineComponent as gt, inject as ft, useId as yt, ref as x, computed as f, watch as vt, onMounted as pt, nextTick as b, onUnmounted as kt, createElementBlock as s, openBlock as o, createElementVNode as a, createCommentVNode as l, withModifiers as _t, normalizeClass as B, normalizeStyle as H, createVNode as A, withCtx as S, toDisplayString as d, createBlock as M, resolveDynamicComponent as xt, Teleport as Ct, unref as T, Fragment as R, renderList as wt } from "vue";
2
- import { getStatus as Mt, statuses as Tt } from "../../../functions/getStatusMessage.js";
1
+ import { defineComponent as gt, inject as ft, useId as yt, ref as C, computed as y, watch as vt, onMounted as pt, nextTick as b, onUnmounted as kt, createElementBlock as s, openBlock as o, createElementVNode as r, createCommentVNode as l, withModifiers as _t, normalizeClass as A, normalizeStyle as W, createVNode as V, withCtx as S, toDisplayString as m, createBlock as I, resolveDynamicComponent as xt, Teleport as Ct, unref as T, Fragment as $, renderList as wt } from "vue";
2
+ import { getStatus as Mt, statuses as It } from "../../../functions/getStatusMessage.js";
3
3
  import "../../../functions/parseMarkdown.js";
4
4
  import { t as U } from "../../../locale/useLocale.js";
5
5
  import "../../../hooks/useMessageDraft.js";
6
6
  import "../../../hooks/useSearchModel.js";
7
- import { useTheme as It } from "../../../hooks/useTheme.js";
7
+ import { useTheme as Tt } from "../../../hooks/useTheme.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  import "../../../node_modules/linkifyjs/dist/linkify.js";
11
- import W from "../../1_atoms/Tooltip/Tooltip.vue.js";
11
+ import z from "../../1_atoms/Tooltip/Tooltip.vue.js";
12
12
  import Et from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
13
- import bt from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
14
- import Bt from "../../1_icons/AvatarIcon.vue.js";
13
+ import Bt from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
14
+ import bt from "../../1_icons/AvatarIcon.vue.js";
15
15
  import At from "./icons/FileIcon.vue.js";
16
- import St from "./icons/ImageIcon.vue.js";
16
+ import Vt from "./icons/ImageIcon.vue.js";
17
17
  import O from "./icons/StickerIcon.vue.js";
18
- import Ut from "./icons/VideoIcon.vue.js";
19
- const Lt = { class: "chat-item__avatar-container" }, Dt = ["src"], Nt = {
18
+ import St from "./icons/VideoIcon.vue.js";
19
+ import Ut from "./icons/VoiceIcon.vue.js";
20
+ import Lt from "./icons/AudioIcon.vue.js";
21
+ const Dt = { class: "chat-item__avatar-container" }, Nt = ["src"], Xt = {
20
22
  key: 1,
21
23
  class: "chat-item__avatar-placeholder"
22
- }, Vt = { class: "chat-item__info-container" }, Xt = { class: "chat-item__name" }, Yt = {
24
+ }, Yt = { class: "chat-item__info-container" }, Ft = { class: "chat-item__name" }, Ht = {
23
25
  key: 0,
24
26
  class: "chat-item__last-message"
25
- }, Ft = { class: "chat-item__last-message-text" }, Ht = { class: "chat-item__details-container" }, Rt = {
27
+ }, Rt = { class: "chat-item__last-message-text" }, Wt = { class: "chat-item__details-container" }, $t = {
26
28
  key: 0,
27
29
  class: "chat-item__time"
28
- }, Wt = { class: "chat-item__status-unread-container" }, Ot = {
30
+ }, zt = { class: "chat-item__status-unread-container" }, Ot = {
29
31
  key: 0,
30
32
  class: "pi pi-clock"
31
- }, $t = {
33
+ }, qt = {
32
34
  key: 1,
33
35
  class: "pi pi-exclamation-circle"
34
- }, zt = {
36
+ }, Gt = {
35
37
  key: 0,
36
38
  class: "pi pi-check"
37
- }, qt = {
39
+ }, Jt = {
38
40
  key: 1,
39
41
  class: "chat-item__unread"
40
- }, jt = {
42
+ }, Kt = {
41
43
  key: 2,
42
44
  class: "chat-item__status-chat-container"
43
- }, Gt = {
45
+ }, Pt = {
44
46
  key: 0,
45
47
  class: "chat-item__fixed pi pi-thumbtack"
46
- }, Jt = {
48
+ }, Qt = {
47
49
  key: 0,
48
50
  id: "noSelectButton",
49
51
  class: "chat-item__menu-button"
50
- }, Kt = {
52
+ }, Zt = {
51
53
  key: 1,
52
54
  id: "noSelectButton",
53
55
  class: "chat-item__menu-button"
54
- }, Pt = {
56
+ }, jt = {
55
57
  key: 0,
56
58
  class: "dialog__container"
57
- }, Qt = ["onClick"], Zt = ["src"], te = {
59
+ }, te = ["onClick"], ee = ["src"], ne = {
58
60
  key: 1,
59
61
  class: "dialog__icon pi pi-user"
60
- }, ee = { class: "dialog__text-container" }, ne = { class: "dialog__name" }, ie = { class: "dialog__time" }, Ce = /* @__PURE__ */ gt({
62
+ }, ie = { class: "dialog__text-container" }, oe = { class: "dialog__name" }, ce = { class: "dialog__time" }, Te = /* @__PURE__ */ gt({
61
63
  __name: "ChatItem",
62
64
  props: {
63
65
  chat: {},
@@ -65,218 +67,224 @@ const Lt = { class: "chat-item__avatar-container" }, Dt = ["src"], Nt = {
65
67
  contextMenuTrigger: { default: "hover" }
66
68
  },
67
69
  emits: ["select", "action", "expand"],
68
- setup(c, { emit: $ }) {
69
- const z = ft("chatAppId"), { getTheme: L } = It(z), e = c, C = $, m = yt(), h = x(!1), y = x(!1), I = x(!1), q = x(null), j = () => {
70
- I.value = !0;
71
- }, G = (t) => {
72
- I.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && C("select", { chat: e.chat, dialog: null }), I.value = !1;
73
- }, J = (t) => {
74
- C("select", { chat: e.chat, dialog: t });
75
- }, K = () => e.chat.isSelected ? "chat-item__selected" : "", P = (t) => t.isSelected ? "dialog__selected" : "", D = (t) => {
76
- e.contextMenuTrigger === "rightClick" && E(), C("action", { chat: e.chat, ...t });
77
- }, E = () => {
78
- const t = document.getElementById("context-menu-rightclick-" + m);
79
- t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), y.value = !1;
80
- }, Q = () => {
70
+ setup(c, { emit: q }) {
71
+ const G = ft("chatAppId"), { getTheme: L } = Tt(G), e = c, w = q, h = yt(), g = C(!1), v = C(!1), E = C(!1), J = C(null), K = () => {
72
+ E.value = !0;
73
+ }, P = (t) => {
74
+ E.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && w("select", { chat: e.chat, dialog: null }), E.value = !1;
75
+ }, Q = (t) => {
76
+ w("select", { chat: e.chat, dialog: t });
77
+ }, Z = () => e.chat.isSelected ? "chat-item__selected" : "", j = (t) => t.isSelected ? "dialog__selected" : "", D = (t) => {
78
+ e.contextMenuTrigger === "rightClick" && B(), w("action", { chat: e.chat, ...t });
79
+ }, B = () => {
80
+ const t = document.getElementById("context-menu-rightclick-" + h);
81
+ t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), v.value = !1;
82
+ }, tt = () => {
81
83
  document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
82
84
  const i = n;
83
- i.id !== "context-menu-rightclick-" + m && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
85
+ i.id !== "context-menu-rightclick-" + h && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
84
86
  });
85
- }, Z = () => 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)) : [], tt = f(() => Mt(e.chat["lastMessage.status"])), et = f(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), nt = f(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
86
- let w;
87
- const g = x(0), N = [U("component.ChatItem.typing") + ".", U("component.ChatItem.typing") + "..", U("component.ChatItem.typing") + "..."], V = (t) => {
88
- var r, u;
87
+ }, et = () => 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)) : [], nt = y(() => Mt(e.chat["lastMessage.status"])), it = y(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), ot = y(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
88
+ let M;
89
+ const f = C(0), N = [U("component.ChatItem.typing") + ".", U("component.ChatItem.typing") + "..", U("component.ChatItem.typing") + "..."], X = (t) => {
90
+ var u, a, d;
89
91
  if (typeof t == "string")
90
92
  return t;
91
93
  if ((t == null ? void 0 : t.type) === "message.sticker")
92
94
  return "Стикер";
93
- const n = (r = t == null ? void 0 : t.data) == null ? void 0 : r.text;
95
+ 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 ? "Голосовое сообщение" : "Аудиофайл";
97
+ const n = (a = t == null ? void 0 : t.data) == null ? void 0 : a.text;
94
98
  if (n)
95
99
  return n;
96
- const i = (u = t == null ? void 0 : t.data) == null ? void 0 : u.filename;
100
+ const i = (d = t == null ? void 0 : t.data) == null ? void 0 : d.filename;
97
101
  return i || "";
98
- }, it = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, X = f(() => {
99
- var n, i;
102
+ }, ct = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, Y = y(() => {
103
+ var n, i, u;
100
104
  if (e.chat.typing)
101
105
  return null;
102
- const t = it(e.chat.lastMessage);
106
+ const t = ct(e.chat.lastMessage);
103
107
  if (!t)
104
108
  return null;
105
109
  if (t === "message.sticker")
106
110
  return O;
107
111
  if (t === "message.image")
108
- return St;
112
+ return Vt;
109
113
  if (t === "message.video")
110
- return Ut;
114
+ return St;
115
+ if (t === "message.audio") {
116
+ const a = e.chat.lastMessage;
117
+ return (a.isVoiceMessage || ((n = a == null ? void 0 : a.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? Ut : Lt;
118
+ }
111
119
  if (t === "message.file") {
112
- const r = e.chat.lastMessage, u = ((i = (n = r == null ? void 0 : r.data) == null ? void 0 : n.filename) == null ? void 0 : i.toLowerCase()) || "";
113
- return u.endsWith(".tgs") || u.endsWith(".webp") ? O : At;
120
+ const a = e.chat.lastMessage, d = ((u = (i = a == null ? void 0 : a.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
121
+ return d.endsWith(".tgs") || d.endsWith(".webp") ? O : At;
114
122
  }
115
123
  return null;
116
- }), ot = f(() => e.chat.typing ? N[g.value] : V(e.chat.lastMessage)), ct = f(() => e.chat.typing ? N[g.value] : V(e.chat.lastMessage));
124
+ }), st = y(() => e.chat.typing ? N[f.value] : X(e.chat.lastMessage)), at = y(() => e.chat.typing ? N[f.value] : X(e.chat.lastMessage));
117
125
  vt(
118
126
  () => e.chat.typing,
119
127
  () => {
120
- e.chat.typing ? w = setInterval(() => {
121
- g.value < 2 ? g.value += 1 : g.value = 0;
122
- }, 1e3) : (g.value = 0, w && (clearInterval(w), w = void 0));
128
+ e.chat.typing ? M = setInterval(() => {
129
+ f.value < 2 ? f.value += 1 : f.value = 0;
130
+ }, 1e3) : (f.value = 0, M && (clearInterval(M), M = void 0));
123
131
  },
124
132
  { immediate: !0 }
125
133
  );
126
- const st = () => {
127
- e.contextMenuTrigger === "hover" && (h.value = !0);
128
- }, at = (t) => {
129
- e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? h.value = !0 : h.value = !1);
134
+ const rt = () => {
135
+ e.contextMenuTrigger === "hover" && (g.value = !0);
130
136
  }, lt = (t) => {
131
- e.contextMenuTrigger === "rightClick" && e.chat.actions && rt(t);
132
- }, rt = (t) => {
133
- Q(), y.value = !0, b(() => {
134
- const n = document.getElementById("context-menu-rightclick-" + m);
137
+ e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? g.value = !0 : g.value = !1);
138
+ }, ut = (t) => {
139
+ e.contextMenuTrigger === "rightClick" && e.chat.actions && dt(t);
140
+ }, dt = (t) => {
141
+ tt(), v.value = !0, b(() => {
142
+ const n = document.getElementById("context-menu-rightclick-" + h);
135
143
  if (n) {
136
- const i = t.clientX, r = t.clientY;
144
+ const i = t.clientX, u = t.clientY;
137
145
  n.style.display = "inherit";
138
- const u = n.getBoundingClientRect();
146
+ const a = n.getBoundingClientRect();
139
147
  n.style.display = "none", b(() => {
140
- const mt = window.innerWidth, ht = window.innerHeight, v = window.scrollX || window.pageXOffset, p = window.scrollY || window.pageYOffset;
141
- let k = i + v, _ = r + p;
142
- k + u.width > mt + v && (k = i + v - u.width), _ + u.height > ht + p && (_ = r + p - u.height), k < v && (k = v), _ < p && (_ = p), n.style.top = _ + "px", n.style.left = k + "px", n.style.opacity = "1", n.style.display = "inherit";
148
+ const d = window.innerWidth, R = window.innerHeight, p = window.scrollX || window.pageXOffset, k = window.scrollY || window.pageYOffset;
149
+ let _ = i + p, x = u + k;
150
+ _ + a.width > d + p && (_ = i + p - a.width), x + a.height > R + k && (x = u + k - a.height), _ < p && (_ = p), x < k && (x = k), n.style.top = x + "px", n.style.left = _ + "px", n.style.opacity = "1", n.style.display = "inherit";
143
151
  });
144
152
  }
145
153
  });
146
- }, ut = () => {
147
- }, dt = () => {
148
- }, Y = (t) => {
149
- if (e.contextMenuTrigger === "rightClick" && y.value) {
150
- const n = t.target, i = document.getElementById("context-menu-rightclick-" + m);
151
- (!i || !i.contains(n)) && E();
154
+ }, mt = () => {
155
+ }, ht = () => {
156
+ }, F = (t) => {
157
+ if (e.contextMenuTrigger === "rightClick" && v.value) {
158
+ const n = t.target, i = document.getElementById("context-menu-rightclick-" + h);
159
+ (!i || !i.contains(n)) && B();
152
160
  }
153
- }, F = () => {
154
- e.contextMenuTrigger === "rightClick" && y.value && E();
161
+ }, H = () => {
162
+ e.contextMenuTrigger === "rightClick" && v.value && B();
155
163
  };
156
164
  return pt(() => {
157
- e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", Y), window.addEventListener("scroll", F, !0), b(() => {
158
- const t = document.getElementById("context-menu-rightclick-" + m);
165
+ e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", F), window.addEventListener("scroll", H, !0), b(() => {
166
+ const t = document.getElementById("context-menu-rightclick-" + h);
159
167
  t && (t.style.display = "none", t.style.opacity = "0");
160
168
  }));
161
169
  }), kt(() => {
162
- document.removeEventListener("click", Y), window.removeEventListener("scroll", F, !0);
170
+ document.removeEventListener("click", F), window.removeEventListener("scroll", H, !0);
163
171
  }), (t, n) => (o(), s("div", null, [
164
- a("div", {
172
+ r("div", {
165
173
  ref_key: "containerRef",
166
- ref: q,
167
- class: B(["chat-item__container", K()]),
168
- onMouseenter: st,
169
- onMouseleave: at,
170
- onClick: G,
171
- onContextmenu: _t(lt, ["prevent"])
174
+ ref: J,
175
+ class: A(["chat-item__container", Z()]),
176
+ onMouseenter: rt,
177
+ onMouseleave: lt,
178
+ onClick: P,
179
+ onContextmenu: _t(ut, ["prevent"])
172
180
  }, [
173
- a("div", Lt, [
174
- a("span", {
181
+ r("div", Dt, [
182
+ r("span", {
175
183
  class: "chat-item__status-user",
176
- style: H({ backgroundColor: e.chat.status })
184
+ style: W({ backgroundColor: e.chat.status })
177
185
  }, null, 4),
178
186
  e.chat.avatar ? (o(), s("img", {
179
187
  key: 0,
180
188
  src: e.chat.avatar,
181
189
  height: "48",
182
190
  width: "48"
183
- }, null, 8, Dt)) : (o(), s("div", Nt, [
184
- A(Bt)
191
+ }, null, 8, Nt)) : (o(), s("div", Xt, [
192
+ V(bt)
185
193
  ]))
186
194
  ]),
187
- a("div", Vt, [
188
- A(W, {
195
+ r("div", Yt, [
196
+ V(z, {
189
197
  text: c.chat.name,
190
198
  position: "bottom"
191
199
  }, {
192
200
  default: S(() => [
193
- a("div", Xt, d(c.chat.name), 1)
201
+ r("div", Ft, m(c.chat.name), 1)
194
202
  ]),
195
203
  _: 1
196
204
  }, 8, ["text"]),
197
- A(W, {
198
- text: ot.value,
205
+ V(z, {
206
+ text: st.value,
199
207
  position: "bottom"
200
208
  }, {
201
209
  default: S(() => [
202
- c.chat.lastMessage || c.chat.typing ? (o(), s("div", Yt, [
203
- X.value ? (o(), M(xt(X.value), {
210
+ c.chat.lastMessage || c.chat.typing ? (o(), s("div", Ht, [
211
+ Y.value ? (o(), I(xt(Y.value), {
204
212
  key: 0,
205
213
  class: "chat-item__message-icon"
206
214
  })) : l("", !0),
207
- a("span", Ft, d(ct.value), 1)
215
+ r("span", Rt, m(at.value), 1)
208
216
  ])) : l("", !0)
209
217
  ]),
210
218
  _: 1
211
219
  }, 8, ["text"])
212
220
  ]),
213
- a("div", Ht, [
214
- c.chat["lastActivity.time"] && (!c.chat.actions || !h.value) ? (o(), s("div", Rt, d(c.chat["lastActivity.time"]), 1)) : l("", !0),
215
- h.value && c.chat.actions && c.contextMenuTrigger === "hover" ? (o(), M(Et, {
221
+ r("div", Wt, [
222
+ c.chat["lastActivity.time"] && (!c.chat.actions || !g.value) ? (o(), s("div", $t, m(c.chat["lastActivity.time"]), 1)) : l("", !0),
223
+ g.value && c.chat.actions && c.contextMenuTrigger === "hover" ? (o(), I(Et, {
216
224
  key: 1,
217
225
  mode: "click",
218
226
  "menu-side": "bottom-right",
219
227
  actions: c.chat.actions,
220
228
  onClick: D,
221
- onButtonClick: j,
222
- onMenuMouseLeave: n[0] || (n[0] = (i) => h.value = !1)
229
+ onButtonClick: K,
230
+ onMenuMouseLeave: n[0] || (n[0] = (i) => g.value = !1)
223
231
  }, {
224
232
  default: S(() => [...n[2] || (n[2] = [
225
- a("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
233
+ r("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
226
234
  ])]),
227
235
  _: 1
228
236
  }, 8, ["actions"])) : l("", !0),
229
- (o(), M(Ct, { to: "body" }, [
230
- c.contextMenuTrigger === "rightClick" && c.chat.actions && y.value ? (o(), M(bt, {
237
+ (o(), I(Ct, { to: "body" }, [
238
+ c.contextMenuTrigger === "rightClick" && c.chat.actions && v.value ? (o(), I(Bt, {
231
239
  key: 0,
232
- id: "context-menu-rightclick-" + T(m),
240
+ id: "context-menu-rightclick-" + T(h),
233
241
  actions: c.chat.actions,
234
242
  "data-theme": T(L)().theme ? T(L)().theme : "light",
235
243
  onClick: D,
236
- onMouseenter: ut,
237
- onMouseleave: dt
244
+ onMouseenter: mt,
245
+ onMouseleave: ht
238
246
  }, null, 8, ["id", "actions", "data-theme"])) : l("", !0)
239
247
  ])),
240
- a("div", Wt, [
241
- T(Tt).includes(c.chat["lastMessage.status"]) ? (o(), s("div", {
248
+ r("div", zt, [
249
+ T(It).includes(c.chat["lastMessage.status"]) ? (o(), s("div", {
242
250
  key: 0,
243
- class: B(["chat-item__status-message", tt.value])
251
+ class: A(["chat-item__status-message", nt.value])
244
252
  }, [
245
- c.chat["lastMessage.status"] === "pending" ? (o(), s("span", Ot)) : c.chat["lastMessage.status"] === "error" ? (o(), s("span", $t)) : (o(), s(R, { key: 2 }, [
246
- c.chat["lastMessage.status"] !== "sent" ? (o(), s("span", zt)) : l("", !0),
247
- n[3] || (n[3] = a("span", { class: "pi pi-check" }, null, -1))
253
+ c.chat["lastMessage.status"] === "pending" ? (o(), s("span", Ot)) : c.chat["lastMessage.status"] === "error" ? (o(), s("span", qt)) : (o(), s($, { key: 2 }, [
254
+ c.chat["lastMessage.status"] !== "sent" ? (o(), s("span", Gt)) : l("", !0),
255
+ n[3] || (n[3] = r("span", { class: "pi pi-check" }, null, -1))
248
256
  ], 64))
249
257
  ], 2)) : l("", !0),
250
- et.value ? (o(), s("div", qt, d(nt.value), 1)) : l("", !0)
258
+ it.value ? (o(), s("div", Jt, m(ot.value), 1)) : l("", !0)
251
259
  ]),
252
- c.chat.countUnread < 1 ? (o(), s("div", jt, [
253
- c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span", Gt)) : l("", !0)
260
+ c.chat.countUnread < 1 ? (o(), s("div", Kt, [
261
+ c.chat.isFixedTop || c.chat.isFixedBottom ? (o(), s("span", Pt)) : l("", !0)
254
262
  ])) : l("", !0)
255
263
  ]),
256
264
  e.showDialogs && c.chat.dialogs ? (o(), s("div", {
257
265
  key: 0,
258
266
  class: "chat-item__dialog-buttons",
259
- onClick: n[1] || (n[1] = (i) => C("expand", e.chat))
267
+ onClick: n[1] || (n[1] = (i) => w("expand", e.chat))
260
268
  }, [
261
- e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button", Jt, [...n[4] || (n[4] = [
262
- a("span", {
269
+ e.showDialogs && !c.chat.dialogsExpanded ? (o(), s("button", Qt, [...n[4] || (n[4] = [
270
+ r("span", {
263
271
  id: "noSelectButton",
264
272
  class: "pi pi-angle-down"
265
273
  }, null, -1)
266
274
  ])])) : l("", !0),
267
- e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button", Kt, [...n[5] || (n[5] = [
268
- a("span", {
275
+ e.showDialogs && c.chat.dialogsExpanded ? (o(), s("button", Zt, [...n[5] || (n[5] = [
276
+ r("span", {
269
277
  id: "noSelectButton",
270
278
  class: "pi pi-angle-up"
271
279
  }, null, -1)
272
280
  ])])) : l("", !0)
273
281
  ])) : l("", !0)
274
282
  ], 34),
275
- e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div", Pt, [
276
- (o(!0), s(R, null, wt(Z(), (i) => (o(), s("div", {
283
+ e.showDialogs && c.chat.dialogsExpanded ? (o(), s("div", jt, [
284
+ (o(!0), s($, null, wt(et(), (i) => (o(), s("div", {
277
285
  key: i.dialogId,
278
- class: B(["dialog__item", P(i)]),
279
- onClick: (r) => J(i)
286
+ class: A(["dialog__item", j(i)]),
287
+ onClick: (u) => Q(i)
280
288
  }, [
281
289
  i.icon ? (o(), s("img", {
282
290
  key: 0,
@@ -284,21 +292,21 @@ const Lt = { class: "chat-item__avatar-container" }, Dt = ["src"], Nt = {
284
292
  src: i.icon,
285
293
  height: "16",
286
294
  width: "16"
287
- }, null, 8, Zt)) : (o(), s("span", te)),
288
- a("div", ee, [
289
- a("div", ne, d(i.name), 1),
290
- a("div", ie, d(i["lastActivity.time"]), 1)
295
+ }, null, 8, ee)) : (o(), s("span", ne)),
296
+ r("div", ie, [
297
+ r("div", oe, m(i.name), 1),
298
+ r("div", ce, m(i["lastActivity.time"]), 1)
291
299
  ]),
292
300
  i.countUnread > 0 ? (o(), s("div", {
293
301
  key: 2,
294
302
  class: "chat-item__unread",
295
- style: H(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
296
- }, d(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : l("", !0)
297
- ], 10, Qt))), 128))
303
+ style: W(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
304
+ }, m(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : l("", !0)
305
+ ], 10, te))), 128))
298
306
  ])) : l("", !0)
299
307
  ]));
300
308
  }
301
309
  });
302
310
  export {
303
- Ce as default
311
+ Te as default
304
312
  };
@@ -0,0 +1,24 @@
1
+ import { createElementBlock as e, openBlock as t, createElementVNode as r } from "vue";
2
+ import n from "../../../../_virtual/_plugin-vue_export-helper.js";
3
+ const s = {}, i = {
4
+ width: "800px",
5
+ height: "800px",
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ };
10
+ function c(l, o) {
11
+ return t(), e("svg", i, [...o[0] || (o[0] = [
12
+ r("path", {
13
+ d: "M9 19C9 20.1046 7.65685 21 6 21C4.34315 21 3 20.1046 3 19C3 17.8954 4.34315 17 6 17C7.65685 17 9 17.8954 9 19ZM9 19V5L21 3V17M21 17C21 18.1046 19.6569 19 18 19C16.3431 19 15 18.1046 15 17C15 15.8954 16.3431 15 18 15C19.6569 15 21 15.8954 21 17ZM9 9L21 7",
14
+ stroke: "currentColor",
15
+ "stroke-width": "2",
16
+ "stroke-linecap": "round",
17
+ "stroke-linejoin": "round"
18
+ }, null, -1)
19
+ ])]);
20
+ }
21
+ const C = /* @__PURE__ */ n(s, [["render", c]]);
22
+ export {
23
+ C as default
24
+ };
@@ -0,0 +1,19 @@
1
+ import { createElementBlock as e, openBlock as r, createStaticVNode as o } from "vue";
2
+ import i from "../../../../_virtual/_plugin-vue_export-helper.js";
3
+ const n = {}, l = {
4
+ width: "16px",
5
+ height: "16px",
6
+ viewBox: "4 2 16 20",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ "xmlns:xlink": "http://www.w3.org/1999/xlink"
10
+ };
11
+ function s(c, t) {
12
+ return r(), e("svg", l, [...t[0] || (t[0] = [
13
+ o('<title>Mic</title><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Mic"><rect id="Rectangle" stroke="currentColor" stroke-width="2" stroke-linecap="round" x="9" y="3" width="6" height="11" rx="3"></rect><line id="Path" x1="12" y1="18" x2="12" y2="21" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line><line id="Path" x1="8" y1="21" x2="16" y2="21" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line><path id="Path" d="M19,11 C19,14.866 15.866,18 12,18 C8.13401,18 5,14.866 5,11" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path></g></g>', 2)
14
+ ])]);
15
+ }
16
+ const k = /* @__PURE__ */ i(n, [["render", s]]);
17
+ export {
18
+ k as default
19
+ };
@@ -190,6 +190,7 @@ export declare const chats: ({
190
190
  text: string;
191
191
  url: string;
192
192
  filename: string;
193
+ isVoiceMessage?: undefined;
193
194
  };
194
195
  };
195
196
  'lastMessage.status': string;
@@ -243,6 +244,7 @@ export declare const chats: ({
243
244
  text: string;
244
245
  url: string;
245
246
  filename: string;
247
+ isVoiceMessage?: undefined;
246
248
  };
247
249
  };
248
250
  'lastActivity.time': string;
@@ -297,6 +299,7 @@ export declare const chats: ({
297
299
  text: string;
298
300
  url: string;
299
301
  filename: string;
302
+ isVoiceMessage?: undefined;
300
303
  };
301
304
  };
302
305
  'lastActivity.time': string;
@@ -366,6 +369,7 @@ export declare const chats: ({
366
369
  text: string;
367
370
  url: string;
368
371
  filename: string;
372
+ isVoiceMessage?: undefined;
369
373
  };
370
374
  };
371
375
  'lastActivity.time': string;
@@ -387,6 +391,70 @@ export declare const chats: ({
387
391
  isFixedTop?: undefined;
388
392
  statusMessage?: undefined;
389
393
  isFixed?: undefined;
394
+ } | {
395
+ chatId: number;
396
+ name: string;
397
+ countUnread: number;
398
+ lastMessage: {
399
+ type: string;
400
+ data: {
401
+ url: string;
402
+ filename: string;
403
+ text?: undefined;
404
+ isVoiceMessage?: undefined;
405
+ };
406
+ };
407
+ 'lastMessage.status': string;
408
+ 'lastActivity.time': string;
409
+ 'lastActivity.timestamp': string;
410
+ actions: {
411
+ action: string;
412
+ title: string;
413
+ }[];
414
+ metadata: string;
415
+ avatar?: undefined;
416
+ isFixedBottom?: undefined;
417
+ status?: undefined;
418
+ typing?: undefined;
419
+ dialogsExpanded?: undefined;
420
+ dialogs?: undefined;
421
+ contact?: undefined;
422
+ colorUnread?: undefined;
423
+ isFixedTop?: undefined;
424
+ statusMessage?: undefined;
425
+ isFixed?: undefined;
426
+ } | {
427
+ chatId: number;
428
+ name: string;
429
+ countUnread: number;
430
+ lastMessage: {
431
+ type: string;
432
+ data: {
433
+ url: string;
434
+ filename: string;
435
+ isVoiceMessage: boolean;
436
+ text?: undefined;
437
+ };
438
+ };
439
+ 'lastMessage.status': string;
440
+ 'lastActivity.time': string;
441
+ 'lastActivity.timestamp': string;
442
+ actions: {
443
+ action: string;
444
+ title: string;
445
+ }[];
446
+ metadata: string;
447
+ avatar?: undefined;
448
+ isFixedBottom?: undefined;
449
+ status?: undefined;
450
+ typing?: undefined;
451
+ dialogsExpanded?: undefined;
452
+ dialogs?: undefined;
453
+ contact?: undefined;
454
+ colorUnread?: undefined;
455
+ isFixedTop?: undefined;
456
+ statusMessage?: undefined;
457
+ isFixed?: undefined;
390
458
  } | {
391
459
  chatId: number;
392
460
  name: string;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -29,10 +29,12 @@ export interface ILastMessageObject {
29
29
  channelId?: string;
30
30
  senderId?: string;
31
31
  type?: string;
32
+ isVoiceMessage?: boolean;
32
33
  data?: {
33
34
  text?: string;
34
35
  url?: string;
35
36
  filename?: string;
37
+ isVoiceMessage?: boolean;
36
38
  };
37
39
  timestampms?: number;
38
40
  channel?: {