@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
|
@@ -6,29 +6,32 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
cursor: pointer;
|
|
9
|
-
font-family: SF Pro Text;
|
|
10
9
|
font-size: 14px;
|
|
11
10
|
font-family: PingFangSC-Medium;
|
|
12
11
|
font-style: normal;
|
|
13
12
|
font-weight: 500;
|
|
14
13
|
line-height: 17px;
|
|
14
|
+
|
|
15
15
|
.avatar {
|
|
16
16
|
width: 45px;
|
|
17
|
+
|
|
17
18
|
img {
|
|
18
19
|
width: 45px;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
|
|
21
23
|
.content {
|
|
22
24
|
display: flex;
|
|
23
25
|
flex-direction: column;
|
|
24
26
|
align-items: flex-start;
|
|
27
|
+
|
|
25
28
|
.name {
|
|
26
29
|
display: inline-block;
|
|
27
30
|
padding-bottom: 3px;
|
|
28
31
|
max-width: 60%;
|
|
29
32
|
|
|
30
33
|
@include theme() {
|
|
31
|
-
color: get(text-primary);
|
|
34
|
+
color: get(text-color-primary);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
37
|
}
|
|
@@ -40,22 +43,26 @@
|
|
|
40
43
|
flex-direction: row;
|
|
41
44
|
justify-self: flex-start;
|
|
42
45
|
gap: 10px;
|
|
46
|
+
|
|
43
47
|
.content {
|
|
44
48
|
align-items: flex-start;
|
|
45
49
|
flex: 1;
|
|
46
50
|
}
|
|
47
51
|
}
|
|
52
|
+
|
|
48
53
|
.out {
|
|
49
54
|
flex: 1;
|
|
50
55
|
display: flex;
|
|
51
56
|
gap: 10px;
|
|
52
57
|
flex-direction: row-reverse;
|
|
53
58
|
justify-self: flex-end;
|
|
59
|
+
|
|
54
60
|
.content {
|
|
55
61
|
align-items: flex-end;
|
|
56
62
|
flex: 1;
|
|
57
63
|
}
|
|
58
64
|
}
|
|
65
|
+
|
|
59
66
|
.tip {
|
|
60
67
|
justify-self: center !important;
|
|
61
68
|
width: auto;
|
|
@@ -63,14 +70,17 @@
|
|
|
63
70
|
|
|
64
71
|
.bubble {
|
|
65
72
|
padding: 8px 16px;
|
|
73
|
+
|
|
66
74
|
&-in {
|
|
67
|
-
border-radius:
|
|
75
|
+
border-radius: 0 16px 16px;
|
|
76
|
+
|
|
68
77
|
&.group {
|
|
69
|
-
border-radius:
|
|
78
|
+
border-radius: 0 16px 16px;
|
|
70
79
|
}
|
|
71
80
|
}
|
|
81
|
+
|
|
72
82
|
&-out {
|
|
73
|
-
border-radius: 16px 16px 0
|
|
83
|
+
border-radius: 16px 16px 0;
|
|
74
84
|
}
|
|
75
85
|
}
|
|
76
86
|
|
|
@@ -78,30 +88,39 @@
|
|
|
78
88
|
display: flex;
|
|
79
89
|
align-items: flex-end;
|
|
80
90
|
align-self: flex-end;
|
|
91
|
+
|
|
81
92
|
.time {
|
|
82
93
|
width: max-content;
|
|
83
94
|
font-weight: 400;
|
|
84
95
|
padding: 5px 0 0 10px;
|
|
85
96
|
font-size: 12px;
|
|
86
|
-
font-family: PingFangSC-Medium;
|
|
87
97
|
line-height: 14px;
|
|
88
98
|
text-align: right;
|
|
89
99
|
|
|
90
100
|
@include theme() {
|
|
91
|
-
color: get(text-secondary);
|
|
101
|
+
color: get(text-color-anti-secondary);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bubble-in & {
|
|
105
|
+
@include theme() {
|
|
106
|
+
color: get(text-color-tertiary);
|
|
107
|
+
}
|
|
92
108
|
}
|
|
93
109
|
}
|
|
94
110
|
}
|
|
95
111
|
|
|
96
|
-
.message-image,
|
|
112
|
+
.message-image,
|
|
113
|
+
.message-video {
|
|
97
114
|
position: relative;
|
|
115
|
+
|
|
98
116
|
.message-status {
|
|
99
117
|
position: absolute;
|
|
100
118
|
bottom: 10px;
|
|
101
119
|
right: 10px;
|
|
120
|
+
|
|
102
121
|
.time {
|
|
103
122
|
@include theme() {
|
|
104
|
-
color: get(text-primary);
|
|
123
|
+
color: get(text-color-primary);
|
|
105
124
|
}
|
|
106
125
|
}
|
|
107
126
|
}
|
|
@@ -109,23 +128,19 @@
|
|
|
109
128
|
|
|
110
129
|
.message-text {
|
|
111
130
|
display: flex;
|
|
131
|
+
|
|
112
132
|
&-content {
|
|
113
133
|
display: inline;
|
|
114
134
|
word-break: break-word;
|
|
115
|
-
font-family: PingFangSC-Regular;
|
|
116
|
-
font-style: normal;
|
|
117
135
|
font-weight: 500;
|
|
118
136
|
font-size: 14px;
|
|
119
|
-
|
|
137
|
+
|
|
120
138
|
&-p {
|
|
121
139
|
white-space: pre-wrap;
|
|
122
140
|
display: inline;
|
|
123
141
|
vertical-align: middle;
|
|
124
|
-
|
|
125
|
-
@include theme() {
|
|
126
|
-
color: get(text-primary);
|
|
127
|
-
}
|
|
128
142
|
}
|
|
143
|
+
|
|
129
144
|
.message-status {
|
|
130
145
|
display: inline-flex;
|
|
131
146
|
float: right;
|
|
@@ -136,11 +151,9 @@
|
|
|
136
151
|
|
|
137
152
|
.message-text,
|
|
138
153
|
.message-tip {
|
|
139
|
-
font-family: PingFangSC-Regular;
|
|
140
|
-
font-style: normal;
|
|
141
154
|
font-weight: 500;
|
|
142
155
|
font-size: 14px;
|
|
143
|
-
|
|
156
|
+
|
|
144
157
|
.text-img {
|
|
145
158
|
width: 20px;
|
|
146
159
|
height: 20px;
|
|
@@ -149,14 +162,17 @@
|
|
|
149
162
|
}
|
|
150
163
|
|
|
151
164
|
.message-image {
|
|
152
|
-
background:
|
|
165
|
+
background: transparent;
|
|
166
|
+
|
|
153
167
|
img {
|
|
154
168
|
max-width: 300px;
|
|
155
169
|
}
|
|
170
|
+
|
|
156
171
|
.img-h5 {
|
|
157
172
|
max-width: 200px;
|
|
158
173
|
max-height: 200px;
|
|
159
174
|
}
|
|
175
|
+
|
|
160
176
|
.big-image {
|
|
161
177
|
max-width: 90%;
|
|
162
178
|
max-height: 90%;
|
|
@@ -165,18 +181,20 @@
|
|
|
165
181
|
|
|
166
182
|
.message-video {
|
|
167
183
|
max-width: 300px;
|
|
184
|
+
|
|
168
185
|
.snap-video {
|
|
169
186
|
position: relative;
|
|
170
187
|
height: 100%;
|
|
171
188
|
border-radius: 10px;
|
|
189
|
+
|
|
172
190
|
&::before {
|
|
173
191
|
position: absolute;
|
|
174
192
|
z-index: 1;
|
|
175
|
-
content:
|
|
176
|
-
width:
|
|
177
|
-
height:
|
|
193
|
+
content: "";
|
|
194
|
+
width: 0;
|
|
195
|
+
height: 0;
|
|
178
196
|
border: 15px solid transparent;
|
|
179
|
-
border-left: 20px solid #
|
|
197
|
+
border-left: 20px solid #fff;
|
|
180
198
|
top: 0;
|
|
181
199
|
left: 0;
|
|
182
200
|
bottom: 0;
|
|
@@ -184,63 +202,75 @@
|
|
|
184
202
|
margin: auto;
|
|
185
203
|
}
|
|
186
204
|
}
|
|
205
|
+
|
|
187
206
|
video {
|
|
188
207
|
width: 100%;
|
|
189
208
|
height: 100%;
|
|
190
209
|
border-radius: 10px;
|
|
191
210
|
}
|
|
211
|
+
|
|
192
212
|
.play-video {
|
|
193
213
|
max-width: 95%;
|
|
194
214
|
max-height: 65%;
|
|
195
215
|
}
|
|
196
216
|
}
|
|
217
|
+
|
|
197
218
|
.message-video.message-video-h5 {
|
|
198
219
|
max-width: 200px;
|
|
199
220
|
max-height: 200px;
|
|
200
221
|
}
|
|
222
|
+
|
|
201
223
|
.message-file {
|
|
202
224
|
display: flex;
|
|
203
225
|
flex-direction: column;
|
|
204
226
|
border: 1px solid #ddd;
|
|
227
|
+
|
|
205
228
|
&-main {
|
|
206
229
|
display: flex;
|
|
207
230
|
align-items: center;
|
|
208
231
|
padding: 12px;
|
|
209
|
-
background: #
|
|
232
|
+
background: #fff;
|
|
210
233
|
border-radius: 4px;
|
|
234
|
+
|
|
211
235
|
.icon {
|
|
212
236
|
margin-right: 7px;
|
|
213
237
|
}
|
|
214
238
|
}
|
|
239
|
+
|
|
215
240
|
&-footer {
|
|
216
241
|
display: flex;
|
|
217
242
|
justify-content: space-between;
|
|
218
243
|
align-items: flex-end;
|
|
244
|
+
|
|
219
245
|
.time {
|
|
220
246
|
padding-top: 10px;
|
|
221
247
|
}
|
|
222
248
|
}
|
|
249
|
+
|
|
223
250
|
&-size {
|
|
224
251
|
padding-top: 10px;
|
|
225
252
|
font-weight: 400;
|
|
226
253
|
font-size: 12px;
|
|
227
254
|
font-family: PingFangSC-Medium;
|
|
228
255
|
line-height: 14px;
|
|
229
|
-
color: #
|
|
256
|
+
color: #7a7a7a;
|
|
230
257
|
}
|
|
231
258
|
}
|
|
232
259
|
|
|
233
260
|
.message-merger {
|
|
234
261
|
display: flex;
|
|
235
262
|
flex-direction: column;
|
|
236
|
-
background: #
|
|
263
|
+
background: #ecebeb;
|
|
264
|
+
|
|
237
265
|
h3 {
|
|
238
266
|
padding-bottom: 4px;
|
|
239
267
|
border-bottom: 1px solid #a1a1a1;
|
|
240
268
|
}
|
|
269
|
+
|
|
241
270
|
&-list {
|
|
242
271
|
opacity: 0.6;
|
|
243
272
|
}
|
|
273
|
+
|
|
244
274
|
&-item {
|
|
245
275
|
padding-top: 4px;
|
|
246
276
|
}
|
|
@@ -258,7 +288,7 @@
|
|
|
258
288
|
}
|
|
259
289
|
|
|
260
290
|
&-out {
|
|
261
|
-
border-radius: 16px 16px
|
|
291
|
+
border-radius: 16px 16px 0;
|
|
262
292
|
}
|
|
263
293
|
|
|
264
294
|
.message-text {
|
|
@@ -279,7 +309,7 @@
|
|
|
279
309
|
margin-bottom: 10px;
|
|
280
310
|
|
|
281
311
|
@include theme() {
|
|
282
|
-
background-color: get(bg-
|
|
312
|
+
background-color: get(bg-color-operate);
|
|
283
313
|
}
|
|
284
314
|
|
|
285
315
|
&::before {
|
|
@@ -301,7 +331,7 @@
|
|
|
301
331
|
padding-bottom: 10px;
|
|
302
332
|
|
|
303
333
|
@include theme() {
|
|
304
|
-
color: get(text-primary);
|
|
334
|
+
color: get(text-color-primary);
|
|
305
335
|
}
|
|
306
336
|
}
|
|
307
337
|
|
|
@@ -314,14 +344,17 @@
|
|
|
314
344
|
.meesage-bubble {
|
|
315
345
|
display: flex;
|
|
316
346
|
align-items: flex-end;
|
|
347
|
+
|
|
317
348
|
&-status {
|
|
318
349
|
margin: 3px;
|
|
319
350
|
}
|
|
351
|
+
|
|
320
352
|
&-context {
|
|
321
353
|
display: flex;
|
|
322
354
|
align-items: center;
|
|
323
355
|
gap: 10px;
|
|
324
|
-
|
|
356
|
+
|
|
357
|
+
.message-context {
|
|
325
358
|
flex: 1;
|
|
326
359
|
}
|
|
327
360
|
}
|
|
@@ -332,14 +365,15 @@
|
|
|
332
365
|
height: 14px;
|
|
333
366
|
border-radius: 14px;
|
|
334
367
|
position: relative;
|
|
335
|
-
background: #
|
|
368
|
+
background: #fa5151;
|
|
336
369
|
display: inline-flex;
|
|
337
370
|
justify-content: center;
|
|
338
371
|
align-items: center;
|
|
372
|
+
|
|
339
373
|
&::before {
|
|
340
374
|
position: absolute;
|
|
341
375
|
content: "!";
|
|
342
|
-
color: #
|
|
376
|
+
color: #fff;
|
|
343
377
|
font-size: 12px;
|
|
344
378
|
font-family: PingFangSC-Medium;
|
|
345
379
|
}
|
|
@@ -348,6 +382,7 @@
|
|
|
348
382
|
.message-face {
|
|
349
383
|
display: flex;
|
|
350
384
|
flex-direction: column;
|
|
385
|
+
|
|
351
386
|
.img {
|
|
352
387
|
max-width: 88px;
|
|
353
388
|
}
|
|
@@ -356,29 +391,35 @@
|
|
|
356
391
|
.loading {
|
|
357
392
|
display: inline-block;
|
|
358
393
|
position: relative;
|
|
359
|
-
|
|
394
|
+
|
|
395
|
+
.img,
|
|
396
|
+
video {
|
|
360
397
|
min-width: 60px;
|
|
361
398
|
min-height: 60px;
|
|
362
399
|
max-width: 300px;
|
|
363
400
|
border-radius: 10px;
|
|
364
401
|
}
|
|
365
|
-
|
|
402
|
+
|
|
403
|
+
.img-h5,
|
|
404
|
+
.video-h5 {
|
|
366
405
|
min-width: 60px;
|
|
367
406
|
min-height: 60px;
|
|
368
407
|
max-width: 200px;
|
|
369
408
|
max-height: 200px;
|
|
370
409
|
border-radius: 10px;
|
|
371
410
|
}
|
|
411
|
+
|
|
372
412
|
&::before {
|
|
373
413
|
position: absolute;
|
|
374
414
|
content: "";
|
|
375
|
-
background: rgba(#
|
|
415
|
+
background: rgba(#000, 0.5);
|
|
376
416
|
border-radius: 10px;
|
|
377
417
|
width: 100%;
|
|
378
418
|
height: 100%;
|
|
379
419
|
top: 0;
|
|
380
420
|
left: 0;
|
|
381
421
|
}
|
|
422
|
+
|
|
382
423
|
&::after {
|
|
383
424
|
position: absolute;
|
|
384
425
|
content: "";
|
|
@@ -395,6 +436,7 @@
|
|
|
395
436
|
bottom: 0;
|
|
396
437
|
margin: auto;
|
|
397
438
|
}
|
|
439
|
+
|
|
398
440
|
@keyframes spin {
|
|
399
441
|
0% { transform: rotate(0deg); }
|
|
400
442
|
100% { transform: rotate(360deg); }
|
|
@@ -404,10 +446,12 @@
|
|
|
404
446
|
.message-plugin {
|
|
405
447
|
width: 32px;
|
|
406
448
|
margin: 0 5px;
|
|
449
|
+
|
|
407
450
|
.icon-more {
|
|
408
451
|
transform: scale(1.5);
|
|
409
452
|
}
|
|
410
|
-
|
|
453
|
+
|
|
454
|
+
.plugin-popup-box {
|
|
411
455
|
bottom: auto;
|
|
412
456
|
top: 100%;
|
|
413
457
|
overflow: hidden;
|
|
@@ -416,6 +460,7 @@
|
|
|
416
460
|
&-box {
|
|
417
461
|
padding: 6px 0;
|
|
418
462
|
}
|
|
463
|
+
|
|
419
464
|
&-item {
|
|
420
465
|
min-width: 144px;
|
|
421
466
|
padding: 6px 13px;
|
|
@@ -426,12 +471,22 @@
|
|
|
426
471
|
font-size: 12.8px;
|
|
427
472
|
font-family: PingFangSC-Medium;
|
|
428
473
|
line-height: 15px;
|
|
474
|
+
|
|
475
|
+
@include theme() {
|
|
476
|
+
color: get(text-color-primary);
|
|
477
|
+
}
|
|
478
|
+
|
|
429
479
|
&:hover {
|
|
430
|
-
|
|
431
|
-
|
|
480
|
+
@include theme() {
|
|
481
|
+
background: get(dropdown-color-hover);
|
|
482
|
+
color: get(text-color-hover);
|
|
483
|
+
}
|
|
432
484
|
}
|
|
485
|
+
|
|
433
486
|
.del {
|
|
434
|
-
|
|
487
|
+
@include theme() {
|
|
488
|
+
color: get(text-color-error);
|
|
489
|
+
}
|
|
435
490
|
}
|
|
436
491
|
}
|
|
437
492
|
}
|
|
@@ -439,6 +494,7 @@
|
|
|
439
494
|
.message-custom {
|
|
440
495
|
display: flex;
|
|
441
496
|
word-break: break-all;
|
|
497
|
+
|
|
442
498
|
a {
|
|
443
499
|
color: #679ce1;
|
|
444
500
|
text-decoration: none;
|
|
@@ -448,6 +504,7 @@
|
|
|
448
504
|
font-size: 14px;
|
|
449
505
|
line-height: 17px;
|
|
450
506
|
}
|
|
507
|
+
|
|
451
508
|
p {
|
|
452
509
|
font-family: PingFangSC-Regular;
|
|
453
510
|
font-size: 14px;
|
|
@@ -458,26 +515,31 @@
|
|
|
458
515
|
}
|
|
459
516
|
|
|
460
517
|
.message-revoke {
|
|
461
|
-
color: #
|
|
518
|
+
color: #999;
|
|
462
519
|
}
|
|
463
520
|
|
|
464
521
|
.message-audio {
|
|
465
522
|
display: flex;
|
|
466
523
|
align-items: center;
|
|
524
|
+
|
|
467
525
|
.out {
|
|
468
526
|
transform: rotate(180deg);
|
|
469
527
|
}
|
|
528
|
+
|
|
470
529
|
&-none {
|
|
471
530
|
display: none;
|
|
472
531
|
}
|
|
532
|
+
|
|
473
533
|
&-content {
|
|
474
534
|
display: flex;
|
|
475
535
|
align-items: center;
|
|
476
536
|
gap: 10px;
|
|
477
537
|
}
|
|
538
|
+
|
|
478
539
|
&-out {
|
|
479
540
|
flex-direction: row-reverse;
|
|
480
541
|
}
|
|
542
|
+
|
|
481
543
|
.playing {
|
|
482
544
|
animation: playingAnimation 1s ease-in-out infinite;
|
|
483
545
|
}
|
|
@@ -486,9 +548,11 @@
|
|
|
486
548
|
0% {
|
|
487
549
|
opacity: 1;
|
|
488
550
|
}
|
|
551
|
+
|
|
489
552
|
50% {
|
|
490
553
|
opacity: 0.3;
|
|
491
554
|
}
|
|
555
|
+
|
|
492
556
|
100% {
|
|
493
557
|
opacity: 1;
|
|
494
558
|
}
|
|
@@ -504,16 +568,20 @@
|
|
|
504
568
|
opacity: 1;
|
|
505
569
|
color: #ff9c19;
|
|
506
570
|
}
|
|
571
|
+
|
|
507
572
|
25% {
|
|
508
573
|
opacity: 0.3;
|
|
509
574
|
}
|
|
575
|
+
|
|
510
576
|
50% {
|
|
511
577
|
color: #ff9c19;
|
|
512
578
|
opacity: 1;
|
|
513
579
|
}
|
|
580
|
+
|
|
514
581
|
75% {
|
|
515
582
|
opacity: 0.3;
|
|
516
583
|
}
|
|
584
|
+
|
|
517
585
|
100% {
|
|
518
586
|
color: #ff9c19;
|
|
519
587
|
opacity: 1;
|
|
@@ -525,13 +593,14 @@
|
|
|
525
593
|
height: 5px;
|
|
526
594
|
display: flex;
|
|
527
595
|
justify-content: flex-start;
|
|
596
|
+
|
|
528
597
|
.progress {
|
|
529
598
|
display: inline-block;
|
|
530
599
|
width: 0;
|
|
531
600
|
background: #147aff;
|
|
532
601
|
height: 5px;
|
|
533
602
|
border-radius: 2px;
|
|
534
|
-
box-shadow:
|
|
603
|
+
box-shadow: 0 0 10px rgba(0, 0, 0, 25%);
|
|
535
604
|
}
|
|
536
605
|
}
|
|
537
606
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import TencentCloudChat, { Conversation, Group, Message } from '@tencentcloud/chat';
|
|
2
2
|
import { decodeText } from './decodeText';
|
|
3
3
|
import constant, { MESSAGE_STATUS } from '../../../constants';
|
|
4
|
-
import { JSONStringToParse } from '../../
|
|
4
|
+
import { JSONStringToParse } from '../../utils';
|
|
5
5
|
|
|
6
|
-
function t(params:string) {
|
|
6
|
+
function t(params: string) {
|
|
7
7
|
const str = params.split('.');
|
|
8
8
|
return str[str.length - 1];
|
|
9
9
|
}
|
|
@@ -141,7 +141,7 @@ export function handleTipMessageShowContext(message: Message) {
|
|
|
141
141
|
options.text = handleTipGrpUpdated(message);
|
|
142
142
|
break;
|
|
143
143
|
case TencentCloudChat.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:
|
|
144
|
-
message.payload.memberList.map((member:any) => {
|
|
144
|
+
message.payload.memberList.map((member: any) => {
|
|
145
145
|
if (member.muteTime > 0) {
|
|
146
146
|
options.text = `${t('message.tip.member')}:${member.userID}${t('message.tip.muted')}`;
|
|
147
147
|
} else {
|
|
@@ -222,11 +222,11 @@ export function handleLocationMessageShowContext(item: any) {
|
|
|
222
222
|
location.lon = item.payload.longitude.toFixed(6);
|
|
223
223
|
location.lat = item.payload.latitude.toFixed(6);
|
|
224
224
|
location.href = 'https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&'
|
|
225
|
-
|
|
225
|
+
+ `pointx=${location.lon}&pointy=${location.lat}&name=${item.payload.description}`;
|
|
226
226
|
location.url = 'https://apis.map.qq.com/ws/staticmap/v2/?'
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
227
|
+
+ `center=${location.lat},${location.lon}&zoom=10&size=300*150&maptype=roadmap&`
|
|
228
|
+
+ `markers=size:large|color:0xFFCCFF|label:k|${location.lat},${location.lon}&`
|
|
229
|
+
+ 'key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD';
|
|
230
230
|
location.description = item.payload.description;
|
|
231
231
|
return location;
|
|
232
232
|
}
|
|
@@ -286,8 +286,8 @@ export function handleMergerMessageShowContext(item: Message) {
|
|
|
286
286
|
|
|
287
287
|
// Parse audio and video call messages
|
|
288
288
|
export function extractCallingInfoFromMessage(message: Message) {
|
|
289
|
-
let callingmessage:any = {};
|
|
290
|
-
let objectData:any = {};
|
|
289
|
+
let callingmessage: any = {};
|
|
290
|
+
let objectData: any = {};
|
|
291
291
|
try {
|
|
292
292
|
callingmessage = JSONStringToParse(message.payload.data);
|
|
293
293
|
} catch (error) {
|
|
@@ -441,13 +441,13 @@ export function isTypingMessage(item: Message) {
|
|
|
441
441
|
return false;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
export function formatTime(secondTime:number) {
|
|
445
|
-
const time:number = secondTime;
|
|
444
|
+
export function formatTime(secondTime: number) {
|
|
445
|
+
const time: number = secondTime;
|
|
446
446
|
let newTime; let hour; let minite; let seconds;
|
|
447
447
|
if (time >= 3600) {
|
|
448
448
|
hour = parseInt(`${time / 3600}`, 10) < 10 ? `0${parseInt(`${time / 3600}`, 10)}` : parseInt(`${time / 3600}`, 10);
|
|
449
449
|
minite = parseInt(`${(time % 60) / 60}`, 10) < 10 ? `0${parseInt(`${(time % 60) / 60}`, 10)}` : parseInt(`${(time % 60) / 60}`, 10);
|
|
450
|
-
seconds
|
|
450
|
+
seconds = time % 3600 < 10 ? parseInt(`0${time % 3600}`) : time % 3600;
|
|
451
451
|
if (seconds > 60) {
|
|
452
452
|
minite = parseInt(`${seconds / 60}`, 10) < 10 ? `0${parseInt(`${seconds / 60}`, 10)}` : parseInt(`${seconds / 60}`, 10);
|
|
453
453
|
seconds = seconds % 60 < 10 ? `0${seconds % 60}` : seconds % 60;
|
|
@@ -463,3 +463,14 @@ export function formatTime(secondTime:number) {
|
|
|
463
463
|
}
|
|
464
464
|
return newTime;
|
|
465
465
|
}
|
|
466
|
+
|
|
467
|
+
export const isCallMessage = (message: Message): boolean => {
|
|
468
|
+
const payloadData = JSONStringToParse(message?.payload?.data);
|
|
469
|
+
if (payloadData?.businessID === 1 && payloadData?.data) {
|
|
470
|
+
const payloadDataData = JSONStringToParse(payloadData.data);
|
|
471
|
+
if (payloadDataData.businessID === 'av_call') {
|
|
472
|
+
return true;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return false;
|
|
476
|
+
};
|
|
@@ -10,7 +10,7 @@ import { MESSAGE_TYPE_NAME } from '../../constants';
|
|
|
10
10
|
import { useTUIMessageInputContext } from '../../context/TUIMessageInputContext';
|
|
11
11
|
import { Icon, IconTypes } from '../Icon';
|
|
12
12
|
import { useTUIChatStateContext } from '../../context';
|
|
13
|
-
export function InputPluginsDefalut():React.ReactElement {
|
|
13
|
+
export function InputPluginsDefalut(): React.ReactElement {
|
|
14
14
|
const {
|
|
15
15
|
sendUploadMessage,
|
|
16
16
|
pluginConfig: propsPluginConfig,
|
|
@@ -20,14 +20,14 @@ export function InputPluginsDefalut():React.ReactElement {
|
|
|
20
20
|
const { TUIMessageInputConfig } = useTUIChatStateContext('TUIMessageInput');
|
|
21
21
|
|
|
22
22
|
const propPlugins = propsPluginConfig?.plugins
|
|
23
|
-
|
|
23
|
+
|| TUIMessageInputConfig?.pluginConfig?.plugins || [];
|
|
24
24
|
const showNumber = propsPluginConfig?.showNumber
|
|
25
|
-
|
|
25
|
+
|| TUIMessageInputConfig?.pluginConfig?.showNumber || 1;
|
|
26
26
|
const MoreIcon = propsPluginConfig?.MoreIcon || TUIMessageInputConfig?.pluginConfig?.MoreIcon;
|
|
27
27
|
|
|
28
28
|
const handlePluginBoolenParams = (
|
|
29
|
-
porpsVal?:boolean | undefined,
|
|
30
|
-
contextVal?:boolean | undefined,
|
|
29
|
+
porpsVal?: boolean | undefined,
|
|
30
|
+
contextVal?: boolean | undefined,
|
|
31
31
|
defaultVal?: boolean,
|
|
32
32
|
) => {
|
|
33
33
|
if (typeof (porpsVal) === 'boolean') {
|
|
@@ -65,13 +65,13 @@ export function InputPluginsDefalut():React.ReactElement {
|
|
|
65
65
|
const ImagePicker = isImagePicker && useUploadElement({
|
|
66
66
|
children: (
|
|
67
67
|
<div className="input-plugin-item">
|
|
68
|
-
<
|
|
68
|
+
<i className="iconfont input-icon"></i>
|
|
69
69
|
<span>{t('TUIChat.Image')}</span>
|
|
70
70
|
</div>
|
|
71
71
|
),
|
|
72
72
|
type: 'image',
|
|
73
73
|
accept: 'image/*',
|
|
74
|
-
onChange: (file:HTMLInputElement | File) => {
|
|
74
|
+
onChange: (file: HTMLInputElement | File) => {
|
|
75
75
|
pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
|
|
76
76
|
sendUploadMessage && sendUploadMessage({ file }, MESSAGE_TYPE_NAME.IMAGE);
|
|
77
77
|
},
|
|
@@ -80,13 +80,13 @@ export function InputPluginsDefalut():React.ReactElement {
|
|
|
80
80
|
const VideoPicker = isVideoPicker && useUploadElement({
|
|
81
81
|
children: (
|
|
82
82
|
<div className="input-plugin-item">
|
|
83
|
-
<
|
|
83
|
+
<i className="iconfont input-icon"></i>
|
|
84
84
|
<span>{t('TUIChat.Video')}</span>
|
|
85
85
|
</div>
|
|
86
86
|
),
|
|
87
87
|
type: 'video',
|
|
88
88
|
accept: 'video/*',
|
|
89
|
-
onChange: (file:HTMLInputElement | File) => {
|
|
89
|
+
onChange: (file: HTMLInputElement | File) => {
|
|
90
90
|
pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
|
|
91
91
|
sendUploadMessage && sendUploadMessage({ file }, MESSAGE_TYPE_NAME.VIDEO);
|
|
92
92
|
},
|
|
@@ -95,20 +95,20 @@ export function InputPluginsDefalut():React.ReactElement {
|
|
|
95
95
|
const FilePicker = isFilePicker && useUploadElement({
|
|
96
96
|
children: (
|
|
97
97
|
<div className="input-plugin-item">
|
|
98
|
-
<
|
|
98
|
+
<i className="iconfont input-icon"></i>
|
|
99
99
|
<span>{t('TUIChat.File')}</span>
|
|
100
100
|
</div>
|
|
101
101
|
),
|
|
102
102
|
type: 'file',
|
|
103
103
|
accept: 'file/*',
|
|
104
|
-
onChange: (file:HTMLInputElement | File) => {
|
|
104
|
+
onChange: (file: HTMLInputElement | File) => {
|
|
105
105
|
pluginsRef?.current?.closeMore && pluginsRef.current.closeMore();
|
|
106
106
|
sendUploadMessage && sendUploadMessage({ file }, MESSAGE_TYPE_NAME.FILE);
|
|
107
107
|
},
|
|
108
108
|
});
|
|
109
109
|
const plugins = [
|
|
110
110
|
isEmojiPicker && <EmojiPicker />, ImagePicker, VideoPicker, FilePicker, ...propPlugins,
|
|
111
|
-
].filter(
|
|
111
|
+
].filter(item => item);
|
|
112
112
|
|
|
113
113
|
return <Plugins ref={pluginsRef} plugins={plugins} showNumber={showNumber} MoreIcon={MoreIcon} />;
|
|
114
114
|
}
|