@droppii-org/chat-sdk 0.3.7 → 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 (259) 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 +11 -0
  9. package/dist/components/common/InfoModal.d.ts.map +1 -0
  10. package/dist/components/common/InfoModal.js +13 -0
  11. package/dist/components/compose/ComposeNewMessageModal.d.ts.map +1 -1
  12. package/dist/components/compose/ComposeNewMessageModal.js +5 -7
  13. package/dist/components/conversation/ConversationByGroupItem.d.ts.map +1 -1
  14. package/dist/components/conversation/ConversationByGroupItem.js +5 -8
  15. package/dist/components/conversation/ConversationBySessionItem.js +5 -8
  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 +5 -7
  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.d.ts.map +1 -1
  111. package/dist/components/message/GroupMembersDrawer.js +4 -5
  112. package/dist/components/message/MessageHeader.d.ts.map +1 -1
  113. package/dist/components/message/MessageHeader.js +3 -2
  114. package/dist/components/message/MessageInfiniteScroll.d.ts.map +1 -1
  115. package/dist/components/message/MessageInfiniteScroll.js +1 -1
  116. package/dist/components/message/MessageList.d.ts.map +1 -1
  117. package/dist/components/message/MessageList.js +22 -12
  118. package/dist/components/message/SelectSession.js +1 -1
  119. package/dist/components/message/UnassignedSessionFooter.d.ts.map +1 -1
  120. package/dist/components/message/UnassignedSessionFooter.js +1 -1
  121. package/dist/components/message/footer/ActionBar.d.ts.map +1 -1
  122. package/dist/components/message/footer/ActionBar.js +4 -1
  123. package/dist/components/message/footer/ComposerEditor.js +1 -1
  124. package/dist/components/message/footer/ComposerTabs.d.ts.map +1 -1
  125. package/dist/components/message/footer/ComposerTabs.js +1 -1
  126. package/dist/components/message/footer/EmojiPicker.js +1 -1
  127. package/dist/components/message/footer/EnterHandler.d.ts.map +1 -1
  128. package/dist/components/message/footer/EnterHandler.js +10 -1
  129. package/dist/components/message/footer/FilePreview.d.ts.map +1 -1
  130. package/dist/components/message/footer/FilePreview.js +4 -4
  131. package/dist/components/message/footer/LinkInputPreview.d.ts.map +1 -1
  132. package/dist/components/message/footer/LinkInputPreview.js +1 -1
  133. package/dist/components/message/footer/MediaActions.js +1 -1
  134. package/dist/components/message/footer/SessionClosedModal.d.ts.map +1 -1
  135. package/dist/components/message/footer/SessionClosedModal.js +1 -1
  136. package/dist/components/message/footer/ToolbarPlugin.js +1 -1
  137. package/dist/components/message/footer/editorConfig.d.ts +2 -1
  138. package/dist/components/message/footer/editorConfig.d.ts.map +1 -1
  139. package/dist/components/message/footer/editorConfig.js +2 -0
  140. package/dist/components/message/footer/index.d.ts.map +1 -1
  141. package/dist/components/message/footer/index.js +16 -2
  142. package/dist/components/message/footer/mention/MentionMenu.d.ts +6 -0
  143. package/dist/components/message/footer/mention/MentionMenu.d.ts.map +1 -0
  144. package/dist/components/message/footer/mention/MentionMenu.js +51 -0
  145. package/dist/components/message/footer/mention/MentionNode.d.ts +20 -0
  146. package/dist/components/message/footer/mention/MentionNode.d.ts.map +1 -0
  147. package/dist/components/message/footer/mention/MentionNode.js +39 -0
  148. package/dist/components/message/footer/mention/extractMentions.d.ts +6 -0
  149. package/dist/components/message/footer/mention/extractMentions.d.ts.map +1 -0
  150. package/dist/components/message/footer/mention/extractMentions.js +66 -0
  151. package/dist/components/message/footer/mention/useMentionOptions.d.ts +8 -0
  152. package/dist/components/message/footer/mention/useMentionOptions.d.ts.map +1 -0
  153. package/dist/components/message/footer/mention/useMentionOptions.js +45 -0
  154. package/dist/components/message/item/AtTextMessage.d.ts +16 -0
  155. package/dist/components/message/item/AtTextMessage.d.ts.map +1 -0
  156. package/dist/components/message/item/AtTextMessage.js +112 -0
  157. package/dist/components/message/item/FileMessage.js +1 -1
  158. package/dist/components/message/item/GroupNotificationMessage.d.ts.map +1 -1
  159. package/dist/components/message/item/GroupNotificationMessage.js +2 -2
  160. package/dist/components/message/item/ImageMessage.js +1 -1
  161. package/dist/components/message/item/LinkCard.d.ts.map +1 -1
  162. package/dist/components/message/item/LinkCard.js +1 -1
  163. package/dist/components/message/item/LinkText.d.ts.map +1 -1
  164. package/dist/components/message/item/LinkText.js +1 -1
  165. package/dist/components/message/item/MergeImageMessage.js +1 -1
  166. package/dist/components/message/item/MessageBubble.d.ts.map +1 -1
  167. package/dist/components/message/item/MessageBubble.js +2 -2
  168. package/dist/components/message/item/QuoteMessage.d.ts.map +1 -1
  169. package/dist/components/message/item/QuoteMessage.js +1 -1
  170. package/dist/components/message/item/RevokeMessage.d.ts.map +1 -1
  171. package/dist/components/message/item/RevokeMessage.js +1 -1
  172. package/dist/components/message/item/VideoMessage.js +1 -1
  173. package/dist/components/message/item/index.d.ts.map +1 -1
  174. package/dist/components/message/item/index.js +7 -5
  175. package/dist/components/message/item/renderMessageContent.d.ts.map +1 -1
  176. package/dist/components/message/item/renderMessageContent.js +3 -0
  177. package/dist/components/message/reply/ReplyPreviewBar.d.ts.map +1 -1
  178. package/dist/components/message/reply/ReplyPreviewBar.js +1 -1
  179. package/dist/components/message/reply/ReplyQuoteContent.d.ts.map +1 -1
  180. package/dist/components/message/reply/ReplyQuoteContent.js +7 -5
  181. package/dist/components/message/toolbox/MessageToolboxMenu.js +1 -1
  182. package/dist/components/message/toolbox/getCopyableMessageText.d.ts.map +1 -1
  183. package/dist/components/message/toolbox/getCopyableMessageText.js +5 -3
  184. package/dist/components/message/toolbox/isPinnableMessageType.d.ts.map +1 -1
  185. package/dist/components/message/toolbox/isPinnableMessageType.js +1 -0
  186. package/dist/components/search-conversation/SearchAll.d.ts.map +1 -1
  187. package/dist/components/search-conversation/SearchAll.js +1 -1
  188. package/dist/components/search-conversation/SearchConversationAsMessages.d.ts.map +1 -1
  189. package/dist/components/search-conversation/SearchConversationAsMessages.js +1 -1
  190. package/dist/components/search-conversation/SearchConversationAsUsers.d.ts.map +1 -1
  191. package/dist/components/search-conversation/SearchConversationAsUsers.js +1 -1
  192. package/dist/components/search-conversation/SearchConversationMyInbox.js +1 -1
  193. package/dist/components/search-conversation/SearchDrawer.js +1 -1
  194. package/dist/components/search-conversation/SearchMessageOnCurrentConversation.d.ts.map +1 -1
  195. package/dist/components/search-conversation/SearchMessageOnCurrentConversation.js +1 -1
  196. package/dist/components/search-conversation/index.js +1 -1
  197. package/dist/components/search-conversation/item/SearchItemAsMessage.d.ts.map +1 -1
  198. package/dist/components/search-conversation/item/SearchItemAsMessage.js +1 -1
  199. package/dist/components/search-conversation/item/SearchItemAsUser.d.ts.map +1 -1
  200. package/dist/components/search-conversation/item/SearchItemAsUser.js +1 -1
  201. package/dist/components/session/DeskTeamInbox.d.ts.map +1 -1
  202. package/dist/components/session/DeskTeamInbox.js +3 -2
  203. package/dist/components/session/SessionFilterMenu.d.ts.map +1 -1
  204. package/dist/components/session/SessionFilterMenu.js +1 -1
  205. package/dist/components/thread/AssignConfirmModal.d.ts.map +1 -1
  206. package/dist/components/thread/AssignConfirmModal.js +1 -1
  207. package/dist/components/thread/GroupThreadInfo.d.ts.map +1 -1
  208. package/dist/components/thread/GroupThreadInfo.js +7 -4
  209. package/dist/components/thread/ManualAssignPopover.d.ts.map +1 -1
  210. package/dist/components/thread/ManualAssignPopover.js +1 -1
  211. package/dist/components/thread/SessionSection.d.ts.map +1 -1
  212. package/dist/components/thread/SessionSection.js +2 -2
  213. package/dist/components/thread/SingleThreadInfo.d.ts.map +1 -1
  214. package/dist/components/thread/SingleThreadInfo.js +1 -1
  215. package/dist/components/thread/ThreadInfo.js +1 -1
  216. package/dist/components/thread/UserSection.d.ts.map +1 -1
  217. package/dist/components/thread/UserSection.js +1 -1
  218. package/dist/components/video-player/VideoPlayerModal.d.ts.map +1 -1
  219. package/dist/components/video-player/VideoPlayerModal.js +1 -1
  220. package/dist/context/ChatContext.d.ts +1 -1
  221. package/dist/context/ChatContext.d.ts.map +1 -1
  222. package/dist/context/ChatContext.js +3 -1
  223. package/dist/hooks/global/useGlobalEvent.d.ts.map +1 -1
  224. package/dist/hooks/global/useGlobalEvent.js +128 -42
  225. package/dist/hooks/group/useCreateGroup.js +5 -5
  226. package/dist/hooks/group/useDismissGroup.d.ts.map +1 -1
  227. package/dist/hooks/group/useDismissGroup.js +18 -0
  228. package/dist/hooks/group/useGroupPermission.d.ts +1 -1
  229. package/dist/hooks/group/useGroupPermission.d.ts.map +1 -1
  230. package/dist/hooks/group/useGroupPermission.js +2 -2
  231. package/dist/hooks/message/useMessage.d.ts +4 -1
  232. package/dist/hooks/message/useMessage.d.ts.map +1 -1
  233. package/dist/hooks/message/useMessage.js +9 -2
  234. package/dist/hooks/message/useSendMessage.d.ts +8 -4
  235. package/dist/hooks/message/useSendMessage.d.ts.map +1 -1
  236. package/dist/hooks/message/useSendMessage.js +46 -12
  237. package/dist/hooks/session/useConversationSessionState.d.ts +2 -1
  238. package/dist/hooks/session/useConversationSessionState.d.ts.map +1 -1
  239. package/dist/hooks/session/useConversationSessionState.js +5 -5
  240. package/dist/layout/index.d.ts.map +1 -1
  241. package/dist/layout/index.js +17 -2
  242. package/dist/locales/vi/common.json +12 -0
  243. package/dist/locales/vi/conversation-inbox.json +4 -0
  244. package/dist/screens/conversation-detail/index.d.ts.map +1 -1
  245. package/dist/screens/conversation-detail/index.js +6 -7
  246. package/dist/store/auth.js +1 -1
  247. package/dist/store/conversation.d.ts.map +1 -1
  248. package/dist/store/conversation.js +103 -52
  249. package/dist/store/type.d.ts +11 -2
  250. package/dist/store/type.d.ts.map +1 -1
  251. package/dist/styles/global.css +1 -1
  252. package/dist/types/chat.d.ts +30 -2
  253. package/dist/types/chat.d.ts.map +1 -1
  254. package/dist/utils/common.d.ts.map +1 -1
  255. package/dist/utils/common.js +19 -9
  256. package/dist/utils/messageLog.d.ts +2 -2
  257. package/dist/utils/messageLog.d.ts.map +1 -1
  258. package/dist/utils/messageLog.js +33 -3
  259. 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",
