@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useMemo as
|
|
1
|
+
import{__assign as t}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useMemo as n}from"react";import{useUIKit as r}from"../../../context/UIKitContext.js";import"@tencentcloud/chat-uikit-engine";import"../../../context/TUIMessageContext.js";import{getTimeStamp as o}from"../../utils.js";function s(s){var a=s.enrichedMessageList,m=s.TUIMessage,c=s.intervalsTimer,l=r().language;return n((function(){return null==a?void 0:a.map((function(n,r){var s,u="".concat(n.ID,"-").concat(r),d=r>0?null===(s=a[r-1])||void 0===s?void 0:s.time:-1,f=(null==n?void 0:n.time)||0;return e("li",t({className:"message-list-item"},{children:[!(!c||-1===d)&&f-d>=c&&i("div",t({className:"message-list-time"},{children:f?o(1e3*f,l):0}),"".concat(f+r)),i(m,{message:n})]}),u)}))}),[a])}export{s as default};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
3
|
interface TUIProfileProps {
|
|
4
4
|
className?: string;
|
|
5
|
-
TUIProfile?:
|
|
5
|
+
TUIProfile?: React__default.ComponentType<any>;
|
|
6
6
|
}
|
|
7
|
-
declare function UnMemoizedTUIProfile<T extends TUIProfileProps>(props: PropsWithChildren<T>):
|
|
7
|
+
declare function UnMemoizedTUIProfile<T extends TUIProfileProps>(props: PropsWithChildren<T>): React__default.ReactElement;
|
|
8
8
|
declare const TUIProfile: typeof UnMemoizedTUIProfile;
|
|
9
9
|
|
|
10
10
|
export { TUIProfile };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as o,Fragment as r,jsx as e}from"react/jsx-runtime";import t from"react";import{Profile as i}from"../Profile/Profile.js";import{useMyProfile as
|
|
1
|
+
import{jsxs as o,Fragment as r,jsx as e}from"react/jsx-runtime";import t from"react";import{Profile as i}from"../Profile/Profile.js";import{useMyProfile as m}from"./hooks/useMyProfile.js";import{TUIProfileDefault as f}from"./TUIProfileDefault.js";import"tslib";import"@tencentcloud/tui-core";import"react-i18next";import{useUIManager as a}from"../../context/UIManagerContext.js";import"../../context/TUIMessageContext.js";function l(t){var l=t.className,n=t.TUIProfile,s=m(),p=s.myProfile,c=s.updateMyProfile,u=a(),P=u.setTUIProfileShow,x=u.TUIProfileShow,I=n||f;return o(r,{children:[e(i,{profile:p,handleAvatar:function(){P&&P(!0)}}),x&&e(I,{className:l,userInfo:p,update:c})]})}var n=t.memo(l);export{n as TUIProfile};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
import { Profile } from '@tencentcloud/chat';
|
|
3
3
|
import { UpdateMyProfileParams } from '@tencentcloud/chat-uikit-engine';
|
|
4
4
|
|
|
@@ -7,6 +7,6 @@ interface TUIProfileDefaultProps {
|
|
|
7
7
|
update?: (option: UpdateMyProfileParams) => void;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
declare function TUIProfileDefault(props: TUIProfileDefaultProps):
|
|
10
|
+
declare function TUIProfileDefault(props: TUIProfileDefaultProps): React__default.ReactElement;
|
|
11
11
|
|
|
12
12
|
export { TUIProfileDefault, TUIProfileDefaultProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as t,jsxs as a}from"react/jsx-runtime";import l,{useState as i}from"react";import{useTranslation as n}from"react-i18next";import o from"react-date-picker";import r from"@tencentcloud/chat";import{isH5 as c}from"../../utils/env.js";import{
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as t,jsxs as a}from"react/jsx-runtime";import l,{useState as i}from"react";import{useTranslation as n}from"react-i18next";import o from"react-date-picker";import r from"@tencentcloud/chat";import{isH5 as c}from"../../utils/env.js";import"@tencentcloud/tui-core";import{useUIManager as u}from"../../context/UIManagerContext.js";import"../../context/TUIMessageContext.js";import{Avatar as d}from"../Avatar/Avatar.js";import{DivWithEdit as s}from"../DivWithEdit/DivWithEdit.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as v}from"../Icon/type.js";import{handleDisplayAvatar as p}from"../utils.js";var f,h,E=((f={})[r.TYPES.GENDER_UNKNOWN]="unknow",f[r.TYPES.GENDER_MALE]="male",f[r.TYPES.GENDER_FEMALE]="female",f),g=((h={})[r.TYPES.ALLOW_TYPE_ALLOW_ANY]="allowAny",h[r.TYPES.ALLOW_TYPE_NEED_CONFIRM]="needConfirm",h[r.TYPES.ALLOW_TYPE_DENY_ANY]="denyAny",h),N=["https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_1.png","https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_2.png","https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_3.png","https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_4.png","https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_5.png","https://im.sdk.qcloud.com/download/tuikit-resource/avatar/avatar_6.png"],T=[{label:"Male",value:r.TYPES.GENDER_MALE},{label:"Female",value:r.TYPES.GENDER_FEMALE}],y=[{label:"AllowAny",value:r.TYPES.ALLOW_TYPE_ALLOW_ANY},{label:"NeedConfirm",value:r.TYPES.ALLOW_TYPE_NEED_CONFIRM},{label:"DenyAny",value:r.TYPES.ALLOW_TYPE_DENY_ANY}];function _(l){var r,f,h,_,b,k,A=l.userInfo,P=l.className,Y=l.update,L=n().t,w=u().setTUIProfileShow,D=i(""),I=D[0],S=D[1],C=[{name:"Signature",value:null==A?void 0:A.selfSignature,type:"text",children:null},{name:"Gender",value:L((null==A?void 0:A.gender)&&(null===(r=E[null==A?void 0:A.gender])||void 0===r?void 0:r.replace(E[null==A?void 0:A.gender][0],null===(f=E[null==A?void 0:A.gender][0])||void 0===f?void 0:f.toLocaleUpperCase()))?"TUIProfile.".concat(null===(h=E[null==A?void 0:A.gender])||void 0===h?void 0:h.replace(E[null==A?void 0:A.gender][0],null===(_=E[null==A?void 0:A.gender][0])||void 0===_?void 0:_.toLocaleUpperCase())):""),type:"select",children:t("ul",e({className:"select-list"},{children:null==T?void 0:T.map((function(a,l){var i="".concat(a.value).concat(l);return t("li",e({className:"select-list-item",role:"menuitem",tabIndex:l,onClick:function(){x(a)}},{children:L("TUIProfile.".concat(a.label))}),i)}))}))},{name:"AllowType",value:L("TUIProfile.".concat(null===(b=g[(null==A?void 0:A.allowType)||""])||void 0===b?void 0:b.replace(A&&g[null==A?void 0:A.allowType][0],A&&(null===(k=g[null==A?void 0:A.allowType][0])||void 0===k?void 0:k.toLocaleUpperCase())))),type:"select",children:t("ul",e({className:"select-list"},{children:null==y?void 0:y.map((function(a,l){var i="".concat(a.value).concat(l);return t("li",e({className:"select-list-item",role:"menuitem",tabIndex:l,onClick:function(){W(a)}},{children:L("TUIProfile.".concat(a.label))}),i)}))}))},{name:"Birthday",value:(null==A?void 0:A.birthday)?function(e){var t=String(e);if(8===t.length){var a=t.substring(0,4),l=t.substring(4,6),i=t.substring(6,8);return"".concat(a,"/").concat(l,"/").concat(i)}return"".concat(e)}(A.birthday):"",type:"select",children:t(o,{className:"tui-profile-birthday",calendarClassName:"tui-profile-birthday-calendar",isOpen:!0,format:"y-MM-dd",onChange:function(e){j(e)},value:function(e){if(8===(null==e?void 0:e.length)){var t=Number(e.slice(0,4)),a=Number(e.slice(4,6)),l=Number(e.slice(-2));return new Date(t,a-1,l)}return new Date}("".concat(null==A?void 0:A.birthday))})}];c&&(C=C.filter((function(e){return"Birthday"!==e.name})));var M=function(e){S(e)},U=function(e){Y&&Y(e),S("")},O=function(e){var t,a="";switch(null==e?void 0:e.name){case"nick":a="nick";break;case"Signature":a="selfSignature";break;default:return void S("")}var l=((t={})[a]=e.value,t);U(l)},x=function(e){U({gender:e.value})},W=function(e){U({allowType:e.value})},j=function(e){var t,a,l,i;U({birthday:Number((t=e,a=t.getDate()>9?t.getDate():"0".concat(t.getDate()),l=t.getMonth()>8?t.getMonth()+1:"0".concat(t.getMonth()+1),i=t.getFullYear(),"".concat(i).concat(l).concat(a)))})};return a("div",e({className:"".concat(P," tui-profile")},{children:[a("header",e({className:"tui-profile-header"},{children:[t(m,{width:9,height:16,type:v.BACK,onClick:function(){w&&w(!1)}}),t("h1",{children:L("TUIProfile.Personal information")})]})),a("main",e({className:"tui-profile-main"},{children:[t("div",e({className:"tui-profile-avatar"},{children:t(d,{image:A&&p(null==A?void 0:A.avatar),size:94,update:function(e){U({avatar:e})},list:N})})),t(s,{name:"nick",className:"tui-profile-nick",value:null==A?void 0:A.nick,type:"text",toggle:M,isEdit:"nick"===I,confirm:O,close:function(){S("")}}),a("div",e({className:"tui-profile-ID"},{children:[t("h5",{children:"ID:"}),t("span",{children:null==A?void 0:A.userID})]}))]})),t("ul",e({className:"tui-profile-list"},{children:C.map((function(l){var i="".concat(l.name);return a("li",e({className:"tui-profile-list-item"},{children:[t("h4",{children:L("TUIProfile.".concat(l.name))}),t(s,e({className:"tui-profile-div-with-edit",classEditName:"tui-profile-edit",name:l.name,value:l.value,type:l.type,toggle:M,isEdit:I===l.name,confirm:O,close:function(){S("")}},{children:null==l?void 0:l.children}))]}),i)}))}))]}))}var b=l.memo(_);function k(a){var l=e({},a);return t(b,e({},l))}export{k as TUIProfileDefault};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from 'react';
|
|
2
2
|
|
|
3
3
|
interface ToastProps {
|
|
4
4
|
type?: 'info' | 'warn' | 'error';
|
|
@@ -6,6 +6,6 @@ interface ToastProps {
|
|
|
6
6
|
time?: number;
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
declare function Toast<T extends ToastProps>(props:
|
|
9
|
+
declare function Toast<T extends ToastProps>(props: React__default.PropsWithChildren<T>): void;
|
|
10
10
|
|
|
11
11
|
export { Toast };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isThisYear as t,format as e,isToday as r,isYesterday as o,formatDistance as a,isThisWeek as n}from"date-fns";import{zhCN as i,zhTW as c,enGB as f,ja as u,ko as l}from"date-fns/locale";import p from"@tencentcloud/chat";import{TUIStore as s,StoreName as m}from"@tencentcloud/chat-uikit-engine";import"tslib";import"react/jsx-runtime";import"react";import"./Icon/config.js";import"./Icon/type.js";import{defaultGroupAvatarWork as d,defaultUserAvatar as P}from"./Avatar/default.js";function C(t){if("string"==typeof t)try{return!!JSON.parse(t)}catch(t){return!1}return!1}function v(t){return C(t)?JSON.parse(t):t}var y=function(t,e){void 0===e&&(e=p.TYPES.CONV_C2C);var r=t;if(!t)switch(e){case p.TYPES.CONV_C2C:r=P;break;case p.TYPES.CONV_GROUP:default:r=d}return r},S=function(p,s){void 0===s&&(s="en-US");var m={"zh-CN":i,"zh-TW":c,"en-US":f,"ja-JP":u,"ko-KR":l};return p?t(p)?r(p)?e(p,"p",{locale:m[s]}):o(p)?a(p,new Date,{locale:m[s]}):n(p)?e(p,"eeee",{locale:m[s]}):e(p,"MMM dd",{locale:m[s]}):e(p,"yyyy MMM dd",{locale:m[s]}):""};function h(t){var e=s.getData(m.APP,"tasks");t in e&&!e[t]&&(e[t]=!0,s.update(m.APP,"tasks",e))}export{v as JSONStringToParse,h as enableSampleTaskStatus,S as getTimeStamp,y as handleDisplayAvatar,C as isJSON};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
2
|
+
import React__default, { PropsWithChildren } from 'react';
|
|
3
3
|
import { EmptyStateIndicatorProps } from '../components/EmptyStateIndicator/EmptyStateIndicator.js';
|
|
4
4
|
import { TUIMessageProps } from '../components/TUIMessage/TUIMessage.js';
|
|
5
5
|
import { MessageContextProps } from '../components/TUIMessage/MessageContext.js';
|
|
@@ -9,18 +9,18 @@ interface UnknowPorps {
|
|
|
9
9
|
[propsName: string]: any;
|
|
10
10
|
}
|
|
11
11
|
interface ComponentContextValue {
|
|
12
|
-
TUIMessage?:
|
|
13
|
-
TUIChatHeader?:
|
|
14
|
-
EmptyStateIndicator?:
|
|
15
|
-
TUIMessageInput?:
|
|
16
|
-
MessageContext?:
|
|
17
|
-
InputPlugins?:
|
|
18
|
-
MessagePlugins?:
|
|
19
|
-
MessageCustomPlugins?:
|
|
20
|
-
MessageTextPlugins?:
|
|
21
|
-
InputQuote?:
|
|
12
|
+
TUIMessage?: React__default.ComponentType<TUIMessageProps | UnknowPorps>;
|
|
13
|
+
TUIChatHeader?: React__default.ComponentType<TUIChatHeaderDefaultProps>;
|
|
14
|
+
EmptyStateIndicator?: React__default.ComponentType<EmptyStateIndicatorProps>;
|
|
15
|
+
TUIMessageInput?: React__default.ComponentType<UnknowPorps>;
|
|
16
|
+
MessageContext?: React__default.ComponentType<MessageContextProps>;
|
|
17
|
+
InputPlugins?: React__default.ComponentType<UnknowPorps>;
|
|
18
|
+
MessagePlugins?: React__default.ComponentType<UnknowPorps>;
|
|
19
|
+
MessageCustomPlugins?: React__default.ComponentType<UnknowPorps>;
|
|
20
|
+
MessageTextPlugins?: React__default.ComponentType<UnknowPorps>;
|
|
21
|
+
InputQuote?: React__default.ComponentType<UnknowPorps>;
|
|
22
22
|
}
|
|
23
|
-
declare const ComponentContext:
|
|
23
|
+
declare const ComponentContext: React__default.Context<ComponentContextValue | undefined>;
|
|
24
24
|
declare function ComponentProvider({ children, value, }: PropsWithChildren<{
|
|
25
25
|
value: ComponentContextValue;
|
|
26
26
|
}>): react_jsx_runtime.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{useState as n,useLayoutEffect as t,useContext as a,createContext as i}from"react";import{useTranslation as o}from"react-i18next";var u=i(null);function g(a){var i=a.language,g=void 0===i?"en-US":i,m=a.children,c=o().i18n,l=n(g),f=l[0],d=l[1];t((function(){c.changeLanguage(g),d(g)}),[g,c]),t((function(){document.documentElement.lang=g}),[g]);var v={language:f,setLanguage:d};return e(u.Provider,r({value:v},{children:m}))}function m(){var r=a(u);if(!r)throw new Error("useLanguage must be used within a LanguageProvider");return r}export{g as LanguageProvider,m as useLanguage};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Message } from '@tencentcloud/chat';
|
|
3
3
|
import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
4
|
import { OperateMessageParams } from '../components/TUIChat/hooks/useHandleMessage.js';
|
|
5
5
|
|
|
6
6
|
interface TUIChatActionContextValue {
|
|
7
|
-
updateMessage?: (messages:
|
|
7
|
+
updateMessage?: (messages: Message[]) => void;
|
|
8
8
|
setFirstSendMessage?: (message: IMessageModel) => void;
|
|
9
9
|
editLocalMessage?: (message: Message) => void;
|
|
10
10
|
operateMessage?: (data?: OperateMessageParams) => void;
|
|
@@ -15,11 +15,12 @@ interface TUIChatActionContextValue {
|
|
|
15
15
|
setHighlightedMessageId?: (highlightedMessageId: string) => void;
|
|
16
16
|
updateUploadPendingMessageList?: (message?: Message) => void;
|
|
17
17
|
setActiveMessageID?: (messageID: string) => void;
|
|
18
|
+
callButtonClicked?: (callMediaType?: number, callType?: any) => void;
|
|
18
19
|
}
|
|
19
|
-
declare const TUIChatActionContext:
|
|
20
|
+
declare const TUIChatActionContext: React__default.Context<TUIChatActionContextValue | undefined>;
|
|
20
21
|
declare function TUIChatActionProvider({ children, value, }: PropsWithChildren<{
|
|
21
22
|
value: TUIChatActionContextValue;
|
|
22
|
-
}>):
|
|
23
|
+
}>): React__default.ReactElement;
|
|
23
24
|
declare const useTUIChatActionContext: (componentName?: string) => TUIChatActionContextValue;
|
|
24
25
|
|
|
25
26
|
export { TUIChatActionContext, TUIChatActionContextValue, TUIChatActionProvider, useTUIChatActionContext };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { RefObject, MutableRefObject, PropsWithChildren } from 'react';
|
|
2
2
|
import { Conversation, Message } from '@tencentcloud/chat';
|
|
3
|
-
import { OperateMessageParams } from '../components/TUIChat/hooks/useHandleMessage.js';
|
|
4
3
|
import { TUIMessageProps } from '../components/TUIMessage/TUIMessage.js';
|
|
5
|
-
import { TUIMessageInputBasicProps } from '../components/TUIMessageInput/TUIMessageInput.js';
|
|
6
4
|
import { MessageListProps } from '../components/TUIMessageList/TUIMessageList.js';
|
|
5
|
+
import { TUIMessageInputBasicProps } from '../components/TUIMessageInput/TUIMessageInput.js';
|
|
6
|
+
import { OperateMessageParams } from '../components/TUIChat/hooks/useHandleMessage.js';
|
|
7
7
|
|
|
8
8
|
interface TUIChatStateContextValue {
|
|
9
9
|
conversation?: Conversation;
|
|
@@ -28,10 +28,10 @@ interface TUIChatStateContextValue {
|
|
|
28
28
|
firstSendMessage?: Message | null;
|
|
29
29
|
activeMessageID?: string;
|
|
30
30
|
}
|
|
31
|
-
declare const TUIChatStateContext:
|
|
31
|
+
declare const TUIChatStateContext: React__default.Context<TUIChatStateContextValue | null>;
|
|
32
32
|
declare function TUIChatStateContextProvider({ children, value }: PropsWithChildren<{
|
|
33
33
|
value: TUIChatStateContextValue;
|
|
34
|
-
}>):
|
|
34
|
+
}>): React__default.ReactElement;
|
|
35
35
|
declare function useTUIChatStateContext(componentName?: string): TUIChatStateContextValue;
|
|
36
36
|
|
|
37
37
|
export { TUIChatStateContext, TUIChatStateContextProvider, TUIChatStateContextValue, useTUIChatStateContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Friend, Profile, FriendApplication } from '@tencentcloud/chat';
|
|
3
3
|
|
|
4
4
|
interface TUIContactContextValue {
|
|
@@ -7,12 +7,12 @@ interface TUIContactContextValue {
|
|
|
7
7
|
friendApplicationList?: Array<FriendApplication>;
|
|
8
8
|
blockList?: Array<string>;
|
|
9
9
|
isShowContactList?: boolean;
|
|
10
|
-
setShowContactList?:
|
|
10
|
+
setShowContactList?: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
11
11
|
}
|
|
12
|
-
declare const TUIContactContext:
|
|
12
|
+
declare const TUIContactContext: React__default.Context<TUIContactContextValue>;
|
|
13
13
|
declare function TUIContactContextProvider({ children, value }: PropsWithChildren<{
|
|
14
14
|
value: TUIContactContextValue;
|
|
15
|
-
}>):
|
|
15
|
+
}>): React__default.ReactElement;
|
|
16
16
|
declare function useTUIContactContext(componentName?: string): TUIContactContextValue;
|
|
17
17
|
|
|
18
18
|
export { TUIContactContext, TUIContactContextProvider, TUIContactContextValue, useTUIContactContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import o,{useContext as n}from"react";import{TUIConversationList as s}from"../components/TUIConversationList/TUIConversationList.js";import"@tencentcloud/chat";import"@tencentcloud/chat-uikit-engine";import"../components/TUIChat/index.js";import"@tencentcloud/tui-core";import"react-i18next";import"./TUIMessageContext.js";import"../utils/env.js";import"../components/Icon/config.js";import"../components/Icon/type.js";import"date-fns";import"date-fns/locale";import"../constants.js";import"../components/TUIMessage/hooks/useMessageReply.js";import"../components/TUIMessage/MessagePlugins.js";import"../components/TUIMessage/MessageContext.js";import"../components/TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../components/TUIProfile/TUIProfileDefault.js";var r=o.createContext({});function i(o){var n=o.children,i=o.value;return e(r.Provider,t({value:i},{children:n||e(s,{})}))}var m=function(t){var e=n(r);return!e&&t?{}:e};export{r as TUIConversationContext,i as TUIConversationProvider,m as useTUIConversationContext};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { ReactEventHandler, PropsWithChildren } from 'react';
|
|
2
2
|
import { Message } from '@tencentcloud/chat';
|
|
3
3
|
import { MessagePluginsProps } from '../components/TUIMessage/MessagePlugins.js';
|
|
4
4
|
|
|
@@ -11,52 +11,52 @@ declare enum messageShowType {
|
|
|
11
11
|
interface TUIMessageContextValue {
|
|
12
12
|
message?: Message;
|
|
13
13
|
handleDelete?: ReactEventHandler;
|
|
14
|
-
CustemElement?:
|
|
14
|
+
CustemElement?: React__default.ComponentType<{
|
|
15
15
|
message: Message;
|
|
16
16
|
}>;
|
|
17
|
-
TextElement?:
|
|
17
|
+
TextElement?: React__default.ComponentType<{
|
|
18
18
|
message: Message;
|
|
19
19
|
}>;
|
|
20
|
-
ImageElement?:
|
|
20
|
+
ImageElement?: React__default.ComponentType<{
|
|
21
21
|
message: Message;
|
|
22
22
|
}>;
|
|
23
|
-
VideoElement?:
|
|
23
|
+
VideoElement?: React__default.ComponentType<{
|
|
24
24
|
message: Message;
|
|
25
25
|
}>;
|
|
26
|
-
AudioElement?:
|
|
26
|
+
AudioElement?: React__default.ComponentType<{
|
|
27
27
|
message: Message;
|
|
28
28
|
}>;
|
|
29
|
-
FileElement?:
|
|
29
|
+
FileElement?: React__default.ComponentType<{
|
|
30
30
|
message: Message;
|
|
31
31
|
}>;
|
|
32
|
-
MergerElement?:
|
|
32
|
+
MergerElement?: React__default.ComponentType<{
|
|
33
33
|
message: Message;
|
|
34
34
|
}>;
|
|
35
|
-
LocationElement?:
|
|
35
|
+
LocationElement?: React__default.ComponentType<{
|
|
36
36
|
message: Message;
|
|
37
37
|
}>;
|
|
38
|
-
FaceElement?:
|
|
38
|
+
FaceElement?: React__default.ComponentType<{
|
|
39
39
|
message: Message;
|
|
40
40
|
}>;
|
|
41
41
|
filter?: (data: Message) => void;
|
|
42
42
|
isShowTime?: boolean;
|
|
43
43
|
isShowRead?: boolean;
|
|
44
44
|
plugin?: MessagePluginsProps;
|
|
45
|
-
prefix?:
|
|
46
|
-
suffix?:
|
|
47
|
-
customName?:
|
|
45
|
+
prefix?: React__default.ReactElement | string;
|
|
46
|
+
suffix?: React__default.ReactElement | string;
|
|
47
|
+
customName?: React__default.ReactElement;
|
|
48
48
|
showAvatar?: messageShowType;
|
|
49
49
|
showName?: messageShowType;
|
|
50
|
-
customAvatar?:
|
|
50
|
+
customAvatar?: React__default.ReactElement;
|
|
51
51
|
isShowProgress?: boolean;
|
|
52
|
-
Progress?:
|
|
52
|
+
Progress?: React__default.ComponentType<{
|
|
53
53
|
message: Message;
|
|
54
54
|
}>;
|
|
55
55
|
}
|
|
56
|
-
declare const TUIMessageContext:
|
|
56
|
+
declare const TUIMessageContext: React__default.Context<TUIMessageContextValue>;
|
|
57
57
|
declare function TUIMessageContextProvider({ children, value }: PropsWithChildren<{
|
|
58
58
|
value: TUIMessageContextValue;
|
|
59
|
-
}>):
|
|
59
|
+
}>): React__default.ReactElement;
|
|
60
60
|
declare function useTUIMessageContext(componentName?: string): TUIMessageContextValue;
|
|
61
61
|
|
|
62
62
|
export { TUIMessageContext, TUIMessageContextProvider, TUIMessageContextValue, messageShowType, useTUIMessageContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default, { ChangeEventHandler, KeyboardEventHandler, MutableRefObject, PropsWithChildren } from 'react';
|
|
2
2
|
import { MESSAGE_TYPE_NAME } from '../constants.js';
|
|
3
3
|
import { ICursorPos } from '../components/TUIMessageInput/hooks/useMessageInputState.js';
|
|
4
4
|
import { filesData } from '../components/TUIMessageInput/hooks/useUploadPicker.js';
|
|
@@ -14,7 +14,7 @@ interface TUIMessageInputContextValue {
|
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
dispatch?: (params: dispatchParams) => void;
|
|
16
16
|
handleChange?: ChangeEventHandler<HTMLTextAreaElement>;
|
|
17
|
-
handleSubmit?: (event:
|
|
17
|
+
handleSubmit?: (event: React__default.BaseSyntheticEvent) => void;
|
|
18
18
|
handleKeyDown?: KeyboardEventHandler<HTMLTextAreaElement>;
|
|
19
19
|
textareaRef?: MutableRefObject<HTMLTextAreaElement | undefined>;
|
|
20
20
|
onSelectEmoji?: (emoji: EmojiData) => void;
|
|
@@ -27,10 +27,10 @@ interface TUIMessageInputContextValue {
|
|
|
27
27
|
setCursorPos?: (e: ICursorPos) => void;
|
|
28
28
|
pluginConfig?: PluginConfigProps;
|
|
29
29
|
}
|
|
30
|
-
declare const TUIMessageInputContext:
|
|
30
|
+
declare const TUIMessageInputContext: React__default.Context<TUIMessageInputContextValue>;
|
|
31
31
|
declare function TUIMessageInputContextProvider({ children, value }: PropsWithChildren<{
|
|
32
32
|
value: TUIMessageInputContextValue;
|
|
33
|
-
}>):
|
|
33
|
+
}>): React__default.ReactElement;
|
|
34
34
|
declare function useTUIMessageInputContext(componentName?: string): TUIMessageInputContextValue;
|
|
35
35
|
|
|
36
36
|
export { TUIMessageInputContext, TUIMessageInputContextProvider, TUIMessageInputContextValue, useTUIMessageInputContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as r}from"react/jsx-runtime";import{useState as t,useLayoutEffect as o,useContext as i,createContext as n}from"react";var m=n(null),c=["light","dark"];function h(i){var n=i.theme,h=void 0===n?"light":n,s=i.colors,u=i.children;if(-1===c.indexOf(h))throw new Error("Theme ".concat(h," is not supported, please check the supported themes list: [").concat(c.join(", "),"]"));var a=t(h),l=a[0],d=a[1],f=t(s),p=f[0],v=f[1];o((function(){document.documentElement.dataset.uikitTheme=h,d(h)}),[h]);var w={theme:l,colors:p,setTheme:d,setColors:v};return r(m.Provider,e({value:w},{children:u}))}function s(){var e=i(m);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}export{h as ThemeProvider,s as useTheme};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { ChatSDK, Conversation } from '@tencentcloud/chat';
|
|
5
|
+
|
|
6
|
+
interface UIKitProviderProps {
|
|
7
|
+
chat?: ChatSDK;
|
|
8
|
+
language?: string;
|
|
9
|
+
theme?: string;
|
|
10
|
+
colors?: Record<string, string>;
|
|
11
|
+
customClasses?: string;
|
|
12
|
+
activeConversation?: Conversation;
|
|
13
|
+
}
|
|
14
|
+
declare function UIKitProvider(props: PropsWithChildren<UIKitProviderProps>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare const useUIKit: (componentName?: string) => {
|
|
16
|
+
chat: ChatSDK;
|
|
17
|
+
language: string;
|
|
18
|
+
setLanguage: React.Dispatch<React.SetStateAction<string>>;
|
|
19
|
+
theme: string;
|
|
20
|
+
colors: Record<string, string> | undefined;
|
|
21
|
+
setTheme: React.Dispatch<React.SetStateAction<string>>;
|
|
22
|
+
setColors: React.Dispatch<React.SetStateAction<Record<string, string> | undefined>>;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { UIKitProvider, useUIKit };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as t}from"react/jsx-runtime";import{useState as e,useEffect as o,useContext as n,createContext as i}from"react";import{TUILogin as a}from"@tencentcloud/tui-core";import{ThemeProvider as c,useTheme as m}from"./ThemeContext.js";import{LanguageProvider as s,useLanguage as u}from"./LanguageContext.js";import{UIManagerProvider as l}from"./UIManagerContext.js";var h=i(null);function v(n){var i=n.chat,m=void 0===i?a.getContext().chat:i,u=n.language,v=n.theme,f=n.colors,d=n.customClasses,g=n.activeConversation,p=n.children,C=e(m),x=C[0],j=C[1];o((function(){x||j(m)}),[m]);var w={chat:x};return t(s,r({language:u},{children:t(c,r({theme:v,colors:f},{children:t(h.Provider,r({value:w},{children:t(l,r({activeConversation:g,customClasses:d},{children:p}))}))}))}))}var f=function(t){var e=u(),o=m(),i=n(h);if(!i)throw new Error("useUIKit must be used within a UIKitProvider");return r(r(r({},o),e),i)};export{v as UIKitProvider,f as useUIKit};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default, { PropsWithChildren } from 'react';
|
|
3
|
+
import { Conversation, Profile, Friend, FriendApplication } from '@tencentcloud/chat';
|
|
4
|
+
import { IGroupModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
+
|
|
6
|
+
type blockData = {
|
|
7
|
+
type: 'block';
|
|
8
|
+
data: Profile;
|
|
9
|
+
};
|
|
10
|
+
type friendData = {
|
|
11
|
+
type: 'friend';
|
|
12
|
+
data: Friend;
|
|
13
|
+
};
|
|
14
|
+
type friendApplicationData = {
|
|
15
|
+
type: 'friendApplication';
|
|
16
|
+
data: FriendApplication;
|
|
17
|
+
};
|
|
18
|
+
type addFriendData = {
|
|
19
|
+
type: 'addFriend';
|
|
20
|
+
data: Profile;
|
|
21
|
+
};
|
|
22
|
+
type GroupData = {
|
|
23
|
+
type: 'group';
|
|
24
|
+
data: IGroupModel;
|
|
25
|
+
};
|
|
26
|
+
type UseContactParams = blockData | friendData | friendApplicationData | addFriendData | GroupData | undefined;
|
|
27
|
+
type UIManagerContextType = {
|
|
28
|
+
conversation?: Conversation;
|
|
29
|
+
contactData?: UseContactParams;
|
|
30
|
+
customClasses?: unknown;
|
|
31
|
+
myProfile?: Profile;
|
|
32
|
+
TUIManageShow?: boolean;
|
|
33
|
+
TUIProfileShow?: boolean;
|
|
34
|
+
setTUIManageShow: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
35
|
+
setTUIProfileShow: React__default.Dispatch<React__default.SetStateAction<boolean>>;
|
|
36
|
+
setActiveConversation: (conversation?: Conversation) => void;
|
|
37
|
+
setActiveContact: (useContactParams?: UseContactParams) => void;
|
|
38
|
+
};
|
|
39
|
+
type UIManagerProviderProps = {
|
|
40
|
+
customClasses: string;
|
|
41
|
+
activeConversation: Conversation;
|
|
42
|
+
};
|
|
43
|
+
declare function UIManagerProvider(props: PropsWithChildren<Partial<UIManagerProviderProps>>): react_jsx_runtime.JSX.Element;
|
|
44
|
+
declare const useUIManager: (componentName?: string) => UIManagerContextType;
|
|
45
|
+
|
|
46
|
+
export { UIManagerContextType, UIManagerProvider, useUIManager };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__assign as t}from"tslib";import{jsx as n}from"react/jsx-runtime";import o,{useState as e,useEffect as r,useCallback as i,useContext as a}from"react";import{TUIStore as c,StoreName as u}from"@tencentcloud/chat-uikit-engine";import{useUIKit as s}from"./UIKitContext.js";var v=o.createContext(null);function l(o){o.customClasses;var a=o.activeConversation,l=o.children,f=s().chat,h=e(a),m=h[0],w=h[1],C=e(),I=C[0],d=C[1],U=e(),g=U[0],P=U[1],p=e(!1),S=p[0],D=p[1],M=e(!1),x=M[0],T=M[1];r((function(){return c.watch(u.USER,{userProfile:R}),c.watch(u.CONV,{currentConversation:b}),function(){c.unwatch(u.USER,{userProfile:R}),c.unwatch(u.CONV,{currentConversation:b})}}),[]);var E=i((function(t){t&&(null==f||f.setMessageRead({conversationID:t.conversationID})),(null==t?void 0:t.conversationID)!==(null==m?void 0:m.conversationID)&&D(!1),w(t)}),[]);function R(t){P(t)}function b(t){E(null==t?void 0:t.getConversation())}var j={conversation:m,contactData:I,setActiveConversation:E,myProfile:g,TUIManageShow:S,setTUIManageShow:D,TUIProfileShow:x,setTUIProfileShow:T,setActiveContact:function(t){d(t)}};return n(v.Provider,t({value:j},{children:l}))}var f=function(t){var n=a(v);if(!n)throw new Error("useUIManager must be used within a UIManagerProvider");return n};export{l as UIManagerProvider,f as useUIManager};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _tencentcloud_chat from '@tencentcloud/chat';
|
|
2
2
|
|
|
3
3
|
interface CreateGroupConversationParams {
|
|
4
4
|
name: string;
|
|
5
|
-
type?:
|
|
5
|
+
type?: _tencentcloud_chat.TYPES;
|
|
6
6
|
groupID?: string;
|
|
7
7
|
introduction?: string;
|
|
8
8
|
notification?: string;
|