@tencentcloud/chat-uikit-react 2.2.5 → 2.2.7
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/.eslintrc.js +16 -12
- package/.lintstagedrc.json +1 -1
- package/CHANGELOG.md +18 -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 +4 -4
- package/dist/cjs/components/Checkbox/index.d.ts +2 -2
- package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
- package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +8 -8
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/cjs/components/Icon/Icon.d.ts +3 -3
- package/dist/cjs/components/Icon/config.js +1 -1
- 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 +3 -1
- package/dist/cjs/components/Icon/type.js +1 -1
- package/dist/cjs/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
- package/dist/cjs/components/Input/Input.d.ts +4 -4
- package/dist/cjs/components/Model/index.d.ts +2 -2
- package/dist/cjs/components/Plugins/index.d.ts +4 -4
- package/dist/cjs/components/Popup/index.d.ts +2 -2
- package/dist/cjs/components/Switch/Switch.d.ts +2 -2
- package/dist/cjs/components/TUIChat/TUIChat.d.ts +15 -14
- package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
- package/dist/cjs/components/TUIChat/TUIChatState.js +1 -1
- package/dist/cjs/components/TUIChat/index.js +1 -0
- package/dist/cjs/components/TUIChat/server.js +1 -0
- package/dist/cjs/components/TUIChat/utils.js +1 -0
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +6 -5
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +6 -5
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContact.d.ts +3 -3
- package/dist/cjs/components/TUIContact/TUIContact.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
- package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -1
- package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -1
- package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
- package/dist/cjs/components/TUIConversation/TUIConversation.d.ts +2 -2
- package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +6 -6
- package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
- package/dist/cjs/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
- package/dist/cjs/components/TUIManage/TUIManage.d.ts +2 -2
- package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageAudio.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageAvatar.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageBubble.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageContext.d.ts +2 -2
- package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageCustom.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageName.js +1 -1
- package/dist/cjs/components/TUIMessage/MessagePlugins.d.ts +4 -4
- package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageProgress.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageText.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
- package/dist/cjs/components/TUIMessage/TUIMessage.d.ts +19 -19
- package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
- package/dist/cjs/components/TUIMessage/TUIMessageDefault.js +1 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +1 -1
- package/dist/cjs/components/TUIMessage/utils/index.js +1 -1
- package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
- package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
- package/dist/cjs/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
- package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
- package/dist/cjs/components/TUIMessageList/TUIMessageList.d.ts +2 -2
- package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
- package/dist/cjs/components/TUIProfile/TUIProfile.d.ts +3 -3
- package/dist/cjs/components/TUIProfile/TUIProfile.js +1 -1
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/cjs/components/Toast/index.d.ts +2 -2
- package/dist/cjs/components/{untils.js → utils.js} +1 -1
- package/dist/cjs/context/ComponentContext.d.ts +12 -12
- package/dist/cjs/context/LanguageContext.js +1 -0
- package/dist/cjs/context/TUIChatActionContext.d.ts +5 -4
- package/dist/cjs/context/TUIChatStateContext.d.ts +5 -5
- package/dist/cjs/context/TUIContactContext.d.ts +4 -4
- package/dist/cjs/context/TUIConversationContext.js +1 -1
- package/dist/cjs/context/TUIMessageContext.d.ts +17 -17
- package/dist/cjs/context/TUIMessageInputContext.d.ts +4 -4
- package/dist/cjs/context/ThemeContext.js +1 -0
- package/dist/cjs/context/UIKitContext.d.ts +25 -0
- package/dist/cjs/context/UIKitContext.js +1 -0
- package/dist/cjs/context/UIManagerContext.d.ts +46 -0
- package/dist/cjs/context/UIManagerContext.js +1 -0
- package/dist/cjs/hooks/useConversation.d.ts +2 -2
- package/dist/cjs/index.css +1 -2
- package/dist/cjs/index.d.css +1345 -1547
- package/dist/cjs/index.d.ts +2 -4
- package/dist/cjs/index.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/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/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 +4 -4
- package/dist/esm/components/Checkbox/index.d.ts +2 -2
- package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationListContainer.d.ts +2 -2
- package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +8 -8
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.d.ts +2 -2
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.d.ts +3 -3
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/esm/components/Icon/Icon.d.ts +3 -3
- package/dist/esm/components/Icon/config.js +1 -1
- 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 +3 -1
- package/dist/esm/components/Icon/type.js +1 -1
- package/dist/esm/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +4 -4
- package/dist/esm/components/Input/Input.d.ts +4 -4
- package/dist/esm/components/Model/index.d.ts +2 -2
- package/dist/esm/components/Plugins/index.d.ts +4 -4
- package/dist/esm/components/Popup/index.d.ts +2 -2
- package/dist/esm/components/Switch/Switch.d.ts +2 -2
- package/dist/esm/components/TUIChat/TUIChat.d.ts +15 -14
- package/dist/esm/components/TUIChat/TUIChat.js +1 -1
- package/dist/esm/components/TUIChat/TUIChatState.js +1 -1
- package/dist/esm/components/TUIChat/index.js +1 -0
- package/dist/esm/components/TUIChat/server.js +1 -0
- package/dist/esm/components/TUIChat/utils.js +1 -0
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +6 -5
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +6 -5
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/esm/components/TUIContact/TUIContact.d.ts +3 -3
- package/dist/esm/components/TUIContact/TUIContact.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +3 -3
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/groupInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -1
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +3 -3
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -1
- package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -1
- package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -1
- package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +1 -1
- package/dist/esm/components/TUIConversation/TUIConversation.d.ts +2 -2
- package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +6 -6
- package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
- package/dist/esm/components/TUIConversationList/hooks/useConversationUpdate.js +1 -1
- package/dist/esm/components/TUIManage/TUIManage.d.ts +2 -2
- package/dist/esm/components/TUIManage/TUIManage.js +1 -1
- package/dist/esm/components/TUIMessage/MessageAudio.js +1 -1
- package/dist/esm/components/TUIMessage/MessageAvatar.js +1 -1
- package/dist/esm/components/TUIMessage/MessageBubble.js +1 -1
- package/dist/esm/components/TUIMessage/MessageContext.d.ts +2 -2
- package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
- package/dist/esm/components/TUIMessage/MessageCustom.js +1 -1
- package/dist/esm/components/TUIMessage/MessageName.js +1 -1
- package/dist/esm/components/TUIMessage/MessagePlugins.d.ts +4 -4
- package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
- package/dist/esm/components/TUIMessage/MessageProgress.js +1 -1
- package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
- package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
- package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
- package/dist/esm/components/TUIMessage/MessageText.js +1 -1
- package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
- package/dist/esm/components/TUIMessage/TUIMessage.d.ts +19 -19
- package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
- package/dist/esm/components/TUIMessage/TUIMessageDefault.js +1 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +1 -1
- package/dist/esm/components/TUIMessage/utils/index.js +1 -1
- package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.d.ts +2 -2
- package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
- package/dist/esm/components/TUIMessageInput/InputQuoteDefalut.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInput.d.ts +7 -7
- package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.d.ts +2 -2
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +1 -1
- package/dist/esm/components/TUIMessageList/TUIMessageList.d.ts +2 -2
- package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
- package/dist/esm/components/TUIProfile/TUIProfile.d.ts +3 -3
- package/dist/esm/components/TUIProfile/TUIProfile.js +1 -1
- package/dist/esm/components/TUIProfile/TUIProfileDefault.d.ts +2 -2
- package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/esm/components/Toast/index.d.ts +2 -2
- package/dist/esm/components/utils.js +1 -0
- package/dist/esm/context/ComponentContext.d.ts +12 -12
- package/dist/esm/context/LanguageContext.js +1 -0
- package/dist/esm/context/TUIChatActionContext.d.ts +5 -4
- package/dist/esm/context/TUIChatStateContext.d.ts +5 -5
- package/dist/esm/context/TUIContactContext.d.ts +4 -4
- package/dist/esm/context/TUIConversationContext.js +1 -1
- package/dist/esm/context/TUIMessageContext.d.ts +17 -17
- package/dist/esm/context/TUIMessageInputContext.d.ts +4 -4
- package/dist/esm/context/ThemeContext.js +1 -0
- package/dist/esm/context/UIKitContext.d.ts +25 -0
- package/dist/esm/context/UIKitContext.js +1 -0
- package/dist/esm/context/UIManagerContext.d.ts +46 -0
- package/dist/esm/context/UIManagerContext.js +1 -0
- package/dist/esm/hooks/useConversation.d.ts +2 -2
- package/dist/esm/index.css +1 -2
- package/dist/esm/index.d.css +1345 -1547
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.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/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 +5 -3
- 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/styles/index.scss +11 -4
- package/src/components/Checkbox/styles/color.scss +17 -6
- package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +4 -4
- package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +3 -2
- package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +5 -5
- package/src/components/ConversationCreate/styles/ConversationCreatGroupDetail.scss +7 -16
- 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 +30 -17
- package/src/components/ConversationPreview/ConversationPreview.tsx +21 -21
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -2
- package/src/components/ConversationPreview/styles/index.scss +20 -20
- package/src/components/ConversationPreview/utils.tsx +3 -2
- package/src/components/DivWithEdit/styles/index.scss +30 -10
- package/src/components/Icon/config.ts +14 -4
- package/src/components/Icon/images/video-call.svg +3 -0
- package/src/components/Icon/images/voice-call.svg +3 -0
- package/src/components/Icon/type.ts +2 -0
- package/src/components/Input/styles/index.scss +22 -6
- package/src/components/Plugins/styles/color.scss +3 -11
- package/src/components/Profile/styles/index.scss +12 -3
- package/src/components/TUIChat/TUIChat.tsx +40 -35
- package/src/components/TUIChat/TUIChatState.tsx +41 -41
- package/src/components/TUIChat/index.ts +3 -0
- package/src/components/TUIChat/server.ts +44 -0
- package/src/components/TUIChat/styles/layout.scss +7 -2
- package/src/components/TUIChat/utils.ts +72 -0
- package/src/components/TUIChatHeader/TUIChatHeader.tsx +10 -7
- package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +74 -31
- package/src/components/TUIChatHeader/styles/layout.scss +16 -9
- package/src/components/TUIContact/TUIContact.tsx +2 -2
- package/src/components/TUIContact/TUIContactInfo/TUIContactInfo.tsx +2 -2
- package/src/components/TUIContact/TUIContactInfo/basicInfo.tsx +2 -2
- package/src/components/TUIContact/TUIContactInfo/blockInfo.tsx +2 -2
- package/src/components/TUIContact/TUIContactInfo/friendApplication.tsx +2 -2
- package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +4 -3
- package/src/components/TUIContact/TUIContactInfo/groupInfo.tsx +3 -3
- package/src/components/TUIContact/TUIContactInfo/hooks/useContactInfo.tsx +2 -2
- package/src/components/TUIContact/TUIContactInfo/index.scss +44 -21
- package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +80 -76
- package/src/components/TUIContact/TUIContactList/index.scss +40 -20
- package/src/components/TUIContact/hooks/useTUIContact.tsx +5 -5
- package/src/components/TUIContact/index.scss +30 -11
- package/src/components/TUIContactSearch/TUIContactSearch.tsx +2 -2
- package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +2 -2
- package/src/components/TUIContactSearch/index.scss +12 -3
- package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
- package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +2 -2
- package/src/components/TUIConversationList/index.scss +3 -4
- package/src/components/TUIManage/TUIManage.tsx +3 -3
- package/src/components/TUIManage/styles/index.scss +20 -14
- package/src/components/TUIMessage/MessageAvatar.tsx +7 -7
- package/src/components/TUIMessage/MessageBubble.tsx +22 -21
- package/src/components/TUIMessage/MessageCustom.tsx +26 -5
- package/src/components/TUIMessage/MessageStatus.tsx +7 -7
- package/src/components/TUIMessage/MessageText.tsx +16 -15
- package/src/components/TUIMessage/hooks/useMessageHandler.ts +8 -8
- package/src/components/TUIMessage/hooks/useMessageReply.ts +8 -7
- package/src/components/TUIMessage/styles/color.scss +6 -5
- package/src/components/TUIMessage/styles/layout.scss +111 -42
- package/src/components/TUIMessage/utils/index.ts +23 -12
- package/src/components/TUIMessageInput/InputPluginsDefalut.tsx +12 -12
- package/src/components/TUIMessageInput/TUIMessageInput.tsx +1 -1
- package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +7 -6
- package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +14 -14
- package/src/components/TUIMessageInput/hooks/useUploadPicker.tsx +4 -4
- package/src/components/TUIMessageInput/styles/color.scss +15 -11
- package/src/components/TUIMessageInput/styles/layout.scss +33 -17
- package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +15 -11
- package/src/components/TUIMessageList/styles/layout.scss +16 -9
- package/src/components/TUIProfile/TUIProfile.tsx +3 -3
- package/src/components/TUIProfile/TUIProfileDefault.tsx +14 -13
- package/src/components/TUIProfile/styles/color.scss +6 -5
- package/src/components/TUIProfile/styles/layout.scss +16 -14
- package/src/components/index.ts +0 -1
- package/src/components/{untils.ts → utils.ts} +5 -4
- package/src/context/LanguageContext.tsx +60 -0
- package/src/context/TUIChatActionContext.tsx +14 -13
- package/src/context/ThemeContext.tsx +68 -0
- package/src/context/UIKitContext.tsx +76 -0
- package/src/context/UIManagerContext.tsx +163 -0
- package/src/context/index.ts +3 -2
- package/src/locales/en-US/index.ts +0 -3
- package/src/locales/index.ts +6 -2
- 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 +32 -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 +33 -22
- package/src/styles/normalize.scss +6 -0
- package/dist/cjs/components/Icon/images/chats-selected.svg.js +0 -1
- package/dist/cjs/components/Icon/images/chats.svg.js +0 -1
- package/dist/cjs/components/Icon/images/contacts-selected.svg.js +0 -1
- package/dist/cjs/components/Icon/images/contacts.svg.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/unitls.js +0 -1
- package/dist/cjs/components/TUIKit/TUIKit.d.ts +0 -12
- package/dist/cjs/components/TUIKit/TUIKit.js +0 -1
- package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
- package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
- package/dist/cjs/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
- package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +0 -1
- package/dist/cjs/context/TUIKitContext.d.ts +0 -25
- package/dist/cjs/context/TUIKitContext.js +0 -1
- package/dist/esm/components/Icon/images/chats-selected.svg.js +0 -1
- package/dist/esm/components/Icon/images/chats.svg.js +0 -1
- package/dist/esm/components/Icon/images/contacts-selected.svg.js +0 -1
- package/dist/esm/components/Icon/images/contacts.svg.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/unitls.js +0 -1
- package/dist/esm/components/TUIKit/TUIKit.d.ts +0 -12
- package/dist/esm/components/TUIKit/TUIKit.js +0 -1
- package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +0 -21
- package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.js +0 -1
- package/dist/esm/components/TUIKit/hooks/useTUIKit.d.ts +0 -43
- package/dist/esm/components/TUIKit/hooks/useTUIKit.js +0 -1
- package/dist/esm/components/untils.js +0 -1
- package/dist/esm/context/TUIKitContext.d.ts +0 -25
- package/dist/esm/context/TUIKitContext.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/TUIChat/unitls.ts +0 -39
- package/src/components/TUIKit/TUIKit.tsx +0 -229
- package/src/components/TUIKit/hooks/useCreateTUIKitContext.tsx +0 -48
- package/src/components/TUIKit/hooks/useTUIKit.tsx +0 -99
- package/src/components/TUIKit/index.ts +0 -3
- package/src/components/TUIKit/styles/h5.scss +0 -34
- package/src/components/TUIKit/styles/index.scss +0 -132
- package/src/context/TUIKitContext.tsx +0 -44
- 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
|
@@ -8,40 +8,47 @@
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
|
|
10
10
|
@include theme() {
|
|
11
|
-
background-color: get(bg-
|
|
11
|
+
background-color: get(bg-color-operate);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&-left {
|
|
15
15
|
display: flex;
|
|
16
16
|
align-items: center;
|
|
17
17
|
}
|
|
18
|
+
|
|
18
19
|
.header-content {
|
|
19
20
|
flex: 1;
|
|
20
21
|
padding: 0 8px;
|
|
21
22
|
}
|
|
23
|
+
|
|
24
|
+
.call-btn-container {
|
|
25
|
+
display: flex;
|
|
26
|
+
margin-right: 10px;
|
|
27
|
+
|
|
28
|
+
.call-btn {
|
|
29
|
+
margin-right: 16px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
22
33
|
&-right {
|
|
23
34
|
.header-handle {
|
|
24
35
|
&-more {
|
|
25
|
-
|
|
36
|
+
padding: 10px 3px;
|
|
26
37
|
}
|
|
27
38
|
}
|
|
28
39
|
}
|
|
40
|
+
|
|
29
41
|
.title {
|
|
30
|
-
font-family: PingFangSC-Medium;
|
|
31
42
|
font-style: normal;
|
|
32
43
|
font-weight: 700;
|
|
33
44
|
font-size: 14px;
|
|
34
45
|
|
|
35
46
|
@include theme() {
|
|
36
|
-
color: get(text-primary);
|
|
47
|
+
color: get(text-color-primary);
|
|
37
48
|
}
|
|
38
|
-
|
|
39
49
|
}
|
|
50
|
+
|
|
40
51
|
.system {
|
|
41
52
|
height: 32px;
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
|
-
|
|
45
|
-
.tui-chat-live-header {
|
|
46
|
-
|
|
47
|
-
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TUIContactContextValue,
|
|
6
6
|
} from '../../context/TUIContactContext';
|
|
7
7
|
import { isH5 } from '../../utils/env';
|
|
8
|
-
import {
|
|
8
|
+
import { useUIManager } from '../../context';
|
|
9
9
|
import useTUIContact from './hooks/useTUIContact';
|
|
10
10
|
import { TUIContactList } from './TUIContactList/TUIContactList';
|
|
11
11
|
import { TUIContactSearch } from '../TUIContactSearch/TUIContactSearch';
|
|
@@ -17,7 +17,7 @@ export function UnMemoizedTUIContact<T>(
|
|
|
17
17
|
): React.ReactElement {
|
|
18
18
|
const { children } = props;
|
|
19
19
|
const { t } = useTranslation();
|
|
20
|
-
const { setActiveContact } =
|
|
20
|
+
const { setActiveContact } = useUIManager('TUIContact');
|
|
21
21
|
const [isShowAddFriend, setShowAddFriend] = useState(false);
|
|
22
22
|
const addFriend = () => {
|
|
23
23
|
setActiveContact();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {
|
|
2
2
|
PropsWithChildren,
|
|
3
3
|
} from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManager } from '../../../context';
|
|
5
5
|
import { isH5 } from '../../../utils/env';
|
|
6
6
|
import { FriendInfo } from './friendInfo';
|
|
7
7
|
import { BlockInfo } from './blockInfo';
|
|
@@ -18,7 +18,7 @@ export function UnMemoizedTUIContactInfo<T extends TUIContactInfoProps>(
|
|
|
18
18
|
props: PropsWithChildren<T>,
|
|
19
19
|
): React.ReactElement {
|
|
20
20
|
const { showChats } = props;
|
|
21
|
-
const { contactData } =
|
|
21
|
+
const { contactData } = useUIManager('TUIContact');
|
|
22
22
|
if (!contactData?.type) {
|
|
23
23
|
return (<> </>);
|
|
24
24
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Profile } from '@tencentcloud/chat';
|
|
4
4
|
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import {
|
|
5
|
+
import { useUIManager } from '../../../context';
|
|
6
6
|
import { Icon, IconTypes } from '../../Icon';
|
|
7
7
|
import { isH5 } from '../../../utils/env';
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ export function UnMemoizedBasicInfo<T extends Props>(
|
|
|
19
19
|
const {
|
|
20
20
|
userID, nick, selfSignature, avatar,
|
|
21
21
|
} = profile;
|
|
22
|
-
const { setActiveContact } =
|
|
22
|
+
const { setActiveContact } = useUIManager('TUIContact');
|
|
23
23
|
const back = () => {
|
|
24
24
|
TUIConversationService.switchConversation('');
|
|
25
25
|
setActiveContact();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Profile } from '@tencentcloud/chat';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManager } from '../../../context';
|
|
5
5
|
import { BasicInfo } from './basicInfo';
|
|
6
6
|
import { Switch } from '../../Switch';
|
|
7
7
|
import useContactInfo from './hooks/useContactInfo';
|
|
@@ -13,7 +13,7 @@ export function UnMemoizedBlockInfo<T extends Props>(
|
|
|
13
13
|
props: T,
|
|
14
14
|
): React.ReactElement {
|
|
15
15
|
const { profile } = props;
|
|
16
|
-
const { contactData, setActiveContact } =
|
|
16
|
+
const { contactData, setActiveContact } = useUIManager('TUIContact');
|
|
17
17
|
const { t } = useTranslation();
|
|
18
18
|
const [isAddToBlocklist, setIsAddToBlocklist] = useState(false);
|
|
19
19
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import TencentCloudChat, { FriendApplication } from '@tencentcloud/chat';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManager } from '../../../context';
|
|
5
5
|
import { Avatar, defaultUserAvatar } from '../../Avatar';
|
|
6
6
|
import useContactInfo from './hooks/useContactInfo';
|
|
7
7
|
|
|
@@ -11,7 +11,7 @@ interface Props {
|
|
|
11
11
|
export function UnMemoizedFriendApplication<T extends Props>(
|
|
12
12
|
props: T,
|
|
13
13
|
): React.ReactElement {
|
|
14
|
-
const { setActiveContact } =
|
|
14
|
+
const { setActiveContact } = useUIManager('TUIContact');
|
|
15
15
|
const { t } = useTranslation();
|
|
16
16
|
const { application } = props;
|
|
17
17
|
const {
|
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { Friend } from '@tencentcloud/chat';
|
|
4
4
|
import { TUIConversationService, IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import {
|
|
5
|
+
import { useUIKit, useUIManager } from '../../../context';
|
|
6
6
|
import { BasicInfo } from './basicInfo';
|
|
7
7
|
import { Switch } from '../../Switch';
|
|
8
8
|
import useContactInfo from './hooks/useContactInfo';
|
|
@@ -16,9 +16,10 @@ interface Props {
|
|
|
16
16
|
export function UnMemoizedFriendInfo<T extends Props>(
|
|
17
17
|
props: T,
|
|
18
18
|
): React.ReactElement {
|
|
19
|
+
const { chat } = useUIKit();
|
|
19
20
|
const {
|
|
20
|
-
|
|
21
|
-
} =
|
|
21
|
+
contactData, setActiveContact, setActiveConversation,
|
|
22
|
+
} = useUIManager('TUIContact');
|
|
22
23
|
const { t } = useTranslation();
|
|
23
24
|
const { friend, showChats } = props;
|
|
24
25
|
const { userID, profile, remark } = friend;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { TUIConversationService, IGroupModel, IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManager } from '../../../context';
|
|
5
5
|
import { Icon, IconTypes } from '../../Icon';
|
|
6
6
|
import { isH5 } from '../../../utils/env';
|
|
7
7
|
import '../index.scss';
|
|
@@ -16,8 +16,8 @@ export function UnMemoizedGroupInfo<T extends Props>(
|
|
|
16
16
|
props: T,
|
|
17
17
|
): React.ReactElement {
|
|
18
18
|
const { group, showChats } = props;
|
|
19
|
-
|
|
20
|
-
const { setActiveContact, setActiveConversation } =
|
|
19
|
+
|
|
20
|
+
const { setActiveContact, setActiveConversation } = useUIManager('TUIContact');
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
const { groupID, name, avatar } = group;
|
|
23
23
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
3
3
|
import { Toast } from '../../../Toast';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIKit } from '../../../../context';
|
|
5
5
|
|
|
6
6
|
function useContactInfo() {
|
|
7
|
-
const { chat } =
|
|
7
|
+
const { chat } = useUIKit('useContactInfo');
|
|
8
8
|
|
|
9
9
|
const removeFromBlocklist = useCallback((userID: string) => {
|
|
10
10
|
chat.removeFromBlacklist({
|
|
@@ -1,55 +1,77 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-contact-info {
|
|
2
4
|
width: 100%;
|
|
3
5
|
height: 100%;
|
|
4
6
|
display: flex;
|
|
5
7
|
padding: 60px;
|
|
6
|
-
box-sizing: border-box;
|
|
7
8
|
flex-direction: column;
|
|
8
9
|
overflow: hidden;
|
|
10
|
+
|
|
11
|
+
@include theme() {
|
|
12
|
+
background-color: get(bg-color-operate);
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
.tui-contact-info-header {
|
|
10
16
|
padding-bottom: 15px;
|
|
11
17
|
border-bottom: 1px solid #ddd;
|
|
12
18
|
overflow: hidden;
|
|
13
19
|
box-sizing: border-box;
|
|
14
20
|
width: 100%;
|
|
21
|
+
|
|
15
22
|
.header-container {
|
|
16
23
|
flex: 1;
|
|
24
|
+
|
|
17
25
|
.header-container-avatar {
|
|
18
26
|
display: flex;
|
|
19
27
|
align-items: center;
|
|
20
28
|
padding: 10px;
|
|
21
29
|
}
|
|
30
|
+
|
|
22
31
|
.header-container-name {
|
|
23
32
|
font-size: 24px;
|
|
24
33
|
padding: 15px;
|
|
34
|
+
|
|
35
|
+
@include theme() {
|
|
36
|
+
color: get(text-color-primary);
|
|
37
|
+
}
|
|
25
38
|
}
|
|
39
|
+
|
|
26
40
|
.header-container-text {
|
|
41
|
+
margin-top: 20px;
|
|
27
42
|
font-size: 16px;
|
|
28
|
-
line-height: 50px;
|
|
29
|
-
font-weight: 400;
|
|
30
|
-
color: #999999;
|
|
31
43
|
word-break: break-all;
|
|
44
|
+
|
|
45
|
+
@include theme() {
|
|
46
|
+
color: get(text-color-secondary);
|
|
47
|
+
}
|
|
32
48
|
}
|
|
33
49
|
}
|
|
34
50
|
}
|
|
51
|
+
|
|
35
52
|
.tui-contact-info-content {
|
|
36
53
|
padding: 15px 0;
|
|
37
54
|
overflow: hidden;
|
|
55
|
+
|
|
56
|
+
@include theme() {
|
|
57
|
+
color: get(text-color-secondary);
|
|
58
|
+
}
|
|
59
|
+
|
|
38
60
|
.content-item {
|
|
39
61
|
display: flex;
|
|
40
62
|
flex-direction: row;
|
|
41
63
|
align-items: center;
|
|
42
64
|
padding: 6px 0;
|
|
43
65
|
font-size: 16px;
|
|
44
|
-
font-weight: 400;
|
|
45
66
|
min-height: 56px;
|
|
46
67
|
}
|
|
68
|
+
|
|
47
69
|
.content-item-wording {
|
|
48
70
|
padding: 6px 0;
|
|
49
71
|
font-size: 16px;
|
|
50
|
-
font-weight: 400;
|
|
51
72
|
min-height: 56px;
|
|
52
73
|
}
|
|
74
|
+
|
|
53
75
|
.content-item-wording-text {
|
|
54
76
|
margin-top: 5px;
|
|
55
77
|
flex: 1;
|
|
@@ -61,53 +83,54 @@
|
|
|
61
83
|
height: 100px;
|
|
62
84
|
width: 95%;
|
|
63
85
|
}
|
|
86
|
+
|
|
64
87
|
.content-item-label {
|
|
65
|
-
color: #999;
|
|
66
88
|
margin-right: 5px;
|
|
67
89
|
}
|
|
90
|
+
|
|
68
91
|
.content-item-text {
|
|
69
92
|
flex: 1;
|
|
70
93
|
display: flex;
|
|
71
94
|
flex-direction: row;
|
|
72
|
-
color: #333;
|
|
73
95
|
overflow: hidden;
|
|
74
96
|
}
|
|
97
|
+
|
|
75
98
|
.content-btn-container {
|
|
76
99
|
display: flex;
|
|
77
100
|
padding: 30px;
|
|
78
101
|
justify-content: center;
|
|
102
|
+
|
|
79
103
|
.content-item-btn {
|
|
80
104
|
margin: 15px;
|
|
81
|
-
width: 122px;
|
|
82
|
-
height: 26px;
|
|
83
105
|
padding: 8px 20px;
|
|
84
106
|
border-radius: 25px;
|
|
85
107
|
border: none;
|
|
86
108
|
font-size: 14px;
|
|
87
109
|
text-align: center;
|
|
88
|
-
line-height: 26px;
|
|
89
|
-
font-weight: 400;
|
|
90
110
|
letter-spacing: 0;
|
|
91
111
|
min-width: 100px;
|
|
92
112
|
cursor: pointer;
|
|
93
113
|
-webkit-user-select: none;
|
|
94
114
|
user-select: none;
|
|
95
115
|
}
|
|
116
|
+
|
|
96
117
|
.delete-btn {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
118
|
+
@include theme() {
|
|
119
|
+
color: get(text-color-error);
|
|
120
|
+
border: 1px solid get(border-color-error);
|
|
121
|
+
}
|
|
100
122
|
}
|
|
123
|
+
|
|
101
124
|
.confirm-btn {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
125
|
+
@include theme() {
|
|
126
|
+
color: #fff;
|
|
127
|
+
background-color: get(text-color-link);
|
|
128
|
+
}
|
|
105
129
|
}
|
|
106
|
-
|
|
107
130
|
}
|
|
108
131
|
}
|
|
109
132
|
}
|
|
133
|
+
|
|
110
134
|
.tui-contact-info-h5 {
|
|
111
135
|
padding: 8px;
|
|
112
|
-
|
|
113
|
-
}
|
|
136
|
+
}
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
4
4
|
import { isH5 } from '../../../utils/env';
|
|
5
|
-
import {
|
|
5
|
+
import { useUIManager, useTUIContactContext } from '../../../context';
|
|
6
6
|
import useContactInfo from '../TUIContactInfo/hooks/useContactInfo';
|
|
7
7
|
import useTUIContact from '../hooks/useTUIContact';
|
|
8
8
|
import { Avatar, defaultUserAvatar } from '../../Avatar';
|
|
@@ -11,15 +11,15 @@ import downArrow from '../../Icon/images/down-arrow.png';
|
|
|
11
11
|
import './index.scss';
|
|
12
12
|
|
|
13
13
|
interface RenderContactListProps {
|
|
14
|
-
type: 'group' | 'block' | 'friend'
|
|
15
|
-
isShow: boolean
|
|
16
|
-
title: string
|
|
17
|
-
list:
|
|
18
|
-
setShow: (value: boolean) => void
|
|
14
|
+
type: 'group' | 'block' | 'friend';
|
|
15
|
+
isShow: boolean;
|
|
16
|
+
title: string;
|
|
17
|
+
list: any[] | undefined;
|
|
18
|
+
setShow: (value: boolean) => void;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function UnMemoizedTUIContactList<T>(): React.ReactElement {
|
|
22
|
-
const { setActiveContact } =
|
|
22
|
+
const { setActiveContact } = useUIManager();
|
|
23
23
|
const { t } = useTranslation();
|
|
24
24
|
const {
|
|
25
25
|
isShowContactList, friendList, blocklistProfile, friendApplicationList,
|
|
@@ -39,21 +39,23 @@ function UnMemoizedTUIContactList<T>(): React.ReactElement {
|
|
|
39
39
|
setActiveContact();
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
const RenderContactList = ({ type, isShow, setShow, list, title }
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
const RenderContactList = ({ type, isShow, setShow, list, title }: RenderContactListProps) => {
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<div
|
|
46
|
+
className="tui-contacts-title"
|
|
47
|
+
role="button"
|
|
48
|
+
tabIndex={0}
|
|
49
|
+
onClick={() => setShow(!isShow)}
|
|
50
|
+
>
|
|
51
|
+
<div className="tui-contacts-list-title">{title}</div>
|
|
52
|
+
<div className="tui-contacts-list-icon">
|
|
53
|
+
{isShow
|
|
54
|
+
? <i className="iconfont contacts-list-icon"></i>
|
|
55
|
+
: <i className="iconfont contacts-list-icon"></i>}
|
|
56
|
+
</div>
|
|
54
57
|
</div>
|
|
55
|
-
|
|
56
|
-
{isShow
|
|
58
|
+
{isShow
|
|
57
59
|
&& list?.map((item: any) => {
|
|
58
60
|
const { userID, groupID, avatar, name, nick } = item.profile || item;
|
|
59
61
|
const showName = item.remark || nick || userID || name || groupID;
|
|
@@ -74,9 +76,9 @@ const RenderContactList = ({ type, isShow, setShow, list, title } : RenderContac
|
|
|
74
76
|
</div>
|
|
75
77
|
);
|
|
76
78
|
})}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
79
|
+
</>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
80
82
|
// eslint-disable-next-line
|
|
81
83
|
// @ts-ignore
|
|
82
84
|
return (
|
|
@@ -90,75 +92,77 @@ const RenderContactList = ({ type, isShow, setShow, list, title } : RenderContac
|
|
|
90
92
|
>
|
|
91
93
|
<p className="tui-contacts-list-title">{t('TUIContact.New Contacts')}</p>
|
|
92
94
|
<div className="tui-contacts-list-icon">
|
|
93
|
-
|
|
95
|
+
{iShowFriendApplication
|
|
96
|
+
? <i className="iconfont contacts-list-icon"></i>
|
|
97
|
+
: <i className="iconfont contacts-list-icon"></i>}
|
|
94
98
|
</div>
|
|
95
99
|
</div>
|
|
96
100
|
{iShowFriendApplication
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
101
|
+
&& friendApplicationList?.map((item, index) => {
|
|
102
|
+
const {
|
|
103
|
+
userID, avatar, nick, wording, type,
|
|
104
|
+
} = item;
|
|
105
|
+
return (
|
|
106
|
+
<div
|
|
107
|
+
role="button"
|
|
108
|
+
tabIndex={0}
|
|
109
|
+
className="tui-contacts-list-item"
|
|
110
|
+
key={userID}
|
|
111
|
+
onClick={(e) => {
|
|
112
|
+
e.stopPropagation();
|
|
113
|
+
setActiveContact({
|
|
114
|
+
type: 'friendApplication',
|
|
115
|
+
data: item,
|
|
116
|
+
});
|
|
117
|
+
}}
|
|
118
|
+
>
|
|
119
|
+
<Avatar size={30} image={avatar || defaultUserAvatar} />
|
|
120
|
+
<div className="tui-contacts-list-item-card">
|
|
121
|
+
<div>
|
|
122
|
+
<p className="tui-contacts-list-item-name text-ellipsis">
|
|
123
|
+
{nick || userID}
|
|
124
|
+
</p>
|
|
125
|
+
{wording !== '' && (
|
|
126
|
+
<p className="tui-contacts-list-item-text text-ellipsis">
|
|
127
|
+
{wording}
|
|
120
128
|
</p>
|
|
121
|
-
{wording !== '' && (
|
|
122
|
-
<p className="tui-contacts-list-item-text text-ellipsis">
|
|
123
|
-
{wording}
|
|
124
|
-
</p>
|
|
125
|
-
)}
|
|
126
|
-
</div>
|
|
127
|
-
{type === TencentCloudChat.TYPES.SNS_APPLICATION_SENT_BY_ME && (
|
|
128
|
-
<p className="tui-contacts-list-btn-text text-ellipsis">{t('TUIContact.waiting for verification')}</p>
|
|
129
|
-
)}
|
|
130
|
-
{type === TencentCloudChat.TYPES.SNS_APPLICATION_SENT_TO_ME && (
|
|
131
|
-
<div
|
|
132
|
-
className="application-btn"
|
|
133
|
-
role="button"
|
|
134
|
-
tabIndex={0}
|
|
135
|
-
onClick={(e) => {
|
|
136
|
-
acceptFriendApplicationHandle(e, userID);
|
|
137
|
-
}}
|
|
138
|
-
>
|
|
139
|
-
{t('TUIContact.Agree')}
|
|
140
|
-
</div>
|
|
141
129
|
)}
|
|
142
130
|
</div>
|
|
131
|
+
{type === TencentCloudChat.TYPES.SNS_APPLICATION_SENT_BY_ME && (
|
|
132
|
+
<p className="tui-contacts-list-btn-text text-ellipsis">{t('TUIContact.waiting for verification')}</p>
|
|
133
|
+
)}
|
|
134
|
+
{type === TencentCloudChat.TYPES.SNS_APPLICATION_SENT_TO_ME && (
|
|
135
|
+
<div
|
|
136
|
+
className="application-btn"
|
|
137
|
+
role="button"
|
|
138
|
+
tabIndex={0}
|
|
139
|
+
onClick={(e) => {
|
|
140
|
+
acceptFriendApplicationHandle(e, userID);
|
|
141
|
+
}}
|
|
142
|
+
>
|
|
143
|
+
{t('TUIContact.Agree')}
|
|
144
|
+
</div>
|
|
145
|
+
)}
|
|
143
146
|
</div>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
</div>
|
|
148
|
+
);
|
|
149
|
+
})}
|
|
150
|
+
<RenderContactList
|
|
151
|
+
type="block"
|
|
148
152
|
title={t('TUIContact.Blocked List')}
|
|
149
153
|
isShow={isShowBlocklist}
|
|
150
154
|
setShow={setShowBlocklist}
|
|
151
155
|
list={blocklistProfile}
|
|
152
156
|
/>
|
|
153
|
-
<RenderContactList
|
|
154
|
-
type=
|
|
157
|
+
<RenderContactList
|
|
158
|
+
type="group"
|
|
155
159
|
title={t('TUIContact.Group List')}
|
|
156
160
|
setShow={setShowGrouplist}
|
|
157
161
|
isShow={isShowGrouplist}
|
|
158
162
|
list={groupList}
|
|
159
163
|
/>
|
|
160
|
-
<RenderContactList
|
|
161
|
-
type=
|
|
164
|
+
<RenderContactList
|
|
165
|
+
type="friend"
|
|
162
166
|
title={t('TUIContact.Friends')}
|
|
163
167
|
setShow={setShowFriends}
|
|
164
168
|
isShow={iShowFriends}
|