@droppii-org/chat-sdk 0.3.8 → 0.4.0

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 (253) hide show
  1. package/dist/components/canned-response/CannedResponseBody.js +1 -1
  2. package/dist/components/canned-response/CannedResponseFooter.js +1 -1
  3. package/dist/components/canned-response/CannedResponseHeader.js +1 -1
  4. package/dist/components/canned-response/index.js +1 -1
  5. package/dist/components/canned-response/team/TeamItem.js +1 -1
  6. package/dist/components/common/ConfirmModal.d.ts.map +1 -1
  7. package/dist/components/common/ConfirmModal.js +1 -1
  8. package/dist/components/common/InfoModal.d.ts.map +1 -1
  9. package/dist/components/common/InfoModal.js +1 -1
  10. package/dist/components/compose/ComposeNewMessageModal.d.ts.map +1 -1
  11. package/dist/components/compose/ComposeNewMessageModal.js +1 -1
  12. package/dist/components/conversation/ConversationByGroupItem.d.ts.map +1 -1
  13. package/dist/components/conversation/ConversationByGroupItem.js +2 -1
  14. package/dist/components/conversation/ConversationBySessionItem.d.ts.map +1 -1
  15. package/dist/components/conversation/ConversationBySessionItem.js +2 -1
  16. package/dist/components/conversation/DeskConversationList.d.ts.map +1 -1
  17. package/dist/components/conversation/DeskConversationList.js +1 -1
  18. package/dist/components/conversation/MentionIndicatorIcon.d.ts +7 -0
  19. package/dist/components/conversation/MentionIndicatorIcon.d.ts.map +1 -0
  20. package/dist/components/conversation/MentionIndicatorIcon.js +17 -0
  21. package/dist/components/conversation/SwipeActionButton.d.ts.map +1 -1
  22. package/dist/components/conversation/SwipeActionButton.js +1 -1
  23. package/dist/components/conversation/SwipeableRow.d.ts.map +1 -1
  24. package/dist/components/conversation/SwipeableRow.js +1 -1
  25. package/dist/components/conversation/ThreadCard.d.ts +2 -1
  26. package/dist/components/conversation/ThreadCard.d.ts.map +1 -1
  27. package/dist/components/conversation/ThreadCard.js +4 -4
  28. package/dist/components/conversation-detail/ConversationDetailHeader.d.ts.map +1 -1
  29. package/dist/components/conversation-detail/ConversationDetailHeader.js +2 -2
  30. package/dist/components/conversation-detail/ConversationDetailInput.d.ts.map +1 -1
  31. package/dist/components/conversation-detail/ConversationDetailInput.js +5 -1
  32. package/dist/components/conversation-detail/ConversationMessageList.d.ts.map +1 -1
  33. package/dist/components/conversation-detail/ConversationMessageList.js +1 -1
  34. package/dist/components/conversation-detail/ConversationMoreOptionItem.d.ts.map +1 -1
  35. package/dist/components/conversation-detail/ConversationMoreOptionItem.js +1 -1
  36. package/dist/components/conversation-detail/ConversationMoreOptionPanel.d.ts.map +1 -1
  37. package/dist/components/conversation-detail/ConversationMoreOptionPanel.js +1 -1
  38. package/dist/components/conversation-detail/PinLimitModal.d.ts.map +1 -1
  39. package/dist/components/conversation-detail/PinLimitModal.js +1 -1
  40. package/dist/components/conversation-detail/PinnedMessageBar.d.ts.map +1 -1
  41. package/dist/components/conversation-detail/PinnedMessageBar.js +8 -4
  42. package/dist/components/conversation-detail/PinnedMessageItem.d.ts.map +1 -1
  43. package/dist/components/conversation-detail/PinnedMessageItem.js +1 -1
  44. package/dist/components/conversation-detail/PinnedMessagesPanel.d.ts.map +1 -1
  45. package/dist/components/conversation-detail/PinnedMessagesPanel.js +1 -1
  46. package/dist/components/conversation-detail/ThreadProfilePanel.d.ts.map +1 -1
  47. package/dist/components/conversation-detail/ThreadProfilePanel.js +1 -1
  48. package/dist/components/conversation-detail/bot/BotButtonMessage.d.ts.map +1 -1
  49. package/dist/components/conversation-detail/bot/BotButtonMessage.js +1 -1
  50. package/dist/components/conversation-detail/bot/BotInactiveNotice.d.ts.map +1 -1
  51. package/dist/components/conversation-detail/bot/BotInactiveNotice.js +1 -1
  52. package/dist/components/conversation-detail/bot/BotMenuSheet.d.ts.map +1 -1
  53. package/dist/components/conversation-detail/bot/BotMenuSheet.js +1 -1
  54. package/dist/components/conversation-detail/bot/BotStartButton.d.ts.map +1 -1
  55. package/dist/components/conversation-detail/bot/BotStartButton.js +1 -1
  56. package/dist/components/conversation-detail/bot/BotSuggest.d.ts.map +1 -1
  57. package/dist/components/conversation-detail/bot/BotSuggest.js +2 -2
  58. package/dist/components/conversation-detail/bot/CsSessionConfirmModal.d.ts.map +1 -1
  59. package/dist/components/conversation-detail/bot/CsSessionConfirmModal.js +1 -1
  60. package/dist/components/conversation-inbox/ConversationInboxHeader.d.ts.map +1 -1
  61. package/dist/components/conversation-inbox/ConversationInboxHeader.js +1 -1
  62. package/dist/components/conversation-inbox/ConversationInboxItem.d.ts.map +1 -1
  63. package/dist/components/conversation-inbox/ConversationInboxItem.js +2 -1
  64. package/dist/components/conversation-inbox/ConversationInboxList.d.ts.map +1 -1
  65. package/dist/components/conversation-inbox/ConversationInboxList.js +1 -1
  66. package/dist/components/conversation-inbox/ConversationInboxTitle.d.ts.map +1 -1
  67. package/dist/components/conversation-inbox/ConversationInboxTitle.js +1 -1
  68. package/dist/components/conversation-inbox/ConversationPeerAvatar.d.ts.map +1 -1
  69. package/dist/components/conversation-inbox/ConversationPeerAvatar.js +1 -1
  70. package/dist/components/conversation-inbox/MuteConversationConfirmModal.d.ts.map +1 -1
  71. package/dist/components/conversation-inbox/MuteConversationConfirmModal.js +1 -1
  72. package/dist/components/group/AddMemberModal.d.ts.map +1 -1
  73. package/dist/components/group/AddMemberModal.js +1 -1
  74. package/dist/components/group/CreateGroupForm.d.ts.map +1 -1
  75. package/dist/components/group/CreateGroupForm.js +1 -3
  76. package/dist/components/group/GroupMemberPicker.js +1 -1
  77. package/dist/components/group/MemberPermissionPanel.js +1 -1
  78. package/dist/components/icon/index.d.ts.map +1 -1
  79. package/dist/components/icon/index.js +1 -1
  80. package/dist/components/media-collection/FileCollection.d.ts.map +1 -1
  81. package/dist/components/media-collection/FileCollection.js +1 -1
  82. package/dist/components/media-collection/ImageCollection.d.ts.map +1 -1
  83. package/dist/components/media-collection/ImageCollection.js +1 -1
  84. package/dist/components/media-collection/LinkCollection.d.ts.map +1 -1
  85. package/dist/components/media-collection/LinkCollection.js +2 -2
  86. package/dist/components/media-collection/VideoCollection.d.ts.map +1 -1
  87. package/dist/components/media-collection/VideoCollection.js +1 -1
  88. package/dist/components/media-collection/index.js +1 -1
  89. package/dist/components/media-resources/FileResourceList.d.ts.map +1 -1
  90. package/dist/components/media-resources/FileResourceList.js +1 -1
  91. package/dist/components/media-resources/ImageResourceGrid.d.ts.map +1 -1
  92. package/dist/components/media-resources/ImageResourceGrid.js +1 -1
  93. package/dist/components/media-resources/LinkResourceItem.d.ts.map +1 -1
  94. package/dist/components/media-resources/LinkResourceItem.js +1 -1
  95. package/dist/components/media-resources/LinkResourceList.d.ts.map +1 -1
  96. package/dist/components/media-resources/LinkResourceList.js +1 -1
  97. package/dist/components/media-resources/MediaEntryCard.d.ts.map +1 -1
  98. package/dist/components/media-resources/MediaEntryCard.js +1 -1
  99. package/dist/components/media-resources/MediaResourcePanel.d.ts.map +1 -1
  100. package/dist/components/media-resources/MediaResourcePanel.js +1 -1
  101. package/dist/components/media-resources/MediaResourceTabBar.d.ts.map +1 -1
  102. package/dist/components/media-resources/MediaResourceTabBar.js +1 -1
  103. package/dist/components/media-resources/MediaResourceTabs.js +1 -1
  104. package/dist/components/media-resources/ResourceEmptyState.d.ts.map +1 -1
  105. package/dist/components/media-resources/ResourceEmptyState.js +1 -1
  106. package/dist/components/media-resources/ResourceScrollContainer.d.ts.map +1 -1
  107. package/dist/components/media-resources/ResourceScrollContainer.js +1 -1
  108. package/dist/components/media-resources/VideoResourceGrid.d.ts.map +1 -1
  109. package/dist/components/media-resources/VideoResourceGrid.js +1 -1
  110. package/dist/components/message/GroupMembersDrawer.js +1 -1
  111. package/dist/components/message/MessageHeader.d.ts.map +1 -1
  112. package/dist/components/message/MessageHeader.js +3 -2
  113. package/dist/components/message/MessageInfiniteScroll.d.ts.map +1 -1
  114. package/dist/components/message/MessageInfiniteScroll.js +1 -1
  115. package/dist/components/message/MessageList.d.ts.map +1 -1
  116. package/dist/components/message/MessageList.js +22 -12
  117. package/dist/components/message/SelectSession.js +1 -1
  118. package/dist/components/message/UnassignedSessionFooter.d.ts.map +1 -1
  119. package/dist/components/message/UnassignedSessionFooter.js +1 -1
  120. package/dist/components/message/footer/ActionBar.d.ts.map +1 -1
  121. package/dist/components/message/footer/ActionBar.js +4 -1
  122. package/dist/components/message/footer/ComposerEditor.js +1 -1
  123. package/dist/components/message/footer/ComposerTabs.d.ts.map +1 -1
  124. package/dist/components/message/footer/ComposerTabs.js +1 -1
  125. package/dist/components/message/footer/EmojiPicker.js +1 -1
  126. package/dist/components/message/footer/EnterHandler.d.ts.map +1 -1
  127. package/dist/components/message/footer/EnterHandler.js +10 -1
  128. package/dist/components/message/footer/FilePreview.d.ts.map +1 -1
  129. package/dist/components/message/footer/FilePreview.js +4 -4
  130. package/dist/components/message/footer/LinkInputPreview.d.ts.map +1 -1
  131. package/dist/components/message/footer/LinkInputPreview.js +1 -1
  132. package/dist/components/message/footer/MediaActions.js +1 -1
  133. package/dist/components/message/footer/SessionClosedModal.d.ts.map +1 -1
  134. package/dist/components/message/footer/SessionClosedModal.js +1 -1
  135. package/dist/components/message/footer/ToolbarPlugin.js +1 -1
  136. package/dist/components/message/footer/editorConfig.d.ts +2 -1
  137. package/dist/components/message/footer/editorConfig.d.ts.map +1 -1
  138. package/dist/components/message/footer/editorConfig.js +2 -0
  139. package/dist/components/message/footer/index.d.ts.map +1 -1
  140. package/dist/components/message/footer/index.js +16 -2
  141. package/dist/components/message/footer/mention/MentionMenu.d.ts +6 -0
  142. package/dist/components/message/footer/mention/MentionMenu.d.ts.map +1 -0
  143. package/dist/components/message/footer/mention/MentionMenu.js +51 -0
  144. package/dist/components/message/footer/mention/MentionNode.d.ts +20 -0
  145. package/dist/components/message/footer/mention/MentionNode.d.ts.map +1 -0
  146. package/dist/components/message/footer/mention/MentionNode.js +39 -0
  147. package/dist/components/message/footer/mention/extractMentions.d.ts +6 -0
  148. package/dist/components/message/footer/mention/extractMentions.d.ts.map +1 -0
  149. package/dist/components/message/footer/mention/extractMentions.js +66 -0
  150. package/dist/components/message/footer/mention/useMentionOptions.d.ts +8 -0
  151. package/dist/components/message/footer/mention/useMentionOptions.d.ts.map +1 -0
  152. package/dist/components/message/footer/mention/useMentionOptions.js +45 -0
  153. package/dist/components/message/item/AtTextMessage.d.ts +16 -0
  154. package/dist/components/message/item/AtTextMessage.d.ts.map +1 -0
  155. package/dist/components/message/item/AtTextMessage.js +112 -0
  156. package/dist/components/message/item/FileMessage.js +1 -1
  157. package/dist/components/message/item/GroupNotificationMessage.d.ts.map +1 -1
  158. package/dist/components/message/item/GroupNotificationMessage.js +2 -2
  159. package/dist/components/message/item/ImageMessage.js +1 -1
  160. package/dist/components/message/item/LinkCard.d.ts.map +1 -1
  161. package/dist/components/message/item/LinkCard.js +1 -1
  162. package/dist/components/message/item/LinkText.d.ts.map +1 -1
  163. package/dist/components/message/item/LinkText.js +1 -1
  164. package/dist/components/message/item/MergeImageMessage.js +1 -1
  165. package/dist/components/message/item/MessageBubble.d.ts.map +1 -1
  166. package/dist/components/message/item/MessageBubble.js +2 -2
  167. package/dist/components/message/item/QuoteMessage.d.ts.map +1 -1
  168. package/dist/components/message/item/QuoteMessage.js +1 -1
  169. package/dist/components/message/item/RevokeMessage.d.ts.map +1 -1
  170. package/dist/components/message/item/RevokeMessage.js +1 -1
  171. package/dist/components/message/item/VideoMessage.js +1 -1
  172. package/dist/components/message/item/index.d.ts.map +1 -1
  173. package/dist/components/message/item/index.js +3 -3
  174. package/dist/components/message/item/renderMessageContent.d.ts.map +1 -1
  175. package/dist/components/message/item/renderMessageContent.js +3 -0
  176. package/dist/components/message/reply/ReplyPreviewBar.d.ts.map +1 -1
  177. package/dist/components/message/reply/ReplyPreviewBar.js +1 -1
  178. package/dist/components/message/reply/ReplyQuoteContent.d.ts.map +1 -1
  179. package/dist/components/message/reply/ReplyQuoteContent.js +7 -5
  180. package/dist/components/message/toolbox/MessageToolboxMenu.js +1 -1
  181. package/dist/components/message/toolbox/getCopyableMessageText.d.ts.map +1 -1
  182. package/dist/components/message/toolbox/getCopyableMessageText.js +5 -3
  183. package/dist/components/message/toolbox/isPinnableMessageType.d.ts.map +1 -1
  184. package/dist/components/message/toolbox/isPinnableMessageType.js +1 -0
  185. package/dist/components/search-conversation/SearchAll.d.ts.map +1 -1
  186. package/dist/components/search-conversation/SearchAll.js +1 -1
  187. package/dist/components/search-conversation/SearchConversationAsMessages.d.ts.map +1 -1
  188. package/dist/components/search-conversation/SearchConversationAsMessages.js +1 -1
  189. package/dist/components/search-conversation/SearchConversationAsUsers.d.ts.map +1 -1
  190. package/dist/components/search-conversation/SearchConversationAsUsers.js +1 -1
  191. package/dist/components/search-conversation/SearchConversationMyInbox.js +1 -1
  192. package/dist/components/search-conversation/SearchDrawer.js +1 -1
  193. package/dist/components/search-conversation/SearchMessageOnCurrentConversation.d.ts.map +1 -1
  194. package/dist/components/search-conversation/SearchMessageOnCurrentConversation.js +1 -1
  195. package/dist/components/search-conversation/index.js +1 -1
  196. package/dist/components/search-conversation/item/SearchItemAsMessage.d.ts.map +1 -1
  197. package/dist/components/search-conversation/item/SearchItemAsMessage.js +1 -1
  198. package/dist/components/search-conversation/item/SearchItemAsUser.d.ts.map +1 -1
  199. package/dist/components/search-conversation/item/SearchItemAsUser.js +1 -1
  200. package/dist/components/session/DeskTeamInbox.d.ts.map +1 -1
  201. package/dist/components/session/DeskTeamInbox.js +3 -2
  202. package/dist/components/session/SessionFilterMenu.d.ts.map +1 -1
  203. package/dist/components/session/SessionFilterMenu.js +1 -1
  204. package/dist/components/thread/AssignConfirmModal.d.ts.map +1 -1
  205. package/dist/components/thread/AssignConfirmModal.js +1 -1
  206. package/dist/components/thread/GroupThreadInfo.d.ts.map +1 -1
  207. package/dist/components/thread/GroupThreadInfo.js +7 -4
  208. package/dist/components/thread/ManualAssignPopover.d.ts.map +1 -1
  209. package/dist/components/thread/ManualAssignPopover.js +1 -1
  210. package/dist/components/thread/SessionSection.d.ts.map +1 -1
  211. package/dist/components/thread/SessionSection.js +2 -2
  212. package/dist/components/thread/SingleThreadInfo.d.ts.map +1 -1
  213. package/dist/components/thread/SingleThreadInfo.js +1 -1
  214. package/dist/components/thread/ThreadInfo.js +1 -1
  215. package/dist/components/thread/UserSection.d.ts.map +1 -1
  216. package/dist/components/thread/UserSection.js +1 -1
  217. package/dist/components/video-player/VideoPlayerModal.d.ts.map +1 -1
  218. package/dist/components/video-player/VideoPlayerModal.js +1 -1
  219. package/dist/context/ChatContext.d.ts +1 -1
  220. package/dist/context/ChatContext.d.ts.map +1 -1
  221. package/dist/context/ChatContext.js +2 -1
  222. package/dist/hooks/global/useGlobalEvent.d.ts.map +1 -1
  223. package/dist/hooks/global/useGlobalEvent.js +115 -25
  224. package/dist/hooks/group/useGroupPermission.d.ts +1 -1
  225. package/dist/hooks/group/useGroupPermission.d.ts.map +1 -1
  226. package/dist/hooks/group/useGroupPermission.js +2 -2
  227. package/dist/hooks/message/useMessage.d.ts +4 -1
  228. package/dist/hooks/message/useMessage.d.ts.map +1 -1
  229. package/dist/hooks/message/useMessage.js +9 -2
  230. package/dist/hooks/message/useSendMessage.d.ts +8 -4
  231. package/dist/hooks/message/useSendMessage.d.ts.map +1 -1
  232. package/dist/hooks/message/useSendMessage.js +46 -12
  233. package/dist/hooks/session/useConversationSessionState.d.ts +2 -1
  234. package/dist/hooks/session/useConversationSessionState.d.ts.map +1 -1
  235. package/dist/hooks/session/useConversationSessionState.js +5 -5
  236. package/dist/layout/index.d.ts.map +1 -1
  237. package/dist/layout/index.js +10 -1
  238. package/dist/locales/vi/common.json +9 -0
  239. package/dist/locales/vi/conversation-inbox.json +4 -0
  240. package/dist/store/auth.js +1 -1
  241. package/dist/store/conversation.d.ts.map +1 -1
  242. package/dist/store/conversation.js +93 -51
  243. package/dist/store/type.d.ts +6 -2
  244. package/dist/store/type.d.ts.map +1 -1
  245. package/dist/styles/global.css +1 -1
  246. package/dist/types/chat.d.ts +28 -2
  247. package/dist/types/chat.d.ts.map +1 -1
  248. package/dist/utils/common.d.ts.map +1 -1
  249. package/dist/utils/common.js +19 -9
  250. package/dist/utils/messageLog.d.ts +2 -2
  251. package/dist/utils/messageLog.d.ts.map +1 -1
  252. package/dist/utils/messageLog.js +33 -3
  253. package/package.json +17 -3
