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
@@ -13,8 +13,13 @@ import type { Component } from 'vue';
13
13
  import cs from 'classnames';
14
14
  import { ObserverView } from '../../baseComp/ObserverView';
15
15
  import { View } from '../../baseComp/View';
16
+ import { useReadReceipt } from '../../hooks/useReadReceipt/useReadReceipt';
16
17
  import { useScroll } from '../../hooks/useScroll';
18
+ import { useConversationListState } from '../../states/ConversationListState';
19
+ import { useGroupSettingState } from '../../states/GroupSettingState';
17
20
  import { useMessageListState } from '../../states/MessageListState';
21
+ import { ConversationType, MessageType } from '../../types/engine';
22
+ import { isCallMessage } from '../../utils/call';
18
23
  import { throttle } from '../../utils/lodash';
19
24
  import { Message as DefaultMessage } from './Message';
20
25
  import { MessageForward } from './MessageForward';
@@ -22,7 +27,7 @@ import { MessageListContextSymbol } from './MessageListContext';
22
27
  import { MessageTimeDivider as DefaultMessageTimeDivider } from './MessageTimeDivider';
23
28
  import { ScrollToBottom } from './ScrollToBottom';
24
29
  import type { MessageAction } from '../../hooks/useMessageActions';
25
- import type { IMessageModel as MessageModel } from '@tencentcloud/chat-uikit-engine';
30
+ import type { MessageModel } from '../../types/engine';
26
31
 
27
32
  // Define message chunk interface