@@ -0,0 +1,11 @@
1
+ import type { ReactNode } from "react";
2
+ export interface InfoModalProps {
3
+ open: boolean;
4
+ title: ReactNode;
5
+ okText: ReactNode;
6
+ onOk: () => void;
7
+ children: ReactNode;
8
+ }
9
+ declare const InfoModal: ({ open, title, okText, onOk, children }: InfoModalProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default InfoModal;
11
+ //# sourceMappingURL=InfoModal.d.ts.map
@@ -0,0 +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,4CA2BzE,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -0,0 +1,13 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Modal } from "antd";
4
+ const InfoModal = ({ open, title, okText, onOk, children }) => {
5
+ return (_jsx(Modal, { "data-cp-name": "InfoModal", centered: true, open: open, onOk: onOk, onCancel: onOk, okText: okText, cancelButtonProps: { style: { display: "none" } }, okButtonProps: {
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
+ }, styles: {
8
+ header: { textAlign: "center", marginBottom: 0 },
9
+ footer: { marginTop: 16 },
10
+ body: { paddingTop: 4 },
11
+ }, classNames: { footer: "border-t border-gray-25 pt-4" }, title: _jsx("span", { className: "text-[18px] font-bold text-gray-900", children: title }), getContainer: false, forceRender: true, children: children }));
12
+ };
13
+ export default InfoModal;
@@ -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,4CAwI7B,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"}
@@ -3,7 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useDebounce } from "ahooks";
4
4
  import { Avatar, Empty, Input, Modal, Spin } from "antd";
