@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,6 +1,7 @@
1
- import { defineComponent as D, inject as N, ref as o, computed as T, watch as j, createElementBlock as y, openBlock as c, createCommentVNode as m, createBlock as M, createElementVNode as a, toDisplayString as x, unref as w, normalizeClass as L, Teleport as P } from "vue";
2
- import { uploadFile as O } from "../../../hooks/uploadFile/uploadFile.js";
3
- import { useMessageDraft as q } from "../../../hooks/useMessageDraft.js";
1
+ import { defineComponent as z, inject as D, ref as t, computed as j, createElementBlock as v, openBlock as p, createCommentVNode as _, createElementVNode as l, toDisplayString as x, unref as A, normalizeClass as B } from "vue";
2
+ import { buildFilePreview as E } from "../../../hooks/uploadFile/generatePreview.js";
3
+ import { uploadFile as L } from "../../../hooks/uploadFile/uploadFile.js";
4
+ import { useMessageDraft as N } from "../../../hooks/useMessageDraft.js";
4
5
  import "../../../hooks/useSearchModel.js";
5
6
  import "../../../hooks/useTheme.js";
6
7
  import "../../../hooks/useEmojiNative.js";
@@ -11,14 +12,13 @@ import "../../../locale/useLocale.js";
11
12
  import "../../../node_modules/linkifyjs/dist/linkify.js";
12
13
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
13
14
  import "../../../functions/parseMarkdown.js";
