@tencentcloud/chat-uikit-react 2.2.7 → 2.2.9
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/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/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/rollup.config.js +1 -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
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
|
+
import { ConversationSearchInput as DefaultConversationSearchInput, type IConversationSearchInputProps } from './ConversationSearchInput/ConversationSearchInput';
|
|
5
|
+
import { ConversationSearchResult as DefaultConversationSearchResult, type IConversationSearchResultProps } from './ConversationSearchResult/ConversationSearchResult';
|
|
6
|
+
import { ConversationPreview as DefaultResultPreview, type IConversationPreviewProps } from '../ConversationPreview';
|
|
7
|
+
import { Avatar as DefaultAvatar, type AvatarProps } from '../Avatar';
|
|
8
|
+
|
|
9
|
+
import './ConversationSearch.scss';
|
|
10
|
+
|
|
11
|
+
export interface IConversationSearchProps {
|
|
12
|
+
/** The list of conversations to be searched. */
|
|
13
|
+
conversationList: IConversationModel[];
|
|
14
|
+
/** Specifies a react component to customize the avatar in the search results. */
|
|
15
|
+
Avatar?: React.ComponentType<AvatarProps>;
|
|
16
|
+
/** Specifies a react component to customize the preview of search results. */
|
|
17
|
+
ResultPreview?: React.ComponentType<IConversationPreviewProps>;
|
|
18
|
+
/** Specifies a react component to customize the search input. */
|
|
19
|
+
ConversationSearchInput?: React.ComponentType<IConversationSearchInputProps>;
|
|
20
|
+
/** Specifies a react component to customize the search result. */
|
|
21
|
+
ConversationSearchResult?: React.ComponentType<IConversationSearchResultProps>;
|
|
22
|
+
/** Specifies a function to customize the search algorithm. This function takes the search value and the conversation list as parameters and returns the search results. */
|
|
23
|
+
searchFn?: (searchValue: string, conversationList: IConversationModel[]) => IConversationModel[];
|
|
24
|
+
/** Specifies a function to be called when the search input changes. This function takes the current search value as a parameter. */
|
|
25
|
+
onSearchChange?: (searchValue: string) => void;
|
|
26
|
+
/** Specifies a function to be called when the search input is focused. */
|
|
27
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
28
|
+
/** Specifies a function to be called when the search input is blurred. */
|
|
29
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
30
|
+
/** Specifies a function to be called when a search result is selected. This function takes the selected conversation as a parameter. */
|
|
31
|
+
onSelectResult?: (conversation: IConversationModel) => void;
|
|
32
|
+
/** Specifies whether the search component is visible. */
|
|
33
|
+
visible?: boolean;
|
|
34
|
+
/** Specifies a custom class name for the search component. */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** The custom css style */
|
|
37
|
+
style?: React.CSSProperties;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function defaultSearchFn(searchValue: string, conversationList: IConversationModel[]) {
|
|
41
|
+
if (!searchValue || conversationList?.length === 0) return [];
|
|
42
|
+
return conversationList.filter(item => item.getShowName().toLocaleLowerCase().includes(searchValue.toLocaleLowerCase()));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ConversationSearch(props: IConversationSearchProps) {
|
|
46
|
+
const {
|
|
47
|
+
visible = true,
|
|
48
|
+
conversationList,
|
|
49
|
+
Avatar = DefaultAvatar,
|
|
50
|
+
searchFn = defaultSearchFn,
|
|
51
|
+
ResultPreview = DefaultResultPreview,
|
|
52
|
+
ConversationSearchInput = DefaultConversationSearchInput,
|
|
53
|
+
ConversationSearchResult = DefaultConversationSearchResult,
|
|
54
|
+
onSearchChange,
|
|
55
|
+
onFocus,
|
|
56
|
+
onBlur,
|
|
57
|
+
onSelectResult,
|
|
58
|
+
className,
|
|
59
|
+
style,
|
|
60
|
+
} = props;
|
|
61
|
+
|
|
62
|
+
const [searchValue, setSearchValue] = useState('');
|
|
63
|
+
const [searchResult, setSearchResult] = useState<IConversationModel[]>(conversationList);
|
|
64
|
+
|
|
65
|
+
const [isActive, setIsActive] = useState(false);
|
|
66
|
+
const [isFocus, setIsFocus] = useState(false);
|
|
67
|
+
const [isInputEmpty, setIsInputEmpty] = useState(true);
|
|
68
|
+
|
|
69
|
+
const onFocusHandler = (event: React.FocusEvent<HTMLInputElement>) => {
|
|
70
|
+
setIsFocus(true);
|
|
71
|
+
onFocus?.(event);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const onBlurHandler = (event: React.FocusEvent<HTMLInputElement>) => {
|
|
75
|
+
setIsFocus(false);
|
|
76
|
+
onBlur?.(event);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const onChangeHandler = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
80
|
+
setSearchValue(e.target?.value);
|
|
81
|
+
setIsInputEmpty(e.target?.value.length === 0);
|
|
82
|
+
onSearchChange?.(e.target?.value);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
onSearchChange?.(searchValue);
|
|
87
|
+
}, [searchValue, onSearchChange]);
|
|
88
|
+
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
setSearchResult(searchFn(searchValue, conversationList));
|
|
91
|
+
}, [conversationList, searchFn, searchValue]);
|
|
92
|
+
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
setIsActive(!isInputEmpty);
|
|
95
|
+
}, [isFocus, isInputEmpty]);
|
|
96
|
+
|
|
97
|
+
if (!visible) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<div
|
|
103
|
+
className={classNames('uikit-conversation-search', className, {
|
|
104
|
+
'uikit-conversation-search--active': isActive,
|
|
105
|
+
})}
|
|
106
|
+
style={style}
|
|
107
|
+
>
|
|
108
|
+
<ConversationSearchInput
|
|
109
|
+
value={searchValue}
|
|
110
|
+
clearable={true}
|
|
111
|
+
onChange={onChangeHandler}
|
|
112
|
+
onFocus={onFocusHandler}
|
|
113
|
+
onBlur={onBlurHandler}
|
|
114
|
+
/>
|
|
115
|
+
<ConversationSearchResult
|
|
116
|
+
visible={isActive}
|
|
117
|
+
Avatar={Avatar}
|
|
118
|
+
searchResult={searchResult}
|
|
119
|
+
searchValue={searchValue}
|
|
120
|
+
ResultPreview={ResultPreview}
|
|
121
|
+
onSelectResult={onSelectResult}
|
|
122
|
+
/>
|
|
123
|
+
</div>
|
|
124
|
+
);
|
|
125
|
+
}
|
package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.scss
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
3
|
+
.uikit-conversation-search-input {
|
|
4
|
+
height: 36px;
|
|
5
|
+
align-self: stretch;
|
|
6
|
+
margin: 10px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
|
|
9
|
+
@include theme() {
|
|
10
|
+
background-color: get(bg-color-operate);
|
|
11
|
+
color: get(text-color-primary);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useTranslation } from 'react-i18next';
|
|
2
|
+
import { Icon, IconTypes } from '../../Icon';
|
|
3
|
+
import { Input, InputProps } from '../../Input';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
|
|
6
|
+
import './ConversationSearchInput.scss';
|
|
7
|
+
|
|
8
|
+
type IConversationSearchInputProps = InputProps;
|
|
9
|
+
|
|
10
|
+
function ConversationSearchInput(props: IConversationSearchInputProps) {
|
|
11
|
+
const {
|
|
12
|
+
className,
|
|
13
|
+
placeholder,
|
|
14
|
+
clearable,
|
|
15
|
+
value,
|
|
16
|
+
onChange,
|
|
17
|
+
prefix = <Icon type={IconTypes.SEARCH} height={16} width={16} />,
|
|
18
|
+
onFocus,
|
|
19
|
+
onBlur,
|
|
20
|
+
} = props;
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
return (
|
|
23
|
+
<Input
|
|
24
|
+
className={classNames(
|
|
25
|
+
'uikit-conversation-search-input',
|
|
26
|
+
className,
|
|
27
|
+
)}
|
|
28
|
+
placeholder={placeholder || t('TUIConversation.Search')}
|
|
29
|
+
clearable={clearable}
|
|
30
|
+
value={value}
|
|
31
|
+
onChange={onChange}
|
|
32
|
+
onFocus={onFocus}
|
|
33
|
+
onBlur={onBlur}
|
|
34
|
+
prefix={prefix}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
ConversationSearchInput,
|
|
41
|
+
IConversationSearchInputProps,
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ConversationSearchInput';
|
package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.scss
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
3
|
+
.uikit-conversation-search-result {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
flex: 1;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
|
|
11
|
+
@include theme() {
|
|
12
|
+
background-color: get(bg-color-operate);
|
|
13
|
+
color: get(text-color-primary);
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.tsx
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cs from 'classnames';
|
|
3
|
+
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
|
+
import { ConversationPreview as DefaultConversationPreview, IConversationPreviewProps } from '../../ConversationPreview';
|
|
5
|
+
import { Avatar as DefaultAvatar, AvatarProps } from '../../Avatar';
|
|
6
|
+
import { PlaceHolder, PlaceHolderTypes } from '../../PlaceHolder';
|
|
7
|
+
|
|
8
|
+
import './ConversationSearchResult.scss';
|
|
9
|
+
|
|
10
|
+
interface IConversationSearchResultProps {
|
|
11
|
+
/** Whether to show the search result */
|
|
12
|
+
visible?: boolean;
|
|
13
|
+
/** The search result */
|
|
14
|
+
searchResult?: IConversationModel[];
|
|
15
|
+
/** The search input value */
|
|
16
|
+
searchValue?: string;
|
|
17
|
+
/** The custom ResultPreview component */
|
|
18
|
+
ResultPreview?: React.ComponentType<IConversationPreviewProps>;
|
|
19
|
+
/** The custom Avatar component */
|
|
20
|
+
Avatar?: React.ComponentType<AvatarProps>;
|
|
21
|
+
/** The custom no result Placeholder component */
|
|
22
|
+
PlaceholderNoResult?: React.ReactNode;
|
|
23
|
+
/** Callback when the ResultPreview is clicked */
|
|
24
|
+
onSelectResult?: (conversation: IConversationModel) => void;
|
|
25
|
+
/** The custom class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** The custom css style */
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function ConversationSearchResult(props: IConversationSearchResultProps) {
|
|
32
|
+
const {
|
|
33
|
+
visible = false,
|
|
34
|
+
searchResult,
|
|
35
|
+
searchValue,
|
|
36
|
+
Avatar = DefaultAvatar,
|
|
37
|
+
ResultPreview = DefaultConversationPreview,
|
|
38
|
+
PlaceholderNoResult = <PlaceHolder type={PlaceHolderTypes.NO_RESULTS} searchString={searchValue} />,
|
|
39
|
+
onSelectResult,
|
|
40
|
+
className,
|
|
41
|
+
style,
|
|
42
|
+
} = props;
|
|
43
|
+
|
|
44
|
+
if (!visible) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
className={cs('uikit-conversation-search-result', className)}
|
|
51
|
+
style={style}
|
|
52
|
+
>
|
|
53
|
+
{searchResult?.length === 0
|
|
54
|
+
? PlaceholderNoResult
|
|
55
|
+
: (searchResult?.map(item => (
|
|
56
|
+
<ResultPreview
|
|
57
|
+
key={item.conversationID}
|
|
58
|
+
conversation={item}
|
|
59
|
+
Avatar={Avatar}
|
|
60
|
+
highlightMatchString={searchValue}
|
|
61
|
+
onSelectConversation={onSelectResult}
|
|
62
|
+
/>
|
|
63
|
+
))
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export {
|
|
70
|
+
ConversationSearchResult,
|
|
71
|
+
IConversationSearchResultProps,
|
|
72
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ConversationSearchResult';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './ConversationSearchInput';
|
|
2
|
-
export * from './ConversationSearchResult';
|
|
1
|
+
export * from './ConversationSearchInput/ConversationSearchInput';
|
|
2
|
+
export * from './ConversationSearchResult/ConversationSearchResult';
|
|
3
|
+
export * from './ConversationSearch';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
|
-
export interface EmptyStateIndicatorProps{
|
|
3
|
+
export interface EmptyStateIndicatorProps {
|
|
4
4
|
/** List Type: conversation | message */
|
|
5
5
|
listType?: 'conversation' | 'message' | 'chat';
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
function UnMemoizedEmptyStateIndicator
|
|
9
|
-
<T extends EmptyStateIndicatorProps>(props: PropsWithChildren<T>) {
|
|
8
|
+
function UnMemoizedEmptyStateIndicator<T extends EmptyStateIndicatorProps>(props: PropsWithChildren<T>) {
|
|
10
9
|
const { listType } = props;
|
|
11
10
|
|
|
12
11
|
if (listType === 'conversation') { return <p role="listitem">You have no conversation currently</p>; }
|
|
@@ -3,18 +3,18 @@ import './styles/index.scss';
|
|
|
3
3
|
import { IconTypes } from './type';
|
|
4
4
|
import { ICON_CONFIG } from './config';
|
|
5
5
|
|
|
6
|
-
const changeTypeToIconComponent = (type:IconTypes) => {
|
|
6
|
+
const changeTypeToIconComponent = (type: IconTypes) => {
|
|
7
7
|
const src = ICON_CONFIG[type].url || '';
|
|
8
|
-
return <img className={`icon-image icon-image-${type}`} src={src} alt={type} />;
|
|
8
|
+
return src && <img className={`icon-image icon-image-${type}`} src={src} alt={type} />;
|
|
9
9
|
};
|
|
10
|
-
export const changeTypeToIconClassName = (type:IconTypes) => ICON_CONFIG[type]?.className || '';
|
|
10
|
+
export const changeTypeToIconClassName = (type: IconTypes) => ICON_CONFIG[type]?.className || '';
|
|
11
11
|
|
|
12
12
|
export interface IconProps {
|
|
13
|
-
type?: IconTypes
|
|
14
|
-
height?: number
|
|
15
|
-
width?: number
|
|
16
|
-
onClick?: (event: React.BaseSyntheticEvent) => void
|
|
17
|
-
className?: string
|
|
13
|
+
type?: IconTypes;
|
|
14
|
+
height?: number;
|
|
15
|
+
width?: number;
|
|
16
|
+
onClick?: (event: React.BaseSyntheticEvent) => void;
|
|
17
|
+
className?: string;
|
|
18
18
|
}
|
|
19
19
|
export function Icon(props: React.PropsWithChildren<IconProps>) {
|
|
20
20
|
const {
|
|
@@ -41,6 +41,7 @@ import IconVectorUrl from './images/vector.png';
|
|
|
41
41
|
import IconUnvectorUrl from './images/unvector.png';
|
|
42
42
|
import IconVoiceUrl from './images/voice.png';
|
|
43
43
|
import IconAddCircleUrl from './images/add-friend.svg';
|
|
44
|
+
import IconMuteUrl from './images/mute.svg';
|
|
44
45
|
import IconVideoCallUrl from './images/video-call.svg';
|
|
45
46
|
import IconVoiceCallUrl from './images/voice-call.svg';
|
|
46
47
|
|
|
@@ -232,6 +233,14 @@ export const ICON_CONFIG: IconConfig = {
|
|
|
232
233
|
url: IconAddCircleUrl,
|
|
233
234
|
className: 'tui-kit-icon-add-friend',
|
|
234
235
|
},
|
|
236
|
+
[IconTypes.LOADING]: {
|
|
237
|
+
url: '',
|
|
238
|
+
className: 'tui-kit-icon-loading',
|
|
239
|
+
},
|
|
240
|
+
[IconTypes.MUTE]: {
|
|
241
|
+
url: IconMuteUrl,
|
|
242
|
+
className: 'tui-kit-icon-mute',
|
|
243
|
+
},
|
|
235
244
|
[IconTypes.VIDEOCALL]: {
|
|
236
245
|
url: IconVideoCallUrl,
|
|
237
246
|
className: 'tui-kit-icon-video-call',
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" class="design-iconfont">
|
|
2
|
+
<g fill="none" fill-rule="evenodd">
|
|
3
|
+
<path d="M4.13744611,6.61713753 L20.551,23 L0,23 L0,21 L3,21 L3,11 C3,9.40883362 3.41291862,7.91410954 4.13744611,6.61713753 Z M21.481,21 L24,21 L24,23 L23.485,23 L21.481,21 Z M12,2 C16.9705627,2 21,6.02943725 21,11 L21,20.52 L5.36684476,4.91705738 C7.01203082,3.12402075 9.37475086,2 12,2 Z" fill="#CCC" transform="translate(4 3)"/>
|
|
4
|
+
<path fill="#CCC" fill-rule="nonzero" d="M13 0L13 4 11 4 11 0z" transform="translate(4 3)"/>
|
|
5
|
+
<path stroke="#CCC" d="M8.5 24.5H15.5V25.5H8.5z" transform="translate(4 3)"/>
|
|
6
|
+
<path stroke="#CCC" stroke-width="2" transform="matrix(-1 0 0 1 31.089472 3)" d="M25.4499982 0.1546001L1.63947409 23.8855564"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
$primary-color: royalblue;
|
|
2
4
|
|
|
3
5
|
.tui-kit-icon {
|
|
@@ -6,25 +8,58 @@ $primary-color: royalblue;
|
|
|
6
8
|
align-items: center;
|
|
7
9
|
cursor: pointer;
|
|
8
10
|
position: relative;
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
9
13
|
.icon-image {
|
|
10
14
|
width: 100%;
|
|
11
15
|
}
|
|
12
|
-
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
13
18
|
color: $primary-color;
|
|
14
|
-
border-color:
|
|
19
|
+
border-color: currentcolor;
|
|
15
20
|
}
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
|
|
22
|
+
&::after {
|
|
23
|
+
content: "";
|
|
18
24
|
position: absolute;
|
|
19
25
|
inset: 0;
|
|
20
26
|
border-radius: inherit;
|
|
21
27
|
opacity: 0;
|
|
22
28
|
box-shadow: 0 0 0 6px $primary-color;
|
|
23
|
-
transition: .3s;
|
|
29
|
+
transition: 0.3s;
|
|
24
30
|
}
|
|
25
|
-
|
|
31
|
+
|
|
32
|
+
&:active::after {
|
|
26
33
|
box-shadow: none;
|
|
27
34
|
opacity: 0.4;
|
|
28
35
|
transition: 0s;
|
|
29
36
|
}
|
|
30
37
|
}
|
|
38
|
+
|
|
39
|
+
.tui-kit-icon-loading {
|
|
40
|
+
cursor: wait;
|
|
41
|
+
border-radius: 100%;
|
|
42
|
+
animation: circle infinite 1s linear;
|
|
43
|
+
|
|
44
|
+
@include theme() {
|
|
45
|
+
border: 3px solid get(text-color-disable);
|
|
46
|
+
border-top-color: transparent;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
@include theme() {
|
|
51
|
+
border: 3px solid get(text-color-disable);
|
|
52
|
+
border-top-color: transparent;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@keyframes circle {
|
|
58
|
+
0% {
|
|
59
|
+
transform: rotate(0);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
100% {
|
|
63
|
+
transform: rotate(360deg);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -5,20 +5,21 @@ import React, {
|
|
|
5
5
|
import './styles/index.scss';
|
|
6
6
|
import { Icon, IconTypes } from '../Icon';
|
|
7
7
|
|
|
8
|
-
export interface InputProps
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'type'> {
|
|
9
|
+
className?: string;
|
|
10
|
+
inputClassName?: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
clearable?: boolean;
|
|
13
|
+
prefix?: React.ReactNode;
|
|
14
|
+
suffix?: React.ReactNode;
|
|
15
|
+
value?: InputHTMLAttributes<HTMLInputElement>['value'];
|
|
16
|
+
border?: '' | 'bottom';
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
20
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
21
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
22
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
22
23
|
}
|
|
23
24
|
export interface InputRef {
|
|
24
25
|
focus: (options?: object) => void;
|
|
@@ -28,8 +29,8 @@ export interface InputRef {
|
|
|
28
29
|
export const Input = React.forwardRef<InputRef, InputProps>(
|
|
29
30
|
(props: InputProps, ref): React.ReactElement => {
|
|
30
31
|
const {
|
|
31
|
-
className =
|
|
32
|
-
|
|
32
|
+
className = '',
|
|
33
|
+
inputClassName = '',
|
|
33
34
|
placeholder,
|
|
34
35
|
clearable = false,
|
|
35
36
|
prefix,
|
|
@@ -38,14 +39,14 @@ export const Input = React.forwardRef<InputRef, InputProps>(
|
|
|
38
39
|
onBlur,
|
|
39
40
|
onFocus,
|
|
40
41
|
onKeyDown,
|
|
41
|
-
value: propsValue =
|
|
42
|
-
border =
|
|
42
|
+
value: propsValue = '',
|
|
43
|
+
border = '',
|
|
43
44
|
disabled = false,
|
|
44
45
|
maxLength = undefined,
|
|
45
46
|
} = props;
|
|
46
47
|
|
|
47
48
|
const [focused, setFocused] = useState<boolean>(false);
|
|
48
|
-
const enterCodeList = [
|
|
49
|
+
const enterCodeList = ['Enter', 'NumpadEnter'];
|
|
49
50
|
const [value, setValue] = useState(propsValue);
|
|
50
51
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
51
52
|
const handleFocus = (e: any) => {
|
|
@@ -66,7 +67,7 @@ export const Input = React.forwardRef<InputRef, InputProps>(
|
|
|
66
67
|
setValue('');
|
|
67
68
|
focus();
|
|
68
69
|
const currentTarget = inputRef?.current?.cloneNode(
|
|
69
|
-
true
|
|
70
|
+
true,
|
|
70
71
|
) as HTMLInputElement;
|
|
71
72
|
const event = Object.create(e, {
|
|
72
73
|
target: { value: currentTarget },
|
|
@@ -103,7 +104,7 @@ export const Input = React.forwardRef<InputRef, InputProps>(
|
|
|
103
104
|
<input
|
|
104
105
|
maxLength={maxLength}
|
|
105
106
|
disabled={disabled}
|
|
106
|
-
className={`tui-kit-input ${
|
|
107
|
+
className={`tui-kit-input ${inputClassName}`}
|
|
107
108
|
placeholder={placeholder}
|
|
108
109
|
ref={inputRef}
|
|
109
110
|
value={value}
|
|
@@ -114,9 +115,9 @@ export const Input = React.forwardRef<InputRef, InputProps>(
|
|
|
114
115
|
/>
|
|
115
116
|
{suffix}
|
|
116
117
|
{(clearable && value)
|
|
117
|
-
&& <Icon type={IconTypes.CLEAR} height={13} width={13} onClick={(e: any) => {clearInput(e)}} />}
|
|
118
|
+
&& <Icon type={IconTypes.CLEAR} height={13} width={13} onClick={(e: any) => { clearInput(e); }} />}
|
|
118
119
|
</div>
|
|
119
120
|
</div>
|
|
120
121
|
);
|
|
121
|
-
}
|
|
122
|
+
},
|
|
122
123
|
);
|
|
@@ -3,50 +3,50 @@ import { Message } from '@tencentcloud/chat';
|
|
|
3
3
|
|
|
4
4
|
import { UnknowPorps, useComponentContext, useTUIChatStateContext } from '../../context';
|
|
5
5
|
|
|
6
|
-
import { messageShowType, TUIMessageContextProvider } from '../../context/
|
|
6
|
+
import { messageShowType, TUIMessageContextProvider } from '../../context/MessageContext';
|
|
7
7
|
import { useMessageHandler } from './hooks';
|
|
8
8
|
|
|
9
9
|
import './styles/index.scss';
|
|
10
|
-
import { TUIMessageDefault } from './
|
|
10
|
+
import { TUIMessageDefault } from './MessageDefault';
|
|
11
11
|
import { MessagePlugins as MessagePluginsDefault, MessagePluginsProps } from './MessagePlugins';
|
|
12
12
|
import { MessageContext as MessageContextDefault } from './MessageContext';
|
|
13
13
|
|
|
14
14
|
interface TUIMessageBasicProps {
|
|
15
|
-
className?: string
|
|
16
|
-
filter?: (data:Message) => void
|
|
17
|
-
isShowTime?: boolean
|
|
18
|
-
isShowRead?: boolean
|
|
19
|
-
plugin?: MessagePluginsProps
|
|
20
|
-
prefix?: React.ReactElement | string
|
|
21
|
-
suffix?: React.ReactElement | string
|
|
22
|
-
customName?: React.ReactElement
|
|
23
|
-
showAvatar?: messageShowType
|
|
24
|
-
showName?: messageShowType
|
|
25
|
-
customAvatar?: React.ReactElement
|
|
26
|
-
isShowProgress?: boolean
|
|
27
|
-
Progress?: React.ComponentType<{message: Message}
|
|
15
|
+
className?: string;
|
|
16
|
+
filter?: (data: Message) => void;
|
|
17
|
+
isShowTime?: boolean;
|
|
18
|
+
isShowRead?: boolean;
|
|
19
|
+
plugin?: MessagePluginsProps;
|
|
20
|
+
prefix?: React.ReactElement | string;
|
|
21
|
+
suffix?: React.ReactElement | string;
|
|
22
|
+
customName?: React.ReactElement;
|
|
23
|
+
showAvatar?: messageShowType;
|
|
24
|
+
showName?: messageShowType;
|
|
25
|
+
customAvatar?: React.ReactElement;
|
|
26
|
+
isShowProgress?: boolean;
|
|
27
|
+
Progress?: React.ComponentType<{ message: Message }>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface TUIMessageProps extends TUIMessageBasicProps {
|
|
31
|
-
message?: Message
|
|
32
|
-
className?: string
|
|
33
|
-
TUIMessage?: React.ComponentType
|
|
34
|
-
MessageContext?: React.ComponentType<UnknowPorps
|
|
35
|
-
MessagePlugins?: React.ComponentType<UnknowPorps
|
|
36
|
-
handleDelete?: ReactEventHandler
|
|
37
|
-
CustemElement?: React.ComponentType<{message: Message}
|
|
38
|
-
TextElement?: React.ComponentType<{message: Message}
|
|
39
|
-
ImageElement?: React.ComponentType<{message: Message}
|
|
40
|
-
VideoElement?: React.ComponentType<{message: Message}
|
|
41
|
-
AudioElement?: React.ComponentType<{message: Message}
|
|
42
|
-
FileElement?: React.ComponentType<{message: Message}
|
|
43
|
-
MergerElement?: React.ComponentType<{message: Message}
|
|
44
|
-
LocationElement?: React.ComponentType<{message: Message}
|
|
45
|
-
FaceElement?: React.ComponentType<{message: Message}
|
|
31
|
+
message?: Message;
|
|
32
|
+
className?: string;
|
|
33
|
+
TUIMessage?: React.ComponentType;
|
|
34
|
+
MessageContext?: React.ComponentType<UnknowPorps>;
|
|
35
|
+
MessagePlugins?: React.ComponentType<UnknowPorps>;
|
|
36
|
+
handleDelete?: ReactEventHandler;
|
|
37
|
+
CustemElement?: React.ComponentType<{ message: Message }>;
|
|
38
|
+
TextElement?: React.ComponentType<{ message: Message }>;
|
|
39
|
+
ImageElement?: React.ComponentType<{ message: Message }>;
|
|
40
|
+
VideoElement?: React.ComponentType<{ message: Message }>;
|
|
41
|
+
AudioElement?: React.ComponentType<{ message: Message }>;
|
|
42
|
+
FileElement?: React.ComponentType<{ message: Message }>;
|
|
43
|
+
MergerElement?: React.ComponentType<{ message: Message }>;
|
|
44
|
+
LocationElement?: React.ComponentType<{ message: Message }>;
|
|
45
|
+
FaceElement?: React.ComponentType<{ message: Message }>;
|
|
46
46
|
}
|
|
47
|
-
function TUIMessageWithContext
|
|
47
|
+
function TUIMessageWithContext<T extends TUIMessageProps>(
|
|
48
48
|
props: PropsWithChildren<T>,
|
|
49
|
-
):React.ReactElement {
|
|
49
|
+
): React.ReactElement {
|
|
50
50
|
const {
|
|
51
51
|
message: propsMessage,
|
|
52
52
|
TUIMessage: propTUIMessage,
|
|
@@ -136,7 +136,7 @@ function TUIMessageWithContext <T extends TUIMessageProps>(
|
|
|
136
136
|
const MemoizedTUIMessage = React.memo(TUIMessageWithContext) as
|
|
137
137
|
typeof TUIMessageWithContext;
|
|
138
138
|
|
|
139
|
-
export function TUIMessage(props:TUIMessageProps):React.ReactElement {
|
|
139
|
+
export function TUIMessage(props: TUIMessageProps): React.ReactElement {
|
|
140
140
|
const {
|
|
141
141
|
message,
|
|
142
142
|
} = props;
|
|
@@ -7,7 +7,7 @@ import type { MessageContextProps } from './MessageText';
|
|
|
7
7
|
import { useComponentContext, useTUIChatActionContext } from '../../context';
|
|
8
8
|
import { useUIManager } from '../../context';
|
|
9
9
|
import { CallMessage } from '@tencentcloud/call-uikit-react';
|
|
10
|
-
import { startCall } from '../
|
|
10
|
+
import { startCall } from '../Chat/utils';
|
|
11
11
|
|
|
12
12
|
function MessageCustomWithContext<T extends MessageContextProps>(
|
|
13
13
|
props: PropsWithChildren<T>,
|