@tencentcloud/chat-uikit-react 2.2.7 → 2.2.8
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/CHANGELOG.md +6 -0
- package/dist/cjs/_virtual/index.js +1 -0
- package/dist/cjs/components/Avatar/Avatar.d.ts +1 -1
- package/dist/cjs/components/{TUIChat/TUIChat.d.ts → Chat/Chat.d.ts} +8 -8
- package/dist/cjs/components/Chat/Chat.js +1 -0
- package/dist/cjs/components/Chat/index.js +1 -0
- package/dist/cjs/components/{TUIChatHeader/TUIChatHeader.d.ts → ChatHeader/ChatHeader.d.ts} +3 -3
- package/dist/cjs/components/ChatHeader/ChatHeader.js +1 -0
- package/dist/cjs/components/{TUIChatHeader/TUIChatHeaderDefault.d.ts → ChatHeader/ChatHeaderDefault.d.ts} +2 -2
- package/dist/cjs/components/ChatHeader/ChatHeaderDefault.js +1 -0
- package/dist/cjs/components/ChatSetting/ChatSetting.d.ts +6 -0
- package/dist/cjs/components/ChatSetting/ChatSetting.js +1 -0
- package/dist/cjs/components/Contact/Contact.d.ts +6 -0
- package/dist/cjs/components/Contact/Contact.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/ContactInfo.d.ts +10 -0
- package/dist/cjs/components/Contact/ContactInfo/ContactInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/basicInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/blockInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/friendApplication.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/friendInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/groupInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactList/ContactList.d.ts +6 -0
- package/dist/cjs/components/Contact/ContactList/ContactList.js +1 -0
- package/dist/cjs/components/Contact/hooks/useTUIContact.js +1 -0
- package/dist/cjs/components/ContactSearch/ContactSearch.js +1 -0
- package/dist/cjs/components/ContactSearch/hooks/useContactSearch.js +1 -0
- package/dist/cjs/components/ConversationActions/ConversationActions.d.ts +52 -0
- package/dist/cjs/components/ConversationActions/ConversationActions.js +1 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreate.d.ts +21 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateButton.d.ts +13 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateButton.js +1 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.d.ts +16 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateSelectView.d.ts +15 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.d.ts +18 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.d.ts +24 -0
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.d.ts +14 -0
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationList/ConversationList.d.ts +57 -0
- package/dist/cjs/components/ConversationList/ConversationList.js +1 -0
- package/dist/cjs/components/ConversationList/ConversationListContent/ConversationListContent.d.ts +23 -0
- package/dist/cjs/components/ConversationList/ConversationListContent/ConversationListContent.js +1 -0
- package/dist/cjs/components/ConversationList/ConversationListHeader/ConversationListHeader.d.ts +15 -0
- package/dist/cjs/components/ConversationList/ConversationListHeader/ConversationListHeader.js +1 -0
- package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +39 -27
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearch.d.ts +39 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearch.js +1 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.d.ts +7 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.d.ts +29 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.js +1 -0
- package/dist/cjs/components/Icon/Icon.js +1 -1
- package/dist/cjs/components/Icon/config.js +1 -1
- package/dist/cjs/components/Icon/images/mute.svg.js +1 -0
- package/dist/cjs/components/Icon/type.d.ts +2 -0
- package/dist/cjs/components/Icon/type.js +1 -1
- package/dist/cjs/components/Input/Input.d.ts +5 -2
- package/dist/cjs/components/Input/Input.js +1 -1
- package/dist/{esm/components/TUIMessage/TUIMessage.d.ts → cjs/components/MessageElement/Message.d.ts} +1 -1
- package/dist/cjs/components/MessageElement/Message.js +1 -0
- package/dist/cjs/components/MessageElement/MessageAudio.js +1 -0
- package/dist/cjs/components/MessageElement/MessageAvatar.js +1 -0
- package/dist/cjs/components/MessageElement/MessageBubble.js +1 -0
- package/dist/cjs/components/MessageElement/MessageContext.js +1 -0
- package/dist/cjs/components/MessageElement/MessageCustom.js +1 -0
- package/dist/cjs/components/MessageElement/MessageDefault.js +1 -0
- package/dist/cjs/components/MessageElement/MessageName.js +1 -0
- package/dist/cjs/components/MessageElement/MessagePlugins.js +1 -0
- package/dist/cjs/components/MessageElement/MessageProgress.js +1 -0
- package/dist/cjs/components/MessageElement/MessageRevoke.js +1 -0
- package/dist/cjs/components/MessageElement/MessageStatus.js +1 -0
- package/dist/cjs/components/MessageElement/MessageSystem.js +1 -0
- package/dist/cjs/components/MessageElement/MessageText.js +1 -0
- package/dist/cjs/components/MessageElement/MessageTip.js +1 -0
- package/dist/cjs/components/MessageElement/hooks/useMessageHandler.js +1 -0
- package/dist/cjs/components/MessageElement/hooks/useMessageReply.js +1 -0
- package/dist/cjs/components/MessageInput/EmojiPicker.js +1 -0
- package/dist/cjs/components/MessageInput/Forward.js +1 -0
- package/dist/cjs/components/MessageInput/InputPluginsDefalut.js +1 -0
- package/dist/cjs/components/MessageInput/InputQuoteDefalut.js +1 -0
- package/dist/cjs/components/{TUIMessageInput/TUIMessageInput.d.ts → MessageInput/MessageInput.d.ts} +4 -4
- package/dist/cjs/components/MessageInput/MessageInput.js +1 -0
- package/dist/cjs/components/MessageInput/MessageInputDefault.js +1 -0
- package/dist/cjs/components/MessageInput/Transmitter.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useEmojiPicker.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useHandleForwardMessage.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useMessageInputText.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useUploadPicker.js +1 -0
- package/dist/cjs/components/{TUIMessageList/TUIMessageList.d.ts → MessageList/MessageList.d.ts} +3 -3
- package/dist/cjs/components/MessageList/MessageList.js +1 -0
- package/dist/cjs/components/MessageList/hooks/useMessageListElement.js +1 -0
- package/dist/cjs/components/PlaceHolder/index.d.ts +34 -0
- package/dist/cjs/components/PlaceHolder/index.js +1 -0
- package/dist/cjs/components/Plugins/index.d.ts +5 -2
- package/dist/cjs/components/Profile/Profile.d.ts +10 -0
- package/dist/cjs/components/Profile/Profile.js +1 -1
- package/dist/cjs/components/Profile/ProfileDefault.js +1 -0
- package/dist/cjs/components/Profile/myProfile/MyProfile.js +1 -0
- package/dist/cjs/context/{TUIChatActionContext.d.ts → ChatActionContext.d.ts} +1 -1
- package/dist/cjs/context/{TUIChatStateContext.d.ts → ChatStateContext.d.ts} +6 -6
- package/dist/cjs/context/ComponentContext.d.ts +3 -3
- package/dist/cjs/context/{TUIContactContext.d.ts → ContactContext.d.ts} +4 -4
- package/dist/cjs/context/ConversationListContext.d.ts +22 -0
- package/dist/cjs/context/ConversationListContext.js +1 -0
- package/dist/{esm/context/TUIMessageContext.d.ts → cjs/context/MessageContext.d.ts} +1 -1
- package/dist/{esm/context/TUIMessageInputContext.d.ts → cjs/context/MessageInputContext.d.ts} +4 -4
- package/dist/cjs/hooks/useConversation.d.ts +4 -23
- package/dist/cjs/hooks/useConversation.js +1 -1
- package/dist/cjs/hooks/useLongPress.d.ts +3 -0
- package/dist/cjs/hooks/useLongPress.js +1 -0
- package/dist/cjs/hooks/useMouseHover.js +1 -0
- package/dist/cjs/index.css +2 -1
- package/dist/cjs/index.d.css +885 -407
- package/dist/cjs/index.d.ts +41 -29
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/TUIConversation.js +1 -1
- package/dist/cjs/locales/index.js +1 -1
- package/dist/cjs/locales/ja-JP/TUIConversation.js +1 -1
- package/dist/cjs/locales/ko-KR/TUIConversation.js +1 -1
- package/dist/cjs/locales/zh-CN/TUIConversation.js +1 -1
- package/dist/cjs/locales/zh-TW/TUIConversation.js +1 -1
- package/dist/esm/_virtual/index.js +1 -0
- package/dist/esm/components/Avatar/Avatar.d.ts +1 -1
- package/dist/esm/components/{TUIChat/TUIChat.d.ts → Chat/Chat.d.ts} +8 -8
- package/dist/esm/components/Chat/Chat.js +1 -0
- package/dist/esm/components/Chat/index.js +1 -0
- package/dist/esm/components/{TUIChatHeader/TUIChatHeader.d.ts → ChatHeader/ChatHeader.d.ts} +3 -3
- package/dist/esm/components/ChatHeader/ChatHeader.js +1 -0
- package/dist/esm/components/{TUIChatHeader/TUIChatHeaderDefault.d.ts → ChatHeader/ChatHeaderDefault.d.ts} +2 -2
- package/dist/esm/components/ChatHeader/ChatHeaderDefault.js +1 -0
- package/dist/esm/components/ChatSetting/ChatSetting.d.ts +6 -0
- package/dist/esm/components/ChatSetting/ChatSetting.js +1 -0
- package/dist/esm/components/Contact/Contact.d.ts +6 -0
- package/dist/esm/components/Contact/Contact.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/ContactInfo.d.ts +10 -0
- package/dist/esm/components/Contact/ContactInfo/ContactInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/basicInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/blockInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/friendApplication.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/friendInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/groupInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -0
- package/dist/esm/components/Contact/ContactList/ContactList.d.ts +6 -0
- package/dist/esm/components/Contact/ContactList/ContactList.js +1 -0
- package/dist/esm/components/Contact/hooks/useTUIContact.js +1 -0
- package/dist/esm/components/ContactSearch/ContactSearch.js +1 -0
- package/dist/esm/components/ContactSearch/hooks/useContactSearch.js +1 -0
- package/dist/esm/components/ConversationActions/ConversationActions.d.ts +52 -0
- package/dist/esm/components/ConversationActions/ConversationActions.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreate.d.ts +21 -0
- package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateButton.d.ts +13 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateButton.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.d.ts +16 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateSelectView.d.ts +15 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.d.ts +18 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.d.ts +24 -0
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.d.ts +14 -0
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/esm/components/ConversationList/ConversationList.d.ts +57 -0
- package/dist/esm/components/ConversationList/ConversationList.js +1 -0
- package/dist/esm/components/ConversationList/ConversationListContent/ConversationListContent.d.ts +23 -0
- package/dist/esm/components/ConversationList/ConversationListContent/ConversationListContent.js +1 -0
- package/dist/esm/components/ConversationList/ConversationListHeader/ConversationListHeader.d.ts +15 -0
- package/dist/esm/components/ConversationList/ConversationListHeader/ConversationListHeader.js +1 -0
- package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +39 -27
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearch.d.ts +39 -0
- package/dist/esm/components/ConversationSearch/ConversationSearch.js +1 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.d.ts +7 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.d.ts +29 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.js +1 -0
- package/dist/esm/components/Icon/Icon.js +1 -1
- package/dist/esm/components/Icon/config.js +1 -1
- package/dist/esm/components/Icon/images/mute.svg.js +1 -0
- package/dist/esm/components/Icon/type.d.ts +2 -0
- package/dist/esm/components/Icon/type.js +1 -1
- package/dist/esm/components/Input/Input.d.ts +5 -2
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/{cjs/components/TUIMessage/TUIMessage.d.ts → esm/components/MessageElement/Message.d.ts} +1 -1
- package/dist/esm/components/MessageElement/Message.js +1 -0
- package/dist/esm/components/MessageElement/MessageAudio.js +1 -0
- package/dist/esm/components/MessageElement/MessageAvatar.js +1 -0
- package/dist/esm/components/MessageElement/MessageBubble.js +1 -0
- package/dist/esm/components/MessageElement/MessageContext.js +1 -0
- package/dist/esm/components/MessageElement/MessageCustom.js +1 -0
- package/dist/esm/components/MessageElement/MessageDefault.js +1 -0
- package/dist/esm/components/MessageElement/MessageName.js +1 -0
- package/dist/esm/components/MessageElement/MessagePlugins.js +1 -0
- package/dist/esm/components/MessageElement/MessageProgress.js +1 -0
- package/dist/esm/components/MessageElement/MessageRevoke.js +1 -0
- package/dist/esm/components/MessageElement/MessageStatus.js +1 -0
- package/dist/esm/components/MessageElement/MessageSystem.js +1 -0
- package/dist/esm/components/MessageElement/MessageText.js +1 -0
- package/dist/esm/components/MessageElement/MessageTip.js +1 -0
- package/dist/esm/components/MessageElement/hooks/useMessageHandler.js +1 -0
- package/dist/esm/components/MessageElement/hooks/useMessageReply.js +1 -0
- package/dist/esm/components/MessageInput/EmojiPicker.js +1 -0
- package/dist/esm/components/MessageInput/Forward.js +1 -0
- package/dist/esm/components/MessageInput/InputPluginsDefalut.js +1 -0
- package/dist/esm/components/MessageInput/InputQuoteDefalut.js +1 -0
- package/dist/esm/components/{TUIMessageInput/TUIMessageInput.d.ts → MessageInput/MessageInput.d.ts} +4 -4
- package/dist/esm/components/MessageInput/MessageInput.js +1 -0
- package/dist/esm/components/MessageInput/MessageInputDefault.js +1 -0
- package/dist/esm/components/MessageInput/Transmitter.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useEmojiPicker.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useHandleForwardMessage.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useMessageInputText.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useUploadPicker.js +1 -0
- package/dist/esm/components/{TUIMessageList/TUIMessageList.d.ts → MessageList/MessageList.d.ts} +3 -3
- package/dist/esm/components/MessageList/MessageList.js +1 -0
- package/dist/esm/components/MessageList/hooks/useMessageListElement.js +1 -0
- package/dist/esm/components/PlaceHolder/index.d.ts +34 -0
- package/dist/esm/components/PlaceHolder/index.js +1 -0
- package/dist/esm/components/Plugins/index.d.ts +5 -2
- package/dist/esm/components/Profile/Profile.d.ts +10 -0
- package/dist/esm/components/Profile/Profile.js +1 -1
- package/dist/esm/components/Profile/ProfileDefault.js +1 -0
- package/dist/esm/components/Profile/myProfile/MyProfile.js +1 -0
- package/dist/esm/context/{TUIChatActionContext.d.ts → ChatActionContext.d.ts} +1 -1
- package/dist/esm/context/{TUIChatStateContext.d.ts → ChatStateContext.d.ts} +6 -6
- package/dist/esm/context/ComponentContext.d.ts +3 -3
- package/dist/esm/context/{TUIContactContext.d.ts → ContactContext.d.ts} +4 -4
- package/dist/esm/context/ConversationListContext.d.ts +22 -0
- package/dist/esm/context/ConversationListContext.js +1 -0
- package/dist/{cjs/context/TUIMessageContext.d.ts → esm/context/MessageContext.d.ts} +1 -1
- package/dist/{cjs/context/TUIMessageInputContext.d.ts → esm/context/MessageInputContext.d.ts} +4 -4
- package/dist/esm/hooks/useConversation.d.ts +4 -23
- package/dist/esm/hooks/useConversation.js +1 -1
- package/dist/esm/hooks/useLongPress.d.ts +3 -0
- package/dist/esm/hooks/useLongPress.js +1 -0
- package/dist/esm/hooks/useMouseHover.js +1 -0
- package/dist/esm/index.css +2 -1
- package/dist/esm/index.d.css +885 -407
- package/dist/esm/index.d.ts +41 -29
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/TUIConversation.js +1 -1
- package/dist/esm/locales/index.js +1 -1
- package/dist/esm/locales/ja-JP/TUIConversation.js +1 -1
- package/dist/esm/locales/ko-KR/TUIConversation.js +1 -1
- package/dist/esm/locales/zh-CN/TUIConversation.js +1 -1
- package/dist/esm/locales/zh-TW/TUIConversation.js +1 -1
- package/package.json +2 -1
- package/src/components/Avatar/Avatar.tsx +33 -31
- package/src/components/{TUIChat/TUIChat.tsx → Chat/Chat.tsx} +15 -15
- package/src/components/{TUIChat → Chat}/hooks/useHandleMessage.tsx +1 -1
- package/src/components/{TUIChat → Chat}/hooks/useHandleMessageList.tsx +1 -1
- package/src/components/{TUIChat → Chat}/index.ts +1 -1
- package/src/components/{TUIChatHeader/TUIChatHeader.tsx → ChatHeader/ChatHeader.tsx} +5 -5
- package/src/components/{TUIChatHeader/TUIChatHeaderDefault.tsx → ChatHeader/ChatHeaderDefault.tsx} +2 -2
- package/src/components/ChatHeader/index.ts +2 -0
- package/src/components/{TUIChatHeader → ChatHeader}/styles/layout.scss +0 -8
- package/src/components/{TUIManage/TUIManage.tsx → ChatSetting/ChatSetting.tsx} +17 -20
- package/src/components/ChatSetting/index.ts +1 -0
- package/src/components/{TUIManage → ChatSetting}/styles/index.scss +4 -2
- package/src/components/Checkbox/index.tsx +9 -9
- package/src/components/{TUIContact/TUIContact.tsx → Contact/Contact.tsx} +35 -35
- package/src/components/{TUIContact/TUIContactInfo/TUIContactInfo.tsx → Contact/ContactInfo/ContactInfo.tsx} +4 -4
- package/src/components/{TUIContact/TUIContactList/TUIContactList.tsx → Contact/ContactList/ContactList.tsx} +3 -3
- package/src/components/Contact/index.ts +3 -0
- package/src/components/{TUIContactSearch/TUIContactSearch.tsx → ContactSearch/ContactSearch.tsx} +8 -7
- package/src/components/ConversationActions/ConversationActions.scss +45 -0
- package/src/components/ConversationActions/ConversationActions.tsx +172 -0
- package/src/components/ConversationActions/index.ts +1 -0
- package/src/components/ConversationCreate/ConversationCreate.tsx +104 -49
- package/src/components/ConversationCreate/ConversationCreateButton.tsx +46 -0
- package/src/components/ConversationCreate/ConversationCreateGroupDetail.tsx +179 -0
- package/src/components/ConversationCreate/ConversationCreateSelectView.tsx +7 -7
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +31 -29
- package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +19 -19
- package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +36 -29
- package/src/components/ConversationCreate/index.ts +2 -1
- package/src/components/ConversationCreate/styles/{ConversationCreatGroupDetail.scss → ConversationCreateGroupDetail.scss} +6 -1
- package/src/components/ConversationCreate/styles/conversationCreateButton.scss +5 -0
- package/src/components/ConversationCreate/styles/index.scss +34 -2
- package/src/components/ConversationList/ConversationList.scss +29 -0
- package/src/components/ConversationList/ConversationList.tsx +155 -0
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +16 -0
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.tsx +63 -0
- package/src/components/ConversationList/ConversationListContent/index.ts +1 -0
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.scss +28 -0
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.tsx +43 -0
- package/src/components/ConversationList/ConversationListHeader/index.ts +1 -0
- package/src/components/ConversationList/index.ts +3 -0
- package/src/components/ConversationPreview/ConversationPreview.scss +137 -0
- package/src/components/ConversationPreview/ConversationPreview.tsx +245 -63
- package/src/components/ConversationPreview/index.ts +0 -1
- package/src/components/ConversationPreview/utils.tsx +78 -60
- package/src/components/ConversationSearch/ConversationSearch.scss +22 -0
- package/src/components/ConversationSearch/ConversationSearch.tsx +125 -0
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.scss +13 -0
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.tsx +42 -0
- package/src/components/ConversationSearch/ConversationSearchInput/index.ts +1 -0
- package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.scss +15 -0
- package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.tsx +72 -0
- package/src/components/ConversationSearch/ConversationSearchResult/index.ts +1 -0
- package/src/components/ConversationSearch/index.ts +3 -2
- package/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx +2 -3
- package/src/components/Icon/Icon.tsx +8 -8
- package/src/components/Icon/config.ts +9 -0
- package/src/components/Icon/images/mute.svg +8 -0
- package/src/components/Icon/styles/index.scss +41 -6
- package/src/components/Icon/type.ts +2 -0
- package/src/components/Input/Input.tsx +24 -23
- package/src/components/{TUIMessage/TUIMessage.tsx → MessageElement/Message.tsx} +33 -33
- package/src/components/{TUIMessage → MessageElement}/MessageCustom.tsx +1 -1
- package/src/components/{TUIMessage/TUIMessageDefault.tsx → MessageElement/MessageDefault.tsx} +24 -24
- package/src/components/{TUIMessage → MessageElement}/MessagePlugins.tsx +18 -18
- package/src/components/{TUIMessage → MessageElement}/index.ts +1 -1
- package/src/components/{TUIMessage → MessageElement}/styles/layout.scss +1 -1
- package/src/components/{TUIMessageInput → MessageInput}/EmojiPicker.tsx +2 -2
- package/src/components/{TUIMessageInput/TUIForward.tsx → MessageInput/Forward.tsx} +41 -36
- package/src/components/{TUIMessageInput → MessageInput}/InputPluginsDefalut.tsx +2 -2
- package/src/components/{TUIMessageInput → MessageInput}/InputQuoteDefalut.tsx +1 -1
- package/src/components/{TUIMessageInput/TUIMessageInput.tsx → MessageInput/MessageInput.tsx} +25 -27
- package/src/components/{TUIMessageInput/TUIMessageInputDefault.tsx → MessageInput/MessageInputDefault.tsx} +14 -14
- package/src/components/{TUIMessageInput → MessageInput}/Transmitter.tsx +2 -2
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useEmojiPicker.tsx +1 -1
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.tsx +1 -1
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputText.tsx +2 -2
- package/src/components/MessageInput/index.ts +3 -0
- package/src/components/{TUIMessageInput → MessageInput}/styles/color.scss +1 -1
- package/src/components/{TUIMessageList/TUIMessageList.tsx → MessageList/MessageList.tsx} +5 -5
- package/src/components/{TUIMessageList → MessageList}/hooks/useMessageListElement.tsx +1 -1
- package/src/components/MessageList/index.ts +1 -0
- package/src/components/PlaceHolder/index.tsx +79 -0
- package/src/components/PlaceHolder/styles/index.scss +36 -0
- package/src/components/Plugins/index.tsx +49 -45
- package/src/components/Profile/Profile.tsx +46 -21
- package/src/components/Profile/index.ts +2 -1
- package/src/components/Profile/myProfile/MyProfile.tsx +25 -0
- package/src/components/Profile/myProfile/index.ts +1 -0
- package/src/components/Profile/myProfile/styles/index.scss +32 -0
- package/src/components/Profile/styles/index.scss +2 -32
- package/src/components/{TUIProfile → Profile}/styles/layout.scss +1 -0
- package/src/components/index.ts +13 -11
- package/src/context/{TUIChatActionContext.tsx → ChatActionContext.tsx} +1 -1
- package/src/context/ChatStateContext.tsx +49 -0
- package/src/context/ComponentContext.tsx +13 -13
- package/src/context/{TUIContactContext.tsx → ContactContext.tsx} +10 -11
- package/src/context/ConversationListContext.tsx +113 -0
- package/src/context/LanguageContext.tsx +1 -0
- package/src/context/MessageContext.tsx +55 -0
- package/src/context/MessageInputContext.tsx +54 -0
- package/src/context/index.ts +6 -5
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useConversation.tsx +26 -74
- package/src/hooks/useLongPress.tsx +117 -0
- package/src/hooks/useMouseHover.tsx +21 -0
- package/src/locales/en-US/TUIConversation.ts +4 -0
- package/src/locales/index.ts +10 -0
- package/src/locales/ja-JP/TUIConversation.ts +4 -0
- package/src/locales/ko-KR/TUIConversation.ts +4 -0
- package/src/locales/zh-CN/TUIConversation.ts +4 -0
- package/src/locales/zh-TW/TUIConversation.ts +4 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +0 -1
- package/dist/cjs/components/ConversationPreview/ConversationListContainer.d.ts +0 -10
- package/dist/cjs/components/ConversationPreview/ConversationListContainer.js +0 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.d.ts +0 -10
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +0 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput.d.ts +0 -6
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput.js +0 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.d.ts +0 -12
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +0 -1
- package/dist/cjs/components/TUIChat/TUIChat.js +0 -1
- package/dist/cjs/components/TUIChat/index.js +0 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +0 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContact.d.ts +0 -6
- package/dist/cjs/components/TUIContact/TUIContact.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +0 -10
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/groupInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +0 -6
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +0 -1
- package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +0 -1
- package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +0 -1
- package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +0 -1
- package/dist/cjs/components/TUIConversation/TUIConversation.d.ts +0 -12
- package/dist/cjs/components/TUIConversation/TUIConversation.js +0 -1
- package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +0 -19
- package/dist/cjs/components/TUIConversationList/TUIConversationList.js +0 -1
- package/dist/cjs/components/TUIConversationList/hooks/useConversationList.js +0 -1
- package/dist/cjs/components/TUIConversationList/hooks/useConversationUpdate.js +0 -1
- package/dist/cjs/components/TUIManage/TUIManage.d.ts +0 -6
- package/dist/cjs/components/TUIManage/TUIManage.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageAudio.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageAvatar.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageBubble.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageContext.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageCustom.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageName.js +0 -1
- package/dist/cjs/components/TUIMessage/MessagePlugins.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageProgress.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageRevoke.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageStatus.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageSystem.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageText.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageTip.js +0 -1
- package/dist/cjs/components/TUIMessage/TUIMessage.js +0 -1
- package/dist/cjs/components/TUIMessage/TUIMessageDefault.js +0 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +0 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +0 -1
- package/dist/cjs/components/TUIMessageInput/EmojiPicker.js +0 -1
- package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +0 -1
- package/dist/cjs/components/TUIMessageInput/InputQuoteDefalut.js +0 -1
- package/dist/cjs/components/TUIMessageInput/TUIForward.js +0 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +0 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +0 -1
- package/dist/cjs/components/TUIMessageInput/Transmitter.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +0 -1
- package/dist/cjs/components/TUIMessageList/TUIMessageList.js +0 -1
- package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +0 -1
- package/dist/cjs/components/TUIProfile/TUIProfile.d.ts +0 -10
- package/dist/cjs/components/TUIProfile/TUIProfile.js +0 -1
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +0 -1
- package/dist/cjs/context/TUIConversationContext.js +0 -1
- package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +0 -1
- package/dist/esm/components/ConversationPreview/ConversationListContainer.d.ts +0 -10
- package/dist/esm/components/ConversationPreview/ConversationListContainer.js +0 -1
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.d.ts +0 -10
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +0 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchInput.d.ts +0 -6
- package/dist/esm/components/ConversationSearch/ConversationSearchInput.js +0 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.d.ts +0 -12
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +0 -1
- package/dist/esm/components/TUIChat/TUIChat.js +0 -1
- package/dist/esm/components/TUIChat/index.js +0 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +0 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +0 -1
- package/dist/esm/components/TUIContact/TUIContact.d.ts +0 -6
- package/dist/esm/components/TUIContact/TUIContact.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +0 -10
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/groupInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +0 -6
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +0 -1
- package/dist/esm/components/TUIContact/hooks/useTUIContact.js +0 -1
- package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +0 -1
- package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +0 -1
- package/dist/esm/components/TUIConversation/TUIConversation.d.ts +0 -12
- package/dist/esm/components/TUIConversation/TUIConversation.js +0 -1
- package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +0 -19
- package/dist/esm/components/TUIConversationList/TUIConversationList.js +0 -1
- package/dist/esm/components/TUIConversationList/hooks/useConversationList.js +0 -1
- package/dist/esm/components/TUIConversationList/hooks/useConversationUpdate.js +0 -1
- package/dist/esm/components/TUIManage/TUIManage.d.ts +0 -6
- package/dist/esm/components/TUIManage/TUIManage.js +0 -1
- package/dist/esm/components/TUIMessage/MessageAudio.js +0 -1
- package/dist/esm/components/TUIMessage/MessageAvatar.js +0 -1
- package/dist/esm/components/TUIMessage/MessageBubble.js +0 -1
- package/dist/esm/components/TUIMessage/MessageContext.js +0 -1
- package/dist/esm/components/TUIMessage/MessageCustom.js +0 -1
- package/dist/esm/components/TUIMessage/MessageName.js +0 -1
- package/dist/esm/components/TUIMessage/MessagePlugins.js +0 -1
- package/dist/esm/components/TUIMessage/MessageProgress.js +0 -1
- package/dist/esm/components/TUIMessage/MessageRevoke.js +0 -1
- package/dist/esm/components/TUIMessage/MessageStatus.js +0 -1
- package/dist/esm/components/TUIMessage/MessageSystem.js +0 -1
- package/dist/esm/components/TUIMessage/MessageText.js +0 -1
- package/dist/esm/components/TUIMessage/MessageTip.js +0 -1
- package/dist/esm/components/TUIMessage/TUIMessage.js +0 -1
- package/dist/esm/components/TUIMessage/TUIMessageDefault.js +0 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +0 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +0 -1
- package/dist/esm/components/TUIMessageInput/EmojiPicker.js +0 -1
- package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +0 -1
- package/dist/esm/components/TUIMessageInput/InputQuoteDefalut.js +0 -1
- package/dist/esm/components/TUIMessageInput/TUIForward.js +0 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +0 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +0 -1
- package/dist/esm/components/TUIMessageInput/Transmitter.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +0 -1
- package/dist/esm/components/TUIMessageList/TUIMessageList.js +0 -1
- package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +0 -1
- package/dist/esm/components/TUIProfile/TUIProfile.d.ts +0 -10
- package/dist/esm/components/TUIProfile/TUIProfile.js +0 -1
- package/dist/esm/components/TUIProfile/TUIProfileDefault.js +0 -1
- package/dist/esm/context/TUIConversationContext.js +0 -1
- package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +0 -170
- package/src/components/ConversationPreview/ConversationListContainer.tsx +0 -20
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +0 -191
- package/src/components/ConversationPreview/styles/index.scss +0 -171
- package/src/components/ConversationSearch/ConversationSearchInput.tsx +0 -27
- package/src/components/ConversationSearch/ConversationSearchResult.tsx +0 -39
- package/src/components/ConversationSearch/styles/index.scss +0 -20
- package/src/components/TUIChatHeader/index.ts +0 -2
- package/src/components/TUIContact/index.ts +0 -3
- package/src/components/TUIConversation/TUIConversation.tsx +0 -46
- package/src/components/TUIConversation/index.ts +0 -1
- package/src/components/TUIConversationList/TUIConversationList.tsx +0 -178
- package/src/components/TUIConversationList/hooks/useConversationList.tsx +0 -42
- package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +0 -38
- package/src/components/TUIConversationList/index.scss +0 -58
- package/src/components/TUIConversationList/index.ts +0 -2
- package/src/components/TUIManage/index.ts +0 -1
- package/src/components/TUIMessageInput/index.ts +0 -3
- package/src/components/TUIMessageList/index.ts +0 -1
- package/src/components/TUIProfile/TUIProfile.tsx +0 -50
- package/src/components/TUIProfile/index.ts +0 -2
- package/src/components/TUIProfile/styles/index.scss +0 -2
- package/src/context/TUIChatStateContext.tsx +0 -50
- package/src/context/TUIConversationContext.tsx +0 -29
- package/src/context/TUIMessageContext.tsx +0 -56
- package/src/context/TUIMessageInputContext.tsx +0 -55
- /package/dist/cjs/components/{TUIChat/TUIChatState.js → Chat/ChatState.js} +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useCreateTUIChatStateContext.js +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useHandleMessage.d.ts +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useHandleMessage.js +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useHandleMessageList.js +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/server.js +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/utils.js +0 -0
- /package/dist/cjs/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageContext.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageFace.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageFile.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageImage.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageLocation.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageMerger.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessagePlugins.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageVideo.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/hooks/useMessagePluginElement.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/utils/decodeText.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/utils/emojiMap.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/utils/index.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/InputPluginsDefalut.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessageInput/TUIMessageInputDefault.d.ts → MessageInput/MessageInputDefault.d.ts} +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useEmojiPicker.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useUploadElement.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.d.ts +0 -0
- /package/dist/cjs/components/{TUIProfile/TUIProfileDefault.d.ts → Profile/ProfileDefault.d.ts} +0 -0
- /package/dist/cjs/components/{TUIProfile → Profile}/hooks/useMyProfile.js +0 -0
- /package/dist/cjs/context/{TUIChatActionContext.js → ChatActionContext.js} +0 -0
- /package/dist/cjs/context/{TUIChatStateContext.js → ChatStateContext.js} +0 -0
- /package/dist/cjs/context/{TUIContactContext.js → ContactContext.js} +0 -0
- /package/dist/cjs/context/{TUIMessageContext.js → MessageContext.js} +0 -0
- /package/dist/cjs/context/{TUIMessageInputContext.js → MessageInputContext.js} +0 -0
- /package/dist/esm/components/{TUIChat/TUIChatState.js → Chat/ChatState.js} +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useCreateTUIChatStateContext.js +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useHandleMessage.d.ts +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useHandleMessage.js +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useHandleMessageList.js +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/server.js +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/utils.js +0 -0
- /package/dist/esm/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageContext.d.ts +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageFace.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageFile.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageImage.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageLocation.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageMerger.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessagePlugins.d.ts +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageVideo.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/hooks/useMessagePluginElement.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/utils/decodeText.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/utils/emojiMap.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/utils/index.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/InputPluginsDefalut.d.ts +0 -0
- /package/dist/esm/components/{TUIMessageInput/TUIMessageInputDefault.d.ts → MessageInput/MessageInputDefault.d.ts} +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useEmojiPicker.d.ts +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.d.ts +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useUploadElement.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.d.ts +0 -0
- /package/dist/esm/components/{TUIProfile/TUIProfileDefault.d.ts → Profile/ProfileDefault.d.ts} +0 -0
- /package/dist/esm/components/{TUIProfile → Profile}/hooks/useMyProfile.js +0 -0
- /package/dist/esm/context/{TUIChatActionContext.js → ChatActionContext.js} +0 -0
- /package/dist/esm/context/{TUIChatStateContext.js → ChatStateContext.js} +0 -0
- /package/dist/esm/context/{TUIContactContext.js → ContactContext.js} +0 -0
- /package/dist/esm/context/{TUIMessageContext.js → MessageContext.js} +0 -0
- /package/dist/esm/context/{TUIMessageInputContext.js → MessageInputContext.js} +0 -0
- /package/src/components/{TUIChat/TUIChatState.tsx → Chat/ChatState.tsx} +0 -0
- /package/src/components/{TUIChat → Chat}/hooks/useCreateTUIChatStateContext.tsx +0 -0
- /package/src/components/{TUIChat → Chat}/hooks/useIsMounted.ts +0 -0
- /package/src/components/{TUIChat → Chat}/server.ts +0 -0
- /package/src/components/{TUIChat → Chat}/styles/index.scss +0 -0
- /package/src/components/{TUIChat → Chat}/styles/layout.scss +0 -0
- /package/src/components/{TUIChat → Chat}/utils.ts +0 -0
- /package/src/components/{TUIChatHeader → ChatHeader}/styles/color.scss +0 -0
- /package/src/components/{TUIChatHeader → ChatHeader}/styles/index.scss +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/basicInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/blockInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/friendApplication.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/friendInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/groupInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/hooks/useContactInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/index.scss +0 -0
- /package/src/components/{TUIContact/TUIContactList → Contact/ContactList}/index.scss +0 -0
- /package/src/components/{TUIContact → Contact}/hooks/useTUIContact.tsx +0 -0
- /package/src/components/{TUIContact → Contact}/index.scss +0 -0
- /package/src/components/{TUIContactSearch → ContactSearch}/hooks/useContactSearch.tsx +0 -0
- /package/src/components/{TUIContactSearch → ContactSearch}/index.scss +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageAudio.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageAvatar.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageBubble.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageContext.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageFace.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageFile.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageImage.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageLocation.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageMerger.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageName.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageProgress.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageRevoke.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageStatus.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageSystem.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageText.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageTip.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageVideo.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/index.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/useMessageHandler.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/useMessagePluginElement.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/useMessageReply.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/styles/color.scss +0 -0
- /package/src/components/{TUIMessage → MessageElement}/styles/index.scss +0 -0
- /package/src/components/{TUIMessage → MessageElement}/utils/decodeText.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/utils/emojiMap.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/utils/index.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/index.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useHandleForwardMessage.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useHandleQuoteMessage.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/usePluginsElement.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useUploadElement.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/styles/index.scss +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/styles/layout.scss +0 -0
- /package/src/components/{TUIMessageList → MessageList}/styles/color.scss +0 -0
- /package/src/components/{TUIMessageList → MessageList}/styles/index.scss +0 -0
- /package/src/components/{TUIMessageList → MessageList}/styles/layout.scss +0 -0
- /package/src/components/{TUIProfile/TUIProfileDefault.tsx → Profile/ProfileDefault.tsx} +0 -0
- /package/src/components/{TUIProfile → Profile}/hooks/index.ts +0 -0
- /package/src/components/{TUIProfile → Profile}/hooks/useMyProfile.tsx +0 -0
- /package/src/components/{TUIProfile → Profile}/styles/color.scss +0 -0
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Conversation, Profile } from '@tencentcloud/chat';
|
|
4
|
-
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import { Input } from '../Input';
|
|
6
|
-
import './styles/ConversationCreatGroupDetail.scss';
|
|
7
|
-
import { Icon, IconTypes } from '../Icon';
|
|
8
|
-
import {
|
|
9
|
-
Avatar,
|
|
10
|
-
defaultGroupAvatarWork,
|
|
11
|
-
defaultGroupAvatarAVChatRoom,
|
|
12
|
-
defaultGroupAvatarMeeting,
|
|
13
|
-
defaultGroupAvatarPublic, defaultUserAvatar,
|
|
14
|
-
} from '../Avatar';
|
|
15
|
-
import { PageStateTypes } from './ConversationCreate';
|
|
16
|
-
import { ConversationGroupTypeInfo, GroupType, typeInfoList } from './ConversationGroupTypeInfo';
|
|
17
|
-
import { useUIManager } from '../../context';
|
|
18
|
-
import { CreateGroupConversationParams } from '../../hooks';
|
|
19
|
-
|
|
20
|
-
export interface ConversationCreatGroupDetailProps {
|
|
21
|
-
profileList: Array<Profile>,
|
|
22
|
-
pageState: PageStateTypes,
|
|
23
|
-
setPageState: React.Dispatch<React.SetStateAction<PageStateTypes>>,
|
|
24
|
-
createConversation: (params: string | CreateGroupConversationParams) => Promise<Conversation>,
|
|
25
|
-
setConversationCreated: React.Dispatch<React.SetStateAction<boolean>>,
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetailProps) {
|
|
29
|
-
const {
|
|
30
|
-
profileList, pageState, setPageState, createConversation, setConversationCreated,
|
|
31
|
-
} = props;
|
|
32
|
-
const { t } = useTranslation();
|
|
33
|
-
const { setActiveConversation, myProfile } = useUIManager();
|
|
34
|
-
const temp = [...profileList];
|
|
35
|
-
myProfile && temp.unshift(myProfile);
|
|
36
|
-
const name = temp.map((item) => item.nick || item.userID).toString();
|
|
37
|
-
const [groupName, setGroupName] = useState(
|
|
38
|
-
name.length >= 15 ? `${name.slice(0, 12)}...` : name,
|
|
39
|
-
);
|
|
40
|
-
const [groupID, setGroupID] = useState('');
|
|
41
|
-
const [groupType, setGroupType] = useState<string>('Work');
|
|
42
|
-
const groupInfoChange = (e: any, type: string) => {
|
|
43
|
-
const { value } = e.target;
|
|
44
|
-
switch (type) {
|
|
45
|
-
case 'name':
|
|
46
|
-
setGroupName(value);
|
|
47
|
-
break;
|
|
48
|
-
case 'id':
|
|
49
|
-
setGroupID(value);
|
|
50
|
-
break;
|
|
51
|
-
case 'type':
|
|
52
|
-
setGroupType(value);
|
|
53
|
-
break;
|
|
54
|
-
default:
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
const showGroupTypeInfo = () => {
|
|
58
|
-
setPageState(PageStateTypes.GROUP_TYPE);
|
|
59
|
-
};
|
|
60
|
-
const getDefaultAvatar = (type: string) => {
|
|
61
|
-
switch (type) {
|
|
62
|
-
case 'Work':
|
|
63
|
-
return defaultGroupAvatarWork;
|
|
64
|
-
case 'Public':
|
|
65
|
-
return defaultGroupAvatarPublic;
|
|
66
|
-
case 'Meeting':
|
|
67
|
-
return defaultGroupAvatarMeeting;
|
|
68
|
-
case 'AVChatRoom':
|
|
69
|
-
return defaultGroupAvatarAVChatRoom;
|
|
70
|
-
default:
|
|
71
|
-
return '';
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
// eslint-disable-next-line
|
|
75
|
-
// @ts-ignore
|
|
76
|
-
const getDes = () => typeInfoList?.find((item: any) => item.type === groupType).des;
|
|
77
|
-
|
|
78
|
-
const next = async () => {
|
|
79
|
-
const memberList = profileList.map((item) => ({
|
|
80
|
-
userID: item.userID,
|
|
81
|
-
}));
|
|
82
|
-
const avatar = getDefaultAvatar(groupType);
|
|
83
|
-
const conversation = await createConversation({
|
|
84
|
-
name: groupName,
|
|
85
|
-
// eslint-disable-next-line
|
|
86
|
-
// @ts-ignore
|
|
87
|
-
type: GroupType[groupType],
|
|
88
|
-
groupID,
|
|
89
|
-
avatar,
|
|
90
|
-
memberList,
|
|
91
|
-
});
|
|
92
|
-
setActiveConversation(conversation);
|
|
93
|
-
TUIConversationService.switchConversation(conversation?.conversationID);
|
|
94
|
-
setConversationCreated(false);
|
|
95
|
-
};
|
|
96
|
-
return pageState !== PageStateTypes.GROUP_TYPE ? (
|
|
97
|
-
<>
|
|
98
|
-
<div className="tui-conversation-create-group-detail">
|
|
99
|
-
<div className="create-group-box create-group-name">
|
|
100
|
-
<Input
|
|
101
|
-
maxLength={15}
|
|
102
|
-
value={groupName}
|
|
103
|
-
onChange={(e) => {
|
|
104
|
-
groupInfoChange(e, 'name');
|
|
105
|
-
}}
|
|
106
|
-
border="bottom"
|
|
107
|
-
customClassName="input-group-name"
|
|
108
|
-
clearable
|
|
109
|
-
prefix={<div className="input-group-title">{t('TUIConversation.Group Name')}</div>}
|
|
110
|
-
/>
|
|
111
|
-
</div>
|
|
112
|
-
<div className="create-group-box create-group-id">
|
|
113
|
-
<Input
|
|
114
|
-
border="bottom"
|
|
115
|
-
customClassName="input-group-text"
|
|
116
|
-
clearable
|
|
117
|
-
value={groupID}
|
|
118
|
-
onChange={(e) => {
|
|
119
|
-
groupInfoChange(e, 'id');
|
|
120
|
-
}}
|
|
121
|
-
prefix={<div className="input-group-title">{t('TUIConversation.Group ID')}</div>}
|
|
122
|
-
/>
|
|
123
|
-
</div>
|
|
124
|
-
<div className="create-group-box create-group-type" onClick={showGroupTypeInfo}>
|
|
125
|
-
<Input
|
|
126
|
-
readOnly
|
|
127
|
-
border="bottom"
|
|
128
|
-
customClassName="input-group-text"
|
|
129
|
-
prefix={<div className="input-group-title">{t('TUIConversation.Group Type')}</div>}
|
|
130
|
-
suffix={(
|
|
131
|
-
<Icon
|
|
132
|
-
onClick={showGroupTypeInfo}
|
|
133
|
-
type={IconTypes.ARROW_RIGHT}
|
|
134
|
-
width={7}
|
|
135
|
-
height={12}
|
|
136
|
-
/>
|
|
137
|
-
)}
|
|
138
|
-
value={t(`TUIConversation.${groupType}`)}
|
|
139
|
-
onChange={(e) => {
|
|
140
|
-
groupInfoChange(e, 'type');
|
|
141
|
-
}}
|
|
142
|
-
/>
|
|
143
|
-
</div>
|
|
144
|
-
<div className="create-group-illustrate">
|
|
145
|
-
{t(`TUIConversation.${getDes()}`)}
|
|
146
|
-
</div>
|
|
147
|
-
<div className="create-group-portrait">
|
|
148
|
-
<div className="create-group-portrait-title">{t('TUIConversation.Participants')}</div>
|
|
149
|
-
<div className="create-group-portrait-info-container">
|
|
150
|
-
{profileList.map(({ avatar, userID, nick }) => (
|
|
151
|
-
<div className="create-group-portrait-info" key={userID}>
|
|
152
|
-
<Avatar shape="square" size={50} image={avatar || defaultUserAvatar} />
|
|
153
|
-
<div className="create-group-portrait-info-nick">{nick}</div>
|
|
154
|
-
</div>
|
|
155
|
-
))}
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
</div>
|
|
159
|
-
<div className="tui-conversation-create-next-container">
|
|
160
|
-
<div role="presentation" className="tui-conversation-create-next" onClick={next}>{t('TUIConversation.Create')}</div>
|
|
161
|
-
</div>
|
|
162
|
-
</>
|
|
163
|
-
) : (
|
|
164
|
-
<ConversationGroupTypeInfo
|
|
165
|
-
groupType={groupType}
|
|
166
|
-
setGroupType={setGroupType}
|
|
167
|
-
setPageState={setPageState}
|
|
168
|
-
/>
|
|
169
|
-
);
|
|
170
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import './styles/index.scss';
|
|
4
|
-
|
|
5
|
-
export interface ConversationListContainerProps {
|
|
6
|
-
error?: Error | null,
|
|
7
|
-
loading?: boolean,
|
|
8
|
-
setConversationList?: React.Dispatch<React.SetStateAction<Array<Conversation>>>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function ConversationListContainer<
|
|
12
|
-
T extends ConversationListContainerProps
|
|
13
|
-
>(props: React.PropsWithChildren<T>) {
|
|
14
|
-
const { children } = props;
|
|
15
|
-
return (
|
|
16
|
-
<div className="conversation-list-container">
|
|
17
|
-
{children}
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-key */
|
|
2
|
-
import React, { useRef, useState, useEffect } from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import { isPC } from '../../utils/env';
|
|
6
|
-
import { ConversationPreviewUIComponentProps } from './ConversationPreview';
|
|
7
|
-
|
|
8
|
-
import { Avatar as DefaultAvatar } from '../Avatar/index';
|
|
9
|
-
import './styles/index.scss';
|
|
10
|
-
import { Icon, IconTypes } from '../Icon';
|
|
11
|
-
import { Plugins } from '../Plugins';
|
|
12
|
-
import { useConversation } from '../../hooks';
|
|
13
|
-
import { useUIKit, useUIManager } from '../../context';
|
|
14
|
-
|
|
15
|
-
export interface IPluginsRef {
|
|
16
|
-
closeMore?: () => void,
|
|
17
|
-
}
|
|
18
|
-
export function unMemoConversationPreviewContent<T extends ConversationPreviewUIComponentProps>(
|
|
19
|
-
props: T,
|
|
20
|
-
):React.ReactElement {
|
|
21
|
-
const {
|
|
22
|
-
conversation,
|
|
23
|
-
Avatar = DefaultAvatar,
|
|
24
|
-
displayImage,
|
|
25
|
-
displayTitle,
|
|
26
|
-
displayMessage,
|
|
27
|
-
displayTime,
|
|
28
|
-
unread,
|
|
29
|
-
active,
|
|
30
|
-
activeConversationID,
|
|
31
|
-
setActiveConversationID,
|
|
32
|
-
setActiveConversation,
|
|
33
|
-
} = props;
|
|
34
|
-
|
|
35
|
-
const { t } = useTranslation();
|
|
36
|
-
const conversationPreviewButton = useRef<HTMLButtonElement | null>(null);
|
|
37
|
-
const { chat } = useUIKit();
|
|
38
|
-
const { conversation: activeConversation } = useUIManager('ConversationPreviewContent');
|
|
39
|
-
const { pinConversation, deleteConversation } = useConversation(chat);
|
|
40
|
-
const activeClass = active ? 'conversation-preview-content--active' : '';
|
|
41
|
-
const unreadClass = unread && unread >= 1 ? 'conversation-preview-content--unread' : '';
|
|
42
|
-
const pinClass = conversation.isPinned ? 'conversation-preview-content--pin' : '';
|
|
43
|
-
const [isHover, setIsHover] = useState(false);
|
|
44
|
-
const pluginsRef = useRef<IPluginsRef>(null);
|
|
45
|
-
|
|
46
|
-
const onSelectConversation = () => {
|
|
47
|
-
TUIConversationService.switchConversation(conversation?.conversationID);
|
|
48
|
-
if (setActiveConversation) {
|
|
49
|
-
setActiveConversation(conversation);
|
|
50
|
-
}
|
|
51
|
-
if (conversationPreviewButton?.current) {
|
|
52
|
-
conversationPreviewButton.current.blur();
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
const handleMouseEnter = () => {
|
|
56
|
-
setIsHover(true);
|
|
57
|
-
};
|
|
58
|
-
const handleMouseLeave = () => {
|
|
59
|
-
setIsHover(false);
|
|
60
|
-
};
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (activeConversationID !== conversation.conversationID) {
|
|
63
|
-
setIsHover(false);
|
|
64
|
-
}
|
|
65
|
-
}, [activeConversationID]);
|
|
66
|
-
// h5 long press
|
|
67
|
-
let timer: any;
|
|
68
|
-
const handleH5LongPress = (type: string) => {
|
|
69
|
-
if (isPC) return;
|
|
70
|
-
const { conversationID } = conversation;
|
|
71
|
-
setActiveConversationID && setActiveConversationID(conversationID);
|
|
72
|
-
function longPressHandler() {
|
|
73
|
-
clearTimeout(timer);
|
|
74
|
-
setIsHover(true);
|
|
75
|
-
}
|
|
76
|
-
function touchStartHandler() {
|
|
77
|
-
timer = setTimeout(longPressHandler, 500);
|
|
78
|
-
}
|
|
79
|
-
function touchEndHandler() {
|
|
80
|
-
clearTimeout(timer);
|
|
81
|
-
}
|
|
82
|
-
switch (type) {
|
|
83
|
-
case 'touchstart':
|
|
84
|
-
touchStartHandler();
|
|
85
|
-
break;
|
|
86
|
-
case 'touchend':
|
|
87
|
-
touchEndHandler();
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
// setIsHover(false);
|
|
90
|
-
}, 200);
|
|
91
|
-
break;
|
|
92
|
-
default:
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
const moreHandle = (e: any, type: string) => {
|
|
97
|
-
const { conversationID, isPinned } = conversation;
|
|
98
|
-
e.stopPropagation();
|
|
99
|
-
setIsHover(false);
|
|
100
|
-
pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
|
|
101
|
-
switch (type) {
|
|
102
|
-
case 'pin':
|
|
103
|
-
pinConversation({ conversationID, isPinned: !isPinned });
|
|
104
|
-
break;
|
|
105
|
-
case 'delete':
|
|
106
|
-
deleteConversation(conversationID);
|
|
107
|
-
if (setActiveConversation && conversationID === activeConversation?.conversationID) {
|
|
108
|
-
setActiveConversation(undefined);
|
|
109
|
-
}
|
|
110
|
-
break;
|
|
111
|
-
default:
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
return (
|
|
116
|
-
<button
|
|
117
|
-
type="button"
|
|
118
|
-
aria-selected={active}
|
|
119
|
-
role="option"
|
|
120
|
-
className={`conversation-preview-container ${activeClass} ${unreadClass} ${pinClass}`}
|
|
121
|
-
onClick={onSelectConversation}
|
|
122
|
-
onMouseEnter={handleMouseEnter}
|
|
123
|
-
onMouseLeave={handleMouseLeave}
|
|
124
|
-
onTouchStart={() => handleH5LongPress('touchstart')}
|
|
125
|
-
onTouchEnd={() => handleH5LongPress('touchend')}
|
|
126
|
-
ref={conversationPreviewButton}
|
|
127
|
-
id={conversation.conversationID}
|
|
128
|
-
>
|
|
129
|
-
<div className="avatar">
|
|
130
|
-
<Avatar image={displayImage} name={displayTitle} size={40} />
|
|
131
|
-
</div>
|
|
132
|
-
<div className="content">
|
|
133
|
-
<div className="title text-ellipsis">
|
|
134
|
-
{displayTitle}
|
|
135
|
-
</div>
|
|
136
|
-
<div className="message">
|
|
137
|
-
{displayMessage}
|
|
138
|
-
</div>
|
|
139
|
-
</div>
|
|
140
|
-
<div className="external">
|
|
141
|
-
{unread ? (<div className="unread">{unread <= 99 ? unread : '99+'}</div>) : (<div className="unread" />)}
|
|
142
|
-
{!isHover
|
|
143
|
-
? (
|
|
144
|
-
<div className="time">
|
|
145
|
-
{displayTime}
|
|
146
|
-
</div>
|
|
147
|
-
)
|
|
148
|
-
: (
|
|
149
|
-
<div className={`${isHover ? 'more--hover' : 'more'}`}>
|
|
150
|
-
<Plugins
|
|
151
|
-
customClass="more-handle-box"
|
|
152
|
-
ref={pluginsRef}
|
|
153
|
-
plugins={[
|
|
154
|
-
<div
|
|
155
|
-
role="presentation"
|
|
156
|
-
className="more-handle-item"
|
|
157
|
-
onClick={(e) => {
|
|
158
|
-
moreHandle(e, 'pin');
|
|
159
|
-
}}
|
|
160
|
-
>
|
|
161
|
-
{t(!conversation.isPinned ? 'TUIConversation.Pin' : 'TUIConversation.Unpin')}
|
|
162
|
-
</div>,
|
|
163
|
-
<div
|
|
164
|
-
className="more-handle-item delete"
|
|
165
|
-
onClick={(e) => {
|
|
166
|
-
moreHandle(e, 'delete');
|
|
167
|
-
}}
|
|
168
|
-
role="presentation"
|
|
169
|
-
>
|
|
170
|
-
{t('TUIConversation.Delete')}
|
|
171
|
-
</div>,
|
|
172
|
-
]}
|
|
173
|
-
showNumber={0}
|
|
174
|
-
MoreIcon={(
|
|
175
|
-
<Icon
|
|
176
|
-
className="icon-more"
|
|
177
|
-
width={16}
|
|
178
|
-
height={16}
|
|
179
|
-
type={IconTypes.MORE}
|
|
180
|
-
/>
|
|
181
|
-
)}
|
|
182
|
-
/>
|
|
183
|
-
</div>
|
|
184
|
-
)}
|
|
185
|
-
</div>
|
|
186
|
-
</button>
|
|
187
|
-
);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
export const ConversationPreviewContent = React.memo(unMemoConversationPreviewContent) as
|
|
191
|
-
typeof unMemoConversationPreviewContent;
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
-
|
|
3
|
-
.conversation-list-container {
|
|
4
|
-
overflow-x: hidden;
|
|
5
|
-
height: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.conversation-preview-container {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
border: none;
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 64px;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
line-height: 17px;
|
|
16
|
-
padding: 0 20px;
|
|
17
|
-
|
|
18
|
-
@include theme() {
|
|
19
|
-
background-color: get(bg-color-operate);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.content {
|
|
23
|
-
flex: 1 1 auto;
|
|
24
|
-
text-align: left;
|
|
25
|
-
margin-left: 10px;
|
|
26
|
-
min-width: 0;
|
|
27
|
-
|
|
28
|
-
.title {
|
|
29
|
-
font-style: normal;
|
|
30
|
-
font-weight: 700;
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
line-height: 17px;
|
|
33
|
-
font-family: PingFangSC-Medium;
|
|
34
|
-
padding: 1px 0;
|
|
35
|
-
width: 100%;
|
|
36
|
-
|
|
37
|
-
@include theme() {
|
|
38
|
-
color: get(text-color-primary);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.message {
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
text-overflow: ellipsis;
|
|
45
|
-
white-space: nowrap;
|
|
46
|
-
font-family: PingFangSC-Medium;
|
|
47
|
-
font-style: normal;
|
|
48
|
-
font-weight: 400;
|
|
49
|
-
font-size: 12px;
|
|
50
|
-
line-height: 14px;
|
|
51
|
-
padding: 1px 0;
|
|
52
|
-
|
|
53
|
-
@include theme() {
|
|
54
|
-
color: get(text-color-secondary);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.external {
|
|
60
|
-
text-align: right;
|
|
61
|
-
flex: 0 0 auto;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
|
|
65
|
-
.unread {
|
|
66
|
-
height: 19px;
|
|
67
|
-
padding: 1px 0;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.time {
|
|
71
|
-
font-family: PingFangSC-Medium;
|
|
72
|
-
font-style: normal;
|
|
73
|
-
font-weight: 400;
|
|
74
|
-
font-size: 12px;
|
|
75
|
-
line-height: 14px;
|
|
76
|
-
padding: 1px 0;
|
|
77
|
-
|
|
78
|
-
@include theme() {
|
|
79
|
-
color: get(text-color-secondary);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.more--hover {
|
|
84
|
-
display: flex;
|
|
85
|
-
justify-content: flex-end;
|
|
86
|
-
flex: 1 1;
|
|
87
|
-
|
|
88
|
-
.icon-more {
|
|
89
|
-
transform: scale(1.5);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.more-handle-box {
|
|
93
|
-
top: 0;
|
|
94
|
-
right: 0;
|
|
95
|
-
bottom: initial;
|
|
96
|
-
padding: 14px 0;
|
|
97
|
-
box-sizing: border-box;
|
|
98
|
-
text-align: start;
|
|
99
|
-
white-space: nowrap;
|
|
100
|
-
|
|
101
|
-
@include theme() {
|
|
102
|
-
background-color: get(dropdown-color-default);
|
|
103
|
-
box-shadow: 0 0 10px get(shadow-color);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.more-handle-item {
|
|
107
|
-
font-size: 16px;
|
|
108
|
-
font-family: PingFangSC-Medium;
|
|
109
|
-
line-height: 19px;
|
|
110
|
-
padding: 6px 16px;
|
|
111
|
-
cursor: pointer;
|
|
112
|
-
font-weight: 500;
|
|
113
|
-
box-sizing: border-box;
|
|
114
|
-
|
|
115
|
-
@include theme() {
|
|
116
|
-
color: get(text-color-primary);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
&.delete {
|
|
120
|
-
@include theme() {
|
|
121
|
-
color: get(text-color-error);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&:hover {
|
|
126
|
-
@include theme() {
|
|
127
|
-
background-color: get(dropdown-color-hover);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&:hover {
|
|
136
|
-
@include theme() {
|
|
137
|
-
background-color: get(list-color-hover);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&.conversation-preview-content--pin {
|
|
142
|
-
@include theme() {
|
|
143
|
-
background-color: get(bg-secondary);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&.conversation-preview-content--active {
|
|
148
|
-
@include theme() {
|
|
149
|
-
background-color: get(list-color-active);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&.conversation-preview-content--unread {
|
|
154
|
-
.unread {
|
|
155
|
-
height: 13px;
|
|
156
|
-
border-radius: 16px;
|
|
157
|
-
display: flex;
|
|
158
|
-
justify-content: center;
|
|
159
|
-
align-items: center;
|
|
160
|
-
padding: 2px 5px 1px;
|
|
161
|
-
font-size: 11px;
|
|
162
|
-
font-weight: 700;
|
|
163
|
-
margin: 2px 0 2px auto;
|
|
164
|
-
color: #fff;
|
|
165
|
-
|
|
166
|
-
@include theme() {
|
|
167
|
-
background-color: get(text-color-error);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, InputHTMLAttributes } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import './styles/index.scss';
|
|
4
|
-
import { Icon, IconTypes } from '../Icon';
|
|
5
|
-
import { Input, InputProps } from '../Input';
|
|
6
|
-
|
|
7
|
-
export function ConversationSearchInput(props:InputProps) {
|
|
8
|
-
const {
|
|
9
|
-
className = '',
|
|
10
|
-
placeholder,
|
|
11
|
-
clearable,
|
|
12
|
-
value,
|
|
13
|
-
onChange: handleChange,
|
|
14
|
-
prefix = <Icon type={IconTypes.SEARCH} height={16} width={16} />,
|
|
15
|
-
} = props;
|
|
16
|
-
const { t } = useTranslation();
|
|
17
|
-
return (
|
|
18
|
-
<Input
|
|
19
|
-
className={`conversation-search-input ${className}`}
|
|
20
|
-
placeholder={placeholder || t('TUIConversation.Search')}
|
|
21
|
-
clearable={clearable}
|
|
22
|
-
value={value}
|
|
23
|
-
onChange={handleChange}
|
|
24
|
-
prefix={prefix}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import {
|
|
4
|
-
ConversationPreview,
|
|
5
|
-
ConversationPreviewUIComponentProps,
|
|
6
|
-
} from '../ConversationPreview';
|
|
7
|
-
import { Icon, IconTypes } from '../Icon';
|
|
8
|
-
|
|
9
|
-
export interface ConversationSearchResultProps {
|
|
10
|
-
result: Array<Conversation>
|
|
11
|
-
searchValue?: string,
|
|
12
|
-
Preview?: React.ComponentType<ConversationPreviewUIComponentProps>
|
|
13
|
-
}
|
|
14
|
-
export function ConversationSearchResult(props:ConversationSearchResultProps):React.ReactElement {
|
|
15
|
-
const { result, searchValue, Preview } = props;
|
|
16
|
-
return (
|
|
17
|
-
<div>
|
|
18
|
-
{result?.length === 0 ? (
|
|
19
|
-
<div className="conversation-search-result no-result">
|
|
20
|
-
<Icon className="no-result-icon" type={IconTypes.CRY} width={42} height={42} />
|
|
21
|
-
<span className="no-result-message">{`No results for "${searchValue}"`}</span>
|
|
22
|
-
</div>
|
|
23
|
-
)
|
|
24
|
-
: result.map((item) => {
|
|
25
|
-
const previewProps = {
|
|
26
|
-
conversation: item,
|
|
27
|
-
Preview,
|
|
28
|
-
};
|
|
29
|
-
return (
|
|
30
|
-
<ConversationPreview
|
|
31
|
-
searchValue={searchValue}
|
|
32
|
-
key={item.conversationID}
|
|
33
|
-
{...previewProps}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
})}
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.conversation-search-result.no-result {
|
|
2
|
-
padding: 0 20px;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
align-items: center;
|
|
6
|
-
&-icon {
|
|
7
|
-
margin: 100px auto 50px;
|
|
8
|
-
}
|
|
9
|
-
&-message {
|
|
10
|
-
color: #999999;
|
|
11
|
-
font-weight: 400;
|
|
12
|
-
font-family: PingFangSC-Medium;
|
|
13
|
-
font-size: 16px;
|
|
14
|
-
line-height: 22px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
.conversation-search-input {
|
|
18
|
-
height: 36px;
|
|
19
|
-
width: 100%;
|
|
20
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren, useMemo } from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import { TUIConversationProvider, TUIConversationContextValue } from '../../context/TUIConversationContext';
|
|
4
|
-
import { TUIConversationList } from '../TUIConversationList';
|
|
5
|
-
import { TUIProfile } from '../TUIProfile';
|
|
6
|
-
|
|
7
|
-
interface TUIConversationProps {
|
|
8
|
-
createConversation?:(conversationID:string) => Promise<any>,
|
|
9
|
-
deleteConversation?:(conversationID:string) => Promise<any>,
|
|
10
|
-
filterConversation?:(conversationList: Array<Conversation>) => Array<Conversation>,
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function UnMemoizedTUIConversation<T extends TUIConversationProps>(
|
|
14
|
-
props: PropsWithChildren<T>,
|
|
15
|
-
):React.ReactElement {
|
|
16
|
-
const {
|
|
17
|
-
children,
|
|
18
|
-
createConversation,
|
|
19
|
-
deleteConversation,
|
|
20
|
-
filterConversation,
|
|
21
|
-
} = props;
|
|
22
|
-
const TUIConversationValue: TUIConversationContextValue = useMemo(
|
|
23
|
-
() => ({
|
|
24
|
-
createConversation,
|
|
25
|
-
deleteConversation,
|
|
26
|
-
filterConversation,
|
|
27
|
-
}),
|
|
28
|
-
[
|
|
29
|
-
createConversation,
|
|
30
|
-
deleteConversation,
|
|
31
|
-
filterConversation,
|
|
32
|
-
],
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<TUIConversationProvider value={TUIConversationValue}>
|
|
37
|
-
{children || (
|
|
38
|
-
<TUIConversationList />
|
|
39
|
-
)}
|
|
40
|
-
</TUIConversationProvider>
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export const TUIConversation = React.memo(
|
|
45
|
-
UnMemoizedTUIConversation,
|
|
46
|
-
)as typeof UnMemoizedTUIConversation;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TUIConversation';
|