@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,26 +1,25 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
TUIConversationService,
|
|
6
|
-
} from '@tencentcloud/chat-uikit-engine';
|
|
3
|
+
import { Profile } from '@tencentcloud/chat';
|
|
7
4
|
import { Input } from '../Input';
|
|
8
5
|
import { Icon, IconTypes } from '../Icon';
|
|
9
6
|
import { ConversationCreateSelectView, ConversationCreateSelectViewProps } from './ConversationCreateSelectView';
|
|
10
7
|
import { Avatar, defaultUserAvatar } from '../Avatar';
|
|
11
8
|
import { useConversationCreate } from './hooks/useConversationCreate';
|
|
12
|
-
import {
|
|
9
|
+
import { createC2CConversation } from '../../hooks/useConversation';
|
|
10
|
+
import { useUIKit } from '../../context';
|
|
13
11
|
import { PageStateTypes } from './ConversationCreate';
|
|
14
|
-
import { useConversation } from '../../hooks';
|
|
15
12
|
import { Toast } from '../Toast';
|
|
13
|
+
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
16
14
|
|
|
17
|
-
export interface ConversationCreateUserSelectListProps extends ConversationCreateSelectViewProps{
|
|
18
|
-
isCreateGroup: boolean
|
|
19
|
-
setIsCreateGroup: React.Dispatch<React.SetStateAction<boolean
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
export interface ConversationCreateUserSelectListProps extends ConversationCreateSelectViewProps {
|
|
16
|
+
isCreateGroup: boolean;
|
|
17
|
+
setIsCreateGroup: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
|
+
className?: string;
|
|
19
|
+
conversationList: IConversationModel[];
|
|
20
|
+
setPageState: React.Dispatch<React.SetStateAction<PageStateTypes>>;
|
|
21
|
+
onBeforeCreateConversation?: (userID: string) => void;
|
|
22
|
+
onConversationCreated?: (conversation: IConversationModel) => void;
|
|
24
23
|
}
|
|
25
24
|
export function ConversationCreateUserSelectList(props: ConversationCreateUserSelectListProps) {
|
|
26
25
|
const {
|
|
@@ -30,20 +29,19 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
30
29
|
className,
|
|
31
30
|
conversationList,
|
|
32
31
|
setIsCreateGroup,
|
|
33
|
-
setConversationCreated,
|
|
34
32
|
setPageState,
|
|
33
|
+
onBeforeCreateConversation,
|
|
34
|
+
onConversationCreated,
|
|
35
35
|
} = props;
|
|
36
36
|
const { t } = useTranslation();
|
|
37
37
|
const [searchValue, setSearchValue] = useState('');
|
|
38
38
|
const { chat } = useUIKit();
|
|
39
|
-
const { setActiveConversation } = useUIManager();
|
|
40
39
|
const [friendList, setFriendList] = useState<any>({});
|
|
41
40
|
const {
|
|
42
41
|
getFriendListSortSearchResult,
|
|
43
|
-
} = useConversationCreate(
|
|
42
|
+
} = useConversationCreate(conversationList, (newFriendListResult) => {
|
|
44
43
|
setFriendList(newFriendListResult);
|
|
45
44
|
});
|
|
46
|
-
const { createConversation } = useConversation(chat);
|
|
47
45
|
const userCheckedList = useRef(new Map());
|
|
48
46
|
const searchValueChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
49
47
|
const { value } = e.target;
|
|
@@ -55,7 +53,7 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
55
53
|
userCheckedList.current.clear();
|
|
56
54
|
setSelectList([]);
|
|
57
55
|
};
|
|
58
|
-
const getUserChecked = (userID:string, dom: HTMLElement) => {
|
|
56
|
+
const getUserChecked = (userID: string, dom: HTMLElement) => {
|
|
59
57
|
if (!dom) return;
|
|
60
58
|
if (!userCheckedList.current.has(userID)) {
|
|
61
59
|
userCheckedList.current.set(userID, []);
|
|
@@ -75,17 +73,21 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
75
73
|
if (checked) {
|
|
76
74
|
selectList.push({ profile, domList });
|
|
77
75
|
} else {
|
|
78
|
-
selectList.splice(selectList.findIndex(
|
|
76
|
+
selectList.splice(selectList.findIndex(item => item.profile.userID === userID), 1);
|
|
79
77
|
}
|
|
80
78
|
setSelectList([...selectList]);
|
|
81
79
|
};
|
|
82
|
-
|
|
80
|
+
|
|
81
|
+
const _createConversation = async (profile: Profile) => {
|
|
83
82
|
if (isCreateGroup) return;
|
|
84
83
|
const { userID } = profile;
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
const params = onBeforeCreateConversation?.(userID);
|
|
85
|
+
createC2CConversation(userID)
|
|
86
|
+
.then((conversation: IConversationModel) => {
|
|
87
|
+
onConversationCreated?.(conversation);
|
|
88
|
+
}).catch((error) => {
|
|
89
|
+
Toast({ text: error.message, type: 'error' });
|
|
90
|
+
});
|
|
89
91
|
};
|
|
90
92
|
const next = () => {
|
|
91
93
|
if (selectList && selectList.length === 0) {
|
|
@@ -113,11 +115,11 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
113
115
|
<div className="tui-user-name active">{t('TUIConversation.New group chat')}</div>
|
|
114
116
|
</div>
|
|
115
117
|
)}
|
|
116
|
-
<div className={`tui-conversation-create ${className}`}>
|
|
117
|
-
<div className="tui-conversation-create-
|
|
118
|
+
<div className={`tui-conversation-create-select-list-container ${className}`}>
|
|
119
|
+
<div className="tui-conversation-create-select-list">
|
|
118
120
|
<div className="tui-group-container">
|
|
119
121
|
{Object.keys(friendList).map(
|
|
120
|
-
|
|
122
|
+
key => friendList[key].length !== 0 && (
|
|
121
123
|
<div className="tui-group-box" key={key}>
|
|
122
124
|
<div className="title">{key}</div>
|
|
123
125
|
{friendList[key].map((profile: Profile, index: number) => {
|
|
@@ -128,8 +130,8 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
128
130
|
className="tui-user tui-user-checkbox-label"
|
|
129
131
|
htmlFor={`userChecked-${key}-${userID}`}
|
|
130
132
|
key={userID}
|
|
131
|
-
onClick={(
|
|
132
|
-
|
|
133
|
+
onClick={() => {
|
|
134
|
+
_createConversation(profile);
|
|
133
135
|
}}
|
|
134
136
|
>
|
|
135
137
|
<Avatar size={30} image={avatar || defaultUserAvatar} />
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import { TUIChatEngine } from '@tencentcloud/chat-uikit-engine';
|
|
3
4
|
import './styles/conversationGroupTypeInfo.scss';
|
|
4
|
-
import TencentCloudChat from '@tencentcloud/chat';
|
|
5
5
|
import { PageStateTypes } from './ConversationCreate';
|
|
6
6
|
import { Icon, IconTypes } from '../Icon';
|
|
7
7
|
|
|
8
8
|
export enum GroupType {
|
|
9
|
-
Work=
|
|
10
|
-
Public=
|
|
11
|
-
Meeting=
|
|
12
|
-
AVChatRoom=
|
|
13
|
-
Community =
|
|
9
|
+
Work = TUIChatEngine.TYPES.GRP_WORK,
|
|
10
|
+
Public = TUIChatEngine.TYPES.GRP_PUBLIC,
|
|
11
|
+
Meeting = TUIChatEngine.TYPES.GRP_MEETING,
|
|
12
|
+
AVChatRoom = TUIChatEngine.TYPES.GRP_AVCHATROOM,
|
|
13
|
+
Community = TUIChatEngine.TYPES.GRP_COMMUNITY,
|
|
14
14
|
}
|
|
15
15
|
export interface ConversationGroupTypeInfoProps {
|
|
16
|
-
groupType:
|
|
17
|
-
setGroupType: React.Dispatch<React.SetStateAction<
|
|
18
|
-
setPageState: React.Dispatch<React.SetStateAction<PageStateTypes
|
|
16
|
+
groupType: GroupType;
|
|
17
|
+
setGroupType: React.Dispatch<React.SetStateAction<GroupType>>;
|
|
18
|
+
setPageState: React.Dispatch<React.SetStateAction<PageStateTypes>>;
|
|
19
19
|
}
|
|
20
|
-
export const typeInfoList = [
|
|
21
|
-
{ type: 'Work', des: 'Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.' },
|
|
22
|
-
{ type: 'Public', des: 'After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.' },
|
|
23
|
-
{ type: 'Meeting', des: 'After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.' },
|
|
24
|
-
{ type: 'AVChatRoom', des: 'After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.' },
|
|
25
|
-
{ type: 'Community', des: 'After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.' },
|
|
20
|
+
export const typeInfoList: Array<{ type: GroupType; name: string; des: string }> = [
|
|
21
|
+
{ type: GroupType.Work, name: 'Work', des: 'Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.' },
|
|
22
|
+
{ type: GroupType.Public, name: 'Public', des: 'After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.' },
|
|
23
|
+
{ type: GroupType.Meeting, name: 'Meeting', des: 'After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.' },
|
|
24
|
+
{ type: GroupType.AVChatRoom, name: 'AVChatRoom', des: 'After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.' },
|
|
25
|
+
{ type: GroupType.Community, name: 'Community', des: 'After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.' },
|
|
26
26
|
];
|
|
27
27
|
export function ConversationGroupTypeInfo(props: ConversationGroupTypeInfoProps) {
|
|
28
28
|
const { groupType, setGroupType, setPageState } = props;
|
|
29
29
|
|
|
30
30
|
const { t } = useTranslation();
|
|
31
|
-
const selectGroupType = (type:
|
|
31
|
+
const selectGroupType = (type: GroupType) => {
|
|
32
32
|
setGroupType(type);
|
|
33
33
|
setPageState(PageStateTypes.CREATE_DETAIL);
|
|
34
34
|
};
|
|
35
35
|
return (
|
|
36
36
|
<div className="tui-conversation-group-type-info">
|
|
37
|
-
{typeInfoList.map(({ type, des }) => (
|
|
37
|
+
{typeInfoList.map(({ type, name, des }) => (
|
|
38
38
|
<div
|
|
39
39
|
key={type}
|
|
40
40
|
role="presentation"
|
|
@@ -43,12 +43,12 @@ export function ConversationGroupTypeInfo(props: ConversationGroupTypeInfoProps)
|
|
|
43
43
|
>
|
|
44
44
|
<div className="group-type-info-title">
|
|
45
45
|
{type === groupType && <Icon className="box-active-icon" type={IconTypes.RIGHT} width={16} height={16} />}
|
|
46
|
-
{t(`TUIConversation.${
|
|
46
|
+
{t(`TUIConversation.${name}`)}
|
|
47
47
|
</div>
|
|
48
48
|
<div className="group-type-info-description">{t(`TUIConversation.${des}`)}</div>
|
|
49
49
|
</div>
|
|
50
50
|
))}
|
|
51
|
-
<a className="group-type-info-document" target="_blank" href="https://
|
|
51
|
+
<a className="group-type-info-document" target="_blank" href="https://trtc.io/document/33529?platform=web&product=chat&menulabel=uikit#group-types" rel="bookmark noreferrer">{t('TUIConversation.Details')}</a>
|
|
52
52
|
</div>
|
|
53
53
|
);
|
|
54
54
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { StoreName, TUIStore, TUIUserService, IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
3
|
+
import TencentCloudChat, { Friend, Profile } from '@tencentcloud/chat';
|
|
3
4
|
import { strChineseFirstPy } from '../static/word';
|
|
4
|
-
import { useProfile } from '../../../hooks';
|
|
5
5
|
|
|
6
6
|
export const useConversationCreate = (
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
setFriendListResultHandler?:(
|
|
7
|
+
conversationList: IConversationModel[],
|
|
8
|
+
setFriendListResultHandler?: (
|
|
10
9
|
newFriendListResult: object,
|
|
11
|
-
setFriendListResult: React.Dispatch<React.SetStateAction<{string:
|
|
10
|
+
setFriendListResult: React.Dispatch<React.SetStateAction<{ string: object[] }>>
|
|
12
11
|
) => void,
|
|
13
12
|
) => {
|
|
14
13
|
const [friendListSortResult, setFriendListSortResult] = useState<any>();
|
|
@@ -20,30 +19,27 @@ export const useConversationCreate = (
|
|
|
20
19
|
}
|
|
21
20
|
return strChineseFirstPy.charAt(uni - 19968);
|
|
22
21
|
};
|
|
23
|
-
const queryFriendList = async () => {
|
|
22
|
+
const queryFriendList = async (friendList: Friend[]) => {
|
|
24
23
|
const frequentlyConversationProfile = conversationList.filter(
|
|
25
|
-
(item:
|
|
26
|
-
).slice(0, 5).map((item:
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (setFriendListResultHandler) {
|
|
35
|
-
setFriendListResultHandler(sortResult, setFriendListSortResult);
|
|
36
|
-
}
|
|
24
|
+
(item: IConversationModel) => item?.type === TencentCloudChat.TYPES.CONV_C2C,
|
|
25
|
+
).slice(0, 5).map((item: IConversationModel) => item?.userProfile);
|
|
26
|
+
const sortResult = handleData(
|
|
27
|
+
friendList?.map((item: Friend) => item.profile),
|
|
28
|
+
frequentlyConversationProfile,
|
|
29
|
+
);
|
|
30
|
+
setFriendListSortResult(sortResult);
|
|
31
|
+
if (setFriendListResultHandler) {
|
|
32
|
+
setFriendListResultHandler(sortResult, setFriendListSortResult);
|
|
37
33
|
}
|
|
38
34
|
};
|
|
39
|
-
|
|
35
|
+
function handleData(profileList: Profile[], frequentlyConversationProfile?: any) {
|
|
40
36
|
const sortResult: any = {
|
|
41
37
|
'#': [],
|
|
42
38
|
};
|
|
43
39
|
for (let i = 65; i <= 90; i += 1) {
|
|
44
40
|
sortResult[String.fromCharCode(i)] = [];
|
|
45
41
|
}
|
|
46
|
-
profileList
|
|
42
|
+
profileList?.forEach((profile) => {
|
|
47
43
|
const { nick, userID } = profile;
|
|
48
44
|
const first = getFirstLetter(nick || userID);
|
|
49
45
|
if (first >= 'a' && first <= 'z') {
|
|
@@ -58,21 +54,20 @@ export const useConversationCreate = (
|
|
|
58
54
|
sortResult[key].sort((a: any, b: any) => {
|
|
59
55
|
const { nick: aNick, userID: aUserID } = a;
|
|
60
56
|
const { nick: bNick, userID: bUserID } = b;
|
|
61
|
-
if (aNick || aUserID
|
|
62
|
-
return 1;
|
|
63
|
-
} if (aNick || aUserID === bNick || bUserID) {
|
|
57
|
+
if (aNick || aUserID <= bNick || bUserID) {
|
|
64
58
|
return 1;
|
|
65
59
|
}
|
|
66
60
|
return -1;
|
|
67
61
|
});
|
|
68
62
|
});
|
|
69
63
|
return sortResult;
|
|
70
|
-
}
|
|
71
|
-
const { getUserProfile } = useProfile(
|
|
64
|
+
}
|
|
65
|
+
// const { getUserProfile } = useProfile();
|
|
72
66
|
const getFriendListSortSearchResult = async (searchValue: string) => {
|
|
73
67
|
if (!searchValue) return friendListSortResult;
|
|
74
|
-
const { data
|
|
75
|
-
|
|
68
|
+
const { data } = await TUIUserService.getUserProfile({
|
|
69
|
+
userIDList: [searchValue],
|
|
70
|
+
});
|
|
76
71
|
const result: any = {};
|
|
77
72
|
let isIncludes = false;
|
|
78
73
|
Object.keys(friendListSortResult).forEach((key) => {
|
|
@@ -97,11 +92,23 @@ export const useConversationCreate = (
|
|
|
97
92
|
if (process.env?.REACT_APP_ONLINE === 'TencentCloudDemo') {
|
|
98
93
|
return result;
|
|
99
94
|
}
|
|
100
|
-
return !isIncludes ? handleData(
|
|
95
|
+
return !isIncludes ? handleData(data) : result;
|
|
101
96
|
};
|
|
97
|
+
|
|
98
|
+
function onFriendListUpdated(list: Friend[]) {
|
|
99
|
+
queryFriendList(list);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
102
|
useEffect(() => {
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
TUIStore.watch(StoreName.FRIEND, {
|
|
104
|
+
friendList: onFriendListUpdated,
|
|
105
|
+
});
|
|
106
|
+
return () => {
|
|
107
|
+
TUIStore.unwatch(StoreName.FRIEND, {
|
|
108
|
+
friendList: onFriendListUpdated,
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
}, []);
|
|
105
112
|
return {
|
|
106
113
|
getFirstLetter,
|
|
107
114
|
queryFriendList,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './ConversationCreate';
|
|
2
2
|
export * from './ConversationCreateSelectView';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './ConversationCreateGroupDetail';
|
|
4
4
|
export * from './ConversationCreateUserSelectList';
|
|
5
5
|
export * from './hooks/useConversationCreate';
|
|
6
6
|
export * from './ConversationGroupTypeInfo';
|
|
7
|
+
export * from './ConversationCreateButton';
|
|
@@ -1,39 +1,38 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-conversation-create-group-detail {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
padding: 0 10px;
|
|
7
|
+
overflow-y: scroll;
|
|
8
|
+
|
|
9
|
+
@include theme() {
|
|
10
|
+
color: get(text-color-primary);
|
|
11
|
+
}
|
|
12
|
+
|
|
2
13
|
.create-group-box {
|
|
3
14
|
padding: 10px 0;
|
|
4
15
|
}
|
|
5
16
|
|
|
6
17
|
.input-group-text {
|
|
7
|
-
font-weight: 400;
|
|
8
18
|
font-size: 14px;
|
|
9
|
-
font-family: PingFangSC-Medium;
|
|
10
|
-
line-height: 22px;
|
|
11
|
-
color: #000;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
.create-group-name {
|
|
15
22
|
.input-group-name {
|
|
16
23
|
font-weight: 700;
|
|
17
24
|
font-size: 14px;
|
|
18
|
-
font-family: PingFangSC-Medium;
|
|
19
|
-
line-height: 19px;
|
|
20
|
-
color: #000;
|
|
21
25
|
}
|
|
22
26
|
}
|
|
23
27
|
|
|
24
28
|
.input-group-title {
|
|
25
|
-
color: rgba(0, 0, 0, 40%);
|
|
26
29
|
width: 106px;
|
|
27
30
|
font-size: 14px;
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
.create-group-illustrate {
|
|
31
|
-
font-weight: 400;
|
|
32
34
|
font-size: 12px;
|
|
33
|
-
font-family: PingFangSC-Medium;
|
|
34
|
-
line-height: 17px;
|
|
35
35
|
text-align: justify;
|
|
36
|
-
color: rgba(0, 0, 0, 40%);
|
|
37
36
|
padding-left: 8px;
|
|
38
37
|
}
|
|
39
38
|
|
|
@@ -41,9 +40,6 @@
|
|
|
41
40
|
.create-group-portrait-title {
|
|
42
41
|
font-weight: 600;
|
|
43
42
|
font-size: 14px;
|
|
44
|
-
font-family: PingFangSC-Medium;
|
|
45
|
-
line-height: 20px;
|
|
46
|
-
color: #000;
|
|
47
43
|
padding: 20px 0 20px 8px;
|
|
48
44
|
}
|
|
49
45
|
|
|
@@ -52,18 +48,18 @@
|
|
|
52
48
|
flex-wrap: wrap;
|
|
53
49
|
justify-content: flex-start;
|
|
54
50
|
margin-bottom: 10px;
|
|
51
|
+
padding: 0 10px;
|
|
55
52
|
|
|
56
53
|
.create-group-portrait-info {
|
|
57
54
|
align-items: center;
|
|
58
55
|
display: flex;
|
|
59
56
|
flex-direction: column;
|
|
60
|
-
width: calc((100% - 10px) / 6);
|
|
57
|
+
// width: calc((100% - 10px) / 6);
|
|
61
58
|
padding: 6px;
|
|
62
59
|
box-sizing: border-box;
|
|
63
60
|
|
|
64
61
|
&-nick {
|
|
65
62
|
font-size: 12px;
|
|
66
|
-
font-family: PingFangSC-Medium;
|
|
67
63
|
margin-top: 6px;
|
|
68
64
|
}
|
|
69
65
|
}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.conversation-create-select-view {
|
|
2
4
|
display: flex;
|
|
3
5
|
flex-wrap: wrap;
|
|
4
6
|
justify-content: flex-start;
|
|
5
7
|
margin-bottom: 10px;
|
|
6
|
-
|
|
8
|
+
|
|
9
|
+
@include theme() {
|
|
10
|
+
color: get(text-color-primary);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.select-view-info {
|
|
7
14
|
align-items: center;
|
|
8
15
|
display: flex;
|
|
9
16
|
flex-direction: column;
|
|
@@ -11,21 +18,19 @@
|
|
|
11
18
|
padding: 6px;
|
|
12
19
|
box-sizing: border-box;
|
|
13
20
|
position: relative;
|
|
21
|
+
|
|
14
22
|
.select-view-info-close {
|
|
15
23
|
position: absolute;
|
|
16
24
|
right: 15px;
|
|
17
25
|
top: 6px;
|
|
18
26
|
z-index: 2;
|
|
19
27
|
}
|
|
28
|
+
|
|
20
29
|
.select-view-info-nick {
|
|
21
|
-
font-family: PingFangSC-Medium;
|
|
22
|
-
font-weight: 400;
|
|
23
30
|
font-size: 12px;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
text-overflow:ellipsis;
|
|
28
|
-
white-space:nowrap;
|
|
31
|
+
overflow: hidden;
|
|
32
|
+
text-overflow: ellipsis;
|
|
33
|
+
white-space: nowrap;
|
|
29
34
|
width: 100%;
|
|
30
35
|
text-align: center;
|
|
31
36
|
}
|
|
@@ -1,33 +1,41 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-conversation-group-type-info {
|
|
2
4
|
display: flex;
|
|
3
5
|
flex-direction: column;
|
|
4
6
|
padding: 0 10px;
|
|
5
7
|
overflow-y: scroll;
|
|
6
8
|
|
|
9
|
+
@include theme() {
|
|
10
|
+
color: get(text-color-primary);
|
|
11
|
+
}
|
|
12
|
+
|
|
7
13
|
.group-type-info-box {
|
|
8
14
|
display: flex;
|
|
9
15
|
flex-direction: column;
|
|
10
|
-
background: #FFFFFF;
|
|
11
|
-
border: 1px solid #DDDDDD;
|
|
12
16
|
border-radius: 16px;
|
|
13
17
|
padding: 12px 16px;
|
|
14
18
|
margin-top: 12px;
|
|
15
19
|
cursor: pointer;
|
|
16
20
|
|
|
21
|
+
@include theme() {
|
|
22
|
+
background-color: get(bg-color-operate);
|
|
23
|
+
border: 1px solid get(stroke-color-primary);
|
|
24
|
+
}
|
|
25
|
+
|
|
17
26
|
&:hover {
|
|
18
|
-
border: 1px solid #
|
|
27
|
+
border: 1px solid #147aff;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
&.group-type-info-box--active {
|
|
22
|
-
border: 1px solid #
|
|
31
|
+
border: 1px solid #147aff;
|
|
23
32
|
}
|
|
33
|
+
|
|
24
34
|
.group-type-info-title {
|
|
25
35
|
font-size: 16px;
|
|
26
|
-
font-family: PingFangSC-Medium;
|
|
27
|
-
line-height: 22px;
|
|
28
|
-
color: rgba(0, 0, 0, 0.8);
|
|
29
36
|
display: flex;
|
|
30
37
|
align-items: center;
|
|
38
|
+
|
|
31
39
|
.box-active-icon {
|
|
32
40
|
margin-right: 8px;
|
|
33
41
|
}
|
|
@@ -35,31 +43,22 @@
|
|
|
35
43
|
|
|
36
44
|
.group-type-info-description {
|
|
37
45
|
font-size: 12px;
|
|
38
|
-
font-family: PingFangSC-Medium;
|
|
39
|
-
line-height: 17px;
|
|
40
46
|
text-align: justify;
|
|
41
|
-
color: rgba(0, 0, 0, 0.4);
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
.group-type-info-document {
|
|
46
51
|
font-size: 16px;
|
|
47
|
-
font-family: PingFangSC-Medium;
|
|
48
|
-
line-height: 22px;
|
|
49
52
|
text-align: justify;
|
|
50
53
|
text-decoration: none;
|
|
51
54
|
margin: 1rem auto;
|
|
52
55
|
|
|
53
|
-
&:link
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&:active {
|
|
58
|
-
color: #104EF5;
|
|
59
|
-
}
|
|
60
|
-
|
|
56
|
+
&:link,
|
|
57
|
+
&:active,
|
|
61
58
|
&:visited {
|
|
62
|
-
|
|
59
|
+
@include theme() {
|
|
60
|
+
color: get(text-color-link);
|
|
61
|
+
}
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
}
|