5
5
  import { useState } from "react";
6
- import { usePathname, useRouter, useSearchParams } from "next/navigation";
7
6
  import { useTranslation } from "react-i18next";
8
7
  import { SessionType } from "@droppii-org/wasm-client-sdk";
9
8
  import { Icon } from "../../components/icon";
@@ -11,6 +10,7 @@ import { useEligibleAccounts } from "../../hooks/group/useEligibleAccounts";
11
10
  import { DChatSDK } from "../../constants/sdk";
12
11
  import useConversationStore from "../../store/conversation";
13
12
  import CreateGroupForm from "../../components/group/CreateGroupForm";
13
+ import { useChatContext } from "../../context/ChatContext";
14
14
  const ComposeNewMessageModal = ({ open, onClose, }) => {
15
15
  const { t } = useTranslation("conversation-inbox");
16
16
  const [step, setStep] = useState("compose");
@@ -18,9 +18,7 @@ const ComposeNewMessageModal = ({ open, onClose, }) => {
18
18
  const [openingUserID, setOpeningUserID] = useState(null);
19
19
  const debouncedSearch = useDebounce(search, { wait: 300 });
20
20
  const { accounts, isLoading } = useEligibleAccounts(debouncedSearch, open);
21
- const router = useRouter();
22
- const pathname = usePathname();
23
- const searchParams = useSearchParams();
21
+ const { onNavigate } = useChatContext();
24
22
  const setConversationData = useConversationStore((state) => state.setConversationData);
25
23
  const setSelectedConversationId = useConversationStore((state) => state.setSelectedConversationId);
26
24
  const handleClose = () => {
@@ -44,18 +42,18 @@ const ComposeNewMessageModal = ({ open, onClose, }) => {
44
42
  });
45
43
  setConversationData(conversation);
46
44
  setSelectedConversationId(conversation.conversationID);
47
- const newSearchParams = new URLSearchParams(searchParams);
45
+ const newSearchParams = new URLSearchParams(window.location.search);
48
46
  newSearchParams.set("threadId", conversation.conversationID);
49
47
  newSearchParams.delete("userId");
50
48
  newSearchParams.delete("groupId");
51
49
  newSearchParams.delete("botId");
52
- router.push(`${pathname}?${newSearchParams.toString()}`);
50
+ onNavigate === null || onNavigate === void 0 ? void 0 : onNavigate(`${window.location.pathname}?${newSearchParams.toString()}`);
53
51
  handleClose();
54
52
  }
55
53
  finally {
56
54
  setOpeningUserID(null);
57
55
  }
58
56
  };
