tuikit-atomicx-vue3 4.5.0 → 4.5.2
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/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
- package/dist/{PopoverTrigger-L8abAry7.js → PopoverPortal-DV6zFXcf.js} +91 -136
- package/dist/PopoverTrigger-DIjW4PKa.js +54 -0
- package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-D__dbwpA.js} +6 -6
- package/dist/{Teleport-CSEuZbpM.js → Teleport-98QrIYDI.js} +280 -270
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/AudioSettingPanel/index.js +14 -14
- 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/ConversationActions/ConversationActions.js +53 -50
- package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
- package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +28 -26
- 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 +81 -70
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +33 -31
- 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 +11 -1
- package/dist/components/ConversationList/i18n/en-US.js +12 -2
- package/dist/components/ConversationList/i18n/zh-CN.d.ts +11 -1
- package/dist/components/ConversationList/i18n/zh-CN.js +12 -2
- package/dist/components/ConversationList/index.d.ts +48 -0
- package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
- package/dist/components/MessageInput/MessageInput.js +1 -1
- 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/MessageInput/index.js +1 -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/MessageLayout/MessageMeta/MessageMeta.js +37 -28
- package/dist/components/MessageList/Message/index.js +8 -4
- package/dist/components/MessageList/MessageList.js +109 -91
- package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
- package/dist/components/MessageList/index.d.ts +21 -3
- package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
- package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
- package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
- package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
- package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
- 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/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
- package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
- package/dist/components/VideoSettingPanel/index.js +1 -1
- package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
- package/dist/index-CTthrJb2.js +1461 -0
- package/dist/index-DXC5bPY4.js +2174 -0
- package/dist/{index-Do-2CngU.js → index-DuAffztD.js} +115 -142
- package/dist/{index-7vNB_Vx8.js → index-hHVD-MG2.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +150 -149
- package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
- package/dist/states/LoginState.js +43 -43
- package/dist/states/MessageActionState/MessageActionState.js +83 -223
- package/dist/states/MessageInputState/MessageInputState.js +111 -82
- 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/states/MessageListState/MessageListState.js +26 -23
- package/dist/states/RoomParticipantState/index.js +83 -24
- package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
- package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
- package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
- package/dist/states/RoomParticipantState/participantManager.js +159 -127
- package/dist/states/RoomState/callManager.d.ts +3 -3
- package/dist/states/RoomState/callManager.js +20 -20
- package/dist/states/RoomState/common.d.ts +3 -2
- package/dist/states/RoomState/common.js +34 -24
- package/dist/states/RoomState/roomManager.d.ts +0 -1
- package/dist/states/RoomState/roomManager.js +21 -27
- package/dist/states/RoomState/scheduleManager.js +2 -2
- package/dist/styles/index.css +1 -1
- package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2160 -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/subEntry/live/index.js +46 -45
- package/dist/subEntry/room/index.js +39 -38
- package/dist/types/beauty.d.ts +20 -0
- package/dist/types/index.js +37 -36
- package/dist/types/participant.d.ts +2 -0
- package/dist/types/room.d.ts +45 -1
- package/dist/types/room.js +4 -3
- package/dist/{useId-CtirfF0W.js → useId-B1VwPJLm.js} +1 -1
- package/dist/utils/call.js +77 -71
- package/dist/{utils-DaB7eSu5.js → utils-BU8IkP_V.js} +1 -1
- package/package.json +8 -7
- package/src/components/AudioSettingPanel/index.vue +4 -5
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
- package/src/components/ConversationList/ConversationList.vue +0 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +10 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
- package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
- package/src/components/ConversationList/i18n/en-US.ts +11 -1
- package/src/components/ConversationList/i18n/zh-CN.ts +11 -1
- package/src/components/MessageInput/MessageInput.module.scss +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/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
- package/src/components/MessageList/MessageList.vue +50 -14
- package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
- package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
- package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
- package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
- package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
- package/src/components/VideoSettingPanel/index.vue +1 -0
- package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
- 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/src/types/beauty.ts +20 -0
- package/src/types/participant.ts +3 -0
- package/src/types/room.ts +49 -1
- package/src/utils/call.ts +8 -0
- 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,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
|
|
12
|
-
import { useConversationListState as
|
|
13
|
-
import { _ as
|
|
14
|
-
const
|
|
1
|
+
import { defineComponent as K, ref as l, watch as j, createElementBlock as F, openBlock as o, createElementVNode as c, createBlock as i, createCommentVNode as z, mergeProps as u, unref as t, renderSlot as G, normalizeClass as _, resolveDynamicComponent as a } from "vue";
|
|
2
|
+
import f from "@tencentcloud/chat-uikit-engine";
|
|
3
|
+
import J from "../../Avatar/Avatar.js";
|
|
4
|
+
import Q from "./ConversationPreviewAbstract.js";
|
|
5
|
+
import W from "./ConversationPreviewTimestamp.js";
|
|
6
|
+
import X from "./ConversationPreviewTitle.js";
|
|
7
|
+
import Z from "./ConversationPreviewUnread.js";
|
|
8
|
+
import x from "../ConversationActions/ConversationActions.js";
|
|
9
|
+
import { useMouseHover as p } from "../../../hooks/useMouseHover.js";
|
|
10
|
+
import { useLongPress as ee } from "../../../hooks/useLongPress.js";
|
|
11
|
+
import { isH5 as s } from "../../../utils/env.js";
|
|
12
|
+
import { useConversationListState as ne } from "../../../states/ConversationListState/ConversationListState.js";
|
|
13
|
+
import { _ as oe } from "../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
+
const te = /* @__PURE__ */ K({
|
|
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: () => J },
|
|
21
|
+
Title: { default: () => X },
|
|
22
|
+
LastMessageAbstract: { default: () => Q },
|
|
23
|
+
LastMessageTimestamp: { default: () => W },
|
|
24
|
+
Unread: { default: () => Z },
|
|
25
|
+
ConversationActions: { type: [Object, Function], default: () => x },
|
|
26
26
|
onSelectConversation: {},
|
|
27
27
|
actionsConfig: {},
|
|
28
28
|
className: {},
|
|
@@ -30,61 +30,70 @@ const ne = /* @__PURE__ */ O({
|
|
|
30
30
|
children: {}
|
|
31
31
|
},
|
|
32
32
|
emits: ["selectConversation"],
|
|
33
|
-
setup(e, { emit:
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
}), Y =
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
setup(e, { emit: R }) {
|
|
34
|
+
const P = e, S = R, { activeConversation: I, setActiveConversation: O } = ne(), d = l(), r = l(!1), w = l(!1), { isHovered: m } = p(d), { getEventHandlers: V } = ee(() => {
|
|
35
|
+
s && (r.value = !0);
|
|
36
|
+
}), Y = V();
|
|
37
|
+
j(m, (n) => {
|
|
38
|
+
if (!s) {
|
|
39
|
+
if (!n && w.value)
|
|
40
|
+
return;
|
|
41
|
+
r.value = n;
|
|
42
|
+
}
|
|
39
43
|
});
|
|
40
44
|
const B = () => {
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
45
|
+
S("selectConversation", P.conversation), O(P.conversation.conversationID);
|
|
46
|
+
}, C = () => {
|
|
47
|
+
r.value = !1;
|
|
48
|
+
}, H = (n) => {
|
|
49
|
+
console.log("[ConversationPreview] dropdown visible changed:", n), w.value = n, !n && !m.value && (r.value = !1);
|
|
44
50
|
};
|
|
45
|
-
return (n,
|
|
46
|
-
var
|
|
47
|
-
return o(),
|
|
48
|
-
c("div",
|
|
51
|
+
return (n, Ce) => {
|
|
52
|
+
var A, y, g, b, M, q, D, E;
|
|
53
|
+
return o(), F("div", null, [
|
|
54
|
+
c("div", u({
|
|
49
55
|
ref_key: "conversationPreviewRef",
|
|
50
|
-
ref:
|
|
56
|
+
ref: d,
|
|
51
57
|
class: [
|
|
52
58
|
n.$style.conversationPreview,
|
|
53
59
|
e.className,
|
|
54
|
-
t(
|
|
55
|
-
(e.isSelected || ((
|
|
56
|
-
!((
|
|
57
|
-
((
|
|
58
|
-
((
|
|
60
|
+
t(s) && [n.$style["conversationPreview--mobile"]],
|
|
61
|
+
(e.isSelected || ((A = e.conversation) == null ? void 0 : A.conversationID) === ((y = t(I)) == null ? void 0 : y.conversationID)) && [n.$style["conversationPreview--active"]],
|
|
62
|
+
!((g = e.conversation) != null && g.isMuted) && (((b = e.conversation) == null ? void 0 : b.unreadCount) > 0 || ((q = (M = e.conversation) == null ? void 0 : M.markList) == null ? void 0 : q.includes(t(f).TYPES.CONV_MARK_TYPE_UNREAD))) && [n.$style["conversationPreview--unread"]],
|
|
63
|
+
((D = e.conversation) == null ? void 0 : D.isPinned) && [n.$style["conversationPreview--pin"]],
|
|
64
|
+
((E = e.conversation) == null ? void 0 : E.isMuted) && [n.$style["conversationPreview--mute"]]
|
|
59
65
|
],
|
|
60
66
|
style: e.style
|
|
61
67
|
}, t(Y), { onClick: B }), [
|
|
62
|
-
|
|
63
|
-
var v,
|
|
68
|
+
G(n.$slots, "default", {}, () => {
|
|
69
|
+
var v, h, T, k, L, U, $, N;
|
|
64
70
|
return [
|
|
65
71
|
c("div", {
|
|
66
|
-
class:
|
|
72
|
+
class: _(n.$style.conversationPreview__avatar)
|
|
67
73
|
}, [
|
|
68
74
|
(o(), i(a(e.Avatar), {
|
|
69
|
-
src: (
|
|
70
|
-
unreadCount: (
|
|
71
|
-
isDotUnreadCount: ((
|
|
75
|
+
src: (h = (v = e.conversation) == null ? void 0 : v.getAvatar) == null ? void 0 : h.call(v),
|
|
76
|
+
unreadCount: (T = e.conversation) != null && T.isMuted && ((L = (k = e.conversation) == null ? void 0 : k.markList) != null && L.includes(t(f).TYPES.CONV_MARK_TYPE_UNREAD)) ? 1 : void 0,
|
|
77
|
+
isDotUnreadCount: ((U = e.conversation) == null ? void 0 : U.isMuted) && ((N = ($ = e.conversation) == null ? void 0 : $.markList) == null ? void 0 : N.includes(t(f).TYPES.CONV_MARK_TYPE_UNREAD))
|
|
72
78
|
}, null, 8, ["src", "unreadCount", "isDotUnreadCount"]))
|
|
73
79
|
], 2),
|
|
74
80
|
c("div", {
|
|
75
|
-
class:
|
|
81
|
+
class: _(n.$style.conversationPreview__content)
|
|
76
82
|
}, [
|
|
77
83
|
(o(), i(a(e.Title), { conversation: e.conversation }, null, 8, ["conversation"])),
|
|
78
84
|
(o(), i(a(e.LastMessageAbstract), { conversation: e.conversation }, null, 8, ["conversation"]))
|
|
79
85
|
], 2),
|
|
80
86
|
c("div", {
|
|
81
|
-
class:
|
|
87
|
+
class: _(n.$style.conversationPreview__external)
|
|
82
88
|
}, [
|
|
83
89
|
(o(), i(a(e.Unread), { conversation: e.conversation }, null, 8, ["conversation"])),
|
|
84
|
-
e.enableActions &&
|
|
90
|
+
e.enableActions && r.value && !t(s) ? (o(), i(a(e.ConversationActions), u({
|
|
85
91
|
key: 0,
|
|
86
92
|
conversation: e.conversation
|
|
87
|
-
}, e.actionsConfig, {
|
|
93
|
+
}, e.actionsConfig, {
|
|
94
|
+
onClose: C,
|
|
95
|
+
onDropdownVisibleChange: H
|
|
96
|
+
}), null, 16, ["conversation"])) : (o(), i(a(e.LastMessageTimestamp), {
|
|
88
97
|
key: 1,
|
|
89
98
|
conversation: e.conversation
|
|
90
99
|
}, null, 8, ["conversation"]))
|
|
@@ -92,31 +101,33 @@ const ne = /* @__PURE__ */ O({
|
|
|
92
101
|
];
|
|
93
102
|
})
|
|
94
103
|
], 16),
|
|
95
|
-
t(
|
|
104
|
+
t(s) && e.enableActions && r.value ? (o(), i(a(e.ConversationActions), u({
|
|
96
105
|
key: 0,
|
|
97
106
|
conversation: e.conversation
|
|
98
|
-
}, e.actionsConfig, { onClose:
|
|
107
|
+
}, e.actionsConfig, { onClose: C }), null, 16, ["conversation"])) : z("", !0)
|
|
99
108
|
]);
|
|
100
109
|
};
|
|
101
110
|
}
|
|
102
|
-
}),
|
|
103
|
-
conversationPreview:
|
|
104
|
-
"conversationPreview--active": "_conversationPreview--
|
|
105
|
-
"conversationPreview--pin": "_conversationPreview--
|
|
106
|
-
conversationPreview__avatar:
|
|
107
|
-
conversationPreview__content:
|
|
108
|
-
conversationPreview__header:
|
|
109
|
-
conversationPreview__title:
|
|
110
|
-
conversationPreview__time:
|
|
111
|
-
conversationPreview__footer:
|
|
112
|
-
conversationPreview__abstract:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
111
|
+
}), ie = "_conversationPreview_3f9qu_12", ae = "_conversationPreview__avatar_3f9qu_34", re = "_conversationPreview__content_3f9qu_38", se = "_conversationPreview__header_3f9qu_42", ve = "_conversationPreview__title_3f9qu_48", ce = "_conversationPreview__time_3f9qu_58", le = "_conversationPreview__footer_3f9qu_65", ue = "_conversationPreview__abstract_3f9qu_70", _e = "_conversationPreview__abstract__drafts_3f9qu_79", fe = "_conversationPreview__external_3f9qu_85", Pe = "_conversationPreview__unread_3f9qu_94", de = "_conversationPreview__actions_3f9qu_114", we = {
|
|
112
|
+
conversationPreview: ie,
|
|
113
|
+
"conversationPreview--active": "_conversationPreview--active_3f9qu_28",
|
|
114
|
+
"conversationPreview--pin": "_conversationPreview--pin_3f9qu_31",
|
|
115
|
+
conversationPreview__avatar: ae,
|
|
116
|
+
conversationPreview__content: re,
|
|
117
|
+
conversationPreview__header: se,
|
|
118
|
+
conversationPreview__title: ve,
|
|
119
|
+
conversationPreview__time: ce,
|
|
120
|
+
conversationPreview__footer: le,
|
|
121
|
+
conversationPreview__abstract: ue,
|
|
122
|
+
conversationPreview__abstract__drafts: _e,
|
|
123
|
+
"conversationPreview__abstract__at-info": "_conversationPreview__abstract__at-info_3f9qu_82",
|
|
124
|
+
conversationPreview__external: fe,
|
|
125
|
+
conversationPreview__unread: Pe,
|
|
126
|
+
"unread-count": "_unread-count_3f9qu_101",
|
|
127
|
+
conversationPreview__actions: de
|
|
128
|
+
}, me = {
|
|
129
|
+
$style: we
|
|
130
|
+
}, $e = /* @__PURE__ */ oe(te, [["__cssModules", me]]);
|
|
120
131
|
export {
|
|
121
|
-
|
|
132
|
+
$e as default
|
|
122
133
|
};
|
|
@@ -161,6 +161,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
161
161
|
click: (e: Event, key?: string | undefined, conversation?: ConversationModel | undefined) => void;
|
|
162
162
|
close: () => void;
|
|
163
163
|
markConversationUnread: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
164
|
+
dropdownVisibleChange: (visible: boolean) => void;
|
|
164
165
|
conversationPin: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
165
166
|
conversationMute: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
166
167
|
conversationDelete: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
@@ -222,6 +223,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
222
223
|
onClick?: ((e: Event, key?: string | undefined, conversation?: ConversationModel | undefined) => any) | undefined;
|
|
223
224
|
onClose?: (() => any) | undefined;
|
|
224
225
|
onMarkConversationUnread?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
226
|
+
onDropdownVisibleChange?: ((visible: boolean) => any) | undefined;
|
|
225
227
|
onConversationPin?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
226
228
|
onConversationMute?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
227
229
|
onConversationDelete?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
@@ -435,6 +437,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
435
437
|
click: (e: Event, key?: string | undefined, conversation?: ConversationModel | undefined) => void;
|
|
436
438
|
close: () => void;
|
|
437
439
|
markConversationUnread: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
440
|
+
dropdownVisibleChange: (visible: boolean) => void;
|
|
438
441
|
conversationPin: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
439
442
|
conversationMute: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
440
443
|
conversationDelete: (conversation: ConversationModel, e?: Event | undefined) => void;
|
|
@@ -496,6 +499,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
496
499
|
onClick?: ((e: Event, key?: string | undefined, conversation?: ConversationModel | undefined) => any) | undefined;
|
|
497
500
|
onClose?: (() => any) | undefined;
|
|
498
501
|
onMarkConversationUnread?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
502
|
+
onDropdownVisibleChange?: ((visible: boolean) => any) | undefined;
|
|
499
503
|
onConversationPin?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
500
504
|
onConversationMute?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
501
505
|
onConversationDelete?: ((conversation: ConversationModel, e?: Event | undefined) => any) | undefined;
|
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
import { defineComponent as
|
|
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
2
|
import q from "@tencentcloud/chat-uikit-engine";
|
|
3
|
-
import { IconMute as
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
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
|
|
12
|
-
var e,
|
|
13
|
-
return (
|
|
11
|
+
const v = n, u = w(() => {
|
|
12
|
+
var e, _;
|
|
13
|
+
return (_ = (e = v.conversation) == null ? void 0 : e.markList) == null ? void 0 : _.includes(q.TYPES.CONV_MARK_TYPE_UNREAD);
|
|
14
14
|
});
|
|
15
|
-
return (e,
|
|
16
|
-
var a,
|
|
17
|
-
return o(),
|
|
18
|
-
class:
|
|
15
|
+
return (e, _) => {
|
|
16
|
+
var a, i, s, c;
|
|
17
|
+
return o(), t("div", {
|
|
18
|
+
class: r(e.$style.conversationPreview__unread)
|
|
19
19
|
}, [
|
|
20
|
-
(a = n.conversation) != null && a.isMuted ? (o(), l(
|
|
20
|
+
(a = n.conversation) != null && a.isMuted ? (o(), f(l(p), { key: 0 })) : ((i = n.conversation) == null ? void 0 : i.unreadCount) > 99 ? (o(), t("span", {
|
|
21
21
|
key: 1,
|
|
22
|
-
class:
|
|
23
|
-
}, "99+", 2)) : ((
|
|
22
|
+
class: r(e.$style["unread-count"])
|
|
23
|
+
}, "99+", 2)) : ((s = n.conversation) == null ? void 0 : s.unreadCount) > 0 ? (o(), t("span", {
|
|
24
24
|
key: 2,
|
|
25
|
-
class:
|
|
26
|
-
},
|
|
25
|
+
class: r(e.$style["unread-count"])
|
|
26
|
+
}, m((c = n.conversation) == null ? void 0 : c.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_3f9qu_12", b = "_conversationPreview__avatar_3f9qu_34", M = "_conversationPreview__content_3f9qu_38", h = "_conversationPreview__header_3f9qu_42", E = "_conversationPreview__title_3f9qu_48", U = "_conversationPreview__time_3f9qu_58", $ = "_conversationPreview__footer_3f9qu_65", B = "_conversationPreview__abstract_3f9qu_70", D = "_conversationPreview__abstract__drafts_3f9qu_79", N = "_conversationPreview__external_3f9qu_85", T = "_conversationPreview__unread_3f9qu_94", g = "_conversationPreview__actions_3f9qu_114", x = {
|
|
34
|
+
conversationPreview: C,
|
|
35
|
+
"conversationPreview--active": "_conversationPreview--active_3f9qu_28",
|
|
36
|
+
"conversationPreview--pin": "_conversationPreview--pin_3f9qu_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_3f9qu_82",
|
|
46
|
+
conversationPreview__external: N,
|
|
47
|
+
conversationPreview__unread: T,
|
|
48
|
+
"unread-count": "_unread-count_3f9qu_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;
|
|
@@ -1,43 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import u from "@tencentcloud/chat-uikit-engine";
|
|
2
|
+
import { MessageType as a, ConversationType as c } from "../../../types/engine.js";
|
|
3
|
+
import { parseCallMessageText as _ } from "../../../utils/call.js";
|
|
4
|
+
import { resolveGroupTipMessage as U } from "../../MessageList/Message/GroupTipMessage/resolveGroupTipMessage.js";
|
|
5
|
+
import { safeJSONParse as C } from "../../../utils/json.js";
|
|
6
|
+
import { transformTextWithEmojiKeyToName as b } from "../../../utils/emoji.js";
|
|
7
|
+
const h = (o, e) => {
|
|
8
|
+
var m;
|
|
9
|
+
const i = (m = o == null ? void 0 : o.getShowName) == null ? void 0 : m.call(o);
|
|
5
10
|
if (!e)
|
|
6
|
-
return [{ text:
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
text:
|
|
10
|
-
isHighlight:
|
|
11
|
+
return [{ text: i, isHighlight: !1 }];
|
|
12
|
+
const T = new RegExp(`(${e})`, "gi");
|
|
13
|
+
return i.split(T).map((s) => ({
|
|
14
|
+
text: s,
|
|
15
|
+
isHighlight: s.toLowerCase() === e.toLowerCase()
|
|
11
16
|
}));
|
|
12
|
-
},
|
|
13
|
-
|
|
17
|
+
}, y = (o, e) => {
|
|
18
|
+
var I;
|
|
19
|
+
const { draftText: i } = o || {};
|
|
20
|
+
if (i)
|
|
21
|
+
return typeof i == "string" ? i : C(i, { abstract: "" }).abstract;
|
|
22
|
+
const T = {
|
|
23
|
+
4: e("TUIConversation.you_have_been_removed_from_the_group"),
|
|
24
|
+
5: e("TUIConversation.the_group_chat_has_been_disbanded"),
|
|
25
|
+
8: e("TUIConversation.you_have_left_the_group_chat")
|
|
26
|
+
};
|
|
27
|
+
if (o.operationType && T[o.operationType])
|
|
28
|
+
return T[o.operationType];
|
|
29
|
+
const { lastMessage: t } = o;
|
|
14
30
|
if (!t)
|
|
15
31
|
return "";
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const m = o.type === c.GROUP, s = t, { type: p, payload: f } = s;
|
|
33
|
+
let r = "";
|
|
34
|
+
if (t != null && t.isRevoked)
|
|
35
|
+
r = e("TUIConversation.recalled_a_message");
|
|
36
|
+
else
|
|
37
|
+
switch (p) {
|
|
38
|
+
case a.TEXT:
|
|
39
|
+
r = b(f.text || "");
|
|
40
|
+
break;
|
|
41
|
+
case a.IMAGE:
|
|
42
|
+
r = `[${e("TUIConversation.Image")}]`;
|
|
43
|
+
break;
|
|
44
|
+
case a.AUDIO:
|
|
45
|
+
r = `[${e("TUIConversation.Audio")}]`;
|
|
46
|
+
break;
|
|
47
|
+
case a.VIDEO:
|
|
48
|
+
r = `[${e("TUIConversation.Video")}]`;
|
|
49
|
+
break;
|
|
50
|
+
case a.FILE:
|
|
51
|
+
r = `[${e("TUIConversation.File")}]`;
|
|
52
|
+
break;
|
|
53
|
+
case a.CUSTOM: {
|
|
54
|
+
const n = C(f == null ? void 0 : f.data, { businessID: void 0 });
|
|
55
|
+
if ((n == null ? void 0 : n.businessID) === 1)
|
|
56
|
+
try {
|
|
57
|
+
r = _(s, e);
|
|
58
|
+
} catch {
|
|
59
|
+
r = `[${e("TUIConversation.call_message")}]`;
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
r = `[${e("TUIConversation.Custom")}]`;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case a.LOCATION:
|
|
66
|
+
r = `[${e("TUIConversation.Location")}]`;
|
|
67
|
+
break;
|
|
68
|
+
case a.FACE:
|
|
69
|
+
r = `[${e("TUIConversation.Face")}]`;
|
|
70
|
+
break;
|
|
71
|
+
case a.MERGER:
|
|
72
|
+
r = `[${e("TUIConversation.Chat History")}]`;
|
|
73
|
+
break;
|
|
74
|
+
case a.GRP_TIP:
|
|
75
|
+
return (I = U(s)) == null ? void 0 : I.text;
|
|
76
|
+
default:
|
|
77
|
+
r = `[${e("TUIConversation.unknown_message")}]`;
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
if (m) {
|
|
81
|
+
let n = "";
|
|
82
|
+
return (t == null ? void 0 : t.fromAccount) === u.getMyUserID() ? n = e("TUIConversation.me") : n = o.remark || (s == null ? void 0 : s.nameCard) || (t == null ? void 0 : t.nick) || t.fromAccount, n ? `${n}: ${r}` : r;
|
|
38
83
|
}
|
|
84
|
+
return r;
|
|
39
85
|
};
|
|
40
86
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
87
|
+
h as generateHighlightTitle,
|
|
88
|
+
y as getLatestMessagePreview
|
|
43
89
|
};
|
|
@@ -47,8 +47,18 @@ declare const _default: {
|
|
|
47
47
|
File: string;
|
|
48
48
|
Custom: string;
|
|
49
49
|
Location: string;
|
|
50
|
-
|
|
50
|
+
Face: string;
|
|
51
51
|
'Chat History': string;
|
|
52
|
+
call_message: string;
|
|
53
|
+
unknown_message: string;
|
|
54
|
+
me: string;
|
|
55
|
+
recalled_a_message: string;
|
|
56
|
+
you_have_been_removed_from_the_group: string;
|
|
57
|
+
the_group_chat_has_been_disbanded: string;
|
|
58
|
+
you_have_left_the_group_chat: string;
|
|
59
|
+
someone_at_me: string;
|
|
60
|
+
at_all: string;
|
|
61
|
+
group_id_already_used: string;
|
|
52
62
|
};
|
|
53
63
|
};
|
|
54
64
|
export default _default;
|
|
@@ -56,8 +56,18 @@ const e = {
|
|
|
56
56
|
File: "File",
|
|
57
57
|
Custom: "Custom",
|
|
58
58
|
Location: "Location",
|
|
59
|
-
|
|
60
|
-
"Chat History": "Chat History"
|
|
59
|
+
Face: "Face",
|
|
60
|
+
"Chat History": "Chat History",
|
|
61
|
+
call_message: "Call Message",
|
|
62
|
+
unknown_message: "Unknown Message",
|
|
63
|
+
me: "Me",
|
|
64
|
+
recalled_a_message: "recalled a message",
|
|
65
|
+
you_have_been_removed_from_the_group: "You have been removed from the group by the group administrator",
|
|
66
|
+
the_group_chat_has_been_disbanded: "The group chat has been disbanded",
|
|
67
|
+
you_have_left_the_group_chat: "You have left the group chat",
|
|
68
|
+
someone_at_me: "You were mentioned",
|
|
69
|
+
at_all: "@All",
|
|
70
|
+
group_id_already_used: "The group ID for creating the group chat is already in use, please choose a different group ID."
|
|
61
71
|
}
|
|
62
72
|
};
|
|
63
73
|
export {
|
|
@@ -47,8 +47,18 @@ declare const _default: {
|
|
|
47
47
|
File: string;
|
|
48
48
|
Custom: string;
|
|
49
49
|
Location: string;
|
|
50
|
-
|
|
50
|
+
Face: string;
|
|
51
51
|
'Chat History': string;
|
|
52
|
+
call_message: string;
|
|
53
|
+
unknown_message: string;
|
|
54
|
+
me: string;
|
|
55
|
+
recalled_a_message: string;
|
|
56
|
+
you_have_been_removed_from_the_group: string;
|
|
57
|
+
the_group_chat_has_been_disbanded: string;
|
|
58
|
+
you_have_left_the_group_chat: string;
|
|
59
|
+
someone_at_me: string;
|
|
60
|
+
at_all: string;
|
|
61
|
+
group_id_already_used: string;
|
|
52
62
|
};
|
|
53
63
|
};
|
|
54
64
|
export default _default;
|
|
@@ -56,8 +56,18 @@ const e = {
|
|
|
56
56
|
File: "文件",
|
|
57
57
|
Custom: "自定义消息",
|
|
58
58
|
Location: "位置",
|
|
59
|
-
|
|
60
|
-
"Chat History": "聊天记录"
|
|
59
|
+
Face: "动画表情",
|
|
60
|
+
"Chat History": "聊天记录",
|
|
61
|
+
call_message: "通话消息",
|
|
62
|
+
unknown_message: "消息",
|
|
63
|
+
me: "我",
|
|
64
|
+
recalled_a_message: "撤回了一条消息",
|
|
65
|
+
you_have_been_removed_from_the_group: "你已被群管理员移出该群",
|
|
66
|
+
the_group_chat_has_been_disbanded: "该群聊已解散",
|
|
67
|
+
you_have_left_the_group_chat: "你已退出该群聊",
|
|
68
|
+
someone_at_me: "有人@我",
|
|
69
|
+
at_all: "@所有人",
|
|
70
|
+
group_id_already_used: "当前创建群聊的群ID已被使用,请选择其他群ID"
|
|
61
71
|
}
|
|
62
72
|
};
|
|
63
73
|
export {
|