@mobilon-dev/chotto 0.3.125 → 0.3.126
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/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,7 +1,7 @@
|
|
|
1
1
|
import o from "./FeedFoundItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b8456345"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, computed as l, createElementBlock as r, openBlock as s, normalizeClass as u, createElementVNode as i, toDisplayString as n, createCommentVNode as p, unref as f } from "vue";
|
|
2
2
|
import "../../../locale/useLocale.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
@@ -6,11 +6,12 @@ import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
|
6
6
|
import "../../../functions/parseMarkdown.js";
|
|
7
7
|
/* empty css */
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { getPrimaryImageItem as
|
|
10
|
-
|
|
9
|
+
import { getPrimaryImageItem as g } from "../../../hooks/messages/getImageMessageItems.js";
|
|
10
|
+
import { useImageFeedSrc as y } from "../../../hooks/messages/useImageFeedSrc.js";
|
|
11
|
+
const b = { class: "feed-found-item__avatar-container" }, j = ["src"], x = {
|
|
11
12
|
key: 1,
|
|
12
13
|
class: "pi pi-user"
|
|
13
|
-
},
|
|
14
|
+
}, k = { class: "feed-found-item__info" }, w = { class: "feed-found-item__first-line" }, I = { class: "feed-found-item__name" }, E = { class: "feed-found-item__time" }, P = { class: "feed-found-item__second-line" }, S = ["src"], A = /* @__PURE__ */ h({
|
|
14
15
|
__name: "FeedFoundItem",
|
|
15
16
|
props: {
|
|
16
17
|
object: {
|
|
@@ -22,52 +23,61 @@ const p = { class: "feed-found-item__avatar-container" }, _ = ["src"], g = {
|
|
|
22
23
|
default: !1
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
setup(e) {
|
|
27
|
+
const o = e, { displaySrc: _, onImageError: a } = y(
|
|
28
|
+
() => {
|
|
29
|
+
var t;
|
|
30
|
+
if (o.object.type === "message.image")
|
|
31
|
+
return (t = g(o.object)) == null ? void 0 : t.imagePreviewUrl;
|
|
32
|
+
},
|
|
33
|
+
() => {
|
|
34
|
+
var t;
|
|
35
|
+
if (o.object.type === "message.image")
|
|
36
|
+
return (t = g(o.object)) == null ? void 0 : t.url;
|
|
37
|
+
}
|
|
38
|
+
), c = l(() => o.object.type !== "message.image" ? "" : _.value), m = l(() => ({
|
|
31
39
|
"message.file": "pi pi-file",
|
|
32
40
|
"message.audio": "pi pi-volume-up",
|
|
33
41
|
"message.video": "pi pi-video",
|
|
34
42
|
"message.call": "pi pi-phone"
|
|
35
|
-
})[
|
|
36
|
-
return (
|
|
37
|
-
class:
|
|
43
|
+
})[o.object.type] || null);
|
|
44
|
+
return (t, d) => (s(), r("div", {
|
|
45
|
+
class: u(["feed-found-item__container", { "feed-found-item__selected-container": e.selected }])
|
|
38
46
|
}, [
|
|
39
|
-
i("div",
|
|
40
|
-
|
|
47
|
+
i("div", b, [
|
|
48
|
+
e.object.avatar ? (s(), r("img", {
|
|
41
49
|
key: 0,
|
|
42
|
-
src:
|
|
50
|
+
src: e.object.avatar,
|
|
43
51
|
width: "48",
|
|
44
52
|
height: "48"
|
|
45
|
-
}, null, 8,
|
|
53
|
+
}, null, 8, j)) : (s(), r("span", x))
|
|
46
54
|
]),
|
|
47
|
-
i("div",
|
|
48
|
-
i("div",
|
|
49
|
-
i("p",
|
|
50
|
-
i("p",
|
|
55
|
+
i("div", k, [
|
|
56
|
+
i("div", w, [
|
|
57
|
+
i("p", I, n(e.object.subtext), 1),
|
|
58
|
+
i("p", E, n(e.object.time), 1)
|
|
51
59
|
]),
|
|
52
|
-
i("div",
|
|
53
|
-
|
|
60
|
+
i("div", P, [
|
|
61
|
+
c.value ? (s(), r("img", {
|
|
54
62
|
key: 0,
|
|
55
|
-
src:
|
|
63
|
+
src: c.value,
|
|
56
64
|
style: { "margin-right": "3px" },
|
|
57
65
|
width: "24",
|
|
58
|
-
height: "24"
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
height: "24",
|
|
67
|
+
onError: d[0] || (d[0] = //@ts-ignore
|
|
68
|
+
(...v) => f(a) && f(a)(...v))
|
|
69
|
+
}, null, 40, S)) : p("", !0),
|
|
70
|
+
m.value ? (s(), r("span", {
|
|
61
71
|
key: 1,
|
|
62
|
-
class:
|
|
72
|
+
class: u(m.value),
|
|
63
73
|
style: { "margin-right": "3px", "font-size": "20px" }
|
|
64
|
-
}, null, 2)) :
|
|
65
|
-
i("p", null,
|
|
74
|
+
}, null, 2)) : p("", !0),
|
|
75
|
+
i("p", null, n(e.object.text), 1)
|
|
66
76
|
])
|
|
67
77
|
])
|
|
68
78
|
], 2));
|
|
69
79
|
}
|
|
70
80
|
});
|
|
71
81
|
export {
|
|
72
|
-
|
|
82
|
+
A as default
|
|
73
83
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FeedReplyQuote.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-70906f41"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -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
|
};
|