@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,178 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
4
|
-
import { useUIKit, useUIManager } from '../../context';
|
|
5
|
-
import { isH5 } from '../../utils/env';
|
|
6
|
-
import useConversationList from './hooks/useConversationList';
|
|
7
|
-
import './index.scss';
|
|
8
|
-
import { ConversationPreview, ConversationPreviewUIComponentProps } from '../ConversationPreview';
|
|
9
|
-
import {
|
|
10
|
-
ConversationListContainer,
|
|
11
|
-
ConversationListContainerProps,
|
|
12
|
-
} from '../ConversationPreview/ConversationListContainer';
|
|
13
|
-
import { ConversationSearchInput, ConversationSearchResult } from '../ConversationSearch';
|
|
14
|
-
import { ConversationCreate } from '../ConversationCreate';
|
|
15
|
-
import { Icon, IconTypes } from '../Icon';
|
|
16
|
-
import { getDisplayTitle } from '../ConversationPreview/utils';
|
|
17
|
-
import { useConversationUpdate } from './hooks/useConversationUpdate';
|
|
18
|
-
import { useTUIConversationContext } from '../../context/TUIConversationContext';
|
|
19
|
-
|
|
20
|
-
interface Props {
|
|
21
|
-
componentVisibleOptions?: any,
|
|
22
|
-
filters?: object,
|
|
23
|
-
sort?: object,
|
|
24
|
-
options?: object,
|
|
25
|
-
Preview?: React.ComponentType<ConversationPreviewUIComponentProps>,
|
|
26
|
-
Container?: React.ComponentType<ConversationListContainerProps>,
|
|
27
|
-
onConversationListUpdated?: (
|
|
28
|
-
setConversationList: React.Dispatch<React.SetStateAction<Array<Conversation>>>,
|
|
29
|
-
event: () => void
|
|
30
|
-
) => void,
|
|
31
|
-
filterConversation?:(conversationList: Array<Conversation>) => Array<Conversation>,
|
|
32
|
-
}
|
|
33
|
-
export function UnMemoTUIConversationList<T extends Props>(props: T):React.ReactElement {
|
|
34
|
-
const {
|
|
35
|
-
Preview,
|
|
36
|
-
Container = ConversationListContainer,
|
|
37
|
-
onConversationListUpdated,
|
|
38
|
-
filterConversation: propsFilterConversation,
|
|
39
|
-
componentVisibleOptions = {
|
|
40
|
-
isProfileShow: true,
|
|
41
|
-
isSearchInputShow: true,
|
|
42
|
-
isContainerShow: true,
|
|
43
|
-
},
|
|
44
|
-
} = props;
|
|
45
|
-
const { t } = useTranslation();
|
|
46
|
-
const { chat } = useUIKit('TUIConversationList');
|
|
47
|
-
const {
|
|
48
|
-
customClasses,
|
|
49
|
-
conversation,
|
|
50
|
-
setActiveConversation,
|
|
51
|
-
setTUIProfileShow,
|
|
52
|
-
} = useUIManager('TUIConversationList');
|
|
53
|
-
const { filterConversation: contextFilterConversation } = useTUIConversationContext('TUIConversationList');
|
|
54
|
-
const filterConversation = propsFilterConversation || contextFilterConversation;
|
|
55
|
-
const [conversationUpdateCount, setConversationUpdateCount] = useState(0);
|
|
56
|
-
const forceUpdate = () => setConversationUpdateCount((count) => count + 1);
|
|
57
|
-
|
|
58
|
-
const activeConversationHandler = (
|
|
59
|
-
conversationList: Array<Conversation>,
|
|
60
|
-
setConversationList: React.Dispatch<
|
|
61
|
-
React.SetStateAction<Array<Conversation>>
|
|
62
|
-
>,
|
|
63
|
-
) => {
|
|
64
|
-
if (!conversationList.length) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
const { conversationList, setConversationList } = useConversationList(
|
|
69
|
-
chat,
|
|
70
|
-
activeConversationHandler,
|
|
71
|
-
filterConversation,
|
|
72
|
-
);
|
|
73
|
-
useConversationUpdate(
|
|
74
|
-
setConversationList,
|
|
75
|
-
onConversationListUpdated,
|
|
76
|
-
forceUpdate,
|
|
77
|
-
filterConversation,
|
|
78
|
-
);
|
|
79
|
-
const [searchValue, setSearchValue] = useState('');
|
|
80
|
-
const [searchResult, setSearchResult] = useState(conversationList);
|
|
81
|
-
const [conversationCreated, setConversationCreated] = useState(false);
|
|
82
|
-
const [activeConversationID, setActiveConversationID] = useState('');
|
|
83
|
-
|
|
84
|
-
const handleSearchValueChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
85
|
-
setSearchValue(e.target?.value);
|
|
86
|
-
if (e.target?.value) {
|
|
87
|
-
const result = conversationList.filter(
|
|
88
|
-
// eslint-disable-next-line max-len
|
|
89
|
-
(item) => (getDisplayTitle(item) as string)
|
|
90
|
-
.toLocaleLowerCase()
|
|
91
|
-
.includes(e.target?.value.toLocaleLowerCase()),
|
|
92
|
-
);
|
|
93
|
-
setSearchResult(result);
|
|
94
|
-
} else {
|
|
95
|
-
setSearchResult([]);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
const handleConversationCreate = () => {
|
|
100
|
-
setSearchValue('');
|
|
101
|
-
setConversationCreated(true);
|
|
102
|
-
};
|
|
103
|
-
const conversationListRef = useRef(null);
|
|
104
|
-
return (
|
|
105
|
-
<div
|
|
106
|
-
className={`tui-conversation ${isH5 ? 'tui-conversation-h5' : ''} ${customClasses || ''} `}
|
|
107
|
-
ref={conversationListRef}
|
|
108
|
-
>
|
|
109
|
-
{conversationCreated ? (
|
|
110
|
-
<ConversationCreate
|
|
111
|
-
conversationList={conversationList}
|
|
112
|
-
setConversationCreated={setConversationCreated}
|
|
113
|
-
/>
|
|
114
|
-
) : (
|
|
115
|
-
<>
|
|
116
|
-
{componentVisibleOptions.isSearchInputShow && (
|
|
117
|
-
<div className="tui-conversation-header">
|
|
118
|
-
<ConversationSearchInput
|
|
119
|
-
value={searchValue}
|
|
120
|
-
clearable
|
|
121
|
-
onChange={handleSearchValueChange}
|
|
122
|
-
/>
|
|
123
|
-
<div className="tui-conversation-create-icon">
|
|
124
|
-
<Icon
|
|
125
|
-
onClick={handleConversationCreate}
|
|
126
|
-
type={IconTypes.CREATE}
|
|
127
|
-
height={24}
|
|
128
|
-
width={24}
|
|
129
|
-
/>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
)}
|
|
133
|
-
{componentVisibleOptions.isContainerShow && (
|
|
134
|
-
<Container setConversationList={setConversationList}>
|
|
135
|
-
{/* eslint-disable-next-line no-nested-ternary */}
|
|
136
|
-
{conversationList.length === 0 ? (
|
|
137
|
-
<div className="no-result">
|
|
138
|
-
<Icon
|
|
139
|
-
className="no-result-icon"
|
|
140
|
-
type={IconTypes.EFFORT}
|
|
141
|
-
width={42}
|
|
142
|
-
height={42}
|
|
143
|
-
/>
|
|
144
|
-
<div className="no-result-message">No conversation</div>
|
|
145
|
-
</div>
|
|
146
|
-
) : searchValue ? (
|
|
147
|
-
<ConversationSearchResult
|
|
148
|
-
Preview={Preview}
|
|
149
|
-
searchValue={searchValue}
|
|
150
|
-
result={searchResult}
|
|
151
|
-
/>
|
|
152
|
-
) : (
|
|
153
|
-
conversationList.map((item) => {
|
|
154
|
-
const previewProps = {
|
|
155
|
-
activeConversation: conversation,
|
|
156
|
-
conversation: item,
|
|
157
|
-
setActiveConversation,
|
|
158
|
-
Preview,
|
|
159
|
-
conversationUpdateCount,
|
|
160
|
-
activeConversationID,
|
|
161
|
-
setActiveConversationID,
|
|
162
|
-
};
|
|
163
|
-
return (
|
|
164
|
-
<ConversationPreview
|
|
165
|
-
key={item.conversationID}
|
|
166
|
-
{...previewProps}
|
|
167
|
-
/>
|
|
168
|
-
);
|
|
169
|
-
})
|
|
170
|
-
)}
|
|
171
|
-
</Container>
|
|
172
|
-
)}
|
|
173
|
-
</>
|
|
174
|
-
)}
|
|
175
|
-
</div>
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
export const TUIConversationList = React.memo(UnMemoTUIConversationList);
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
2
|
-
import TencentCloudChat, { ChatSDK, Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import {
|
|
4
|
-
TUIStore,
|
|
5
|
-
StoreName,
|
|
6
|
-
} from '@tencentcloud/chat-uikit-engine';
|
|
7
|
-
function useConversationList(
|
|
8
|
-
chat: ChatSDK,
|
|
9
|
-
activeConversationHandler?:(
|
|
10
|
-
conversationList: Array<Conversation>,
|
|
11
|
-
setConversationList: React.Dispatch<React.SetStateAction<Array<Conversation>>>,
|
|
12
|
-
) => void,
|
|
13
|
-
filterConversation?:(conversationList: Array<Conversation>) => Array<Conversation>,
|
|
14
|
-
) {
|
|
15
|
-
const [conversationList, setConversationList] = useState<Array<Conversation>>([]);
|
|
16
|
-
const onConversationListUpdated = (list: any) => {
|
|
17
|
-
let resConversationList = [];
|
|
18
|
-
if (filterConversation) {
|
|
19
|
-
resConversationList = filterConversation(list);
|
|
20
|
-
} else {
|
|
21
|
-
resConversationList = list.filter(
|
|
22
|
-
(item: any) => item.type !== TencentCloudChat.TYPES.CONV_SYSTEM,
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
setConversationList(resConversationList);
|
|
26
|
-
if (activeConversationHandler) {
|
|
27
|
-
activeConversationHandler(resConversationList, setConversationList);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
TUIStore.watch(StoreName.CONV, {
|
|
33
|
-
conversationList: onConversationListUpdated,
|
|
34
|
-
});
|
|
35
|
-
}, [chat]);
|
|
36
|
-
return {
|
|
37
|
-
conversationList,
|
|
38
|
-
setConversationList,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default useConversationList;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import TencentCloudChat, { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import { useUIKit } from '../../../context';
|
|
4
|
-
|
|
5
|
-
export const useConversationUpdate = (
|
|
6
|
-
setConversationList?: React.Dispatch<React.SetStateAction<Array<Conversation>>>,
|
|
7
|
-
customHandler?: (
|
|
8
|
-
setConversationList: React.Dispatch<React.SetStateAction<Array<Conversation>>>,
|
|
9
|
-
event: any
|
|
10
|
-
) => void,
|
|
11
|
-
forceUpdate?: () => void,
|
|
12
|
-
filterConversation?:(conversationList: Array<Conversation>) => Array<Conversation>,
|
|
13
|
-
) => {
|
|
14
|
-
const { chat } = useUIKit('useConversationUpdate');
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
const onConversationListUpdated = (event:any) => {
|
|
17
|
-
if (setConversationList) {
|
|
18
|
-
if (filterConversation) {
|
|
19
|
-
setConversationList(filterConversation(event.data));
|
|
20
|
-
} else {
|
|
21
|
-
setConversationList(event.data.filter(
|
|
22
|
-
(item: any) => item.type !== TencentCloudChat.TYPES.CONV_SYSTEM,
|
|
23
|
-
));
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if (forceUpdate) {
|
|
27
|
-
forceUpdate();
|
|
28
|
-
}
|
|
29
|
-
if (customHandler && typeof customHandler === 'function') {
|
|
30
|
-
setConversationList && customHandler(setConversationList, event);
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
chat?.on(TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED, onConversationListUpdated);
|
|
34
|
-
return () => {
|
|
35
|
-
chat?.off(TencentCloudChat.EVENT.CONVERSATION_LIST_UPDATED, onConversationListUpdated);
|
|
36
|
-
};
|
|
37
|
-
}, [chat, customHandler]);
|
|
38
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
@use "../../styles/colors/color-theme" as *;
|
|
2
|
-
|
|
3
|
-
.tui-conversation {
|
|
4
|
-
flex: 1 1 auto;
|
|
5
|
-
min-width: 0;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
position: relative;
|
|
9
|
-
text-align: initial;
|
|
10
|
-
overflow: auto;
|
|
11
|
-
|
|
12
|
-
@include theme() {
|
|
13
|
-
background-color: get(bg-color-operate);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.tui-conversation-header {
|
|
17
|
-
display: flex;
|
|
18
|
-
padding: 10px 20px;
|
|
19
|
-
|
|
20
|
-
.tui-conversation-create-icon {
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
margin-left: 10px;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.no-result {
|
|
29
|
-
padding: 0 20px;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
align-items: center;
|
|
33
|
-
|
|
34
|
-
&-icon {
|
|
35
|
-
margin: 100px auto 50px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&-message {
|
|
39
|
-
color: #999;
|
|
40
|
-
font-weight: 400;
|
|
41
|
-
font-size: 16px;
|
|
42
|
-
font-family: PingFangSC-Medium;
|
|
43
|
-
line-height: 22px;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.tui-conversation-h5 {
|
|
49
|
-
.tui-conversation-header {
|
|
50
|
-
padding: 10px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.conversation-list-container {
|
|
54
|
-
.conversation-preview-container {
|
|
55
|
-
padding: 0 10px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TUIManage';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TUIMessageList';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { Profile } from '../Profile';
|
|
3
|
-
|
|
4
|
-
import './styles/index.scss';
|
|
5
|
-
import { useMyProfile } from './hooks';
|
|
6
|
-
import { TUIProfileDefault } from './TUIProfileDefault';
|
|
7
|
-
import { useUIManager } from '../../context';
|
|
8
|
-
|
|
9
|
-
interface TUIProfileProps {
|
|
10
|
-
className?: string,
|
|
11
|
-
TUIProfile?: React.ComponentType<any>,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function UnMemoizedTUIProfile<T extends TUIProfileProps>(
|
|
15
|
-
props: PropsWithChildren<T>,
|
|
16
|
-
):React.ReactElement {
|
|
17
|
-
const {
|
|
18
|
-
className,
|
|
19
|
-
TUIProfile: PropTUIProfile,
|
|
20
|
-
} = props;
|
|
21
|
-
|
|
22
|
-
const { myProfile, updateMyProfile } = useMyProfile();
|
|
23
|
-
|
|
24
|
-
const { setTUIProfileShow, TUIProfileShow } = useUIManager('TUIProfile');
|
|
25
|
-
|
|
26
|
-
const TUIProfileUIComponent = PropTUIProfile || TUIProfileDefault;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<>
|
|
30
|
-
{/* //eslint-disable-next-line
|
|
31
|
-
@ts-ignore */}
|
|
32
|
-
<Profile
|
|
33
|
-
profile={myProfile}
|
|
34
|
-
handleAvatar={() => {
|
|
35
|
-
setTUIProfileShow && setTUIProfileShow(true);
|
|
36
|
-
}}
|
|
37
|
-
/>
|
|
38
|
-
{TUIProfileShow && (
|
|
39
|
-
<TUIProfileUIComponent
|
|
40
|
-
className={className}
|
|
41
|
-
userInfo={myProfile}
|
|
42
|
-
update={updateMyProfile}
|
|
43
|
-
/>
|
|
44
|
-
)}
|
|
45
|
-
</>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export const TUIProfile = React.memo(UnMemoizedTUIProfile) as
|
|
50
|
-
typeof UnMemoizedTUIProfile;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
PropsWithChildren, useContext, MutableRefObject, RefObject,
|
|
3
|
-
} from 'react';
|
|
4
|
-
import { Conversation, Message } from '@tencentcloud/chat';
|
|
5
|
-
import { MessageListProps, TUIMessageInputBasicProps, TUIMessageProps } from '../components';
|
|
6
|
-
import { OperateMessageParams } from '../components/TUIChat/hooks/useHandleMessage';
|
|
7
|
-
|
|
8
|
-
export interface TUIChatStateContextValue {
|
|
9
|
-
conversation?: Conversation,
|
|
10
|
-
messageList?: Array<Message>,
|
|
11
|
-
nextReqMessageID?: string,
|
|
12
|
-
isCompleted?: boolean,
|
|
13
|
-
init?: boolean,
|
|
14
|
-
highlightedMessageId?: string,
|
|
15
|
-
lastMessageID?:string,
|
|
16
|
-
isSameLastMessageID?: boolean,
|
|
17
|
-
messageListRef?: RefObject<HTMLDivElement>,
|
|
18
|
-
textareaRef?: MutableRefObject<HTMLTextAreaElement | undefined>,
|
|
19
|
-
operateData?: OperateMessageParams,
|
|
20
|
-
noMore?: boolean,
|
|
21
|
-
messageConfig?: TUIMessageProps,
|
|
22
|
-
cloudCustomData?: string,
|
|
23
|
-
TUIMessageInputConfig?: TUIMessageInputBasicProps,
|
|
24
|
-
audioSource?: HTMLAudioElement | null,
|
|
25
|
-
vidoeSource?: HTMLVideoElement | null,
|
|
26
|
-
TUIMessageListConfig?: MessageListProps,
|
|
27
|
-
uploadPendingMessageList?: Array<Message>,
|
|
28
|
-
firstSendMessage?: Message | null;
|
|
29
|
-
activeMessageID?: string,
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export const TUIChatStateContext = React.createContext<TUIChatStateContextValue | null>(null);
|
|
33
|
-
export function TUIChatStateContextProvider({ children, value }:PropsWithChildren<{
|
|
34
|
-
value: TUIChatStateContextValue
|
|
35
|
-
}>):React.ReactElement {
|
|
36
|
-
return (
|
|
37
|
-
<TUIChatStateContext.Provider value={value}>
|
|
38
|
-
{children}
|
|
39
|
-
</TUIChatStateContext.Provider>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function useTUIChatStateContext(componentName?:string)
|
|
44
|
-
:TUIChatStateContextValue {
|
|
45
|
-
const contextValue = useContext(TUIChatStateContext);
|
|
46
|
-
if (!contextValue && componentName) {
|
|
47
|
-
return {} as TUIChatStateContextValue;
|
|
48
|
-
}
|
|
49
|
-
return (contextValue as unknown) as TUIChatStateContextValue;
|
|
50
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React, { useContext } from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import { TUIConversationList } from '../components';
|
|
4
|
-
|
|
5
|
-
export interface TUIConversationContextValue {
|
|
6
|
-
createConversation?:(conversationID:string) => Promise<any>,
|
|
7
|
-
deleteConversation?:(conversationID:string) => Promise<any>,
|
|
8
|
-
filterConversation?:(conversationList: Array<Conversation>) => Array<Conversation>,
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const TUIConversationContext = React.createContext<TUIConversationContextValue>({});
|
|
12
|
-
export function TUIConversationProvider({ children, value }:React.PropsWithChildren<{
|
|
13
|
-
value: TUIConversationContextValue
|
|
14
|
-
}>) {
|
|
15
|
-
return (
|
|
16
|
-
<TUIConversationContext.Provider value={value}>
|
|
17
|
-
{children || (
|
|
18
|
-
<TUIConversationList />
|
|
19
|
-
)}
|
|
20
|
-
</TUIConversationContext.Provider>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
export const useTUIConversationContext = (componentName?:string) => {
|
|
24
|
-
const contextValue = useContext(TUIConversationContext);
|
|
25
|
-
if (!contextValue && componentName) {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
return contextValue;
|
|
29
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren, ReactEventHandler, useContext } from 'react';
|
|
2
|
-
import { Message } from '@tencentcloud/chat';
|
|
3
|
-
import { MessagePluginsProps } from '../components';
|
|
4
|
-
|
|
5
|
-
export enum messageShowType {
|
|
6
|
-
IN = 'in',
|
|
7
|
-
OUT = 'out',
|
|
8
|
-
ALL = 'all',
|
|
9
|
-
NONE = 'none',
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface TUIMessageContextValue {
|
|
13
|
-
message?: Message,
|
|
14
|
-
handleDelete?: ReactEventHandler,
|
|
15
|
-
CustemElement?: React.ComponentType<{message: Message}>,
|
|
16
|
-
TextElement?: React.ComponentType<{message: Message}>,
|
|
17
|
-
ImageElement?: React.ComponentType<{message: Message}>,
|
|
18
|
-
VideoElement?: React.ComponentType<{message: Message}>,
|
|
19
|
-
AudioElement?: React.ComponentType<{message: Message}>,
|
|
20
|
-
FileElement?: React.ComponentType<{message: Message}>,
|
|
21
|
-
MergerElement?: React.ComponentType<{message: Message}>,
|
|
22
|
-
LocationElement?: React.ComponentType<{message: Message}>,
|
|
23
|
-
FaceElement?: React.ComponentType<{message: Message}>,
|
|
24
|
-
filter?: (data:Message) => void,
|
|
25
|
-
isShowTime?: boolean,
|
|
26
|
-
isShowRead?: boolean,
|
|
27
|
-
plugin?: MessagePluginsProps,
|
|
28
|
-
prefix?: React.ReactElement | string,
|
|
29
|
-
suffix?: React.ReactElement | string,
|
|
30
|
-
customName?: React.ReactElement,
|
|
31
|
-
showAvatar?: messageShowType,
|
|
32
|
-
showName?: messageShowType,
|
|
33
|
-
customAvatar?: React.ReactElement,
|
|
34
|
-
isShowProgress?: boolean,
|
|
35
|
-
Progress?: React.ComponentType<{message: Message}>,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export const TUIMessageContext = React.createContext<TUIMessageContextValue>({});
|
|
39
|
-
export function TUIMessageContextProvider({ children, value }:PropsWithChildren<{
|
|
40
|
-
value: TUIMessageContextValue
|
|
41
|
-
}>):React.ReactElement {
|
|
42
|
-
return (
|
|
43
|
-
<TUIMessageContext.Provider value={value}>
|
|
44
|
-
{children}
|
|
45
|
-
</TUIMessageContext.Provider>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export function useTUIMessageContext(componentName?:string)
|
|
50
|
-
:TUIMessageContextValue {
|
|
51
|
-
const contextValue = useContext(TUIMessageContext);
|
|
52
|
-
if (!contextValue && componentName) {
|
|
53
|
-
return {} as TUIMessageContextValue;
|
|
54
|
-
}
|
|
55
|
-
return (contextValue as unknown) as TUIMessageContextValue;
|
|
56
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
PropsWithChildren,
|
|
3
|
-
ChangeEventHandler,
|
|
4
|
-
useContext,
|
|
5
|
-
KeyboardEventHandler,
|
|
6
|
-
MutableRefObject,
|
|
7
|
-
} from 'react';
|
|
8
|
-
import { PluginConfigProps } from '../components';
|
|
9
|
-
import type { ICursorPos } from '../components/TUIMessageInput/hooks';
|
|
10
|
-
import type { EmojiData } from '../components/TUIMessageInput/hooks/useEmojiPicker';
|
|
11
|
-
import type { filesData } from '../components/TUIMessageInput/hooks/useUploadPicker';
|
|
12
|
-
import type { MESSAGE_TYPE_NAME } from '../constants';
|
|
13
|
-
|
|
14
|
-
interface dispatchParams {
|
|
15
|
-
type: string,
|
|
16
|
-
value?: string,
|
|
17
|
-
}
|
|
18
|
-
export interface TUIMessageInputContextValue {
|
|
19
|
-
text?: string,
|
|
20
|
-
disabled?: boolean,
|
|
21
|
-
dispatch?: (params: dispatchParams) => void,
|
|
22
|
-
handleChange?: ChangeEventHandler<HTMLTextAreaElement>,
|
|
23
|
-
handleSubmit?: (event: React.BaseSyntheticEvent) => void,
|
|
24
|
-
handleKeyDown?: KeyboardEventHandler<HTMLTextAreaElement>,
|
|
25
|
-
textareaRef?: MutableRefObject<HTMLTextAreaElement | undefined>,
|
|
26
|
-
onSelectEmoji?: (emoji: EmojiData) => void,
|
|
27
|
-
sendFaceMessage?: (emoji: EmojiData) => void,
|
|
28
|
-
sendUploadMessage?: (file: filesData, type: MESSAGE_TYPE_NAME) => void,
|
|
29
|
-
insertText?: (textToInsert: string) => void,
|
|
30
|
-
setText?: (textToInsert: string) => void,
|
|
31
|
-
focus?: boolean,
|
|
32
|
-
handlePasete?: (e:ClipboardEvent) => void,
|
|
33
|
-
setCursorPos?: (e:ICursorPos) => void,
|
|
34
|
-
pluginConfig?: PluginConfigProps,
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export const TUIMessageInputContext = React.createContext<TUIMessageInputContextValue>({});
|
|
38
|
-
export function TUIMessageInputContextProvider({ children, value }:PropsWithChildren<{
|
|
39
|
-
value: TUIMessageInputContextValue
|
|
40
|
-
}>):React.ReactElement {
|
|
41
|
-
return (
|
|
42
|
-
<TUIMessageInputContext.Provider value={value}>
|
|
43
|
-
{children}
|
|
44
|
-
</TUIMessageInputContext.Provider>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function useTUIMessageInputContext(componentName?:string)
|
|
49
|
-
:TUIMessageInputContextValue {
|
|
50
|
-
const contextValue = useContext(TUIMessageInputContext);
|
|
51
|
-
if (!contextValue && componentName) {
|
|
52
|
-
return {} as TUIMessageInputContextValue;
|
|
53
|
-
}
|
|
54
|
-
return (contextValue as unknown) as TUIMessageInputContextValue;
|
|
55
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.js
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/cjs/components/{TUIProfile/TUIProfileDefault.d.ts → Profile/ProfileDefault.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|