59
- 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 })) }));
60
58
  };
61
59
  export default ComposeNewMessageModal;
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationByGroupItem.d.ts","sourceRoot":"","sources":["../../../src/components/conversation/ConversationByGroupItem.tsx"],"names":[],"mappings":"AAGA,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,4CA8D9B,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"}
@@ -1,18 +1,15 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { usePathname, useRouter, useSearchParams } from "next/navigation";
4
3
  import { useTranslation } from "react-i18next";
5
4
  import useConversationStore from "../../store/conversation";
6
5
  import { useChatContext } from "../../context/ChatContext";
7
6
  import { formatTimestamp, parseLatestMessage } from "../../utils/common";
8
7
  import GroupCompositeAvatar from "../../components/group/GroupCompositeAvatar";
9
8
  import ThreadCard from "./ThreadCard";
9
+ import MentionIndicatorIcon from "./MentionIndicatorIcon";
10
10
  const ConversationByGroupItem = ({ group, latestPreview, }) => {
11
11
  const { t } = useTranslation();
12
- const user = useChatContext().user;
13
- const router = useRouter();
14
- const pathname = usePathname();
15
- const searchParams = useSearchParams();
12
+ const { user, onNavigate } = useChatContext();
16
13
  const setConversationData = useConversationStore((state) => state.setConversationData);
17
14
  const setSelectedConversationId = useConversationStore((state) => state.setSelectedConversationId);
18
15
  const isSelected = useConversationStore((state) => state.selectedConversationId === group.conversationId);
@@ -20,19 +17,19 @@ const ConversationByGroupItem = ({ group, latestPreview, }) => {
20
17
  const handleClick = () => {
21
18
  setConversationData(conversation);
22
19
  setSelectedConversationId(conversation.conversationID);
23
- const newSearchParams = new URLSearchParams(searchParams);
20
+ const newSearchParams = new URLSearchParams(window.location.search);
24
21
  newSearchParams.set("threadId", conversation.conversationID);
25
22
  newSearchParams.delete("userId");
26
23
  newSearchParams.delete("groupId");
27
24
  newSearchParams.delete("botId");
28
- router.push(`${pathname}?${newSearchParams.toString()}`);
25
+ onNavigate === null || onNavigate === void 0 ? void 0 : onNavigate(`${window.location.pathname}?${newSearchParams.toString()}`);
29
26
  };
30
27
  const latestMsg = (latestPreview === null || latestPreview === void 0 ? void 0 : latestPreview.latestMsg) || "";
31
28
  const latestMsgSendTime = (latestPreview === null || latestPreview === void 0 ? void 0 : latestPreview.latestMsgSendTime) || 0;
32
29
  return (_jsx(ThreadCard, { onClick: handleClick, isSelected: isSelected, unreadCount: conversation.unreadCount, preview: parseLatestMessage(latestMsg, user === null || user === void 0 ? void 0 : user.userID, t, {
33
30
  peerType: conversation.peerType,
34
31
  showName: conversation.showName,
35
- }), time: latestMsgSendTime > 0
32
+ }), mentionIndicator: _jsx(MentionIndicatorIcon, { groupAtType: conversation.groupAtType }), time: latestMsgSendTime > 0
36
33
  ? formatTimestamp(latestMsgSendTime, { hasTime: true })
37
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 }) }));
38
35
  };
