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,17 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { View as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
|
|
1
|
+
import { defineComponent as Z, useSlots as ee, provide as te, ref as v, computed as y, watch as A, nextTick as L, onMounted as se, onUnmounted as oe, createElementBlock as _, openBlock as c, createElementVNode as b, createVNode as N, createBlock as T, createCommentVNode as ae, unref as n, withCtx as O, Fragment as V, renderList as $, normalizeClass as I, resolveDynamicComponent as U } from "vue";
|
|
2
|
+
import { c as P } from "../../index-DPczIrgX.js";
|
|
3
|
+
import ie from "../../baseComp/ObserverView/ObserverView.js";
|
|
4
|
+
import { View as le } from "../../baseComp/View/index.js";
|
|
5
|
+
import { useReadReceipt as re } from "../../hooks/useReadReceipt/useReadReceipt.js";
|
|
6
|
+
import { useScroll as ne } from "../../hooks/useScroll.js";
|
|
7
|
+
import { ConversationType as ue, MessageType as ce } from "../../types/engine.js";
|
|
8
|
+
import { isCallMessage as x } from "../../utils/call.js";
|
|
9
|
+
import { throttle as me } from "../../utils/lodash.js";
|
|
10
|
+
import { Message as ve } from "./Message/index.js";
|
|
11
|
+
import ge from "./MessageForward/MessageForward.js";
|
|
12
|
+
import { MessageListContextSymbol as fe } from "./MessageListContext.js";
|
|
13
|
+
import de from "./MessageTimeDivider/MessageTimeDivider.js";
|
|
14
|
+
import pe from "./ScrollToBottom/ScrollToBottom.js";
|
|
15
|
+
import { useGroupSettingState as he } from "../../states/GroupSettingState/GroupSettingState.js";
|
|
16
|
+
import { useConversationListState as Me } from "../../states/ConversationListState/ConversationListState.js";
|
|
17
|
+
import { useMessageListState as ke } from "../../states/MessageListState/MessageListState.js";
|
|
18
|
+
import { _ as Te } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
19
|
+
const Ce = { class: "message-list" }, Se = { class: "message-chunk" }, D = 150, ye = /* @__PURE__ */ Z({
|
|
15
20
|
__name: "MessageList",
|
|
16
21
|
props: {
|
|
17
22
|
alignment: { default: "two-sided" },
|
|
@@ -22,132 +27,145 @@ const ce = { class: "message-list" }, me = { class: "message-chunk" }, y = 150,
|
|
|
22
27
|
Message: { default: void 0 },
|
|
23
28
|
MessageTimeDivider: { default: void 0 }
|
|
24
29
|
},
|
|
25
|
-
setup(
|
|
26
|
-
const a =
|
|
27
|
-
|
|
28
|
-
const
|
|
30
|
+
setup(C) {
|
|
31
|
+
const a = C, z = ee();
|
|
32
|
+
te(fe, { slots: z });
|
|
33
|
+
const f = v(!1), d = v(0), p = v(!1), t = v(null), h = v(!1), R = v(0), {
|
|
29
34
|
messageList: g,
|
|
30
|
-
loadMoreOlderMessage:
|
|
31
|
-
activeConversationID:
|
|
32
|
-
isDisableScroll:
|
|
33
|
-
setIsDisableScroll:
|
|
34
|
-
setEnableReadReceipt:
|
|
35
|
-
} =
|
|
35
|
+
loadMoreOlderMessage: W,
|
|
36
|
+
activeConversationID: X,
|
|
37
|
+
isDisableScroll: j,
|
|
38
|
+
setIsDisableScroll: M,
|
|
39
|
+
setEnableReadReceipt: q
|
|
40
|
+
} = ke(), { getGroupMemberList: J } = he(), { scrollToBottom: S } = ne(), { activeConversation: K } = Me(), {
|
|
41
|
+
observeMessageList: B,
|
|
42
|
+
resetProcessedMessages: Q
|
|
43
|
+
} = re({
|
|
44
|
+
enabled: a.enableReadReceipt ?? !1,
|
|
45
|
+
containerSelector: "#messageScrollList",
|
|
46
|
+
getMessageIDFromDom: (s) => s.dataset.messageId || ""
|
|
47
|
+
}), H = y(() => {
|
|
48
|
+
var s;
|
|
49
|
+
return ((s = K.value) == null ? void 0 : s.type) === ue.GROUP;
|
|
50
|
+
}), m = y(() => a.messageAggregationTime && a.messageAggregationTime > 0), w = y(() => {
|
|
36
51
|
if (!g.value)
|
|
37
52
|
return [];
|
|
38
|
-
const
|
|
53
|
+
const s = a.filter ? g.value.filter(a.filter) : g.value.filter((e) => !e.isDeleted);
|
|
39
54
|
if (!a.messageAggregationTime || a.messageAggregationTime <= 0)
|
|
40
|
-
return
|
|
55
|
+
return s.map((e) => ({
|
|
41
56
|
timestamp: e.time,
|
|
42
57
|
messages: [e],
|
|
43
58
|
key: `chunk-${e.ID}`
|
|
44
59
|
}));
|
|
45
|
-
const
|
|
46
|
-
return
|
|
47
|
-
const
|
|
48
|
-
!
|
|
49
|
-
timestamp:
|
|
60
|
+
const o = [], i = a.messageAggregationTime;
|
|
61
|
+
return s.forEach((e, u, r) => {
|
|
62
|
+
const G = e.time, k = o.length > 0 ? o[o.length - 1] : void 0, l = u > 0 ? r[u - 1] : void 0;
|
|
63
|
+
!k || G - k.timestamp > i || k.messages[0].from !== e.from || e.isRevoked || l && l.isRevoked || e.status === "fail" || l && l.status === "fail" || e.hasRiskContent || l && l.hasRiskContent || x(e) || l && x(l) || l && l.type === ce.CUSTOM && l.getMessageContent().businessID === "group_create" ? o.push({
|
|
64
|
+
timestamp: G,
|
|
50
65
|
messages: [e],
|
|
51
66
|
key: `chunk-${e.ID}`
|
|
52
|
-
}) :
|
|
53
|
-
}),
|
|
54
|
-
}),
|
|
55
|
-
t.value && (
|
|
56
|
-
}, 100),
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
var
|
|
60
|
-
if (!(!
|
|
61
|
-
if (
|
|
62
|
-
|
|
67
|
+
}) : k.messages.push(e);
|
|
68
|
+
}), o;
|
|
69
|
+
}), E = me(() => {
|
|
70
|
+
t.value && (d.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, d.value > D && (M(!0), h.value = !0), d.value < D && (M(!1), h.value = !1));
|
|
71
|
+
}, 100), F = async () => {
|
|
72
|
+
f.value = !1, M(!1), h.value = !1, Q();
|
|
73
|
+
}, Y = async () => {
|
|
74
|
+
var s;
|
|
75
|
+
if (!(!f.value || p.value || !((s = g.value) != null && s.length))) {
|
|
76
|
+
if (M(!0), p.value = !0, !t.value) {
|
|
77
|
+
p.value = !1;
|
|
63
78
|
return;
|
|
64
79
|
}
|
|
65
|
-
if (
|
|
66
|
-
const
|
|
80
|
+
if (R.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, await W(), await L(), t.value) {
|
|
81
|
+
const o = t.value.scrollHeight - t.value.clientHeight - R.value;
|
|
67
82
|
t.value.scrollTop = Math.max(0, Math.min(
|
|
68
83
|
t.value.scrollHeight - t.value.clientHeight,
|
|
69
|
-
|
|
84
|
+
o
|
|
70
85
|
));
|
|
71
86
|
}
|
|
72
|
-
|
|
87
|
+
p.value = !1;
|
|
73
88
|
}
|
|
74
89
|
};
|
|
75
|
-
return A(
|
|
76
|
-
|
|
77
|
-
}), A(g, (
|
|
78
|
-
if (
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
});
|
|
90
|
+
return A(X, () => {
|
|
91
|
+
F();
|
|
92
|
+
}), A(g, (s, o) => {
|
|
93
|
+
if (o === void 0 && s && !f.value) {
|
|
94
|
+
L(() => {
|
|
95
|
+
S({ behavior: "instant" }), f.value = !0, B();
|
|
96
|
+
}), H.value && J();
|
|
82
97
|
return;
|
|
83
98
|
}
|
|
84
|
-
if (!
|
|
99
|
+
if (!o || !s || !s.length)
|
|
85
100
|
return;
|
|
86
|
-
const
|
|
87
|
-
(
|
|
101
|
+
const i = s[s.length - 1], e = o[o.length - 1];
|
|
102
|
+
(i == null ? void 0 : i.ID) !== (e == null ? void 0 : e.ID) && (L(() => {
|
|
103
|
+
B();
|
|
104
|
+
}), (i.flow === "out" || !j.value && d.value < D) && S({ behavior: "smooth" }));
|
|
88
105
|
}, {
|
|
89
106
|
immediate: !0
|
|
90
|
-
}), A(() => a.enableReadReceipt, (
|
|
91
|
-
|
|
107
|
+
}), A(() => a.enableReadReceipt, (s) => {
|
|
108
|
+
q(s);
|
|
92
109
|
}, {
|
|
93
110
|
immediate: !0
|
|
94
|
-
}),
|
|
95
|
-
t.value && t.value.addEventListener("scroll",
|
|
96
|
-
}),
|
|
97
|
-
t.value && t.value.removeEventListener("scroll",
|
|
98
|
-
}), (
|
|
99
|
-
|
|
111
|
+
}), se(() => {
|
|
112
|
+
t.value && t.value.addEventListener("scroll", E), F();
|
|
113
|
+
}), oe(() => {
|
|
114
|
+
t.value && t.value.removeEventListener("scroll", E);
|
|
115
|
+
}), (s, o) => (c(), _("div", Ce, [
|
|
116
|
+
b("div", {
|
|
100
117
|
id: "messageScrollList",
|
|
101
118
|
ref_key: "scrollContainer",
|
|
102
119
|
ref: t,
|
|
103
120
|
class: "message-list-container"
|
|
104
121
|
}, [
|
|
105
|
-
N(
|
|
122
|
+
N(n(ie), {
|
|
106
123
|
root: "#messageScrollList",
|
|
107
124
|
rootMargin: "50px 0px 0px 0px",
|
|
108
125
|
threshold: 0.1,
|
|
109
|
-
onOnShow:
|
|
126
|
+
onOnShow: Y
|
|
110
127
|
}, {
|
|
111
|
-
default:
|
|
112
|
-
|
|
128
|
+
default: O(() => [...o[1] || (o[1] = [
|
|
129
|
+
b("div", { id: "loadMore" }, null, -1)
|
|
113
130
|
])]),
|
|
114
131
|
_: 1
|
|
115
132
|
}),
|
|
116
|
-
(
|
|
117
|
-
key:
|
|
118
|
-
class:
|
|
133
|
+
(c(!0), _(V, null, $(w.value, (i, e) => (c(), T(n(le), {
|
|
134
|
+
key: i.key,
|
|
135
|
+
class: I(n(P)("message-chunk--container"))
|
|
119
136
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
(
|
|
122
|
-
previousMessage: e > 0 ?
|
|
123
|
-
currentMessage:
|
|
137
|
+
default: O(() => [
|
|
138
|
+
(c(), T(U(a.MessageTimeDivider || n(de)), {
|
|
139
|
+
previousMessage: e > 0 ? w.value[e - 1].messages[0] : void 0,
|
|
140
|
+
currentMessage: i.messages[0]
|
|
124
141
|
}, null, 8, ["previousMessage", "currentMessage"])),
|
|
125
|
-
|
|
126
|
-
(
|
|
127
|
-
key:
|
|
128
|
-
message:
|
|
142
|
+
b("div", Se, [
|
|
143
|
+
(c(!0), _(V, null, $(i.messages, (u, r) => (c(), T(U(a.Message || n(ve)), {
|
|
144
|
+
key: u.ID,
|
|
145
|
+
message: u,
|
|
129
146
|
alignment: a.alignment,
|
|
130
147
|
messageActionList: a.messageActionList,
|
|
131
|
-
isAggregated: !!(
|
|
148
|
+
isAggregated: !!(m.value && r !== 0),
|
|
132
149
|
"is-first-in-chunk": r === 0,
|
|
133
|
-
"is-last-in-chunk": r ===
|
|
134
|
-
isHiddenMessageAvatar: !!(
|
|
135
|
-
|
|
136
|
-
|
|
150
|
+
"is-last-in-chunk": r === i.messages.length - 1,
|
|
151
|
+
isHiddenMessageAvatar: !!(C.alignment === "two-sided" ? m.value && r !== 0 || u.flow === "out" : m.value && r !== 0),
|
|
152
|
+
"is-hidden-message-nick": !!(!H.value || (C.alignment === "two-sided" ? m.value && r !== 0 || u.flow === "out" : m.value && r !== 0)),
|
|
153
|
+
isHiddenMessageMeta: !!(m.value && r !== i.messages.length - 1)
|
|
154
|
+
}, null, 8, ["message", "alignment", "messageActionList", "isAggregated", "is-first-in-chunk", "is-last-in-chunk", "isHiddenMessageAvatar", "is-hidden-message-nick", "isHiddenMessageMeta"]))), 128))
|
|
137
155
|
])
|
|
138
156
|
]),
|
|
139
157
|
_: 2
|
|
140
158
|
}, 1032, ["class"]))), 128))
|
|
141
159
|
], 512),
|
|
142
|
-
N(
|
|
143
|
-
h.value ? (
|
|
160
|
+
N(n(ge)),
|
|
161
|
+
h.value ? (c(), T(n(pe), {
|
|
144
162
|
key: 0,
|
|
145
|
-
class:
|
|
146
|
-
onClick:
|
|
147
|
-
}, null, 8, ["class"])) :
|
|
163
|
+
class: I(n(P)("scroll-to-bottom")),
|
|
164
|
+
onClick: o[0] || (o[0] = (i) => n(S)({ behavior: "smooth" }))
|
|
165
|
+
}, null, 8, ["class"])) : ae("", !0)
|
|
148
166
|
]));
|
|
149
167
|
}
|
|
150
|
-
}),
|
|
168
|
+
}), xe = /* @__PURE__ */ Te(ye, [["__scopeId", "data-v-07d705f7"]]);
|
|
151
169
|
export {
|
|
152
|
-
|
|
170
|
+
xe as default
|
|
153
171
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
import { MessageAction } from '../../hooks/useMessageActions';
|
|
3
|
-
import {
|
|
3
|
+
import { MessageModel } from '../../types/engine';
|
|
4
4
|
|
|
5
5
|
interface MessageListProps {
|
|
6
6
|
alignment?: 'left' | 'right' | 'two-sided';
|
|
@@ -3,6 +3,10 @@ declare const Message: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
3
3
|
type: import('vue').PropType<import('../..').MessageModel>;
|
|
4
4
|
required: true;
|
|
5
5
|
};
|
|
6
|
+
nick: {
|
|
7
|
+
type: import('vue').PropType<string>;
|
|
8
|
+
default: undefined;
|
|
9
|
+
};
|
|
6
10
|
isLastInChunk: {
|
|
7
11
|
type: import('vue').PropType<boolean>;
|
|
8
12
|
default: undefined;
|
|
@@ -27,6 +31,10 @@ declare const Message: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
27
31
|
type: import('vue').PropType<boolean>;
|
|
28
32
|
default: boolean;
|
|
29
33
|
};
|
|
34
|
+
isHiddenMessageNick: {
|
|
35
|
+
type: import('vue').PropType<boolean>;
|
|
36
|
+
default: boolean;
|
|
37
|
+
};
|
|
30
38
|
isFirstInChunk: {
|
|
31
39
|
type: import('vue').PropType<boolean>;
|
|
32
40
|
default: undefined;
|
|
@@ -36,6 +44,10 @@ declare const Message: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
36
44
|
type: import('vue').PropType<import('../..').MessageModel>;
|
|
37
45
|
required: true;
|
|
38
46
|
};
|
|
47
|
+
nick: {
|
|
48
|
+
type: import('vue').PropType<string>;
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
39
51
|
isLastInChunk: {
|
|
40
52
|
type: import('vue').PropType<boolean>;
|
|
41
53
|
default: undefined;
|
|
@@ -60,22 +72,28 @@ declare const Message: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
60
72
|
type: import('vue').PropType<boolean>;
|
|
61
73
|
default: boolean;
|
|
62
74
|
};
|
|
75
|
+
isHiddenMessageNick: {
|
|
76
|
+
type: import('vue').PropType<boolean>;
|
|
77
|
+
default: boolean;
|
|
78
|
+
};
|
|
63
79
|
isFirstInChunk: {
|
|
64
80
|
type: import('vue').PropType<boolean>;
|
|
65
81
|
default: undefined;
|
|
66
82
|
};
|
|
67
83
|
}>> & Readonly<{}>, {
|
|
84
|
+
nick: string;
|
|
68
85
|
isLastInChunk: boolean;
|
|
69
86
|
messageActionList: import('../../hooks/useMessageActions').MessageAction[];
|
|
70
87
|
alignment: "left" | "right" | "two-sided";
|
|
71
88
|
isAggregated: boolean;
|
|
72
89
|
isHiddenMessageAvatar: boolean;
|
|
73
90
|
isHiddenMessageMeta: boolean;
|
|
91
|
+
isHiddenMessageNick: boolean;
|
|
74
92
|
isFirstInChunk: boolean;
|
|
75
93
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
76
94
|
declare const MessageList: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
77
95
|
filter: {
|
|
78
|
-
type: import('vue').PropType<(message: import('
|
|
96
|
+
type: import('vue').PropType<(message: import('../..').MessageModel) => boolean>;
|
|
79
97
|
default: undefined;
|
|
80
98
|
};
|
|
81
99
|
enableReadReceipt: {
|
|
@@ -104,7 +122,7 @@ declare const MessageList: import('vue').DefineComponent<import('vue').ExtractPr
|
|
|
104
122
|
};
|
|
105
123
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
106
124
|
filter: {
|
|
107
|
-
type: import('vue').PropType<(message: import('
|
|
125
|
+
type: import('vue').PropType<(message: import('../..').MessageModel) => boolean>;
|
|
108
126
|
default: undefined;
|
|
109
127
|
};
|
|
110
128
|
enableReadReceipt: {
|
|
@@ -132,7 +150,7 @@ declare const MessageList: import('vue').DefineComponent<import('vue').ExtractPr
|
|
|
132
150
|
default: number;
|
|
133
151
|
};
|
|
134
152
|
}>> & Readonly<{}>, {
|
|
135
|
-
filter: (message: import('
|
|
153
|
+
filter: (message: import('../..').MessageModel) => boolean;
|
|
136
154
|
enableReadReceipt: boolean;
|
|
137
155
|
Message: import('vue').Component;
|
|
138
156
|
MessageTimeDivider: import('vue').Component;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useUIKit as
|
|
3
|
-
import { copyText as
|
|
1
|
+
import { defineComponent as w, createElementBlock as d, openBlock as l, toDisplayString as t, unref as n, createElementVNode as o, createCommentVNode as v, createTextVNode as r, createVNode as m, normalizeClass as R } from "vue";
|
|
2
|
+
import { useUIKit as C, IconCopy as I, IconLoadingSchedule as T, TUIToast as g } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
|
+
import { copyText as b } from "./utils.js";
|
|
4
4
|
import { RoomStatus as u } from "../../types/room.js";
|
|
5
5
|
import { _ as A } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const D = { class: "room-detail" }, x = {
|
|
@@ -18,20 +18,20 @@ const D = { class: "room-detail" }, x = {
|
|
|
18
18
|
}, X = ["title"], Z = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "no-attendees"
|
|
21
|
-
}, p = /* @__PURE__ */
|
|
21
|
+
}, p = /* @__PURE__ */ w({
|
|
22
22
|
__name: "RoomDetail",
|
|
23
23
|
props: {
|
|
24
24
|
roomInfo: {},
|
|
25
25
|
isLoadingAttendees: { type: Boolean, default: !1 }
|
|
26
26
|
},
|
|
27
27
|
setup(e) {
|
|
28
|
-
const { t: s } =
|
|
29
|
-
if (!
|
|
28
|
+
const { t: s } = C(), f = (c) => {
|
|
29
|
+
if (!c)
|
|
30
30
|
return "--";
|
|
31
|
-
const i = new Date(
|
|
31
|
+
const i = new Date(c * 1e3), a = i.getFullYear(), S = (i.getMonth() + 1).toString().padStart(2, "0"), _ = i.getDate().toString().padStart(2, "0"), k = i.getHours().toString().padStart(2, "0"), N = i.getMinutes().toString().padStart(2, "0");
|
|
32
32
|
return `${a}-${S}-${_} ${k}:${N}`;
|
|
33
|
-
}, y = (
|
|
34
|
-
switch (
|
|
33
|
+
}, y = (c) => {
|
|
34
|
+
switch (c) {
|
|
35
35
|
case u.Scheduled:
|
|
36
36
|
return s("Not Started");
|
|
37
37
|
case u.Running:
|
|
@@ -39,11 +39,11 @@ const D = { class: "room-detail" }, x = {
|
|
|
39
39
|
default:
|
|
40
40
|
return s("Unknown Status");
|
|
41
41
|
}
|
|
42
|
-
}, h = async (
|
|
43
|
-
await
|
|
42
|
+
}, h = async (c) => {
|
|
43
|
+
await b(c) ? g.success({ message: s("Copy Success") }) : g.error({ message: s("Copy Failed") });
|
|
44
44
|
};
|
|
45
|
-
return (
|
|
46
|
-
e.roomInfo ? (
|
|
45
|
+
return (c, i) => (l(), d("div", D, [
|
|
46
|
+
e.roomInfo ? (l(), d("div", $, [
|
|
47
47
|
o("div", L, [
|
|
48
48
|
o("div", V, t(n(s)("Room Name")), 1),
|
|
49
49
|
o("div", B, t(e.roomInfo.roomName), 1)
|
|
@@ -61,7 +61,7 @@ const D = { class: "room-detail" }, x = {
|
|
|
61
61
|
})
|
|
62
62
|
])
|
|
63
63
|
]),
|
|
64
|
-
e.roomInfo.password ? (
|
|
64
|
+
e.roomInfo.password ? (l(), d("div", z, [
|
|
65
65
|
o("div", F, t(n(s)("Room Password")), 1),
|
|
66
66
|
o("div", M, [
|
|
67
67
|
r(t(e.roomInfo.password) + " ", 1),
|
|
@@ -78,9 +78,9 @@ const D = { class: "room-detail" }, x = {
|
|
|
78
78
|
o("div", P, t(n(s)("Room Time")), 1),
|
|
79
79
|
o("div", H, [
|
|
80
80
|
r(t(f(e.roomInfo.scheduledStartTime)) + " - " + t(f(e.roomInfo.scheduledEndTime)) + " ", 1),
|
|
81
|
-
e.roomInfo.roomStatus ? (
|
|
81
|
+
e.roomInfo.roomStatus ? (l(), d("span", {
|
|
82
82
|
key: 0,
|
|
83
|
-
class:
|
|
83
|
+
class: R(["status-badge", e.roomInfo.roomStatus === n(u).Running && "running"])
|
|
84
84
|
}, t(y(e.roomInfo.roomStatus)), 3)) : v("", !0)
|
|
85
85
|
])
|
|
86
86
|
]),
|
|
@@ -91,23 +91,23 @@ const D = { class: "room-detail" }, x = {
|
|
|
91
91
|
o("div", G, [
|
|
92
92
|
o("div", J, t(n(s)("Attendees")), 1),
|
|
93
93
|
o("div", Q, [
|
|
94
|
-
e.isLoadingAttendees ? (
|
|
95
|
-
m(n(
|
|
94
|
+
e.isLoadingAttendees ? (l(), d("div", W, [
|
|
95
|
+
m(n(T), {
|
|
96
96
|
class: "loading-icon",
|
|
97
97
|
size: "16"
|
|
98
98
|
}),
|
|
99
99
|
o("span", null, t(n(s)("Loading...")), 1)
|
|
100
|
-
])) : e.roomInfo.scheduleAttendees && e.roomInfo.scheduleAttendees.length > 0 ? (
|
|
100
|
+
])) : e.roomInfo.scheduleAttendees && e.roomInfo.scheduleAttendees.length > 0 ? (l(), d("div", {
|
|
101
101
|
key: 1,
|
|
102
102
|
class: "attendees-list",
|
|
103
103
|
title: e.roomInfo.scheduleAttendees.map((a) => a.userName || a.userId).join(", ")
|
|
104
|
-
}, t(e.roomInfo.scheduleAttendees.map((a) => a.userName || a.userId).join(", ")), 9, X)) : (
|
|
104
|
+
}, t(e.roomInfo.scheduleAttendees.map((a) => a.userName || a.userId).join(", ")), 9, X)) : (l(), d("div", Z, t(n(s)("No scheduled members")), 1))
|
|
105
105
|
])
|
|
106
106
|
])
|
|
107
|
-
])) : (
|
|
107
|
+
])) : (l(), d("div", x, t(n(s)("No room information")), 1))
|
|
108
108
|
]));
|
|
109
109
|
}
|
|
110
|
-
}), ne = /* @__PURE__ */ A(p, [["__scopeId", "data-v-
|
|
110
|
+
}), ne = /* @__PURE__ */ A(p, [["__scopeId", "data-v-81fa9511"]]);
|
|
111
111
|
export {
|
|
112
112
|
ne as default
|
|
113
113
|
};
|
|
@@ -275,7 +275,7 @@ const re = { class: "room-edit" }, ne = { class: "edit-form" }, ie = { class: "f
|
|
|
275
275
|
]);
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
}), $e = /* @__PURE__ */ le(Ve, [["__scopeId", "data-v-
|
|
278
|
+
}), $e = /* @__PURE__ */ le(Ve, [["__scopeId", "data-v-05d94b0a"]]);
|
|
279
279
|
export {
|
|
280
280
|
$e as default
|
|
281
281
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as R, computed as C, createElementBlock as l, openBlock as h, toDisplayString as t, unref as n, createElementVNode as s, createCommentVNode as T, createTextVNode as v, createVNode as f, withCtx as w } from "vue";
|
|
2
2
|
import { useUIKit as N, IconCopy as _, TUIButton as x, TUIToast as m } from "@tencentcloud/uikit-base-component-vue3";
|
|
3
3
|
import { generateRoomLink as L, copyText as p } from "./utils.js";
|
|
4
|
-
import { _ as
|
|
5
|
-
const
|
|
4
|
+
import { _ as D } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
+
const b = { class: "room-share" }, B = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "room-share-empty"
|
|
8
8
|
}, E = {
|
|
@@ -42,7 +42,7 @@ const D = { class: "room-share" }, B = {
|
|
|
42
42
|
`);
|
|
43
43
|
await p(e) ? m.success({ message: o("Copy Success") }) : m.error({ message: o("Copy Failed") });
|
|
44
44
|
};
|
|
45
|
-
return (c, e) => (h(), l("div",
|
|
45
|
+
return (c, e) => (h(), l("div", b, [
|
|
46
46
|
r.roomInfo ? (h(), l("div", E, [
|
|
47
47
|
s("div", V, [
|
|
48
48
|
s("div", F, t(n(o)("Room Name")), 1),
|
|
@@ -104,7 +104,7 @@ const D = { class: "room-share" }, B = {
|
|
|
104
104
|
])) : (h(), l("div", B, t(n(o)("No room information")), 1))
|
|
105
105
|
]));
|
|
106
106
|
}
|
|
107
|
-
}), to = /* @__PURE__ */
|
|
107
|
+
}), to = /* @__PURE__ */ D(X, [["__scopeId", "data-v-c5489163"]]);
|
|
108
108
|
export {
|
|
109
109
|
to as default
|
|
110
110
|
};
|
|
@@ -379,7 +379,7 @@ const Ce = { class: "schedule-room-panel" }, xe = { class: "panel-content" }, Ie
|
|
|
379
379
|
]);
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
}), Ut = /* @__PURE__ */ we(at, [["__scopeId", "data-v-
|
|
382
|
+
}), Ut = /* @__PURE__ */ we(at, [["__scopeId", "data-v-9cd542ad"]]);
|
|
383
383
|
export {
|
|
384
384
|
Ut as default
|
|
385
385
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as D, useCssModule as A, computed as p, createElementBlock as f, openBlock as M, normalizeClass as t, unref as _, createElementVNode as n, createVNode as G, createCommentVNode as I, toDisplayString as y, createBlock as L, resolveDynamicComponent as j, h as e } from "vue";
|
|
2
2
|
import i from "@tencentcloud/chat-uikit-engine";
|
|
3
|
-
import {
|
|
4
|
-
import N from "
|
|
5
|
-
import
|
|
3
|
+
import { useUIKit as F } from "@tencentcloud/uikit-base-component-vue3";
|
|
4
|
+
import { SearchType as N } from "../../../../../types/engine.js";
|
|
5
|
+
import O from "../../../../Avatar/Avatar.js";
|
|
6
6
|
import { highlightText as m } from "../utils/highlightText.js";
|
|
7
7
|
import { _ as P } from "../../../../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Y = ["innerHTML"], H = /* @__PURE__ */ D({
|
|
@@ -16,7 +16,7 @@ const Y = ["innerHTML"], H = /* @__PURE__ */ D({
|
|
|
16
16
|
onClick: { type: Function }
|
|
17
17
|
},
|
|
18
18
|
setup(g) {
|
|
19
|
-
const a = A(), b = (r) => new Date(r * 1e3).toLocaleString(), c = g, { t: o } =
|
|
19
|
+
const a = A(), b = (r) => new Date(r * 1e3).toLocaleString(), c = g, { t: o } = F(), { nick: x, avatar: v, nameCard: T, from: k, time: d } = c.data, l = p(() => T || x || k), C = p(() => c.keyword ? m(l.value, c.keyword, a.SearchMessage__highlight) : l.value), w = (r, h) => r.text && Array.isArray(r.text) ? r.text.map((s, S) => s.name === "text" ? e("span", {
|
|
20
20
|
key: S,
|
|
21
21
|
innerHTML: m(s.text, h, a.SearchMessage__highlight)
|
|
22
22
|
}) : s.name === "img" ? e("img", {
|
|
@@ -190,7 +190,7 @@ const Y = ["innerHTML"], H = /* @__PURE__ */ D({
|
|
|
190
190
|
}
|
|
191
191
|
}, B = () => {
|
|
192
192
|
var r;
|
|
193
|
-
(r = c.onClick) == null || r.call(c, c.data,
|
|
193
|
+
(r = c.onClick) == null || r.call(c, c.data, N.CHAT_MESSAGE);
|
|
194
194
|
};
|
|
195
195
|
return (r, h) => (M(), f("div", {
|
|
196
196
|
class: t(_(a).SearchMessage)
|
|
@@ -198,7 +198,7 @@ const Y = ["innerHTML"], H = /* @__PURE__ */ D({
|
|
|
198
198
|
n("div", {
|
|
199
199
|
class: t(_(a)["SearchMessage__avatar-wrapper"])
|
|
200
200
|
}, [
|
|
201
|
-
G(_(
|
|
201
|
+
G(_(O), {
|
|
202
202
|
src: _(v),
|
|
203
203
|
alt: l.value
|
|
204
204
|
}, null, 8, ["src", "alt"])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SearchType } from '../../../../../types/engine';
|
|
2
|
-
import { ResultItemProps } from '../../../../../types';
|
|
2
|
+
import { ResultItemProps } from '../../../../../types/search';
|
|
3
3
|
|
|
4
4
|
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ResultItemProps<SearchType.CHAT_MESSAGE>>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<ResultItemProps<SearchType.CHAT_MESSAGE>>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
5
5
|
export default _default;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
declare enum ChatErrorModalId {
|
|
2
|
+
LOGIN_INVALID_SDK_APP_ID = 30000,
|
|
3
|
+
LOGIN_INVALID_USER_ID = 30001,
|
|
4
|
+
LOGIN_INVALID_SECRET_KEY = 30004,
|
|
5
|
+
LOGIN_INVALID_USER_SIG = 30005,
|
|
6
|
+
LOGIN_USER_SIG_EXPIRED = 30006,
|
|
7
|
+
LOGIN_USER_SIG_INVALID = 30042,
|
|
8
|
+
LOGIN_USER_ID_NOT_MATCH_USER_SIG = 30007,
|
|
9
|
+
LOGIN_SDK_APP_ID_NOT_MATCH_USER_SIG = 30008,
|
|
10
|
+
LOGIN_SDK_APP_ID_NOT_FOUND = 30041,
|
|
11
|
+
PACKAGE_NOT_PURCHASED = 30002,
|
|
12
|
+
PACKAGE_GROUP_READ_RECEIPT_NOT_ENABLED = 30014,
|
|
13
|
+
PACKAGE_ONLINE_USER_LIST_NOT_ENABLED = 30015,
|
|
14
|
+
PACKAGE_CLOUD_SEARCH_NOT_ENABLED = 30016,
|
|
15
|
+
PACKAGE_TEXT_TRANSLATION_NOT_ENABLED = 30018,
|
|
16
|
+
PACKAGE_SPEECH_TO_TEXT_NOT_ENABLED = 30019,
|
|
17
|
+
CALL_KIT_NOT_INTEGRATED = 30010,
|
|
18
|
+
SEARCH_CLOUD_RATE_LIMIT = 30017,
|
|
19
|
+
MESSAGE_VOICE_SIZE_EXCEEDED = 30020,
|
|
20
|
+
MESSAGE_IMAGE_INVALID_FORMAT = 30021,
|
|
21
|
+
MESSAGE_IMAGE_SIZE_EXCEEDED = 30022,
|
|
22
|
+
MESSAGE_IMAGE_SENSITIVE_CONTENT = 30023,
|
|
23
|
+
MESSAGE_VIDEO_INVALID_FORMAT = 30024,
|
|
24
|
+
MESSAGE_VIDEO_SIZE_EXCEEDED = 30025,
|
|
25
|
+
MESSAGE_FILE_NOT_EXIST = 30026,
|
|
26
|
+
MESSAGE_FILE_SIZE_EXCEEDED = 30027,
|
|
27
|
+
MESSAGE_FILE_SENDING_BANNED = 30028,
|
|
28
|
+
MESSAGE_TEXT_SENSITIVE_CONTENT = 30029,
|
|
29
|
+
MESSAGE_LENGTH_EXCEEDED = 30030,
|
|
30
|
+
MESSAGE_LOCAL_AUDIT_BLOCKED = 30031,
|
|
31
|
+
MESSAGE_RECALL_TIME_EXCEEDED = 30039,
|
|
32
|
+
REACTION_EMOJI_LIMIT_REACHED = 30033,
|
|
33
|
+
PROFILE_REMARK_LENGTH_EXCEEDED = 30034,
|
|
34
|
+
GROUP_ANNOUNCEMENT_LENGTH_EXCEEDED = 30035,
|
|
35
|
+
GROUP_NAME_INVALID = 30036,
|
|
36
|
+
GROUP_ID_ALREADY_USED = 30040
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Show modal by ChatErrorModalId
|
|
40
|
+
* Use this method when you know exactly which modal to show
|
|
41
|
+
* @param modalId - The ChatErrorModalId to show
|
|
42
|
+
* @example
|
|
43
|
+
* // When sending image and got 80004 error
|
|
44
|
+
* showChatErrorModalById(ChatErrorModalId.MESSAGE_IMAGE_SENSITIVE_CONTENT);
|
|
45
|
+
*
|
|
46
|
+
* // When calling cloud search and got 60020 error
|
|
47
|
+
* showChatErrorModalById(ChatErrorModalId.PACKAGE_CLOUD_SEARCH_NOT_ENABLED);
|
|
48
|
+
*/
|
|
49
|
+
declare function showChatErrorModalById(modalId: ChatErrorModalId): void;
|
|
50
|
+
/**
|
|
51
|
+
* Handle SDK error and show modal automatically
|
|
52
|
+
* Only works for errorCodes with unique 1:1 mapping
|
|
53
|
+
* For ambiguous errorCodes, this method will do nothing - use showChatErrorModalById instead
|
|
54
|
+
* @param error - Error object with code property
|
|
55
|
+
* @returns boolean - true if modal was shown, false if errorCode is ambiguous or unknown
|
|
56
|
+
* @example
|
|
57
|
+
* try {
|
|
58
|
+
* await sendMessage();
|
|
59
|
+
* } catch (error) {
|
|
60
|
+
* // Will show modal for unique errorCodes like 2000, 70001, etc.
|
|
61
|
+
* // Will return false for ambiguous codes like -1, 80004, 3122, 60020
|
|
62
|
+
* const handled = handleChatErrorWithModal(error);
|
|
63
|
+
* if (!handled) {
|
|
64
|
+
* // Handle ambiguous error manually based on context
|
|
65
|
+
* showChatErrorModalById(ChatErrorModalId.MESSAGE_IMAGE_SENSITIVE_CONTENT);
|
|
66
|
+
* }
|
|
67
|
+
* }
|
|
68
|
+
*/
|
|
69
|
+
declare function handleChatErrorWithModal(error: {
|
|
70
|
+
code?: number;
|
|
71
|
+
}): boolean;
|
|
72
|
+
export { showChatErrorModalById, handleChatErrorWithModal, ChatErrorModalId, };
|