14
- import G from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
15
- const H = { class: "audio-recorder__container" }, J = {
15
+ const T = { class: "audio-recorder__container" }, V = {
16
16
  key: 0,
17
17
  class: "audio-recorder__status"
18
- }, K = {
18
+ }, O = {
19
19
  key: 1,
20
20
  class: "audio-recorder__recording-container"
21
- }, Q = { class: "audio-recorder__recording-time" }, ne = /* @__PURE__ */ D({
21
+ }, P = { class: "audio-recorder__recording-time" }, ae = /* @__PURE__ */ z({
22
22
  __name: "AudioRecorder",
23
23
  props: {
24
24
  state: {
@@ -30,94 +30,67 @@ const H = { class: "audio-recorder__container" }, J = {
30
30
  default: null
31
31
  }
32
32
  },
33
- setup(R) {
34
- const f = N("chatAppId"), { getMessage: n, setMessageFile: U, resetMessageFile: S, setRecordingMessage: k } = q(f), h = o(), l = o(0), r = o(0), s = o(0), d = o(0), z = T(() => {
35
- let t = d.value < 10 ? "0" + d.value : d.value, e = s.value < 10 ? "0" + s.value : s.value, i = r.value < 10 ? "0" + r.value : r.value, _ = l.value < 10 ? "00" + l.value : l.value < 100 ? "0" + l.value : l.value;
36
- return t + ":" + e + ":" + i + ":" + _;
37
- }), v = o(""), g = o(!1), u = o(), b = o([]), A = o(), p = o(), C = R, B = async () => {
38
- if (!n().file && C.state == "active") {
39
- const t = await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 });
40
- h.value = setInterval(() => {
41
- l.value += 10, l.value == 1e3 && (l.value = 0, r.value++, r.value == 60 && (r.value = 0, s.value++, s.value == 60 && (s.value = 0, d.value++)));
42
- }, 10), k(!0), g.value = !0, u.value = new MediaRecorder(t), u.value.start(), u.value.ondataavailable = (e) => {
43
- b.value.push(e.data);
33
+ setup(g) {
34
+ const C = D("chatAppId"), { getMessage: m, setMessageFile: M, setRecordingMessage: b } = N(C), y = t(), a = t(0), r = t(0), u = t(0), n = t(0), U = j(() => {
35
+ let s = n.value < 10 ? "0" + n.value : n.value, e = u.value < 10 ? "0" + u.value : u.value, o = r.value < 10 ? "0" + r.value : r.value, S = a.value < 10 ? "00" + a.value : a.value < 100 ? "0" + a.value : a.value;
36
+ return s + ":" + e + ":" + o + ":" + S;
37
+ }), c = t(""), d = t(!1), i = t(), f = t([]), R = t(), k = g, h = async () => {
38
+ if (!m().file && k.state == "active") {
39
+ const s = await navigator.mediaDevices.getUserMedia({ audio: !0, video: !1 });
40
+ y.value = setInterval(() => {
41
+ a.value += 10, a.value == 1e3 && (a.value = 0, r.value++, r.value == 60 && (r.value = 0, u.value++, u.value == 60 && (u.value = 0, n.value++)));
42
+ }, 10), b(!0), d.value = !0, i.value = new MediaRecorder(s), i.value.start(), i.value.ondataavailable = (e) => {
43
+ f.value.push(e.data);
44
44
  };
45
45
  }
46
46
  }, F = () => {
47
- I(), A.value = void 0;
48
- }, E = () => {
49
- u.value && (u.value.stop(), u.value.onstop = async () => {
50
- const t = new File(b.value, "voicemessage.mp3", { type: "audio/*" }), e = URL.createObjectURL(t);
51
- A.value = e, v.value = "uploading", await O(C.filebumpUrl, t).then((i) => {
52
- if (v.value = i.status, i.status == "success") {
53
- const _ = document.getElementById("chat-input-file-line-" + f);
54
- _ && (_.style.display = "inherit"), U({
55
- url: i.url,
56
- name: i.name,
57
- size: i.size,
58
- type: i.type
59
- }), i.preview && (p.value = {
60
- previewUrl: i.preview.previewUrl,
61
- isImage: i.preview.isImage,
62
- isVideo: i.preview.isVideo,
63
- isAudio: i.preview.isAudio,
64
- fileName: i.name,
65
- fileSize: i.preview.fileSize
66
- });
67
- }
68
- });
69
- }), I();
47
+ w(), R.value = void 0;
70
48
  }, I = () => {
71
- clearInterval(h.value), l.value = 0, r.value = 0, s.value = 0, d.value = 0, k(!1), g.value = !1, u.value = void 0, b.value = [];
72
- }, V = () => {
73
- const t = document.getElementById("chat-input-file-line-" + f);
74
- t && (t.style.display = "none"), S(), p.value = void 0;
49
+ i.value && (i.value.stop(), i.value.onstop = async () => {
50
+ const s = new File(f.value, "voicemessage.mp3", { type: "audio/*" }), e = URL.createObjectURL(s);
51
+ R.value = e, c.value = "uploading", await L(k.filebumpUrl, s).then((o) => {
52
+ c.value = o.status, o.status == "success" && M({
53
+ url: o.url,
54
+ name: o.name,
55
+ size: o.size,
56
+ type: o.type,
57
+ preview: E(o.name, o.preview)
58
+ });
59
+ });
60
+ }), w();
61
+ }, w = () => {
62
+ clearInterval(y.value), a.value = 0, r.value = 0, u.value = 0, n.value = 0, b(!1), d.value = !1, i.value = void 0, f.value = [];
75
63
  };
76
- return j(
77
- () => n().file,
78
- () => {
79
- n().file || (p.value = void 0);
80
- }
81
- ), (t, e) => (c(), y("div", H, [
82
- v.value === "uploading" ? (c(), y("div", J, [...e[0] || (e[0] = [
83
- a("span", null, "Загрузка файла...", -1)
84
- ])])) : m("", !0),
85
- g.value && v.value != "uploading" ? (c(), y("div", K, [
86
- e[3] || (e[3] = a("span", { class: "audio-recorder__recording-icon pi pi-circle-fill" }, null, -1)),
87
- a("button", {
64
+ return (s, e) => (p(), v("div", T, [
65
+ c.value === "uploading" ? (p(), v("div", V, [...e[0] || (e[0] = [
66
+ l("span", null, "Загрузка файла...", -1)
67
+ ])])) : _("", !0),
68
+ d.value && c.value != "uploading" ? (p(), v("div", O, [
69
+ e[3] || (e[3] = l("span", { class: "audio-recorder__recording-icon pi pi-circle-fill" }, null, -1)),
70
+ l("button", {
88
71
  class: "audio-recorder__button audio-recorder__button-record",
89
72
  onClick: F
90
73
  }, [...e[1] || (e[1] = [
91
- a("span", { class: "pi pi-trash" }, null, -1)
74
+ l("span", { class: "pi pi-trash" }, null, -1)
92
75
  ])]),
93
- a("button", {
76
+ l("button", {
94
77
  class: "audio-recorder__button audio-recorder__button-record",
95
- onClick: E
78
+ onClick: I
96
79
  }, [...e[2] || (e[2] = [
97
- a("div", { class: "audio-recorder__stop" }, null, -1)
80
+ l("div", { class: "audio-recorder__stop" }, null, -1)
98
81
  ])]),
99
- a("span", Q, x(z.value), 1)
100
- ])) : m("", !0),
101
- !g.value && v.value != "uploading" && !w(n)().isRecording ? (c(), y("button", {
82
+ l("span", P, x(U.value), 1)
83
+ ])) : _("", !0),
84
+ !d.value && c.value != "uploading" && !A(m)().isRecording ? (p(), v("button", {
102
85
  key: 2,
103
- class: L(["audio-recorder__button", { "audio-recorder__button-disabled": R.state == "disabled" || w(n)().file }]),
104
- onClick: B
86
+ class: B(["audio-recorder__button", { "audio-recorder__button-disabled": g.state == "disabled" || A(m)().file }]),
87
+ onClick: h
105
88
  }, [...e[4] || (e[4] = [
106
- a("span", { class: "pi pi-microphone" }, null, -1)
107
- ])], 2)) : m("", !0),
108
- w(n)().file ? (c(), M(P, {
109
- key: 3,
110
- to: "#chat-input-file-line-" + w(f)
111
- }, [
112
- p.value ? (c(), M(G, {
113
- key: 0,
114
- "file-info": p.value,
115
- onReset: V
116
- }, null, 8, ["file-info"])) : m("", !0)
117
- ], 8, ["to"])) : m("", !0)
89
+ l("span", { class: "pi pi-microphone" }, null, -1)
90
+ ])], 2)) : _("", !0)
118
91
  ]));
119
92
  }
120
93
  });
121
94
  export {
122
- ne as default
95
+ ae as default
123
96
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./VideoRecorder.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-9cc78254"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d1f2b0be"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,25 +1,25 @@
1
- import { defineComponent as F, inject as R, ref as y, watch as V, createElementBlock as d, openBlock as o, Fragment as C, createCommentVNode as n, createBlock as w, unref as p, normalizeClass as I, createElementVNode as c, Teleport as M } from "vue";
2
- import { uploadFile as z } from "../../../hooks/uploadFile/uploadFile.js";
3
- import { useMessageDraft as A } from "../../../hooks/useMessageDraft.js";
1
+ import { defineComponent as _, inject as y, ref as b, createElementBlock as r, openBlock as i, Fragment as h, createCommentVNode as a, unref as f, normalizeClass as k, createElementVNode as n } from "vue";
2
+ import { buildFilePreview as F } from "../../../hooks/uploadFile/generatePreview.js";
3
+ import { uploadFile as w } from "../../../hooks/uploadFile/uploadFile.js";
4
+ import { useMessageDraft as M } from "../../../hooks/useMessageDraft.js";
4
5
  import "../../../hooks/useSearchModel.js";
5
- import { useTheme as B } from "../../../hooks/useTheme.js";
6
+ import { useTheme as R } from "../../../hooks/useTheme.js";
6
7
  import "../../../hooks/useEmojiNative.js";
7
8
  /* empty css */
8
9
  /* empty css */
9
10
  import "../../../locale/useLocale.js";
10
11
  /* empty css */
11
- import { useModalVideoRecorder as S } from "../../../hooks/modals/useVideoRecorder.js";
12
+ import { useModalVideoRecorder as V } from "../../../hooks/modals/useVideoRecorder.js";
12
13
  import "../../../node_modules/linkifyjs/dist/linkify.js";
13
14
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
14
15
  import "../../../functions/parseMarkdown.js";
15
- import E from "../../2_chatinput_elements/FilePreview/FilePreview.vue.js";
16
- const U = {
16
+ const C = {
17
17
  key: 0,
18
18
  class: "video-recorder__container"
19
- }, N = {
19
+ }, z = {
20
20
  key: 1,
21
21
  class: "video-recorder__container"
22
- }, Y = /* @__PURE__ */ F({
22
+ }, J = /* @__PURE__ */ _({
23
23
  __name: "VideoRecorder",
24
24
  props: {
25
25
  state: {
@@ -31,70 +31,41 @@ const U = {
31
31
  default: null
32
32
  }
33
33
  },
34
- setup(m) {
35
- const r = R("chatAppId"), { getMessage: t, setMessageFile: _, setRecordingMessage: u, resetMessageFile: h } = A(r), { getTheme: f } = B(r), a = y(""), s = y(), v = m, k = async () => {
36
- if (!t().file && v.state == "active") {
37
- const l = f().theme ? f().theme : "";
38
- await S(l).then(async (i) => {
39
- i.videoFile && (a.value = "uploading", u(!0), await z(v.filebumpUrl, i.videoFile).then((e) => {
40
- if (u(!1), a.value = e.status, e.status == "success") {
41
- _({
42
- url: e.url,
43
- name: e.name,
44
- size: e.size,
45
- type: e.type
46
- });
47
- const g = document.getElementById("chat-input-file-line-" + r);
48
- g && (g.style.display = "inherit"), e.preview && (s.value = {
49
- previewUrl: e.preview.previewUrl,
50
- isImage: e.preview.isImage,
51
- isVideo: e.preview.isVideo,
52
- isAudio: e.preview.isAudio,
53
- fileName: e.name,
54
- fileSize: e.preview.fileSize
55
- });
56
- }
34
+ setup(l) {
35
+ const d = y("chatAppId"), { getMessage: s, setMessageFile: v, setRecordingMessage: p } = M(d), { getTheme: m } = R(d), o = b(""), c = l, g = async () => {
36
+ if (!s().file && c.state == "active") {
37
+ const u = m().theme ? m().theme : "";
38
+ await V(u).then(async (t) => {
39
+ t.videoFile && (o.value = "uploading", p(!0), await w(c.filebumpUrl, t.videoFile).then((e) => {
40
+ p(!1), o.value = e.status, e.status == "success" && v({
41
+ url: e.url,
42
+ name: e.name,
43
+ size: e.size,
44
+ type: e.type,
45
+ preview: F(e.name, e.preview)
46
+ });
57
47
  }));
58
48
  });
59
49
  }
60
- }, b = () => {
61
- h();
62
- const l = document.getElementById("chat-input-file-line-" + r);
63
- l && (l.style.display = "none"), s.value = void 0;
64
50
  };
65
- return V(
66
- () => t().file,
67
- () => {
68
- t().file || (s.value = void 0);
69
- }
70
- ), (l, i) => (o(), d(C, null, [
71
- p(t)().isRecording ? n("", !0) : (o(), d("div", U, [
72
- a.value != "uploading" ? (o(), d("button", {
51
+ return (u, t) => (i(), r(h, null, [
52
+ f(s)().isRecording ? a("", !0) : (i(), r("div", C, [
53
+ o.value != "uploading" ? (i(), r("button", {
73
54
  key: 0,
74
- class: I(["video-recorder__button", { "video-recorder__button-disabled": m.state == "disabled" || p(t)().file }]),
75
- onClick: k
76
- }, [...i[0] || (i[0] = [
77
- c("span", { class: "pi pi-video" }, null, -1)
78
- ])], 2)) : n("", !0)
55
+ class: k(["video-recorder__button", { "video-recorder__button-disabled": l.state == "disabled" || f(s)().file }]),
56
+ onClick: g
57
+ }, [...t[0] || (t[0] = [
58
+ n("span", { class: "pi pi-video" }, null, -1)
59
+ ])], 2)) : a("", !0)
79
60
  ])),
80
- a.value === "uploading" ? (o(), d("div", N, [...i[1] || (i[1] = [
81
- c("div", { class: "video-recorder__status" }, [
82
- c("span", null, "Загрузка файла...")
61
+ o.value === "uploading" ? (i(), r("div", z, [...t[1] || (t[1] = [
62
+ n("div", { class: "video-recorder__status" }, [
63
+ n("span", null, "Загрузка файла...")
83
64
  ], -1)
84
- ])])) : n("", !0),
85
- p(t)().file ? (o(), w(M, {
86
- key: 2,
87
- to: "#chat-input-file-line-" + p(r)
88
- }, [
89
- s.value ? (o(), w(E, {
90
- key: 0,
91
- "file-info": s.value,
92
- onReset: b
93
- }, null, 8, ["file-info"])) : n("", !0)
94
- ], 8, ["to"])) : n("", !0)
65
+ ])])) : a("", !0)
95
66
  ], 64));
96
67
  }
97
68
  });
98
69
  export {
99
- Y as default
70
+ J as default
100
71
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AudioMessage.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-71edc0f6"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-06981a56"]]);
5
5
  export {
6
- a as default
6
+ e as default
7
7
  };
@@ -349,6 +349,10 @@ const Mt = ["messageId"], kt = ["src"], Rt = {
349
349
  onMouseenter: t[7] || (t[7] = //@ts-ignore
350
350
  (...n) => i(J) && i(J)(...n))
351
351
  }, [
352
+ t[13] || (t[13] = o("div", {
353
+ class: "audio-message__bottom-shadow",
354
+ "aria-hidden": "true"
355
+ }, null, -1)),
352
356
  s.message.deleted ? (u(), r(q, { key: 0 }, [
353
357
  b(dt),
354
358
  o("div", Tt, [
@@ -1,7 +1,7 @@
1
1
  import o from "./CallMessage.vue2.js";
2
2
  /* empty css */
3
- import a from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ a(o, [["__scopeId", "data-v-57ad1b94"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-93cf25f4"]]);
5
5
  export {
6
- e as default
6
+ s as default
7
7
  };
@@ -365,6 +365,10 @@ const pt = ["messageId"], _t = ["src"], ft = {
365
365
  }, 8, ["text", "position"])
366
366
  ])) : p("", !0),
367
367
  o("div", gt, [
368
+ t[10] || (t[10] = o("div", {
369
+ class: "call-message__bottom-shadow",
370
+ "aria-hidden": "true"
371
+ }, null, -1)),
368
372
  a(s).deleted ? (n(), u(y, { key: 0 }, [
369
373
  P(dt),
370
374
  o("div", yt, [
@@ -1,7 +1,7 @@
1
1
  import o from "./FileMessage.vue2.js";
2
2
  /* empty css */
3
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bff725ab"]]);
3
+ import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ec2a2790"]]);
5
5
  export {
6
- r as default
6
+ s as default
7
7
  };
@@ -2,8 +2,8 @@ import { defineComponent as te, inject as ae, computed as w, createElementBlock
2
2
  import me from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
3
3
  import re from "../../1_atoms/LinkPreview/LinkPreview.vue.js";
4
4
  import ue from "../../1_atoms/EmbedPreview/EmbedPreview.vue.js";
5
- import ce from "../BaseReplyMessage/BaseReplyMessage.vue.js";
6
- import ge from "../MessageReactions/MessageReactions.vue.js";
5
+ import ge from "../BaseReplyMessage/BaseReplyMessage.vue.js";
6
+ import ce from "../MessageReactions/MessageReactions.vue.js";
7
7
  import L from "../MessageStatusIndicator/MessageStatusIndicator.vue.js";
8
8
  import de from "../MessageSmsInvite/MessageSmsInvite.vue.js";
9
9
  import fe from "../DeletedMessageContent/DeletedMessageContent.vue.js";
@@ -81,7 +81,7 @@ const xe = ["messageId"], Ie = ["src"], pe = {
81
81
  },
82
82
  emits: ["action", "reply", "sms-invite"],
83
83
  setup(e, { emit: F }) {
84
- const t = e, h = F, { linkedHtml: N, inNewWindow: M } = he(() => t.message.text), { menuActions: b } = ve(() => t.message), O = ae("chatAppId"), { startReply: B } = Me(O || ""), {
84
+ const a = e, h = F, { linkedHtml: N, inNewWindow: M } = he(() => a.message.text), { menuActions: b } = ve(() => a.message), O = ae("chatAppId"), { startReply: B } = Me(O || ""), {
85
85
  isOpenMenu: j,
86
86
  buttonMenuVisible: P,
87
87
  menuAnchorRef: V,
@@ -97,37 +97,37 @@ const xe = ["messageId"], Ie = ["src"], pe = {
97
97
  clickAction: G,
98
98
  viewsAction: T,
99
99
  handleClickReplied: J
100
- } = be(t.message, h, {
101
- onReply: () => B(U(t.message, "message.file"))
102
- }), x = w(() => Re(t.message.status)), I = w(() => Se(t.message.status, t.message.statusMsg)), { bubbleStyle: K } = ke(
103
- w(() => t.message),
100
+ } = be(a.message, h, {
101
+ onReply: () => B(U(a.message, "message.file"))
102
+ }), x = w(() => Re(a.message.status)), I = w(() => Se(a.message.status, a.message.statusMsg)), { bubbleStyle: K } = ke(
103
+ w(() => a.message),
104
104
  { cssVariable: "--chotto-filemessage-right-bg", position: "right" }
105
105
  );
106
106
  function k(r) {
107
107
  return Ce(r.position, "file-message");
108
108
  }
109
109
  const { onToggleReaction: Q, onAddReaction: X, onRemoveReaction: Y } = Te(h), Z = async () => {
110
- if (t.message.url)
110
+ if (a.message.url)
111
111
  try {
112
- const r = new URL(t.message.url, window.location.href);
112
+ const r = new URL(a.message.url, window.location.href);
113
113
  if (r.origin === window.location.origin) {
114
- const g = document.createElement("a");
115
- g.href = r.toString(), g.download = t.message.filename || `file-${t.message.messageId}`, document.body.appendChild(g), g.click(), document.body.removeChild(g);
114
+ const c = document.createElement("a");
115
+ c.href = r.toString(), c.download = a.message.filename || `file-${a.message.messageId}`, document.body.appendChild(c), c.click(), document.body.removeChild(c);
116
116
  return;
117
117
  }
118
- const o = await fetch(t.message.url);
118
+ const o = await fetch(a.message.url);
119
119
  if (!o.ok)
120
120
  throw new Error(`HTTP error! status: ${o.status}`);
121
- const se = await o.blob(), p = window.URL.createObjectURL(se), c = document.createElement("a");
122
- c.href = p, c.download = t.message.filename || `file-${t.message.messageId}`, document.body.appendChild(c), c.click(), document.body.removeChild(c), window.URL.revokeObjectURL(p);
121
+ const se = await o.blob(), p = window.URL.createObjectURL(se), g = document.createElement("a");
122
+ g.href = p, g.download = a.message.filename || `file-${a.message.messageId}`, document.body.appendChild(g), g.click(), document.body.removeChild(g), window.URL.revokeObjectURL(p);
123
123
  } catch (r) {
124
- console.error("Ошибка при скачивании файла:", r), window.open(t.message.url, "_blank");
124
+ console.error("Ошибка при скачивании файла:", r), window.open(a.message.url, "_blank");
125
125
  }
126
- }, _ = we(() => t.message, () => t.subtextTooltipData);
126
+ }, _ = we(() => a.message, () => a.subtextTooltipData);
127
127
  function ee() {
128
- h("sms-invite", t.message);
128
+ h("sms-invite", a.message);
129
129
  }
130
- return (r, a) => (i(), m("div", {
130
+ return (r, t) => (i(), m("div", {
131
131
  ref_key: "menuAnchorRef",
132
132
  ref: V,
133
133
  class: d(["file-message", [
@@ -136,7 +136,7 @@ const xe = ["messageId"], Ie = ["src"], pe = {
136
136
  ]]),
137
137
  messageId: e.message.messageId,
138
138
  style: v(s(K)),
139
- onMouseleave: a[4] || (a[4] = //@ts-ignore
139
+ onMouseleave: t[4] || (t[4] = //@ts-ignore
140
140
  (...o) => s(S) && s(S)(...o))
141
141
  }, [
142
142
  e.message.avatar && e.isFirstInSeries ? (i(), m("img", {
@@ -162,9 +162,13 @@ const xe = ["messageId"], Ie = ["src"], pe = {
162
162
  n("div", {
163
163
  class: d(["file-message__content", { "is-first": e.isFirstInSeries, "with-avatar-indent": !e.isFirstInSeries && e.message.avatar }]),
164
164
  style: v({ gridRow: e.message.subText ? "2" : "1" }),
165
- onMouseenter: a[3] || (a[3] = //@ts-ignore
165
+ onMouseenter: t[3] || (t[3] = //@ts-ignore
166
166
  (...o) => s(R) && s(R)(...o))
167
167
  }, [
168
+ t[9] || (t[9] = n("div", {
169
+ class: "file-message__bottom-shadow",
170
+ "aria-hidden": "true"
171
+ }, null, -1)),
168
172
  e.message.deleted ? (i(), m(E, { key: 0 }, [
169
173
  u(fe),
170
174
  n("div", Ae, [
@@ -180,7 +184,7 @@ const xe = ["messageId"], Ie = ["src"], pe = {
180
184
  ])
181
185
  ])
182
186
  ], 64)) : (i(), m(E, { key: 1 }, [
183
- e.message.reply ? (i(), y(ce, {
187
+ e.message.reply ? (i(), y(ge, {
184
188
  key: 0,
185
189
  message: e.message.reply,
186
190
  class: d(e.message.position),
@@ -191,15 +195,15 @@ const xe = ["messageId"], Ie = ["src"], pe = {
191
195
  href: e.message.url,
192
196
  onClick: ie(Z, ["prevent"])
193
197
  }, [
194
- a[5] || (a[5] = n("span", { class: "pi pi-file" }, null, -1)),
198
+ t[5] || (t[5] = n("span", { class: "pi pi-file" }, null, -1)),
195
199
  n("p", Fe, f(e.message.filename), 1),
196
- a[6] || (a[6] = n("div", { class: "file-message__download-button" }, [
200
+ t[6] || (t[6] = n("div", { class: "file-message__download-button" }, [
197
201
  n("span", { class: "pi pi-download" })
198
202
  ], -1))
199
203
  ], 8, Ue),
200
204
  e.message.text ? (i(), m("div", Ne, [
201
205
  n("p", {
202
- onClick: a[0] || (a[0] = //@ts-ignore
206
+ onClick: t[0] || (t[0] = //@ts-ignore
203
207
  (...o) => s(M) && s(M)(...o)),
204
208
  innerHTML: s(N)
205
209
  }, null, 8, Oe)
@@ -215,7 +219,7 @@ const xe = ["messageId"], Ie = ["src"], pe = {
215
219
  embed: e.message.embed
216
220
  }, null, 8, ["class", "embed"])) : l("", !0),
217
221
  n("div", Be, [
218
- u(ge, {
222
+ u(ce, {
219
223
  reactions: e.message.reactions,
220
224
  "message-id": e.message.messageId,
221
225
  reply: s(U)(e.message, "message.file"),
@@ -233,10 +237,10 @@ const xe = ["messageId"], Ie = ["src"], pe = {
233
237
  e.message.views ? (i(), m("div", {
234
238
  key: 0,
235
239
  class: "file-message__views",
236
- onClick: a[1] || (a[1] = //@ts-ignore
240
+ onClick: t[1] || (t[1] = //@ts-ignore
237
241
  (...o) => s(T) && s(T)(...o))
238
242
  }, [
239
- a[7] || (a[7] = n("span", { class: "pi pi-eye" }, null, -1)),
243
+ t[7] || (t[7] = n("span", { class: "pi pi-eye" }, null, -1)),
240
244
  n("p", null, f(e.message.views), 1)
241
245
  ])) : l("", !0),
242
246
  n("span", Pe, f(e.message.time), 1),
@@ -258,9 +262,9 @@ const xe = ["messageId"], Ie = ["src"], pe = {
258
262
  s(P) && s(b).length && !e.reactionsEnabled ? (i(), m("button", {
259
263
  key: 4,
260
264
  class: "file-message__menu-button",
261
- onClick: a[2] || (a[2] = //@ts-ignore
265
+ onClick: t[2] || (t[2] = //@ts-ignore
262
266
  (...o) => s(C) && s(C)(...o))
263
- }, [...a[8] || (a[8] = [
267
+ }, [...t[8] || (t[8] = [
264
268
  n("span", { class: "pi pi-ellipsis-h" }, null, -1)
265
269
  ])])) : l("", !0),
266
270
  (i(), y(oe, { to: "body" }, [
@@ -1,7 +1,7 @@
1
- import e from "./ImageMessage.vue2.js";
1
+ import a from "./ImageMessage.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(e, [["__scopeId", "data-v-e77e944b"]]);
4
+ const r = /* @__PURE__ */ o(a, [["__scopeId", "data-v-7b3f2aad"]]);
5
5
  export {
6
6
  r as default
7
7
  };