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.
Files changed (182) hide show
  1. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
  2. package/dist/{PopoverTrigger-L8abAry7.js → PopoverPortal-DV6zFXcf.js} +91 -136
  3. package/dist/PopoverTrigger-DIjW4PKa.js +54 -0
  4. package/dist/{PopperContent-XdhqL8Y2.js → PopperContent-D__dbwpA.js} +6 -6
  5. package/dist/{Teleport-CSEuZbpM.js → Teleport-98QrIYDI.js} +280 -270
  6. package/dist/baseComp/Modal/Modal.js +3 -3
  7. package/dist/components/AudioSettingPanel/index.js +14 -14
  8. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +10 -9
  9. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  10. package/dist/components/BarrageInput/TextEditor/EditorCore.js +16 -15
  11. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
  12. package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
  13. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
  14. package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
  15. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
  16. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +62 -40
  17. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +28 -26
  18. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +27 -23
  19. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue.d.ts +1 -1
  20. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +81 -70
  21. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
  22. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +33 -31
  23. package/dist/components/ConversationList/ConversationPreview/utils.d.ts +2 -2
  24. package/dist/components/ConversationList/ConversationPreview/utils.js +81 -35
  25. package/dist/components/ConversationList/i18n/en-US.d.ts +11 -1
  26. package/dist/components/ConversationList/i18n/en-US.js +12 -2
  27. package/dist/components/ConversationList/i18n/zh-CN.d.ts +11 -1
  28. package/dist/components/ConversationList/i18n/zh-CN.js +12 -2
  29. package/dist/components/ConversationList/index.d.ts +48 -0
  30. package/dist/components/MessageInput/AttachmentPicker/index.js +10 -9
  31. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +17 -16
  32. package/dist/components/MessageInput/MessageInput.js +1 -1
  33. package/dist/components/MessageInput/QuotedMessagePreview/index.js +35 -35
  34. package/dist/components/MessageInput/TextEditor/EditorCore.d.ts +13 -12
  35. package/dist/components/MessageInput/TextEditor/EditorCore.js +54 -89
  36. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +229 -0
  37. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue.d.ts +15 -0
  38. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
  39. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.d.ts +1 -0
  40. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +22 -0
  41. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.d.ts +3 -0
  42. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +15 -0
  43. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
  44. package/dist/components/MessageInput/TextEditor/extensions/index.d.ts +8 -0
  45. package/dist/components/MessageInput/TextEditor/extensions/index.js +12 -0
  46. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.d.ts +5 -0
  47. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +330 -0
  48. package/dist/components/MessageInput/TextEditor/index.js +62 -62
  49. package/dist/components/MessageInput/i18n/en-US.d.ts +3 -0
  50. package/dist/components/MessageInput/i18n/en-US.js +4 -1
  51. package/dist/components/MessageInput/i18n/index.d.ts +6 -0
  52. package/dist/components/MessageInput/i18n/zh-CN.d.ts +3 -0
  53. package/dist/components/MessageInput/i18n/zh-CN.js +4 -1
  54. package/dist/components/MessageInput/index.js +1 -1
  55. package/dist/components/MessageList/Message/ImageMessage/ImageMessage.js +119 -89
  56. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.js +142 -0
  57. package/dist/components/MessageList/Message/ImageMessage/ImagePreview.vue.d.ts +20 -0
  58. package/dist/components/MessageList/Message/Message.vue.d.ts +8 -0
  59. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  60. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.js +69 -58
  61. package/dist/components/MessageList/Message/MessageLayout/MessageLayout.vue.d.ts +8 -0
  62. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
  63. package/dist/components/MessageList/Message/index.js +8 -4
  64. package/dist/components/MessageList/MessageList.js +109 -91
  65. package/dist/components/MessageList/MessageList.vue.d.ts +1 -1
  66. package/dist/components/MessageList/index.d.ts +21 -3
  67. package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
  68. package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
  69. package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
  70. package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
  71. package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
  72. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.js +6 -6
  73. package/dist/components/Search/SearchResults/SearchResultsItem/Message/Message.vue.d.ts +1 -1
  74. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
  75. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
  76. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
  77. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
  78. package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
  79. package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
  80. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
  81. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
  82. package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
  83. package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
  84. package/dist/components/VideoSettingPanel/index.js +1 -1
  85. package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
  86. package/dist/index-CTthrJb2.js +1461 -0
  87. package/dist/index-DXC5bPY4.js +2174 -0
  88. package/dist/{index-Do-2CngU.js → index-DuAffztD.js} +115 -142
  89. package/dist/{index-7vNB_Vx8.js → index-hHVD-MG2.js} +1 -1
  90. package/dist/index.d.ts +1 -1
  91. package/dist/index.js +150 -149
  92. package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
  93. package/dist/states/LoginState.js +43 -43
  94. package/dist/states/MessageActionState/MessageActionState.js +83 -223
  95. package/dist/states/MessageInputState/MessageInputState.js +111 -82
  96. package/dist/states/MessageInputState/type.d.ts +36 -10
  97. package/dist/states/MessageInputState/utils.d.ts +1 -5
  98. package/dist/states/MessageListState/MessageListState.d.ts +1 -1
  99. package/dist/states/MessageListState/MessageListState.js +26 -23
  100. package/dist/states/RoomParticipantState/index.js +83 -24
  101. package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
  102. package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
  103. package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
  104. package/dist/states/RoomParticipantState/participantManager.js +159 -127
  105. package/dist/states/RoomState/callManager.d.ts +3 -3
  106. package/dist/states/RoomState/callManager.js +20 -20
  107. package/dist/states/RoomState/common.d.ts +3 -2
  108. package/dist/states/RoomState/common.js +34 -24
  109. package/dist/states/RoomState/roomManager.d.ts +0 -1
  110. package/dist/states/RoomState/roomManager.js +21 -27
  111. package/dist/states/RoomState/scheduleManager.js +2 -2
  112. package/dist/styles/index.css +1 -1
  113. package/dist/{chat/index.d.ts → subEntry/chat/chat.d.ts} +2160 -2087
  114. package/dist/subEntry/chat/chat.js +89 -0
  115. package/dist/subEntry/chat/index.d.ts +11 -0
  116. package/dist/subEntry/chat/index.js +81 -0
  117. package/dist/{chat → subEntry/chat}/server.js +4 -4
  118. package/dist/subEntry/live/index.js +46 -45
  119. package/dist/subEntry/room/index.js +39 -38
  120. package/dist/types/beauty.d.ts +20 -0
  121. package/dist/types/index.js +37 -36
  122. package/dist/types/participant.d.ts +2 -0
  123. package/dist/types/room.d.ts +45 -1
  124. package/dist/types/room.js +4 -3
  125. package/dist/{useId-CtirfF0W.js → useId-B1VwPJLm.js} +1 -1
  126. package/dist/utils/call.js +77 -71
  127. package/dist/{utils-DaB7eSu5.js → utils-BU8IkP_V.js} +1 -1
  128. package/package.json +8 -7
  129. package/src/components/AudioSettingPanel/index.vue +4 -5
  130. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
  131. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
  132. package/src/components/ConversationList/ConversationList.vue +0 -1
  133. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +10 -2
  134. package/src/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.vue +32 -1
  135. package/src/components/ConversationList/ConversationPreview/ConversationPreviewTitle.vue +3 -2
  136. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
  137. package/src/components/ConversationList/ConversationPreview/utils.ts +98 -28
  138. package/src/components/ConversationList/i18n/en-US.ts +11 -1
  139. package/src/components/ConversationList/i18n/zh-CN.ts +11 -1
  140. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  141. package/src/components/MessageInput/QuotedMessagePreview/QuotedMessagePreview.vue +19 -22
  142. package/src/components/MessageInput/TextEditor/Editor.scss +25 -0
  143. package/src/components/MessageInput/TextEditor/EditorCore.ts +79 -99
  144. package/src/components/MessageInput/TextEditor/TextEditor.vue +64 -68
  145. package/src/components/MessageInput/TextEditor/extensions/MentionSuggestion.vue +449 -0
  146. package/src/components/MessageInput/TextEditor/extensions/emojiExtension.ts +22 -0
  147. package/src/components/MessageInput/TextEditor/extensions/enterKeyExtension.ts +22 -0
  148. package/src/components/MessageInput/TextEditor/extensions/index.ts +8 -0
  149. package/src/components/MessageInput/TextEditor/extensions/mentionExtension.ts +87 -0
  150. package/src/components/MessageInput/i18n/en-US.ts +3 -0
  151. package/src/components/MessageInput/i18n/zh-CN.ts +3 -0
  152. package/src/components/MessageList/Message/ImageMessage/ImageMessage.vue +49 -0
  153. package/src/components/MessageList/Message/ImageMessage/ImagePreview.vue +344 -0
  154. package/src/components/MessageList/Message/Message.vue +6 -0
  155. package/src/components/MessageList/Message/MessageLayout/MessageLayout.vue +8 -1
  156. package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
  157. package/src/components/MessageList/MessageList.vue +50 -14
  158. package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
  159. package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
  160. package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
  161. package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
  162. package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
  163. package/src/components/Search/SearchResults/SearchResultsItem/Message/Message.vue +30 -31
  164. package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
  165. package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
  166. package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
  167. package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
  168. package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
  169. package/src/components/VideoSettingPanel/index.vue +1 -0
  170. package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
  171. package/src/index.ts +1 -1
  172. package/src/{chat/index.ts → subEntry/chat/chat.ts} +25 -18
  173. package/src/subEntry/chat/index.ts +13 -0
  174. package/src/{chat → subEntry/chat}/server.ts +3 -3
  175. package/src/types/beauty.ts +20 -0
  176. package/src/types/participant.ts +3 -0
  177. package/src/types/room.ts +49 -1
  178. package/src/utils/call.ts +8 -0
  179. package/dist/chat/index.js +0 -59
  180. package/dist/index-ZILx4LYk.js +0 -4826
  181. package/dist/states/SearchState.d.ts +0 -314
  182. /package/dist/{chat → subEntry/chat}/server.d.ts +0 -0
