@mobilon-dev/chotto 0.3.125 → 0.3.127
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.
- package/dist/chotto.css +1 -1
- package/dist/components/2_blocks/CommunicationPanel/CommunicationPanel.vue.js +51 -51
- package/dist/components/2_blocks/CommunicationPanel/composables/useCommunicationActions.js +52 -50
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +2 -2
- package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +41 -31
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +2 -2
- package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +51 -30
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +2 -2
- package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +286 -270
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +3 -3
- package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +40 -34
- package/dist/components/3_compounds/ChatInput/ChatInput.vue.js +1 -1
- package/dist/components/3_compounds/ChatInput/ChatInput.vue2.js +282 -259
- package/dist/components/3_compounds/Feed/composables/useFeedScroll.js +79 -59
- package/dist/functions/parseMarkdown.js +7 -6
- package/dist/hooks/messages/useImageFeedSrc.js +50 -0
- package/dist/index.js +118 -113
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/src/components/2_feed_elements/ImageMessage/stories/ImageMessage.stories.d.ts +2 -0
- package/dist/types/src/components/3_compounds/Feed/composables/useFeedScroll.d.ts +3 -0
- package/dist/types/src/components/4_layouts/ChatWrapper/styles/types.d.ts +4 -0
- package/dist/types/src/hooks/messages/index.d.ts +1 -0
- package/dist/types/src/hooks/messages/useImageFeedSrc.d.ts +29 -0
- package/package.json +1 -1
|
@@ -1,11 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as k, computed as a, createElementBlock as o, openBlock as n, normalizeClass as w, createCommentVNode as m, createElementVNode as C, unref as g, toDisplayString as p } from "vue";
|
|
2
|
+
import "../../../locale/useLocale.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
5
|
+
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
6
|
+
import "../../../functions/parseMarkdown.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
/* empty css */
|
|
9
|
+
import { useImageFeedSrc as I } from "../../../hooks/messages/useImageFeedSrc.js";
|
|
10
|
+
const S = ["src"], q = { class: "feed-reply-quote__content" }, x = {
|
|
3
11
|
key: 0,
|
|
4
12
|
class: "feed-reply-quote__heading"
|
|
5
|
-
},
|
|
13
|
+
}, P = {
|
|
6
14
|
key: 1,
|
|
7
15
|
class: "feed-reply-quote__body"
|
|
8
|
-
},
|
|
16
|
+
}, R = /* @__PURE__ */ k({
|
|
9
17
|
__name: "FeedReplyQuote",
|
|
10
18
|
props: {
|
|
11
19
|
message: {
|
|
@@ -14,21 +22,32 @@ const w = ["src"], C = { class: "feed-reply-quote__content" }, E = {
|
|
|
14
22
|
}
|
|
15
23
|
},
|
|
16
24
|
emits: ["reply"],
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
19
|
-
|
|
25
|
+
setup(_, { emit: f }) {
|
|
26
|
+
const v = f, s = _, i = /* @__PURE__ */ new Set(["message.image", "message.sticker"]), { displaySrc: y, onImageError: u } = I(
|
|
27
|
+
() => {
|
|
28
|
+
const e = s.message;
|
|
29
|
+
if (i.has((e == null ? void 0 : e.type) || ""))
|
|
30
|
+
return e.imagePreviewUrl;
|
|
31
|
+
},
|
|
32
|
+
() => {
|
|
33
|
+
const e = s.message;
|
|
34
|
+
if (i.has((e == null ? void 0 : e.type) || ""))
|
|
35
|
+
return e.url;
|
|
36
|
+
}
|
|
37
|
+
), c = a(() => {
|
|
38
|
+
const e = s.message;
|
|
20
39
|
if ((e == null ? void 0 : e.type) === "message.video") return e.coverUrl || "";
|
|
21
|
-
if (!
|
|
22
|
-
const
|
|
23
|
-
return !
|
|
24
|
-
}),
|
|
25
|
-
var
|
|
26
|
-
const e = (
|
|
40
|
+
if (!i.has((e == null ? void 0 : e.type) || "")) return "";
|
|
41
|
+
const t = y.value;
|
|
42
|
+
return !t || t.endsWith(".tgs") ? "" : t;
|
|
43
|
+
}), d = a(() => {
|
|
44
|
+
var t;
|
|
45
|
+
const e = (t = s.message) == null ? void 0 : t.header;
|
|
27
46
|
return e ? `В ответ ${e}` : "";
|
|
28
47
|
}), l = a(() => {
|
|
29
|
-
var
|
|
30
|
-
const e =
|
|
31
|
-
if (
|
|
48
|
+
var r;
|
|
49
|
+
const e = s.message, t = (r = e == null ? void 0 : e.text) == null ? void 0 : r.replace(/\s+/g, " ").trim();
|
|
50
|
+
if (t) return t;
|
|
32
51
|
switch (e == null ? void 0 : e.type) {
|
|
33
52
|
case "message.image":
|
|
34
53
|
return "Фотография";
|
|
@@ -45,33 +64,35 @@ const w = ["src"], C = { class: "feed-reply-quote__content" }, E = {
|
|
|
45
64
|
default:
|
|
46
65
|
return "";
|
|
47
66
|
}
|
|
48
|
-
}),
|
|
49
|
-
function
|
|
67
|
+
}), h = a(() => c.value ? "grid" : "");
|
|
68
|
+
function E() {
|
|
50
69
|
var e;
|
|
51
|
-
(e =
|
|
70
|
+
(e = s.message) != null && e.messageId && v("reply", s.message.messageId);
|
|
52
71
|
}
|
|
53
|
-
return (e,
|
|
54
|
-
class:
|
|
72
|
+
return (e, t) => (n(), o("div", {
|
|
73
|
+
class: w(["reply__container", h.value]),
|
|
55
74
|
"data-testid": "feed-reply-quote",
|
|
56
|
-
onClick:
|
|
75
|
+
onClick: E
|
|
57
76
|
}, [
|
|
58
|
-
|
|
77
|
+
c.value ? (n(), o("img", {
|
|
59
78
|
key: 0,
|
|
60
79
|
class: "feed-reply-quote__preview",
|
|
61
|
-
src:
|
|
80
|
+
src: c.value,
|
|
62
81
|
alt: "",
|
|
63
82
|
width: "40",
|
|
64
83
|
height: "40",
|
|
65
84
|
loading: "lazy",
|
|
66
|
-
decoding: "async"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
85
|
+
decoding: "async",
|
|
86
|
+
onError: t[0] || (t[0] = //@ts-ignore
|
|
87
|
+
(...r) => g(u) && g(u)(...r))
|
|
88
|
+
}, null, 40, S)) : m("", !0),
|
|
89
|
+
C("div", q, [
|
|
90
|
+
d.value ? (n(), o("p", x, p(d.value), 1)) : m("", !0),
|
|
91
|
+
l.value ? (n(), o("p", P, p(l.value), 1)) : m("", !0)
|
|
71
92
|
])
|
|
72
93
|
], 2));
|
|
73
94
|
}
|
|
74
95
|
});
|
|
75
96
|
export {
|
|
76
|
-
|
|
97
|
+
R as default
|
|
77
98
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ImageMessage.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const r = /* @__PURE__ */
|
|
3
|
+
import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-99e09d5d"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|