tuikit-atomicx-vue3 4.5.1 → 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/{PopoverPortal-DghpKKm8.js → PopoverPortal-DV6zFXcf.js} +3 -3
- package/dist/{PopoverTrigger-BajjNkGO.js → PopoverTrigger-DIjW4PKa.js} +4 -4
- package/dist/{PopperContent-SLoFuK7k.js → PopperContent-D__dbwpA.js} +1 -1
- package/dist/{Teleport-DFrneqLM.js → Teleport-98QrIYDI.js} +278 -268
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/AudioSettingPanel/index.js +14 -14
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +2 -2
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +4 -4
- 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 +18 -18
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +13 -13
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +11 -11
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -75
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
- package/dist/components/ConversationList/i18n/en-US.d.ts +1 -0
- package/dist/components/ConversationList/i18n/en-US.js +2 -1
- package/dist/components/ConversationList/i18n/zh-CN.d.ts +1 -0
- package/dist/components/ConversationList/i18n/zh-CN.js +2 -1
- package/dist/components/ConversationList/index.d.ts +48 -0
- package/dist/components/LiveScenePanel/index.js +9 -10
- package/dist/components/MessageInput/AttachmentPicker/index.js +2 -2
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +2 -2
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +3 -3
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +1 -1
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
- package/dist/components/MessageList/MessageList.js +77 -67
- 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/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-CzCDLp99.js → index-DXC5bPY4.js} +32 -32
- package/dist/{index-C8Jw_xE4.js → index-DuAffztD.js} +1731 -1648
- package/dist/{index-CiYL_XsE.js → index-hHVD-MG2.js} +1 -1
- package/dist/index.js +59 -58
- package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
- package/dist/states/LoginState.js +43 -43
- package/dist/states/MessageInputState/MessageInputState.js +75 -78
- 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/subEntry/chat/chat.d.ts +48 -0
- 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-D5WE76CM.js → useId-B1VwPJLm.js} +1 -1
- package/dist/utils/call.js +77 -71
- package/dist/{utils-CttDpxqz.js → utils-BU8IkP_V.js} +1 -1
- package/package.json +5 -6
- 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 +2 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
- package/src/components/ConversationList/i18n/en-US.ts +1 -0
- package/src/components/ConversationList/i18n/zh-CN.ts +1 -0
- package/src/components/LiveScenePanel/index.vue +0 -1
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
- package/src/components/MessageList/MessageList.vue +14 -0
- 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/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/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/index-BvFYOUyz.js +0 -2936
|
@@ -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, };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { i18next as A } from "@tencentcloud/uikit-base-component-vue3";
|
|
2
|
+
import { UIKitModal as i } from "../UIKitModal.js";
|
|
3
|
+
var S = /* @__PURE__ */ ((_) => (_[_.LOGIN_INVALID_SDK_APP_ID = 3e4] = "LOGIN_INVALID_SDK_APP_ID", _[_.LOGIN_INVALID_USER_ID = 30001] = "LOGIN_INVALID_USER_ID", _[_.LOGIN_INVALID_SECRET_KEY = 30004] = "LOGIN_INVALID_SECRET_KEY", _[_.LOGIN_INVALID_USER_SIG = 30005] = "LOGIN_INVALID_USER_SIG", _[_.LOGIN_USER_SIG_EXPIRED = 30006] = "LOGIN_USER_SIG_EXPIRED", _[_.LOGIN_USER_SIG_INVALID = 30042] = "LOGIN_USER_SIG_INVALID", _[_.LOGIN_USER_ID_NOT_MATCH_USER_SIG = 30007] = "LOGIN_USER_ID_NOT_MATCH_USER_SIG", _[_.LOGIN_SDK_APP_ID_NOT_MATCH_USER_SIG = 30008] = "LOGIN_SDK_APP_ID_NOT_MATCH_USER_SIG", _[_.LOGIN_SDK_APP_ID_NOT_FOUND = 30041] = "LOGIN_SDK_APP_ID_NOT_FOUND", _[_.PACKAGE_NOT_PURCHASED = 30002] = "PACKAGE_NOT_PURCHASED", _[_.PACKAGE_GROUP_READ_RECEIPT_NOT_ENABLED = 30014] = "PACKAGE_GROUP_READ_RECEIPT_NOT_ENABLED", _[_.PACKAGE_ONLINE_USER_LIST_NOT_ENABLED = 30015] = "PACKAGE_ONLINE_USER_LIST_NOT_ENABLED", _[_.PACKAGE_CLOUD_SEARCH_NOT_ENABLED = 30016] = "PACKAGE_CLOUD_SEARCH_NOT_ENABLED", _[_.PACKAGE_TEXT_TRANSLATION_NOT_ENABLED = 30018] = "PACKAGE_TEXT_TRANSLATION_NOT_ENABLED", _[_.PACKAGE_SPEECH_TO_TEXT_NOT_ENABLED = 30019] = "PACKAGE_SPEECH_TO_TEXT_NOT_ENABLED", _[_.CALL_KIT_NOT_INTEGRATED = 30010] = "CALL_KIT_NOT_INTEGRATED", _[_.SEARCH_CLOUD_RATE_LIMIT = 30017] = "SEARCH_CLOUD_RATE_LIMIT", _[_.MESSAGE_VOICE_SIZE_EXCEEDED = 30020] = "MESSAGE_VOICE_SIZE_EXCEEDED", _[_.MESSAGE_IMAGE_INVALID_FORMAT = 30021] = "MESSAGE_IMAGE_INVALID_FORMAT", _[_.MESSAGE_IMAGE_SIZE_EXCEEDED = 30022] = "MESSAGE_IMAGE_SIZE_EXCEEDED", _[_.MESSAGE_IMAGE_SENSITIVE_CONTENT = 30023] = "MESSAGE_IMAGE_SENSITIVE_CONTENT", _[_.MESSAGE_VIDEO_INVALID_FORMAT = 30024] = "MESSAGE_VIDEO_INVALID_FORMAT", _[_.MESSAGE_VIDEO_SIZE_EXCEEDED = 30025] = "MESSAGE_VIDEO_SIZE_EXCEEDED", _[_.MESSAGE_FILE_NOT_EXIST = 30026] = "MESSAGE_FILE_NOT_EXIST", _[_.MESSAGE_FILE_SIZE_EXCEEDED = 30027] = "MESSAGE_FILE_SIZE_EXCEEDED", _[_.MESSAGE_FILE_SENDING_BANNED = 30028] = "MESSAGE_FILE_SENDING_BANNED", _[_.MESSAGE_TEXT_SENSITIVE_CONTENT = 30029] = "MESSAGE_TEXT_SENSITIVE_CONTENT", _[_.MESSAGE_LENGTH_EXCEEDED = 30030] = "MESSAGE_LENGTH_EXCEEDED", _[_.MESSAGE_LOCAL_AUDIT_BLOCKED = 30031] = "MESSAGE_LOCAL_AUDIT_BLOCKED", _[_.MESSAGE_RECALL_TIME_EXCEEDED = 30039] = "MESSAGE_RECALL_TIME_EXCEEDED", _[_.REACTION_EMOJI_LIMIT_REACHED = 30033] = "REACTION_EMOJI_LIMIT_REACHED", _[_.PROFILE_REMARK_LENGTH_EXCEEDED = 30034] = "PROFILE_REMARK_LENGTH_EXCEEDED", _[_.GROUP_ANNOUNCEMENT_LENGTH_EXCEEDED = 30035] = "GROUP_ANNOUNCEMENT_LENGTH_EXCEEDED", _[_.GROUP_NAME_INVALID = 30036] = "GROUP_NAME_INVALID", _[_.GROUP_ID_ALREADY_USED = 30040] = "GROUP_ID_ALREADY_USED", _))(S || {});
|
|
4
|
+
const N = {
|
|
5
|
+
// Login
|
|
6
|
+
3e4: { i18nKey: "login_invalid_sdk_app_id" },
|
|
7
|
+
30001: { i18nKey: "login_invalid_user_id" },
|
|
8
|
+
30004: { i18nKey: "login_invalid_secret_key" },
|
|
9
|
+
30005: { i18nKey: "login_invalid_user_sig" },
|
|
10
|
+
30006: { i18nKey: "login_user_sig_expired" },
|
|
11
|
+
30042: { i18nKey: "login_user_sig_invalid" },
|
|
12
|
+
30007: { i18nKey: "login_user_id_not_match_user_sig" },
|
|
13
|
+
30008: { i18nKey: "login_sdk_app_id_not_match_user_sig" },
|
|
14
|
+
30041: { i18nKey: "login_sdk_app_id_not_found" },
|
|
15
|
+
// Package
|
|
16
|
+
30002: { i18nKey: "package_not_purchased" },
|
|
17
|
+
30014: { i18nKey: "package_group_read_receipt_not_enabled" },
|
|
18
|
+
30015: { i18nKey: "package_online_user_list_not_enabled" },
|
|
19
|
+
30016: { i18nKey: "package_cloud_search_not_enabled" },
|
|
20
|
+
30018: { i18nKey: "package_text_translation_not_enabled" },
|
|
21
|
+
30019: { i18nKey: "package_speech_to_text_not_enabled" },
|
|
22
|
+
// Call
|
|
23
|
+
30010: { i18nKey: "call_kit_not_integrated" },
|
|
24
|
+
// Search
|
|
25
|
+
30017: { i18nKey: "search_cloud_rate_limit" },
|
|
26
|
+
// Message
|
|
27
|
+
30020: { i18nKey: "message_voice_size_exceeded" },
|
|
28
|
+
30021: { i18nKey: "message_image_invalid_format" },
|
|
29
|
+
30022: { i18nKey: "message_image_size_exceeded" },
|
|
30
|
+
30023: { i18nKey: "message_image_sensitive_content" },
|
|
31
|
+
30024: { i18nKey: "message_video_invalid_format" },
|
|
32
|
+
30025: { i18nKey: "message_video_size_exceeded" },
|
|
33
|
+
30026: { i18nKey: "message_file_not_exist" },
|
|
34
|
+
30027: { i18nKey: "message_file_size_exceeded" },
|
|
35
|
+
30028: { i18nKey: "message_file_sending_banned" },
|
|
36
|
+
30029: { i18nKey: "message_text_sensitive_content" },
|
|
37
|
+
30030: { i18nKey: "message_length_exceeded" },
|
|
38
|
+
30031: { i18nKey: "message_local_audit_blocked" },
|
|
39
|
+
30039: { i18nKey: "message_recall_time_exceeded" },
|
|
40
|
+
// Reaction
|
|
41
|
+
30033: { i18nKey: "reaction_emoji_limit_reached" },
|
|
42
|
+
// Profile
|
|
43
|
+
30034: { i18nKey: "profile_remark_length_exceeded" },
|
|
44
|
+
// Group
|
|
45
|
+
30035: { i18nKey: "group_announcement_length_exceeded" },
|
|
46
|
+
30036: { i18nKey: "group_name_invalid" },
|
|
47
|
+
30040: { i18nKey: "group_id_already_used" }
|
|
48
|
+
}, n = {
|
|
49
|
+
// Login
|
|
50
|
+
2e3: 3e4,
|
|
51
|
+
2002: 30001,
|
|
52
|
+
2003: 30005,
|
|
53
|
+
70001: 30006,
|
|
54
|
+
70003: 30042,
|
|
55
|
+
70013: 30007,
|
|
56
|
+
70014: 30008,
|
|
57
|
+
70020: 30041,
|
|
58
|
+
// Search
|
|
59
|
+
60018: 30017,
|
|
60
|
+
// Message
|
|
61
|
+
2301: 30020,
|
|
62
|
+
2252: 30021,
|
|
63
|
+
2253: 30022,
|
|
64
|
+
2352: 30024,
|
|
65
|
+
2351: 30025,
|
|
66
|
+
2401: 30026,
|
|
67
|
+
2402: 30027,
|
|
68
|
+
3123: 30031,
|
|
69
|
+
20016: 30039,
|
|
70
|
+
10031: 30039,
|
|
71
|
+
// Group
|
|
72
|
+
10021: 30040
|
|
73
|
+
/* GROUP_ID_ALREADY_USED */
|
|
74
|
+
};
|
|
75
|
+
function D(_) {
|
|
76
|
+
const E = N[_];
|
|
77
|
+
E && i.openModal({
|
|
78
|
+
id: _,
|
|
79
|
+
title: A.t("ChatErrorModal.title"),
|
|
80
|
+
content: A.t(`ChatErrorModal.${E.i18nKey}`),
|
|
81
|
+
type: "error"
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function G(_) {
|
|
85
|
+
const E = _.code;
|
|
86
|
+
if (E == null)
|
|
87
|
+
return !1;
|
|
88
|
+
const e = n[E];
|
|
89
|
+
return e !== void 0 ? (D(e), !0) : !1;
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
S as ChatErrorModalId,
|
|
93
|
+
G as handleChatErrorWithModal,
|
|
94
|
+
D as showChatErrorModalById
|
|
95
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const resource: {
|
|
2
|
+
ChatErrorModal: {
|
|
3
|
+
title: string;
|
|
4
|
+
login_invalid_sdk_app_id: string;
|
|
5
|
+
login_invalid_user_id: string;
|
|
6
|
+
login_invalid_secret_key: string;
|
|
7
|
+
login_invalid_user_sig: string;
|
|
8
|
+
login_user_sig_expired: string;
|
|
9
|
+
login_user_sig_invalid: string;
|
|
10
|
+
login_user_id_not_match_user_sig: string;
|
|
11
|
+
login_sdk_app_id_not_match_user_sig: string;
|
|
12
|
+
login_sdk_app_id_not_found: string;
|
|
13
|
+
package_not_purchased: string;
|
|
14
|
+
package_group_read_receipt_not_enabled: string;
|
|
15
|
+
package_online_user_list_not_enabled: string;
|
|
16
|
+
package_cloud_search_not_enabled: string;
|
|
17
|
+
package_text_translation_not_enabled: string;
|
|
18
|
+
package_speech_to_text_not_enabled: string;
|
|
19
|
+
call_kit_not_integrated: string;
|
|
20
|
+
search_cloud_rate_limit: string;
|
|
21
|
+
message_voice_size_exceeded: string;
|
|
22
|
+
message_image_invalid_format: string;
|
|
23
|
+
message_image_size_exceeded: string;
|
|
24
|
+
message_image_sensitive_content: string;
|
|
25
|
+
message_video_invalid_format: string;
|
|
26
|
+
message_video_size_exceeded: string;
|
|
27
|
+
message_file_not_exist: string;
|
|
28
|
+
message_file_size_exceeded: string;
|
|
29
|
+
message_file_sending_banned: string;
|
|
30
|
+
message_text_sensitive_content: string;
|
|
31
|
+
message_length_exceeded: string;
|
|
32
|
+
message_local_audit_blocked: string;
|
|
33
|
+
message_recall_time_exceeded: string;
|
|
34
|
+
reaction_emoji_limit_reached: string;
|
|
35
|
+
profile_remark_length_exceeded: string;
|
|
36
|
+
group_announcement_length_exceeded: string;
|
|
37
|
+
group_name_invalid: string;
|
|
38
|
+
group_id_already_used: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
ChatErrorModal: {
|
|
3
|
+
title: "Error",
|
|
4
|
+
// Login
|
|
5
|
+
login_invalid_sdk_app_id: 'Missing correct SDKAppID. You can obtain it via the <a target="_blank" href="https://console.trtc.io/">Chat Console</a>.',
|
|
6
|
+
login_invalid_user_id: "Missing correct userID. The userID format should be a non-empty string.",
|
|
7
|
+
login_invalid_secret_key: 'Missing correct secretKey. You can obtain it via the <a target="_blank" href="https://console.trtc.io/">Chat Console</a>.',
|
|
8
|
+
login_invalid_user_sig: 'Missing correct userSig. You can obtain it via <a target="_blank" href="https://console.trtc.io/">Chat > Auxiliary Tools > UserSig Tools</a>.',
|
|
9
|
+
login_user_sig_expired: 'userSig has expired. You can regenerate it via <a target="_blank" href="https://console.trtc.io/">Chat > Auxiliary Tools > UserSig Tools</a>.',
|
|
10
|
+
login_user_sig_invalid: 'Invalid UserSig. Please use the official API to regenerate UserSig (<a target="_blank" href="https://cloud.tencent.com/document/product/269/32688">Documentation</a>).',
|
|
11
|
+
login_user_id_not_match_user_sig: 'The UserID in the request does not match the UserID used to generate the userSig. You can use <a target="_blank" href="https://console.trtc.io/">Chat > Auxiliary Tools > UserSig Tools</a>.',
|
|
12
|
+
login_sdk_app_id_not_match_user_sig: 'The SDKAppID in the request does not match the SDKAppID used to generate the userSig. You can use <a target="_blank" href="https://console.trtc.io/">Chat > Auxiliary Tools > UserSig Tools</a>.',
|
|
13
|
+
login_sdk_app_id_not_found: 'SDKAppID not found. Please confirm the application information in the <a target="_blank" href="https://console.trtc.io/">Chat Console</a>.',
|
|
14
|
+
// Package
|
|
15
|
+
package_not_purchased: 'You have not purchased a plan package, or the package has expired, or the purchased package is being configured and not yet effective. Please log in to the <a target="_blank" href="https://console.trtc.io/subscription/buy/chat?packType=pro">Chat Purchase Page</a> to repurchase the package. It will take effect 5 minutes after purchase.',
|
|
16
|
+
package_group_read_receipt_not_enabled: 'The plan package you are currently using has not enabled the group message read receipt feature. You can upgrade to the <a target="_blank" href="https://console.trtc.io/subscription/buy/chat?packType=pro">Pro</a>.',
|
|
17
|
+
package_online_user_list_not_enabled: 'The plan package you are currently using has not enabled the online user list feature. You can upgrade to the <a target="_blank" href="https://console.trtc.io/subscription/buy/chat?packType=pro">Pro</a>.',
|
|
18
|
+
package_cloud_search_not_enabled: 'The plan package you are currently using has not enabled the cloud search feature. You can enable <a target="_blank" href="https://console.trtc.io/chat/plugin/TUICloudSearch">Cloud Search</a>.',
|
|
19
|
+
package_text_translation_not_enabled: 'The text message translation feature is currently offered for free. You can contact us through the <a target="_blank" href="https://t.me/+EPk6TMZEZMM5OGY1">Telegram technical exchange group</a> to enable and experience the full feature.',
|
|
20
|
+
package_speech_to_text_not_enabled: 'The plan package you are currently using has not enabled the speech-to-text feature. You can enable <a target="_blank" href="https://cloud.tencent.com/document/product/269/110626">Speech-to-Text</a>.',
|
|
21
|
+
// Call
|
|
22
|
+
call_kit_not_integrated: 'It is detected that you have not integrated TUICallKit, so you cannot experience the audio and video call functionality. You can refer to: <a target="_blank" href="https://trtc.io/zh/document/64468?product=chat&menulabel=uikit&platform=react">integrate TUICallKit</a>.',
|
|
23
|
+
// Search
|
|
24
|
+
search_cloud_rate_limit: "Cloud search request exceeds the backend frequency limit. Each user is allowed 2 search requests per second. Please try again later.",
|
|
25
|
+
// Message
|
|
26
|
+
message_voice_size_exceeded: "The voice size exceeds the limit. The maximum size for uploading a voice message is 20MB.",
|
|
27
|
+
message_image_invalid_format: "Image message sending failed. Invalid image format. Supported image formats are: jpg, jpeg, gif, png, bmp, image, webp.",
|
|
28
|
+
message_image_size_exceeded: "The image size exceeds the limit. The maximum size for uploading an image is 20MB.",
|
|
29
|
+
message_image_sensitive_content: "The image in the message contains sensitive content. Sending failed.",
|
|
30
|
+
message_video_invalid_format: "Video message sending failed. Invalid video format. Supported video formats are: mp4, quicktime, mov.",
|
|
31
|
+
message_video_size_exceeded: "The video size exceeds the limit. The maximum size for uploading a video is 100MB.",
|
|
32
|
+
message_file_not_exist: "The file does not exist. Please check if the file path is correct.",
|
|
33
|
+
message_file_size_exceeded: "The file size exceeds the limit. The maximum size for uploading a file is 100MB.",
|
|
34
|
+
message_file_sending_banned: "File message failed. Sending prohibited or banned files is not allowed.",
|
|
35
|
+
message_text_sensitive_content: "The text in the message or profile contains sensitive content. Sending failed.",
|
|
36
|
+
message_length_exceeded: "The message length exceeds the limit. The message length should not exceed 12K.",
|
|
37
|
+
message_local_audit_blocked: "The text contains locally blocked words for review.",
|
|
38
|
+
message_recall_time_exceeded: "Exceeded the recall time limit. Message recall has exceeded the time limit (default 2 minutes).",
|
|
39
|
+
// Reaction
|
|
40
|
+
reaction_emoji_limit_reached: "The maximum number of emoji reactions has been reached.",
|
|
41
|
+
// Profile
|
|
42
|
+
profile_remark_length_exceeded: "Failed to modify the remark: the remark length must not exceed 96 bytes.",
|
|
43
|
+
// Group
|
|
44
|
+
group_announcement_length_exceeded: "The group announcement word count exceeds the limit. The maximum length is 150.",
|
|
45
|
+
group_name_invalid: "The group name can only contain Chinese characters, letters, numbers, and underscores, and must be 2-20 characters long.",
|
|
46
|
+
group_id_already_used: "The group ID is already in use. Please choose another group ID."
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
e as resource
|
|
51
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const resource: {
|
|
2
|
+
ChatErrorModal: {
|
|
3
|
+
title: string;
|
|
4
|
+
login_invalid_sdk_app_id: string;
|
|
5
|
+
login_invalid_user_id: string;
|
|
6
|
+
login_invalid_secret_key: string;
|
|
7
|
+
login_invalid_user_sig: string;
|
|
8
|
+
login_user_sig_expired: string;
|
|
9
|
+
login_user_sig_invalid: string;
|
|
10
|
+
login_user_id_not_match_user_sig: string;
|
|
11
|
+
login_sdk_app_id_not_match_user_sig: string;
|
|
12
|
+
login_sdk_app_id_not_found: string;
|
|
13
|
+
package_not_purchased: string;
|
|
14
|
+
package_group_read_receipt_not_enabled: string;
|
|
15
|
+
package_online_user_list_not_enabled: string;
|
|
16
|
+
package_cloud_search_not_enabled: string;
|
|
17
|
+
package_text_translation_not_enabled: string;
|
|
18
|
+
package_speech_to_text_not_enabled: string;
|
|
19
|
+
call_kit_not_integrated: string;
|
|
20
|
+
search_cloud_rate_limit: string;
|
|
21
|
+
message_voice_size_exceeded: string;
|
|
22
|
+
message_image_invalid_format: string;
|
|
23
|
+
message_image_size_exceeded: string;
|
|
24
|
+
message_image_sensitive_content: string;
|
|
25
|
+
message_video_invalid_format: string;
|
|
26
|
+
message_video_size_exceeded: string;
|
|
27
|
+
message_file_not_exist: string;
|
|
28
|
+
message_file_size_exceeded: string;
|
|
29
|
+
message_file_sending_banned: string;
|
|
30
|
+
message_text_sensitive_content: string;
|
|
31
|
+
message_length_exceeded: string;
|
|
32
|
+
message_local_audit_blocked: string;
|
|
33
|
+
message_recall_time_exceeded: string;
|
|
34
|
+
reaction_emoji_limit_reached: string;
|
|
35
|
+
profile_remark_length_exceeded: string;
|
|
36
|
+
group_announcement_length_exceeded: string;
|
|
37
|
+
group_name_invalid: string;
|
|
38
|
+
group_id_already_used: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
ChatErrorModal: {
|
|
3
|
+
title: "错误",
|
|
4
|
+
// Login
|
|
5
|
+
login_invalid_sdk_app_id: '缺少正确的 SDKAppID,您可以通过<a target="_blank" href="https://console.cloud.tencent.com/im">即时通信 IM 控制台</a>获取。',
|
|
6
|
+
login_invalid_user_id: "缺少正确的 userID,userID 格式为非空字符串。",
|
|
7
|
+
login_invalid_secret_key: '缺少正确的 secretKey,您可以通过<a target="_blank" href="https://console.cloud.tencent.com/im">即时通信 IM 控制台</a>获取。',
|
|
8
|
+
login_invalid_user_sig: '缺少正确的 userSig,您可以通过<a target="_blank" href="https://console.cloud.tencent.com/im/tool-usersig">即时通信 IM 控制台 > 开发工具 > UserSig生成&校验</a>获取。',
|
|
9
|
+
login_user_sig_expired: 'userSig 已过期,您可以通过<a target="_blank" href="https://console.cloud.tencent.com/im/tool-usersig">即时通信 IM 控制台 > 开发工具 > UserSig生成&校验</a>重新获取。',
|
|
10
|
+
login_user_sig_invalid: 'UserSig 非法,请使用官网提供的 API 重新生成 UserSig(<a target="_blank" href="https://cloud.tencent.com/document/product/269/32688">文档</a>)。',
|
|
11
|
+
login_user_id_not_match_user_sig: '请求中的 UserID 与生成 UserSig 时使用的 UserID 不一致,您可以使用<a target="_blank" href="https://console.cloud.tencent.com/im/tool-usersig">即时通信 IM 控制台 > 开发工具 > UserSig生成&校验</a>校验 UserSig。',
|
|
12
|
+
login_sdk_app_id_not_match_user_sig: '请求中的 SDKAppID 与生成 UserSig 时使用的 SDKAppID 不一致。您可以使用<a target="_blank" href="https://console.cloud.tencent.com/im/tool-usersig">即时通信 IM 控制台 > 开发工具 > UserSig生成&校验</a>校验 UserSig。',
|
|
13
|
+
login_sdk_app_id_not_found: 'SDKAppID 未找到,请在<a target="_blank" href="https://console.cloud.tencent.com/im">即时通信 IM 控制台</a>确认应用信息。',
|
|
14
|
+
// Package
|
|
15
|
+
package_not_purchased: '您未购买套餐包,或套餐包已过期,或购买的套餐包正在配置中暂未生效。请登录<a target="_blank" href="https://buy.cloud.tencent.com/avc">即时通信 IM 购买页面</a>重新购买套餐包。购买后,将在5分钟后生效。',
|
|
16
|
+
package_group_read_receipt_not_enabled: '您当前购买使用的套餐包暂未开通群消息已读回执功能,您可以升级到套餐为<a target="_blank" href="https://buy.cloud.tencent.com/avc">旗舰版</a>。',
|
|
17
|
+
package_online_user_list_not_enabled: '您当前购买使用的套餐包暂未开通在线用户列表功能,您可以升级到套餐为<a target="_blank" href="https://buy.cloud.tencent.com/avc">旗舰版</a>。',
|
|
18
|
+
package_cloud_search_not_enabled: '您当前购买使用的套餐包暂未开通云端搜索功能,您可以开通<a target="_blank" href="https://cloud.tencent.com/document/product/269/101046">云端搜索</a>。',
|
|
19
|
+
package_text_translation_not_enabled: '您当前购买使用的套餐包暂未开通文本消息翻译功能,您可以开通<a target="_blank" href="https://cloud.tencent.com/document/product/269/92661">文本消息翻译</a>。',
|
|
20
|
+
package_speech_to_text_not_enabled: '您当前购买使用的套餐包暂未开通语音转文字功能,您可以开通<a target="_blank" href="https://cloud.tencent.com/document/product/269/110626">语音转文字</a>。',
|
|
21
|
+
// Call
|
|
22
|
+
call_kit_not_integrated: '检测到您暂未集成TUICallKit,无法体验音视频通话功能,可以参考:<a target="_blank" href="https://cloud.tencent.com/document/product/269/79861">接入 TUICallKit</a>。',
|
|
23
|
+
// Search
|
|
24
|
+
search_cloud_rate_limit: "云端搜索请求超过后台频率限制,单用户一秒内允许2次搜索请求,请稍后再试。",
|
|
25
|
+
// Message
|
|
26
|
+
message_voice_size_exceeded: "语音大小超出了限制,如果上传语音,最大限制是 20MB。",
|
|
27
|
+
message_image_invalid_format: "图片消息发送失败,无效的图片格式,图片格式支持:jpg、jpeg、gif、png、bmp、image、webp。",
|
|
28
|
+
message_image_size_exceeded: "图片大小超出了限制,如果上传文件,最大限制是 20MB。",
|
|
29
|
+
message_image_sensitive_content: "消息中图片存在敏感内容,发送失败。",
|
|
30
|
+
message_video_invalid_format: "视频消息发送失败,无效的视频格式,视频格式支持:mp4、quicktime、mov。",
|
|
31
|
+
message_video_size_exceeded: "视频大小超出了限制,如果上传视频,最大限制是 100MB。",
|
|
32
|
+
message_file_not_exist: "文件不存在,请检查文件路径是否正确。",
|
|
33
|
+
message_file_size_exceeded: "文件大小超出了限制,如果上传文件,最大限制是 100MB。",
|
|
34
|
+
message_file_sending_banned: "文件消息失败,禁止发送违规封禁的文件。",
|
|
35
|
+
message_text_sensitive_content: "消息或者资料中文本存在敏感内容,发送失败。",
|
|
36
|
+
message_length_exceeded: "消息长度超出限制,消息长度不要超过 12K。",
|
|
37
|
+
message_local_audit_blocked: "文本包含本地审核拦截词。",
|
|
38
|
+
message_recall_time_exceeded: "超过撤回时间限制。消息撤回超过了时间限制(默认2分钟)。",
|
|
39
|
+
// Reaction
|
|
40
|
+
reaction_emoji_limit_reached: "已达到表情回应上限数量。",
|
|
41
|
+
// Profile
|
|
42
|
+
profile_remark_length_exceeded: "修改备注失败:备注长度不得超过 96 字节。",
|
|
43
|
+
// Group
|
|
44
|
+
group_announcement_length_exceeded: "群公告字数超出限制,最大长度为 150。",
|
|
45
|
+
group_name_invalid: "群名称仅限中文、字母、数字和下划线,2-20个字。",
|
|
46
|
+
group_id_already_used: "群组 ID 已被使用。请选择其他的群组 ID。"
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export {
|
|
50
|
+
e as resource
|
|
51
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { addI18n as r } from "../../../i18n/index.js";
|
|
2
|
+
import { ChatErrorModalId as n, handleChatErrorWithModal as s, showChatErrorModalById as i } from "./chatErrorModal.js";
|
|
3
|
+
import { resource as o } from "./i18n/en-US/index.js";
|
|
4
|
+
import { resource as a } from "./i18n/zh-CN/index.js";
|
|
5
|
+
r("en-US", { translation: o });
|
|
6
|
+
r("zh-CN", { translation: a });
|
|
7
|
+
export {
|
|
8
|
+
n as ChatErrorModalId,
|
|
9
|
+
s as handleChatErrorWithModal,
|
|
10
|
+
i as showChatErrorModalById
|
|
11
|
+
};
|
|
@@ -69,7 +69,7 @@ const D = { class: "video-setting-panel" }, x = {
|
|
|
69
69
|
])) : a("", !0)
|
|
70
70
|
]));
|
|
71
71
|
}
|
|
72
|
-
}), K = /* @__PURE__ */ C(A, [["__scopeId", "data-v-
|
|
72
|
+
}), K = /* @__PURE__ */ C(A, [["__scopeId", "data-v-9c03cc10"]]);
|
|
73
73
|
v("en-US", { translation: h });
|
|
74
74
|
v("zh-CN", { translation: P });
|
|
75
75
|
const W = K;
|
|
@@ -1,35 +1,38 @@
|
|
|
1
|
-
import { watch as A, onMounted as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { watch as A, onMounted as C, onUnmounted as b } from "vue";
|
|
2
|
+
import { TUIStore as E, TUIChatService as v } from "@tencentcloud/chat-uikit-engine";
|
|
3
|
+
import "../../components/UIKitModal/chatErrorModal/index.js";
|
|
4
|
+
import { throttle as B } from "../../utils/lodash.js";
|
|
5
|
+
import { handleChatErrorWithModal as I } from "../../components/UIKitModal/chatErrorModal/chatErrorModal.js";
|
|
6
|
+
function L({
|
|
5
7
|
enabled: u,
|
|
6
8
|
containerSelector: n,
|
|
7
9
|
messageSelector: l = "[data-message-id]",
|
|
8
10
|
getMessageIDFromDom: f,
|
|
9
|
-
shouldSendReadReceipt: m = (
|
|
11
|
+
shouldSendReadReceipt: m = (s) => s.flow === "in",
|
|
10
12
|
intersectionThreshold: g = 0.5,
|
|
11
|
-
delay:
|
|
13
|
+
delay: y = 1e3
|
|
12
14
|
}) {
|
|
13
|
-
let
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
15
|
+
let s = null;
|
|
16
|
+
const a = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Set(), p = B(() => {
|
|
17
|
+
if (a.size === 0)
|
|
16
18
|
return;
|
|
17
|
-
const e = Array.from(
|
|
18
|
-
|
|
19
|
-
}).catch(() => {
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const e = Array.from(a.values());
|
|
20
|
+
v.sendMessageReadReceipt(e).then(() => {
|
|
21
|
+
}).catch((t) => {
|
|
22
|
+
I(t);
|
|
23
|
+
}), a.clear();
|
|
24
|
+
}, y, { leading: !1, trailing: !0 }), h = (e) => {
|
|
22
25
|
if (c.has(e))
|
|
23
26
|
return !1;
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
u && (
|
|
27
|
+
const t = E.getMessageModel(e);
|
|
28
|
+
return t && m(t) ? (a.set(e, t), c.add(e), p(), !0) : !1;
|
|
29
|
+
}, R = () => {
|
|
30
|
+
u && (s = new IntersectionObserver(
|
|
28
31
|
(e) => {
|
|
29
|
-
e.forEach((
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
|
|
32
|
+
e.forEach((t) => {
|
|
33
|
+
if (t.isIntersecting && t.intersectionRatio >= g) {
|
|
34
|
+
const r = f(t.target);
|
|
35
|
+
r && h(r), s == null || s.unobserve(t.target);
|
|
33
36
|
}
|
|
34
37
|
});
|
|
35
38
|
},
|
|
@@ -39,27 +42,27 @@ function k({
|
|
|
39
42
|
}
|
|
40
43
|
));
|
|
41
44
|
}, M = () => {
|
|
42
|
-
|
|
45
|
+
s == null || s.disconnect(), p.flush();
|
|
43
46
|
};
|
|
44
47
|
A(
|
|
45
48
|
[() => u, () => n, () => g],
|
|
46
49
|
() => {
|
|
47
|
-
M(),
|
|
50
|
+
M(), R();
|
|
48
51
|
},
|
|
49
52
|
{ immediate: !0 }
|
|
50
53
|
);
|
|
51
54
|
const q = () => {
|
|
52
|
-
if (!
|
|
55
|
+
if (!s || !u)
|
|
53
56
|
return;
|
|
54
57
|
const e = typeof n == "string" ? document.querySelector(n) : n;
|
|
55
58
|
if (!e)
|
|
56
59
|
return;
|
|
57
|
-
e.querySelectorAll(l).forEach((
|
|
58
|
-
const
|
|
59
|
-
if (!
|
|
60
|
+
e.querySelectorAll(l).forEach((r) => {
|
|
61
|
+
const i = f(r);
|
|
62
|
+
if (!i || c.has(i))
|
|
60
63
|
return;
|
|
61
|
-
const
|
|
62
|
-
|
|
64
|
+
const o = E.getMessageModel(i);
|
|
65
|
+
o && m(o) && (s == null || s.observe(r));
|
|
63
66
|
});
|
|
64
67
|
}, w = () => {
|
|
65
68
|
if (!u)
|
|
@@ -67,18 +70,18 @@ function k({
|
|
|
67
70
|
const e = typeof n == "string" ? document.querySelector(n) : n;
|
|
68
71
|
if (!e)
|
|
69
72
|
return;
|
|
70
|
-
const
|
|
71
|
-
e.querySelectorAll(l).forEach((
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
73
|
+
const t = e.getBoundingClientRect();
|
|
74
|
+
e.querySelectorAll(l).forEach((i) => {
|
|
75
|
+
const o = f(i);
|
|
76
|
+
if (!o || c.has(o))
|
|
74
77
|
return;
|
|
75
|
-
const d =
|
|
76
|
-
d.top <
|
|
78
|
+
const d = i.getBoundingClientRect();
|
|
79
|
+
d.top < t.bottom && d.bottom > t.top && d.height > 0 && h(o);
|
|
77
80
|
});
|
|
78
81
|
};
|
|
79
|
-
return
|
|
80
|
-
|
|
81
|
-
}),
|
|
82
|
+
return C(() => {
|
|
83
|
+
R();
|
|
84
|
+
}), b(() => {
|
|
82
85
|
M();
|
|
83
86
|
}), {
|
|
84
87
|
/**
|
|
@@ -93,10 +96,10 @@ function k({
|
|
|
93
96
|
* Reset processed message records, e.g. when switching conversation
|
|
94
97
|
*/
|
|
95
98
|
resetProcessedMessages: () => {
|
|
96
|
-
c.clear(),
|
|
99
|
+
c.clear(), a.clear();
|
|
97
100
|
}
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
103
|
export {
|
|
101
|
-
|
|
104
|
+
L as useReadReceipt
|
|
102
105
|
};
|