tuikit-atomicx-vue3 4.5.0 → 4.5.1
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/{PopoverTrigger-L8abAry7.js → PopoverPortal-DghpKKm8.js} +91 -136
- package/dist/PopoverTrigger-BajjNkGO.js +54 -0
- package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-SLoFuK7k.js} +6 -6
- package/dist/{Teleport-CSEuZbpM.js → Teleport-DFrneqLM.js} +4 -4
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +10 -9
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +16 -15
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +29 -27
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +27 -23
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +1 -1
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +67 -65
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +32 -30
- package/dist/components/ConversationList/ConversationPreview/utils.d.ts +2 -2
- package/dist/components/ConversationList/ConversationPreview/utils.js +81 -35
- package/dist/components/ConversationList/i18n/en-US.d.ts +10 -1
- package/dist/components/ConversationList/i18n/en-US.js +11 -2
- package/dist/components/ConversationList/i18n/zh-CN.d.ts +10 -1
- package/dist/components/ConversationList/i18n/zh-CN.js +11 -2
- package/dist/components/LiveScenePanel/index.js +10 -9
- package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
- package/dist/components/MessageInput/QuotedMessagePreview/index.js +35 -35
- package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +13 -12
- package/dist/components/MessageInput/TextEditor/EditorCore.js +54 -89
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +229 -0
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue.d.ts +15 -0
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.d.ts +1 -0
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +22 -0
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.d.ts +3 -0
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +15 -0
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/extensions/index.d.ts +8 -0
- package/dist/components/MessageInput/TextEditor/extensions/index.js +12 -0
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.d.ts +5 -0
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +330 -0
- package/dist/components/MessageInput/TextEditor/index.js +62 -62
- package/dist/components/MessageInput/i18n/en-US.d.ts +3 -0
- package/dist/components/MessageInput/i18n/en-US.js +4 -1
- package/dist/components/MessageInput/i18n/index.d.ts +6 -0
- package/dist/components/MessageInput/i18n/zh-CN.d.ts +3 -0
- package/dist/components/MessageInput/i18n/zh-CN.js +4 -1
- package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +119 -89
- package/dist/components/MessageList/Message/ImageMessage/ImagePreview.js +142 -0
- package/dist/components/MessageList/Message/ImageMessage/ImagePreview.vue.d.ts +20 -0
- package/dist/components/MessageList/Message/Message.vue.d.ts +8 -0
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +69 -58
- package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +8 -0
- package/dist/components/MessageList/Message/index.js +8 -4
- package/dist/components/MessageList/MessageList.js +98 -90
- package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
- package/dist/components/MessageList/index.d.ts +21 -3
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +6 -6
- package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.vue.d.ts +1 -1
- package/dist/index-BvFYOUyz.js +2936 -0
- package/dist/{index-Do-2CngU.js → index-C8Jw_xE4.js} +1621 -1731
- package/dist/{index-7vNB_Vx8.js → index-CiYL_XsE.js} +1 -1
- package/dist/index-CzCDLp99.js +2174 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +103 -103
- package/dist/states/MessageActionState/MessageActionState.js +83 -223
- package/dist/states/MessageInputState/MessageInputState.js +115 -83
- package/dist/states/MessageInputState/type.d.ts +36 -10
- package/dist/states/MessageInputState/utils.d.ts +1 -5
- package/dist/states/MessageListState/MessageListState.d.ts +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2112 -2087
- package/dist/subEntry/chat/chat.js +89 -0
- package/dist/subEntry/chat/index.d.ts +11 -0
- package/dist/subEntry/chat/index.js +81 -0
- package/dist/{chat → subEntry/chat}/server.js +4 -4
- package/dist/{useId-CtirfF0W.js → useId-D5WE76CM.js} +1 -1
- package/dist/{utils-DaB7eSu5.js → utils-CttDpxqz.js} +1 -1
- package/package.json +8 -6
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +8 -0
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
- package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
- package/src/components/ConversationList/i18n/en-US.ts +10 -1
- package/src/components/ConversationList/i18n/zh-CN.ts +10 -1
- package/src/components/LiveScenePanel/index.vue +1 -0
- package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +19 -22
- package/src/components/MessageInput/TextEditor/Editor.scss +25 -0
- package/src/components/MessageInput/TextEditor/EditorCore.ts +79 -99
- package/src/components/MessageInput/TextEditor/TextEditor.vue +64 -68
- package/src/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue +449 -0
- package/src/components/MessageInput/TextEditor/extensions/emojiExtension.ts +22 -0
- package/src/components/MessageInput/TextEditor/extensions/enterKeyExtension.ts +22 -0
- package/src/components/MessageInput/TextEditor/extensions/index.ts +8 -0
- package/src/components/MessageInput/TextEditor/extensions/mentionExtension.ts +87 -0
- package/src/components/MessageInput/i18n/en-US.ts +3 -0
- package/src/components/MessageInput/i18n/zh-CN.ts +3 -0
- package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +49 -0
- package/src/components/MessageList/Message/ImageMessage/ImagePreview.vue +344 -0
- package/src/components/MessageList/Message/Message.vue +6 -0
- package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -1
- package/src/components/MessageList/MessageList.vue +36 -14
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
- package/src/index.ts +1 -1
- package/src/{chat/index.ts → subEntry/chat/chat.ts} +25 -18
- package/src/subEntry/chat/index.ts +13 -0
- package/src/{chat → subEntry/chat}/server.ts +3 -3
- package/dist/chat/index.js +0 -59
- package/dist/index-ZILx4LYk.js +0 -4826
- package/dist/states/SearchState.d.ts +0 -314
- /package/dist/{chat → subEntry/chat}/server.d.ts +0 -0
|
@@ -1,50 +1,72 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useUIKit as
|
|
3
|
-
import { getLatestMessagePreview as
|
|
4
|
-
import { JSONStringToParse as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as p, computed as v, createElementBlock as _, openBlock as i, normalizeClass as c, Fragment as u, createElementVNode as y, createTextVNode as m, toDisplayString as r, unref as T, createCommentVNode as C } from "vue";
|
|
2
|
+
import { useUIKit as I } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
+
import { getLatestMessagePreview as $ } from "./utils.js";
|
|
4
|
+
import { JSONStringToParse as g } from "../../../utils/json.js";
|
|
5
|
+
import { ConversationType as x } from "../../../types/engine.js";
|
|
6
|
+
import { _ as U } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
const h = /* @__PURE__ */ p({
|
|
7
8
|
__name: "ConversationPreviewAbstract",
|
|
8
9
|
props: {
|
|
9
10
|
conversation: {}
|
|
10
11
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
var
|
|
14
|
-
const { draftText: e = "" } = (
|
|
15
|
-
return ((
|
|
16
|
-
}),
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
setup(d) {
|
|
13
|
+
const o = d, { t: n } = I(), P = v(() => {
|
|
14
|
+
var t;
|
|
15
|
+
const { draftText: e = "" } = (o == null ? void 0 : o.conversation) || {};
|
|
16
|
+
return ((t = g(e)) == null ? void 0 : t.abstract) || e;
|
|
17
|
+
}), b = v(() => $(o.conversation, n)), w = v(() => {
|
|
18
|
+
const { type: e, groupAtInfoList: t } = (o == null ? void 0 : o.conversation) || {};
|
|
19
|
+
if (e !== x.GROUP || !(t != null && t.length))
|
|
20
|
+
return "";
|
|
21
|
+
const z = [
|
|
22
|
+
`[${n("TUIConversation.someone_at_me")}]`,
|
|
23
|
+
`[${n("TUIConversation.at_all")}]`,
|
|
24
|
+
`[${n("TUIConversation.at_all")}][${n("TUIConversation.someone_at_me")}]`
|
|
25
|
+
];
|
|
26
|
+
let f = "";
|
|
27
|
+
return t.forEach((s) => {
|
|
28
|
+
var l;
|
|
29
|
+
const a = (l = s == null ? void 0 : s.atTypeArray) == null ? void 0 : l[0];
|
|
30
|
+
a && a >= 1 && a <= 3 && (f = z[a - 1]);
|
|
31
|
+
}), f;
|
|
32
|
+
});
|
|
33
|
+
return (e, t) => (i(), _("div", {
|
|
34
|
+
class: c(e.$style.conversationPreview__abstract)
|
|
19
35
|
}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class:
|
|
23
|
-
}, "[" +
|
|
24
|
-
|
|
25
|
-
], 64)) : (
|
|
26
|
-
|
|
36
|
+
P.value ? (i(), _(u, { key: 0 }, [
|
|
37
|
+
y("label", {
|
|
38
|
+
class: c(e.$style.conversationPreview__abstract__drafts)
|
|
39
|
+
}, "[" + r(T(n)("TUIConversation.Drafts")) + "]", 3),
|
|
40
|
+
m(" " + r(" ") + " " + r(P.value), 1)
|
|
41
|
+
], 64)) : (i(), _(u, { key: 1 }, [
|
|
42
|
+
w.value ? (i(), _("label", {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: c(e.$style["conversationPreview__abstract__at-info"])
|
|
45
|
+
}, r(w.value), 3)) : C("", !0),
|
|
46
|
+
m(" " + r(b.value), 1)
|
|
27
47
|
], 64))
|
|
28
48
|
], 2));
|
|
29
49
|
}
|
|
30
|
-
}),
|
|
31
|
-
conversationPreview:
|
|
32
|
-
"conversationPreview--active": "_conversationPreview--
|
|
33
|
-
"conversationPreview--pin": "_conversationPreview--
|
|
34
|
-
conversationPreview__avatar:
|
|
35
|
-
conversationPreview__content:
|
|
36
|
-
conversationPreview__header:
|
|
37
|
-
conversationPreview__title:
|
|
38
|
-
conversationPreview__time:
|
|
39
|
-
conversationPreview__footer:
|
|
40
|
-
conversationPreview__abstract:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
50
|
+
}), k = "_conversationPreview_ivuzf_12", M = "_conversationPreview__avatar_ivuzf_34", N = "_conversationPreview__content_ivuzf_38", A = "_conversationPreview__header_ivuzf_42", D = "_conversationPreview__title_ivuzf_48", E = "_conversationPreview__time_ivuzf_58", S = "_conversationPreview__footer_ivuzf_65", V = "_conversationPreview__abstract_ivuzf_70", B = "_conversationPreview__abstract__drafts_ivuzf_79", L = "_conversationPreview__external_ivuzf_85", O = "_conversationPreview__unread_ivuzf_94", F = "_conversationPreview__actions_ivuzf_114", G = {
|
|
51
|
+
conversationPreview: k,
|
|
52
|
+
"conversationPreview--active": "_conversationPreview--active_ivuzf_28",
|
|
53
|
+
"conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
|
|
54
|
+
conversationPreview__avatar: M,
|
|
55
|
+
conversationPreview__content: N,
|
|
56
|
+
conversationPreview__header: A,
|
|
57
|
+
conversationPreview__title: D,
|
|
58
|
+
conversationPreview__time: E,
|
|
59
|
+
conversationPreview__footer: S,
|
|
60
|
+
conversationPreview__abstract: V,
|
|
61
|
+
conversationPreview__abstract__drafts: B,
|
|
62
|
+
"conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
|
|
63
|
+
conversationPreview__external: L,
|
|
64
|
+
conversationPreview__unread: O,
|
|
65
|
+
"unread-count": "_unread-count_ivuzf_101",
|
|
66
|
+
conversationPreview__actions: F
|
|
67
|
+
}, J = {
|
|
68
|
+
$style: G
|
|
69
|
+
}, W = /* @__PURE__ */ U(h, [["__cssModules", J]]);
|
|
48
70
|
export {
|
|
49
|
-
|
|
71
|
+
W as default
|
|
50
72
|
};
|
package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js
CHANGED
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as r, computed as a, createElementBlock as v, openBlock as s, normalizeClass as c, toDisplayString as w } from "vue";
|
|
2
2
|
import { useUIKit as P } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
-
import { getTimeStamp as
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
3
|
+
import { getTimeStamp as u } from "../../../utils/time.js";
|
|
4
|
+
import { _ as f } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const m = /* @__PURE__ */ r({
|
|
6
6
|
__name: "ConversationPreviewTimestamp",
|
|
7
7
|
props: {
|
|
8
8
|
conversation: {}
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
10
|
+
setup(t) {
|
|
11
|
+
const n = t, { language: _ } = P(), i = a(() => {
|
|
12
12
|
var e, o;
|
|
13
|
-
return
|
|
14
|
-
time: Number(((o = (e =
|
|
15
|
-
language:
|
|
13
|
+
return u({
|
|
14
|
+
time: Number(((o = (e = n.conversation) == null ? void 0 : e.lastMessage) == null ? void 0 : o.lastTime) || 0) * 1e3,
|
|
15
|
+
language: _.value
|
|
16
16
|
}) || "";
|
|
17
17
|
});
|
|
18
|
-
return (e, o) => (s(),
|
|
18
|
+
return (e, o) => (s(), v("div", {
|
|
19
19
|
class: c(e.$style.conversationPreview__time)
|
|
20
|
-
}, w(
|
|
20
|
+
}, w(i.value), 3));
|
|
21
21
|
}
|
|
22
|
-
}),
|
|
23
|
-
conversationPreview:
|
|
24
|
-
"conversationPreview--active": "_conversationPreview--
|
|
25
|
-
"conversationPreview--pin": "_conversationPreview--
|
|
26
|
-
conversationPreview__avatar:
|
|
22
|
+
}), l = "_conversationPreview_ivuzf_12", p = "_conversationPreview__avatar_ivuzf_34", d = "_conversationPreview__content_ivuzf_38", z = "_conversationPreview__header_ivuzf_42", b = "_conversationPreview__title_ivuzf_48", g = "_conversationPreview__time_ivuzf_58", x = "_conversationPreview__footer_ivuzf_65", h = "_conversationPreview__abstract_ivuzf_70", y = "_conversationPreview__abstract__drafts_ivuzf_79", M = "_conversationPreview__external_ivuzf_85", T = "_conversationPreview__unread_ivuzf_94", C = "_conversationPreview__actions_ivuzf_114", k = {
|
|
23
|
+
conversationPreview: l,
|
|
24
|
+
"conversationPreview--active": "_conversationPreview--active_ivuzf_28",
|
|
25
|
+
"conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
|
|
26
|
+
conversationPreview__avatar: p,
|
|
27
27
|
conversationPreview__content: d,
|
|
28
|
-
conversationPreview__header:
|
|
29
|
-
conversationPreview__title:
|
|
28
|
+
conversationPreview__header: z,
|
|
29
|
+
conversationPreview__title: b,
|
|
30
30
|
conversationPreview__time: g,
|
|
31
|
-
conversationPreview__footer:
|
|
31
|
+
conversationPreview__footer: x,
|
|
32
32
|
conversationPreview__abstract: h,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
33
|
+
conversationPreview__abstract__drafts: y,
|
|
34
|
+
"conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
|
|
35
|
+
conversationPreview__external: M,
|
|
36
|
+
conversationPreview__unread: T,
|
|
37
|
+
"unread-count": "_unread-count_ivuzf_101",
|
|
38
|
+
conversationPreview__actions: C
|
|
39
|
+
}, B = {
|
|
40
|
+
$style: k
|
|
41
|
+
}, I = /* @__PURE__ */ f(m, [["__cssModules", B]]);
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
I as default
|
|
42
44
|
};
|
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { defineComponent as i, createElementBlock as v, openBlock as
|
|
2
|
-
import { _ as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as i, computed as r, createElementBlock as v, openBlock as a, normalizeClass as s, toDisplayString as c } from "vue";
|
|
2
|
+
import { _ as w } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
+
const P = /* @__PURE__ */ i({
|
|
4
4
|
__name: "ConversationPreviewTitle",
|
|
5
5
|
props: {
|
|
6
6
|
conversation: {}
|
|
7
7
|
},
|
|
8
|
-
setup(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
setup(t) {
|
|
9
|
+
const n = t, _ = r(() => {
|
|
10
|
+
var e, o;
|
|
11
|
+
return ((o = (e = n == null ? void 0 : n.conversation) == null ? void 0 : e.getShowName) == null ? void 0 : o.call(e)) || "";
|
|
12
|
+
});
|
|
13
|
+
return (e, o) => (a(), v("div", {
|
|
14
|
+
class: s([e.$style.conversationPreview__title, e.$style.textEllipsis])
|
|
15
|
+
}, c(_.value), 3));
|
|
14
16
|
}
|
|
15
|
-
}),
|
|
16
|
-
conversationPreview:
|
|
17
|
-
"conversationPreview--active": "_conversationPreview--
|
|
18
|
-
"conversationPreview--pin": "_conversationPreview--
|
|
19
|
-
conversationPreview__avatar:
|
|
20
|
-
conversationPreview__content:
|
|
17
|
+
}), u = "_conversationPreview_ivuzf_12", f = "_conversationPreview__avatar_ivuzf_34", l = "_conversationPreview__content_ivuzf_38", d = "_conversationPreview__header_ivuzf_42", z = "_conversationPreview__title_ivuzf_48", m = "_conversationPreview__time_ivuzf_58", p = "_conversationPreview__footer_ivuzf_65", b = "_conversationPreview__abstract_ivuzf_70", h = "_conversationPreview__abstract__drafts_ivuzf_79", x = "_conversationPreview__external_ivuzf_85", y = "_conversationPreview__unread_ivuzf_94", C = "_conversationPreview__actions_ivuzf_114", $ = {
|
|
18
|
+
conversationPreview: u,
|
|
19
|
+
"conversationPreview--active": "_conversationPreview--active_ivuzf_28",
|
|
20
|
+
"conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
|
|
21
|
+
conversationPreview__avatar: f,
|
|
22
|
+
conversationPreview__content: l,
|
|
21
23
|
conversationPreview__header: d,
|
|
22
|
-
conversationPreview__title:
|
|
23
|
-
conversationPreview__time:
|
|
24
|
+
conversationPreview__title: z,
|
|
25
|
+
conversationPreview__time: m,
|
|
24
26
|
conversationPreview__footer: p,
|
|
25
|
-
conversationPreview__abstract:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
conversationPreview__abstract: b,
|
|
28
|
+
conversationPreview__abstract__drafts: h,
|
|
29
|
+
"conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
|
|
30
|
+
conversationPreview__external: x,
|
|
31
|
+
conversationPreview__unread: y,
|
|
32
|
+
"unread-count": "_unread-count_ivuzf_101",
|
|
29
33
|
conversationPreview__actions: C
|
|
30
34
|
}, g = {
|
|
31
35
|
$style: $
|
|
32
|
-
},
|
|
36
|
+
}, D = /* @__PURE__ */ w(P, [["__cssModules", g]]);
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
D as default
|
|
35
39
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useMouseHover as
|
|
10
|
-
import { useLongPress as
|
|
11
|
-
import { isH5 as
|
|
1
|
+
import { defineComponent as V, ref as $, watch as H, createElementBlock as K, openBlock as t, createElementVNode as c, createBlock as i, createCommentVNode as j, mergeProps as l, unref as o, renderSlot as F, normalizeClass as u, resolveDynamicComponent as a } from "vue";
|
|
2
|
+
import _ from "@tencentcloud/chat-uikit-engine";
|
|
3
|
+
import q from "../../Avatar/Avatar.js";
|
|
4
|
+
import G from "./ConversationPreviewAbstract.js";
|
|
5
|
+
import J from "./ConversationPreviewTimestamp.js";
|
|
6
|
+
import Q from "./ConversationPreviewTitle.js";
|
|
7
|
+
import W from "./ConversationPreviewUnread.js";
|
|
8
|
+
import X from "../ConversationActions/ConversationActions.js";
|
|
9
|
+
import { useMouseHover as Z } from "../../../hooks/useMouseHover.js";
|
|
10
|
+
import { useLongPress as x } from "../../../hooks/useLongPress.js";
|
|
11
|
+
import { isH5 as s } from "../../../utils/env.js";
|
|
12
12
|
import { useConversationListState as p } from "../../../states/ConversationListState/ConversationListState.js";
|
|
13
13
|
import { _ as ee } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
-
const ne = /* @__PURE__ */
|
|
14
|
+
const ne = /* @__PURE__ */ V({
|
|
15
15
|
__name: "ConversationPreviewUI",
|
|
16
16
|
props: {
|
|
17
17
|
conversation: {},
|
|
18
18
|
isSelected: { type: Boolean, default: !1 },
|
|
19
19
|
enableActions: { type: Boolean, default: !0 },
|
|
20
|
-
Avatar: { type: [Object, Function], default: () =>
|
|
21
|
-
Title: { default: () =>
|
|
22
|
-
LastMessageAbstract: { default: () =>
|
|
23
|
-
LastMessageTimestamp: { default: () =>
|
|
24
|
-
Unread: { default: () =>
|
|
25
|
-
ConversationActions: { type: [Object, Function], default: () =>
|
|
20
|
+
Avatar: { type: [Object, Function], default: () => q },
|
|
21
|
+
Title: { default: () => Q },
|
|
22
|
+
LastMessageAbstract: { default: () => G },
|
|
23
|
+
LastMessageTimestamp: { default: () => J },
|
|
24
|
+
Unread: { default: () => W },
|
|
25
|
+
ConversationActions: { type: [Object, Function], default: () => X },
|
|
26
26
|
onSelectConversation: {},
|
|
27
27
|
actionsConfig: {},
|
|
28
28
|
className: {},
|
|
@@ -30,61 +30,61 @@ const ne = /* @__PURE__ */ O({
|
|
|
30
30
|
children: {}
|
|
31
31
|
},
|
|
32
32
|
emits: ["selectConversation"],
|
|
33
|
-
setup(e, { emit:
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
setup(e, { emit: N }) {
|
|
34
|
+
const f = e, h = N, { activeConversation: R, setActiveConversation: S } = p(), P = $(), r = $(!1), { isHovered: I } = Z(P), { getEventHandlers: Y } = x(() => {
|
|
35
|
+
s && (r.value = !0);
|
|
36
|
+
}), B = Y();
|
|
37
|
+
H(I, (n) => {
|
|
38
|
+
s || (r.value = n);
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
|
|
40
|
+
const O = () => {
|
|
41
|
+
h("selectConversation", f.conversation), S(f.conversation.conversationID);
|
|
42
42
|
}, d = () => {
|
|
43
|
-
|
|
43
|
+
r.value = !1;
|
|
44
44
|
};
|
|
45
|
-
return (n,
|
|
46
|
-
var
|
|
47
|
-
return
|
|
45
|
+
return (n, me) => {
|
|
46
|
+
var m, w, C, A, y, M, b, z;
|
|
47
|
+
return t(), K("div", null, [
|
|
48
48
|
c("div", l({
|
|
49
49
|
ref_key: "conversationPreviewRef",
|
|
50
|
-
ref:
|
|
50
|
+
ref: P,
|
|
51
51
|
class: [
|
|
52
52
|
n.$style.conversationPreview,
|
|
53
53
|
e.className,
|
|
54
|
-
|
|
55
|
-
(e.isSelected || ((
|
|
56
|
-
!((C = e.conversation) != null && C.isMuted) && (((A = e.conversation) == null ? void 0 : A.unreadCount) > 0 || ((M = (y = e.conversation) == null ? void 0 : y.markList) == null ? void 0 : M.includes(
|
|
57
|
-
((
|
|
58
|
-
((
|
|
54
|
+
o(s) && [n.$style["conversationPreview--mobile"]],
|
|
55
|
+
(e.isSelected || ((m = e.conversation) == null ? void 0 : m.conversationID) === ((w = o(R)) == null ? void 0 : w.conversationID)) && [n.$style["conversationPreview--active"]],
|
|
56
|
+
!((C = e.conversation) != null && C.isMuted) && (((A = e.conversation) == null ? void 0 : A.unreadCount) > 0 || ((M = (y = e.conversation) == null ? void 0 : y.markList) == null ? void 0 : M.includes(o(_).TYPES.CONV_MARK_TYPE_UNREAD))) && [n.$style["conversationPreview--unread"]],
|
|
57
|
+
((b = e.conversation) == null ? void 0 : b.isPinned) && [n.$style["conversationPreview--pin"]],
|
|
58
|
+
((z = e.conversation) == null ? void 0 : z.isMuted) && [n.$style["conversationPreview--mute"]]
|
|
59
59
|
],
|
|
60
60
|
style: e.style
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
var v, E, D, T,
|
|
61
|
+
}, o(B), { onClick: O }), [
|
|
62
|
+
F(n.$slots, "default", {}, () => {
|
|
63
|
+
var v, g, E, D, T, k, L, U;
|
|
64
64
|
return [
|
|
65
65
|
c("div", {
|
|
66
66
|
class: u(n.$style.conversationPreview__avatar)
|
|
67
67
|
}, [
|
|
68
|
-
(
|
|
69
|
-
src: (
|
|
70
|
-
unreadCount: (
|
|
71
|
-
isDotUnreadCount: ((k = e.conversation) == null ? void 0 : k.isMuted) && ((
|
|
68
|
+
(t(), i(a(e.Avatar), {
|
|
69
|
+
src: (g = (v = e.conversation) == null ? void 0 : v.getAvatar) == null ? void 0 : g.call(v),
|
|
70
|
+
unreadCount: (E = e.conversation) != null && E.isMuted && ((T = (D = e.conversation) == null ? void 0 : D.markList) != null && T.includes(o(_).TYPES.CONV_MARK_TYPE_UNREAD)) ? 1 : void 0,
|
|
71
|
+
isDotUnreadCount: ((k = e.conversation) == null ? void 0 : k.isMuted) && ((U = (L = e.conversation) == null ? void 0 : L.markList) == null ? void 0 : U.includes(o(_).TYPES.CONV_MARK_TYPE_UNREAD))
|
|
72
72
|
}, null, 8, ["src", "unreadCount", "isDotUnreadCount"]))
|
|
73
73
|
], 2),
|
|
74
74
|
c("div", {
|
|
75
75
|
class: u(n.$style.conversationPreview__content)
|
|
76
76
|
}, [
|
|
77
|
-
(
|
|
78
|
-
(
|
|
77
|
+
(t(), i(a(e.Title), { conversation: e.conversation }, null, 8, ["conversation"])),
|
|
78
|
+
(t(), i(a(e.LastMessageAbstract), { conversation: e.conversation }, null, 8, ["conversation"]))
|
|
79
79
|
], 2),
|
|
80
80
|
c("div", {
|
|
81
81
|
class: u(n.$style.conversationPreview__external)
|
|
82
82
|
}, [
|
|
83
|
-
(
|
|
84
|
-
e.enableActions &&
|
|
83
|
+
(t(), i(a(e.Unread), { conversation: e.conversation }, null, 8, ["conversation"])),
|
|
84
|
+
e.enableActions && r.value && !o(s) ? (t(), i(a(e.ConversationActions), l({
|
|
85
85
|
key: 0,
|
|
86
86
|
conversation: e.conversation
|
|
87
|
-
}, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : (
|
|
87
|
+
}, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : (t(), i(a(e.LastMessageTimestamp), {
|
|
88
88
|
key: 1,
|
|
89
89
|
conversation: e.conversation
|
|
90
90
|
}, null, 8, ["conversation"]))
|
|
@@ -92,31 +92,33 @@ const ne = /* @__PURE__ */ O({
|
|
|
92
92
|
];
|
|
93
93
|
})
|
|
94
94
|
], 16),
|
|
95
|
-
|
|
95
|
+
o(s) && e.enableActions && r.value ? (t(), i(a(e.ConversationActions), l({
|
|
96
96
|
key: 0,
|
|
97
97
|
conversation: e.conversation
|
|
98
|
-
}, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) :
|
|
98
|
+
}, e.actionsConfig, { onClose: d }), null, 16, ["conversation"])) : j("", !0)
|
|
99
99
|
]);
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
103
|
-
conversationPreview:
|
|
104
|
-
"conversationPreview--active": "_conversationPreview--
|
|
105
|
-
"conversationPreview--pin": "_conversationPreview--
|
|
106
|
-
conversationPreview__avatar:
|
|
102
|
+
}), te = "_conversationPreview_ivuzf_12", oe = "_conversationPreview__avatar_ivuzf_34", ie = "_conversationPreview__content_ivuzf_38", ae = "_conversationPreview__header_ivuzf_42", re = "_conversationPreview__title_ivuzf_48", se = "_conversationPreview__time_ivuzf_58", ve = "_conversationPreview__footer_ivuzf_65", ce = "_conversationPreview__abstract_ivuzf_70", le = "_conversationPreview__abstract__drafts_ivuzf_79", ue = "_conversationPreview__external_ivuzf_85", _e = "_conversationPreview__unread_ivuzf_94", fe = "_conversationPreview__actions_ivuzf_114", Pe = {
|
|
103
|
+
conversationPreview: te,
|
|
104
|
+
"conversationPreview--active": "_conversationPreview--active_ivuzf_28",
|
|
105
|
+
"conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
|
|
106
|
+
conversationPreview__avatar: oe,
|
|
107
107
|
conversationPreview__content: ie,
|
|
108
108
|
conversationPreview__header: ae,
|
|
109
|
-
conversationPreview__title:
|
|
110
|
-
conversationPreview__time:
|
|
109
|
+
conversationPreview__title: re,
|
|
110
|
+
conversationPreview__time: se,
|
|
111
111
|
conversationPreview__footer: ve,
|
|
112
112
|
conversationPreview__abstract: ce,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
113
|
+
conversationPreview__abstract__drafts: le,
|
|
114
|
+
"conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
|
|
115
|
+
conversationPreview__external: ue,
|
|
116
|
+
conversationPreview__unread: _e,
|
|
117
|
+
"unread-count": "_unread-count_ivuzf_101",
|
|
118
|
+
conversationPreview__actions: fe
|
|
119
|
+
}, de = {
|
|
120
|
+
$style: Pe
|
|
121
|
+
}, Ue = /* @__PURE__ */ ee(ne, [["__cssModules", de]]);
|
|
120
122
|
export {
|
|
121
|
-
|
|
123
|
+
Ue as default
|
|
122
124
|
};
|
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { IconMute as
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as P, computed as w, createElementBlock as t, openBlock as o, normalizeClass as r, createBlock as f, createCommentVNode as d, unref as l, toDisplayString as m } from "vue";
|
|
2
|
+
import z from "@tencentcloud/chat-uikit-engine";
|
|
3
|
+
import { IconMute as p } from "@tencentcloud/uikit-base-component-vue3";
|
|
4
|
+
import { _ as y } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const k = /* @__PURE__ */ P({
|
|
6
6
|
__name: "ConversationPreviewUnread",
|
|
7
7
|
props: {
|
|
8
8
|
conversation: {}
|
|
9
9
|
},
|
|
10
10
|
setup(n) {
|
|
11
|
-
const c = n,
|
|
11
|
+
const c = n, u = w(() => {
|
|
12
12
|
var e, i;
|
|
13
|
-
return (i = (e = c.conversation) == null ? void 0 : e.markList) == null ? void 0 : i.includes(
|
|
13
|
+
return (i = (e = c.conversation) == null ? void 0 : e.markList) == null ? void 0 : i.includes(z.TYPES.CONV_MARK_TYPE_UNREAD);
|
|
14
14
|
});
|
|
15
15
|
return (e, i) => {
|
|
16
|
-
var
|
|
17
|
-
return o(),
|
|
18
|
-
class:
|
|
16
|
+
var _, a, v, s;
|
|
17
|
+
return o(), t("div", {
|
|
18
|
+
class: r(e.$style.conversationPreview__unread)
|
|
19
19
|
}, [
|
|
20
|
-
(
|
|
20
|
+
(_ = n.conversation) != null && _.isMuted ? (o(), f(l(p), { key: 0 })) : ((a = n.conversation) == null ? void 0 : a.unreadCount) > 99 ? (o(), t("span", {
|
|
21
21
|
key: 1,
|
|
22
|
-
class:
|
|
23
|
-
}, "99+", 2)) : ((v = n.conversation) == null ? void 0 : v.unreadCount) > 0 ? (o(),
|
|
22
|
+
class: r(e.$style["unread-count"])
|
|
23
|
+
}, "99+", 2)) : ((v = n.conversation) == null ? void 0 : v.unreadCount) > 0 ? (o(), t("span", {
|
|
24
24
|
key: 2,
|
|
25
|
-
class:
|
|
26
|
-
},
|
|
25
|
+
class: r(e.$style["unread-count"])
|
|
26
|
+
}, m((s = n.conversation) == null ? void 0 : s.unreadCount), 3)) : u.value ? (o(), t("span", {
|
|
27
27
|
key: 3,
|
|
28
|
-
class:
|
|
28
|
+
class: r(e.$style["unread-count"])
|
|
29
29
|
}, "1", 2)) : d("", !0)
|
|
30
30
|
], 2);
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
34
|
-
conversationPreview:
|
|
35
|
-
"conversationPreview--active": "_conversationPreview--
|
|
36
|
-
"conversationPreview--pin": "_conversationPreview--
|
|
37
|
-
conversationPreview__avatar:
|
|
33
|
+
}), C = "_conversationPreview_ivuzf_12", b = "_conversationPreview__avatar_ivuzf_34", M = "_conversationPreview__content_ivuzf_38", h = "_conversationPreview__header_ivuzf_42", E = "_conversationPreview__title_ivuzf_48", U = "_conversationPreview__time_ivuzf_58", $ = "_conversationPreview__footer_ivuzf_65", B = "_conversationPreview__abstract_ivuzf_70", D = "_conversationPreview__abstract__drafts_ivuzf_79", N = "_conversationPreview__external_ivuzf_85", T = "_conversationPreview__unread_ivuzf_94", g = "_conversationPreview__actions_ivuzf_114", x = {
|
|
34
|
+
conversationPreview: C,
|
|
35
|
+
"conversationPreview--active": "_conversationPreview--active_ivuzf_28",
|
|
36
|
+
"conversationPreview--pin": "_conversationPreview--pin_ivuzf_31",
|
|
37
|
+
conversationPreview__avatar: b,
|
|
38
38
|
conversationPreview__content: M,
|
|
39
39
|
conversationPreview__header: h,
|
|
40
40
|
conversationPreview__title: E,
|
|
41
41
|
conversationPreview__time: U,
|
|
42
42
|
conversationPreview__footer: $,
|
|
43
|
-
conversationPreview__abstract:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
43
|
+
conversationPreview__abstract: B,
|
|
44
|
+
conversationPreview__abstract__drafts: D,
|
|
45
|
+
"conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_ivuzf_82",
|
|
46
|
+
conversationPreview__external: N,
|
|
47
|
+
conversationPreview__unread: T,
|
|
48
|
+
"unread-count": "_unread-count_ivuzf_101",
|
|
49
|
+
conversationPreview__actions: g
|
|
50
|
+
}, A = {
|
|
51
|
+
$style: x
|
|
52
|
+
}, Y = /* @__PURE__ */ y(k, [["__cssModules", A]]);
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
Y as default
|
|
53
55
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ConversationModel } from '../../../types';
|
|
1
|
+
import { ConversationModel } from '../../../types/engine';
|
|
2
2
|
|
|
3
3
|
export declare const generateHighlightTitle: (conversation: ConversationModel, highlightMatchString?: string) => {
|
|
4
4
|
text: string;
|
|
5
5
|
isHighlight: boolean;
|
|
6
6
|
}[];
|
|
7
|
-
export declare const getLatestMessagePreview: (conversation: ConversationModel, t: (key: string) => string) =>
|
|
7
|
+
export declare const getLatestMessagePreview: (conversation: ConversationModel, t: (key: string) => string) => string;
|