@@ -91,7 +91,7 @@ const CannedResponseBody = (props) => {
91
91
  useEffect(() => {
92
92
  setMaxActiveCannedIndex((cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.length) - 1 > 0 ? (cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.length) - 1 : 0);
93
93
  }, [cannedResponses, setMaxActiveCannedIndex]);
94
- return (_jsxs("div", { className: "flex flex-1 flex-row h-[400px]", children: [_jsxs("div", { className: "w-[170px] p-2 border-r border-gray-200", children: [_jsx(Segmented, { options: options, block: true, size: "small", value: scope, onChange: setScope }), _jsx("div", { className: "overflow-y-auto h-full", children: scope === CannedResponseVisibleScope.TEAM && (_jsx("div", { className: "mt-1 flex flex-col", children: (_a = myTeams === null || myTeams === void 0 ? void 0 : myTeams.map) === null || _a === void 0 ? void 0 : _a.call(myTeams, (team, index) => renderTeamItem(team, index)) })) })] }), _jsxs("div", { id: "scrollableCannedDiv", className: "flex flex-col flex-1 h-full overflow-y-auto", children: [!!cannedQuery && !search && (_jsx("div", { className: "px-3 py-2 border-b border-gray-200", children: _jsxs("span", { className: "text-sm text-gray-500", children: [t("canned_response_quick_search_placeholder"), _jsx("span", { className: "text-blue-600", children: ` #${cannedQuery}` })] }) })), _jsx(InfiniteScroll, { dataLength: (cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.length) || 0, next: fetchNextPage, hasMore: hasNextPage, loader: _jsx("div", { className: "flex items-center justify-center py-2", children: _jsx(Spin, {}) }), scrollableTarget: "scrollableCannedDiv", children: !isArray(cannedResponses) || (cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.length) === 0 ? (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Empty, { image: _jsx(Icon, { icon: "chat-square-b", size: 80, className: "text-gray-300" }), description: t("no_canned_response") }) })) : ((_b = cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.map) === null || _b === void 0 ? void 0 : _b.call(cannedResponses, (canned, index) => {
94
+ return (_jsxs("div", { className: "flex flex-1 flex-row h-[400px]", "data-cp-name": "CannedResponseBody", children: [_jsxs("div", { className: "w-[170px] p-2 border-r border-gray-200", children: [_jsx(Segmented, { options: options, block: true, size: "small", value: scope, onChange: setScope }), _jsx("div", { className: "overflow-y-auto h-full", children: scope === CannedResponseVisibleScope.TEAM && (_jsx("div", { className: "mt-1 flex flex-col", children: (_a = myTeams === null || myTeams === void 0 ? void 0 : myTeams.map) === null || _a === void 0 ? void 0 : _a.call(myTeams, (team, index) => renderTeamItem(team, index)) })) })] }), _jsxs("div", { id: "scrollableCannedDiv", className: "flex flex-col flex-1 h-full overflow-y-auto", children: [!!cannedQuery && !search && (_jsx("div", { className: "px-3 py-2 border-b border-gray-200", children: _jsxs("span", { className: "text-sm text-gray-500", children: [t("canned_response_quick_search_placeholder"), _jsx("span", { className: "text-blue-600", children: ` #${cannedQuery}` })] }) })), _jsx(InfiniteScroll, { dataLength: (cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.length) || 0, next: fetchNextPage, hasMore: hasNextPage, loader: _jsx("div", { className: "flex items-center justify-center py-2", children: _jsx(Spin, {}) }), scrollableTarget: "scrollableCannedDiv", children: !isArray(cannedResponses) || (cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.length) === 0 ? (_jsx("div", { className: "flex items-center justify-center py-12", children: _jsx(Empty, { image: _jsx(Icon, { icon: "chat-square-b", size: 80, className: "text-gray-300" }), description: t("no_canned_response") }) })) : ((_b = cannedResponses === null || cannedResponses === void 0 ? void 0 : cannedResponses.map) === null || _b === void 0 ? void 0 : _b.call(cannedResponses, (canned, index) => {
95
95
  var _a, _b;
96
96
  const isActive = index === validActiveCannedIndex;
97
97
  const htmlContent = (canned === null || canned === void 0 ? void 0 : canned.content) || "";
@@ -3,6 +3,6 @@ import { useTranslation } from "react-i18next";
3
3
  import { Icon } from "../../components/icon";
4
4
  const CannedResponseFooter = ({ openCreateCannedModal, }) => {
5
5
  const { t } = useTranslation();
6
- return (_jsx("div", { className: "flex items-center justify-end border-t border-gray-200 p-2", children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1", onClick: openCreateCannedModal, children: [_jsx(Icon, { icon: "plus-circle-o", size: 16, className: "text-blue-500" }), _jsx("span", { className: "text-sm text-blue-500", children: t("add_canned_response") })] }) }));
6
+ return (_jsx("div", { className: "flex items-center justify-end border-t border-gray-200 p-2", "data-cp-name": "CannedResponseFooter", children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1", onClick: openCreateCannedModal, children: [_jsx(Icon, { icon: "plus-circle-o", size: 16, className: "text-blue-500" }), _jsx("span", { className: "text-sm text-blue-500", children: t("add_canned_response") })] }) }));
7
7
  };
8
8
  export default CannedResponseFooter;
@@ -6,6 +6,6 @@ import { Icon } from "../../components/icon";
6
6
  const CannedResponseHeader = (props) => {
7
7
  const { onClose, search, setSearch } = props;
8
8
  const { t } = useTranslation();
9
- return (_jsxs("div", { className: "px-3 py-2 flex flex-row items-center gap-2 border-b border-gray-200", children: [_jsxs("div", { className: "flex flex-row items-center gap-2", children: [_jsx(CannedResponseIcon, { size: 20, className: "text-blue-500" }), _jsx("span", { className: "text-base font-medium", children: t("canned_responses") })] }), _jsxs("div", { className: "flex flex-1 flex-row items-center justify-end gap-2", children: [_jsx(Input, { size: "large", placeholder: t("search"), prefix: _jsx(Icon, { icon: "search-o", size: 20, className: "text-gray-500" }), style: { width: 260 }, className: "text-sm", value: search, onChange: (e) => setSearch === null || setSearch === void 0 ? void 0 : setSearch(e.target.value) }), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", onClick: onClose, children: _jsx(Icon, { icon: "close-o", size: 16 }) })] })] }));
9
+ return (_jsxs("div", { className: "px-3 py-2 flex flex-row items-center gap-2 border-b border-gray-200", "data-cp-name": "CannedResponseHeader", children: [_jsxs("div", { className: "flex flex-row items-center gap-2", children: [_jsx(CannedResponseIcon, { size: 20, className: "text-blue-500" }), _jsx("span", { className: "text-base font-medium", children: t("canned_responses") })] }), _jsxs("div", { className: "flex flex-1 flex-row items-center justify-end gap-2", children: [_jsx(Input, { size: "large", placeholder: t("search"), prefix: _jsx(Icon, { icon: "search-o", size: 20, className: "text-gray-500" }), style: { width: 260 }, className: "text-sm", value: search, onChange: (e) => setSearch === null || setSearch === void 0 ? void 0 : setSearch(e.target.value) }), _jsx(Button, { type: "text", shape: "default", className: "text-gray-500 w-8 h-8 p-0", onClick: onClose, children: _jsx(Icon, { icon: "close-o", size: 16 }) })] })] }));
10
10
  };
11
11
  export default CannedResponseHeader;
@@ -29,6 +29,6 @@ const CannedResponse = ({ onClose, openCreateCannedModal, cannedQuery = "", }) =
29
29
  root.selectEnd();
30
30
  });
31
31
  }, [editor]);
32
- return (_jsxs("div", { className: "w-[600px]", children: [_jsx(CannedResponseHeader, { onClose: onClose, search: search, setSearch: setSearch }), _jsx(CannedResponseBody, { search: debouncedSearch, onSelectCannedResponse: onSelectCannedResponse, cannedQuery: cannedQuery }), _jsx(CannedResponseFooter, { openCreateCannedModal: openCreateCannedModal })] }));
32
+ return (_jsxs("div", { className: "w-[600px]", "data-cp-name": "CannedResponse", children: [_jsx(CannedResponseHeader, { onClose: onClose, search: search, setSearch: setSearch }), _jsx(CannedResponseBody, { search: debouncedSearch, onSelectCannedResponse: onSelectCannedResponse, cannedQuery: cannedQuery }), _jsx(CannedResponseFooter, { openCreateCannedModal: openCreateCannedModal })] }));
33
33
  };
34
34
  export default CannedResponse;
@@ -15,7 +15,7 @@ const TeamItem = ({ team, onSelectCategory, selectedTeamId, selectedCategoryId,
15
15
  }
16
16
  toggle();
17
17
  }, [toggle, isOpen, onSelectCategory, team === null || team === void 0 ? void 0 : team.teamId, selectedTeamId]);
18
- return (_jsxs("div", { className: "border-b border-gray-200", children: [_jsxs("div", { className: "flex items-center justify-between py-2 cursor-pointer", onClick: onToggle, children: [_jsx("span", { className: "text-sm font-medium truncate flex-1", children: (team === null || team === void 0 ? void 0 : team.name) || "" }), _jsx(Icon, { icon: isOpen ? "angle-up-b" : "angle-down-b", size: 16, className: clsx(!isOpen && "text-gray-500") })] }), isOpen && (_jsxs("div", { className: "mb-2", children: [_jsx("div", { className: clsx("px-3 py-1 cursor-pointer hover:bg-gray-100 rounded-md", selectedTeamId &&
18
+ return (_jsxs("div", { className: "border-b border-gray-200", "data-cp-name": "TeamItem", children: [_jsxs("div", { className: "flex items-center justify-between py-2 cursor-pointer", onClick: onToggle, children: [_jsx("span", { className: "text-sm font-medium truncate flex-1", children: (team === null || team === void 0 ? void 0 : team.name) || "" }), _jsx(Icon, { icon: isOpen ? "angle-up-b" : "angle-down-b", size: 16, className: clsx(!isOpen && "text-gray-500") })] }), isOpen && (_jsxs("div", { className: "mb-2", children: [_jsx("div", { className: clsx("px-3 py-1 cursor-pointer hover:bg-gray-100 rounded-md", selectedTeamId &&
19
19
  selectedTeamId === (team === null || team === void 0 ? void 0 : team.teamId) &&
20
20
  !selectedCategoryId &&
21
21
  "bg-gray-100"), onClick: () => onSelectCategory === null || onSelectCategory === void 0 ? void 0 : onSelectCategory(team === null || team === void 0 ? void 0 : team.teamId, undefined), children: _jsx("span", { className: clsx("text-sm truncate", selectedTeamId === (team === null || team === void 0 ? void 0 : team.teamId) && !selectedCategoryId
@@ -1 +1 @@
1
- {"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/common/ConfirmModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,GAAI,uGAWnB,iBAAiB,4CAiCnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ConfirmModal.d.ts","sourceRoot":"","sources":["../../../src/components/common/ConfirmModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,UAAU,EAAE,SAAS,CAAC;IACtB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACvC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,YAAY,GAAI,uGAWnB,iBAAiB,4CAkCnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Modal } from "antd";
4
4
  const ConfirmModal = ({ open, title, okText, cancelText, onOk, onCancel, okType = "primary", confirmLoading, okButtonProps, children, }) => {
5
- return (_jsx(Modal, { centered: true, open: open, onOk: onOk, onCancel: onCancel, okText: okText, cancelText: cancelText, confirmLoading: confirmLoading, okButtonProps: Object.assign(Object.assign({}, okButtonProps), { className: okType === "danger"
5
+ return (_jsx(Modal, { "data-cp-name": "ConfirmModal", centered: true, open: open, onOk: onOk, onCancel: onCancel, okText: okText, cancelText: cancelText, confirmLoading: confirmLoading, okButtonProps: Object.assign(Object.assign({}, okButtonProps), { className: okType === "danger"
6
6
  ? "!h-10 !rounded-lg !border-danger-400 !bg-danger-400 !text-white hover:!border-danger-300 hover:!bg-danger-300"
7
7
  : "!h-10 !rounded-lg !border-primary-400 !bg-primary-400 !text-white hover:!border-primary-300 hover:!bg-primary-300" }), cancelButtonProps: {
8
8
  className: "!h-10 !rounded-lg !border-gray-25 !bg-gray-25 !text-gray-900",
@@ -1 +1 @@
1
- {"version":3,"file":"InfoModal.d.ts","sourceRoot":"","sources":["../../../src/components/common/InfoModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,SAAS,GAAI,yCAAyC,cAAc,4CA0BzE,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"InfoModal.d.ts","sourceRoot":"","sources":["../../../src/components/common/InfoModal.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,QAAA,MAAM,SAAS,GAAI,yCAAyC,cAAc,4CA2BzE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Modal } from "antd";
4
4
  const InfoModal = ({ open, title, okText, onOk, children }) => {
5
- return (_jsx(Modal, { centered: true, open: open, onOk: onOk, onCancel: onOk, okText: okText, cancelButtonProps: { style: { display: "none" } }, okButtonProps: {
5
+ return (_jsx(Modal, { "data-cp-name": "InfoModal", centered: true, open: open, onOk: onOk, onCancel: onOk, okText: okText, cancelButtonProps: { style: { display: "none" } }, okButtonProps: {
6
6
  className: "!h-10 !w-full !rounded-lg !border-primary-400 !bg-primary-400 !text-white hover:!border-primary-300 hover:!bg-primary-300",
7
7
  }, styles: {
8
8
  header: { textAlign: "center", marginBottom: 0 },
@@ -1 +1 @@
1
- {"version":3,"file":"ComposeNewMessageModal.d.ts","sourceRoot":"","sources":["../../../src/components/compose/ComposeNewMessageModal.tsx"],"names":[],"mappings":"AAeA,UAAU,2BAA2B;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAID,QAAA,MAAM,sBAAsB,GAAI,oBAG7B,2BAA2B,4CAsI7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ComposeNewMessageModal.d.ts","sourceRoot":"","sources":["../../../src/components/compose/ComposeNewMessageModal.tsx"],"names":[],"mappings":"AAeA,UAAU,2BAA2B;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAID,QAAA,MAAM,sBAAsB,GAAI,oBAG7B,2BAA2B,4CAuI7B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -54,6 +54,6 @@ const ComposeNewMessageModal = ({ open, onClose, }) => {
54
54
  setOpeningUserID(null);
55
55
  }
56
56
  };
57
- return (_jsx(Modal, { title: step === "create-group" ? t("create_group.title") : t("compose.title"), open: open, onCancel: handleClose, afterClose: handleAfterClose, footer: null, centered: true, forceRender: true, width: step === "create-group" ? 720 : undefined, getContainer: false, children: step === "compose" ? (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(Input, { size: "large", value: search, onChange: (event) => setSearch(event.target.value), placeholder: t("compose.search_member_placeholder"), prefix: _jsx(Icon, { icon: "search-o", size: 18, className: "text-gray-400" }) }), _jsxs("button", { type: "button", className: "flex items-center gap-3 rounded-xl bg-primary-50 px-4 py-3.5 text-left transition-colors hover:bg-primary-100", onClick: () => setStep("create-group"), children: [_jsx("span", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-white", children: _jsx(Icon, { icon: "user-three-b", size: 22, className: "text-primary-400" }) }), _jsx("span", { className: "flex-1 text-base font-semibold text-gray-900", children: t("compose.create_group") }), _jsx(Icon, { icon: "angle-right-o", size: 18, className: "text-gray-400" })] }), !debouncedSearch && (_jsxs("div", { className: "flex items-center gap-2 px-1", children: [_jsx("span", { className: "shrink-0 text-xs font-semibold uppercase tracking-wide text-gray-400", children: t("compose.recent_suggestions") }), _jsx("span", { className: "h-px flex-1 bg-gray-100" })] })), _jsx("div", { className: "max-h-80 overflow-y-auto", children: isLoading ? (_jsx("div", { className: "flex items-center justify-center py-6", children: _jsx(Spin, {}) })) : accounts.length === 0 ? (_jsx(Empty, { description: t("compose.no_member_found") })) : (accounts.map((account) => (_jsxs("div", { className: "flex cursor-pointer items-center gap-3 border-b border-gray-50 px-1 py-3 transition-colors last:border-b-0 hover:bg-[#f5f5f5]", onClick: () => handleOpenDirectMessage(account), children: [_jsx(Avatar, { src: account.avatar, size: 44, className: "shrink-0", children: account.displayName.charAt(0) || "A" }), _jsx("span", { className: "flex-1 truncate text-base font-medium text-gray-900", children: account.displayName }), openingUserID === account.userID && _jsx(Spin, { size: "small" })] }, account.userID)))) })] })) : (_jsx(CreateGroupForm, { onDone: handleClose })) }));
57
+ return (_jsx(Modal, { "data-cp-name": "ComposeNewMessageModal", title: step === "create-group" ? t("create_group.title") : t("compose.title"), open: open, onCancel: handleClose, afterClose: handleAfterClose, footer: null, centered: true, forceRender: true, width: step === "create-group" ? 720 : undefined, getContainer: false, children: step === "compose" ? (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx(Input, { size: "large", value: search, onChange: (event) => setSearch(event.target.value), placeholder: t("compose.search_member_placeholder"), prefix: _jsx(Icon, { icon: "search-o", size: 18, className: "text-gray-400" }) }), _jsxs("button", { type: "button", className: "flex items-center gap-3 rounded-xl bg-primary-50 px-4 py-3.5 text-left transition-colors hover:bg-primary-100", onClick: () => setStep("create-group"), children: [_jsx("span", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-white", children: _jsx(Icon, { icon: "user-three-b", size: 22, className: "text-primary-400" }) }), _jsx("span", { className: "flex-1 text-base font-semibold text-gray-900", children: t("compose.create_group") }), _jsx(Icon, { icon: "angle-right-o", size: 18, className: "text-gray-400" })] }), !debouncedSearch && (_jsxs("div", { className: "flex items-center gap-2 px-1", children: [_jsx("span", { className: "shrink-0 text-xs font-semibold uppercase tracking-wide text-gray-400", children: t("compose.recent_suggestions") }), _jsx("span", { className: "h-px flex-1 bg-gray-100" })] })), _jsx("div", { className: "max-h-80 overflow-y-auto", children: isLoading ? (_jsx("div", { className: "flex items-center justify-center py-6", children: _jsx(Spin, {}) })) : accounts.length === 0 ? (_jsx(Empty, { description: t("compose.no_member_found") })) : (accounts.map((account) => (_jsxs("div", { className: "flex cursor-pointer items-center gap-3 border-b border-gray-50 px-1 py-3 transition-colors last:border-b-0 hover:bg-[#f5f5f5]", onClick: () => handleOpenDirectMessage(account), children: [_jsx(Avatar, { src: account.avatar, size: 44, className: "shrink-0", children: account.displayName.charAt(0) || "A" }), _jsx("span", { className: "flex-1 truncate text-base font-medium text-gray-900", children: account.displayName }), openingUserID === account.userID && _jsx(Spin, { size: "small" })] }, account.userID)))) })] })) : (_jsx(CreateGroupForm, { onDone: handleClose })) }));
58
58
  };
59
59
  export default ComposeNewMessageModal;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationByGroupItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ConversationByGroupItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAOxF,UAAU,4BAA4B;IACpC,KAAK,EAAE,4BAA4B,CAAC;IACpC,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,uBAAuB,GAAI,2BAG9B,4BAA4B,4CA2D9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ConversationByGroupItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ConversationByGroupItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAQxF,UAAU,4BAA4B;IACpC,KAAK,EAAE,4BAA4B,CAAC;IACpC,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,uBAAuB,GAAI,2BAG9B,4BAA4B,4CA8D9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -6,6 +6,7 @@ import { useChatContext } from "../../context/ChatContext";
6
6
  import { formatTimestamp, parseLatestMessage } from "../../utils/common";
7
7
  import GroupCompositeAvatar from "../../components/group/GroupCompositeAvatar";
8
8
  import ThreadCard from "./ThreadCard";
9
+ import MentionIndicatorIcon from "./MentionIndicatorIcon";
9
10
  const ConversationByGroupItem = ({ group, latestPreview, }) => {
10
11
  const { t } = useTranslation();
11
12
  const { user, onNavigate } = useChatContext();
@@ -28,7 +29,7 @@ const ConversationByGroupItem = ({ group, latestPreview, }) => {
28
29
  return (_jsx(ThreadCard, { onClick: handleClick, isSelected: isSelected, unreadCount: conversation.unreadCount, preview: parseLatestMessage(latestMsg, user === null || user === void 0 ? void 0 : user.userID, t, {
29
30
  peerType: conversation.peerType,
30
31
  showName: conversation.showName,
31
- }), time: latestMsgSendTime > 0
32
+ }), mentionIndicator: _jsx(MentionIndicatorIcon, { groupAtType: conversation.groupAtType }), time: latestMsgSendTime > 0
32
33
  ? formatTimestamp(latestMsgSendTime, { hasTime: true })
33
34
  : undefined, avatar: _jsx(GroupCompositeAvatar, { groupID: group.groupId, faceURL: conversation.faceURL, groupName: conversation.showName, size: 48 }), title: _jsx("h3", { className: "truncate text-sm font-semibold text-gray-900", children: conversation.showName }) }));
34
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationBySessionItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ConversationBySessionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAUhD,UAAU,8BAA8B;IACtC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,yBAAyB,GAAI,iCAGhC,8BAA8B,mDA0EhC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"ConversationBySessionItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ConversationBySessionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAWhD,UAAU,8BAA8B;IACtC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,QAAA,MAAM,yBAAyB,GAAI,iCAGhC,8BAA8B,mDA6EhC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -9,6 +9,7 @@ import { formatTimestamp, parseLatestMessage } from "../../utils/common";
9
9
  import { isGroupSession } from "../../utils/imCommon";
10
10
  import GroupCompositeAvatar from "../../components/group/GroupCompositeAvatar";
11
11
  import ThreadCard from "./ThreadCard";
12
+ import MentionIndicatorIcon from "./MentionIndicatorIcon";
12
13
  const ConversationBySessionItem = ({ sessionItem, latestPreview, }) => {
13
14
  var _a;
14
15
  const { t } = useTranslation();
@@ -39,7 +40,7 @@ const ConversationBySessionItem = ({ sessionItem, latestPreview, }) => {
39
40
  return (_jsx(ThreadCard, { onClick: () => handleConversationClick(conversation), isSelected: isSelected, unreadCount: conversation.unreadCount, preview: parseLatestMessage(latestMsg, user === null || user === void 0 ? void 0 : user.userID, t, {
40
41
  peerType: conversation.peerType,
41
42
  showName: conversation.showName,
42
- }), time: latestMsgSendTime > 0
43
+ }), mentionIndicator: _jsx(MentionIndicatorIcon, { groupAtType: conversation.groupAtType }), time: latestMsgSendTime > 0
43
44
  ? formatTimestamp(latestMsgSendTime, { hasTime: true })
44
45
  : undefined, avatar: isGroupSession(conversation.conversationType) ? (_jsx(GroupCompositeAvatar, { groupID: conversation.groupID, faceURL: avatar, groupName: displayName, size: 48 })) : (_jsx(Avatar, { size: 48, src: avatar, children: ((_a = displayName === null || displayName === void 0 ? void 0 : displayName.charAt) === null || _a === void 0 ? void 0 : _a.call(displayName, 0)) || "A" })), title: _jsx("h3", { className: "truncate text-sm font-semibold text-gray-900", children: displayName }) }));
45
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DeskConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/DeskConversationList.tsx"],"names":[],"mappings":"AA4BA,QAAA,MAAM,oBAAoB,+CAySzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"DeskConversationList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/DeskConversationList.tsx"],"names":[],"mappings":"AA4BA,QAAA,MAAM,oBAAoB,+CA4SzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -102,7 +102,7 @@ const DeskConversationList = () => {
102
102
  emitter.off("UPDATE_SESSION", handler);
103
103
  };
104
104
  }, [filterSummary, refetch]);
105
- return (_jsxs("div", { className: "flex flex-col h-full bg-white border-r border-gray-200 w-[320px]", children: [_jsxs("div", { className: "p-3 border-b border-gray-100", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { ref: searchInputRef, placeholder: t("search"), prefix: _jsx(Icon, { icon: "search-o", size: 18, className: "text-gray-400" }), onChange: (e) => {
105
+ return (_jsxs("div", { className: "flex flex-col h-full bg-white border-r border-gray-200 w-[320px]", "data-cp-name": "DeskConversationList", children: [_jsxs("div", { className: "p-3 border-b border-gray-100", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Input, { ref: searchInputRef, placeholder: t("search"), prefix: _jsx(Icon, { icon: "search-o", size: 18, className: "text-gray-400" }), onChange: (e) => {
106
106
  if (!showSearch && e.target.value) {
107
107
  setShowSearchTrue();
108
108
  }
@@ -0,0 +1,7 @@
1
+ import { GroupAtType } from "@droppii-org/wasm-client-sdk";
2
+ interface MentionIndicatorIconProps {
3
+ groupAtType?: GroupAtType;
4
+ }
5
+ declare const MentionIndicatorIcon: ({ groupAtType }: MentionIndicatorIconProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export default MentionIndicatorIcon;
7
+ //# sourceMappingURL=MentionIndicatorIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MentionIndicatorIcon.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/MentionIndicatorIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,UAAU,yBAAyB;IACjC,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAID,QAAA,MAAM,oBAAoB,GAAI,iBAAiB,yBAAyB,mDAkBvE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { GroupAtType } from "@droppii-org/wasm-client-sdk";
4
+ import { useTranslation } from "react-i18next";
5
+ // No "@" glyph exists in the IcoMoon icon set (droppiiFontSelection.json) —
6
+ // render the literal character instead of forcing an unrelated tag icon.
7
+ const MentionIndicatorIcon = ({ groupAtType }) => {
8
+ const { t } = useTranslation("conversation-inbox");
9
+ if (!groupAtType)
10
+ return null;
11
+ // AtGroupNotice is a group-announcement flag, not a "someone tagged you"
12
+ // signal — the mention icon on the thread card is only for AtMe/AtAll.
13
+ if (groupAtType === GroupAtType.AtGroupNotice)
14
+ return null;
15
+ return (_jsx("span", { role: "img", "aria-label": t("thread_card.mention.label"), className: "shrink-0 text-[13px] font-semibold leading-none text-blue-500", "data-cp-name": "MentionIndicatorIcon", children: "@" }));
16
+ };
17
+ export default MentionIndicatorIcon;
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeActionButton.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/SwipeActionButton.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,iBAAiB,GAAI,8CAMxB,sBAAsB,4CAgBxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"SwipeActionButton.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/SwipeActionButton.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,iBAAiB,GAAI,8CAMxB,sBAAsB,4CAiBxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -3,5 +3,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import clsx from "clsx";
4
4
  import { Icon } from "../../components/icon";
5
5
  export const SWIPE_ACTION_WIDTH = 76;
6
- const SwipeActionButton = ({ icon, label, onClick, className, testId, }) => (_jsxs("button", { type: "button", onClick: onClick, "data-testid": testId, className: clsx("flex h-full shrink-0 flex-col items-center justify-center gap-1 p-2 text-white", className), style: { width: SWIPE_ACTION_WIDTH }, children: [_jsx(Icon, { icon: icon, size: 16 }), _jsx("span", { className: "text-center text-[10px] font-[510] leading-[1.6]", children: label })] }));
6
+ const SwipeActionButton = ({ icon, label, onClick, className, testId, }) => (_jsxs("button", { type: "button", onClick: onClick, "data-testid": testId, "data-cp-name": "SwipeActionButton", className: clsx("flex h-full shrink-0 flex-col items-center justify-center gap-1 p-2 text-white", className), style: { width: SWIPE_ACTION_WIDTH }, children: [_jsx(Icon, { icon: icon, size: 16 }), _jsx("span", { className: "text-center text-[10px] font-[510] leading-[1.6]", children: label })] }));
7
7
  export default SwipeActionButton;
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeableRow.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/SwipeableRow.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAOnD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,GAAI,gDAKnB,iBAAiB,4CA4FnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SwipeableRow.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/SwipeableRow.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAOnD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,GAAI,gDAKnB,iBAAiB,4CA6FnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -57,6 +57,6 @@ const SwipeableRow = ({ children, actions, actionsWidth, disabled = false, }) =>
57
57
  if (!wasDragging)
58
58
  close();
59
59
  };
60
- return (_jsxs("div", Object.assign({ ref: containerRef }, bind(), { className: "relative w-full touch-pan-y overflow-hidden", children: [_jsx("div", { "aria-hidden": !isOpen, className: "absolute inset-y-0 right-0 flex", style: { width: actionsWidth }, children: actions(close) }), _jsx("div", { className: clsx("relative bg-white transition-transform duration-200 ease-out", isDragging && "select-none transition-none"), style: { transform: `translate3d(-${offset}px, 0, 0)` }, onClickCapture: handleContentClickCapture, children: children })] })));
60
+ return (_jsxs("div", Object.assign({ ref: containerRef }, bind(), { className: "relative w-full touch-pan-y overflow-hidden", "data-cp-name": "SwipeableRow", children: [_jsx("div", { "aria-hidden": !isOpen, className: "absolute inset-y-0 right-0 flex", style: { width: actionsWidth }, children: actions(close) }), _jsx("div", { className: clsx("relative bg-white transition-transform duration-200 ease-out", isDragging && "select-none transition-none"), style: { transform: `translate3d(-${offset}px, 0, 0)` }, onClickCapture: handleContentClickCapture, children: children })] })));
61
61
  };
62
62
  export default SwipeableRow;
@@ -9,7 +9,8 @@ export interface ThreadCardProps {
9
9
  onClick: () => void;
10
10
  testId?: string;
11
11
  muteIndicator?: ReactNode;
12
+ mentionIndicator?: ReactNode;
12
13
  }
13
- declare const ThreadCard: ({ avatar, title, preview, time, unreadCount, isSelected, onClick, testId, muteIndicator, }: ThreadCardProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare const ThreadCard: ({ avatar, title, preview, time, unreadCount, isSelected, onClick, testId, muteIndicator, mentionIndicator, }: ThreadCardProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export default ThreadCard;
15
16
  //# sourceMappingURL=ThreadCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ThreadCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBvC,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,UAAU,GAAI,4FAUjB,eAAe,4CA6CjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ThreadCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAqBvC,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,SAAS,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,gBAAgB,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED,QAAA,MAAM,UAAU,GAAI,8GAWjB,eAAe,4CA+CjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,12 +5,12 @@ const formatUnreadCount = (count) => (count > 99 ? "99+" : count);
5
5
  const UnreadBadge = ({ count }) => {
6
6
  const label = String(formatUnreadCount(count));
7
7
  const isWide = label.length > 1;
8
- return (_jsx("span", { className: clsx("inline-flex h-5 shrink-0 items-center justify-center rounded-[32px] border-2 border-white bg-gradient-danger-light px-[3px] text-center text-[12px] font-semibold leading-[160%] text-white", isWide ? "min-w-8" : "min-w-5"), children: label }));
8
+ return (_jsx("span", { className: clsx("inline-flex h-5 shrink-0 items-center justify-center rounded-[32px] border-2 border-white bg-gradient-danger-light px-[3px] text-center text-[12px] font-semibold leading-[160%] text-white", isWide ? "min-w-8" : "min-w-5"), "data-cp-name": "UnreadBadge", children: label }));
9
9
  };
10
- const ThreadCard = ({ avatar, title, preview, time, unreadCount = 0, isSelected = false, onClick, testId, muteIndicator, }) => {
10
+ const ThreadCard = ({ avatar, title, preview, time, unreadCount = 0, isSelected = false, onClick, testId, muteIndicator, mentionIndicator, }) => {
11
11
  const hasUnread = unreadCount > 0;
12
- return (_jsxs("button", { type: "button", onClick: onClick, "data-testid": testId, className: clsx("relative flex w-full shrink-0 items-start gap-2 border-b border-gray-25 p-3 text-left transition-colors hover:bg-[#f5f5f5] focus:outline-none focus-visible:ring-2 focus-visible:ring-chat-ring", isSelected ? "bg-blue-50" : "bg-white"), children: [isSelected && (_jsx("span", { className: "absolute bottom-0 left-0 top-0 w-1 bg-blue-500" })), avatar, _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsxs("div", { className: "flex min-h-[25.6px] items-center justify-between gap-1", children: [_jsx("div", { className: "min-w-0 flex-1", children: title }), muteIndicator, time && (_jsx("span", { className: "shrink-0 text-[12px] font-normal leading-[160%] text-gray-400 [font-feature-settings:'liga'_off,'clig'_off]", children: time }))] }), _jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("p", { className: clsx("min-w-0 flex-1 truncate text-[14px] leading-[160%] [font-feature-settings:'liga'_off,'clig'_off]", hasUnread
12
+ return (_jsxs("button", { type: "button", onClick: onClick, "data-testid": testId, "data-cp-name": "ThreadCard", className: clsx("relative flex w-full shrink-0 items-start gap-2 border-b border-gray-25 p-3 text-left transition-colors hover:bg-[#f5f5f5] focus:outline-none focus-visible:ring-2 focus-visible:ring-chat-ring", isSelected ? "bg-blue-50" : "bg-white"), children: [isSelected && (_jsx("span", { className: "absolute bottom-0 left-0 top-0 w-1 bg-blue-500" })), avatar, _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsxs("div", { className: "flex min-h-[25.6px] items-center justify-between gap-1", children: [_jsx("div", { className: "min-w-0 flex-1", children: title }), muteIndicator, time && (_jsx("span", { className: "shrink-0 text-[12px] font-normal leading-[160%] text-gray-400 [font-feature-settings:'liga'_off,'clig'_off]", children: time }))] }), _jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("p", { className: clsx("min-w-0 flex-1 truncate text-[14px] leading-[160%] [font-feature-settings:'liga'_off,'clig'_off]", hasUnread
13
13
  ? "font-[510] text-black"
14
- : "font-normal tracking-[0.14px] text-gray-600"), children: preview }), hasUnread && _jsx(UnreadBadge, { count: unreadCount })] })] })] }));
14
+ : "font-normal tracking-[0.14px] text-gray-600"), children: preview }), mentionIndicator, hasUnread && _jsx(UnreadBadge, { count: unreadCount })] })] })] }));
15
15
  };
16
16
  export default ThreadCard;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationDetailHeader.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationDetailHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAQrE,MAAM,WAAW,6BAA6B;IAC5C,YAAY,EAAE,gBAAgB,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAqBD,QAAA,MAAM,wBAAwB,GAAI,2CAI/B,6BAA6B,4CA0C/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"ConversationDetailHeader.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationDetailHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAQrE,MAAM,WAAW,6BAA6B;IAC5C,YAAY,EAAE,gBAAgB,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAsBD,QAAA,MAAM,wBAAwB,GAAI,2CAI/B,6BAA6B,4CA2C/B,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -6,7 +6,7 @@ import ConversationPeerAvatar from "../../components/conversation-inbox/Conversa
6
6
  import ConversationInboxTitle from "../../components/conversation-inbox/ConversationInboxTitle";
7
7
  import { resolveConversationDisplayName, resolvePeerBadgeLabel, } from "../../utils/conversation";
8
8
  import { useConversationAvatarUrl } from "../../hooks/conversation/useConversationAvatarUrl";
9
- const HeaderIconButton = ({ icon, onClick, testId, }) => (_jsx("button", { type: "button", onClick: onClick, "data-testid": testId, className: "flex shrink-0 cursor-pointer items-center justify-center p-2 text-primary-400", children: _jsx(Icon, { icon: icon, size: 24 }) }));
9
+ const HeaderIconButton = ({ icon, onClick, testId, }) => (_jsx("button", { type: "button", onClick: onClick, "data-testid": testId, "data-cp-name": "HeaderIconButton", className: "flex shrink-0 cursor-pointer items-center justify-center p-2 text-primary-400", children: _jsx(Icon, { icon: icon, size: 24 }) }));
10
10
  const ConversationDetailHeader = ({ conversation, onBack, onProfileClick, }) => {
11
11
  const { t } = useTranslation("conversation-inbox");
12
12
  const displayName = resolveConversationDisplayName(conversation, t);
@@ -14,6 +14,6 @@ const ConversationDetailHeader = ({ conversation, onBack, onProfileClick, }) =>
14
14
  const peerType = conversation.peerType;
15
15
  const badgeLabel = resolvePeerBadgeLabel(peerType, t);
16
16
  const subtitle = t("thread_detail.profile_hint");
17
- return (_jsxs("div", { "data-testid": "conversation-detail-header", className: "flex w-full cursor-default items-center border-b border-gray-25 bg-white p-2 shadow-inset-gray-divider", children: [_jsx(HeaderIconButton, { icon: "arrow-left-o", onClick: onBack, testId: "conversation-detail-back" }), _jsxs("div", { className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 px-1", "data-testid": "conversation-detail-profile", onClick: onProfileClick, children: [_jsx(ConversationPeerAvatar, { peerType: peerType, displayName: displayName, avatarUrl: avatarUrl, badgeLabel: badgeLabel }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(ConversationInboxTitle, { peerType: peerType, displayName: displayName }), _jsx("p", { className: "truncate text-[10px] font-normal leading-[160%] tracking-[0.1px] text-gray-600 [font-feature-settings:'liga'_off,'clig'_off]", children: subtitle })] })] })] }));
17
+ return (_jsxs("div", { "data-testid": "conversation-detail-header", "data-cp-name": "ConversationDetailHeader", className: "flex w-full cursor-default items-center border-b border-gray-25 bg-white p-2 shadow-inset-gray-divider", children: [_jsx(HeaderIconButton, { icon: "arrow-left-o", onClick: onBack, testId: "conversation-detail-back" }), _jsxs("div", { className: "flex min-w-0 flex-1 cursor-pointer items-center gap-2 px-1", "data-testid": "conversation-detail-profile", onClick: onProfileClick, children: [_jsx(ConversationPeerAvatar, { peerType: peerType, displayName: displayName, avatarUrl: avatarUrl, badgeLabel: badgeLabel }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx(ConversationInboxTitle, { peerType: peerType, displayName: displayName }), _jsx("p", { className: "truncate text-[10px] font-normal leading-[160%] tracking-[0.1px] text-gray-600 [font-feature-settings:'liga'_off,'clig'_off]", children: subtitle })] })] })] }));
18
18
  };
19
19
  export default ConversationDetailHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationDetailInput.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationDetailInput.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D,MAAM,WAAW,4BAA4B;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,QAAA,MAAM,uBAAuB,GAAI,4EAM9B,4BAA4B,4CA0Z9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ConversationDetailInput.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationDetailInput.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D,MAAM,WAAW,4BAA4B;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,QAAA,MAAM,uBAAuB,GAAI,4EAM9B,4BAA4B,4CAya9B,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -27,6 +27,7 @@ const ConversationDetailInput = ({ placeholder, onSendMessage, onInputChange, mo
27
27
  const selectedConversationId = useConversationStore((state) => state.selectedConversationId);
28
28
  const conversationId = selectedConversationId || (conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationID) || "";
29
29
  const isConversationReady = !!conversationData && (!!conversationData.userID || !!conversationData.groupID);
30
+ const isViewOnlyMember = useConversationStore((state) => state.isViewOnlyMember);
30
31
  const sendMessageOptions = useMemo(() => ({
31
32
  scrollEvent: "CONVERSATION_CHAT_SCROLL_TO_BOTTOM_IF_AT_BOTTOM",
32
33
  }), []);
@@ -247,7 +248,10 @@ const ConversationDetailInput = ({ placeholder, onSendMessage, onInputChange, mo
247
248
  event.preventDefault();
248
249
  void handleSend();
249
250
  };
250
- return (_jsxs("div", { ref: containerRef, "data-testid": "conversation-detail-input", className: "flex w-full shrink-0 flex-col bg-chat-bubble-neutral/[0.05]", children: [_jsx("input", { ref: mediaInputRef, type: "file", accept: "image/jpeg,image/png,image/jpg,video/*", multiple: true, className: "hidden", onChange: handleMediaInputChange }), _jsx("input", { ref: documentInputRef, type: "file", accept: ".pdf,.doc,.docx", multiple: true, className: "hidden", onChange: handleDocumentInputChange }), _jsx(ReplyPreviewBar, {}), listUploadFiles.length > 0 && (_jsx(FilePreviewList, { files: listUploadFiles, onRemove: (file) => handleRemoveFile(file.uid), onVideoReady: () => setIsVideoLoading(false) })), showLinkPreview && previewUrl && (_jsx(LinkInputPreview, { url: previewUrl, onRemove: () => setPreviewDismissed(true) })), _jsxs("div", { className: "flex items-end gap-3 px-3 py-2", children: [_jsx("div", { className: "flex shrink-0 items-center", children: _jsx("button", { type: "button", onClick: handleToggleMoreOption, "aria-label": t("thread_detail.more_option.toggle"), "aria-expanded": isMoreOptionOpen, "data-testid": "conversation-detail-more-option-toggle", className: "flex py-3 items-center justify-center rounded-full", children: isMoreOptionOpen ? (_jsx(Icon, { icon: "close-circle-b", size: 24, className: "text-primary-400" })) : (_jsx(Icon, { icon: "plus-circle-o", size: 24, className: "text-gray-900" })) }) }), _jsx("div", { className: clsx("flex min-w-0 flex-1 overflow-hidden rounded-xl border bg-white transition-shadow", isFocused
251
+ if (isViewOnlyMember) {
252
+ return (_jsx("div", { "data-testid": "conversation-detail-input-view-only", className: "flex w-full shrink-0 items-center justify-center bg-chat-bubble-neutral/[0.05] px-4 py-3 text-center text-sm text-gray-500", children: t("thread_detail.view_only_notice") }));
253
+ }
254
+ return (_jsxs("div", { ref: containerRef, "data-testid": "conversation-detail-input", "data-cp-name": "ConversationDetailInput", className: "flex w-full shrink-0 flex-col bg-chat-bubble-neutral/[0.05]", children: [_jsx("input", { ref: mediaInputRef, type: "file", accept: "image/jpeg,image/png,image/jpg,video/*", multiple: true, className: "hidden", onChange: handleMediaInputChange }), _jsx("input", { ref: documentInputRef, type: "file", accept: ".pdf,.doc,.docx", multiple: true, className: "hidden", onChange: handleDocumentInputChange }), _jsx(ReplyPreviewBar, {}), listUploadFiles.length > 0 && (_jsx(FilePreviewList, { files: listUploadFiles, onRemove: (file) => handleRemoveFile(file.uid), onVideoReady: () => setIsVideoLoading(false) })), showLinkPreview && previewUrl && (_jsx(LinkInputPreview, { url: previewUrl, onRemove: () => setPreviewDismissed(true) })), _jsxs("div", { className: "flex items-end gap-3 px-3 py-2", children: [_jsx("div", { className: "flex shrink-0 items-center", children: _jsx("button", { type: "button", onClick: handleToggleMoreOption, "aria-label": t("thread_detail.more_option.toggle"), "aria-expanded": isMoreOptionOpen, "data-testid": "conversation-detail-more-option-toggle", className: "flex py-3 items-center justify-center rounded-full", children: isMoreOptionOpen ? (_jsx(Icon, { icon: "close-circle-b", size: 24, className: "text-primary-400" })) : (_jsx(Icon, { icon: "plus-circle-o", size: 24, className: "text-gray-900" })) }) }), _jsx("div", { className: clsx("flex min-w-0 flex-1 overflow-hidden rounded-xl border bg-white transition-shadow", isFocused
251
255
  ? "border-primary-200 shadow-primary-focus"
252
256
  : "border-gray-50"), style: { minHeight: CONTAINER_MIN_HEIGHT }, children: _jsxs("div", { className: "flex min-w-0 flex-[1_0_0] items-center gap-2 self-stretch px-3 py-1", children: [onOpenBotMenu && (_jsx("button", { type: "button", onClick: onOpenBotMenu, "aria-label": t("thread_detail.bot.menu.open_menu"), "data-testid": "conversation-detail-open-bot-menu", className: "flex shrink-0 items-center justify-center", children: _jsx(Icon, { icon: "chat-suggest-o", size: 24, className: "text-gray-600" }) })), _jsx("textarea", { ref: textareaRef, value: value, rows: 1, onChange: (event) => handleChange(event.target.value), onFocus: handleFocus, onBlur: handleBlur, onKeyDown: handleKeyDown, placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : t("thread_detail.input_placeholder"), "data-testid": "conversation-detail-message-input", className: "conversation-message-input-scrollbar min-h-0 min-w-0 flex-1 resize-none appearance-none border-0 bg-transparent p-0 text-[16px] leading-[1.6] tracking-[0.16px] text-black outline-none ring-0 placeholder:text-gray-400 focus:border-0 focus:outline-none focus:ring-0" })] }) }), _jsx("div", { className: "flex shrink-0 items-center pb-1", children: _jsx("button", { type: "button", onClick: () => void handleSend(), disabled: !canSend, "data-testid": "conversation-detail-send", className: clsx("flex h-10 w-10 items-center justify-center rounded-full", canSend ? "bg-chat-send" : "bg-chat-send opacity-25"), children: _jsx(Icon, { icon: "send-b", size: 20, className: "text-white" }) }) })] }), isMoreOptionOpen && (_jsx(ConversationMoreOptionPanel, { disabled: !isConversationReady, options: moreOptions, onTriggerMediaInput: () => { var _a; return (_a = mediaInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); }, onTriggerDocumentInput: () => { var _a; return (_a = documentInputRef.current) === null || _a === void 0 ? void 0 : _a.click(); } }))] }));
253
257
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMessageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBzE,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,uBAAuB,GAAI,gBAAgB,4BAA4B,4CAyL5E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ConversationMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMessageList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBzE,MAAM,WAAW,4BAA4B;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,uBAAuB,GAAI,gBAAgB,4BAA4B,4CA0L5E,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -95,6 +95,6 @@ const ConversationMessageList = ({ bottomSlot }) => {
95
95
  target: scrollRef,
96
96
  enable: !!openToolboxMessageId,
97
97
  });
98
- return (_jsxs("div", { "data-testid": "conversation-message-list", className: "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-white", children: [isMessageLoading ? (_jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Spin, {}) })) : (_jsxs(MessageInfiniteScroll, { scrollRef: scrollRef, scrollableTargetId: "scrollableConversationMessagesDiv", loadState: loadState, moreOldLoading: moreOldLoading, onLoadMoreOld: loadMoreOldMessage, onScroll: handleInfiniteScroll, containerClassName: "h-full", empty: _jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Empty, { description: t("empty.no_messages") }) }), children: [bottomSlot, loadState.messageList.map((message, index, array) => (_jsx(MessageItem, { message: message, allMessages: array, isGroupChat: isGroupChat, forceHideTip: index === 0 && !!bottomSlot, contextMenuOpen: openToolboxMessageId === message.clientMsgID, onContextMenuOpenChange: (open) => setOpenToolboxMessageId(open ? message.clientMsgID : null), onQuoteMessage: setQuotedMessage, onRevokeMessage: handleRevokeMessage, onPressQuoteMessage: onPressQuoteMessage, onPinMessage: canPinMessage ? handlePinMessage : undefined, onUnpinMessage: canPinMessage ? handleUnpinMessage : undefined, enableLongPress: true }, message.clientMsgID)))] })), _jsx(PinLimitModal, { open: pinLimitModalOpen, max: pinnedTotalCount, onClose: () => setPinLimitModalOpen(false) })] }));
98
+ return (_jsxs("div", { "data-testid": "conversation-message-list", "data-cp-name": "ConversationMessageList", className: "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-x-hidden bg-white", children: [isMessageLoading ? (_jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Spin, {}) })) : (_jsxs(MessageInfiniteScroll, { scrollRef: scrollRef, scrollableTargetId: "scrollableConversationMessagesDiv", loadState: loadState, moreOldLoading: moreOldLoading, onLoadMoreOld: loadMoreOldMessage, onScroll: handleInfiniteScroll, containerClassName: "h-full", empty: _jsx("div", { className: "flex flex-1 items-center justify-center py-12", children: _jsx(Empty, { description: t("empty.no_messages") }) }), children: [bottomSlot, loadState.messageList.map((message, index, array) => (_jsx(MessageItem, { message: message, allMessages: array, isGroupChat: isGroupChat, forceHideTip: index === 0 && !!bottomSlot, contextMenuOpen: openToolboxMessageId === message.clientMsgID, onContextMenuOpenChange: (open) => setOpenToolboxMessageId(open ? message.clientMsgID : null), onQuoteMessage: setQuotedMessage, onRevokeMessage: handleRevokeMessage, onPressQuoteMessage: onPressQuoteMessage, onPinMessage: canPinMessage ? handlePinMessage : undefined, onUnpinMessage: canPinMessage ? handleUnpinMessage : undefined, enableLongPress: true }, message.clientMsgID)))] })), _jsx(PinLimitModal, { open: pinLimitModalOpen, max: pinnedTotalCount, onClose: () => setPinLimitModalOpen(false) })] }));
99
99
  };
100
100
  export default ConversationMessageList;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationMoreOptionItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMoreOptionItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI/D,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,0BAA0B,GAAI,sBAAsB,+BAA+B,4CA+BxF,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"ConversationMoreOptionItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMoreOptionItem.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI/D,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,0BAA0B,GAAI,sBAAsB,+BAA+B,4CAgCxF,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
@@ -12,7 +12,7 @@ const ConversationMoreOptionItem = ({ option, onSelect }) => {
12
12
  return;
13
13
  onSelect(option);
14
14
  };
15
- return (_jsxs("button", { type: "button", onClick: handleClick, disabled: !option.enabled, "aria-label": label, "data-testid": `more-option-${option.labelKey}`, className: clsx("flex flex-col items-center gap-1 rounded-xl px-1 transition-colors", option.enabled
15
+ return (_jsxs("button", { type: "button", onClick: handleClick, disabled: !option.enabled, "aria-label": label, "data-testid": `more-option-${option.labelKey}`, "data-cp-name": "ConversationMoreOptionItem", className: clsx("flex flex-col items-center gap-1 rounded-xl px-1 transition-colors", option.enabled
16
16
  ? "active:bg-chat-bubble-neutral/[0.08]"
17
17
  : "cursor-not-allowed opacity-40"), children: [_jsx("span", { className: "flex h-12 w-12 items-center justify-center rounded-full bg-gray-200/10", children: _jsx(Icon, { icon: option.icon, size: ICON_SIZE, className: "text-gray-900" }) }), _jsx("span", { className: "line-clamp-2 text-center text-[12px] leading-[1.4] text-gray-900", children: label })] }));
18
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationMoreOptionPanel.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMoreOptionPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,2BAA2B,GAAI,qFAMlC,gCAAgC,4CAkClC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"ConversationMoreOptionPanel.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ConversationMoreOptionPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,gBAAgB,EAEjB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACpD,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;CACrC;AAED,QAAA,MAAM,2BAA2B,GAAI,qFAMlC,gCAAgC,4CAmClC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -19,6 +19,6 @@ const ConversationMoreOptionPanel = ({ disabled = false, options = MORE_OPTIONS,
19
19
  }
20
20
  onSelectOption === null || onSelectOption === void 0 ? void 0 : onSelectOption(option);
21
21
  }, [onSelectOption, onTriggerMediaInput, onTriggerDocumentInput]);
22
- return (_jsx("div", { "data-testid": "conversation-more-option-panel", className: "grid grid-cols-4 gap-y-5 bg-white py-5", children: options.map((option) => (_jsx(ConversationMoreOptionItem, { option: Object.assign(Object.assign({}, option), { enabled: option.enabled && !disabled }), onSelect: handleSelectOption }, option.key))) }));
22
+ return (_jsx("div", { "data-testid": "conversation-more-option-panel", "data-cp-name": "ConversationMoreOptionPanel", className: "grid grid-cols-4 gap-y-5 bg-white py-5", children: options.map((option) => (_jsx(ConversationMoreOptionItem, { option: Object.assign(Object.assign({}, option), { enabled: option.enabled && !disabled }), onSelect: handleSelectOption }, option.key))) }));
23
23
  };
24
24
  export default ConversationMoreOptionPanel;
@@ -1 +1 @@
1
- {"version":3,"file":"PinLimitModal.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinLimitModal.tsx"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CAkChE,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"PinLimitModal.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinLimitModal.tsx"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,aAAa,GAAI,wBAAwB,kBAAkB,4CAmChE,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -3,6 +3,6 @@ import { Modal, Button } from "antd";
3
3
  import { useTranslation } from "react-i18next";
4
4
  const PinLimitModal = ({ open, max, onClose }) => {
5
5
  const { t } = useTranslation();
6
- return (_jsx(Modal, { open: open, onCancel: onClose, footer: null, centered: true, width: 400, children: _jsxs("div", { className: "flex flex-col gap-2 pt-2", role: "alertdialog", "aria-label": t("pin_limit_modal_title"), children: [_jsx("p", { className: "text-lg font-semibold text-gray-900", children: t("pin_limit_modal_title") }), _jsx("p", { className: "text-base text-gray-600", children: t("pin_limit_modal_description", { max }) }), _jsx(Button, { type: "primary", size: "large", block: true, className: "mt-2 !border-primary-400 !bg-primary-400 !text-white hover:!border-primary-300 hover:!bg-primary-300", onClick: onClose, children: t("pin_limit_modal_confirm") })] }) }));
6
+ return (_jsx(Modal, { open: open, onCancel: onClose, footer: null, centered: true, width: 400, "data-cp-name": "PinLimitModal", children: _jsxs("div", { className: "flex flex-col gap-2 pt-2", role: "alertdialog", "aria-label": t("pin_limit_modal_title"), children: [_jsx("p", { className: "text-lg font-semibold text-gray-900", children: t("pin_limit_modal_title") }), _jsx("p", { className: "text-base text-gray-600", children: t("pin_limit_modal_description", { max }) }), _jsx(Button, { type: "primary", size: "large", block: true, className: "mt-2 !border-primary-400 !bg-primary-400 !text-white hover:!border-primary-300 hover:!bg-primary-300", onClick: onClose, children: t("pin_limit_modal_confirm") })] }) }));
7
7
  };
8
8
  export default PinLimitModal;
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedMessageBar.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessageBar.tsx"],"names":[],"mappings":"AAwHA,QAAA,MAAM,gBAAgB,sDA8FrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"PinnedMessageBar.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessageBar.tsx"],"names":[],"mappings":"AA6HA,QAAA,MAAM,gBAAgB,sDAgGrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -19,7 +19,7 @@ const PINNED_SUBTITLE_KEY_BY_TYPE = {
19
19
  [MessageType.FileMessage]: "pinned_from_file",
20
20
  };
21
21
  const getPinnedMessageTitle = (message, t) => {
22
- var _a, _b, _c, _d, _e, _f, _g;
22
+ var _a, _b, _c, _d, _e, _f, _g, _h;
23
23
  switch (message.contentType) {
24
24
  case MessageType.UrlTextMessage:
25
25
  return (((_a = message.textElem) === null || _a === void 0 ? void 0 : _a.content) ||
@@ -34,7 +34,10 @@ const getPinnedMessageTitle = (message, t) => {
34
34
  case MessageType.FileMessage:
35
35
  return generateContentBasedOnMessageType(message.contentType, undefined, t, { fileName: (_e = message.fileElem) === null || _e === void 0 ? void 0 : _e.fileName });
36
36
  default:
37
- return ((_f = message.textElem) === null || _f === void 0 ? void 0 : _f.content) || ((_g = message.quoteElem) === null || _g === void 0 ? void 0 : _g.text) || "";
37
+ return (((_f = message.textElem) === null || _f === void 0 ? void 0 : _f.content) ||
38
+ ((_g = message.quoteElem) === null || _g === void 0 ? void 0 : _g.text) ||
39
+ ((_h = message.atTextElem) === null || _h === void 0 ? void 0 : _h.text) ||
40
+ "");
38
41
  }
39
42
  };
40
43
  const PinnedMessageThumbnail = ({ message }) => {
@@ -96,10 +99,11 @@ const PinnedMessageBar = () => {
96
99
  const showTitle = Boolean(title);
97
100
  const hasThumbnail = !isRevoked &&
98
101
  latestPinnedMessage.contentType !== MessageType.TextMessage &&
99
- latestPinnedMessage.contentType !== MessageType.QuoteMessage;
102
+ latestPinnedMessage.contentType !== MessageType.QuoteMessage &&
103
+ latestPinnedMessage.contentType !== MessageType.AtTextMessage;
100
104
  const hasFlushThumbnail = hasThumbnail &&
101
105
  latestPinnedMessage.contentType !== MessageType.FileMessage;
102
106
  const remainingPinnedCount = pinnedTotalCount - 1;
103
- return (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "pinned-message-bar", role: "button", tabIndex: 0, onClick: () => setIsPanelOpen(true), className: clsx("flex w-full shrink-0 cursor-pointer items-center gap-3 bg-gray-cool-25 pr-3", hasFlushThumbnail ? "py-0 pl-0" : "py-1 pl-3"), children: [hasThumbnail && (_jsx(PinnedMessageThumbnail, { message: latestPinnedMessage })), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [showTitle && (_jsx("p", { className: "truncate text-sm font-medium leading-[160%] text-gray-900", children: title })), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Icon, { icon: "thumbtack-b", size: 12, className: "text-primary-400" }), _jsx("p", { className: "truncate text-[13px] leading-[160%] text-gray-600", children: t(subtitleKey, { name: senderName }) })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [remainingPinnedCount > 0 && (_jsxs("span", { className: "flex min-w-[26px] items-center justify-center rounded-full border-2 border-white bg-gradient-danger-light px-1 text-xs font-bold leading-[160%] text-white", children: ["+", remainingPinnedCount] })), _jsx(Icon, { icon: "angle-down-o", size: 20, className: "text-gray-600" })] })] }), _jsx(PinnedMessagesPanel, { open: isPanelOpen, onClose: () => setIsPanelOpen(false) })] }));
107
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "pinned-message-bar", "data-cp-name": "PinnedMessageBar", role: "button", tabIndex: 0, onClick: () => setIsPanelOpen(true), className: clsx("flex w-full shrink-0 cursor-pointer items-center gap-3 bg-gray-cool-25 pr-3", hasFlushThumbnail ? "py-0 pl-0" : "py-1 pl-3"), children: [hasThumbnail && (_jsx(PinnedMessageThumbnail, { message: latestPinnedMessage })), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col justify-center", children: [showTitle && (_jsx("p", { className: "truncate text-sm font-medium leading-[160%] text-gray-900", children: title })), _jsxs("div", { className: "flex items-center gap-1", children: [_jsx(Icon, { icon: "thumbtack-b", size: 12, className: "text-primary-400" }), _jsx("p", { className: "truncate text-[13px] leading-[160%] text-gray-600", children: t(subtitleKey, { name: senderName }) })] })] }), _jsxs("div", { className: "flex shrink-0 items-center gap-1", children: [remainingPinnedCount > 0 && (_jsxs("span", { className: "flex min-w-[26px] items-center justify-center rounded-full border-2 border-white bg-gradient-danger-light px-1 text-xs font-bold leading-[160%] text-white", children: ["+", remainingPinnedCount] })), _jsx(Icon, { icon: "angle-down-o", size: 20, className: "text-gray-600" })] })] }), _jsx(PinnedMessagesPanel, { open: isPanelOpen, onClose: () => setIsPanelOpen(false) })] }));
104
108
  };
105
109
  export default PinnedMessageBar;
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedMessageItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessageItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAY9E,UAAU,sBAAsB;IAC9B,OAAO,EAAE,eAAe,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,uBAAuB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5C;AAED,QAAA,MAAM,iBAAiB,GAAI,yEAMxB,sBAAsB,4CAqFxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"PinnedMessageItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessageItem.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAY9E,UAAU,sBAAsB;IAC9B,OAAO,EAAE,eAAe,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,uBAAuB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,OAAO,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5C,MAAM,EAAE,CAAC,OAAO,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5C;AAED,QAAA,MAAM,iBAAiB,GAAI,yEAMxB,sBAAsB,4CAsFxB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -32,6 +32,6 @@ const PinnedMessageItem = ({ message, contextMenuOpen, onContextMenuOpenChange,
32
32
  event.stopPropagation();
33
33
  onUnpin(message);
34
34
  }, className: "flex h-7 w-7 shrink-0 items-center justify-center self-center rounded-full bg-gray-25 text-gray-600", children: _jsx(Icon, { icon: "thumbtack-off-o", size: 16 }) }));
35
- return (_jsxs("div", { className: clsx("flex items-end gap-2 px-3 pb-4", isMine ? "justify-end" : "justify-start"), children: [isMine && unpinButton, _jsx(Dropdown, { menu: { items: contextMenuItems }, trigger: ["contextMenu"], open: contextMenuOpen, onOpenChange: onContextMenuOpenChange, overlayClassName: MESSAGE_TOOLBOX_OVERLAY_CLASSNAME, children: _jsxs("div", { className: "relative min-w-0 cursor-pointer", onClick: () => onJump(message), children: [_jsx("div", { className: "pointer-events-none", children: bubbleNode }), pinnedBadgeNode] }) }), !isMine && unpinButton] }));
35
+ return (_jsxs("div", { "data-cp-name": "PinnedMessageItem", className: clsx("flex items-end gap-2 px-3 pb-4", isMine ? "justify-end" : "justify-start"), children: [isMine && unpinButton, _jsx(Dropdown, { menu: { items: contextMenuItems }, trigger: ["contextMenu"], open: contextMenuOpen, onOpenChange: onContextMenuOpenChange, overlayClassName: MESSAGE_TOOLBOX_OVERLAY_CLASSNAME, children: _jsxs("div", { className: "relative min-w-0 cursor-pointer", onClick: () => onJump(message), children: [_jsx("div", { className: "pointer-events-none", children: bubbleNode }), pinnedBadgeNode] }) }), !isMine && unpinButton] }));
36
36
  };
37
37
  export default PinnedMessageItem;
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedMessagesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessagesPanel.tsx"],"names":[],"mappings":"AAYA,UAAU,wBAAwB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,mBAAmB,GAAI,mBAAmB,wBAAwB,4CAmGvE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"PinnedMessagesPanel.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/PinnedMessagesPanel.tsx"],"names":[],"mappings":"AAYA,UAAU,wBAAwB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,mBAAmB,GAAI,mBAAmB,wBAAwB,4CAoGvE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -38,7 +38,7 @@ const PinnedMessagesPanel = ({ open, onClose }) => {
38
38
  setSearchClientMsgID(message.clientMsgID);
39
39
  emit("CHAT_LIST_SCROLL_TO_MESSAGE", message.clientMsgID);
40
40
  };
41
- return (_jsx(Drawer, { open: open, onClose: onClose, placement: "bottom", closeIcon: false, height: "90%", styles: {
41
+ return (_jsx(Drawer, { open: open, onClose: onClose, placement: "bottom", closeIcon: false, height: "90%", "data-cp-name": "PinnedMessagesPanel", styles: {
42
42
  body: { padding: 0 },
43
43
  mask: { backgroundColor: "rgba(0, 0, 0, 0.8)" },
44
44
  content: {
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadProfilePanel.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ThreadProfilePanel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAW7E,UAAU,uBAAuB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,gBAAgB,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACzD;AAED,QAAA,MAAM,kBAAkB,GAAI,oDAKzB,uBAAuB,4CAkEzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"ThreadProfilePanel.d.ts","sourceRoot":"","sources":["../../../src/components/conversation-detail/ThreadProfilePanel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAW7E,UAAU,uBAAuB;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,gBAAgB,CAAC;IAC/B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gBAAgB,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACzD;AAED,QAAA,MAAM,kBAAkB,GAAI,oDAKzB,uBAAuB,4CAmEzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -14,7 +14,7 @@ const ThreadProfilePanel = ({ open, conversation, onClose, onSelectResource, })
14
14
  const avatarUrl = useConversationAvatarUrl(conversation);
15
15
  const peerType = conversation.peerType;
16
16
  const badgeLabel = resolvePeerBadgeLabel(peerType, t);
17
- return (_jsx(Drawer, { open: open, onClose: onClose, placement: "right", closeIcon: false, width: "100%", styles: {
17
+ return (_jsx(Drawer, { open: open, onClose: onClose, placement: "right", closeIcon: false, width: "100%", "data-cp-name": "ThreadProfilePanel", styles: {
18
18
  body: { padding: 0 },
19
19
  }, getContainer: false, forceRender: true, destroyOnHidden: true, children: _jsxs("div", { className: "flex h-full flex-col bg-gray-25", children: [_jsxs("div", { className: "flex w-full items-center bg-white p-2", children: [_jsx("button", { type: "button", "data-testid": "thread-profile-back", className: "flex shrink-0 cursor-pointer items-center justify-center p-2 text-primary-400", onClick: onClose, children: _jsx(Icon, { icon: "arrow-left-o", size: 24 }) }), _jsx("p", { className: "min-w-0 flex-1 truncate px-2 text-[18px] font-bold leading-[1.6] text-gray-900", children: t("thread_detail.options_title") })] }), _jsxs("div", { className: "flex flex-col items-center gap-2 bg-white px-0 py-2", children: [_jsxs("div", { className: "relative h-24 w-24 shrink-0", children: [_jsx(Avatar, { size: PROFILE_AVATAR_SIZE, src: avatarUrl || undefined, alt: displayName, className: "uppercase", children: (displayName === null || displayName === void 0 ? void 0 : displayName.charAt(0)) || "A" }), badgeLabel && (_jsx("span", { className: clsx("absolute bottom-1 right-0 flex h-[17px] items-center justify-center rounded-md border border-white px-1 text-[10px] font-semibold leading-3 text-white shadow-badge-inset", resolvePeerBadgeColor(peerType)), children: badgeLabel }))] }), _jsx("p", { className: "w-full truncate text-center text-[18px] font-bold leading-[1.6] text-gray-900", children: displayName })] }), _jsx("div", { className: "flex flex-col px-3 py-1.5", children: _jsx(MediaEntryCard, { onSelect: onSelectResource }) })] }) }));
20
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"BotButtonMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation-detail/bot/BotButtonMessage.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI5D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,6CAKvB,qBAAqB,mDA8EvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"BotButtonMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation-detail/bot/BotButtonMessage.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI5D,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,gBAAgB,GAAI,6CAKvB,qBAAqB,mDAiFvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -27,6 +27,6 @@ const BotButtonMessage = ({ buttons, disabled, onSelect, onRestart, }) => {
27
27
  : option.label }), _jsx(Icon, { icon: "angle-right-o", size: CHEVRON_SIZE, className: "text-gray-900" })] }, option.id))) })) : (_jsx("div", { className: "flex flex-col gap-2", children: visibleButtons.map((option) => (_jsx("button", { type: "button", disabled: disabled, onClick: () => handleSelect(option.id), className: clsx("flex flex-1 items-center justify-center gap-2 rounded-lg border border-primary-400 bg-primary-25 px-3 py-2", "text-center text-[14px] font-[510] leading-[160%] text-primary-400 transition-colors", disabled && "cursor-not-allowed opacity-60"), children: _jsx("span", { children: option.id === BOT_DEFAULT_BUTTON_ID
28
28
  ? t("thread_detail.bot.restart")
29
29
  : option.label }) }, option.id))) }));
30
- return (_jsx("div", { className: "flex min-w-0 flex-col gap-2 px-3 py-1 sm:px-4", children: _jsx("div", { className: "flex min-w-0 items-end justify-start pl-3 pr-12", children: _jsx("div", { className: "flex min-w-0 max-w-[75%] flex-col items-start", children: _jsx(MessageBubble, { isMine: false, content: optionsNode }) }) }) }));
30
+ return (_jsx("div", { "data-cp-name": "BotButtonMessage", className: "flex min-w-0 flex-col gap-2 px-3 py-1 sm:px-4", children: _jsx("div", { className: "flex min-w-0 items-end justify-start pl-3 pr-12", children: _jsx("div", { className: "flex min-w-0 max-w-[75%] flex-col items-start", children: _jsx(MessageBubble, { isMine: false, content: optionsNode }) }) }) }));
31
31
  };
32
32
  export default BotButtonMessage;
@@ -1 +1 @@
1
- {"version":3,"file":"BotInactiveNotice.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation-detail/bot/BotInactiveNotice.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,iBAAiB,+CActB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"BotInactiveNotice.d.ts","sourceRoot":"","sources":["../../../../src/components/conversation-detail/bot/BotInactiveNotice.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,iBAAiB,+CAetB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}