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