@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
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export { ChatProps, TUIKit } from './components/TUIKit/TUIKit.js';
|
|
2
|
-
export { UseChatParams, UseContactParams, useTUIKit } from './components/TUIKit/hooks/useTUIKit.js';
|
|
3
|
-
export { useCreateTUIKitContext } from './components/TUIKit/hooks/useCreateTUIKitContext.js';
|
|
4
1
|
export { TUIConversation, UnMemoizedTUIConversation } from './components/TUIConversation/TUIConversation.js';
|
|
5
2
|
export { TUIConversationList, UnMemoTUIConversationList } from './components/TUIConversationList/TUIConversationList.js';
|
|
6
3
|
export { TUIChat } from './components/TUIChat/TUIChat.js';
|
|
7
|
-
export {
|
|
4
|
+
export { UIKitProvider, useUIKit } from './context/UIKitContext.js';
|
|
5
|
+
export { UIManagerContextType, UIManagerProvider, useUIManager } from './context/UIManagerContext.js';
|
|
8
6
|
export { TUIChatStateContext, TUIChatStateContextProvider, TUIChatStateContextValue, useTUIChatStateContext } from './context/TUIChatStateContext.js';
|
|
9
7
|
export { TUIChatActionContext, TUIChatActionContextValue, TUIChatActionProvider, useTUIChatActionContext } from './context/TUIChatActionContext.js';
|
|
10
8
|
export { TUIMessageContext, TUIMessageContextProvider, TUIMessageContextValue, messageShowType, useTUIMessageContext } from './context/TUIMessageContext.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./server.js";export{
|
|
1
|
+
import o from"./server.js";export{TUIConversation,UnMemoizedTUIConversation}from"./components/TUIConversation/TUIConversation.js";export{TUIConversationList,UnMemoTUIConversationList}from"./components/TUIConversationList/TUIConversationList.js";import"react";import"@tencentcloud/chat";import"@tencentcloud/chat-uikit-engine";import"./components/TUIChat/index.js";export{ConversationPreview}from"./components/ConversationPreview/ConversationPreview.js";export{ConversationPreviewContent,unMemoConversationPreviewContent}from"./components/ConversationPreview/ConversationPreviewContent.js";export{TUIChatHeader}from"./components/TUIChatHeader/TUIChatHeader.js";export{TUIChatHeaderDefault}from"./components/TUIChatHeader/TUIChatHeaderDefault.js";export{TUIMessageList}from"./components/TUIMessageList/TUIMessageList.js";export{TUIMessage}from"./components/TUIMessage/TUIMessage.js";export{MessagePlugins}from"./components/TUIMessage/MessagePlugins.js";export{MessageContext}from"./components/TUIMessage/MessageContext.js";export{TUIMessageInput}from"./components/TUIMessageInput/TUIMessageInput.js";export{TUIMessageInputDefault}from"./components/TUIMessageInput/TUIMessageInputDefault.js";export{InputPluginsDefalut}from"./components/TUIMessageInput/InputPluginsDefalut.js";export{TUIProfile}from"./components/TUIProfile/TUIProfile.js";export{TUIProfileDefault}from"./components/TUIProfile/TUIProfileDefault.js";export{Avatar}from"./components/Avatar/Avatar.js";export{defaultGroupAvatarAVChatRoom,defaultGroupAvatarMeeting,defaultGroupAvatarPublic,defaultGroupAvatarWork,defaultUserAvatar}from"./components/Avatar/default.js";export{ConversationSearchInput}from"./components/ConversationSearch/ConversationSearchInput.js";export{ConversationSearchResult}from"./components/ConversationSearch/ConversationSearchResult.js";export{TUIManage}from"./components/TUIManage/TUIManage.js";export{Popup}from"./components/Popup/index.js";export{Checkbox}from"./components/Checkbox/index.js";export{DivWithEdit}from"./components/DivWithEdit/DivWithEdit.js";export{Icon,changeTypeToIconClassName}from"./components/Icon/Icon.js";export{IconTypes}from"./components/Icon/type.js";export{EmptyStateIndicator}from"./components/EmptyStateIndicator/EmptyStateIndicator.js";export{Input}from"./components/Input/Input.js";export{Model}from"./components/Model/index.js";export{Plugins}from"./components/Plugins/index.js";export{Switch}from"./components/Switch/Switch.js";export{Toast}from"./components/Toast/index.js";export{TUIContactList}from"./components/TUIContact/TUIContactList/TUIContactList.js";export{TUIContactInfo,UnMemoizedTUIContactInfo}from"./components/TUIContact/TUIContactInfo/TUIContactInfo.js";export{TUIContact,UnMemoizedTUIContact}from"./components/TUIContact/TUIContact.js";export{UIKitProvider,useUIKit}from"./context/UIKitContext.js";export{UIManagerProvider,useUIManager}from"./context/UIManagerContext.js";export{TUIChatStateContext,TUIChatStateContextProvider,useTUIChatStateContext}from"./context/TUIChatStateContext.js";export{TUIChatActionContext,TUIChatActionProvider,useTUIChatActionContext}from"./context/TUIChatActionContext.js";export{TUIMessageContext,TUIMessageContextProvider,messageShowType,useTUIMessageContext}from"./context/TUIMessageContext.js";export{ComponentContext,ComponentProvider,useComponentContext}from"./context/ComponentContext.js";export{TUIMessageInputContext,TUIMessageInputContextProvider,useTUIMessageInputContext}from"./context/TUIMessageInputContext.js";export{TUIContactContext,TUIContactContextProvider,useTUIContactContext}from"./context/TUIContactContext.js";export{useConversation}from"./hooks/useConversation.js";export{useProfile}from"./hooks/useProfile.js";export{t}from"./locales/index.js";export{isH5,isPC,setPlatform}from"./utils/env.js";export{TUIChat}from"./components/TUIChat/TUIChat.js";export{default as i18next}from"i18next";new o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import r from"./TUIConversation.js";import t from"./TUIContact.js";import
|
|
1
|
+
import o from"./TUIChat.js";import r from"./TUIConversation.js";import t from"./TUIContact.js";import i from"./TUIProfile.js";var m={TUIChat:o,TUIConversation:r,TUIContact:t,TUIProfile:i};export{m as message};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"i18next";export{default as i18next}from"i18next";import{initReactI18next as t}from"react-i18next";import{message as
|
|
1
|
+
import e from"i18next";export{default as i18next}from"i18next";import{initReactI18next as t}from"react-i18next";import{message as a}from"./en-US/index.js";import{message as r}from"./zh-CN/index.js";import{message as o}from"./ja-JP/index.js";import{message as s}from"./ko-KR/index.js";import{message as n}from"./zh-TW/index.js";var i={"en-US":{translation:a},"zh-CN":{translation:r},"ja-JP":{translation:o},"ko-KR":{translation:s},"zh-TW":{translation:n}};e.use(t).init({resources:i,lng:"en-US",interpolation:{escapeValue:!1}});var m=e.t;export{m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import
|
|
1
|
+
import o from"./TUIChat.js";import r from"./TUIConversation.js";import t from"./TUIContact.js";import i from"./TUIProfile.js";var m={TUIChat:o,TUIConversation:r,TUIContact:t,TUIProfile:i};export{m as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={Recall:"撤回",Reference:"引用",Forward:"轉發",Copy:"複製",Delete:"刪除","Forward to":"轉發給","recalled a message":"撤回了一條消息","Re-edit":"重新編輯",Resend:"重新發送",You:"您","Recent Chats":"會話紀錄","Frequently Contacted":"頻繁聯繫","No Result":"無結果","Search Result":"搜尋結果",Image:"圖片",Video:"影片",File:"檔案","Enter a message":"請輸入訊息","No More":"沒有了","Error deleting message":"刪除訊息失敗","The message recall exceeded the time limit (default 2 minutes)":"訊息撤回超時(預設 2 分鐘)","Error revoke Message":"訊息撤回失敗","Custom message":"自訂訊息"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Enter a userID":"請輸入用戶 ID,回車搜索","Enter the verification info":"請填寫驗證信息","Request to join":"申請加入",Requested:"已申請",Accept:"接受",Refuse:"拒絕",Handled:"已處理",Friends:"我的好友","Send Message":"發送消息",Signature:"個性簽名","Successful application, waiting for the administrator to agree to join the group application":"等待管理員同意","New Contacts":"新的聯繫人","Blocked List":"黑名單","Group List":"我的群聊","No Result":"無搜索結果",ID:"ID",User:"聯繫人","Add Friend":"添加好友",remark:"備註",block:"加入黑名單","Delete friend":"刪除好友","waiting for verification":"等待驗證","verification info":"驗證信息","Send application":"發送申請",Agree:"同意"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Start chat":"發起會話","New one-to-one chat":"發起單聊","New group chat":"發起群聊",Delete:"刪除會話",Pin:"置頂會話",Unpin:"取消置頂","Conversation Information":"會話資訊",Search:"搜尋","Add Participants":"創建群聊","No conversation":"無會話",Next:"下一步","Group Name":"群組名稱","Group ID":"群組 ID","Group Type":"群組類型",Participants:"成員",Create:"創建",Details:"詳情",Work:"好友工作群(Work)",Public:"陌生人社交群(Public)",Meeting:"臨時會議群(Meeting)",AVChatRoom:"直播群(AVChatroom)",Community:"社群(Community)","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.":"類似普通微信群,創建後僅支持已在群內的好友邀請加群,且無需被邀請方同意或群主同意。","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基礎設施。See the documentation for details.":"類似 QQ 群,創建後群主可以指定群管理員,用戶搜索群 ID 發起加群申請後,需要群主或管理員審批通過才能入群。","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.":"創建後可以隨意進出,且支持查看入群前消息;適合用於音視頻會議場景、在線教育場景等與即時音視頻產品結合的場景。","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.":"創建後可以隨意進出,沒有群成員數量上限,但不支持歷史消息存儲;適合與直播產品結合,用於彈幕聊天場景。","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.":"創建後可以隨意進出,最多支持100000人,支持歷史消息存儲,用戶搜索群 ID 發起加群申請後,無需管理員審批即可進群。","Participant cannot be empty":"不能為空"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Personal information":"個人信息",Signature:"個性簽名",Gender:"性別",Male:"男",Female:"女",AllowType:"加好友驗證方式",NeedConfirm:"需要驗證",AllowAny:"同意任何用戶加好友",DenyAny:"拒絕任何用戶加「好友」",Birthday:"生日",Unknown:"未設置"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./TUIChat.js";import r from"./TUIConversation.js";import t from"./TUIContact.js";import i from"./TUIProfile.js";var m={TUIChat:o,TUIConversation:r,TUIContact:t,TUIProfile:i};export{m as message};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/chat-uikit-react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.7",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"uikit"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "rimraf
|
|
19
|
-
"start": "
|
|
18
|
+
"build": "rimraf dist && rollup -c",
|
|
19
|
+
"start": "rimraf dist && rollup -c -w",
|
|
20
20
|
"clean": "rimraf -g ./dist node_modules examples/*/node_modules",
|
|
21
21
|
"prepare": "husky install"
|
|
22
22
|
},
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
|
43
43
|
"@typescript-eslint/parser": "^5.36.2",
|
|
44
44
|
"autoprefixer": "^10.4.11",
|
|
45
|
+
"cross-env": "^7.0.3",
|
|
45
46
|
"eslint": "^8.57.0",
|
|
46
47
|
"eslint-config-react-app": "^7.0.1",
|
|
47
48
|
"eslint-import-resolver-typescript": "^3.5.1",
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"typescript-eslint": "^7.16.0"
|
|
66
67
|
},
|
|
67
68
|
"dependencies": {
|
|
69
|
+
"@tencentcloud/call-uikit-react": "latest",
|
|
68
70
|
"@tencentcloud/chat": "latest",
|
|
69
71
|
"@tencentcloud/chat-uikit-engine": "latest",
|
|
70
72
|
"@tencentcloud/tui-core": "latest",
|
package/rollup.config.js
CHANGED
|
@@ -42,7 +42,7 @@ export default [
|
|
|
42
42
|
terser(),
|
|
43
43
|
],
|
|
44
44
|
external: ['react', 'date-fns', 'tslib', 'react-date-picker', 'i18next', 'react-i18next', '@tencentcloud/tui-core',
|
|
45
|
-
'@tencentcloud/chat', '@tencentcloud/chat-uikit-engine', '@tencentcloud/universal-api'],
|
|
45
|
+
'@tencentcloud/chat', '@tencentcloud/chat-uikit-engine', '@tencentcloud/universal-api', '@tencentcloud/call-uikit-react'],
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
...getBaseConfig(),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,29 +1,34 @@
|
|
|
1
|
-
.tui-kit-avatar{
|
|
1
|
+
.tui-kit-avatar {
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
position: relative;
|
|
5
5
|
cursor: pointer;
|
|
6
6
|
flex-shrink: 0;
|
|
7
|
+
|
|
7
8
|
&.circle .avatar-image {
|
|
8
9
|
border-radius: 50%;
|
|
9
10
|
}
|
|
11
|
+
|
|
10
12
|
&.square .avatar-image {
|
|
11
13
|
border-radius: 4px;
|
|
12
14
|
}
|
|
15
|
+
|
|
13
16
|
img {
|
|
14
17
|
width: 100%;
|
|
15
18
|
height: 100%;
|
|
16
19
|
}
|
|
20
|
+
|
|
17
21
|
&:hover {
|
|
18
22
|
.tui-kit-avatar-edit {
|
|
19
23
|
display: flex;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
26
|
+
|
|
22
27
|
&-edit {
|
|
23
28
|
position: absolute;
|
|
24
29
|
top: 0;
|
|
25
30
|
left: 0;
|
|
26
|
-
background: rgba(0, 0, 0,
|
|
31
|
+
background: rgba(0, 0, 0, 33%);
|
|
27
32
|
width: 100%;
|
|
28
33
|
height: 100%;
|
|
29
34
|
border-radius: 100%;
|
|
@@ -31,11 +36,12 @@
|
|
|
31
36
|
justify-content: center;
|
|
32
37
|
align-items: center;
|
|
33
38
|
}
|
|
39
|
+
|
|
34
40
|
&-list {
|
|
35
41
|
position: absolute;
|
|
36
42
|
z-index: 2;
|
|
37
43
|
top: 100%;
|
|
38
|
-
background: #
|
|
44
|
+
background: #fff;
|
|
39
45
|
border-radius: 5px;
|
|
40
46
|
box-shadow: 0 11px 20px 0 rgb(0, 0, 0.3);
|
|
41
47
|
display: flex;
|
|
@@ -45,12 +51,13 @@
|
|
|
45
51
|
min-width: 200px;
|
|
46
52
|
max-width: 400px;
|
|
47
53
|
padding: 10px;
|
|
54
|
+
|
|
48
55
|
&-item {
|
|
49
56
|
padding: 10px;
|
|
57
|
+
|
|
50
58
|
img {
|
|
51
59
|
width: 40px;
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
}
|
|
55
63
|
}
|
|
56
|
-
|
|
@@ -1,11 +1,22 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.info {
|
|
2
|
-
|
|
4
|
+
@include theme() {
|
|
5
|
+
background-color: get(bg-color-operate);
|
|
6
|
+
color: get(text-color-primary);
|
|
7
|
+
}
|
|
3
8
|
}
|
|
9
|
+
|
|
4
10
|
.warn {
|
|
5
|
-
|
|
6
|
-
|
|
11
|
+
@include theme() {
|
|
12
|
+
background-color: get(text-color-warning);
|
|
13
|
+
color: #fff;
|
|
14
|
+
}
|
|
7
15
|
}
|
|
16
|
+
|
|
8
17
|
.error {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
@include theme() {
|
|
19
|
+
background-color: get(text-color-error);
|
|
20
|
+
color: #fff;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../Avatar';
|
|
15
15
|
import { PageStateTypes } from './ConversationCreate';
|
|
16
16
|
import { ConversationGroupTypeInfo, GroupType, typeInfoList } from './ConversationGroupTypeInfo';
|
|
17
|
-
import {
|
|
17
|
+
import { useUIManager } from '../../context';
|
|
18
18
|
import { CreateGroupConversationParams } from '../../hooks';
|
|
19
19
|
|
|
20
20
|
export interface ConversationCreatGroupDetailProps {
|
|
@@ -30,7 +30,7 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
30
30
|
profileList, pageState, setPageState, createConversation, setConversationCreated,
|
|
31
31
|
} = props;
|
|
32
32
|
const { t } = useTranslation();
|
|
33
|
-
const { setActiveConversation, myProfile } =
|
|
33
|
+
const { setActiveConversation, myProfile } = useUIManager();
|
|
34
34
|
const temp = [...profileList];
|
|
35
35
|
myProfile && temp.unshift(myProfile);
|
|
36
36
|
const name = temp.map((item) => item.nick || item.userID).toString();
|
|
@@ -84,9 +84,9 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
84
84
|
name: groupName,
|
|
85
85
|
// eslint-disable-next-line
|
|
86
86
|
// @ts-ignore
|
|
87
|
-
type: GroupType[groupType],
|
|
87
|
+
type: GroupType[groupType],
|
|
88
88
|
groupID,
|
|
89
|
-
avatar,
|
|
89
|
+
avatar,
|
|
90
90
|
memberList,
|
|
91
91
|
});
|
|
92
92
|
setActiveConversation(conversation);
|
|
@@ -5,7 +5,7 @@ import { Conversation } from '@tencentcloud/chat';
|
|
|
5
5
|
import { Icon, IconTypes } from '../Icon';
|
|
6
6
|
import { ConversationCreateUserSelectList } from './ConversationCreateUserSelectList';
|
|
7
7
|
import { ConversationCreatGroupDetail } from './ConversationCreatGroupDetail';
|
|
8
|
-
import {
|
|
8
|
+
import { useUIKit } from '../../context';
|
|
9
9
|
import { useConversation } from '../../hooks';
|
|
10
10
|
|
|
11
11
|
export interface ConversationCreateProps {
|
|
@@ -24,7 +24,7 @@ export function ConversationCreate<T extends ConversationCreateProps>(props:T) {
|
|
|
24
24
|
const [isCreateGroup, setIsCreateGroup] = useState(false);
|
|
25
25
|
const [pageState, setPageState] = useState<PageStateTypes>(PageStateTypes.USER_SELECT);
|
|
26
26
|
const [selectList, setSelectList] = useState([]);
|
|
27
|
-
const { chat } =
|
|
27
|
+
const { chat } = useUIKit();
|
|
28
28
|
const { createConversation } = useConversation(chat);
|
|
29
29
|
|
|
30
30
|
const back = () => {
|
|
@@ -9,7 +9,7 @@ import { Icon, IconTypes } from '../Icon';
|
|
|
9
9
|
import { ConversationCreateSelectView, ConversationCreateSelectViewProps } from './ConversationCreateSelectView';
|
|
10
10
|
import { Avatar, defaultUserAvatar } from '../Avatar';
|
|
11
11
|
import { useConversationCreate } from './hooks/useConversationCreate';
|
|
12
|
-
import {
|
|
12
|
+
import { useUIKit, useUIManager } from '../../context';
|
|
13
13
|
import { PageStateTypes } from './ConversationCreate';
|
|
14
14
|
import { useConversation } from '../../hooks';
|
|
15
15
|
import { Toast } from '../Toast';
|
|
@@ -35,7 +35,8 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
35
35
|
} = props;
|
|
36
36
|
const { t } = useTranslation();
|
|
37
37
|
const [searchValue, setSearchValue] = useState('');
|
|
38
|
-
const { chat
|
|
38
|
+
const { chat } = useUIKit();
|
|
39
|
+
const { setActiveConversation } = useUIManager();
|
|
39
40
|
const [friendList, setFriendList] = useState<any>({});
|
|
40
41
|
const {
|
|
41
42
|
getFriendListSortSearchResult,
|
|
@@ -5,10 +5,10 @@ import { useProfile } from '../../../hooks';
|
|
|
5
5
|
|
|
6
6
|
export const useConversationCreate = (
|
|
7
7
|
chat: any,
|
|
8
|
-
conversationList:
|
|
9
|
-
setFriendListResultHandler?:(
|
|
8
|
+
conversationList: Conversation[],
|
|
9
|
+
setFriendListResultHandler?: (
|
|
10
10
|
newFriendListResult: object,
|
|
11
|
-
setFriendListResult: React.Dispatch<React.SetStateAction<{string:
|
|
11
|
+
setFriendListResult: React.Dispatch<React.SetStateAction<{ string: object[] }>>
|
|
12
12
|
) => void,
|
|
13
13
|
) => {
|
|
14
14
|
const [friendListSortResult, setFriendListSortResult] = useState<any>();
|
|
@@ -24,7 +24,7 @@ export const useConversationCreate = (
|
|
|
24
24
|
const frequentlyConversationProfile = conversationList.filter(
|
|
25
25
|
(item: Conversation) => item?.type === TencentCloudChat.TYPES.CONV_C2C,
|
|
26
26
|
).slice(0, 5).map((item: Conversation) => item?.userProfile);
|
|
27
|
-
const { code, data } = await chat
|
|
27
|
+
const { code, data } = await chat?.getFriendList() || {};
|
|
28
28
|
if (code === 0) {
|
|
29
29
|
const sortResult = handleData(
|
|
30
30
|
data.map((item: Friend) => item.profile),
|
|
@@ -36,7 +36,7 @@ export const useConversationCreate = (
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
const handleData = (profileList:
|
|
39
|
+
const handleData = (profileList: Profile[], frequentlyConversationProfile?: any) => {
|
|
40
40
|
const sortResult: any = {
|
|
41
41
|
'#': [],
|
|
42
42
|
};
|
|
@@ -1,39 +1,33 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-conversation-create-group-detail {
|
|
4
|
+
@include theme() {
|
|
5
|
+
color: get(text-color-primary);
|
|
6
|
+
}
|
|
7
|
+
|
|
2
8
|
.create-group-box {
|
|
3
9
|
padding: 10px 0;
|
|
4
10
|
}
|
|
5
11
|
|
|
6
12
|
.input-group-text {
|
|
7
|
-
font-weight: 400;
|
|
8
13
|
font-size: 14px;
|
|
9
|
-
font-family: PingFangSC-Medium;
|
|
10
|
-
line-height: 22px;
|
|
11
|
-
color: #000;
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
.create-group-name {
|
|
15
17
|
.input-group-name {
|
|
16
18
|
font-weight: 700;
|
|
17
19
|
font-size: 14px;
|
|
18
|
-
font-family: PingFangSC-Medium;
|
|
19
|
-
line-height: 19px;
|
|
20
|
-
color: #000;
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
.input-group-title {
|
|
25
|
-
color: rgba(0, 0, 0, 40%);
|
|
26
24
|
width: 106px;
|
|
27
25
|
font-size: 14px;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
.create-group-illustrate {
|
|
31
|
-
font-weight: 400;
|
|
32
29
|
font-size: 12px;
|
|
33
|
-
font-family: PingFangSC-Medium;
|
|
34
|
-
line-height: 17px;
|
|
35
30
|
text-align: justify;
|
|
36
|
-
color: rgba(0, 0, 0, 40%);
|
|
37
31
|
padding-left: 8px;
|
|
38
32
|
}
|
|
39
33
|
|
|
@@ -41,9 +35,6 @@
|
|
|
41
35
|
.create-group-portrait-title {
|
|
42
36
|
font-weight: 600;
|
|
43
37
|
font-size: 14px;
|
|
44
|
-
font-family: PingFangSC-Medium;
|
|
45
|
-
line-height: 20px;
|
|
46
|
-
color: #000;
|
|
47
38
|
padding: 20px 0 20px 8px;
|
|
48
39
|
}
|
|
49
40
|
|
|
@@ -52,6 +43,7 @@
|
|
|
52
43
|
flex-wrap: wrap;
|
|
53
44
|
justify-content: flex-start;
|
|
54
45
|
margin-bottom: 10px;
|
|
46
|
+
padding: 0 10px;
|
|
55
47
|
|
|
56
48
|
.create-group-portrait-info {
|
|
57
49
|
align-items: center;
|
|
@@ -63,7 +55,6 @@
|
|
|
63
55
|
|
|
64
56
|
&-nick {
|
|
65
57
|
font-size: 12px;
|
|
66
|
-
font-family: PingFangSC-Medium;
|
|
67
58
|
margin-top: 6px;
|
|
68
59
|
}
|
|
69
60
|
}
|
|
@@ -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
|
}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-conversation-create-header {
|
|
2
|
-
background-color: #f9fafb;
|
|
3
4
|
display: flex;
|
|
4
5
|
flex-direction: row;
|
|
5
6
|
padding: 16px 20px;
|
|
6
7
|
align-items: center;
|
|
7
8
|
text-align: center;
|
|
8
9
|
|
|
10
|
+
@include theme() {
|
|
11
|
+
background-color: get(bg-color-operate);
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
.title {
|
|
10
15
|
margin-left: 10px;
|
|
11
16
|
font-weight: 600;
|
|
12
17
|
font-size: 16px;
|
|
13
|
-
font-family: PingFangSC-Medium;
|
|
14
18
|
line-height: 32px;
|
|
15
19
|
letter-spacing: -0.41px;
|
|
16
|
-
|
|
20
|
+
|
|
21
|
+
@include theme() {
|
|
22
|
+
color: get(text-color-primary);
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
|
|
@@ -22,32 +29,35 @@
|
|
|
22
29
|
}
|
|
23
30
|
|
|
24
31
|
.tui-user {
|
|
25
|
-
padding:
|
|
32
|
+
padding: 6px;
|
|
26
33
|
display: flex;
|
|
27
34
|
align-items: center;
|
|
28
35
|
text-align: center;
|
|
29
36
|
cursor: pointer;
|
|
30
37
|
|
|
31
38
|
&:hover {
|
|
32
|
-
|
|
39
|
+
@include theme() {
|
|
40
|
+
background-color: get(list-color-hover);
|
|
41
|
+
}
|
|
33
42
|
}
|
|
34
43
|
|
|
35
44
|
.tui-user-name {
|
|
36
45
|
margin-left: 10px;
|
|
37
|
-
font-weight: 400;
|
|
38
46
|
font-size: 14px;
|
|
39
|
-
font-family: PingFangSC-Medium;
|
|
40
|
-
line-height: 20px;
|
|
41
|
-
color: #000;
|
|
42
47
|
width: 80%;
|
|
43
48
|
text-align: left;
|
|
44
49
|
|
|
50
|
+
@include theme() {
|
|
51
|
+
color: get(text-color-primary);
|
|
52
|
+
}
|
|
53
|
+
|
|
45
54
|
&.active {
|
|
46
55
|
font-weight: 600;
|
|
47
56
|
font-size: 14px;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
|
|
58
|
+
@include theme() {
|
|
59
|
+
color: get(text-color-link);
|
|
60
|
+
}
|
|
51
61
|
}
|
|
52
62
|
}
|
|
53
63
|
}
|
|
@@ -71,13 +81,14 @@
|
|
|
71
81
|
.tui-conversation-create-next {
|
|
72
82
|
cursor: pointer;
|
|
73
83
|
text-align: center;
|
|
74
|
-
background-color: rgba(3, 101, 249, 100%);
|
|
75
84
|
border-radius: 31px;
|
|
76
85
|
font-size: 14px;
|
|
77
|
-
font-family: PingFangSC-Medium;
|
|
78
|
-
line-height: 20px;
|
|
79
86
|
color: #fff;
|
|
80
87
|
padding: 12px 36px;
|
|
88
|
+
|
|
89
|
+
@include theme() {
|
|
90
|
+
background-color: get(text-color-link);
|
|
91
|
+
}
|
|
81
92
|
}
|
|
82
93
|
}
|
|
83
94
|
|
|
@@ -95,9 +106,11 @@
|
|
|
95
106
|
.title {
|
|
96
107
|
font-weight: 600;
|
|
97
108
|
font-size: 14px;
|
|
98
|
-
font-family: PingFangSC-Medium;
|
|
99
|
-
line-height: 20px;
|
|
100
109
|
padding: 10px;
|
|
110
|
+
|
|
111
|
+
@include theme() {
|
|
112
|
+
color: get(text-color-primary);
|
|
113
|
+
}
|
|
101
114
|
}
|
|
102
115
|
}
|
|
103
116
|
}
|