@tencentcloud/chat-uikit-react 2.2.6 → 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 +16 -0
- package/dist/cjs/_virtual/index.js +1 -0
- package/dist/cjs/assets/fonts/iconfont.ttf +0 -0
- package/dist/cjs/assets/fonts/iconfont.woff +0 -0
- package/dist/cjs/assets/fonts/iconfont.woff2 +0 -0
- package/dist/cjs/components/Avatar/Avatar.d.ts +1 -1
- package/dist/cjs/components/{TUIChat/TUIChat.d.ts → Chat/Chat.d.ts} +11 -10
- package/dist/cjs/components/Chat/Chat.js +1 -0
- package/dist/cjs/components/Chat/ChatState.js +1 -0
- package/dist/cjs/components/Chat/index.js +1 -0
- package/dist/cjs/components/Chat/server.js +1 -0
- package/dist/cjs/components/Chat/utils.js +1 -0
- package/dist/cjs/components/{TUIChatHeader/TUIChatHeader.d.ts → ChatHeader/ChatHeader.d.ts} +4 -3
- package/dist/cjs/components/ChatHeader/ChatHeader.js +1 -0
- package/dist/cjs/components/{TUIChatHeader/TUIChatHeaderDefault.d.ts → ChatHeader/ChatHeaderDefault.d.ts} +4 -3
- 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/images/video-call.svg.js +1 -0
- package/dist/cjs/components/Icon/images/voice-call.svg.js +1 -0
- package/dist/cjs/components/Icon/type.d.ts +5 -1
- 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/MessageElement/utils/index.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/components/{untils.js → utils.js} +1 -1
- package/dist/cjs/context/{TUIChatActionContext.d.ts → ChatActionContext.d.ts} +3 -2
- package/dist/{esm/context/TUIChatStateContext.d.ts → cjs/context/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/cjs/context/LanguageContext.js +1 -1
- 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/context/ThemeContext.js +1 -1
- package/dist/cjs/context/UIKitContext.d.ts +2 -2
- package/dist/cjs/context/UIKitContext.js +1 -1
- 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 +1376 -568
- 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/en-US/index.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/ja-JP/index.js +1 -1
- package/dist/cjs/locales/ko-KR/TUIConversation.js +1 -1
- package/dist/cjs/locales/ko-KR/index.js +1 -1
- package/dist/cjs/locales/zh-CN/TUIConversation.js +1 -1
- package/dist/cjs/locales/zh-CN/index.js +1 -1
- package/dist/cjs/locales/zh-TW/TUIChat.js +1 -0
- package/dist/cjs/locales/zh-TW/TUIContact.js +1 -0
- package/dist/cjs/locales/zh-TW/TUIConversation.js +1 -0
- package/dist/cjs/locales/zh-TW/TUIProfile.js +1 -0
- package/dist/cjs/locales/zh-TW/index.js +1 -0
- package/dist/esm/_virtual/index.js +1 -0
- package/dist/esm/assets/fonts/iconfont.ttf +0 -0
- package/dist/esm/assets/fonts/iconfont.woff +0 -0
- package/dist/esm/assets/fonts/iconfont.woff2 +0 -0
- package/dist/esm/components/Avatar/Avatar.d.ts +1 -1
- package/dist/esm/components/{TUIChat/TUIChat.d.ts → Chat/Chat.d.ts} +11 -10
- package/dist/esm/components/Chat/Chat.js +1 -0
- package/dist/esm/components/Chat/ChatState.js +1 -0
- package/dist/esm/components/Chat/index.js +1 -0
- package/dist/esm/components/Chat/server.js +1 -0
- package/dist/esm/components/Chat/utils.js +1 -0
- package/dist/esm/components/{TUIChatHeader/TUIChatHeader.d.ts → ChatHeader/ChatHeader.d.ts} +4 -3
- package/dist/esm/components/ChatHeader/ChatHeader.js +1 -0
- package/dist/esm/components/{TUIChatHeader/TUIChatHeaderDefault.d.ts → ChatHeader/ChatHeaderDefault.d.ts} +4 -3
- 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/images/video-call.svg.js +1 -0
- package/dist/esm/components/Icon/images/voice-call.svg.js +1 -0
- package/dist/esm/components/Icon/type.d.ts +5 -1
- 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/MessageElement/utils/index.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/components/utils.js +1 -0
- package/dist/esm/context/{TUIChatActionContext.d.ts → ChatActionContext.d.ts} +3 -2
- package/dist/{cjs/context/TUIChatStateContext.d.ts → esm/context/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/esm/context/LanguageContext.js +1 -1
- 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/context/ThemeContext.js +1 -1
- package/dist/esm/context/UIKitContext.d.ts +2 -2
- package/dist/esm/context/UIKitContext.js +1 -1
- 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 +1376 -568
- 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/en-US/index.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/ja-JP/index.js +1 -1
- package/dist/esm/locales/ko-KR/TUIConversation.js +1 -1
- package/dist/esm/locales/ko-KR/index.js +1 -1
- package/dist/esm/locales/zh-CN/TUIConversation.js +1 -1
- package/dist/esm/locales/zh-CN/index.js +1 -1
- package/dist/esm/locales/zh-TW/TUIChat.js +1 -0
- package/dist/esm/locales/zh-TW/TUIContact.js +1 -0
- package/dist/esm/locales/zh-TW/TUIConversation.js +1 -0
- package/dist/esm/locales/zh-TW/TUIProfile.js +1 -0
- package/dist/esm/locales/zh-TW/index.js +1 -0
- package/package.json +3 -1
- package/rollup.config.js +1 -1
- package/src/assets/fonts/iconfont.ttf +0 -0
- package/src/assets/fonts/iconfont.woff +0 -0
- package/src/assets/fonts/iconfont.woff2 +0 -0
- package/src/components/Avatar/Avatar.tsx +33 -31
- package/src/components/Avatar/styles/index.scss +11 -4
- package/src/components/{TUIChat/TUIChat.tsx → Chat/Chat.tsx} +50 -46
- package/src/components/{TUIChat/TUIChatState.tsx → Chat/ChatState.tsx} +41 -41
- package/src/components/{TUIChat → Chat}/hooks/useHandleMessage.tsx +1 -1
- package/src/components/{TUIChat → Chat}/hooks/useHandleMessageList.tsx +1 -1
- package/src/components/Chat/index.ts +5 -0
- package/src/components/Chat/server.ts +44 -0
- package/src/components/{TUIChat → Chat}/styles/layout.scss +7 -2
- package/src/components/Chat/utils.ts +72 -0
- package/src/components/{TUIChatHeader/TUIChatHeader.tsx → ChatHeader/ChatHeader.tsx} +14 -11
- package/src/components/{TUIChatHeader/TUIChatHeaderDefault.tsx → ChatHeader/ChatHeaderDefault.tsx} +72 -29
- package/src/components/ChatHeader/index.ts +2 -0
- package/src/components/{TUIChatHeader → ChatHeader}/styles/layout.scss +12 -13
- 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 +24 -16
- package/src/components/Checkbox/index.tsx +9 -9
- package/src/components/Checkbox/styles/color.scss +17 -6
- 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/TUIContactInfo → Contact/ContactInfo}/index.scss +44 -21
- package/src/components/{TUIContact/TUIContactList/TUIContactList.tsx → Contact/ContactList/ContactList.tsx} +78 -74
- package/src/components/{TUIContact/TUIContactList → Contact/ContactList}/index.scss +40 -20
- package/src/components/{TUIContact → Contact}/hooks/useTUIContact.tsx +3 -3
- package/src/components/{TUIContact → Contact}/index.scss +30 -11
- package/src/components/Contact/index.ts +3 -0
- package/src/components/{TUIContactSearch/TUIContactSearch.tsx → ContactSearch/ContactSearch.tsx} +8 -7
- package/src/components/{TUIContactSearch → ContactSearch}/index.scss +12 -3
- 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 +38 -31
- package/src/components/ConversationCreate/index.ts +2 -1
- package/src/components/ConversationCreate/styles/{ConversationCreatGroupDetail.scss → ConversationCreateGroupDetail.scss} +13 -17
- package/src/components/ConversationCreate/styles/conversationCreateButton.scss +5 -0
- package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +13 -8
- package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +20 -21
- package/src/components/ConversationCreate/styles/index.scss +64 -19
- 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 +80 -61
- 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/DivWithEdit/styles/index.scss +30 -10
- package/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx +2 -3
- package/src/components/Icon/Icon.tsx +8 -8
- package/src/components/Icon/config.ts +23 -4
- package/src/components/Icon/images/mute.svg +8 -0
- package/src/components/Icon/images/video-call.svg +3 -0
- package/src/components/Icon/images/voice-call.svg +3 -0
- package/src/components/Icon/styles/index.scss +41 -6
- package/src/components/Icon/type.ts +4 -0
- package/src/components/Input/Input.tsx +24 -23
- package/src/components/Input/styles/index.scss +22 -6
- package/src/components/{TUIMessage/TUIMessage.tsx → MessageElement/Message.tsx} +33 -33
- package/src/components/{TUIMessage → MessageElement}/MessageAvatar.tsx +7 -7
- package/src/components/{TUIMessage → MessageElement}/MessageBubble.tsx +22 -21
- package/src/components/{TUIMessage → MessageElement}/MessageCustom.tsx +26 -5
- 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}/MessageStatus.tsx +5 -5
- package/src/components/{TUIMessage → MessageElement}/hooks/useMessageHandler.ts +6 -6
- package/src/components/{TUIMessage → MessageElement}/hooks/useMessageReply.ts +6 -5
- package/src/components/{TUIMessage → MessageElement}/index.ts +1 -1
- package/src/components/{TUIMessage → MessageElement}/styles/color.scss +6 -5
- package/src/components/{TUIMessage → MessageElement}/styles/layout.scss +112 -43
- package/src/components/{TUIMessage → MessageElement}/utils/index.ts +23 -12
- 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 +14 -14
- 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/useHandleForwardMessage.tsx +5 -4
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.tsx +1 -1
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputText.tsx +14 -14
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.tsx +4 -4
- package/src/components/MessageInput/index.ts +3 -0
- package/src/components/MessageInput/styles/color.scss +40 -0
- package/src/components/{TUIMessageInput → MessageInput}/styles/layout.scss +33 -17
- package/src/components/{TUIMessageList/TUIMessageList.tsx → MessageList/MessageList.tsx} +5 -5
- package/src/components/{TUIMessageList → MessageList}/hooks/useMessageListElement.tsx +14 -10
- package/src/components/MessageList/index.ts +1 -0
- package/src/components/{TUIMessageList → MessageList}/styles/layout.scss +16 -9
- 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/Plugins/styles/color.scss +3 -11
- package/src/components/Profile/Profile.tsx +46 -21
- package/src/components/{TUIProfile/TUIProfileDefault.tsx → Profile/ProfileDefault.tsx} +12 -11
- 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/color.scss +7 -0
- package/src/components/Profile/styles/index.scss +2 -23
- package/src/components/{TUIProfile → Profile}/styles/layout.scss +17 -14
- package/src/components/index.ts +13 -11
- package/src/components/{untils.ts → utils.ts} +5 -4
- package/src/context/{TUIChatActionContext.tsx → ChatActionContext.tsx} +15 -14
- 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 +6 -4
- package/src/context/MessageContext.tsx +55 -0
- package/src/context/MessageInputContext.tsx +54 -0
- package/src/context/ThemeContext.tsx +12 -5
- package/src/context/UIKitContext.tsx +11 -2
- 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/en-US/index.ts +0 -3
- package/src/locales/index.ts +16 -2
- package/src/locales/ja-JP/TUIConversation.ts +4 -0
- package/src/locales/ja-JP/index.ts +0 -2
- package/src/locales/ko-KR/TUIConversation.ts +4 -0
- package/src/locales/ko-KR/index.ts +0 -2
- package/src/locales/zh-CN/TUIConversation.ts +4 -0
- package/src/locales/zh-CN/index.ts +0 -2
- package/src/locales/zh-TW/TUIChat.ts +27 -0
- package/src/locales/zh-TW/TUIContact.ts +29 -0
- package/src/locales/zh-TW/TUIConversation.ts +36 -0
- package/src/locales/zh-TW/TUIProfile.ts +15 -0
- package/src/locales/zh-TW/index.ts +11 -0
- package/src/styles/colors/_color-dark.scss +31 -21
- package/src/styles/colors/_color-light.scss +31 -21
- package/src/styles/colors/_color-theme.scss +32 -21
- package/src/styles/normalize.scss +6 -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/Icon/images/down-arrow.png.js +0 -1
- package/dist/cjs/components/Icon/images/right-arrow.svg.js +0 -1
- package/dist/cjs/components/TUIChat/TUIChat.js +0 -1
- package/dist/cjs/components/TUIChat/TUIChatState.js +0 -1
- package/dist/cjs/components/TUIChat/unitls.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/TUIMessage/utils/index.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/cjs/locales/en-US/TUIGlobal.js +0 -1
- package/dist/cjs/locales/ja-JP/TUIGlobal.js +0 -1
- package/dist/cjs/locales/ko-KR/TUIGlobal.js +0 -1
- package/dist/cjs/locales/zh-CN/TUIGlobal.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/Icon/images/down-arrow.png.js +0 -1
- package/dist/esm/components/Icon/images/right-arrow.svg.js +0 -1
- package/dist/esm/components/TUIChat/TUIChat.js +0 -1
- package/dist/esm/components/TUIChat/TUIChatState.js +0 -1
- package/dist/esm/components/TUIChat/unitls.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/TUIMessage/utils/index.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/components/untils.js +0 -1
- package/dist/esm/context/TUIConversationContext.js +0 -1
- package/dist/esm/locales/en-US/TUIGlobal.js +0 -1
- package/dist/esm/locales/ja-JP/TUIGlobal.js +0 -1
- package/dist/esm/locales/ko-KR/TUIGlobal.js +0 -1
- package/dist/esm/locales/zh-CN/TUIGlobal.js +0 -1
- package/scripts/publish-github.js +0 -60
- package/scripts/publish-intl-demo.js +0 -14
- package/scripts/publish-intl-experience-demo.js +0 -14
- package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +0 -170
- package/src/components/ConversationPreview/ConversationListContainer.tsx +0 -20
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +0 -190
- 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/TUIChat/index.ts +0 -2
- package/src/components/TUIChat/unitls.ts +0 -39
- 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 -59
- 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/TUIMessageInput/styles/color.scss +0 -36
- 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/color.scss +0 -6
- 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/src/locales/en-US/TUIGlobal.ts +0 -6
- package/src/locales/ja-JP/TUIGlobal.ts +0 -6
- package/src/locales/ko-KR/TUIGlobal.ts +0 -6
- package/src/locales/zh-CN/TUIGlobal.ts +0 -6
- /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/{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/{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 → 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/{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/{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 → Chat}/hooks/useCreateTUIChatStateContext.tsx +0 -0
- /package/src/components/{TUIChat → Chat}/hooks/useIsMounted.ts +0 -0
- /package/src/components/{TUIChat → Chat}/styles/index.scss +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/{TUIContactSearch → ContactSearch}/hooks/useContactSearch.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageAudio.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}/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/useMessagePluginElement.tsx +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/{TUIMessageInput → MessageInput}/hooks/index.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.ts +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}/styles/index.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/{TUIProfile → Profile}/hooks/index.ts +0 -0
- /package/src/components/{TUIProfile → Profile}/hooks/useMyProfile.tsx +0 -0
|
@@ -1,78 +1,260 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
// ConversationPreview.tsx
|
|
2
|
+
import React, { CSSProperties, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import cs from 'classnames';
|
|
4
|
+
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
+
import { Icon, IconTypes } from '../Icon';
|
|
6
|
+
import { Avatar as DefaultAvatar, type AvatarProps } from '../Avatar';
|
|
7
|
+
import { ConversationActions as DefaultConversationActions, type IConversationActionsConfig, type IConversationActionsProps } from '../ConversationActions';
|
|
8
|
+
import { useConversationList } from '../../context/ConversationListContext';
|
|
9
|
+
import { useUIManager } from '../../context/UIManagerContext';
|
|
10
|
+
import { useUIKit } from '../../context';
|
|
11
|
+
import useLongPress from '../../hooks/useLongPress';
|
|
12
|
+
import useMouseHover from '../../hooks/useMouseHover';
|
|
13
|
+
import { generateHighlightTitle, getLatestMessagePreview } from './utils';
|
|
14
|
+
import { getTimeStamp } from '../utils';
|
|
15
|
+
import { isH5 } from '../../utils/env';
|
|
6
16
|
|
|
7
|
-
import
|
|
8
|
-
getDisplayImage, getDisplayMessage, getDisplayTitle, getDisplayTime,
|
|
9
|
-
} from './utils';
|
|
17
|
+
import './ConversationPreview.scss';
|
|
10
18
|
|
|
11
|
-
|
|
19
|
+
interface IConversationPreviewUIProps {
|
|
20
|
+
/** The conversation to be displayed */
|
|
21
|
+
conversation: IConversationModel;
|
|
12
22
|
/** If the component's Conversation is the active (selected) Conversation */
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
displayMessage?: string | React.ReactElement;
|
|
20
|
-
/** Time of Conversation to display */
|
|
21
|
-
displayTime?: string;
|
|
22
|
-
/** Number of unread Messages */
|
|
23
|
-
unread?: number;
|
|
24
|
-
}
|
|
25
|
-
export interface ConversationPreviewProps {
|
|
26
|
-
conversation: Conversation;
|
|
27
|
-
activeConversation?: Conversation;
|
|
28
|
-
Preview?: React.ComponentType<ConversationPreviewUIComponentProps>;
|
|
23
|
+
isSelected?: boolean;
|
|
24
|
+
/** Whether to show the ConversationActions */
|
|
25
|
+
enableActions?: boolean;
|
|
26
|
+
/** The string to be highlighted in the title */
|
|
27
|
+
highlightMatchString?: string;
|
|
28
|
+
/** The custom Avatar component */
|
|
29
29
|
Avatar?: React.ComponentType<AvatarProps>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
/** The custom Title component */
|
|
31
|
+
Title?: string | JSX.Element;
|
|
32
|
+
/** The custom last message abstract component */
|
|
33
|
+
LastMessageAbstract?: string | JSX.Element;
|
|
34
|
+
/** The custom last message abstract component */
|
|
35
|
+
LastMessageTimestamp?: string | JSX.Element;
|
|
36
|
+
/** The custom Unread component */
|
|
37
|
+
Unread?: string | JSX.Element;
|
|
38
|
+
/** The custom ConversationActions component */
|
|
39
|
+
ConversationActions?: React.ComponentType<IConversationActionsProps>;
|
|
40
|
+
/** Callback when the user click a conversation from conversation list */
|
|
41
|
+
onSelectConversation?: (conversation: IConversationModel) => void;
|
|
42
|
+
/** The custom ConversationActions config */
|
|
43
|
+
actionsConfig?: IConversationActionsConfig;
|
|
44
|
+
/** The custom class name */
|
|
45
|
+
className?: string;
|
|
46
|
+
/** The custom class style */
|
|
47
|
+
style?: CSSProperties;
|
|
48
|
+
/** The custom children node to override UI */
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface IConversationPreviewProps extends IConversationPreviewUIProps {
|
|
53
|
+
/** The custom Preview UI component */
|
|
54
|
+
Preview?: React.ComponentType<IConversationPreviewUIProps>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function ConversationPreviewTitle(props: {
|
|
58
|
+
conversation: IConversationModel;
|
|
59
|
+
highlightMatchString?: string;
|
|
60
|
+
}): string | JSX.Element {
|
|
61
|
+
const { conversation, highlightMatchString } = props;
|
|
62
|
+
return (
|
|
63
|
+
<div className="uikit-conversation-preview__title text-ellipsis">
|
|
64
|
+
{generateHighlightTitle(conversation, highlightMatchString).map((item, index) => (
|
|
65
|
+
<span
|
|
66
|
+
key={index}
|
|
67
|
+
className={cs({
|
|
68
|
+
'uikit-conversation-preview__title--highlight': item.isHighlight,
|
|
69
|
+
'uikit-conversation-preview__title--normal': !item.isHighlight,
|
|
70
|
+
})}
|
|
71
|
+
>
|
|
72
|
+
{item.text}
|
|
73
|
+
</span>
|
|
74
|
+
))}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function ConversationPreviewTimestamp(props: {
|
|
80
|
+
conversation: IConversationModel;
|
|
81
|
+
}): string | JSX.Element {
|
|
82
|
+
const { conversation } = props;
|
|
83
|
+
const { language } = useUIKit();
|
|
84
|
+
return (
|
|
85
|
+
<div className="uikit-conversation-preview__time">
|
|
86
|
+
{getTimeStamp(+(conversation.lastMessage?.lastTime || 0) * 1000, language)}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function ConversationPreviewAbstract(props: {
|
|
92
|
+
conversation: IConversationModel;
|
|
93
|
+
}): string | JSX.Element {
|
|
94
|
+
const { conversation } = props;
|
|
95
|
+
const { myProfile } = useUIManager();
|
|
96
|
+
return (
|
|
97
|
+
<div className="uikit-conversation-preview__abstract">
|
|
98
|
+
{getLatestMessagePreview(conversation, myProfile)}
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function ConversationPreviewUnread(props: {
|
|
104
|
+
conversation: IConversationModel;
|
|
105
|
+
}): string | JSX.Element {
|
|
106
|
+
const { conversation } = props;
|
|
107
|
+
let content;
|
|
108
|
+
if (conversation.isMuted) {
|
|
109
|
+
content = <Icon type={IconTypes.MUTE} width={16} height={16} />;
|
|
110
|
+
} else if (conversation.unreadCount > 99) {
|
|
111
|
+
content = '99+';
|
|
112
|
+
} else if (conversation.unreadCount === 0) {
|
|
113
|
+
content = null;
|
|
114
|
+
} else {
|
|
115
|
+
content = conversation.unreadCount;
|
|
116
|
+
}
|
|
117
|
+
return (
|
|
118
|
+
<div className="uikit-conversation-preview__unread">
|
|
119
|
+
{content}
|
|
120
|
+
</div>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function ConversationPreview<T extends IConversationPreviewProps>(
|
|
125
|
+
props: T,
|
|
126
|
+
): React.ReactElement {
|
|
127
|
+
const {
|
|
128
|
+
conversation,
|
|
129
|
+
isSelected = false,
|
|
130
|
+
enableActions = true,
|
|
131
|
+
highlightMatchString,
|
|
132
|
+
Preview = ConversationPreviewUI,
|
|
133
|
+
Avatar = DefaultAvatar,
|
|
134
|
+
ConversationActions = DefaultConversationActions,
|
|
135
|
+
Title = ConversationPreviewTitle({ conversation, highlightMatchString }),
|
|
136
|
+
LastMessageTimestamp = ConversationPreviewTimestamp({ conversation }),
|
|
137
|
+
LastMessageAbstract = ConversationPreviewAbstract({ conversation }),
|
|
138
|
+
Unread = ConversationPreviewUnread({ conversation }),
|
|
139
|
+
onSelectConversation,
|
|
140
|
+
actionsConfig,
|
|
141
|
+
className,
|
|
142
|
+
style,
|
|
143
|
+
children,
|
|
144
|
+
} = props;
|
|
145
|
+
|
|
146
|
+
const { setCurrentConversation } = useConversationList();
|
|
147
|
+
|
|
148
|
+
return (
|
|
149
|
+
<Preview
|
|
150
|
+
conversation={conversation}
|
|
151
|
+
isSelected={isSelected}
|
|
152
|
+
enableActions={enableActions}
|
|
153
|
+
highlightMatchString={highlightMatchString}
|
|
154
|
+
Avatar={Avatar}
|
|
155
|
+
ConversationActions={ConversationActions}
|
|
156
|
+
Title={Title}
|
|
157
|
+
LastMessageTimestamp={LastMessageTimestamp}
|
|
158
|
+
LastMessageAbstract={LastMessageAbstract}
|
|
159
|
+
Unread={Unread}
|
|
160
|
+
onSelectConversation={onSelectConversation}
|
|
161
|
+
actionsConfig={actionsConfig}
|
|
162
|
+
className={className}
|
|
163
|
+
style={style}
|
|
164
|
+
children={children}
|
|
165
|
+
/>
|
|
166
|
+
);
|
|
35
167
|
}
|
|
36
|
-
|
|
168
|
+
|
|
169
|
+
function ConversationPreviewUI<T extends IConversationPreviewUIProps>(
|
|
37
170
|
props: T,
|
|
38
|
-
) {
|
|
171
|
+
): React.ReactElement {
|
|
39
172
|
const {
|
|
40
|
-
activeConversation,
|
|
41
173
|
conversation,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
174
|
+
isSelected,
|
|
175
|
+
enableActions,
|
|
176
|
+
Avatar = DefaultAvatar,
|
|
177
|
+
ConversationActions = DefaultConversationActions,
|
|
178
|
+
Title,
|
|
179
|
+
LastMessageTimestamp,
|
|
180
|
+
LastMessageAbstract,
|
|
181
|
+
Unread,
|
|
182
|
+
onSelectConversation,
|
|
183
|
+
actionsConfig,
|
|
184
|
+
className,
|
|
185
|
+
style,
|
|
186
|
+
children,
|
|
45
187
|
} = props;
|
|
46
|
-
|
|
188
|
+
|
|
47
189
|
const {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
} =
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const [
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
|
|
190
|
+
currentConversation,
|
|
191
|
+
setCurrentConversation,
|
|
192
|
+
} = useConversationList();
|
|
193
|
+
|
|
194
|
+
const conversationPreviewRef = useRef<HTMLDivElement>(null);
|
|
195
|
+
const [isActionMenuActive, setIsActionMenuActive] = useState(false);
|
|
196
|
+
|
|
197
|
+
const isHovering = useMouseHover(conversationPreviewRef);
|
|
198
|
+
const onLongPress = useLongPress({}, {
|
|
199
|
+
delay: 500,
|
|
200
|
+
shouldPreventDefault: true,
|
|
201
|
+
});
|
|
202
|
+
const { isLongPressing } = onLongPress;
|
|
203
|
+
|
|
58
204
|
useEffect(() => {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
205
|
+
setIsActionMenuActive(isHovering || isLongPressing);
|
|
206
|
+
}, [isHovering, isLongPressing]);
|
|
207
|
+
|
|
208
|
+
const onClick = () => {
|
|
209
|
+
onSelectConversation?.(conversation);
|
|
210
|
+
setCurrentConversation(conversation);
|
|
211
|
+
};
|
|
65
212
|
|
|
66
213
|
return (
|
|
67
|
-
<
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
214
|
+
<div
|
|
215
|
+
ref={conversationPreviewRef}
|
|
216
|
+
className={cs('uikit-conversation-preview', className, {
|
|
217
|
+
'uikit-conversation-preview--mobile': isH5,
|
|
218
|
+
'uikit-conversation-preview--active': isSelected || conversation.conversationID === currentConversation?.conversationID,
|
|
219
|
+
'uikit-conversation-preview--unread': !conversation.isMuted && conversation.unreadCount > 0,
|
|
220
|
+
'uikit-conversation-preview--pin': conversation.isPinned,
|
|
221
|
+
'uikit-conversation-preview--mute': conversation.isMuted,
|
|
222
|
+
})}
|
|
223
|
+
style={style}
|
|
224
|
+
onClick={onClick}
|
|
225
|
+
>
|
|
226
|
+
{children || (
|
|
227
|
+
<>
|
|
228
|
+
<div className="uikit-conversation-preview__avatar">
|
|
229
|
+
<Avatar
|
|
230
|
+
image={conversation.getAvatar()}
|
|
231
|
+
size={40}
|
|
232
|
+
/>
|
|
233
|
+
</div>
|
|
234
|
+
<div className="uikit-conversation-preview__content">
|
|
235
|
+
{Title}
|
|
236
|
+
{LastMessageAbstract}
|
|
237
|
+
</div>
|
|
238
|
+
<div className="uikit-conversation-preview__external">
|
|
239
|
+
{Unread}
|
|
240
|
+
{(enableActions && isActionMenuActive)
|
|
241
|
+
? (
|
|
242
|
+
<ConversationActions
|
|
243
|
+
conversation={conversation}
|
|
244
|
+
{...actionsConfig}
|
|
245
|
+
/>
|
|
246
|
+
)
|
|
247
|
+
: LastMessageTimestamp}
|
|
248
|
+
</div>
|
|
249
|
+
</>
|
|
250
|
+
)}
|
|
251
|
+
</div>
|
|
77
252
|
);
|
|
78
253
|
}
|
|
254
|
+
|
|
255
|
+
export {
|
|
256
|
+
ConversationPreview,
|
|
257
|
+
ConversationPreviewUI,
|
|
258
|
+
IConversationPreviewProps,
|
|
259
|
+
IConversationPreviewUIProps,
|
|
260
|
+
};
|
|
@@ -1,31 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import TUIChatEngine, { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
2
|
+
import { formatEmojiString } from '../MessageElement/utils/emojiMap';
|
|
3
|
+
import { Conversation, Profile } from '@tencentcloud/chat';
|
|
3
4
|
import { defaultGroupAvatarWork, defaultUserAvatar } from '../Avatar';
|
|
4
|
-
import { formatEmojiString } from '../TUIMessage/utils/emojiMap';
|
|
5
|
-
import { getTimeStamp } from '../untils';
|
|
6
5
|
|
|
7
|
-
interface
|
|
8
|
-
|
|
6
|
+
interface IMessageProfile {
|
|
7
|
+
name?: string;
|
|
8
|
+
nick?: string;
|
|
9
|
+
groupID?: string;
|
|
10
|
+
userID?: string;
|
|
11
|
+
avatar?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const generateHighlightTitle = (
|
|
15
|
+
conversation: IConversationModel,
|
|
16
|
+
highlightMatchString?: string,
|
|
17
|
+
): Array<{ text: string; isHighlight: boolean }> => {
|
|
18
|
+
const titleString = conversation.getShowName();
|
|
19
|
+
if (!highlightMatchString) return [{ text: titleString, isHighlight: false }];
|
|
20
|
+
const matchLowerCaseString = highlightMatchString.toLowerCase();
|
|
21
|
+
const titleList = titleString.split(new RegExp(`(${highlightMatchString})`, 'gi'))
|
|
22
|
+
.map((item: string) => { return { text: item, isHighlight: item.toLowerCase() === matchLowerCaseString }; });
|
|
23
|
+
return titleList;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const getLatestMessagePreview = (
|
|
27
|
+
conversation: IConversationModel,
|
|
28
|
+
myProfile?: Profile,
|
|
29
|
+
) => {
|
|
30
|
+
const { lastMessage, type } = conversation;
|
|
31
|
+
if (!lastMessage) {
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
const {
|
|
35
|
+
fromAccount, nick, nameCard, isRevoked,
|
|
36
|
+
} = lastMessage;
|
|
37
|
+
let { messageForShow } = lastMessage;
|
|
38
|
+
if (lastMessage.type === TUIChatEngine.TYPES.MSG_CUSTOM && lastMessage.payload?.description) {
|
|
39
|
+
messageForShow = lastMessage.payload.description;
|
|
40
|
+
}
|
|
41
|
+
let from = '';
|
|
42
|
+
switch (type) {
|
|
43
|
+
case TUIChatEngine.TYPES.CONV_GROUP:
|
|
44
|
+
from = lastMessage?.fromAccount === myProfile?.userID ? 'You' : `${nameCard || nick || fromAccount || ''}`;
|
|
45
|
+
from = `${from ? `${from}:` : ''}`;
|
|
46
|
+
break;
|
|
47
|
+
case TUIChatEngine.TYPES.CONV_C2C:
|
|
48
|
+
from = isRevoked ? 'you ' : '';
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
}
|
|
52
|
+
return (
|
|
53
|
+
<div style={{
|
|
54
|
+
overflow: 'hidden',
|
|
55
|
+
textOverflow: 'ellipsis',
|
|
56
|
+
whiteSpace: 'nowrap',
|
|
57
|
+
}}
|
|
58
|
+
>
|
|
59
|
+
<span>{from}</span>
|
|
60
|
+
<span>{lastMessage.isRevoked ? 'recalled a message' : formatEmojiString(messageForShow, 1)}</span>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// The following is compatible with old versions
|
|
66
|
+
export const getMessageProfile = (conversation: IConversationModel | Conversation): IMessageProfile => {
|
|
9
67
|
// eslint-disable-next-line
|
|
10
68
|
// @ts-ignore
|
|
11
69
|
if (!conversation) return null;
|
|
12
|
-
let result = {};
|
|
70
|
+
let result: IMessageProfile = {};
|
|
13
71
|
const { type, groupProfile, userProfile } = conversation;
|
|
14
72
|
switch (type) {
|
|
15
|
-
case
|
|
73
|
+
case TUIChatEngine.TYPES.CONV_C2C:
|
|
16
74
|
result = userProfile;
|
|
17
75
|
break;
|
|
18
|
-
case
|
|
76
|
+
case TUIChatEngine.TYPES.CONV_GROUP:
|
|
19
77
|
result = groupProfile;
|
|
20
78
|
break;
|
|
21
|
-
case TencentCloudChat.TYPES.CONV_SYSTEM:
|
|
22
79
|
default:
|
|
80
|
+
break;
|
|
23
81
|
}
|
|
24
|
-
return result
|
|
82
|
+
return result;
|
|
25
83
|
};
|
|
26
84
|
|
|
27
85
|
export const getDisplayTitle = (
|
|
28
|
-
conversation:
|
|
86
|
+
conversation: IConversationModel,
|
|
29
87
|
searchValue?: string,
|
|
30
88
|
highlightColor = '#147AFF',
|
|
31
89
|
): string | React.ReactElement => {
|
|
@@ -35,11 +93,11 @@ export const getDisplayTitle = (
|
|
|
35
93
|
const { type, remark } = conversation;
|
|
36
94
|
let title = '';
|
|
37
95
|
switch (type) {
|
|
38
|
-
case
|
|
39
|
-
title = remark || nick || userID;
|
|
96
|
+
case TUIChatEngine.TYPES.CONV_C2C:
|
|
97
|
+
title = remark || nick || userID || '';
|
|
40
98
|
break;
|
|
41
|
-
case
|
|
42
|
-
title = name || groupID;
|
|
99
|
+
case TUIChatEngine.TYPES.CONV_GROUP:
|
|
100
|
+
title = name || groupID || '';
|
|
43
101
|
break;
|
|
44
102
|
default:
|
|
45
103
|
title = '';
|
|
@@ -55,7 +113,8 @@ export const getDisplayTitle = (
|
|
|
55
113
|
(textItem.toLowerCase() === searchValue.toLowerCase())
|
|
56
114
|
? (
|
|
57
115
|
<span key={index} style={{ color: highlightColor }}>{textItem}</span>
|
|
58
|
-
)
|
|
116
|
+
)
|
|
117
|
+
: (
|
|
59
118
|
<span key={index}>{textItem}</span>
|
|
60
119
|
),
|
|
61
120
|
)}
|
|
@@ -65,16 +124,17 @@ export const getDisplayTitle = (
|
|
|
65
124
|
};
|
|
66
125
|
return !searchValue ? title : handleTitle(title);
|
|
67
126
|
};
|
|
68
|
-
|
|
127
|
+
|
|
128
|
+
export const getDisplayImage = (conversation: IConversationModel) => {
|
|
69
129
|
const { type } = conversation;
|
|
70
130
|
const { avatar } = getMessageProfile(conversation);
|
|
71
131
|
let displayImage = avatar;
|
|
72
132
|
if (!avatar) {
|
|
73
133
|
switch (type) {
|
|
74
|
-
case
|
|
134
|
+
case TUIChatEngine.TYPES.CONV_C2C:
|
|
75
135
|
displayImage = defaultUserAvatar;
|
|
76
136
|
break;
|
|
77
|
-
case
|
|
137
|
+
case TUIChatEngine.TYPES.CONV_GROUP:
|
|
78
138
|
displayImage = defaultGroupAvatarWork;
|
|
79
139
|
break;
|
|
80
140
|
default:
|
|
@@ -83,44 +143,3 @@ export const getDisplayImage = (conversation: Conversation) => {
|
|
|
83
143
|
}
|
|
84
144
|
return displayImage;
|
|
85
145
|
};
|
|
86
|
-
export const getDisplayMessage = (
|
|
87
|
-
conversation: Conversation,
|
|
88
|
-
myProfile: Profile,
|
|
89
|
-
language?: string,
|
|
90
|
-
) => {
|
|
91
|
-
const { lastMessage, type } = conversation;
|
|
92
|
-
const {
|
|
93
|
-
fromAccount, nick, nameCard, isRevoked,
|
|
94
|
-
} = lastMessage;
|
|
95
|
-
let { messageForShow } = lastMessage;
|
|
96
|
-
if (lastMessage.type === TencentCloudChat.TYPES.MSG_CUSTOM && lastMessage.payload?.description) {
|
|
97
|
-
messageForShow = lastMessage.payload.description;
|
|
98
|
-
}
|
|
99
|
-
let from = '';
|
|
100
|
-
switch (type) {
|
|
101
|
-
case TencentCloudChat.TYPES.CONV_GROUP:
|
|
102
|
-
from = lastMessage?.fromAccount === myProfile?.userID ? 'You' : `${nameCard || nick || fromAccount || ''}`;
|
|
103
|
-
from = `${from ? `${from}:` : ''}`;
|
|
104
|
-
break;
|
|
105
|
-
case TencentCloudChat.TYPES.CONV_C2C:
|
|
106
|
-
from = isRevoked ? 'you ' : '';
|
|
107
|
-
break;
|
|
108
|
-
default:
|
|
109
|
-
}
|
|
110
|
-
return (
|
|
111
|
-
<div style={{
|
|
112
|
-
overflow: 'hidden',
|
|
113
|
-
textOverflow: 'ellipsis',
|
|
114
|
-
whiteSpace: 'nowrap',
|
|
115
|
-
}}
|
|
116
|
-
>
|
|
117
|
-
<span>{from}</span>
|
|
118
|
-
<span>{lastMessage.isRevoked ? 'recalled a message' : formatEmojiString(messageForShow, 1)}</span>
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
export const getDisplayTime = (conversation: Conversation, language: string) => {
|
|
124
|
-
const { lastMessage } = conversation;
|
|
125
|
-
return getTimeStamp(lastMessage.lastTime * 1000, language);
|
|
126
|
-
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@use "../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
3
|
+
.uikit-conversation-search {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex: 1;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
position: relative;
|
|
9
|
+
z-index: 2;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
|
|
12
|
+
@include theme() {
|
|
13
|
+
background-color: get(bg-color-operate);
|
|
14
|
+
color: get(text-color-primary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.uikit-conversation-search--active {
|
|
18
|
+
position: absolute;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -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
|
+
}
|