@@ -2,7 +2,6 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { useTranslation } from "react-i18next";
4
4
  import useConversationStore from "../../store/conversation";
5
- import { usePathname, useRouter, useSearchParams } from "next/navigation";
6
5
  import { Avatar } from "antd";
7
6
  import { useChatContext } from "../../context/ChatContext";
8
7
  import { useConversationDisplayData } from "../../hooks/conversation/useConversation";
@@ -10,29 +9,27 @@ import { formatTimestamp, parseLatestMessage } from "../../utils/common";
10
9
  import { isGroupSession } from "../../utils/imCommon";
11
10
  import GroupCompositeAvatar from "../../components/group/GroupCompositeAvatar";
12
11
  import ThreadCard from "./ThreadCard";
12
+ import MentionIndicatorIcon from "./MentionIndicatorIcon";
13
13
  const ConversationBySessionItem = ({ sessionItem, latestPreview, }) => {
14
14
  var _a;
15
15
  const { t } = useTranslation();
16
- const user = useChatContext().user;
16
+ const { user, onNavigate } = useChatContext();
17
17
  const isSelected = useConversationStore((state) => {
18
18
  var _a;
19
19
  return state.selectedConversationId ===
20
20
  ((_a = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.conversation) === null || _a === void 0 ? void 0 : _a.conversationID);
21
21
  });
22
22
  const conversation = sessionItem === null || sessionItem === void 0 ? void 0 : sessionItem.conversation;
23
- const router = useRouter();
24
- const pathname = usePathname();
25
- const searchParams = useSearchParams();
26
23
  const setConversationData = useConversationStore((state) => state.setConversationData);
27
24
  const setSelectedConversationId = useConversationStore((state) => state.setSelectedConversationId);
28
25
  const handleConversationClick = (conversation) => {
29
26
  setConversationData(conversation);
30
- const newSearchParams = new URLSearchParams(searchParams);
27
+ const newSearchParams = new URLSearchParams(window.location.search);
31
28
  newSearchParams.set("threadId", conversation.conversationID);
32
29
  newSearchParams.delete("userId");
33
30
  newSearchParams.delete("groupId");
34
31
  newSearchParams.delete("botId");
35
- router.push(`${pathname}?${newSearchParams.toString()}`);
32
+ onNavigate === null || onNavigate === void 0 ? void 0 : onNavigate(`${window.location.pathname}?${newSearchParams.toString()}`);
36
33
  setSelectedConversationId(conversation.conversationID);
37
34
  };
38
35
  const { avatar, displayName = "" } = useConversationDisplayData(conversation || null);
@@ -43,7 +40,7 @@ const ConversationBySessionItem = ({ sessionItem, latestPreview, }) => {
43
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, {
44
41
  peerType: conversation.peerType,
45
42
  showName: conversation.showName,
46
- }), time: latestMsgSendTime > 0
43
+ }), mentionIndicator: _jsx(MentionIndicatorIcon, { groupAtType: conversation.groupAtType }), time: latestMsgSendTime > 0
47
44
  ? formatTimestamp(latestMsgSendTime, { hasTime: true })
48
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 }) }));
49
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"}