28
33
  interface MessageChunk {
@@ -80,8 +85,20 @@ const {
80
85
  setEnableReadReceipt,
81
86
  } = useMessageListState();
82
87
 
88
+ const { getGroupMemberList } = useGroupSettingState();
89
+
83
90
  const { scrollToBottom } = useScroll();
91
+ const { activeConversation } = useConversationListState();
92
+ const {
93
+ observeMessageList,
94
+ resetProcessedMessages,
95
+ } = useReadReceipt({
96
+ enabled: props.enableReadReceipt ?? false,
97
+ containerSelector: '#messageScrollList',
98
+ getMessageIDFromDom: (dom: HTMLElement) => dom.dataset.messageId || '',
99
+ });
84
100
 
101
+ const isGroup = computed(() => activeConversation.value?.type === ConversationType.GROUP);
85
102
  const enableMessageAggregation = computed(() => props.messageAggregationTime && props.messageAggregationTime > 0);
86
103
 
87
104
  // Message aggregation logic
@@ -110,18 +127,21 @@ const messageChunks = computed(() => {
110
127
 
111
128
  filteredMessageList.forEach((message, index, messages) => {
112
129
  const messageTime = message.time;
113
- const lastChunk = chunks.length > 0 ? chunks[chunks.length - 1] : undefined;
114
- const lastMessage = index > 0 ? messages[index - 1] : undefined;
130
+ const prevChunk = chunks.length > 0 ? chunks[chunks.length - 1] : undefined;
131
+ const prevMessage = index > 0 ? messages[index - 1] : undefined;
115
132
 
116
- const shouldCreateNewChunk = !lastChunk
117
- || messageTime - lastChunk.timestamp > MAX_TIME_BETWEEN_MESSAGE_GROUP
118
- || lastChunk.messages[0].from !== message.from
133
+ const shouldCreateNewChunk = !prevChunk
134
+ || messageTime - prevChunk.timestamp > MAX_TIME_BETWEEN_MESSAGE_GROUP
135
+ || prevChunk.messages[0].from !== message.from
119
136
  || message.isRevoked
120
- || (lastMessage && lastMessage.isRevoked)
137
+ || (prevMessage && prevMessage.isRevoked)
121
138
  || message.status === 'fail'
122
- || (lastMessage && lastMessage.status === 'fail')
139
+ || (prevMessage && prevMessage.status === 'fail')
123
140
  || message.hasRiskContent
124
- || (lastMessage && lastMessage.hasRiskContent);
141
+ || (prevMessage && prevMessage.hasRiskContent)
142
+ || isCallMessage(message)
143
+ || (prevMessage && isCallMessage(prevMessage))
144
+ || (prevMessage && prevMessage.type === MessageType.CUSTOM && prevMessage.getMessageContent().businessID === 'group_create');
125
145
 
126
146
  if (shouldCreateNewChunk) {
127
147
  chunks.push({
@@ -130,7 +150,7 @@ const messageChunks = computed(() => {
130
150
  key: `chunk-${message.ID}`,
131
151
  });
132
152
  } else {
133
- lastChunk.messages.push(message);
153
+ prevChunk.messages.push(message);
134
154
  }
135
155
  });
136
156
 
@@ -165,6 +185,7 @@ const initializeMessageList = async () => {
165
185
  isFinishFirstRender.value = false;
166
186
  setIsDisableScroll(false);
167
187
  isScrollToBottomVisible.value = false;
188
+ resetProcessedMessages();
168
189
  };
169
190
 
170
191
  // Load more history messages
@@ -221,7 +242,11 @@ watch(messageList, (newMessages, oldMessages) => {
221
242
  nextTick(() => {
222
243
  scrollToBottom({ behavior: 'instant' });
223
244
  isFinishFirstRender.value = true;
245
+ observeMessageList();
224
246
  });
247
+ if (isGroup.value) {
248
+ getGroupMemberList();
249
+ }
225
250
  return;
226
251
  }
227
252
 
@@ -233,6 +258,9 @@ watch(messageList, (newMessages, oldMessages) => {
233
258
  const oldLastMessage = oldMessages[oldMessages.length - 1];
234
259
 
235
260
  if (newLastMessage?.ID !== oldLastMessage?.ID) {
261
+ nextTick(() => {
262
+ observeMessageList();
263
+ });
236
264
  // new message coming
237
265
  const shouldAutoScroll = newLastMessage.flow === 'out'
238
266
  || (!isDisableScroll.value && distanceToBottom.value < autoScrollThreshold);
@@ -306,14 +334,22 @@ onUnmounted(() => {
306
334
  :message="message"
307
335
  :alignment="props.alignment"
308
336
  :messageActionList="props.messageActionList"
309
- :isAggregated="Boolean(enableMessageAggregation && messageIndex !== chunk.messages.length - 1)"
337
+ :isAggregated="Boolean(enableMessageAggregation && messageIndex !== 0)"
310
338
  :is-first-in-chunk="Boolean(messageIndex === 0)"
311
339
  :is-last-in-chunk="Boolean(messageIndex === chunk.messages.length - 1)"
312
340
  :isHiddenMessageAvatar="
313
341
  Boolean(
314
342
  alignment === 'two-sided'
315
- ? (enableMessageAggregation && messageIndex !== chunk.messages.length - 1 || message.flow === 'out')
316
- : (enableMessageAggregation && messageIndex !== chunk.messages.length - 1 )
343
+ ? (enableMessageAggregation && messageIndex !== 0 || message.flow === 'out')
344
+ : (enableMessageAggregation && messageIndex !== 0 )
345
+ )
346
+ "
347
+ :is-hidden-message-nick="
348
+ Boolean(
349
+ !isGroup
350
+ || (alignment === 'two-sided'
351
+ ? enableMessageAggregation && messageIndex !== 0 || message.flow === 'out'
352
+ : enableMessageAggregation && messageIndex !== 0)
317
353
  )
318
354
  "
319
355
  :isHiddenMessageMeta="
@@ -354,7 +390,7 @@ onUnmounted(() => {
354
390
  @include scrollbar.scrollbar-hidden();
355
391
  }
356
392
  .message-chunk--container {
357
- margin-top: 10px;
393
+ margin-top: 25px;
358
394
  }
359
395
  .message-chunk {
360
396
  display: flex;
@@ -136,6 +136,7 @@ const copy = async (value: string) => {
136
136
  .room-detail {
137
137
  padding: 20px 0;
138
138
  user-select: text;
139
+ text-align: initial;
139
140
 
140
141
  .room-detail-empty {
141
142
  text-align: center;
@@ -340,7 +340,8 @@ const handleSave = () => {
340
340
 
341
341
  <style lang="scss" scoped>
342
342
  .room-edit {
343
- width: 100%;
343
+ width: 100%;
344
+ text-align: initial;
344
345
 
345
346
  .edit-form {
346
347
  .form-item {
@@ -140,6 +140,7 @@ const copyRoomInfoAndLink = async () => {
140
140
  .room-share {
141
141
  min-width: 400px;
142
142
  user-select: text;
143
+ text-align: initial;
143
144
 
144
145
  .room-share-empty {
145
146
  text-align: center;
@@ -461,6 +461,7 @@ watch(() => props.visible, (visible) => {
461
461
  width: 100%;
462
462
  max-width: 600px;
463
463
  height: 100%;
464
+ text-align: initial;
464
465
  }
465
466
 
466
467
  .panel-content {
@@ -432,6 +432,7 @@ watch(() => loginUserInfo.value?.userId, (userId) => {
432
432
  height: 100%;
433
433
  overflow-y: auto;
434
434
  position: relative;
435
+ text-align: initial;
435
436
  }
436
437
 
437
438
  .loading-overlay {
@@ -6,7 +6,7 @@
6
6
  </div>
7
7
  <div :class="$style.SearchMessage__content">
8
8
  <div :class="$style.SearchMessage__header">
9
- <span :class="$style.SearchMessage__name" v-html="highlightedName"> </span>
9
+ <span :class="$style.SearchMessage__name" v-html="highlightedName" />
10
10
  <span v-if="time" :class="$style.SearchMessage__time">
11
11
  {{ formatTime(time) }}
12
12
  </span>
@@ -24,19 +24,18 @@
24
24
  </template>
25
25
 
26
26
  <script lang="ts" setup>
27
- import { computed, h, defineProps, useCssModule } from 'vue';
27
+ import { computed, h, useCssModule } from 'vue';
28
28
  import TUIChatEngine from '@tencentcloud/chat-uikit-engine';
29
+ import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
29
30
  import { SearchType } from '../../../../../types/engine';
30
- import type { ResultItemProps, MessageModel } from '../../../../../types';
31
31
  import { Avatar } from '../../../../Avatar';
32
- import { useUIKit } from '@tencentcloud/uikit-base-component-vue3';
33
32
  import { highlightText } from '../utils';
33
+ import type { MessageModel } from '../../../../../types/engine';
34
+ import type { ResultItemProps } from '../../../../../types/search';
34
35
 
35
36
  const $style = useCssModule();
36
37
 
37
- const formatTime = (timestamp: number): string => {
38
- return new Date(timestamp * 1000).toLocaleString();
39
- };
38
+ const formatTime = (timestamp: number): string => new Date(timestamp * 1000).toLocaleString();
40
39
 
41
40
  const props = defineProps<ResultItemProps<SearchType.CHAT_MESSAGE>>();
42
41
 
@@ -49,7 +48,7 @@ const highlightedName = computed(() => {
49
48
  if (!props.keyword) {
50
49
  return name.value;
51
50
  }
52
- return highlightText(name.value, props.keyword, $style['SearchMessage__highlight']);
51
+ return highlightText(name.value, props.keyword, $style.SearchMessage__highlight);
53
52
  });
54
53
 
55
54
  const renderTextContent = (messageContent: any, keyword: string) => {
@@ -59,16 +58,16 @@ const renderTextContent = (messageContent: any, keyword: string) => {
59
58
  if (item.name === 'text') {
60
59
  return h('span', {
61
60
  key: idx,
62
- innerHTML: highlightText(item.text, keyword, $style['SearchMessage__highlight']),
61
+ innerHTML: highlightText(item.text, keyword, $style.SearchMessage__highlight),
63
62
  });
64
63
  }
65
64
  if (item.name === 'img') {
66
65
  return h('img', {
67
- key: idx,
68
- src: item.src,
69
- alt: item.emojiKey || '',
70
- class: $style['SearchMessage__emoji-img'],
71
- draggable: false,
66
+ 'key': idx,
67
+ 'src': item.src,
68
+ 'alt': item.emojiKey || '',
69
+ 'class': $style['SearchMessage__emoji-img'],
70
+ 'draggable': false,
72
71
  'data-emoji-key': item.emojiKey || '',
73
72
  });
74
73
  }
@@ -77,7 +76,7 @@ const renderTextContent = (messageContent: any, keyword: string) => {
77
76
  .filter(Boolean);
78
77
  }
79
78
  return h('span', {
80
- innerHTML: highlightText(messageContent.text, keyword, $style['SearchMessage__highlight']),
79
+ innerHTML: highlightText(messageContent.text, keyword, $style.SearchMessage__highlight),
81
80
  });
82
81
  };
83
82
 
@@ -90,9 +89,9 @@ const renderMessageContent = (message: MessageModel, searchKeyword: string) => {
90
89
  return h(
91
90
  'div',
92
91
  {
93
- class: $style['SearchMessage__text'],
92
+ class: $style.SearchMessage__text,
94
93
  },
95
- renderTextContent(messageContent, searchKeyword)
94
+ renderTextContent(messageContent, searchKeyword),
96
95
  );
97
96
 
98
97
  case TUIChatEngine.TYPES.MSG_IMAGE:
@@ -138,11 +137,11 @@ const renderMessageContent = (message: MessageModel, searchKeyword: string) => {
138
137
  points: '9,7 18,12 9,17',
139
138
  fill: '#2B5DF5',
140
139
  }),
141
- ]
140
+ ],
142
141
  ),
143
- ]
142
+ ],
144
143
  ),
145
- ]
144
+ ],
146
145
  );
147
146
 
148
147
  case TUIChatEngine.TYPES.MSG_FILE:
@@ -155,18 +154,18 @@ const renderMessageContent = (message: MessageModel, searchKeyword: string) => {
155
154
  h(
156
155
  'span',
157
156
  {
158
- class: $style['SearchMessage__text'],
157
+ class: $style.SearchMessage__text,
159
158
  },
160
- messageContent.name
159
+ messageContent.name,
161
160
  ),
162
161
  h(
163
162
  'span',
164
163
  {
165
- class: $style['SearchMessage__text'],
164
+ class: $style.SearchMessage__text,
166
165
  },
167
- messageContent.size
166
+ messageContent.size,
168
167
  ),
169
- ]
168
+ ],
170
169
  );
171
170
 
172
171
  case TUIChatEngine.TYPES.MSG_AUDIO:
@@ -217,12 +216,12 @@ const renderMessageContent = (message: MessageModel, searchKeyword: string) => {
217
216
  fill: '#2B5DF5',
218
217
  fillOpacity: '0.4',
219
218
  }),
220
- ]
219
+ ],
221
220
  ),
222
- ]
221
+ ],
223
222
  ),
224
223
  h('span', `${messageContent.second}s`),
225
- ]
224
+ ],
226
225
  );
227
226
 
228
227
  case TUIChatEngine.TYPES.MSG_LOCATION:
@@ -230,7 +229,7 @@ const renderMessageContent = (message: MessageModel, searchKeyword: string) => {
230
229
  return h(
231
230
  'span',
232
231
  {
233
- class: $style['SearchMessage__text'],
232
+ class: $style.SearchMessage__text,
234
233
  },
235
234
  [
236
235
  messageContent.text,
@@ -241,9 +240,9 @@ const renderMessageContent = (message: MessageModel, searchKeyword: string) => {
241
240
  target: '_blank',
242
241
  rel: 'noopener noreferrer',
243
242
  },
244
- `${t('Search.action.readMore')}>>>`
243
+ `${t('Search.action.readMore')}>>>`,
245
244
  ),
246
- ]
245
+ ],
247
246
  );
248
247
  }
249
248
  return h('span', t('Search.messageType.custom'));
@@ -0,0 +1,205 @@
1
+ import { i18next } from '@tencentcloud/uikit-base-component-vue3';
2
+ import { UIKitModal } from '../UIKitModal';
3
+
4
+ enum ChatErrorModalId {
5
+ // Login related errors (30000-30009)
6
+ LOGIN_INVALID_SDK_APP_ID = 30000,
7
+ LOGIN_INVALID_USER_ID = 30001,
8
+ LOGIN_INVALID_SECRET_KEY = 30004,
9
+ LOGIN_INVALID_USER_SIG = 30005,
10
+ LOGIN_USER_SIG_EXPIRED = 30006,
11
+ LOGIN_USER_SIG_INVALID = 30042,
12
+ LOGIN_USER_ID_NOT_MATCH_USER_SIG = 30007,
13
+ LOGIN_SDK_APP_ID_NOT_MATCH_USER_SIG = 30008,
14
+ LOGIN_SDK_APP_ID_NOT_FOUND = 30041,
15
+
16
+ // Package/Feature not enabled errors (30002, 30014-30019)
17
+ PACKAGE_NOT_PURCHASED = 30002,
18
+ PACKAGE_GROUP_READ_RECEIPT_NOT_ENABLED = 30014,
19
+ PACKAGE_ONLINE_USER_LIST_NOT_ENABLED = 30015,
20
+ PACKAGE_CLOUD_SEARCH_NOT_ENABLED = 30016,
21
+ PACKAGE_TEXT_TRANSLATION_NOT_ENABLED = 30018,
22
+ PACKAGE_SPEECH_TO_TEXT_NOT_ENABLED = 30019,
23
+
24
+ // Call related errors (30010)
25
+ CALL_KIT_NOT_INTEGRATED = 30010,
26
+
27
+ // Search related errors (30017)
28
+ SEARCH_CLOUD_RATE_LIMIT = 30017,
29
+
30
+ // Message sending errors (30020-30031)
31
+ MESSAGE_VOICE_SIZE_EXCEEDED = 30020,
32
+ MESSAGE_IMAGE_INVALID_FORMAT = 30021,
33
+ MESSAGE_IMAGE_SIZE_EXCEEDED = 30022,
34
+ MESSAGE_IMAGE_SENSITIVE_CONTENT = 30023,
35
+ MESSAGE_VIDEO_INVALID_FORMAT = 30024,
36
+ MESSAGE_VIDEO_SIZE_EXCEEDED = 30025,
37
+ MESSAGE_FILE_NOT_EXIST = 30026,
38
+ MESSAGE_FILE_SIZE_EXCEEDED = 30027,
39
+ MESSAGE_FILE_SENDING_BANNED = 30028,
40
+ MESSAGE_TEXT_SENSITIVE_CONTENT = 30029,
41
+ MESSAGE_LENGTH_EXCEEDED = 30030,
42
+ MESSAGE_LOCAL_AUDIT_BLOCKED = 30031,
43
+ MESSAGE_RECALL_TIME_EXCEEDED = 30039,
44
+
45
+ // Reaction related errors (30033)
46
+ REACTION_EMOJI_LIMIT_REACHED = 30033,
47
+
48
+ // Profile related errors (30034)
49
+ PROFILE_REMARK_LENGTH_EXCEEDED = 30034,
50
+
51
+ // Group related errors (30035-30036, 30040)
52
+ GROUP_ANNOUNCEMENT_LENGTH_EXCEEDED = 30035,
53
+ GROUP_NAME_INVALID = 30036,
54
+ GROUP_ID_ALREADY_USED = 30040,
55
+ }
56
+
57
+ interface ModalConfig {
58
+ i18nKey: string;
59
+ }
60
+
61
+ const MODAL_CONFIG_MAP: Record<number, ModalConfig> = {
62
+ // Login
63
+ [ChatErrorModalId.LOGIN_INVALID_SDK_APP_ID]: { i18nKey: 'login_invalid_sdk_app_id' },
64
+ [ChatErrorModalId.LOGIN_INVALID_USER_ID]: { i18nKey: 'login_invalid_user_id' },
65
+ [ChatErrorModalId.LOGIN_INVALID_SECRET_KEY]: { i18nKey: 'login_invalid_secret_key' },
66
+ [ChatErrorModalId.LOGIN_INVALID_USER_SIG]: { i18nKey: 'login_invalid_user_sig' },
67
+ [ChatErrorModalId.LOGIN_USER_SIG_EXPIRED]: { i18nKey: 'login_user_sig_expired' },
68
+ [ChatErrorModalId.LOGIN_USER_SIG_INVALID]: { i18nKey: 'login_user_sig_invalid' },
69
+ [ChatErrorModalId.LOGIN_USER_ID_NOT_MATCH_USER_SIG]: { i18nKey: 'login_user_id_not_match_user_sig' },
70
+ [ChatErrorModalId.LOGIN_SDK_APP_ID_NOT_MATCH_USER_SIG]: { i18nKey: 'login_sdk_app_id_not_match_user_sig' },
71
+ [ChatErrorModalId.LOGIN_SDK_APP_ID_NOT_FOUND]: { i18nKey: 'login_sdk_app_id_not_found' },
72
+
73
+ // Package
74
+ [ChatErrorModalId.PACKAGE_NOT_PURCHASED]: { i18nKey: 'package_not_purchased' },
75
+ [ChatErrorModalId.PACKAGE_GROUP_READ_RECEIPT_NOT_ENABLED]: { i18nKey: 'package_group_read_receipt_not_enabled' },
76
+ [ChatErrorModalId.PACKAGE_ONLINE_USER_LIST_NOT_ENABLED]: { i18nKey: 'package_online_user_list_not_enabled' },
77
+ [ChatErrorModalId.PACKAGE_CLOUD_SEARCH_NOT_ENABLED]: { i18nKey: 'package_cloud_search_not_enabled' },
78
+ [ChatErrorModalId.PACKAGE_TEXT_TRANSLATION_NOT_ENABLED]: { i18nKey: 'package_text_translation_not_enabled' },
79
+ [ChatErrorModalId.PACKAGE_SPEECH_TO_TEXT_NOT_ENABLED]: { i18nKey: 'package_speech_to_text_not_enabled' },
80
+
81
+ // Call
82
+ [ChatErrorModalId.CALL_KIT_NOT_INTEGRATED]: { i18nKey: 'call_kit_not_integrated' },
83
+
84
+ // Search
85
+ [ChatErrorModalId.SEARCH_CLOUD_RATE_LIMIT]: { i18nKey: 'search_cloud_rate_limit' },
86
+
87
+ // Message
88
+ [ChatErrorModalId.MESSAGE_VOICE_SIZE_EXCEEDED]: { i18nKey: 'message_voice_size_exceeded' },
89
+ [ChatErrorModalId.MESSAGE_IMAGE_INVALID_FORMAT]: { i18nKey: 'message_image_invalid_format' },
90
+ [ChatErrorModalId.MESSAGE_IMAGE_SIZE_EXCEEDED]: { i18nKey: 'message_image_size_exceeded' },
91
+ [ChatErrorModalId.MESSAGE_IMAGE_SENSITIVE_CONTENT]: { i18nKey: 'message_image_sensitive_content' },
92
+ [ChatErrorModalId.MESSAGE_VIDEO_INVALID_FORMAT]: { i18nKey: 'message_video_invalid_format' },
93
+ [ChatErrorModalId.MESSAGE_VIDEO_SIZE_EXCEEDED]: { i18nKey: 'message_video_size_exceeded' },
94
+ [ChatErrorModalId.MESSAGE_FILE_NOT_EXIST]: { i18nKey: 'message_file_not_exist' },
95
+ [ChatErrorModalId.MESSAGE_FILE_SIZE_EXCEEDED]: { i18nKey: 'message_file_size_exceeded' },
96
+ [ChatErrorModalId.MESSAGE_FILE_SENDING_BANNED]: { i18nKey: 'message_file_sending_banned' },
97
+ [ChatErrorModalId.MESSAGE_TEXT_SENSITIVE_CONTENT]: { i18nKey: 'message_text_sensitive_content' },
98
+ [ChatErrorModalId.MESSAGE_LENGTH_EXCEEDED]: { i18nKey: 'message_length_exceeded' },
99
+ [ChatErrorModalId.MESSAGE_LOCAL_AUDIT_BLOCKED]: { i18nKey: 'message_local_audit_blocked' },
100
+ [ChatErrorModalId.MESSAGE_RECALL_TIME_EXCEEDED]: { i18nKey: 'message_recall_time_exceeded' },
101
+
102
+ // Reaction
103
+ [ChatErrorModalId.REACTION_EMOJI_LIMIT_REACHED]: { i18nKey: 'reaction_emoji_limit_reached' },
104
+
105
+ // Profile
106
+ [ChatErrorModalId.PROFILE_REMARK_LENGTH_EXCEEDED]: { i18nKey: 'profile_remark_length_exceeded' },
107
+
108
+ // Group
109
+ [ChatErrorModalId.GROUP_ANNOUNCEMENT_LENGTH_EXCEEDED]: { i18nKey: 'group_announcement_length_exceeded' },
110
+ [ChatErrorModalId.GROUP_NAME_INVALID]: { i18nKey: 'group_name_invalid' },
111
+ [ChatErrorModalId.GROUP_ID_ALREADY_USED]: { i18nKey: 'group_id_already_used' },
112
+ };
113
+
114
+ const ERROR_CODE_TO_MODAL_ID: Record<number, ChatErrorModalId> = {
115
+ // Login
116
+ 2000: ChatErrorModalId.LOGIN_INVALID_SDK_APP_ID,
117
+ 2002: ChatErrorModalId.LOGIN_INVALID_USER_ID,
118
+ 2003: ChatErrorModalId.LOGIN_INVALID_USER_SIG,
119
+ 70001: ChatErrorModalId.LOGIN_USER_SIG_EXPIRED,
120
+ 70003: ChatErrorModalId.LOGIN_USER_SIG_INVALID,
121
+ 70013: ChatErrorModalId.LOGIN_USER_ID_NOT_MATCH_USER_SIG,
122
+ 70014: ChatErrorModalId.LOGIN_SDK_APP_ID_NOT_MATCH_USER_SIG,
123
+ 70020: ChatErrorModalId.LOGIN_SDK_APP_ID_NOT_FOUND,
124
+
125
+ // Search
126
+ 60018: ChatErrorModalId.SEARCH_CLOUD_RATE_LIMIT,
127
+
128
+ // Message
129
+ 2301: ChatErrorModalId.MESSAGE_VOICE_SIZE_EXCEEDED,
130
+ 2252: ChatErrorModalId.MESSAGE_IMAGE_INVALID_FORMAT,
131
+ 2253: ChatErrorModalId.MESSAGE_IMAGE_SIZE_EXCEEDED,
132
+ 2352: ChatErrorModalId.MESSAGE_VIDEO_INVALID_FORMAT,
133
+ 2351: ChatErrorModalId.MESSAGE_VIDEO_SIZE_EXCEEDED,
134
+ 2401: ChatErrorModalId.MESSAGE_FILE_NOT_EXIST,
135
+ 2402: ChatErrorModalId.MESSAGE_FILE_SIZE_EXCEEDED,
136
+ 3123: ChatErrorModalId.MESSAGE_LOCAL_AUDIT_BLOCKED,
137
+ 20016: ChatErrorModalId.MESSAGE_RECALL_TIME_EXCEEDED,
138
+ 10031: ChatErrorModalId.MESSAGE_RECALL_TIME_EXCEEDED,
139
+
140
+ // Group
141
+ 10021: ChatErrorModalId.GROUP_ID_ALREADY_USED,
142
+ };
143
+
144
+ /**
145
+ * Show modal by ChatErrorModalId
146
+ * Use this method when you know exactly which modal to show
147
+ * @param modalId - The ChatErrorModalId to show
148
+ * @example
149
+ * // When sending image and got 80004 error
150
+ * showChatErrorModalById(ChatErrorModalId.MESSAGE_IMAGE_SENSITIVE_CONTENT);
151
+ *
152
+ * // When calling cloud search and got 60020 error
153
+ * showChatErrorModalById(ChatErrorModalId.PACKAGE_CLOUD_SEARCH_NOT_ENABLED);
154
+ */
155
+ function showChatErrorModalById(modalId: ChatErrorModalId): void {
156
+ const config = MODAL_CONFIG_MAP[modalId];
157
+ if (config) {
158
+ UIKitModal.openModal({
159
+ id: modalId,
160
+ title: i18next.t('ChatErrorModal.title'),
161
+ content: i18next.t(`ChatErrorModal.${config.i18nKey}`),
162
+ type: 'error',
163
+ });
164
+ }
165
+ }
166
+
167
+ /**
168
+ * Handle SDK error and show modal automatically
169
+ * Only works for errorCodes with unique 1:1 mapping
170
+ * For ambiguous errorCodes, this method will do nothing - use showChatErrorModalById instead
171
+ * @param error - Error object with code property
172
+ * @returns boolean - true if modal was shown, false if errorCode is ambiguous or unknown
173
+ * @example
174
+ * try {
175
+ * await sendMessage();
176
+ * } catch (error) {
177
+ * // Will show modal for unique errorCodes like 2000, 70001, etc.
178
+ * // Will return false for ambiguous codes like -1, 80004, 3122, 60020
179
+ * const handled = handleChatErrorWithModal(error);
180
+ * if (!handled) {
181
+ * // Handle ambiguous error manually based on context
182
+ * showChatErrorModalById(ChatErrorModalId.MESSAGE_IMAGE_SENSITIVE_CONTENT);
183
+ * }
184
+ * }
185
+ */
186
+ function handleChatErrorWithModal(error: { code?: number }): boolean {
187
+ const errorCode = error.code;
188
+ if (errorCode === undefined || errorCode === null) {
189
+ return false;
190
+ }
191
+
192
+ const modalId = ERROR_CODE_TO_MODAL_ID[errorCode];
193
+ if (modalId !== undefined) {
194
+ showChatErrorModalById(modalId);
195
+ return true;
196
+ }
197
+
198
+ return false;
199
+ }
200
+
201
+ export {
202
+ showChatErrorModalById,
203
+ handleChatErrorWithModal,
204
+ ChatErrorModalId,
205
+ };
@@ -0,0 +1,56 @@
1
+ export const resource = {
2
+ ChatErrorModal: {
3
+ title: 'Error',
4
+
5
+ // Login
6
+ 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>.',
7
+ login_invalid_user_id: 'Missing correct userID. The userID format should be a non-empty string.',
8
+ login_invalid_secret_key: 'Missing correct secretKey. You can obtain it via the <a target="_blank" href="https://console.trtc.io/">Chat Console</a>.',
9
+ 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>.',
10
+ 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>.',
11
+ 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>).',
12
+ 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>.',
13
+ 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>.',
14
+ 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>.',
15
+
16
+ // Package
17
+ 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.',
18
+ 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>.',
19
+ 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>.',
20
+ 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>.',
21
+ 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.',
22
+ 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>.',
23
+
24
+ // Call
25
+ 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>.',
26
+
27
+ // Search
28
+ 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.',
29
+
30
+ // Message
31
+ message_voice_size_exceeded: 'The voice size exceeds the limit. The maximum size for uploading a voice message is 20MB.',
32
+ message_image_invalid_format: 'Image message sending failed. Invalid image format. Supported image formats are: jpg, jpeg, gif, png, bmp, image, webp.',
33
+ message_image_size_exceeded: 'The image size exceeds the limit. The maximum size for uploading an image is 20MB.',
34
+ message_image_sensitive_content: 'The image in the message contains sensitive content. Sending failed.',
35
+ message_video_invalid_format: 'Video message sending failed. Invalid video format. Supported video formats are: mp4, quicktime, mov.',
36
+ message_video_size_exceeded: 'The video size exceeds the limit. The maximum size for uploading a video is 100MB.',
37
+ message_file_not_exist: 'The file does not exist. Please check if the file path is correct.',
38
+ message_file_size_exceeded: 'The file size exceeds the limit. The maximum size for uploading a file is 100MB.',
39
+ message_file_sending_banned: 'File message failed. Sending prohibited or banned files is not allowed.',
40
+ message_text_sensitive_content: 'The text in the message or profile contains sensitive content. Sending failed.',
41
+ message_length_exceeded: 'The message length exceeds the limit. The message length should not exceed 12K.',
42
+ message_local_audit_blocked: 'The text contains locally blocked words for review.',
43
+ message_recall_time_exceeded: 'Exceeded the recall time limit. Message recall has exceeded the time limit (default 2 minutes).',
44
+
45
+ // Reaction
46
+ reaction_emoji_limit_reached: 'The maximum number of emoji reactions has been reached.',
47
+
48
+ // Profile
49
+ profile_remark_length_exceeded: 'Failed to modify the remark: the remark length must not exceed 96 bytes.',
50
+
51
+ // Group
52
+ group_announcement_length_exceeded: 'The group announcement word count exceeds the limit. The maximum length is 150.',
53
+ group_name_invalid: 'The group name can only contain Chinese characters, letters, numbers, and underscores, and must be 2-20 characters long.',
54
+ group_id_already_used: 'The group ID is already in use. Please choose another group ID.',
55
+ },
56
+ };
@@ -0,0 +1,4 @@
1
+ import { resource as enResource } from './en-US/index';
2
+ import { resource as zhResource } from './zh-CN/index';
3
+
4
+ export { enResource, zhResource };