@tencentcloud/chat-uikit-react 1.2.2 → 2.1.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.
- package/.eslintrc.js +2 -1
- package/CHANGELOG.md +8 -2
- package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +2 -0
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/cjs/components/Icon/config.js +1 -1
- package/dist/cjs/components/Icon/images/chats-selected.svg.js +1 -0
- package/dist/cjs/components/Icon/images/chats.svg.js +1 -0
- package/dist/cjs/components/Icon/images/contacts-selected.svg.js +1 -0
- package/dist/cjs/components/Icon/images/contacts.svg.js +1 -0
- package/dist/cjs/components/Icon/images/files.png.js +1 -0
- package/dist/cjs/components/Icon/images/image.png.js +1 -1
- package/dist/cjs/components/Icon/images/video.png.js +1 -1
- package/dist/cjs/components/TUIChat/TUIChat.d.ts +5 -0
- package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
- package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
- package/dist/cjs/components/TUIChat/hooks/useHandleMessage.js +1 -1
- package/dist/cjs/components/TUIChat/hooks/useHandleMessageList.js +1 -1
- package/dist/cjs/components/TUIChat/unitls.js +1 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
- package/dist/cjs/components/TUIConversation/TUIConversation.js +1 -1
- package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +1 -0
- package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
- package/dist/cjs/components/TUIKit/TUIKit.js +1 -1
- package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageImage.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
- package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageVideo.js +1 -1
- package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
- package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/cjs/components/untils.js +1 -1
- package/dist/cjs/constants.js +1 -1
- package/dist/cjs/context/ComponentContext.d.ts +2 -0
- package/dist/cjs/context/TUIChatActionContext.d.ts +3 -14
- package/dist/cjs/context/TUIChatStateContext.d.ts +2 -0
- package/dist/cjs/context/TUIConversationContext.js +1 -1
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.d.css +240 -12
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en/TUIChat.js +1 -1
- package/dist/cjs/locales/en/TUIContact.js +1 -1
- package/dist/cjs/locales/en/TUIProfile.js +1 -1
- package/dist/cjs/locales/index.js +1 -1
- package/dist/cjs/locales/zh_cn/TUIChat.js +1 -1
- package/dist/cjs/locales/zh_cn/TUIContact.js +1 -1
- package/dist/cjs/locales/zh_cn/TUIProfile.js +1 -1
- package/dist/cjs/server.js +1 -0
- package/dist/cjs/utils/env.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +2 -0
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/esm/components/Icon/config.js +1 -1
- package/dist/esm/components/Icon/images/chats-selected.svg.js +1 -0
- package/dist/esm/components/Icon/images/chats.svg.js +1 -0
- package/dist/esm/components/Icon/images/contacts-selected.svg.js +1 -0
- package/dist/esm/components/Icon/images/contacts.svg.js +1 -0
- package/dist/esm/components/Icon/images/files.png.js +1 -0
- package/dist/esm/components/Icon/images/image.png.js +1 -1
- package/dist/esm/components/Icon/images/video.png.js +1 -1
- package/dist/esm/components/TUIChat/TUIChat.d.ts +5 -0
- package/dist/esm/components/TUIChat/TUIChat.js +1 -1
- package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
- package/dist/esm/components/TUIChat/hooks/useHandleMessage.js +1 -1
- package/dist/esm/components/TUIChat/hooks/useHandleMessageList.js +1 -1
- package/dist/esm/components/TUIChat/unitls.js +1 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
- package/dist/esm/components/TUIConversation/TUIConversation.js +1 -1
- package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +1 -0
- package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
- package/dist/esm/components/TUIKit/TUIKit.js +1 -1
- package/dist/esm/components/TUIManage/TUIManage.js +1 -1
- package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
- package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
- package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
- package/dist/esm/components/TUIMessage/MessageImage.js +1 -1
- package/dist/esm/components/TUIMessage/MessageName.js +1 -1
- package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
- package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
- package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
- package/dist/esm/components/TUIMessage/MessageText.js +1 -1
- package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
- package/dist/esm/components/TUIMessage/MessageVideo.js +1 -1
- package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/esm/components/TUIMessage/utils/index.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
- package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/esm/components/untils.js +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/context/ComponentContext.d.ts +2 -0
- package/dist/esm/context/TUIChatActionContext.d.ts +3 -14
- package/dist/esm/context/TUIChatStateContext.d.ts +2 -0
- package/dist/esm/context/TUIConversationContext.js +1 -1
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.d.css +240 -12
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en/TUIChat.js +1 -1
- package/dist/esm/locales/en/TUIContact.js +1 -1
- package/dist/esm/locales/en/TUIProfile.js +1 -1
- package/dist/esm/locales/index.js +1 -1
- package/dist/esm/locales/zh_cn/TUIChat.js +1 -1
- package/dist/esm/locales/zh_cn/TUIContact.js +1 -1
- package/dist/esm/locales/zh_cn/TUIProfile.js +1 -1
- package/dist/esm/server.js +1 -0
- package/dist/esm/utils/env.js +1 -0
- package/package.json +7 -6
- package/rollup.config.js +0 -1
- package/scripts/publish-github.js +60 -0
- package/scripts/publish-intl-demo.js +14 -0
- package/scripts/publish-npm.js +22 -0
- package/src/components/Avatar/styles/index.scss +1 -0
- package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +6 -3
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +5 -1
- package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +7 -2
- package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +1 -0
- package/src/components/ConversationCreate/styles/index.scss +2 -0
- package/src/components/ConversationPreview/ConversationPreview.tsx +2 -0
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +57 -9
- package/src/components/ConversationPreview/styles/index.scss +4 -2
- package/src/components/ConversationPreview/utils.tsx +5 -1
- package/src/components/DivWithEdit/styles/index.scss +2 -1
- package/src/components/Icon/config.ts +1 -1
- package/src/components/Icon/images/chats-selected.svg +6 -0
- package/src/components/Icon/images/chats.svg +9 -0
- package/src/components/Icon/images/contacts-selected.svg +3 -0
- package/src/components/Icon/images/contacts.svg +6 -0
- package/src/components/Icon/images/files.png +0 -0
- package/src/components/Icon/images/image.png +0 -0
- package/src/components/Icon/images/language.svg +3 -0
- package/src/components/Icon/images/video.png +0 -0
- package/src/components/Model/styles/layout.scss +1 -1
- package/src/components/Profile/styles/index.scss +4 -0
- package/src/components/TUIChat/TUIChat.tsx +74 -120
- package/src/components/TUIChat/TUIChatState.tsx +18 -45
- package/src/components/TUIChat/hooks/useHandleMessage.tsx +8 -0
- package/src/components/TUIChat/hooks/useHandleMessageList.tsx +2 -41
- package/src/components/TUIChat/unitls.ts +0 -29
- package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +7 -1
- package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -1
- package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +1 -1
- package/src/components/TUIConversation/TUIConversation.tsx +1 -4
- package/src/components/TUIConversationList/TUIConversationList.tsx +91 -65
- package/src/components/TUIConversationList/index.scss +5 -0
- package/src/components/TUIKit/TUIKit.tsx +133 -9
- package/src/components/TUIKit/styles/h5.scss +34 -0
- package/src/components/TUIKit/styles/index.scss +103 -0
- package/src/components/TUIKit/styles/reset.scss +20 -0
- package/src/components/TUIManage/TUIManage.tsx +59 -35
- package/src/components/TUIManage/styles/index.scss +15 -1
- package/src/components/TUIMessage/MessageBubble.tsx +20 -3
- package/src/components/TUIMessage/MessageCustom.tsx +11 -2
- package/src/components/TUIMessage/MessageImage.tsx +2 -1
- package/src/components/TUIMessage/MessageName.tsx +1 -1
- package/src/components/TUIMessage/MessagePlugins.tsx +4 -2
- package/src/components/TUIMessage/MessageRevoke.tsx +2 -2
- package/src/components/TUIMessage/MessageText.tsx +25 -3
- package/src/components/TUIMessage/MessageVideo.tsx +8 -5
- package/src/components/TUIMessage/hooks/useMessageHandler.ts +13 -33
- package/src/components/TUIMessage/styles/color.scss +1 -0
- package/src/components/TUIMessage/styles/layout.scss +33 -6
- package/src/components/TUIMessage/utils/index.ts +1 -1
- package/src/components/TUIMessageInput/TUIMessageInputDefault.tsx +2 -2
- package/src/components/TUIMessageInput/hooks/useEmojiPicker.tsx +2 -6
- package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +4 -3
- package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +10 -3
- package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +10 -14
- package/src/components/TUIMessageInput/styles/color.scss +1 -1
- package/src/components/TUIMessageInput/styles/layout.scss +7 -2
- package/src/components/TUIMessageList/TUIMessageList.tsx +9 -13
- package/src/components/TUIMessageList/index.ts +0 -1
- package/src/components/TUIProfile/TUIProfileDefault.tsx +65 -51
- package/src/components/TUIProfile/styles/layout.scss +6 -0
- package/src/components/untils.ts +9 -0
- package/src/constants.ts +4 -1
- package/src/context/ComponentContext.tsx +2 -0
- package/src/context/TUIChatActionContext.tsx +3 -23
- package/src/context/TUIChatStateContext.tsx +2 -0
- package/src/context/TUIKitContext.tsx +0 -1
- package/src/index.ts +3 -0
- package/src/locales/en/TUIChat.ts +2 -1
- package/src/locales/en/TUIContact.ts +1 -1
- package/src/locales/en/TUIProfile.ts +5 -4
- package/src/locales/index.ts +1 -1
- package/src/locales/zh_cn/TUIChat.ts +1 -0
- package/src/locales/zh_cn/TUIContact.ts +1 -1
- package/src/locales/zh_cn/TUIProfile.ts +1 -0
- package/src/server.ts +44 -0
- package/src/utils/env.ts +5 -0
- package/tsconfig.json +1 -0
- package/dist/cjs/components/Icon/images/document.png.js +0 -1
- package/dist/cjs/components/TUIChat/hooks/useCreateMessage.d.ts +0 -59
- package/dist/cjs/components/TUIChat/hooks/useCreateMessage.js +0 -1
- package/dist/cjs/components/TUIChat/hooks/useMessageReceviedListener.js +0 -1
- package/dist/cjs/components/TUIMessageList/hooks/useEnrichedMessageList.js +0 -1
- package/dist/esm/components/Icon/images/document.png.js +0 -1
- package/dist/esm/components/TUIChat/hooks/useCreateMessage.d.ts +0 -59
- package/dist/esm/components/TUIChat/hooks/useCreateMessage.js +0 -1
- package/dist/esm/components/TUIChat/hooks/useMessageReceviedListener.js +0 -1
- package/dist/esm/components/TUIMessageList/hooks/useEnrichedMessageList.js +0 -1
- package/src/components/TUIChat/hooks/useCreateMessage.tsx +0 -198
- package/src/components/TUIChat/hooks/useMessageReceviedListener.tsx +0 -26
- package/src/components/TUIMessageList/hooks/useEnrichedMessageList.tsx +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";module.exports={TUIChat:"TUIChat",Recall:"Recall",Reference:"Reference",Forward:"Forward",Copy:"Copy",Delete:"Delete","Forward to":"Forward to","recalled a message":"recalled a message","Re-edit":"Re-edit",Resend:"Resend",You:"You","Recent Chats":"Recent Chats","Frequently Contacted":"Frequently Contacted","No Result":"No Result","Search Result":"Search Result",Image:"Image",Video:"Video",File:"File","Enter a message":"Enter a message","No More":"No More","Error deleting message":"Error deleting message","The message recall exceeded the time limit (default 2 minutes)":"The message recall exceeded the time limit (default 2 minutes)","Error revoke Message":"Error revoke Message"};
|
|
1
|
+
"use strict";module.exports={TUIChat:"TUIChat",Recall:"Recall",Reference:"Reference",Forward:"Forward",Copy:"Copy",Delete:"Delete","Forward to":"Forward to","recalled a message":"recalled a message","Re-edit":"Re-edit",Resend:"Resend",You:"You ","Recent Chats":"Recent Chats","Frequently Contacted":"Frequently Contacted","No Result":"No Result","Search Result":"Search Result",Image:"Image",Video:"Video",File:"File","Enter a message":"Enter a message","No More":"No More","Error deleting message":"Error deleting message","The message recall exceeded the time limit (default 2 minutes)":"The message recall exceeded the time limit (default 2 minutes)","Error revoke Message":"Error revoke Message","Custom message":"Custom message"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";module.exports={"Enter a userID":"Enter a userID","Enter the verification info":"Enter the verification info","Request to join":"Request to join",Requested:"Requested",Accept:"Accept",Refuse:"Refuse",Handled:"Handled",
|
|
1
|
+
"use strict";module.exports={"Enter a userID":"Enter a userID","Enter the verification info":"Enter the verification info","Request to join":"Request to join",Requested:"Requested",Accept:"Accept",Refuse:"Refuse",Handled:"Handled",Friends:"Friends","Send Message":"Send Message",Signature:"Signature","New Contacts":"New Contacts","Blocked List":"Blocked List","No Result":"No Result",ID:"ID",User:"User","Add Friend":"Add Friend",remark:"remark",block:"block","Delete friend":"Delete friend","waiting for verification":"waiting for verification","verification info":"verification info","Send application":"Send application",Agree:"Agree"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";module.exports={"Personal information":"Personal information",Signature:"Signature",Gender:"Gender",Male:"Male",Female:"Female",AllowType:"
|
|
1
|
+
"use strict";module.exports={"Personal information":"Personal information",Signature:"Signature",Gender:"Gender",Male:"Male",Female:"Female",AllowType:"Friend Request",NeedConfirm:"Anyone upon Request",AllowAny:"Allow any user to add you as friend",DenyAny:"Decline friend request from any user",Birthday:"Birthday",Unknow:"Not set"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("i18next"),t=require("react-i18next"),r=require("./en/index.js"),n=require("./zh_cn/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),u={en:{translation:r.message},zh:{translation:n.message}};a.default.use(t.initReactI18next).init({resources:u,lng:"
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("i18next"),t=require("react-i18next"),r=require("./en/index.js"),n=require("./zh_cn/index.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=i(e),u={en:{translation:r.message},zh:{translation:n.message}};a.default.use(t.initReactI18next).init({resources:u,lng:"en",interpolation:{escapeValue:!1}});var s=a.default.t;Object.defineProperty(exports,"i18next",{enumerable:!0,get:function(){return a.default}}),exports.t=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";module.exports={Recall:"撤回",Reference:"引用",Forward:"转发",Copy:"复制",Delete:"删除","Forward to":"转发给","recalled a message":"撤回了一条消息","Re-edit":"重新编辑",Resend:"重新发送",You:"您","Recent Chats":"会话","Frequently Contacted":"最近的会话","No Result":"无搜索结果","Search Result":"搜索结果",Image:"图片",Video:"视频",File:"文件","Enter a message":"请输入消息","No More":"没有更多","Error deleting message":"消息删除失败","The message recall exceeded the time limit (default 2 minutes)":"消息已超过 2 分钟","Error revoke Message":"消息撤回失败"};
|
|
1
|
+
"use strict";module.exports={Recall:"撤回",Reference:"引用",Forward:"转发",Copy:"复制",Delete:"删除","Forward to":"转发给","recalled a message":"撤回了一条消息","Re-edit":"重新编辑",Resend:"重新发送",You:"您","Recent Chats":"会话","Frequently Contacted":"最近的会话","No Result":"无搜索结果","Search Result":"搜索结果",Image:"图片",Video:"视频",File:"文件","Enter a message":"请输入消息","No More":"没有更多","Error deleting message":"消息删除失败","The message recall exceeded the time limit (default 2 minutes)":"消息已超过 2 分钟","Error revoke Message":"消息撤回失败","Custom message":"自定义消息"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";module.exports={"Enter a userID":"请输入用户 ID,回车搜索","Enter the verification info":"请填写验证信息","Request to join":"申请加入",Requested:"已申请",Accept:"接受",Refuse:"拒绝",Handled:"已处理",
|
|
1
|
+
"use strict";module.exports={"Enter a userID":"请输入用户 ID,回车搜索","Enter the verification info":"请填写验证信息","Request to join":"申请加入",Requested:"已申请",Accept:"接受",Refuse:"拒绝",Handled:"已处理",Friends:"我的好友","Send Message":"发送消息",Signature:"个性签名","Successful application, waiting for the administrator to agree to join the group application":"等待管理员同意","New Contacts":"新的联系人","Blocked List":"黑名单","No Result":"无搜索结果",ID:"ID",User:"联系人","Add Friend":"添加好友",remark:"备注",block:"加入黑名单","Delete friend":"删除好友","waiting for verification":"等待验证","verification info":"验证信息","Send application":"发送申请",Agree:"同意"};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";module.exports={"Personal information":"个人信息",Signature:"个性签名",Gender:"性别",Male:"男",Female:"女",AllowType:"加好友验证方式",NeedConfirm:"需要验证",AllowAny:"同意任何用户加好友",DenyAny:"拒绝任何用户加好友",Birthday:"生日"};
|
|
1
|
+
"use strict";module.exports={"Personal information":"个人信息",Signature:"个性签名",Gender:"性别",Male:"男",Female:"女",AllowType:"加好友验证方式",NeedConfirm:"需要验证",AllowAny:"同意任何用户加好友",DenyAny:"拒绝任何用户加好友",Birthday:"生日",Unknown:"未设置"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var t=require("@tencentcloud/tui-core"),n=require("@tencentcloud/chat-uikit-engine");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=e(t),i=e(n),u=function(){function n(){o.default.registerEvent(t.TUIConstants.TUILogin.EVENT.LOGIN_STATE_CHANGED,t.TUIConstants.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS,this)}return n.prototype.onNotifyEvent=function(n,e){if(n===t.TUIConstants.TUILogin.EVENT.LOGIN_STATE_CHANGED&&e===t.TUIConstants.TUILogin.EVENT_SUB_KEY.USER_LOGIN_SUCCESS)this.login()},n.prototype.login=function(){var n=t.TUILogin.getContext(),e=n.chat,o=n.SDKAppID,u=n.userID,r=n.userSig;i.default.login({chat:e,SDKAppID:o,userID:u,userSig:r})},n}();module.exports=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@tencentcloud/universal-api"),t="pc"===e.getPlatform(),r="h5"===e.getPlatform();exports.isH5=r,exports.isPC=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as e,__assign as t,__awaiter as r,__generator as
|
|
1
|
+
import{__spreadArray as e,__assign as t,__awaiter as r,__generator as o}from"tslib";import{jsxs as a,Fragment as n,jsx as i}from"react/jsx-runtime";import{useState as c}from"react";import{useTranslation as s}from"react-i18next";import{TUIConversationService as u}from"@tencentcloud/chat-uikit-engine";import{Input as p}from"../Input/Input.js";import{Icon as l}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{Avatar as v}from"../Avatar/Avatar.js";import{defaultUserAvatar as d,defaultGroupAvatarAVChatRoom as f,defaultGroupAvatarMeeting as g,defaultGroupAvatarPublic as h,defaultGroupAvatarWork as C}from"../Avatar/default.js";import{PageStateTypes as I}from"./ConversationCreate.js";import{ConversationGroupTypeInfo as x,typeInfoList as N,GroupType as b}from"./ConversationGroupTypeInfo.js";import{useTUIKitContext as T}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function y(y){var k=this,U=y.profileList,j=y.pageState,P=y.setPageState,G=y.createConversation,D=y.setConversationCreated,A=s().t,R=T(),w=R.setActiveConversation,O=R.myProfile,S=e([],U,!0);S.unshift(O);var L=S.map((function(e){return e.nick||e.userID})).toString(),W=c(L.length>=15?"".concat(L.slice(0,12),"..."):L),_=W[0],E=W[1],M=c(""),Y=M[0],q=M[1],z=c("Work"),H=z[0],K=z[1],V=function(e,t){var r=e.target.value;switch(t){case"name":E(r);break;case"id":q(r);break;case"type":K(r)}},B=function(){P(I.GROUP_TYPE)};return j!==I.GROUP_TYPE?a(n,{children:[a("div",t({className:"tui-conversation-create-group-detail"},{children:[i("div",t({className:"create-group-box create-group-name"},{children:i(p,{maxLength:15,value:_,onChange:function(e){V(e,"name")},border:"bottom",customClassName:"input-group-name",clearable:!0,prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group Name")}))})})),i("div",t({className:"create-group-box create-group-id"},{children:i(p,{border:"bottom",customClassName:"input-group-text",clearable:!0,value:Y,onChange:function(e){V(e,"id")},prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group ID")}))})})),i("div",t({className:"create-group-box create-group-type",onClick:B},{children:i(p,{readOnly:!0,border:"bottom",customClassName:"input-group-text",prefix:i("div",t({className:"input-group-title"},{children:A("TUIConversation.Group Type")})),suffix:i(l,{onClick:B,type:m.ARROW_RIGHT,width:7,height:12}),value:A("TUIConversation.".concat(H)),onChange:function(e){V(e,"type")}})})),i("div",t({className:"create-group-illustrate"},{children:A("TUIConversation.".concat(N.find((function(e){return e.type===H})).des))})),a("div",t({className:"create-group-portrait"},{children:[i("div",t({className:"create-group-portrait-title"},{children:A("TUIConversation.Participants")})),i("div",t({className:"create-group-portrait-info-container"},{children:U.map((function(e){var r=e.avatar,o=e.userID,n=e.nick;return a("div",t({className:"create-group-portrait-info"},{children:[i(v,{shape:"square",size:50,image:r||d}),i("div",t({className:"create-group-portrait-info-nick"},{children:n}))]}),o)}))}))]}))]})),i("div",t({className:"tui-conversation-create-next-container"},{children:i("div",t({role:"presentation",className:"tui-conversation-create-next",onClick:function(){return r(k,void 0,void 0,(function(){var e,t,r;return o(this,(function(o){switch(o.label){case 0:return e=U.map((function(e){return{userID:e.userID}})),t=function(e){switch(e){case"Work":return C;case"Public":return h;case"Meeting":return g;case"AVChatRoom":return f;default:return""}}(H),[4,G({name:_,type:b[H],groupID:Y,avatar:t,memberList:e})];case 1:return r=o.sent(),w(r),u.switchConversation(null==r?void 0:r.conversationID),D(!1),[2]}}))}))}},{children:A("TUIConversation.Create")}))}))]}):i(x,{groupType:H,setGroupType:K,setPageState:P})}export{y as ConversationCreatGroupDetail};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as r,__spreadArray as n}from"tslib";import{jsxs as i,Fragment as o,jsx as c}from"react/jsx-runtime";import{useState as a,useRef as s}from"react";import{useTranslation as u}from"react-i18next";import{
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as r,__spreadArray as n}from"tslib";import{jsxs as i,Fragment as o,jsx as c}from"react/jsx-runtime";import{useState as a,useRef as s}from"react";import{useTranslation as u}from"react-i18next";import{TUIConversationService as l}from"@tencentcloud/chat-uikit-engine";import{Input as m}from"../Input/Input.js";import{Icon as p}from"../Icon/Icon.js";import{IconTypes as v}from"../Icon/type.js";import{ConversationCreateSelectView as h}from"./ConversationCreateSelectView.js";import{Avatar as d}from"../Avatar/Avatar.js";import{defaultUserAvatar as f}from"../Avatar/default.js";import{useConversationCreate as C}from"./hooks/useConversationCreate.js";import{useTUIKitContext as x}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{PageStateTypes as I}from"./ConversationCreate.js";import{useConversation as g}from"../../hooks/useConversation.js";import{Toast as N}from"../Toast/index.js";function k(k){var j=this,b=k.isCreateGroup,T=k.selectList,y=k.setSelectList,A=k.className,D=k.conversationList,L=k.setIsCreateGroup,S=k.setConversationCreated,w=k.setPageState,U=u().t,E=a(""),R=E[0],F=E[1],G=x(),M=G.chat,P=G.setActiveConversation,z=a({}),H=z[0],K=z[1],O=C(M,D,(function(e){K(e)})).getFriendListSortSearchResult,V=g(M).createConversation,_=s(new Map);return i(o,{children:[c(m,{className:"tui-conversation-create-search-input",placeholder:U("TUIConversation.Search"),clearable:!0,value:R,onChange:function(e){return t(j,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return t=e.target.value,F(t),n=K,[4,O(t)];case 1:return n.apply(void 0,[r.sent()]),[2]}}))}))},prefix:c(p,{type:v.SEARCH,height:16,width:16})}),b&&c(h,{selectList:T,setSelectList:y}),!b&&i("div",e({role:"presentation",className:"tui-user",onClick:function(){L(!0),_.current.clear(),y([])}},{children:[c(p,{type:v.ADD}),c("div",e({className:"tui-user-name active"},{children:U("TUIConversation.New group chat")}))]})),c("div",e({className:"tui-conversation-create ".concat(A)},{children:c("div",e({className:"tui-conversation-create-container"},{children:c("div",e({className:"tui-group-container"},{children:Object.keys(H).map((function(o){return 0!==H[o].length&&i("div",e({className:"tui-group-box"},{children:[c("div",e({className:"title"},{children:o})),H[o].map((function(a,s){var u=a.userID,m=a.nick,p=a.avatar;return i("label",e({role:"presentation",className:"tui-user tui-user-checkbox-label",htmlFor:"userChecked-".concat(o,"-").concat(u),onClick:function(e){!function(e){t(j,void 0,void 0,(function(){var t,n;return r(this,(function(r){switch(r.label){case 0:return b?[2]:(t=e.userID,[4,V("C2C".concat(t))]);case 1:return n=r.sent(),S(!1),P(n),l.switchConversation(null==n?void 0:n.conversationID),[2]}}))}))}(a)}},{children:[c(d,{size:30,image:p||f}),c("div",e({className:"tui-user-name text-ellipsis"},{children:m||"".concat(u)})),b&&c("input",{onChange:function(e){!function(e,t,r){void 0===r&&(r=[]);var i=t.userID,o=e.target.checked;r.forEach((function(e){e.checked=o})),o?T.push({profile:t,domList:r}):T.splice(T.findIndex((function(e){return e.profile.userID===i})),1),y(n([],T,!0))}(e,a,_.current.get(u))},type:"checkbox",ref:function(e){!function(e,t){if(t){_.current.has(e)||_.current.set(e,[]);var r=_.current.get(e);0!==r.length&&r.some((function(e){return e.id===t.id}))||r.push(t)}}(u,e)},id:"userChecked-".concat(o,"-").concat(u),className:"tui-user-checkbox"})]}),u)}))]}),o)}))}))}))})),b&&c("div",e({className:"tui-conversation-create-next-container"},{children:c("div",e({role:"presentation",className:"tui-conversation-create-next",onClick:function(){T&&0===T.length?N({text:U("TUIConversation.Participant cannot be empty"),type:"error"}):w(I.CREATE_DETAIL)}},{children:U("TUIConversation.Next")}))}))]})}export{k as ConversationCreateUserSelectList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as e,__generator as t}from"tslib";import{useState as r,useEffect as o}from"react";import n from"@tencentcloud/chat";import{strChineseFirstPy as i}from"../static/word.js";import"react/jsx-runtime";import"@tencentcloud/chat-uikit-engine";import"react-i18next";import"../../../utils/env.js";import"../../../context/TUIMessageContext.js";import"../../Icon/config.js";import"../../Icon/type.js";import"date-fns";import"date-fns/locale";import"../ConversationCreate.js";import"../ConversationGroupTypeInfo.js";import"../../../constants.js";import"../../TUIMessage/hooks/useMessageReply.js";import"../../TUIMessage/MessagePlugins.js";import"../../TUIMessage/MessageContext.js";import"../../TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../../Switch/Switch.js";import"../../TUIProfile/TUIProfileDefault.js";import"../../../locales/index.js";import{useProfile as s}from"../../../hooks/useProfile.js";var c=function(c,u,a){var f=r({}),p=f[0],l=f[1],m=function(e){var t=e.trim(),r=t.charCodeAt(0);return r>40869||r<19968?t.charAt(0):i.charAt(r-19968)},d=function(){return e(void 0,void 0,void 0,(function(){var e,r,o,i;return t(this,(function(t){switch(t.label){case 0:return u.filter((function(e){return e.type===n.TYPES.CONV_C2C})).slice(0,5).map((function(e){return e.userProfile})),[4,c.getFriendList()];case 1:return e=t.sent(),r=e.code,o=e.data,0===r&&(i=v(o.map((function(e){return e.profile}))),l(i),a&&a(i,l)),[2]}}))}))},v=function(e,t){for(var r={"#":[]},o=65;o<=90;o+=1)r[String.fromCharCode(o)]=[];return e.forEach((function(e){var t=e.nick,o=e.userID,n=m(t||o);n>="a"&&n<="z"?r[n.toLocaleUpperCase()].push(e):n<"A"||n>"z"?r["#"].push(e):r[n].push(e)})),Object.keys(r).forEach((function(e){r[e].sort((function(e,t){var r=e.nick,o=e.userID,n=t.nick,i=t.userID;return r||o<n||i||r||o===n||i?1:-1}))})),r},h=s(c).getUserProfile;return o((function(){d()}),[c]),{getFirstLetter:m,queryFriendList:d,getFriendListSortSearchResult:function(r){return e(void 0,void 0,void 0,(function(){var e,o,n,i;return t(this,(function(t){switch(t.label){case 0:return r?[4,h([r])]:[2,p];case 1:return e=t.sent().data,o={},n=!1,Object.keys(p).forEach((function(e){o[e]=p[e].filter((function(e){var t,o,i=e.nick,s=e.userID,c=i.toLocaleLowerCase(),u=r.toLocaleLowerCase(),a=s.toLocaleLowerCase();return o="TencentCloudDemo"===(null===(t=process.env)||void 0===t?void 0:t.REACT_APP_ONLINE)?c?c.includes(u):a.includes(u):a===u,n=n||o,o}))})),"TencentCloudDemo"===(null===(i=process.env)||void 0===i?void 0:i.REACT_APP_ONLINE)?[2,o]:[2,n?o:v(e)]}}))}))},friendListSortResult:p}};export{c as useConversationCreate};
|
|
@@ -25,6 +25,8 @@ interface ConversationPreviewProps {
|
|
|
25
25
|
setActiveConversation?: TUIKitContextValue['setActiveConversation'];
|
|
26
26
|
searchValue?: string;
|
|
27
27
|
conversationUpdateCount?: number;
|
|
28
|
+
activeConversationID?: string;
|
|
29
|
+
setActiveConversationID?: (conversationID: string) => void;
|
|
28
30
|
}
|
|
29
31
|
declare function ConversationPreview<T extends ConversationPreviewProps>(props: T): React.ReactElement;
|
|
30
32
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useState as e,useEffect as n}from"react";import{useTUIKitContext as i}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{ConversationPreviewContent as r}from"./ConversationPreviewContent.js";import{getDisplayImage as a,getDisplayTitle as s,getDisplayMessage as v,getDisplayTime as m}from"./utils.js";function l(l){var u=l.activeConversation,c=l.conversation,p=l.Preview,C=void 0===p?r:p,d=l.searchValue,f=l.conversationUpdateCount,x=i("TUIConversation").language,I=i("ConversationPreview"),g=I.setActiveConversation,j=I.myProfile,y=e(a(c)),T=y[0],P=y[1],U=e(s(c,d)),w=U[0],A=U[1],D=e(v(c,j
|
|
1
|
+
import{__assign as o}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useState as e,useEffect as n}from"react";import{useTUIKitContext as i}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{ConversationPreviewContent as r}from"./ConversationPreviewContent.js";import{getDisplayImage as a,getDisplayTitle as s,getDisplayMessage as v,getDisplayTime as m}from"./utils.js";function l(l){var u=l.activeConversation,c=l.conversation,p=l.Preview,C=void 0===p?r:p,d=l.searchValue,f=l.conversationUpdateCount,x=i("TUIConversation").language,I=i("ConversationPreview"),g=I.setActiveConversation,j=I.myProfile,y=e(a(c)),T=y[0],P=y[1],U=e(s(c,d)),w=U[0],A=U[1],D=e(v(c,j)),M=D[0],b=D[1],h=e(m(c,x)),K=h[0],V=h[1],k=e(c.unreadCount),q=k[0],z=k[1],B=(null==u?void 0:u.conversationID)===(null==c?void 0:c.conversationID);return C?(n((function(){A(s(c,d)),b(v(c,j)),P(a(c)),V(m(c,x)),z(c.unreadCount)}),[c,d,f,x]),t(C,o({},l,{active:B,displayImage:T,displayTitle:w,displayMessage:M,displayTime:K,unread:q,setActiveConversation:g}))):null}export{l as ConversationPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t,{useRef as i,useState as r}from"react";import{useTranslation as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import t,{useRef as i,useState as r,useEffect as a}from"react";import{useTranslation as c}from"react-i18next";import{TUIConversationService as s}from"@tencentcloud/chat-uikit-engine";import{isPC as l}from"../../utils/env.js";import{Avatar as m}from"../Avatar/Avatar.js";import{Icon as v}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{Plugins as d}from"../Plugins/index.js";import{useConversation as p}from"../../hooks/useConversation.js";import{useTUIKitContext as h}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function f(t){var f,C=t.conversation,I=t.Avatar,N=void 0===I?m:I,T=t.displayImage,x=t.displayTitle,g=t.displayMessage,w=t.displayTime,j=t.unread,b=t.active,y=t.activeConversationID,D=t.setActiveConversationID,P=t.setActiveConversation,k=c().t,M=i(null),U=h("ConversationPreviewContent"),A=U.chat,E=U.conversation,F=p(A),z=F.pinConversation,K=F.deleteConversation,L=b?"conversation-preview-content--active":"",O=j&&j>=1?"conversation-preview-content--unread":"",R=C.isPinned?"conversation-preview-content--pin":"",S=r(!1),q=S[0],B=S[1],G=i(null);a((function(){y!==C.conversationID&&B(!1)}),[y]);var H=function(e){if(!l){var n=C.conversationID;switch(D(n),e){case"touchstart":f=setTimeout(o,500);break;case"touchend":clearTimeout(f),setTimeout((function(){}),200)}}function o(){clearTimeout(f),B(!0)}},J=function(e,n){var o=C.conversationID,t=C.isPinned;switch(e.stopPropagation(),B(!1),G.current.closeMore(),n){case"pin":z({conversationID:o,isPinned:!t});break;case"delete":K(o),C===E&&P(null)}};return n("button",e({type:"button","aria-selected":b,role:"option",className:"conversation-preview-container ".concat(L," ").concat(O," ").concat(R),onClick:function(){s.switchConversation(null==C?void 0:C.conversationID),P&&P(C),(null==M?void 0:M.current)&&M.current.blur()},onMouseEnter:function(){B(!0)},onMouseLeave:function(){B(!1)},onTouchStart:function(){return H("touchstart")},onTouchEnd:function(){return H("touchend")},ref:M},{children:[o("div",e({className:"avatar"},{children:o(N,{image:T,name:x,size:40})})),n("div",e({className:"content"},{children:[o("div",e({className:"title text-ellipsis"},{children:x})),o("div",e({className:"message"},{children:g}))]})),n("div",e({className:"external"},{children:[o("div",j?e({className:"unread"},{children:j<=99?j:"99+"}):{className:"unread"}),o("div",q?e({className:"".concat(q?"more--hover":"more")},{children:o(d,{customClass:"more-handle-box",ref:G,plugins:[o("div",e({role:"presentation",className:"more-handle-item",onClick:function(e){J(e,"pin")}},{children:k(C.isPinned?"TUIConversation.Unpin":"TUIConversation.Pin")})),o("div",e({className:"more-handle-item",style:{color:"#FF584C"},onClick:function(e){J(e,"delete")},role:"presentation"},{children:k("TUIConversation.Delete")}))],showNumber:0,MoreIcon:o(v,{className:"icon-more",width:16,height:16,type:u.MORE})})}):e({className:"time"},{children:w}))]}))]}))}var C=t.memo(f);export{C as ConversationPreviewContent,f as unMemoConversationPreviewContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as r,jsx as a}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as r,jsx as a}from"react/jsx-runtime";import o from"@tencentcloud/chat";import"react";import"../Icon/config.js";import"../Icon/type.js";import{defaultGroupAvatarWork as t,defaultUserAvatar as i}from"../Avatar/default.js";import{formatEmojiString as s}from"../TUIMessage/utils/emojiMap.js";import{getTimeStamp as c}from"../untils.js";var n=function(t,i,s){void 0===s&&(s="#147AFF");var c=u(t),n=c.name,l=c.nick,p=c.groupID,d=c.userID,m=t.type,f=t.remark,v="";switch(m){case o.TYPES.CONV_C2C:v=f||l||d;break;case o.TYPES.CONV_GROUP:v=n||p;break;default:v=""}var C,h;return i?(h=(C=v).toLocaleLowerCase().indexOf(i.toLocaleLowerCase()),r("div",{children:[a("span",{children:C.slice(0,h)}),a("span",e({style:{color:s}},{children:C.slice(h,h+i.length)})),a("span",{children:C.slice(h+i.length)})]})):v},l=function(e){var r=e.type,a=u(e).avatar,s=a;if(!a)switch(r){case o.TYPES.CONV_C2C:s=i;break;case o.TYPES.CONV_GROUP:default:s=t}return s},p=function(t,i,c){var n,l=t.lastMessage,p=t.type,u=l.fromAccount,d=l.nick,m=l.nameCard,f=l.isRevoked,v=l.messageForShow;l.type===o.TYPES.MSG_CUSTOM&&(null===(n=l.payload)||void 0===n?void 0:n.description)&&(v=l.payload.description);var C="";switch(p){case o.TYPES.CONV_GROUP:C=(null==l?void 0:l.fromAccount)===(null==i?void 0:i.userID)?"You":"".concat(m||d||u||""),C="".concat(C?"".concat(C,":"):"");break;case o.TYPES.CONV_C2C:C=f?"you ":""}return r("div",e({style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{children:[a("span",{children:C}),a("span",{children:l.isRevoked?"recalled a message":s(v,1)})]}))},u=function(e){if(!e)return null;var r={},a=e.type,t=e.groupProfile,i=e.userProfile;switch(a){case o.TYPES.CONV_C2C:r=i;break;case o.TYPES.CONV_GROUP:r=t;case o.TYPES.CONV_SYSTEM:}return r},d=function(e,r){var a=e.lastMessage;return c(1e3*a.lastTime,r)};export{l as getDisplayImage,p as getDisplayMessage,d as getDisplayTime,n as getDisplayTitle,u as getMessageProfile};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{ConversationPreview as s}from"../ConversationPreview/ConversationPreview.js";import"react";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import"../../utils/env.js";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as i}from"../Icon/type.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import"date-fns";import"date-fns/locale";import"../../constants.js";import"../TUIMessage/hooks/useMessageReply.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import"../TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../Switch/Switch.js";import"../TUIProfile/TUIProfileDefault.js";import"../../locales/index.js";function n(n){var a=n.result,c=n.searchValue,m=n.Preview;return t("div",{children:0===(null==a?void 0:a.length)?o("div",e({className:"conversation-search-result no-result"},{children:[t(r,{className:"no-result-icon",type:i.CRY,width:42,height:42}),t("span",e({className:"no-result-message"},{children:'No results for "'.concat(c,'"')}))]})):a.map((function(o){return t(s,e({searchValue:c},{conversation:o,Preview:m}),o.conversationID)}))})}export{n as ConversationSearchResult};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import i from"./images/more.png.js";import m from"./images/create.png.js";import s from"./images/clear.png.js";import r from"./images/search.png.js";import o from"./images/back.png.js";import a from"./images/emoji.png.js";import e from"./images/progress.png.js";import t from"./images/file.png.js";import n from"./images/add.png.js";import c from"./images/image.png.js";import l from"./images/video.png.js";import u from"./images/
|
|
1
|
+
import i from"./images/more.png.js";import m from"./images/create.png.js";import s from"./images/clear.png.js";import r from"./images/search.png.js";import o from"./images/back.png.js";import a from"./images/emoji.png.js";import e from"./images/progress.png.js";import t from"./images/file.png.js";import n from"./images/add.png.js";import c from"./images/image.png.js";import l from"./images/video.png.js";import u from"./images/files.png.js";import g from"./images/star.png.js";import p from"./images/copy.png.js";import N from"./images/del.png.js";import f from"./images/forward.png.js";import k from"./images/reply.png.js";import j from"./images/close.png.js";import E from"./images/arrow-right.png.js";import d from"./images/right.png.js";import R from"./images/ellipse.png.js";import O from"./images/cancel.png.js";import I from"./images/arrow-down.png.js";import C from"./images/edit.png.js";import A from"./images/confirm.png.js";import v from"./images/camera.png.js";import D from"./images/quote.png.js";import L from"./images/revocation.png.js";import T from"./images/effort.png.js";import w from"./images/cry.png.js";import M from"./images/send.png.js";import U from"./images/owner.png.js";import y from"./images/living.png.js";import S from"./images/member.png.js";import h from"./images/like.png.js";import F from"./images/unlike.png.js";import V from"./images/liked.png.js";import G from"./images/unliked.png.js";import K from"./images/union.png.js";import W from"./images/ununion.png.js";import b from"./images/vector.png.js";import P from"./images/unvector.png.js";import H from"./images/voice.png.js";import Y from"./images/add-friend.svg.js";import{IconTypes as q}from"./type.js";var B,_=((B={})[q.MORE]={url:i,className:"tui-kit-icon-more"},B[q.CREATE]={url:m,className:"tui-kit-icon-create"},B[q.CLEAR]={url:s,className:"tui-kit-icon-clear"},B[q.SEARCH]={url:r,className:"tui-kit-icon-search"},B[q.BACK]={url:o,className:"tui-kit-icon-back"},B[q.EMOJI]={url:a,className:"tui-kit-icon-emoji"},B[q.PROGRESS]={url:e,className:"tui-kit-icon-progress"},B[q.FILE]={url:t,className:"tui-kit-icon-file"},B[q.ADD]={url:n,className:"tui-kit-icon-add"},B[q.IMAGE]={url:c,className:"tui-kit-icon-image"},B[q.VIDEO]={url:l,className:"tui-kit-icon-video"},B[q.DOCUMENT]={url:u,className:"tui-kit-icon-document"},B[q.STAR]={url:g,className:"tui-kit-icon-star"},B[q.COPY]={url:p,className:"tui-kit-icon-copy"},B[q.DEL]={url:N,className:"tui-kit-icon-del"},B[q.FORWARD]={url:f,className:"tui-kit-icon-forward"},B[q.REPLY]={url:k,className:"tui-kit-icon-reply"},B[q.CLOSE]={url:j,className:"tui-kit-icon-close"},B[q.ARROW_RIGHT]={url:E,className:"tui-kit-icon-arrow-right"},B[q.RIGHT]={url:d,className:"tui-kit-icon-right"},B[q.ELLIPSE]={url:R,className:"tui-kit-icon-ellipse"},B[q.CANCEL]={url:O,className:"tui-kit-icon-cancel"},B[q.ARROW_DOWN]={url:I,className:"tui-kit-icon-arrow-down"},B[q.EDIT]={url:C,className:"tui-kit-icon-edit"},B[q.CONFIRM]={url:A,className:"tui-kit-icon-confirm"},B[q.CAMERA]={url:v,className:"tui-kit-icon-camera"},B[q.QUOTE]={url:D,className:"tui-kit-icon-quote"},B[q.REVOCATION]={url:L,className:"tui-kit-icon-revocation"},B[q.EFFORT]={url:T,className:"tui-kit-icon-effort"},B[q.CRY]={url:w,className:"tui-kit-icon-cry"},B[q.OWNER]={url:U,className:"tui-kit-icon-owner"},B[q.SEND]={url:M,className:"tui-kit-icon-send"},B[q.LIVING]={url:y,className:"tui-kit-icon-living"},B[q.MEMBER]={url:S,className:"tui-kit-icon-member"},B[q.LIKE]={url:h,className:"tui-kit-icon-like"},B[q.UNLIKE]={url:F,className:"tui-kit-icon-unlike"},B[q.LIKED]={url:V,className:"tui-kit-icon-liked"},B[q.UNLIKED]={url:G,className:"tui-kit-icon-unliked"},B[q.UNION]={url:K,className:"tui-kit-icon-union"},B[q.UNUNION]={url:W,className:"tui-kit-icon-ununion"},B[q.VECTOR]={url:b,className:"tui-kit-icon-vector"},B[q.UNVECTOR]={url:P,className:"tui-kit-icon-unvector"},B[q.VOICE]={url:H,className:"tui-kit-icon-voice"},B[q.ADDFRIEND]={url:Y,className:"tui-kit-icon-add-friend"},B);export{_ as ICON_CONFIG};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6893%2018.3914C21.131%2016.6584%2021.998%2014.4305%2021.998%2012.0001C21.998%206.47721%2017.5209%202.00006%2011.998%202.00006C6.4752%202.00006%201.99805%206.47721%201.99805%2012.0001C1.99805%2017.5229%206.4752%2022.0001%2011.998%2022.0001C14.1036%2022.0001%2016.0571%2021.3493%2017.6686%2020.238C17.6858%2020.2471%2017.7041%2020.2552%2017.7233%2020.262L19.9382%2021.0464C20.2554%2021.1587%2020.5611%2020.853%2020.4488%2020.5358L19.6893%2018.3914Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212%22%20r%3D%221.4%22%20fill%3D%22white%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3Awhite%3Bfill%3Awhite%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22path-1-inside-1_91_53001%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M19.6894%2018.3919C21.131%2016.659%2021.998%2014.4311%2021.998%2012.0007C21.998%206.47788%2017.5209%202.00073%2011.998%202.00073C6.4752%202.00073%201.99805%206.47788%201.99805%2012.0007C1.99805%2017.5236%206.4752%2022.0007%2011.998%2022.0007C14.1037%2022.0007%2016.0574%2021.3499%2017.6689%2020.2385C17.6861%2020.2475%2017.7042%2020.2555%2017.7233%2020.2623L19.9382%2021.0467C20.2554%2021.159%2020.5611%2020.8533%2020.4488%2020.5361L19.6894%2018.3919Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M19.6894%2018.3919L18.9207%2017.7524L18.5569%2018.1897L18.7468%2018.7258L19.6894%2018.3919ZM17.6689%2020.2385L18.1349%2019.3537L17.5993%2019.0716L17.1011%2019.4153L17.6689%2020.2385ZM17.7233%2020.2623L18.0571%2019.3196L18.0571%2019.3196L17.7233%2020.2623ZM19.9382%2021.0467L20.272%2020.104H20.272L19.9382%2021.0467ZM20.4488%2020.5361L19.5062%2020.8699V20.8699L20.4488%2020.5361ZM20.998%2012.0007C20.998%2014.1889%2020.2184%2016.1924%2018.9207%2017.7524L20.4582%2019.0315C22.0437%2017.1256%2022.998%2014.6733%2022.998%2012.0007H20.998ZM11.998%203.00073C16.9686%203.00073%2020.998%207.03017%2020.998%2012.0007H22.998C22.998%205.9256%2018.0732%201.00073%2011.998%201.00073V3.00073ZM2.99805%2012.0007C2.99805%207.03017%207.02748%203.00073%2011.998%203.00073V1.00073C5.92291%201.00073%200.998047%205.9256%200.998047%2012.0007H2.99805ZM11.998%2021.0007C7.02748%2021.0007%202.99805%2016.9713%202.99805%2012.0007H0.998047C0.998047%2018.0759%205.92291%2023.0007%2011.998%2023.0007V21.0007ZM17.1011%2019.4153C15.6512%2020.4153%2013.8945%2021.0007%2011.998%2021.0007V23.0007C14.3129%2023.0007%2016.4635%2022.2846%2018.2366%2021.0617L17.1011%2019.4153ZM18.0571%2019.3196C18.0834%2019.3289%2018.1094%2019.3403%2018.1349%2019.3537L17.2028%2021.1233C17.2627%2021.1548%2017.325%2021.1821%2017.3895%2021.2049L18.0571%2019.3196ZM20.272%2020.104L18.0571%2019.3196L17.3895%2021.2049L19.6044%2021.9893L20.272%2020.104ZM19.5062%2020.8699C19.3376%2020.3941%2019.7962%2019.9355%2020.272%2020.104L19.6044%2021.9893C20.7146%2022.3825%2021.7846%2021.3125%2021.3914%2020.2023L19.5062%2020.8699ZM18.7468%2018.7258L19.5062%2020.8699L21.3914%2020.2023L20.6321%2018.0581L18.7468%2018.7258Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_91_53001%29%22%2F%3E%3Ccircle%20cx%3D%227.00195%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3Ccircle%20cx%3D%2216.998%22%20cy%3D%2212.0007%22%20r%3D%221.4%22%20fill%3D%22%23666666%22%20stroke%3D%22%23979797%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3Bstroke%3A%23979797%3Bstroke%3Acolor%28display-p3%200.5922%200.5922%200.5922%29%3Bstroke-opacity%3A1%3B%22%20stroke-width%3D%220.2%22%2F%3E%3C%2Fsvg%3E";export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var l="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%209.00028C5.60156%2012.5349%208.46692%2015.4003%2012.0016%2015.4003C15.5362%2015.4003%2018.4016%2012.5349%2018.4016%209.00028C18.4016%205.46564%2015.5362%202.60028%2012.0016%202.60028C8.46692%202.60028%205.60156%205.46564%205.60156%209.00028ZM5.20078%2016.4003C3.8753%2016.4003%202.80078%2017.4748%202.80078%2018.8003C2.80078%2020.1257%203.87529%2021.2003%205.20078%2021.2003H18.8008C20.1263%2021.2003%2021.2008%2020.1257%2021.2008%2018.8003C21.2008%2017.4748%2020.1263%2016.4003%2018.8008%2016.4003H5.20078Z%22%20fill%3D%22%23147AFF%22%20style%3D%22fill%3A%23147AFF%3Bfill%3Acolor%28display-p3%200.0784%200.4784%201.0000%29%3Bfill-opacity%3A1%3B%22%2F%3E%3C%2Fsvg%3E";export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var C="data:image/svg+xml,%3Csvg%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cmask%20id%3D%22path-1-inside-1_251_63695%22%20fill%3D%22white%22%3E%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M5.60156%208.99998C5.60156%2012.5346%208.46692%2015.4%2012.0016%2015.4C15.5362%2015.4%2018.4016%2012.5346%2018.4016%208.99998C18.4016%205.46534%2015.5362%202.59998%2012.0016%202.59998C8.46692%202.59998%205.60156%205.46534%205.60156%208.99998ZM5.20078%2016.3999C3.8753%2016.3999%202.80078%2017.4745%202.80078%2018.7999C2.80078%2020.1254%203.87529%2021.1999%205.20078%2021.1999H18.8008C20.1263%2021.1999%2021.2008%2020.1254%2021.2008%2018.7999C21.2008%2017.4745%2020.1263%2016.3999%2018.8008%2016.3999H5.20078Z%22%2F%3E%3C%2Fmask%3E%3Cpath%20d%3D%22M12.0016%2014.4C9.01921%2014.4%206.60156%2011.9823%206.60156%208.99998H4.60156C4.60156%2013.0869%207.91464%2016.4%2012.0016%2016.4V14.4ZM17.4016%208.99998C17.4016%2011.9823%2014.9839%2014.4%2012.0016%2014.4V16.4C16.0885%2016.4%2019.4016%2013.0869%2019.4016%208.99998H17.4016ZM12.0016%203.59998C14.9839%203.59998%2017.4016%206.01762%2017.4016%208.99998H19.4016C19.4016%204.91305%2016.0885%201.59998%2012.0016%201.59998V3.59998ZM6.60156%208.99998C6.60156%206.01762%209.01921%203.59998%2012.0016%203.59998V1.59998C7.91464%201.59998%204.60156%204.91305%204.60156%208.99998H6.60156ZM3.80078%2018.7999C3.80078%2018.0267%204.42758%2017.3999%205.20078%2017.3999V15.3999C3.32301%2015.3999%201.80078%2016.9222%201.80078%2018.7999H3.80078ZM5.20078%2020.1999C4.42758%2020.1999%203.80078%2019.5731%203.80078%2018.7999H1.80078C1.80078%2020.6777%203.32301%2022.1999%205.20078%2022.1999V20.1999ZM18.8008%2020.1999H5.20078V22.1999H18.8008V20.1999ZM20.2008%2018.7999C20.2008%2019.5731%2019.574%2020.1999%2018.8008%2020.1999V22.1999C20.6785%2022.1999%2022.2008%2020.6777%2022.2008%2018.7999H20.2008ZM18.8008%2017.3999C19.574%2017.3999%2020.2008%2018.0267%2020.2008%2018.7999H22.2008C22.2008%2016.9222%2020.6786%2015.3999%2018.8008%2015.3999V17.3999ZM5.20078%2017.3999H18.8008V15.3999H5.20078V17.3999Z%22%20fill%3D%22%23666666%22%20style%3D%22fill%3A%23666666%3Bfill%3Acolor%28display-p3%200.4000%200.4000%200.4000%29%3Bfill-opacity%3A1%3B%22%20mask%3D%22url%28%23path-1-inside-1_251_63695%29%22%2F%3E%3C%2Fsvg%3E";export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAqCAYAAAD1T9h6AAAAAXNSR0IArs4c6QAAA0BJREFUaEPtWd9LU3EUP+d7N91QFkJolBDoLOdM0GnzwYcV9CAZPVRCCZkP9WRQVPQSNaL/oKJfDxH0kPUQCRbRg4uwNJmC6fLXgsDCDBKWsul2vyfuxpW7MnR332sad0/b937P55zP55z7/XB3ETSfykpvUYwSJ4BDPQAWEXGr9vpK3xFRRoBRkFjnts15nYFAILFSTLbXUQUod9cdSHA6R8TzsgVV4hHZF4Zw51hz00u/389FYC6HkSSgFB+X5ctGJEFkYbDgrckP/a8NwU+OjSx3qMozhmMA1uvWQttIKBCYyySpz+ezff0+10wExznnm7SxKVx8wwCmM8FU9hLAogVg2m6vGQ4G78a18eh0ey6STIeVRSWJw+5p+31TpgkrfL78+MxcCwC1cE72TOP/tp8hm0cGt8eG+zsQkZKj6nR5nhJRcYpATvtEqLdPVMJdDQ0F0R/RNiA8RMRzROEyxgYKC7ae7+np/IlOV+1b9bTJ3eLYk+nYrKYor7fRMRuZ2csRSpBAxyGB+RzIDURFaj6J4fPxUPAKlpbX9KuL4dGButUU9C/2+P1+9vBx11Hi8hkNibMbhoBadJmr9gIn3pz8LWFPGgG7xdqUjZEZ1RlEFgegb8Cgl1FOt8wXbqa8BmfTCCCyeVFGZiCZtBrTCBiV1EjcPwhkY2RGFZrylZgbIH6ac9qZZmTaU0iUkRlFxOM5ZY1Eg/e1JNI6INrIjCBSVlHv5XzxhoqdRsAoIxNJRBmnhelI97IE1rORaUXQjv2GMzKFiElA5EzrwTI7oEc1kTFmB0SqqQfL7IAe1UTGmB0QqaYeLLMDelQTGWN2QKSaerDMDuhRTWTM/9sByEnsDw8NzYhUSzRWaVVVISxaupaeiZ0uzzsisigLkmS5MT7y/oHopCLxdrh3t8pyol3BRMSE8vf6IyJemlxguBCLlOybmnoSFZlUFFZx8RG7zfHpFXHKTRFgYXRWeysoGl9SXSHBULonS7EX62WclLGRZFsjJ/mkWnySgN3amnzJV+aqvsQJD4pSai1wGNKziY+D15Zes24kEmrxyS5o1VLGCWLK61bart7Ya6HmanIoNywAfgabdHVysC+kxvwC0SKlujS63bMAAAAASUVORK5CYII=";export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var A="data:image/png;base64,
|
|
1
|
+
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAqCAYAAAD1T9h6AAAAAXNSR0IArs4c6QAABLlJREFUaEPlmVtsFFUYx893ZpfeaRNjK7ZJLexuu7NFSmeXNgG1Gn0ooQajpdjiBR9MJFxsvRSxbVb0xRiFUKOJLxrBW5aERIhGCbItUMDtFKTt2psiRiNYH7iVXnbn+8xsO9tl09JtdyuzcV5mds+Zc37/7zYz5wALOQoLS7JGyP8sQ1bKGGQRoTG0/XZdA3AfY3SJcXYqEQyfdHWdvqSxgHZRYHNU+JFeIsKU2wUaybwAfMjA4d2ebs9BtX9AgArvU5SmSAbQSx+jIOxURUAgbBTlK83ynEMvY8ZmY2Zit9ftvq4HYLGsLNX394iNMd8WRMoPWB74UKIgVIHJJtWTQk+of6rwC5OkjbL8kU8P4OEMkvS88eqw/HFQhAD7wWSVDhBRzriABZv7vadO6xFeYzKLpSWIY++PewH+AJPV3qZVm4S7Fj6ol7CZzohqOI1evHp0Iox8sKSg2KN1/qWnw6Fn62tsocz/TwGVlZXCT94LNYj+RwAgl4gucG44vEzM/czlcinz7cWoPKDCn+08/wEyLA4H5Yx3FC3N2zTfIqISYLGteFpR/Fums7IgGJr7un/8dD69EJUAk7V4LxErCFQBzj9MT1r05ZXhv9YT4gvjlYH1DPzc8ZRuBZhFqRWRklTAjJTsB2T54A1Jqki+PPRny8TDcLjfK9+vWwFx74G4z4H/ogoREeTb7CsBgHq6PG3qOTQko0pidaD5fA6o8BbR3oBEj6pzCRxq+7zy8ZgKmK8EHYd37EDCtdocBoG/2NvdfkL3AlR4s016jZA9psFygK/7vO1vxTyEYu2BcXh7PSE9ro0NjB/asH7Nm06nE8PnizoHYi0g9KNqIu6/qV5X8cZU8Gq7rgSYbfZXUcHKkLD5tqaqwjkdvK4ELBEdLzNUqibh+Xc1VWuabgWvGwEmcUUdof/JYMxz/v1yW15TJG+yMQshkyhVAmOrgbHf05JYsyzL/0SSHyabvZYUrNb6ChwOL7MtbowEPiYeUFcHrg3LDQrS6qAFAS4KxpStvedaz99KhNnq2IakbJgMG+FIdlZKg9vt9kciPmoBRUVlGddHh94hUorCJwQO1xYwXuf1es5OBWMWpa2IFHzV5sB/yM5KfX028FEJKCgqvcc/6t9NhNlBC3JwM8ZKtFdsAD7GjdDUd85zJFSERbRvVhCfmbyPH83OTN0xW/g5C7DYHA4kfJuQ0iYgCAzCnoEuzz7LUqkAFbabkO7Q2rjAd/V3t3+h/rZYHZsUUjZOJiy05GSmbZ8L/JwEWKzSWmRsOxEJ6gCcwwgJvGGg0xP4iFGP/OUr71ZGR/cQYm4QVOCfM6QRInouBL41JzOtfq7wsxYQnnQAbJAboK6vU+4Jj3NJejj9yo3L7xHhvVPlAAA7lp5sr4926TLiMmoRpVUK0q6QeO9NTUiuPXPm2OB0FaO8vDxh4LfBnUj40E19BDiRkSi9Ei38rDwQKgA4tNyZvrjx5EnX8Ezlzul08n2uQ9u0Wq9WG2NhXqPX5Rqb6d5I2iP2QCABRWmVeq5eV9E20yM+fHKr9b5FfgMl9Xce/zUSsEj73CQg7hd34395Pd43OOJ+i0lNnLje5NMyP663WTUR8bjR/S+/EAdi6i5GNAAAAABJRU5ErkJggg==";export{A as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var A="data:image/png;base64,
|
|
1
|
+
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAqCAYAAAD1T9h6AAAAAXNSR0IArs4c6QAAAqlJREFUaEPtmUFoE0EUhufNNBpRWi9tPAhWm9RmU7S6Dekxolc1gqDgxV48tHoS7E0WwWPwoCcp1KAWC0KlHnI0WJGGsj1Ik9ZUbxWsB8HQ0nQ3mSebZsMaKrRmN9mR5LRkZ2f/771/3j5mgFh+/f0RXwGLNwknQ4SAD5F7rPebdQ1AdUJwjVAy54W2Z4uL6TVTC5gXfaHwxSLHu4j8YLOE7ua9AHSjjUJ8OTP/1hhfBjDE66XS/d1M4JYxHsYeGBBQtk2pNGVGnlL4TIjnsafLm8mmUutuECxFo4f0H4UQIfodzvFkOfJAN7yMXQN/SB7DEl41/jTEtx+Qh1X1qe4G4bUaZPmWJ7+pTlQhGLwGf1CeRsSj2wD7bq9k59JuFG9qCkhDEc61J9tZgFXwBwc/mtVm/5H2c26xzd+CaNhp63v+XcVGOvT0nZ03B39dXgi7OfqmNqvmFkAzMtbKQDOibn1nKwM7ZaA3KMc4IVcYgfcnujtfJJPJLacy5UgGApI8yzl6K/X5GwUez2UXZp2AcATAOmm11WX0A2Es/uVTetVOkIYBVLKhAfKE/7gvYZetHAcASqaRk5jZrtttK8cBjJZEOh0OaRq/h4iS1T5gg60aAmCIVhSFvnw1EyOUjnDOO6prA6hGCU7kltTxf1kbDQMwxQ0MRA+va/mRWlsxgIe5JfXNXiEaDiDLFzp+bf4crQWgDB6tZNRJ1wIYFpqcmrmMQEdrLWRUphvXL40risJdCRA6E5G2CsUxIRex8GX0j7IJVAMgCf+xTnE+ZEK2EoHgYIpXdvUAqHjNXO+p8Hks8mFAkurp7npuV9+zU4Vy5Duw11JYz/gWQD3Rs+PZVgbsiGI9c/xfGRB+c1f87XXRDziEP2IyqoHQh3xmORP6mNWEEPGg+zdk8RZTNE1sngAAAABJRU5ErkJggg==";export{A as default};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Conversation, Message } from '@tencentcloud/chat';
|
|
3
|
+
import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
|
|
3
4
|
import { UnknowPorps } from '../../context/ComponentContext.js';
|
|
4
5
|
import { TUIChatHeaderDefaultProps } from '../TUIChatHeader/TUIChatHeaderDefault.js';
|
|
5
6
|
import { TUIMessageProps } from '../TUIMessage/TUIMessage.js';
|
|
@@ -18,9 +19,13 @@ interface TUIChatProps {
|
|
|
18
19
|
InputPlugins?: React.ComponentType<UnknowPorps>;
|
|
19
20
|
InputQuote?: React.ComponentType<UnknowPorps>;
|
|
20
21
|
MessagePlugins?: React.ComponentType<UnknowPorps>;
|
|
22
|
+
MessageCustomPlugins?: React.ComponentType<UnknowPorps>;
|
|
23
|
+
MessageTextPlugins?: React.ComponentType<UnknowPorps>;
|
|
21
24
|
onMessageRecevied?: (updateMessage: (event?: Array<Message>) => void, event: any) => void;
|
|
22
25
|
sendMessage?: (message: Message, options?: any) => Promise<Message>;
|
|
23
26
|
revokeMessage?: (message: Message) => Promise<Message>;
|
|
27
|
+
selectedConversation?: (conversation: Conversation) => Promise<Conversation>;
|
|
28
|
+
filterMessage?: (messageList: Array<IMessageModel>) => Array<IMessageModel>;
|
|
24
29
|
messageConfig?: TUIMessageProps;
|
|
25
30
|
cloudCustomData?: string;
|
|
26
31
|
TUIMessageInputConfig?: TUIMessageInputBasicProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as s}from"tslib";import
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as s}from"tslib";import o,{createElement as a,useReducer as n,useRef as i,useEffect as r,useMemo as u}from"react";import{jsx as c,jsxs as g,Fragment as m}from"react/jsx-runtime";import{TUIStore as p,StoreName as d,TUIChatService as l}from"@tencentcloud/chat-uikit-engine";import{JSONStringToParse as M}from"../untils.js";import{useTUIKitContext as I}from"../../context/TUIKitContext.js";import{TUIChatStateContextProvider as f}from"../../context/TUIChatStateContext.js";import{TUIChatActionProvider as h}from"../../context/TUIChatActionContext.js";import{ComponentProvider as v}from"../../context/ComponentContext.js";import T from"./hooks/useCreateTUIChatStateContext.js";import{TUIMessage as C}from"../TUIMessage/TUIMessage.js";import"../TUIMessage/MessagePlugins.js";import"../TUIMessage/MessageContext.js";import{CONSTANT_DISPATCH_TYPE as U}from"../../constants.js";import{chatReducer as j,initialState as S}from"./TUIChatState.js";import{useHandleMessageList as x}from"./hooks/useHandleMessageList.js";import{useHandleMessage as L}from"./hooks/useHandleMessage.js";import{TUIChatHeader as E}from"../TUIChatHeader/TUIChatHeader.js";import"@tencentcloud/chat";import"../Icon/config.js";import"../Icon/type.js";import"../../utils/env.js";import"../../context/TUIMessageContext.js";import{TUIMessageList as P}from"../TUIMessageList/TUIMessageList.js";import{TUIMessageInput as y}from"../TUIMessageInput/TUIMessageInput.js";import"react-i18next";import{EmptyStateIndicator as H}from"../EmptyStateIndicator/EmptyStateIndicator.js";function A(t){var s=t.conversation,o=t.EmptyPlaceholder,n=void 0===o?c(H,{listType:"chat"}):o,i=I("TUIChat"),r=i.conversation,u=i.chat,g=s||r;return(null==g?void 0:g.conversationID)?a(D,e({chat:u},t,{conversation:g,key:g.conversationID})):n}function D(o){var a=this,I=o.chat,H=o.conversation,A=o.className,D=o.children,k=o.TUIMessage,_=o.TUIChatHeader,R=o.TUIMessageInput,N=o.InputPlugins,w=o.MessagePlugins,F=o.MessageContext,G=o.MessageCustomPlugins,O=o.MessageTextPlugins,Q=o.InputQuote;o.onMessageRecevied,o.sendMessage;var V=o.revokeMessage;o.selectedConversation;var b=o.filterMessage,K=o.messageConfig,q=o.cloudCustomData,z=o.TUIMessageInputConfig,B=o.TUIMessageListConfig,J=n(j,e(e({},S),{conversation:H})),W=J[0],X=J[1],Y=i(null),Z=i(),$=T(e({chat:I,conversation:H,messageListRef:Y,textareaRef:Z,messageConfig:K,cloudCustomData:q,TUIMessageInputConfig:z,TUIMessageListConfig:B},W)),ee=x({chat:I,conversation:H,state:W,dispatch:X,filterMessage:b}),te=ee.editLocalMessage,se=ee.updateUploadPendingMessageList,oe=L({state:W,dispatch:X}),ae=oe.operateMessage,ne=oe.setAudioSource,ie=oe.setVideoSource,re=oe.setHighlightedMessageId,ue=oe.setActiveMessageID;r((function(){return p.watch(d.CHAT,{messageList:ce,isCompleted:ge}),function(){p.unwatch(d.CHAT,{messageList:ce,isCompleted:ge})}}),[]);var ce=function(e){var t=e.filter((function(e){return!e.isDeleted}));X({type:U.SET_MESSAGELIST,value:b?b(t):t})},ge=function(e){e&&X({type:U.SET_NO_MORE,value:e})},me=function(){return t(a,void 0,void 0,(function(){return s(this,(function(e){return l.getMessageList(),[2]}))}))},pe=function(e){return t(a,void 0,void 0,(function(){var t;return s(this,(function(s){return"TIMCustomElem"===e.type&&7===(null===(t=M(e.payload.data))||void 0===t?void 0:t.src)||W.firstSendMessage||X({type:U.SET_FIRST_SEND_MESSAGE,value:e}),[2]}))}))},de=u((function(){return{editLocalMessage:te,operateMessage:ae,loadMore:me,revokeMessage:V,setAudioSource:ne,setVideoSource:ie,setHighlightedMessageId:re,setActiveMessageID:ue,updateUploadPendingMessageList:se,setFirstSendMessage:pe}}),[te,ae,me,V,ne,ie,re,ue,se,pe]),le=u((function(){return{TUIMessage:k||C,MessageContext:F,InputPlugins:N,MessagePlugins:w,MessageCustomPlugins:G,MessageTextPlugins:O,TUIChatHeader:_,TUIMessageInput:R,InputQuote:Q}}),[]);return c("div",e({className:"chat ".concat(A)},{children:c(f,e({value:$},{children:c(h,e({value:de},{children:c(v,e({value:le},{children:D||g(m,{children:[c(E,{}),c(P,{}),c(y,{})]})}))}))}))}))}var k=o.memo(A);export{k as TUIChat};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as s}from"tslib";import{CONSTANT_DISPATCH_TYPE as a}from"../../constants.js";import{handleUploadPendingMessage as t,
|
|
1
|
+
import{__assign as e,__spreadArray as s}from"tslib";import{CONSTANT_DISPATCH_TYPE as a}from"../../constants.js";import{handleUploadPendingMessage as t,handleEditMessage as r}from"./unitls.js";var E=function(E,S){switch(null==S?void 0:S.type){case a.SET_CONVERSATION_PRPFILE:return e(e({},E),{conversation:S.value});case a.SET_MESSAGELIST:return e(e({},E),{messageList:S.value});case a.SET_EDIT_MESSAGE:return e(e({},E),{messageList:s([],r(E.messageList,S.value),!0)});case a.SET_IS_COMPLETE:return e(e({},E),{isCompleted:S.value});case a.RESET:return e({},u);case a.SET_HIGH_LIGHTED_MESSAGE_ID:return e(e({},E),{highlightedMessageId:S.value});case a.OPERATE_MESSAGE:return e(e({},E),{operateData:e({},S.value)});case a.SET_NO_MORE:return e(e({},E),{noMore:S.value});case a.SET_AUDIO_SOURCE:return e(e({},E),{audioSource:S.value});case a.SET_VIDEO_SOURCE:return e(e({},E),{vidoeSource:S.value});case a.UPDATE_UPLOAD_PENDING_MESSAGE_LIST:return e(e({},E),{uploadPendingMessageList:s([],t(E.uploadPendingMessageList,S.value),!0)});case a.SET_FIRST_SEND_MESSAGE:return e(e({},E),{firstSendMessage:S.value});case a.SET_ACTIVE_MESSAGE_ID:return e(e({},E),{activeMessageID:S.value})}},u={conversation:{},messageList:[],nextReqMessageID:"",isCompleted:!1,init:!1,highlightedMessageId:"",lastMessageID:"",isSameLastMessageID:!1,operateData:{},noMore:!1,audioSource:null,vidoeSource:null,uploadPendingMessageList:[],firstSendMessage:null,activeMessageID:""};export{E as chatReducer,u as initialState};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{CONSTANT_DISPATCH_TYPE as t}from"../../../constants.js";function o(o){o.state;var
|
|
1
|
+
import{useCallback as e}from"react";import{CONSTANT_DISPATCH_TYPE as t}from"../../../constants.js";function o(o){o.state;var E=o.dispatch;return{operateMessage:e((function(e){E({type:t.OPERATE_MESSAGE,value:e})}),[E]),setAudioSource:e((function(e){E({type:t.SET_AUDIO_SOURCE,value:e})}),[E]),setVideoSource:e((function(e){E({type:t.SET_VIDEO_SOURCE,value:e})}),[E]),setHighlightedMessageId:e((function(e){E({type:t.SET_HIGH_LIGHTED_MESSAGE_ID,value:e})}),[E]),setActiveMessageID:e((function(e){E({type:t.SET_ACTIVE_MESSAGE_ID,value:e})}),[E])}}export{o as useHandleMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{useCallback as t}from"react";import{CONSTANT_DISPATCH_TYPE as e}from"../../../constants.js";function a(a){a.chat,a.conversation,a.state;var n=a.dispatch;return a.filterMessage,{editLocalMessage:t((function(t){n({type:e.SET_EDIT_MESSAGE,value:t})}),[n]),updateUploadPendingMessageList:t((function(t){n({type:e.UPDATE_UPLOAD_PENDING_MESSAGE_LIST,value:t})}),[n])}}export{a as useHandleMessageList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__spreadArray as n}from"tslib";import
|
|
1
|
+
import{__spreadArray as n}from"tslib";import"@tencentcloud/chat";import"../../constants.js";import"date-fns";import"date-fns/locale";import"@tencentcloud/chat-uikit-engine";import"react/jsx-runtime";import"react";import"../Icon/config.js";import"../Icon/type.js";var t=function(t,o){var r=n([],t,!0),i=r.findIndex((function(n){return(null==n?void 0:n.ID)===(null==o?void 0:o.ID)}));return r[i]=o,r},o=function(t,o){var r=n([],t,!0);r.some((function(n){return n.ID===o.ID}))||r.push(o);var i=r.findIndex((function(n){return(null==n?void 0:n.ID)===(null==o?void 0:o.ID)}));return r[i]=o,r};export{t as handleEditMessage,o as handleUploadPendingMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as t,jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as i}from"react/jsx-runtime";import r,{useState as a,useEffect as o}from"react";import n from"@tencentcloud/chat";import{TUIConversationService as c}from"@tencentcloud/chat-uikit-engine";import{Avatar as l}from"../Avatar/Avatar.js";import{handleDisplayAvatar as s}from"../untils.js";import{isH5 as m}from"../../utils/env.js";import{Icon as d}from"../Icon/Icon.js";import{IconTypes as h}from"../Icon/type.js";import{useTUIKitContext as u}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";function v(r){var v=r.title,p=void 0===v?"":v,f=r.avatar;r.isOnline;var S=r.conversation,C=r.isLive,N=r.opateIcon,g=a(p),T=g[0],E=g[1],I=a(""),P=I[0],y=I[1];o((function(){switch(E(p),f&&y(f),null==S?void 0:S.type){case n.TYPES.CONV_C2C:O(S.userProfile,null==S?void 0:S.remark);break;case n.TYPES.CONV_GROUP:Y(S.groupProfile);break;case n.TYPES.CONV_SYSTEM:E("System Notice");break;default:E("")}}),[S]);var O=function(e,i){T||E(i||(null==e?void 0:e.nick)||(null==e?void 0:e.userID)),f||y(t(l,{size:32,image:s(e.avatar)}))},Y=function(e){T||E((null==e?void 0:e.name)||(null==e?void 0:e.groupID)),f||y(t(l,{size:32,image:s(e.avatar,n.TYPES.CONV_GROUP)}))},j=u().setTUIManageShow;return i("header",e({className:"tui-chat-header ".concat(C?"tui-chat-live-header":"")},{children:[m&&t("div",e({style:{paddingRight:"10px"}},{children:t(d,{onClick:function(){c.switchConversation("")},type:h.BACK,width:9,height:16})})),t("div",e({className:"tui-chat-header-left ".concat((null==S?void 0:S.type)===n.TYPES.CONV_SYSTEM?"system":"")},{children:(null==S?void 0:S.type)!==n.TYPES.CONV_SYSTEM&&P})),t("div",e({className:"header-content"},{children:t("h3",e({className:"title"},{children:T}))})),t("div",e({className:"tui-chat-header-right"},{children:t("div",e({className:"header-handle"},{children:N||t(d,{className:"header-handle-more",onClick:function(){j(!0)},type:h.ELLIPSE,width:18,height:5})}))}))]}),null==S?void 0:S.conversationID)}var p=r.memo(v);function f(i){var r=e({},i);return t(p,e({},r))}export{f as TUIChatHeaderDefault};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as o,Fragment as i,jsx as r}from"react/jsx-runtime";import c,{useState as a,useEffect as s}from"react";import{useTranslation as
|
|
1
|
+
import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as o,Fragment as i,jsx as r}from"react/jsx-runtime";import c,{useState as a,useEffect as s}from"react";import{useTranslation as m}from"react-i18next";import{TUIConversationService as l}from"@tencentcloud/chat-uikit-engine";import{useTUIKitContext as u}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as d}from"./basicInfo.js";import{Switch as f}from"../../Switch/Switch.js";import h from"./hooks/useContactInfo.js";import{DivWithEdit as v}from"../../DivWithEdit/DivWithEdit.js";import{useConversation as p}from"../../../hooks/useConversation.js";function C(c){var C=this,b=u("TUIContact"),k=b.chat,I=b.contactData,x=b.setActiveContact,N=b.setActiveConversation,j=m().t,T=c.friend,U=c.openChat,g=T.userID,w=T.profile,D=T.remark,E=a(""),S=E[0],A=E[1],F=a(""),M=F[0],W=F[1],y=a(!1),B=y[0],K=y[1],q=h(),z=q.addToBlocklist,G=q.deleteFriend,H=p(k).createConversation;s((function(){K(!1),W(D)}),[I,D]);return o(i,{children:[r(d,{profile:w}),o("div",t({className:"tui-contact-info-content"},{children:[o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:j("TUIContact.remark")})),r(v,{name:"remark",className:"content-item-text",value:M,type:"text",toggle:function(){A("remark")},isEdit:"remark"===S,confirm:function(t){k.updateFriend({userID:g,remark:null==t?void 0:t.value}),W(null==t?void 0:t.value),A("")},close:function(){A("")}})]})),o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:j("TUIContact.block")})),r(f,{className:"content-item-text",onChange:function(){return e(C,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,z(g)];case 1:return t.sent(),K(!0),x(),[2]}}))}))},checked:B})]})),o("div",t({className:"content-btn-container"},{children:[r("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){return e(C,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,G(g)];case 1:return t.sent(),x(),[2]}}))}))}},{children:j("TUIContact.Delete friend")})),r("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){return e(C,void 0,void 0,(function(){var t,e;return n(this,(function(n){switch(n.label){case 0:return t="C2C".concat(g),[4,H(t)];case 1:return e=n.sent(),l.switchConversation(t),N(e),U(),[2]}}))}))}},{children:j("TUIContact.Send Message")}))]}))]}))]})}var b=c.memo(C);export{b as FriendInfo,C as UnMemoizedFriendInfo};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import c,{useState as a}from"react";import{useTranslation as e}from"react-i18next";import o from"@tencentcloud/chat";import{useTUIKitContext as s}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{useTUIContactContext as r}from"../../../context/TUIContactContext.js";import l from"../TUIContactInfo/hooks/useContactInfo.js";import{Avatar as m}from"../../Avatar/Avatar.js";import{defaultUserAvatar as d}from"../../Avatar/default.js";import u from"../../Icon/images/right-arrow.svg.js";import p from"../../Icon/images/down-arrow.png.js";function f(){var c=s().setActiveContact,f=e().t,v=r("TUIContactList"),N=v.isShowContactList,I=v.friendList,h=v.blocklistProfile,C=v.friendApplicationList,x=l().acceptFriendApplication,b=a(!1),g=b[0],T=b[1],k=a(!1),A=k[0],U=k[1],j=a(!1),P=j[0],S=j[1];return N&&i("div",t({className:"tui-contacts-list"},{children:[i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return T(!g)}},{children:[n("p",t({className:"tui-contacts-list-title"},{children:f("TUIContact.New Contacts")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:g?p:u,alt:""})}))]})),g&&C.map((function(a,e){var s=a.userID,r=a.avatar,l=a.nick,u=a.wording,p=a.type;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(t){t.stopPropagation(),c({type:"friendApplication",data:a})}},{children:[n(m,{size:30,image:r||d}),i("div",t({className:"tui-contacts-list-item-card"},{children:[i("div",{children:[n("p",t({className:"tui-contacts-list-item-name text-ellipsis"},{children:l||s})),""!==u&&n("p",t({className:"tui-contacts-list-item-text text-ellipsis"},{children:u}))]}),p===o.TYPES.SNS_APPLICATION_SENT_BY_ME&&n("p",t({className:"tui-contacts-list-btn-text text-ellipsis"},{children:f("TUIContact.waiting for verification")})),p===o.TYPES.SNS_APPLICATION_SENT_TO_ME&&n("div",t({className:"application-btn",role:"button",tabIndex:0,onClick:function(t){!function(t,i){t.stopPropagation(),x(i),c()}(t,s)}},{children:f("TUIContact.Agree")}))]}))]}),s)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return S(!P)}},{children:[n("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Blocked List")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:P?p:u,alt:""})}))]})),P&&h.map((function(a,e){var o=a.userID,s=a.avatar,r=a.nick;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(){c({type:"block",data:a})}},{children:[n(m,{size:30,image:s||d}),n("div",t({className:"tui-contacts-list-item-container"},{children:n("p",t({className:"tui-contacts-list-item-name"},{children:r||o}))}))]}),o)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return U(!A)}},{children:[n("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import c,{useState as a}from"react";import{useTranslation as e}from"react-i18next";import o from"@tencentcloud/chat";import{useTUIKitContext as s}from"../../../context/TUIKitContext.js";import"../../../context/TUIMessageContext.js";import{useTUIContactContext as r}from"../../../context/TUIContactContext.js";import l from"../TUIContactInfo/hooks/useContactInfo.js";import{Avatar as m}from"../../Avatar/Avatar.js";import{defaultUserAvatar as d}from"../../Avatar/default.js";import u from"../../Icon/images/right-arrow.svg.js";import p from"../../Icon/images/down-arrow.png.js";function f(){var c=s().setActiveContact,f=e().t,v=r("TUIContactList"),N=v.isShowContactList,I=v.friendList,h=v.blocklistProfile,C=v.friendApplicationList,x=l().acceptFriendApplication,b=a(!1),g=b[0],T=b[1],k=a(!1),A=k[0],U=k[1],j=a(!1),P=j[0],S=j[1];return N&&i("div",t({className:"tui-contacts-list"},{children:[i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return T(!g)}},{children:[n("p",t({className:"tui-contacts-list-title"},{children:f("TUIContact.New Contacts")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:g?p:u,alt:""})}))]})),g&&C.map((function(a,e){var s=a.userID,r=a.avatar,l=a.nick,u=a.wording,p=a.type;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(t){t.stopPropagation(),c({type:"friendApplication",data:a})}},{children:[n(m,{size:30,image:r||d}),i("div",t({className:"tui-contacts-list-item-card"},{children:[i("div",{children:[n("p",t({className:"tui-contacts-list-item-name text-ellipsis"},{children:l||s})),""!==u&&n("p",t({className:"tui-contacts-list-item-text text-ellipsis"},{children:u}))]}),p===o.TYPES.SNS_APPLICATION_SENT_BY_ME&&n("p",t({className:"tui-contacts-list-btn-text text-ellipsis"},{children:f("TUIContact.waiting for verification")})),p===o.TYPES.SNS_APPLICATION_SENT_TO_ME&&n("div",t({className:"application-btn",role:"button",tabIndex:0,onClick:function(t){!function(t,i){t.stopPropagation(),x(i),c()}(t,s)}},{children:f("TUIContact.Agree")}))]}))]}),s)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return S(!P)}},{children:[n("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Blocked List")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:P?p:u,alt:""})}))]})),P&&h.map((function(a,e){var o=a.userID,s=a.avatar,r=a.nick;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(){c({type:"block",data:a})}},{children:[n(m,{size:30,image:s||d}),n("div",t({className:"tui-contacts-list-item-container"},{children:n("p",t({className:"tui-contacts-list-item-name"},{children:r||o}))}))]}),o)})),i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return U(!A)}},{children:[n("div",t({className:"tui-contacts-list-title"},{children:f("TUIContact.Friends")})),n("div",t({className:"tui-contacts-list-icon"},{children:n("img",{src:A?p:u,alt:""})}))]})),A&&I.map((function(a,e){var o=a.profile,s=o.userID,r=o.avatar,l=o.nick;return i("div",t({className:"tui-contacts-list-item",role:"button",tabIndex:0,onClick:function(){c({type:"friend",data:a})}},{children:[n(m,{size:30,image:r||d}),n("div",t({className:"tui-contacts-list-item-container"},{children:n("p",t({className:"tui-contacts-list-item-name"},{children:a.remark||l||s}))}))]}),s)}))]}))}var v=c.memo(f);export{v as TUIContactList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as o}from"react/jsx-runtime";import r,{useMemo as e}from"react";import{TUIConversationProvider as n}from"../../context/TUIConversationContext.js";import{TUIConversationList as i}from"../TUIConversationList/TUIConversationList.js";import"@tencentcloud/chat";function a(r){var a=r.children,s=r.createConversation,m=r.deleteConversation,c=r.filterConversation,v=e((function(){return{createConversation:s,deleteConversation:m,filterConversation:c}}),[s,m,c]);return o(n,t({value:v},{children:a||o(i,{})}))}var s=r.memo(a);export{s as TUIConversation,a as UnMemoizedTUIConversation};
|
|
@@ -4,6 +4,7 @@ import { ConversationPreviewUIComponentProps } from '../ConversationPreview/Conv
|
|
|
4
4
|
import { ConversationListContainerProps } from '../ConversationPreview/ConversationListContainer.js';
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
+
componentVisibleOptions?: any;
|
|
7
8
|
filters?: object;
|
|
8
9
|
sort?: object;
|
|
9
10
|
options?: object;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import
|
|
1
|
+
import{__assign as o}from"tslib";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i,{useState as r,useRef as s}from"react";import{useTranslation as a}from"react-i18next";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{isH5 as c}from"../../utils/env.js";import l from"./hooks/useConversationList.js";import{ConversationPreview as m}from"../ConversationPreview/ConversationPreview.js";import"@tencentcloud/chat-uikit-engine";import{Icon as C}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import"@tencentcloud/chat";import{useTUIConversationContext as h}from"../../context/TUIConversationContext.js";import{ConversationListContainer as p}from"../ConversationPreview/ConversationListContainer.js";import{ConversationSearchInput as f}from"../ConversationSearch/ConversationSearchInput.js";import{ConversationSearchResult as d}from"../ConversationSearch/ConversationSearchResult.js";import{ConversationCreate as w}from"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import{getDisplayTitle as j}from"../ConversationPreview/utils.js";import{useConversationUpdate as I}from"./hooks/useConversationUpdate.js";function L(i){var L=i.Preview,S=i.Container,g=void 0===S?p:S,x=i.onConversationListUpdated,P=i.filterConversation,T=i.componentVisibleOptions,U=void 0===T?{isProfileShow:!0,isSearchInputShow:!0,isContainerShow:!0}:T;a().t;var N=v("TUIConversationList"),k=N.chat,y=N.customClasses,A=N.conversation,b=N.setActiveConversation;N.setTUIProfileShow;var D=h("TUIConversationList").filterConversation,E=P||D,R=r(0),F=R[0],O=R[1],V=l(k,(function(o,e){o.length&&b(A)}),E),G=V.conversationList,K=V.setConversationList;I(K,x,(function(){return O((function(o){return o+1}))}),E);var M=r(""),q=M[0],z=M[1],B=r(G),H=B[0],J=B[1],Q=r(!1),W=Q[0],X=Q[1],Y=r(""),Z=Y[0],$=Y[1],_=s(null);return e("div",o({className:"tui-conversation ".concat(c?"tui-conversation-h5":""," ").concat(y||""," "),ref:_},{children:W?e(w,{conversationList:G,setConversationCreated:X}):t(n,{children:[U.isSearchInputShow&&t("div",o({className:"tui-conversation-header"},{children:[e(f,{value:q,clearable:!0,onChange:function(o){var e,t;if(z(null===(e=o.target)||void 0===e?void 0:e.value),null===(t=o.target)||void 0===t?void 0:t.value){var n=G.filter((function(e){var t;return j(e).toLocaleLowerCase().includes(null===(t=o.target)||void 0===t?void 0:t.value.toLocaleLowerCase())}));J(n)}else J([])}}),e("div",o({className:"tui-conversation-create-icon"},{children:e(C,{onClick:function(){z(""),X(!0)},type:u.CREATE,height:24,width:24})}))]})),U.isContainerShow&&e(g,o({setConversationList:K},{children:0===G.length?t("div",o({className:"no-result"},{children:[e(C,{className:"no-result-icon",type:u.EFFORT,width:42,height:42}),e("div",o({className:"no-result-message"},{children:"No conversation"}))]})):q?e(d,{Preview:L,searchValue:q,result:H}):G.map((function(t){return e(m,o({},{activeConversation:A,conversation:t,setActiveConversation:b,Preview:L,conversationUpdateCount:F,activeConversationID:Z,setActiveConversationID:$}),t.conversationID)}))}))]})}))}var S=i.memo(L);export{S as TUIConversationList,L as UnMemoTUIConversationList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as e,jsxs as o,Fragment as a}from"react/jsx-runtime";import{useState as n,useEffect as c}from"react";import{TUIStore as r,StoreName as i}from"@tencentcloud/chat-uikit-engine";import{useTranslation as s}from"react-i18next";import{isPC as m,isH5 as l}from"../../utils/env.js";import{useTUIKit as h}from"./hooks/useTUIKit.js";import{useCreateTUIKitContext as u}from"./hooks/useCreateTUIKitContext.js";import{TUIKitProvider as f}from"../../context/TUIKitContext.js";import{TUIConversation as I}from"../TUIConversation/TUIConversation.js";import{TUIChat as p}from"../TUIChat/TUIChat.js";import{TUIManage as v}from"../TUIManage/TUIManage.js";import{TUIProfile as d}from"../TUIProfile/TUIProfile.js";import"../TUIProfile/TUIProfileDefault.js";import"@tencentcloud/chat";import"../../context/TUIMessageContext.js";import"../Icon/config.js";import"../Icon/type.js";import{TUIContactInfo as C}from"../TUIContact/TUIContactInfo/TUIContactInfo.js";import{TUIContact as T}from"../TUIContact/TUIContact.js";import"../../locales/index.js";import U from"../Icon/images/chats.svg.js";import g from"../Icon/images/chats-selected.svg.js";import j from"../Icon/images/contacts.svg.js";import w from"../Icon/images/contacts-selected.svg.js";var x=[{id:1,name:"chats",icon:U,selectedIcon:g,value:"chats"},{id:2,name:"contacts",icon:j,selectedIcon:w,value:"contacts"}],N={className:"sample-h5-input",isTransmitter:!0};function M(n){var c=n.moduleValue,r=n.tabbarRender,i=n.setModuleValue;return o(a,{children:[o("div",t({className:"sample-chat-left-container"},{children:[e(d,{className:"sample-chat-profile"}),r,"chats"===c&&e(I,{}),"contacts"===c&&e(T,{})]})),"chats"===c&&o(a,{children:[e(p,{}),e(v,{})]}),"contacts"===c&&e(T,{children:e(C,{showChat:function(){i("chats")}})})]})}function P(n){var c=n.currentConversationID;return o(a,{children:[!c&&o("div",t({className:"sample-chat-h5-container"},{children:[e(d,{className:"sample-profile"}),e(I,{})]})),c&&o(a,{children:[e(p,{TUIMessageInputConfig:N}),e(v,{})]})]})}function b(a){var I=n(""),p=I[0],v=I[1],d=n("chats"),C=d[0],T=d[1],U=s().t,g=a.children,j=a.chat,w=a.customClasses,N=a.activeConversation,b=a.language,S=void 0===b?"en":b;window.tencent_cloud_im_csig_react_uikit_23F_xa=!0;var D=h({chat:j,activeConversation:N,language:S}),_=D.conversation,k=D.contactData,V=D.setActiveConversation,A=D.myProfile,y=D.TUIManageShow,K=D.setTUIManageShow,O=D.TUIProfileShow,R=D.setTUIProfileShow,F=D.setActiveContact,q=u({chat:j,language:S,conversation:_,contactData:k,setActiveConversation:V,customClasses:w,myProfile:A,TUIManageShow:y,setTUIManageShow:K,TUIProfileShow:O,setTUIProfileShow:R,setActiveContact:F});c((function(){return r.watch(i.CONV,{currentConversationID:z}),function(){r.unwatch(i.CONV,{currentConversationID:z})}}),[]);var z=function(t){v(t)},B=e("div",t({className:"sample-chat-tab"},{children:x.map((function(a){return o("div",t({className:"sample-chat-tab-container",role:"presentation",onClick:function(){var t;t=a.value,T(t)}},{children:[e("img",{src:C===a.value?a.selectedIcon:a.icon,alt:""}),e("p",t({className:"sample-chat-tab-text ".concat(C===a.value?"sample-chat-tab-active":"")},{children:U(a.name)}))]}),a.id)}))}));return e(f,t({value:q},{children:e("div",t({className:"tui-kit"},{children:g||m&&e(M,{moduleValue:C,tabbarRender:B,setModuleValue:T})||l&&e(P,{currentConversationID:p})}))}))}export{b as TUIKit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as o,useEffect as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{useTranslation as a}from"react-i18next";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as s}from"../Icon/type.js";import{Avatar as l}from"../Avatar/Avatar.js";import{defaultGroupAvatarWork as c,defaultUserAvatar as m}from"../Avatar/default.js";import{Switch as d}from"../Switch/Switch.js";import{useTUIKitContext as v}from"../../context/TUIKitContext.js";import"../../context/TUIMessageContext.js";import{isH5 as h,isPC as u}from"../../utils/env.js";import{getMessageProfile as f}from"../ConversationPreview/utils.js";import{useConversationUpdate as p}from"../TUIConversationList/hooks/useConversationUpdate.js";import{useConversation as g}from"../../hooks/useConversation.js";function C(){var C=a().t,I=o(null),N=I[0],j=I[1],x=o(null),U=x[0],k=x[1],T=o(!1),D=T[0],w=T[1],A=o(0),y=A[0],M=A[1],P=v("TUIManage"),S=P.conversation,b=P.setActiveConversation,L=P.chat,K=P.TUIManageShow,z=P.setTUIManageShow;p(null,(function(){M((function(n){return n+1}))}));var B=g(L),E=B.pinConversation,q=B.deleteConversation,F=function(){z(!1)};return t((function(){j(S),k(f(S)),w(!!S&&S.isPinned)}),[S,y]),K&&S&&e("div",n({className:"tui-manage ".concat(h?"tui-h5-manage":"")},{children:[e("div",n({className:"tui-manage-title"},{children:[u&&i(r,{onClick:F,type:s.CANCEL,width:9,height:16}),h&&i(r,{onClick:F,type:s.BACK,width:9,height:16}),i("span",n({style:{marginLeft:"10px"}},{children:C("TUIConversation.Conversation Information")}))]})),e("div",n({className:"tui-manage-container"},{children:[e("div",n({className:"tui-manage-info"},{children:[i("div",n({className:"info-avatar"},{children:i(l,{size:64,image:(null==U?void 0:U.avatar)||((null==U?void 0:U.groupID)?c:m)})})),i("div",n({className:"info-name"},{children:(null==U?void 0:U.nick)||(null==U?void 0:U.name)})),e("div",n({className:"info-id"},{children:["ID:",(null==U?void 0:U.userID)||(null==U?void 0:U.groupID)]}))]})),e("div",n({className:"tui-manage-handle"},{children:[e("div",n({className:"manage-handle-box"},{children:[i("div",n({className:"manage-handle-title"},{children:C("TUIConversation.Pin")})),i(d,{onChange:function(n){w(n.target.checked),E({conversationID:N.conversationID,isPinned:n.target.checked})},checked:D})]})),u&&i("div",n({className:"manage-handle-box",role:"presentation",onClick:function(){q(N.conversationID),b(null)}},{children:i("div",n({className:"manage-handle-title red"},{children:C("TUIConversation.Delete")}))}))]}))]}))]}))}export{C as TUIManage};
|