@tencentcloud/chat-uikit-react 2.2.4 → 2.2.6
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/.babelrc +2 -2
- package/.eslintrc.js +141 -31
- package/.lintstagedrc.json +1 -1
- package/.stylelintrc.js +17 -18
- package/CHANGELOG.md +19 -2
- package/README.md +8 -8
- 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/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 +12 -12
- package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.d.ts +5 -5
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +1 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +5 -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/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/context/ComponentContext.d.ts +12 -12
- package/dist/cjs/context/LanguageContext.js +1 -0
- package/dist/cjs/context/TUIChatActionContext.d.ts +3 -3
- 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 -1
- package/dist/cjs/index.d.css +984 -1039
- package/dist/cjs/index.d.ts +2 -4
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/TUIGlobal.js +1 -0
- package/dist/cjs/locales/en-US/index.js +1 -1
- package/dist/cjs/locales/ja-JP/TUIGlobal.js +1 -0
- package/dist/cjs/locales/ja-JP/index.js +1 -1
- package/dist/cjs/locales/ko-KR/TUIGlobal.js +1 -0
- package/dist/cjs/locales/ko-KR/index.js +1 -1
- package/dist/cjs/locales/zh-CN/TUIGlobal.js +1 -0
- package/dist/cjs/locales/zh-CN/index.js +1 -1
- 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/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 +12 -12
- package/dist/esm/components/TUIChat/TUIChat.js +1 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.d.ts +5 -5
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +1 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.d.ts +5 -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/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/context/ComponentContext.d.ts +12 -12
- package/dist/esm/context/LanguageContext.js +1 -0
- package/dist/esm/context/TUIChatActionContext.d.ts +3 -3
- 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 -1
- package/dist/esm/index.d.css +984 -1039
- package/dist/esm/index.d.ts +2 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/TUIGlobal.js +1 -0
- package/dist/esm/locales/en-US/index.js +1 -1
- package/dist/esm/locales/ja-JP/TUIGlobal.js +1 -0
- package/dist/esm/locales/ja-JP/index.js +1 -1
- package/dist/esm/locales/ko-KR/TUIGlobal.js +1 -0
- package/dist/esm/locales/ko-KR/index.js +1 -1
- package/dist/esm/locales/zh-CN/TUIGlobal.js +1 -0
- package/dist/esm/locales/zh-CN/index.js +1 -1
- package/package.json +9 -7
- package/rollup.config.js +13 -2
- 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/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/styles/ConversationCreatGroupDetail.scss +16 -7
- package/src/components/ConversationCreate/styles/index.scss +23 -13
- package/src/components/ConversationPreview/ConversationPreview.tsx +21 -21
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -4
- package/src/components/ConversationPreview/styles/index.scss +44 -14
- package/src/components/ConversationPreview/utils.tsx +36 -28
- package/src/components/Input/styles/index.scss +7 -5
- package/src/components/Model/styles/layout.scss +3 -3
- package/src/components/Plugins/styles/color.scss +17 -3
- package/src/components/Popup/styles/layout.scss +2 -1
- package/src/components/TUIChat/TUIChat.tsx +4 -3
- package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +3 -3
- package/src/components/TUIChatHeader/styles/layout.scss +13 -2
- 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/TUIContactList/TUIContactList.tsx +5 -5
- package/src/components/TUIContact/hooks/useTUIContact.tsx +2 -2
- package/src/components/TUIContactSearch/TUIContactSearch.tsx +2 -2
- package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +2 -2
- package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
- package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +2 -2
- package/src/components/TUIConversationList/index.scss +25 -7
- package/src/components/TUIManage/TUIManage.tsx +3 -3
- package/src/components/TUIManage/styles/index.scss +16 -6
- package/src/components/TUIMessage/MessageStatus.tsx +2 -2
- package/src/components/TUIMessage/MessageText.tsx +16 -15
- package/src/components/TUIMessage/hooks/useMessageHandler.ts +2 -2
- package/src/components/TUIMessage/hooks/useMessageReply.ts +2 -2
- package/src/components/TUIMessage/styles/color.scss +20 -9
- package/src/components/TUIMessage/styles/layout.scss +44 -11
- package/src/components/TUIMessageInput/TUIMessageInput.tsx +1 -1
- package/src/components/TUIMessageInput/hooks/useHandleForwardMessage.tsx +2 -2
- package/src/components/TUIMessageInput/hooks/useMessageInputText.tsx +2 -2
- package/src/components/TUIMessageInput/styles/color.scss +25 -6
- package/src/components/TUIMessageInput/styles/layout.scss +58 -16
- package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +2 -2
- package/src/components/TUIMessageList/styles/layout.scss +16 -2
- package/src/components/TUIProfile/TUIProfile.tsx +3 -3
- package/src/components/TUIProfile/TUIProfileDefault.tsx +2 -2
- package/src/components/TUIProfile/styles/layout.scss +33 -16
- package/src/components/index.ts +0 -1
- package/src/context/LanguageContext.tsx +59 -0
- package/src/context/ThemeContext.tsx +61 -0
- package/src/context/UIKitContext.tsx +67 -0
- package/src/context/UIManagerContext.tsx +163 -0
- package/src/context/index.ts +3 -2
- package/src/locales/en-US/index.ts +1 -1
- package/src/locales/ja-JP/index.ts +2 -0
- package/src/locales/ko-KR/TUIGlobal.ts +2 -2
- package/src/locales/ko-KR/index.ts +2 -0
- package/src/locales/zh-CN/index.ts +2 -2
- package/src/styles/colors/_color-dark.scss +35 -0
- package/src/styles/colors/_color-light.scss +35 -0
- package/src/styles/colors/_color-theme.scss +54 -0
- package/src/styles/fonts/icon-font.scss +18 -0
- package/src/styles/index.scss +4 -0
- package/src/styles/normalize.scss +355 -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/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/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/context/TUIKitContext.d.ts +0 -25
- package/dist/esm/context/TUIKitContext.js +0 -1
- package/src/components/TUIKit/TUIKit.tsx +0 -228
- 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 -112
- package/src/components/TUIKit/styles/reset.scss +0 -67
- package/src/context/TUIKitContext.tsx +0 -39
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";export{TUIChat}from"./components/TUIChat/TUIChat.js";import"tslib";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{default as i18next}from"i18next";new o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={chats:"Messages",contacts:"Contacts"};export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./
|
|
1
|
+
import o from"./TUIGlobal.js";import r from"./TUIChat.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import I from"./TUIProfile.js";var T={TUIGlobal:o,TUIChat:r,TUIConversation:t,TUIContact:m,TUIProfile:I};export{T as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={chats:"メッセージ",contacts:"連絡先"};export{a as TUIGlobal,a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import
|
|
1
|
+
import{TUIGlobal as o}from"./TUIGlobal.js";import r from"./TUIChat.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import I from"./TUIProfile.js";var T={TUIGlobal:o,TUIChat:r,TUIConversation:t,TUIContact:m,TUIProfile:I};export{T as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={chats:"채팅",contacts:"연락처"};export{a as TUIGlobal,a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import
|
|
1
|
+
import{TUIGlobal as o}from"./TUIGlobal.js";import r from"./TUIChat.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import I from"./TUIProfile.js";var T={TUIGlobal:o,TUIChat:r,TUIConversation:t,TUIContact:m,TUIProfile:I};export{T as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a={chats:"消息",contacts:"通讯录"};export{a as TUIGlobal,a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import t from"./TUIConversation.js";import
|
|
1
|
+
import{TUIGlobal as o}from"./TUIGlobal.js";import r from"./TUIChat.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import I from"./TUIProfile.js";var T={TUIGlobal:o,TUIChat:r,TUIConversation:t,TUIContact:m,TUIProfile:I};export{T 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.6",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"uikit"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "
|
|
19
|
-
"start": "
|
|
20
|
-
"clean": "rimraf ./dist",
|
|
18
|
+
"build": "rimraf dist && rollup -c",
|
|
19
|
+
"start": "rimraf dist && rollup -c -w",
|
|
20
|
+
"clean": "rimraf -g ./dist node_modules examples/*/node_modules",
|
|
21
21
|
"prepare": "husky install"
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://www.tencentcloud.com/document/product/1047/45912",
|
|
@@ -42,9 +42,11 @@
|
|
|
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",
|
|
49
|
+
"eslint-plugin-react-refresh": "^0.4.9",
|
|
48
50
|
"husky": "^8.0.3",
|
|
49
51
|
"lint-staged": "^15.2.7",
|
|
50
52
|
"postcss": "^8.4.16",
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
56
58
|
"rollup-plugin-postcss": "^4.0.2",
|
|
57
59
|
"rollup-plugin-terser": "^7.0.2",
|
|
58
|
-
"sass": "^1.
|
|
60
|
+
"sass": "^1.77.8",
|
|
59
61
|
"stylelint": "^16.7.0",
|
|
60
62
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
61
63
|
"stylelint-config-standard": "^36.0.1",
|
|
@@ -69,9 +71,9 @@
|
|
|
69
71
|
"@tencentcloud/tui-core": "latest",
|
|
70
72
|
"@tencentcloud/universal-api": "latest",
|
|
71
73
|
"date-fns": "^2.29.3",
|
|
72
|
-
"node-sass": "^7.0.3",
|
|
73
74
|
"react-date-picker": "^9.0.0",
|
|
74
|
-
"react-dom": "^18.2.0"
|
|
75
|
+
"react-dom": "^18.2.0",
|
|
76
|
+
"rollup-plugin-copy": "^3.5.0"
|
|
75
77
|
},
|
|
76
78
|
"peerDependencies": {
|
|
77
79
|
"date-fns": "^2.29.3",
|
package/rollup.config.js
CHANGED
|
@@ -8,6 +8,7 @@ import postcss from 'rollup-plugin-postcss';
|
|
|
8
8
|
import autoprefixer from 'autoprefixer';
|
|
9
9
|
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
|
10
10
|
import url from '@rollup/plugin-url';
|
|
11
|
+
import copy from 'rollup-plugin-copy';
|
|
11
12
|
|
|
12
13
|
export default [
|
|
13
14
|
{
|
|
@@ -21,13 +22,23 @@ export default [
|
|
|
21
22
|
autoprefixer(),
|
|
22
23
|
],
|
|
23
24
|
}),
|
|
25
|
+
copy({
|
|
26
|
+
targets: [{
|
|
27
|
+
src: [
|
|
28
|
+
'src/assets/fonts/iconfont.ttf',
|
|
29
|
+
'src/assets/fonts/iconfont.woff',
|
|
30
|
+
'src/assets/fonts/iconfont.woff2',
|
|
31
|
+
],
|
|
32
|
+
dest: ['dist/cjs/assets/fonts', 'dist/esm/assets/fonts'],
|
|
33
|
+
}],
|
|
34
|
+
}),
|
|
24
35
|
peerDepsExternal(),
|
|
25
36
|
resolve(),
|
|
26
37
|
commonjs(),
|
|
38
|
+
typescript(),
|
|
27
39
|
babel({
|
|
28
|
-
extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', 'ts', 'tsx'],
|
|
40
|
+
extensions: ['.js', '.jsx', '.es6', '.es', '.mjs', '.ts', '.tsx'],
|
|
29
41
|
}),
|
|
30
|
-
typescript(),
|
|
31
42
|
terser(),
|
|
32
43
|
],
|
|
33
44
|
external: ['react', 'date-fns', 'tslib', 'react-date-picker', 'i18next', 'react-i18next', '@tencentcloud/tui-core',
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -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,
|
|
@@ -2,49 +2,57 @@
|
|
|
2
2
|
.create-group-box {
|
|
3
3
|
padding: 10px 0;
|
|
4
4
|
}
|
|
5
|
+
|
|
5
6
|
.input-group-text {
|
|
6
7
|
font-weight: 400;
|
|
7
|
-
font-size:
|
|
8
|
+
font-size: 14px;
|
|
8
9
|
font-family: PingFangSC-Medium;
|
|
9
10
|
line-height: 22px;
|
|
10
|
-
color: #
|
|
11
|
+
color: #000;
|
|
11
12
|
}
|
|
13
|
+
|
|
12
14
|
.create-group-name {
|
|
13
15
|
.input-group-name {
|
|
14
16
|
font-weight: 700;
|
|
15
|
-
font-size:
|
|
17
|
+
font-size: 14px;
|
|
16
18
|
font-family: PingFangSC-Medium;
|
|
17
19
|
line-height: 19px;
|
|
18
|
-
color: #
|
|
20
|
+
color: #000;
|
|
19
21
|
}
|
|
20
22
|
}
|
|
23
|
+
|
|
21
24
|
.input-group-title {
|
|
22
|
-
color: rgba(0, 0, 0,
|
|
25
|
+
color: rgba(0, 0, 0, 40%);
|
|
23
26
|
width: 106px;
|
|
27
|
+
font-size: 14px;
|
|
24
28
|
}
|
|
29
|
+
|
|
25
30
|
.create-group-illustrate {
|
|
26
31
|
font-weight: 400;
|
|
27
32
|
font-size: 12px;
|
|
28
33
|
font-family: PingFangSC-Medium;
|
|
29
34
|
line-height: 17px;
|
|
30
35
|
text-align: justify;
|
|
31
|
-
color: rgba(0, 0, 0,
|
|
36
|
+
color: rgba(0, 0, 0, 40%);
|
|
32
37
|
padding-left: 8px;
|
|
33
38
|
}
|
|
39
|
+
|
|
34
40
|
.create-group-portrait {
|
|
35
41
|
.create-group-portrait-title {
|
|
36
42
|
font-weight: 600;
|
|
37
43
|
font-size: 14px;
|
|
38
44
|
font-family: PingFangSC-Medium;
|
|
39
45
|
line-height: 20px;
|
|
40
|
-
color: #
|
|
46
|
+
color: #000;
|
|
41
47
|
padding: 20px 0 20px 8px;
|
|
42
48
|
}
|
|
49
|
+
|
|
43
50
|
.create-group-portrait-info-container {
|
|
44
51
|
display: flex;
|
|
45
52
|
flex-wrap: wrap;
|
|
46
53
|
justify-content: flex-start;
|
|
47
54
|
margin-bottom: 10px;
|
|
55
|
+
|
|
48
56
|
.create-group-portrait-info {
|
|
49
57
|
align-items: center;
|
|
50
58
|
display: flex;
|
|
@@ -52,6 +60,7 @@
|
|
|
52
60
|
width: calc((100% - 10px) / 6);
|
|
53
61
|
padding: 6px;
|
|
54
62
|
box-sizing: border-box;
|
|
63
|
+
|
|
55
64
|
&-nick {
|
|
56
65
|
font-size: 12px;
|
|
57
66
|
font-family: PingFangSC-Medium;
|
|
@@ -1,85 +1,96 @@
|
|
|
1
1
|
.tui-conversation-create-header {
|
|
2
|
-
background-color: #
|
|
2
|
+
background-color: #f9fafb;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: row;
|
|
5
5
|
padding: 16px 20px;
|
|
6
6
|
align-items: center;
|
|
7
7
|
text-align: center;
|
|
8
|
+
|
|
8
9
|
.title {
|
|
9
10
|
margin-left: 10px;
|
|
10
11
|
font-weight: 600;
|
|
11
|
-
font-size:
|
|
12
|
+
font-size: 16px;
|
|
12
13
|
font-family: PingFangSC-Medium;
|
|
13
14
|
line-height: 32px;
|
|
14
15
|
letter-spacing: -0.41px;
|
|
15
|
-
color: #
|
|
16
|
+
color: #000;
|
|
16
17
|
}
|
|
17
18
|
}
|
|
19
|
+
|
|
18
20
|
.tui-conversation-create-search-input {
|
|
19
|
-
margin: 10px
|
|
21
|
+
margin: 10px;
|
|
20
22
|
}
|
|
23
|
+
|
|
21
24
|
.tui-user {
|
|
22
|
-
padding: 10px
|
|
25
|
+
padding: 10px;
|
|
23
26
|
display: flex;
|
|
24
27
|
align-items: center;
|
|
25
28
|
text-align: center;
|
|
26
29
|
cursor: pointer;
|
|
30
|
+
|
|
27
31
|
&:hover {
|
|
28
|
-
background-color: rgba(0,110,255
|
|
32
|
+
background-color: rgba(0, 110, 255, 10%);
|
|
29
33
|
}
|
|
34
|
+
|
|
30
35
|
.tui-user-name {
|
|
31
36
|
margin-left: 10px;
|
|
32
37
|
font-weight: 400;
|
|
33
38
|
font-size: 14px;
|
|
34
39
|
font-family: PingFangSC-Medium;
|
|
35
40
|
line-height: 20px;
|
|
36
|
-
color: #
|
|
41
|
+
color: #000;
|
|
37
42
|
width: 80%;
|
|
38
43
|
text-align: left;
|
|
44
|
+
|
|
39
45
|
&.active {
|
|
40
46
|
font-weight: 600;
|
|
41
47
|
font-size: 14px;
|
|
42
48
|
font-family: PingFangSC-Medium;
|
|
43
49
|
line-height: 20px;
|
|
44
|
-
color: rgba(3, 101, 249,
|
|
50
|
+
color: rgba(3, 101, 249, 100%);
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
}
|
|
54
|
+
|
|
48
55
|
.tui-user-checkbox-label {
|
|
49
56
|
.tui-user-checkbox {
|
|
50
57
|
margin-left: auto;
|
|
51
58
|
}
|
|
59
|
+
|
|
52
60
|
input[type="checkbox"] {
|
|
53
61
|
cursor: pointer;
|
|
54
62
|
}
|
|
55
63
|
}
|
|
64
|
+
|
|
56
65
|
.tui-conversation-create-next-container {
|
|
57
66
|
width: 100%;
|
|
58
67
|
display: flex;
|
|
59
68
|
justify-content: center;
|
|
60
69
|
margin: 20px auto 10px;
|
|
70
|
+
|
|
61
71
|
.tui-conversation-create-next {
|
|
62
72
|
cursor: pointer;
|
|
63
73
|
text-align: center;
|
|
64
|
-
|
|
65
|
-
background-color: rgba(3, 101, 249, 1);
|
|
74
|
+
background-color: rgba(3, 101, 249, 100%);
|
|
66
75
|
border-radius: 31px;
|
|
67
76
|
font-size: 14px;
|
|
68
77
|
font-family: PingFangSC-Medium;
|
|
69
78
|
line-height: 20px;
|
|
70
|
-
color: #
|
|
79
|
+
color: #fff;
|
|
71
80
|
padding: 12px 36px;
|
|
72
81
|
}
|
|
73
82
|
}
|
|
74
83
|
|
|
75
|
-
|
|
76
84
|
.tui-conversation-create {
|
|
77
85
|
overflow-y: auto;
|
|
86
|
+
|
|
78
87
|
.tui-conversation-create-container {
|
|
79
88
|
position: relative;
|
|
89
|
+
|
|
80
90
|
.tui-group-container {
|
|
81
91
|
width: 100%;
|
|
82
92
|
}
|
|
93
|
+
|
|
83
94
|
.tui-group-box {
|
|
84
95
|
.title {
|
|
85
96
|
font-weight: 600;
|
|
@@ -91,4 +102,3 @@
|
|
|
91
102
|
}
|
|
92
103
|
}
|
|
93
104
|
}
|
|
94
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import {
|
|
2
|
+
import type { Conversation } from '@tencentcloud/chat';
|
|
3
|
+
import { useUIKit, useUIManager } from '../../context';
|
|
4
4
|
import { ConversationPreviewContent } from './ConversationPreviewContent';
|
|
5
5
|
import { AvatarProps } from '../Avatar';
|
|
6
6
|
|
|
@@ -8,34 +8,34 @@ import {
|
|
|
8
8
|
getDisplayImage, getDisplayMessage, getDisplayTitle, getDisplayTime,
|
|
9
9
|
} from './utils';
|
|
10
10
|
|
|
11
|
-
export interface ConversationPreviewUIComponentProps extends ConversationPreviewProps{
|
|
11
|
+
export interface ConversationPreviewUIComponentProps extends ConversationPreviewProps {
|
|
12
12
|
/** If the component's Conversation is the active (selected) Conversation */
|
|
13
|
-
active?: boolean
|
|
13
|
+
active?: boolean;
|
|
14
14
|
/** Image of Conversation to display */
|
|
15
|
-
displayImage?: string
|
|
15
|
+
displayImage?: string;
|
|
16
16
|
/** Title of Conversation to display */
|
|
17
|
-
displayTitle?: string | React.ReactElement
|
|
17
|
+
displayTitle?: string | React.ReactElement;
|
|
18
18
|
/** Message of Conversation to display */
|
|
19
|
-
displayMessage?: string | React.ReactElement
|
|
19
|
+
displayMessage?: string | React.ReactElement;
|
|
20
20
|
/** Time of Conversation to display */
|
|
21
|
-
displayTime?: string
|
|
21
|
+
displayTime?: string;
|
|
22
22
|
/** Number of unread Messages */
|
|
23
|
-
unread?: number
|
|
23
|
+
unread?: number;
|
|
24
24
|
}
|
|
25
25
|
export interface ConversationPreviewProps {
|
|
26
|
-
conversation: Conversation
|
|
27
|
-
activeConversation?: Conversation
|
|
28
|
-
Preview?: React.ComponentType<ConversationPreviewUIComponentProps
|
|
29
|
-
Avatar?: React.ComponentType<AvatarProps
|
|
30
|
-
setActiveConversation?:
|
|
31
|
-
searchValue?: string
|
|
32
|
-
conversationUpdateCount?: number
|
|
33
|
-
activeConversationID?: string
|
|
34
|
-
setActiveConversationID?: (conversationID: string) => void
|
|
26
|
+
conversation: Conversation;
|
|
27
|
+
activeConversation?: Conversation;
|
|
28
|
+
Preview?: React.ComponentType<ConversationPreviewUIComponentProps>;
|
|
29
|
+
Avatar?: React.ComponentType<AvatarProps>;
|
|
30
|
+
setActiveConversation?: (conversation: Conversation | undefined) => void;
|
|
31
|
+
searchValue?: string;
|
|
32
|
+
conversationUpdateCount?: number;
|
|
33
|
+
activeConversationID?: string;
|
|
34
|
+
setActiveConversationID?: (conversationID: string) => void;
|
|
35
35
|
}
|
|
36
36
|
export function ConversationPreview<T extends ConversationPreviewProps>(
|
|
37
37
|
props: T,
|
|
38
|
-
)
|
|
38
|
+
) {
|
|
39
39
|
const {
|
|
40
40
|
activeConversation,
|
|
41
41
|
conversation,
|
|
@@ -43,11 +43,11 @@ export function ConversationPreview<T extends ConversationPreviewProps>(
|
|
|
43
43
|
searchValue,
|
|
44
44
|
conversationUpdateCount,
|
|
45
45
|
} = props;
|
|
46
|
-
const { language } =
|
|
46
|
+
const { language } = useUIKit();
|
|
47
47
|
const {
|
|
48
48
|
setActiveConversation,
|
|
49
49
|
myProfile,
|
|
50
|
-
} =
|
|
50
|
+
} = useUIManager('ConversationPreview');
|
|
51
51
|
const [displayImage, setDisplayImage] = useState(getDisplayImage(conversation));
|
|
52
52
|
const [displayTitle, setDisplayTitle] = useState(getDisplayTitle(conversation, searchValue));
|
|
53
53
|
const [displayMessage, setDisplayMessage] = useState(myProfile && getDisplayMessage(conversation, myProfile, language));
|
|
@@ -10,7 +10,7 @@ import './styles/index.scss';
|
|
|
10
10
|
import { Icon, IconTypes } from '../Icon';
|
|
11
11
|
import { Plugins } from '../Plugins';
|
|
12
12
|
import { useConversation } from '../../hooks';
|
|
13
|
-
import {
|
|
13
|
+
import { useUIKit, useUIManager } from '../../context';
|
|
14
14
|
|
|
15
15
|
export interface IPluginsRef {
|
|
16
16
|
closeMore?: () => void,
|
|
@@ -34,7 +34,8 @@ export function unMemoConversationPreviewContent<T extends ConversationPreviewUI
|
|
|
34
34
|
|
|
35
35
|
const { t } = useTranslation();
|
|
36
36
|
const conversationPreviewButton = useRef<HTMLButtonElement | null>(null);
|
|
37
|
-
const { chat
|
|
37
|
+
const { chat } = useUIKit();
|
|
38
|
+
const { conversation: activeConversation } = useUIManager('ConversationPreviewContent');
|
|
38
39
|
const { pinConversation, deleteConversation } = useConversation(chat);
|
|
39
40
|
const activeClass = active ? 'conversation-preview-content--active' : '';
|
|
40
41
|
const unreadClass = unread && unread >= 1 ? 'conversation-preview-content--unread' : '';
|
|
@@ -159,8 +160,7 @@ export function unMemoConversationPreviewContent<T extends ConversationPreviewUI
|
|
|
159
160
|
{t(!conversation.isPinned ? 'TUIConversation.Pin' : 'TUIConversation.Unpin')}
|
|
160
161
|
</div>,
|
|
161
162
|
<div
|
|
162
|
-
className="more-handle-item"
|
|
163
|
-
style={{ color: '#FF584C' }}
|
|
163
|
+
className="more-handle-item delete"
|
|
164
164
|
onClick={(e) => {
|
|
165
165
|
moreHandle(e, 'delete');
|
|
166
166
|
}}
|