@@ -1,17 +1,22 @@
1
- import { defineComponent as j, useSlots as q, provide as J, ref as m, computed as R, watch as A, nextTick as w, onMounted as K, onUnmounted as Q, createElementBlock as C, openBlock as u, createElementVNode as S, createVNode as N, createBlock as k, createCommentVNode as Y, unref as i, withCtx as V, Fragment as F, renderList as $, normalizeClass as x, resolveDynamicComponent as O } from "vue";
2
- import { c as I } from "../../index-DPczIrgX.js";
3
- import Z from "../../baseComp/ObserverView/ObserverView.js";
4
- import { View as ee } from "../../baseComp/View/index.js";
5
- import { useScroll as te } from "../../hooks/useScroll.js";
6
- import { throttle as se } from "../../utils/lodash.js";
7
- import { Message as oe } from "./Message/index.js";
8
- import le from "./MessageForward/MessageForward.js";
9
- import { MessageListContextSymbol as ae } from "./MessageListContext.js";
10
- import ie from "./MessageTimeDivider/MessageTimeDivider.js";
11
- import re from "./ScrollToBottom/ScrollToBottom.js";
12
- import { useMessageListState as ne } from "../../states/MessageListState/MessageListState.js";
13
- import { _ as ue } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
14
- const ce = { class: "message-list" }, me = { class: "message-chunk" }, y = 150, ge = /* @__PURE__ */ j({
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(B) {
26
- const a = B, z = q();
27
- J(ae, { slots: z });
28
- const v = m(!1), f = m(0), d = m(!1), t = m(null), h = m(!1), D = m(0), {
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: G,
31
- activeConversationID: U,
32
- isDisableScroll: P,
33
- setIsDisableScroll: p,
34
- setEnableReadReceipt: W
35
- } = ne(), { scrollToBottom: _ } = te(), M = R(() => a.messageAggregationTime && a.messageAggregationTime > 0), L = R(() => {
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 l = a.filter ? g.value.filter(a.filter) : g.value.filter((e) => !e.isDeleted);
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 l.map((e) => ({
55
+ return s.map((e) => ({
41
56
  timestamp: e.time,
42
57
  messages: [e],
43
58
  key: `chunk-${e.ID}`
44
59
  }));
45
- const s = [], o = a.messageAggregationTime;
46
- return l.forEach((e, n, r) => {
47
- const E = e.time, T = s.length > 0 ? s[s.length - 1] : void 0, c = n > 0 ? r[n - 1] : void 0;
48
- !T || E - T.timestamp > o || T.messages[0].from !== e.from || e.isRevoked || c && c.isRevoked || e.status === "fail" || c && c.status === "fail" || e.hasRiskContent || c && c.hasRiskContent ? s.push({
49
- timestamp: E,
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
- }) : T.messages.push(e);
53
- }), s;
54
- }), H = se(() => {
55
- t.value && (f.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, f.value > y && (p(!0), h.value = !0), f.value < y && (p(!1), h.value = !1));
56
- }, 100), b = async () => {
57
- v.value = !1, p(!1), h.value = !1;
58
- }, X = async () => {
59
- var l;
60
- if (!(!v.value || d.value || !((l = g.value) != null && l.length))) {
61
- if (p(!0), d.value = !0, !t.value) {
62
- d.value = !1;
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 (D.value = t.value.scrollHeight - t.value.scrollTop - t.value.clientHeight, await G(), await w(), t.value) {
66
- const s = t.value.scrollHeight - t.value.clientHeight - D.value;
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
- s
84
+ o
70
85
  ));
71
86
  }
72
- d.value = !1;
87
+ p.value = !1;
73
88
  }
74
89
  };
75
- return A(U, () => {
76
- b();
77
- }), A(g, (l, s) => {
78
- if (s === void 0 && l && !v.value) {
79
- w(() => {
80
- _({ behavior: "instant" }), v.value = !0;
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 (!s || !l || !l.length)
99
+ if (!o || !s || !s.length)
85
100
  return;
86
- const o = l[l.length - 1], e = s[s.length - 1];
87
- (o == null ? void 0 : o.ID) !== (e == null ? void 0 : e.ID) && (o.flow === "out" || !P.value && f.value < y) && _({ behavior: "smooth" });
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, (l) => {
91
- W(l);
107
+ }), A(() => a.enableReadReceipt, (s) => {
108
+ q(s);
92
109
  }, {
93
110
  immediate: !0
94
- }), K(() => {
95
- t.value && t.value.addEventListener("scroll", H), b();
96
- }), Q(() => {
97
- t.value && t.value.removeEventListener("scroll", H);
98
- }), (l, s) => (u(), C("div", ce, [
99
- S("div", {
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(i(Z), {
122
+ N(n(ie), {
106
123
  root: "#messageScrollList",
107
124
  rootMargin: "50px 0px 0px 0px",
108
125
  threshold: 0.1,
109
- onOnShow: X
126
+ onOnShow: Y
110
127
  }, {
111
- default: V(() => [...s[1] || (s[1] = [
112
- S("div", { id: "loadMore" }, null, -1)
128
+ default: O(() => [...o[1] || (o[1] = [
129
+ b("div", { id: "loadMore" }, null, -1)
113
130
  ])]),
114
131
  _: 1
115
132
  }),
116
- (u(!0), C(F, null, $(L.value, (o, e) => (u(), k(i(ee), {
117
- key: o.key,
118
- class: x(i(I)("message-chunk--container"))
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: V(() => [
121
- (u(), k(O(a.MessageTimeDivider || i(ie)), {
122
- previousMessage: e > 0 ? L.value[e - 1].messages[0] : void 0,
123
- currentMessage: o.messages[0]
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
- S("div", me, [
126
- (u(!0), C(F, null, $(o.messages, (n, r) => (u(), k(O(a.Message || i(oe)), {
127
- key: n.ID,
128
- message: n,
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: !!(M.value && r !== o.messages.length - 1),
148
+ isAggregated: !!(m.value && r !== 0),
132
149
  "is-first-in-chunk": r === 0,
133
- "is-last-in-chunk": r === o.messages.length - 1,
134
- isHiddenMessageAvatar: !!(B.alignment === "two-sided" ? M.value && r !== o.messages.length - 1 || n.flow === "out" : M.value && r !== o.messages.length - 1),
135
- isHiddenMessageMeta: !!(M.value && r !== o.messages.length - 1)
136
- }, null, 8, ["message", "alignment", "messageActionList", "isAggregated", "is-first-in-chunk", "is-last-in-chunk", "isHiddenMessageAvatar", "isHiddenMessageMeta"]))), 128))
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(i(le)),
143
- h.value ? (u(), k(i(re), {
160
+ N(n(ge)),
161
+ h.value ? (c(), T(n(pe), {
144
162
  key: 0,
145
- class: x(i(I)("scroll-to-bottom")),
146
- onClick: s[0] || (s[0] = (o) => i(_)({ behavior: "smooth" }))
147
- }, null, 8, ["class"])) : Y("", !0)
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
- }), De = /* @__PURE__ */ ue(ge, [["__scopeId", "data-v-ac83869e"]]);
168
+ }), xe = /* @__PURE__ */ Te(ye, [["__scopeId", "data-v-07d705f7"]]);
151
169
  export {
152
- De as default
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 { IMessageModel as MessageModel } from '@tencentcloud/chat-uikit-engine';
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('@tencentcloud/chat-uikit-engine').IMessageModel) => boolean>;
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('@tencentcloud/chat-uikit-engine').IMessageModel) => boolean>;
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('@tencentcloud/chat-uikit-engine').IMessageModel) => boolean;
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 b, createElementBlock as d, openBlock as c, toDisplayString as t, unref as n, createElementVNode as o, createCommentVNode as v, createTextVNode as r, createVNode as m, normalizeClass as w } from "vue";
2
- import { useUIKit as R, IconCopy as I, IconLoadingSchedule as C, TUIToast as g } from "@tencentcloud/uikit-base-component-vue3";
3
- import { copyText as T } from "./utils.js";
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__ */ b({
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 } = R(), f = (l) => {
29
- if (!l)
28
+ const { t: s } = C(), f = (c) => {
29
+ if (!c)
30
30
  return "--";
31
- const i = new Date(l * 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");
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 = (l) => {
34
- switch (l) {
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 (l) => {
43
- await T(l) ? g.success({ message: s("Copy Success") }) : g.error({ message: s("Copy Failed") });
42
+ }, h = async (c) => {
43
+ await b(c) ? g.success({ message: s("Copy Success") }) : g.error({ message: s("Copy Failed") });
44
44
  };
45
- return (l, i) => (c(), d("div", D, [
46
- e.roomInfo ? (c(), d("div", $, [
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 ? (c(), d("div", z, [
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 ? (c(), d("span", {
81
+ e.roomInfo.roomStatus ? (l(), d("span", {
82
82
  key: 0,
83
- class: w(["status-badge", e.roomInfo.roomStatus === n(u).Running && "running"])
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 ? (c(), d("div", W, [
95
- m(n(C), {
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 ? (c(), d("div", {
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)) : (c(), d("div", Z, t(n(s)("No scheduled members")), 1))
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
- ])) : (c(), d("div", x, t(n(s)("No room information")), 1))
107
+ ])) : (l(), d("div", x, t(n(s)("No room information")), 1))
108
108
  ]));
109
109
  }
110
- }), ne = /* @__PURE__ */ A(p, [["__scopeId", "data-v-b6bcef44"]]);
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-4cd10f6f"]]);
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 b } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
5
- const D = { class: "room-share" }, B = {
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", D, [
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__ */ b(X, [["__scopeId", "data-v-0ae4ba21"]]);
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-05ebded9"]]);
382
+ }), Ut = /* @__PURE__ */ we(at, [["__scopeId", "data-v-9cd542ad"]]);
383
383
  export {
384
384
  Ut as default
385
385
  };
@@ -339,7 +339,7 @@ const Ae = {
339
339
  ], 544);
340
340
  };
341
341
  }
342
- }), ro = /* @__PURE__ */ Le(Pe, [["__scopeId", "data-v-39e98448"]]);
342
+ }), ro = /* @__PURE__ */ Le(Pe, [["__scopeId", "data-v-10df17f8"]]);
343
343
  export {
344
344
  ro as default
345
345
  };
@@ -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 { SearchType as F } from "../../../../../types/engine.js";
4
- import N from "../../../../Avatar/Avatar.js";
5
- import { useUIKit as O } from "@tencentcloud/uikit-base-component-vue3";
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 } = O(), { 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", {
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, F.CHAT_MESSAGE);
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(_(N), {
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, };