@tencentcloud/chat-uikit-react 2.2.6 → 2.2.8
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/CHANGELOG.md +16 -0
- package/dist/cjs/_virtual/index.js +1 -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 +1 -1
- package/dist/cjs/components/{TUIChat/TUIChat.d.ts → Chat/Chat.d.ts} +11 -10
- package/dist/cjs/components/Chat/Chat.js +1 -0
- package/dist/cjs/components/Chat/ChatState.js +1 -0
- package/dist/cjs/components/Chat/index.js +1 -0
- package/dist/cjs/components/Chat/server.js +1 -0
- package/dist/cjs/components/Chat/utils.js +1 -0
- package/dist/cjs/components/{TUIChatHeader/TUIChatHeader.d.ts → ChatHeader/ChatHeader.d.ts} +4 -3
- package/dist/cjs/components/ChatHeader/ChatHeader.js +1 -0
- package/dist/cjs/components/{TUIChatHeader/TUIChatHeaderDefault.d.ts → ChatHeader/ChatHeaderDefault.d.ts} +4 -3
- package/dist/cjs/components/ChatHeader/ChatHeaderDefault.js +1 -0
- package/dist/cjs/components/ChatSetting/ChatSetting.d.ts +6 -0
- package/dist/cjs/components/ChatSetting/ChatSetting.js +1 -0
- package/dist/cjs/components/Contact/Contact.d.ts +6 -0
- package/dist/cjs/components/Contact/Contact.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/ContactInfo.d.ts +10 -0
- package/dist/cjs/components/Contact/ContactInfo/ContactInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/basicInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/blockInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/friendApplication.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/friendInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/groupInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -0
- package/dist/cjs/components/Contact/ContactList/ContactList.d.ts +6 -0
- package/dist/cjs/components/Contact/ContactList/ContactList.js +1 -0
- package/dist/cjs/components/Contact/hooks/useTUIContact.js +1 -0
- package/dist/cjs/components/ContactSearch/ContactSearch.js +1 -0
- package/dist/cjs/components/ContactSearch/hooks/useContactSearch.js +1 -0
- package/dist/cjs/components/ConversationActions/ConversationActions.d.ts +52 -0
- package/dist/cjs/components/ConversationActions/ConversationActions.js +1 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreate.d.ts +21 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateButton.d.ts +13 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateButton.js +1 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.d.ts +16 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateSelectView.d.ts +15 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.d.ts +18 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.d.ts +24 -0
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.d.ts +14 -0
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationList/ConversationList.d.ts +57 -0
- package/dist/cjs/components/ConversationList/ConversationList.js +1 -0
- package/dist/cjs/components/ConversationList/ConversationListContent/ConversationListContent.d.ts +23 -0
- package/dist/cjs/components/ConversationList/ConversationListContent/ConversationListContent.js +1 -0
- package/dist/cjs/components/ConversationList/ConversationListHeader/ConversationListHeader.d.ts +15 -0
- package/dist/cjs/components/ConversationList/ConversationListHeader/ConversationListHeader.js +1 -0
- package/dist/cjs/components/ConversationPreview/ConversationPreview.d.ts +39 -27
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearch.d.ts +39 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearch.js +1 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.d.ts +7 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.d.ts +29 -0
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.js +1 -0
- package/dist/cjs/components/Icon/Icon.js +1 -1
- package/dist/cjs/components/Icon/config.js +1 -1
- package/dist/cjs/components/Icon/images/mute.svg.js +1 -0
- 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 +5 -1
- package/dist/cjs/components/Icon/type.js +1 -1
- package/dist/cjs/components/Input/Input.d.ts +5 -2
- package/dist/cjs/components/Input/Input.js +1 -1
- package/dist/{esm/components/TUIMessage/TUIMessage.d.ts → cjs/components/MessageElement/Message.d.ts} +1 -1
- package/dist/cjs/components/MessageElement/Message.js +1 -0
- package/dist/cjs/components/MessageElement/MessageAudio.js +1 -0
- package/dist/cjs/components/MessageElement/MessageAvatar.js +1 -0
- package/dist/cjs/components/MessageElement/MessageBubble.js +1 -0
- package/dist/cjs/components/MessageElement/MessageContext.js +1 -0
- package/dist/cjs/components/MessageElement/MessageCustom.js +1 -0
- package/dist/cjs/components/MessageElement/MessageDefault.js +1 -0
- package/dist/cjs/components/MessageElement/MessageName.js +1 -0
- package/dist/cjs/components/MessageElement/MessagePlugins.js +1 -0
- package/dist/cjs/components/MessageElement/MessageProgress.js +1 -0
- package/dist/cjs/components/MessageElement/MessageRevoke.js +1 -0
- package/dist/cjs/components/MessageElement/MessageStatus.js +1 -0
- package/dist/cjs/components/MessageElement/MessageSystem.js +1 -0
- package/dist/cjs/components/MessageElement/MessageText.js +1 -0
- package/dist/cjs/components/MessageElement/MessageTip.js +1 -0
- package/dist/cjs/components/MessageElement/hooks/useMessageHandler.js +1 -0
- package/dist/cjs/components/MessageElement/hooks/useMessageReply.js +1 -0
- package/dist/cjs/components/MessageElement/utils/index.js +1 -0
- package/dist/cjs/components/MessageInput/EmojiPicker.js +1 -0
- package/dist/cjs/components/MessageInput/Forward.js +1 -0
- package/dist/cjs/components/MessageInput/InputPluginsDefalut.js +1 -0
- package/dist/cjs/components/MessageInput/InputQuoteDefalut.js +1 -0
- package/dist/cjs/components/{TUIMessageInput/TUIMessageInput.d.ts → MessageInput/MessageInput.d.ts} +4 -4
- package/dist/cjs/components/MessageInput/MessageInput.js +1 -0
- package/dist/cjs/components/MessageInput/MessageInputDefault.js +1 -0
- package/dist/cjs/components/MessageInput/Transmitter.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useEmojiPicker.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useHandleForwardMessage.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useMessageInputText.js +1 -0
- package/dist/cjs/components/MessageInput/hooks/useUploadPicker.js +1 -0
- package/dist/cjs/components/{TUIMessageList/TUIMessageList.d.ts → MessageList/MessageList.d.ts} +3 -3
- package/dist/cjs/components/MessageList/MessageList.js +1 -0
- package/dist/cjs/components/MessageList/hooks/useMessageListElement.js +1 -0
- package/dist/cjs/components/PlaceHolder/index.d.ts +34 -0
- package/dist/cjs/components/PlaceHolder/index.js +1 -0
- package/dist/cjs/components/Plugins/index.d.ts +5 -2
- package/dist/cjs/components/Profile/Profile.d.ts +10 -0
- package/dist/cjs/components/Profile/Profile.js +1 -1
- package/dist/cjs/components/Profile/ProfileDefault.js +1 -0
- package/dist/cjs/components/Profile/myProfile/MyProfile.js +1 -0
- package/dist/cjs/components/{untils.js → utils.js} +1 -1
- package/dist/cjs/context/{TUIChatActionContext.d.ts → ChatActionContext.d.ts} +3 -2
- package/dist/{esm/context/TUIChatStateContext.d.ts → cjs/context/ChatStateContext.d.ts} +6 -6
- package/dist/cjs/context/ComponentContext.d.ts +3 -3
- package/dist/cjs/context/{TUIContactContext.d.ts → ContactContext.d.ts} +4 -4
- package/dist/cjs/context/ConversationListContext.d.ts +22 -0
- package/dist/cjs/context/ConversationListContext.js +1 -0
- package/dist/cjs/context/LanguageContext.js +1 -1
- package/dist/{esm/context/TUIMessageContext.d.ts → cjs/context/MessageContext.d.ts} +1 -1
- package/dist/{esm/context/TUIMessageInputContext.d.ts → cjs/context/MessageInputContext.d.ts} +4 -4
- package/dist/cjs/context/ThemeContext.js +1 -1
- package/dist/cjs/context/UIKitContext.d.ts +2 -2
- package/dist/cjs/context/UIKitContext.js +1 -1
- package/dist/cjs/hooks/useConversation.d.ts +4 -23
- package/dist/cjs/hooks/useConversation.js +1 -1
- package/dist/cjs/hooks/useLongPress.d.ts +3 -0
- package/dist/cjs/hooks/useLongPress.js +1 -0
- package/dist/cjs/hooks/useMouseHover.js +1 -0
- package/dist/cjs/index.css +2 -1
- package/dist/cjs/index.d.css +1376 -568
- package/dist/cjs/index.d.ts +41 -29
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/TUIConversation.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/ja-JP/TUIConversation.js +1 -1
- package/dist/cjs/locales/ja-JP/index.js +1 -1
- package/dist/cjs/locales/ko-KR/TUIConversation.js +1 -1
- package/dist/cjs/locales/ko-KR/index.js +1 -1
- package/dist/cjs/locales/zh-CN/TUIConversation.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/_virtual/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 +1 -1
- package/dist/esm/components/{TUIChat/TUIChat.d.ts → Chat/Chat.d.ts} +11 -10
- package/dist/esm/components/Chat/Chat.js +1 -0
- package/dist/esm/components/Chat/ChatState.js +1 -0
- package/dist/esm/components/Chat/index.js +1 -0
- package/dist/esm/components/Chat/server.js +1 -0
- package/dist/esm/components/Chat/utils.js +1 -0
- package/dist/esm/components/{TUIChatHeader/TUIChatHeader.d.ts → ChatHeader/ChatHeader.d.ts} +4 -3
- package/dist/esm/components/ChatHeader/ChatHeader.js +1 -0
- package/dist/esm/components/{TUIChatHeader/TUIChatHeaderDefault.d.ts → ChatHeader/ChatHeaderDefault.d.ts} +4 -3
- package/dist/esm/components/ChatHeader/ChatHeaderDefault.js +1 -0
- package/dist/esm/components/ChatSetting/ChatSetting.d.ts +6 -0
- package/dist/esm/components/ChatSetting/ChatSetting.js +1 -0
- package/dist/esm/components/Contact/Contact.d.ts +6 -0
- package/dist/esm/components/Contact/Contact.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/ContactInfo.d.ts +10 -0
- package/dist/esm/components/Contact/ContactInfo/ContactInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/basicInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/blockInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/friendApplication.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/friendInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/groupInfo.js +1 -0
- package/dist/esm/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -0
- package/dist/esm/components/Contact/ContactList/ContactList.d.ts +6 -0
- package/dist/esm/components/Contact/ContactList/ContactList.js +1 -0
- package/dist/esm/components/Contact/hooks/useTUIContact.js +1 -0
- package/dist/esm/components/ContactSearch/ContactSearch.js +1 -0
- package/dist/esm/components/ContactSearch/hooks/useContactSearch.js +1 -0
- package/dist/esm/components/ConversationActions/ConversationActions.d.ts +52 -0
- package/dist/esm/components/ConversationActions/ConversationActions.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreate.d.ts +21 -0
- package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateButton.d.ts +13 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateButton.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.d.ts +16 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateSelectView.d.ts +15 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.d.ts +18 -0
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.d.ts +24 -0
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.d.ts +14 -0
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/esm/components/ConversationList/ConversationList.d.ts +57 -0
- package/dist/esm/components/ConversationList/ConversationList.js +1 -0
- package/dist/esm/components/ConversationList/ConversationListContent/ConversationListContent.d.ts +23 -0
- package/dist/esm/components/ConversationList/ConversationListContent/ConversationListContent.js +1 -0
- package/dist/esm/components/ConversationList/ConversationListHeader/ConversationListHeader.d.ts +15 -0
- package/dist/esm/components/ConversationList/ConversationListHeader/ConversationListHeader.js +1 -0
- package/dist/esm/components/ConversationPreview/ConversationPreview.d.ts +39 -27
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearch.d.ts +39 -0
- package/dist/esm/components/ConversationSearch/ConversationSearch.js +1 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.d.ts +7 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.d.ts +29 -0
- package/dist/esm/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.js +1 -0
- package/dist/esm/components/Icon/Icon.js +1 -1
- package/dist/esm/components/Icon/config.js +1 -1
- package/dist/esm/components/Icon/images/mute.svg.js +1 -0
- 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 +5 -1
- package/dist/esm/components/Icon/type.js +1 -1
- package/dist/esm/components/Input/Input.d.ts +5 -2
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/{cjs/components/TUIMessage/TUIMessage.d.ts → esm/components/MessageElement/Message.d.ts} +1 -1
- package/dist/esm/components/MessageElement/Message.js +1 -0
- package/dist/esm/components/MessageElement/MessageAudio.js +1 -0
- package/dist/esm/components/MessageElement/MessageAvatar.js +1 -0
- package/dist/esm/components/MessageElement/MessageBubble.js +1 -0
- package/dist/esm/components/MessageElement/MessageContext.js +1 -0
- package/dist/esm/components/MessageElement/MessageCustom.js +1 -0
- package/dist/esm/components/MessageElement/MessageDefault.js +1 -0
- package/dist/esm/components/MessageElement/MessageName.js +1 -0
- package/dist/esm/components/MessageElement/MessagePlugins.js +1 -0
- package/dist/esm/components/MessageElement/MessageProgress.js +1 -0
- package/dist/esm/components/MessageElement/MessageRevoke.js +1 -0
- package/dist/esm/components/MessageElement/MessageStatus.js +1 -0
- package/dist/esm/components/MessageElement/MessageSystem.js +1 -0
- package/dist/esm/components/MessageElement/MessageText.js +1 -0
- package/dist/esm/components/MessageElement/MessageTip.js +1 -0
- package/dist/esm/components/MessageElement/hooks/useMessageHandler.js +1 -0
- package/dist/esm/components/MessageElement/hooks/useMessageReply.js +1 -0
- package/dist/esm/components/MessageElement/utils/index.js +1 -0
- package/dist/esm/components/MessageInput/EmojiPicker.js +1 -0
- package/dist/esm/components/MessageInput/Forward.js +1 -0
- package/dist/esm/components/MessageInput/InputPluginsDefalut.js +1 -0
- package/dist/esm/components/MessageInput/InputQuoteDefalut.js +1 -0
- package/dist/esm/components/{TUIMessageInput/TUIMessageInput.d.ts → MessageInput/MessageInput.d.ts} +4 -4
- package/dist/esm/components/MessageInput/MessageInput.js +1 -0
- package/dist/esm/components/MessageInput/MessageInputDefault.js +1 -0
- package/dist/esm/components/MessageInput/Transmitter.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useEmojiPicker.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useHandleForwardMessage.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useMessageInputText.js +1 -0
- package/dist/esm/components/MessageInput/hooks/useUploadPicker.js +1 -0
- package/dist/esm/components/{TUIMessageList/TUIMessageList.d.ts → MessageList/MessageList.d.ts} +3 -3
- package/dist/esm/components/MessageList/MessageList.js +1 -0
- package/dist/esm/components/MessageList/hooks/useMessageListElement.js +1 -0
- package/dist/esm/components/PlaceHolder/index.d.ts +34 -0
- package/dist/esm/components/PlaceHolder/index.js +1 -0
- package/dist/esm/components/Plugins/index.d.ts +5 -2
- package/dist/esm/components/Profile/Profile.d.ts +10 -0
- package/dist/esm/components/Profile/Profile.js +1 -1
- package/dist/esm/components/Profile/ProfileDefault.js +1 -0
- package/dist/esm/components/Profile/myProfile/MyProfile.js +1 -0
- package/dist/esm/components/utils.js +1 -0
- package/dist/esm/context/{TUIChatActionContext.d.ts → ChatActionContext.d.ts} +3 -2
- package/dist/{cjs/context/TUIChatStateContext.d.ts → esm/context/ChatStateContext.d.ts} +6 -6
- package/dist/esm/context/ComponentContext.d.ts +3 -3
- package/dist/esm/context/{TUIContactContext.d.ts → ContactContext.d.ts} +4 -4
- package/dist/esm/context/ConversationListContext.d.ts +22 -0
- package/dist/esm/context/ConversationListContext.js +1 -0
- package/dist/esm/context/LanguageContext.js +1 -1
- package/dist/{cjs/context/TUIMessageContext.d.ts → esm/context/MessageContext.d.ts} +1 -1
- package/dist/{cjs/context/TUIMessageInputContext.d.ts → esm/context/MessageInputContext.d.ts} +4 -4
- package/dist/esm/context/ThemeContext.js +1 -1
- package/dist/esm/context/UIKitContext.d.ts +2 -2
- package/dist/esm/context/UIKitContext.js +1 -1
- package/dist/esm/hooks/useConversation.d.ts +4 -23
- package/dist/esm/hooks/useConversation.js +1 -1
- package/dist/esm/hooks/useLongPress.d.ts +3 -0
- package/dist/esm/hooks/useLongPress.js +1 -0
- package/dist/esm/hooks/useMouseHover.js +1 -0
- package/dist/esm/index.css +2 -1
- package/dist/esm/index.d.css +1376 -568
- package/dist/esm/index.d.ts +41 -29
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/TUIConversation.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/ja-JP/TUIConversation.js +1 -1
- package/dist/esm/locales/ja-JP/index.js +1 -1
- package/dist/esm/locales/ko-KR/TUIConversation.js +1 -1
- package/dist/esm/locales/ko-KR/index.js +1 -1
- package/dist/esm/locales/zh-CN/TUIConversation.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 +3 -1
- 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/Avatar.tsx +33 -31
- package/src/components/Avatar/styles/index.scss +11 -4
- package/src/components/{TUIChat/TUIChat.tsx → Chat/Chat.tsx} +50 -46
- package/src/components/{TUIChat/TUIChatState.tsx → Chat/ChatState.tsx} +41 -41
- package/src/components/{TUIChat → Chat}/hooks/useHandleMessage.tsx +1 -1
- package/src/components/{TUIChat → Chat}/hooks/useHandleMessageList.tsx +1 -1
- package/src/components/Chat/index.ts +5 -0
- package/src/components/Chat/server.ts +44 -0
- package/src/components/{TUIChat → Chat}/styles/layout.scss +7 -2
- package/src/components/Chat/utils.ts +72 -0
- package/src/components/{TUIChatHeader/TUIChatHeader.tsx → ChatHeader/ChatHeader.tsx} +14 -11
- package/src/components/{TUIChatHeader/TUIChatHeaderDefault.tsx → ChatHeader/ChatHeaderDefault.tsx} +72 -29
- package/src/components/ChatHeader/index.ts +2 -0
- package/src/components/{TUIChatHeader → ChatHeader}/styles/layout.scss +12 -13
- package/src/components/{TUIManage/TUIManage.tsx → ChatSetting/ChatSetting.tsx} +17 -20
- package/src/components/ChatSetting/index.ts +1 -0
- package/src/components/{TUIManage → ChatSetting}/styles/index.scss +24 -16
- package/src/components/Checkbox/index.tsx +9 -9
- package/src/components/Checkbox/styles/color.scss +17 -6
- package/src/components/{TUIContact/TUIContact.tsx → Contact/Contact.tsx} +35 -35
- package/src/components/{TUIContact/TUIContactInfo/TUIContactInfo.tsx → Contact/ContactInfo/ContactInfo.tsx} +4 -4
- package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/index.scss +44 -21
- package/src/components/{TUIContact/TUIContactList/TUIContactList.tsx → Contact/ContactList/ContactList.tsx} +78 -74
- package/src/components/{TUIContact/TUIContactList → Contact/ContactList}/index.scss +40 -20
- package/src/components/{TUIContact → Contact}/hooks/useTUIContact.tsx +3 -3
- package/src/components/{TUIContact → Contact}/index.scss +30 -11
- package/src/components/Contact/index.ts +3 -0
- package/src/components/{TUIContactSearch/TUIContactSearch.tsx → ContactSearch/ContactSearch.tsx} +8 -7
- package/src/components/{TUIContactSearch → ContactSearch}/index.scss +12 -3
- package/src/components/ConversationActions/ConversationActions.scss +45 -0
- package/src/components/ConversationActions/ConversationActions.tsx +172 -0
- package/src/components/ConversationActions/index.ts +1 -0
- package/src/components/ConversationCreate/ConversationCreate.tsx +104 -49
- package/src/components/ConversationCreate/ConversationCreateButton.tsx +46 -0
- package/src/components/ConversationCreate/ConversationCreateGroupDetail.tsx +179 -0
- package/src/components/ConversationCreate/ConversationCreateSelectView.tsx +7 -7
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +31 -29
- package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +19 -19
- package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +38 -31
- package/src/components/ConversationCreate/index.ts +2 -1
- package/src/components/ConversationCreate/styles/{ConversationCreatGroupDetail.scss → ConversationCreateGroupDetail.scss} +13 -17
- package/src/components/ConversationCreate/styles/conversationCreateButton.scss +5 -0
- 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 +64 -19
- package/src/components/ConversationList/ConversationList.scss +29 -0
- package/src/components/ConversationList/ConversationList.tsx +155 -0
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +16 -0
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.tsx +63 -0
- package/src/components/ConversationList/ConversationListContent/index.ts +1 -0
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.scss +28 -0
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.tsx +43 -0
- package/src/components/ConversationList/ConversationListHeader/index.ts +1 -0
- package/src/components/ConversationList/index.ts +3 -0
- package/src/components/ConversationPreview/ConversationPreview.scss +137 -0
- package/src/components/ConversationPreview/ConversationPreview.tsx +245 -63
- package/src/components/ConversationPreview/index.ts +0 -1
- package/src/components/ConversationPreview/utils.tsx +80 -61
- package/src/components/ConversationSearch/ConversationSearch.scss +22 -0
- package/src/components/ConversationSearch/ConversationSearch.tsx +125 -0
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.scss +13 -0
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.tsx +42 -0
- package/src/components/ConversationSearch/ConversationSearchInput/index.ts +1 -0
- package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.scss +15 -0
- package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.tsx +72 -0
- package/src/components/ConversationSearch/ConversationSearchResult/index.ts +1 -0
- package/src/components/ConversationSearch/index.ts +3 -2
- package/src/components/DivWithEdit/styles/index.scss +30 -10
- package/src/components/EmptyStateIndicator/EmptyStateIndicator.tsx +2 -3
- package/src/components/Icon/Icon.tsx +8 -8
- package/src/components/Icon/config.ts +23 -4
- package/src/components/Icon/images/mute.svg +8 -0
- package/src/components/Icon/images/video-call.svg +3 -0
- package/src/components/Icon/images/voice-call.svg +3 -0
- package/src/components/Icon/styles/index.scss +41 -6
- package/src/components/Icon/type.ts +4 -0
- package/src/components/Input/Input.tsx +24 -23
- package/src/components/Input/styles/index.scss +22 -6
- package/src/components/{TUIMessage/TUIMessage.tsx → MessageElement/Message.tsx} +33 -33
- package/src/components/{TUIMessage → MessageElement}/MessageAvatar.tsx +7 -7
- package/src/components/{TUIMessage → MessageElement}/MessageBubble.tsx +22 -21
- package/src/components/{TUIMessage → MessageElement}/MessageCustom.tsx +26 -5
- package/src/components/{TUIMessage/TUIMessageDefault.tsx → MessageElement/MessageDefault.tsx} +24 -24
- package/src/components/{TUIMessage → MessageElement}/MessagePlugins.tsx +18 -18
- package/src/components/{TUIMessage → MessageElement}/MessageStatus.tsx +5 -5
- package/src/components/{TUIMessage → MessageElement}/hooks/useMessageHandler.ts +6 -6
- package/src/components/{TUIMessage → MessageElement}/hooks/useMessageReply.ts +6 -5
- package/src/components/{TUIMessage → MessageElement}/index.ts +1 -1
- package/src/components/{TUIMessage → MessageElement}/styles/color.scss +6 -5
- package/src/components/{TUIMessage → MessageElement}/styles/layout.scss +112 -43
- package/src/components/{TUIMessage → MessageElement}/utils/index.ts +23 -12
- package/src/components/{TUIMessageInput → MessageInput}/EmojiPicker.tsx +2 -2
- package/src/components/{TUIMessageInput/TUIForward.tsx → MessageInput/Forward.tsx} +41 -36
- package/src/components/{TUIMessageInput → MessageInput}/InputPluginsDefalut.tsx +14 -14
- package/src/components/{TUIMessageInput → MessageInput}/InputQuoteDefalut.tsx +1 -1
- package/src/components/{TUIMessageInput/TUIMessageInput.tsx → MessageInput/MessageInput.tsx} +25 -27
- package/src/components/{TUIMessageInput/TUIMessageInputDefault.tsx → MessageInput/MessageInputDefault.tsx} +14 -14
- package/src/components/{TUIMessageInput → MessageInput}/Transmitter.tsx +2 -2
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useEmojiPicker.tsx +1 -1
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useHandleForwardMessage.tsx +5 -4
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.tsx +1 -1
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputText.tsx +14 -14
- package/src/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.tsx +4 -4
- package/src/components/MessageInput/index.ts +3 -0
- package/src/components/MessageInput/styles/color.scss +40 -0
- package/src/components/{TUIMessageInput → MessageInput}/styles/layout.scss +33 -17
- package/src/components/{TUIMessageList/TUIMessageList.tsx → MessageList/MessageList.tsx} +5 -5
- package/src/components/{TUIMessageList → MessageList}/hooks/useMessageListElement.tsx +14 -10
- package/src/components/MessageList/index.ts +1 -0
- package/src/components/{TUIMessageList → MessageList}/styles/layout.scss +16 -9
- package/src/components/PlaceHolder/index.tsx +79 -0
- package/src/components/PlaceHolder/styles/index.scss +36 -0
- package/src/components/Plugins/index.tsx +49 -45
- package/src/components/Plugins/styles/color.scss +3 -11
- package/src/components/Profile/Profile.tsx +46 -21
- package/src/components/{TUIProfile/TUIProfileDefault.tsx → Profile/ProfileDefault.tsx} +12 -11
- package/src/components/Profile/index.ts +2 -1
- package/src/components/Profile/myProfile/MyProfile.tsx +25 -0
- package/src/components/Profile/myProfile/index.ts +1 -0
- package/src/components/Profile/myProfile/styles/index.scss +32 -0
- package/src/components/Profile/styles/color.scss +7 -0
- package/src/components/Profile/styles/index.scss +2 -23
- package/src/components/{TUIProfile → Profile}/styles/layout.scss +17 -14
- package/src/components/index.ts +13 -11
- package/src/components/{untils.ts → utils.ts} +5 -4
- package/src/context/{TUIChatActionContext.tsx → ChatActionContext.tsx} +15 -14
- package/src/context/ChatStateContext.tsx +49 -0
- package/src/context/ComponentContext.tsx +13 -13
- package/src/context/{TUIContactContext.tsx → ContactContext.tsx} +10 -11
- package/src/context/ConversationListContext.tsx +113 -0
- package/src/context/LanguageContext.tsx +6 -4
- package/src/context/MessageContext.tsx +55 -0
- package/src/context/MessageInputContext.tsx +54 -0
- package/src/context/ThemeContext.tsx +12 -5
- package/src/context/UIKitContext.tsx +11 -2
- package/src/context/index.ts +6 -5
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useConversation.tsx +26 -74
- package/src/hooks/useLongPress.tsx +117 -0
- package/src/hooks/useMouseHover.tsx +21 -0
- package/src/locales/en-US/TUIConversation.ts +4 -0
- package/src/locales/en-US/index.ts +0 -3
- package/src/locales/index.ts +16 -2
- package/src/locales/ja-JP/TUIConversation.ts +4 -0
- package/src/locales/ja-JP/index.ts +0 -2
- package/src/locales/ko-KR/TUIConversation.ts +4 -0
- package/src/locales/ko-KR/index.ts +0 -2
- package/src/locales/zh-CN/TUIConversation.ts +4 -0
- 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 +36 -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 +32 -21
- package/src/styles/normalize.scss +6 -0
- package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +0 -1
- package/dist/cjs/components/ConversationPreview/ConversationListContainer.d.ts +0 -10
- package/dist/cjs/components/ConversationPreview/ConversationListContainer.js +0 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.d.ts +0 -10
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +0 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput.d.ts +0 -6
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput.js +0 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.d.ts +0 -12
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.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/TUIChat.js +0 -1
- package/dist/cjs/components/TUIChat/TUIChatState.js +0 -1
- package/dist/cjs/components/TUIChat/unitls.js +0 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeader.js +0 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContact.d.ts +0 -6
- package/dist/cjs/components/TUIContact/TUIContact.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +0 -10
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/groupInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +0 -1
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +0 -6
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +0 -1
- package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +0 -1
- package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +0 -1
- package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +0 -1
- package/dist/cjs/components/TUIConversation/TUIConversation.d.ts +0 -12
- package/dist/cjs/components/TUIConversation/TUIConversation.js +0 -1
- package/dist/cjs/components/TUIConversationList/TUIConversationList.d.ts +0 -19
- package/dist/cjs/components/TUIConversationList/TUIConversationList.js +0 -1
- package/dist/cjs/components/TUIConversationList/hooks/useConversationList.js +0 -1
- package/dist/cjs/components/TUIConversationList/hooks/useConversationUpdate.js +0 -1
- package/dist/cjs/components/TUIManage/TUIManage.d.ts +0 -6
- package/dist/cjs/components/TUIManage/TUIManage.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageAudio.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageAvatar.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageBubble.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageContext.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageCustom.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageName.js +0 -1
- package/dist/cjs/components/TUIMessage/MessagePlugins.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageProgress.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageRevoke.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageStatus.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageSystem.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageText.js +0 -1
- package/dist/cjs/components/TUIMessage/MessageTip.js +0 -1
- package/dist/cjs/components/TUIMessage/TUIMessage.js +0 -1
- package/dist/cjs/components/TUIMessage/TUIMessageDefault.js +0 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +0 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageReply.js +0 -1
- package/dist/cjs/components/TUIMessage/utils/index.js +0 -1
- package/dist/cjs/components/TUIMessageInput/EmojiPicker.js +0 -1
- package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +0 -1
- package/dist/cjs/components/TUIMessageInput/InputQuoteDefalut.js +0 -1
- package/dist/cjs/components/TUIMessageInput/TUIForward.js +0 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +0 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +0 -1
- package/dist/cjs/components/TUIMessageInput/Transmitter.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleForwardMessage.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useMessageInputText.js +0 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useUploadPicker.js +0 -1
- package/dist/cjs/components/TUIMessageList/TUIMessageList.js +0 -1
- package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +0 -1
- package/dist/cjs/components/TUIProfile/TUIProfile.d.ts +0 -10
- package/dist/cjs/components/TUIProfile/TUIProfile.js +0 -1
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +0 -1
- package/dist/cjs/context/TUIConversationContext.js +0 -1
- package/dist/cjs/locales/en-US/TUIGlobal.js +0 -1
- package/dist/cjs/locales/ja-JP/TUIGlobal.js +0 -1
- package/dist/cjs/locales/ko-KR/TUIGlobal.js +0 -1
- package/dist/cjs/locales/zh-CN/TUIGlobal.js +0 -1
- package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +0 -1
- package/dist/esm/components/ConversationPreview/ConversationListContainer.d.ts +0 -10
- package/dist/esm/components/ConversationPreview/ConversationListContainer.js +0 -1
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.d.ts +0 -10
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +0 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchInput.d.ts +0 -6
- package/dist/esm/components/ConversationSearch/ConversationSearchInput.js +0 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.d.ts +0 -12
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.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/TUIChat.js +0 -1
- package/dist/esm/components/TUIChat/TUIChatState.js +0 -1
- package/dist/esm/components/TUIChat/unitls.js +0 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeader.js +0 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +0 -1
- package/dist/esm/components/TUIContact/TUIContact.d.ts +0 -6
- package/dist/esm/components/TUIContact/TUIContact.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +0 -10
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/groupInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +0 -1
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +0 -6
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +0 -1
- package/dist/esm/components/TUIContact/hooks/useTUIContact.js +0 -1
- package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +0 -1
- package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +0 -1
- package/dist/esm/components/TUIConversation/TUIConversation.d.ts +0 -12
- package/dist/esm/components/TUIConversation/TUIConversation.js +0 -1
- package/dist/esm/components/TUIConversationList/TUIConversationList.d.ts +0 -19
- package/dist/esm/components/TUIConversationList/TUIConversationList.js +0 -1
- package/dist/esm/components/TUIConversationList/hooks/useConversationList.js +0 -1
- package/dist/esm/components/TUIConversationList/hooks/useConversationUpdate.js +0 -1
- package/dist/esm/components/TUIManage/TUIManage.d.ts +0 -6
- package/dist/esm/components/TUIManage/TUIManage.js +0 -1
- package/dist/esm/components/TUIMessage/MessageAudio.js +0 -1
- package/dist/esm/components/TUIMessage/MessageAvatar.js +0 -1
- package/dist/esm/components/TUIMessage/MessageBubble.js +0 -1
- package/dist/esm/components/TUIMessage/MessageContext.js +0 -1
- package/dist/esm/components/TUIMessage/MessageCustom.js +0 -1
- package/dist/esm/components/TUIMessage/MessageName.js +0 -1
- package/dist/esm/components/TUIMessage/MessagePlugins.js +0 -1
- package/dist/esm/components/TUIMessage/MessageProgress.js +0 -1
- package/dist/esm/components/TUIMessage/MessageRevoke.js +0 -1
- package/dist/esm/components/TUIMessage/MessageStatus.js +0 -1
- package/dist/esm/components/TUIMessage/MessageSystem.js +0 -1
- package/dist/esm/components/TUIMessage/MessageText.js +0 -1
- package/dist/esm/components/TUIMessage/MessageTip.js +0 -1
- package/dist/esm/components/TUIMessage/TUIMessage.js +0 -1
- package/dist/esm/components/TUIMessage/TUIMessageDefault.js +0 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +0 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageReply.js +0 -1
- package/dist/esm/components/TUIMessage/utils/index.js +0 -1
- package/dist/esm/components/TUIMessageInput/EmojiPicker.js +0 -1
- package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +0 -1
- package/dist/esm/components/TUIMessageInput/InputQuoteDefalut.js +0 -1
- package/dist/esm/components/TUIMessageInput/TUIForward.js +0 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +0 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +0 -1
- package/dist/esm/components/TUIMessageInput/Transmitter.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleForwardMessage.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useHandleQuoteMessage.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useMessageInputText.js +0 -1
- package/dist/esm/components/TUIMessageInput/hooks/useUploadPicker.js +0 -1
- package/dist/esm/components/TUIMessageList/TUIMessageList.js +0 -1
- package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +0 -1
- package/dist/esm/components/TUIProfile/TUIProfile.d.ts +0 -10
- package/dist/esm/components/TUIProfile/TUIProfile.js +0 -1
- package/dist/esm/components/TUIProfile/TUIProfileDefault.js +0 -1
- package/dist/esm/components/untils.js +0 -1
- package/dist/esm/context/TUIConversationContext.js +0 -1
- package/dist/esm/locales/en-US/TUIGlobal.js +0 -1
- package/dist/esm/locales/ja-JP/TUIGlobal.js +0 -1
- package/dist/esm/locales/ko-KR/TUIGlobal.js +0 -1
- package/dist/esm/locales/zh-CN/TUIGlobal.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/ConversationCreate/ConversationCreatGroupDetail.tsx +0 -170
- package/src/components/ConversationPreview/ConversationListContainer.tsx +0 -20
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +0 -190
- package/src/components/ConversationPreview/styles/index.scss +0 -171
- package/src/components/ConversationSearch/ConversationSearchInput.tsx +0 -27
- package/src/components/ConversationSearch/ConversationSearchResult.tsx +0 -39
- package/src/components/ConversationSearch/styles/index.scss +0 -20
- package/src/components/TUIChat/index.ts +0 -2
- package/src/components/TUIChat/unitls.ts +0 -39
- package/src/components/TUIChatHeader/index.ts +0 -2
- package/src/components/TUIContact/index.ts +0 -3
- package/src/components/TUIConversation/TUIConversation.tsx +0 -46
- package/src/components/TUIConversation/index.ts +0 -1
- package/src/components/TUIConversationList/TUIConversationList.tsx +0 -178
- package/src/components/TUIConversationList/hooks/useConversationList.tsx +0 -42
- package/src/components/TUIConversationList/hooks/useConversationUpdate.tsx +0 -38
- package/src/components/TUIConversationList/index.scss +0 -59
- package/src/components/TUIConversationList/index.ts +0 -2
- package/src/components/TUIManage/index.ts +0 -1
- package/src/components/TUIMessageInput/index.ts +0 -3
- package/src/components/TUIMessageInput/styles/color.scss +0 -36
- package/src/components/TUIMessageList/index.ts +0 -1
- package/src/components/TUIProfile/TUIProfile.tsx +0 -50
- package/src/components/TUIProfile/index.ts +0 -2
- package/src/components/TUIProfile/styles/color.scss +0 -6
- package/src/components/TUIProfile/styles/index.scss +0 -2
- package/src/context/TUIChatStateContext.tsx +0 -50
- package/src/context/TUIConversationContext.tsx +0 -29
- package/src/context/TUIMessageContext.tsx +0 -56
- package/src/context/TUIMessageInputContext.tsx +0 -55
- package/src/locales/en-US/TUIGlobal.ts +0 -6
- package/src/locales/ja-JP/TUIGlobal.ts +0 -6
- package/src/locales/ko-KR/TUIGlobal.ts +0 -6
- package/src/locales/zh-CN/TUIGlobal.ts +0 -6
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useCreateTUIChatStateContext.js +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useHandleMessage.d.ts +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useHandleMessage.js +0 -0
- /package/dist/cjs/components/{TUIChat → Chat}/hooks/useHandleMessageList.js +0 -0
- /package/dist/cjs/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageContext.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageFace.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageFile.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageImage.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageLocation.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageMerger.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessagePlugins.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/MessageVideo.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/hooks/useMessagePluginElement.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/utils/decodeText.js +0 -0
- /package/dist/cjs/components/{TUIMessage → MessageElement}/utils/emojiMap.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/InputPluginsDefalut.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessageInput/TUIMessageInputDefault.d.ts → MessageInput/MessageInputDefault.d.ts} +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useEmojiPicker.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.d.ts +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useUploadElement.js +0 -0
- /package/dist/cjs/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.d.ts +0 -0
- /package/dist/cjs/components/{TUIProfile/TUIProfileDefault.d.ts → Profile/ProfileDefault.d.ts} +0 -0
- /package/dist/cjs/components/{TUIProfile → Profile}/hooks/useMyProfile.js +0 -0
- /package/dist/cjs/context/{TUIChatActionContext.js → ChatActionContext.js} +0 -0
- /package/dist/cjs/context/{TUIChatStateContext.js → ChatStateContext.js} +0 -0
- /package/dist/cjs/context/{TUIContactContext.js → ContactContext.js} +0 -0
- /package/dist/cjs/context/{TUIMessageContext.js → MessageContext.js} +0 -0
- /package/dist/cjs/context/{TUIMessageInputContext.js → MessageInputContext.js} +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useCreateTUIChatStateContext.js +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useHandleMessage.d.ts +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useHandleMessage.js +0 -0
- /package/dist/esm/components/{TUIChat → Chat}/hooks/useHandleMessageList.js +0 -0
- /package/dist/esm/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageContext.d.ts +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageFace.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageFile.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageImage.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageLocation.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageMerger.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessagePlugins.d.ts +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/MessageVideo.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/hooks/useMessagePluginElement.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/utils/decodeText.js +0 -0
- /package/dist/esm/components/{TUIMessage → MessageElement}/utils/emojiMap.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/InputPluginsDefalut.d.ts +0 -0
- /package/dist/esm/components/{TUIMessageInput/TUIMessageInputDefault.d.ts → MessageInput/MessageInputDefault.d.ts} +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useEmojiPicker.d.ts +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.d.ts +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useMessageInputState.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useUploadElement.js +0 -0
- /package/dist/esm/components/{TUIMessageInput → MessageInput}/hooks/useUploadPicker.d.ts +0 -0
- /package/dist/esm/components/{TUIProfile/TUIProfileDefault.d.ts → Profile/ProfileDefault.d.ts} +0 -0
- /package/dist/esm/components/{TUIProfile → Profile}/hooks/useMyProfile.js +0 -0
- /package/dist/esm/context/{TUIChatActionContext.js → ChatActionContext.js} +0 -0
- /package/dist/esm/context/{TUIChatStateContext.js → ChatStateContext.js} +0 -0
- /package/dist/esm/context/{TUIContactContext.js → ContactContext.js} +0 -0
- /package/dist/esm/context/{TUIMessageContext.js → MessageContext.js} +0 -0
- /package/dist/esm/context/{TUIMessageInputContext.js → MessageInputContext.js} +0 -0
- /package/src/components/{TUIChat → Chat}/hooks/useCreateTUIChatStateContext.tsx +0 -0
- /package/src/components/{TUIChat → Chat}/hooks/useIsMounted.ts +0 -0
- /package/src/components/{TUIChat → Chat}/styles/index.scss +0 -0
- /package/src/components/{TUIChatHeader → ChatHeader}/styles/color.scss +0 -0
- /package/src/components/{TUIChatHeader → ChatHeader}/styles/index.scss +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/addFriendInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/basicInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/blockInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/friendApplication.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/friendInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/groupInfo.tsx +0 -0
- /package/src/components/{TUIContact/TUIContactInfo → Contact/ContactInfo}/hooks/useContactInfo.tsx +0 -0
- /package/src/components/{TUIContactSearch → ContactSearch}/hooks/useContactSearch.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageAudio.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageContext.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageFace.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageFile.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageImage.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageLocation.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageMerger.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageName.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageProgress.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageRevoke.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageSystem.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageText.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageTip.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/MessageVideo.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/index.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/useMessageContextHandler.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/hooks/useMessagePluginElement.tsx +0 -0
- /package/src/components/{TUIMessage → MessageElement}/styles/index.scss +0 -0
- /package/src/components/{TUIMessage → MessageElement}/utils/decodeText.ts +0 -0
- /package/src/components/{TUIMessage → MessageElement}/utils/emojiMap.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/index.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useCreateMessageInputContext.ts +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useHandleQuoteMessage.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/usePluginsElement.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/hooks/useUploadElement.tsx +0 -0
- /package/src/components/{TUIMessageInput → MessageInput}/styles/index.scss +0 -0
- /package/src/components/{TUIMessageList → MessageList}/styles/color.scss +0 -0
- /package/src/components/{TUIMessageList → MessageList}/styles/index.scss +0 -0
- /package/src/components/{TUIProfile → Profile}/hooks/index.ts +0 -0
- /package/src/components/{TUIProfile → Profile}/hooks/useMyProfile.tsx +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as r}from"react/jsx-runtime";import a from"react";import{useTranslation as i}from"react-i18next";import{TUIConversationService as o}from"@tencentcloud/chat-uikit-engine";import"@tencentcloud/tui-core";import{useUIManager as n}from"../../../context/UIManagerContext.js";import"../../../context/TUIMessageContext.js";import{Icon as c}from"../../Icon/Icon.js";import{IconTypes as m}from"../../Icon/type.js";import{isH5 as s}from"../../../utils/env.js";import{Avatar as d}from"../../Avatar/Avatar.js";import{defaultUserAvatar as l}from"../../Avatar/default.js";function f(a){var f=a.profile,h=i().t,p=f.userID,v=f.nick,u=f.selfSignature,x=f.avatar,j=n().setActiveContact;return e("div",t({className:"tui-contact-info-header"},{children:[s&&r(c,{width:9,height:16,type:m.BACK,onClick:function(){o.switchConversation(""),j()}}),e("div",t({className:"header-container"},{children:[e("div",t({className:"header-container-avatar"},{children:[r(d,{size:60,image:x||l}),r("div",t({className:"header-container-name"},{children:v||p}))]})),r("div",t({className:"header-container-text"},{children:"ID:".concat(p)})),e("div",t({className:"header-container-text"},{children:[h("TUIContact.Signature"),":",u||""]}))]}))]}))}var h=a.memo(f);export{h as BasicInfo,f as UnMemoizedBasicInfo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t,__awaiter as e,__generator as o}from"tslib";import{jsxs as n,Fragment as r,jsx as c}from"react/jsx-runtime";import i,{useState as m,useEffect as a}from"react";import{useTranslation as s}from"react-i18next";import"@tencentcloud/tui-core";import{useUIManager as l}from"../../../context/UIManagerContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as f}from"./basicInfo.js";import{Switch as u}from"../../Switch/Switch.js";import p from"./hooks/useContactInfo.js";function h(i){var h=this,d=i.profile,v=l(),x=v.contactData,j=v.setActiveContact,C=s().t,I=m(!1),b=I[0],k=I[1],N=p().removeFromBlocklist;a((function(){k(!0)}),[x]);return n(r,{children:[c(f,{profile:d}),c("div",t({className:"tui-contact-info-content"},{children:n("div",t({className:"content-item"},{children:[c("p",t({className:"content-item-label"},{children:C("TUIContact.block")})),c(u,{className:"content-item-text",onChange:function(){return e(h,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,N(d.userID)];case 1:return t.sent(),k(!1),j(),[2]}}))}))},checked:b})]}))}))]})}var d=i.memo(h);export{d as BlockInfo,h as UnMemoizedBlockInfo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,Fragment as n,jsx as i}from"react/jsx-runtime";import a from"react";import{useTranslation as c}from"react-i18next";import o from"@tencentcloud/chat";import"@tencentcloud/tui-core";import{useUIManager as r}from"../../../context/UIManagerContext.js";import"../../../context/TUIMessageContext.js";import{Avatar as m}from"../../Avatar/Avatar.js";import{defaultUserAvatar as s}from"../../Avatar/default.js";import l from"./hooks/useContactInfo.js";function d(a){var d=r().setActiveContact,f=c().t,p=a.application,h=p.userID,v=p.nick,u=p.avatar,N=p.type,I=p.wording,b=l(),x=b.acceptFriendApplication,C=b.refuseFriendApplication;return e(n,{children:[i("div",t({className:"tui-contact-info-header"},{children:e("div",t({className:"header-container"},{children:[e("div",t({className:"header-container-avatar"},{children:[i(m,{size:60,image:u||s}),i("div",t({className:"header-container-name"},{children:v||h}))]})),i("div",t({className:"header-container-text"},{children:"ID:".concat(h)}))]}))})),i("div",t({className:"tui-contact-info-content"},{children:e("div",t({className:"content-item"},{children:[i("p",t({className:"content-item-label"},{children:f("TUIContact.verification info")})),i("p",t({className:"content-item-text"},{children:I}))]}))})),N===o.TYPES.SNS_APPLICATION_SENT_TO_ME&&i("div",t({className:"tui-contact-info-content"},{children:e("div",t({className:"content-btn-container"},{children:[i("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){d(),C(h)}},{children:f("TUIContact.Refuse")})),i("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){d(),x(h)}},{children:f("TUIContact.Agree")}))]}))}))]})}var f=a.memo(d);export{f as FriendApplicationInfo,d as UnMemoizedFriendApplication};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t,__awaiter as e,__generator as n}from"tslib";import{jsxs as o,Fragment as i,jsx as r}from"react/jsx-runtime";import c,{useState as a,useEffect as s}from"react";import{useTranslation as m}from"react-i18next";import{TUIConversationService as l}from"@tencentcloud/chat-uikit-engine";import{useUIKit as d}from"../../../context/UIKitContext.js";import{useUIManager as u}from"../../../context/UIManagerContext.js";import"../../../context/TUIMessageContext.js";import{BasicInfo as f}from"./basicInfo.js";import{Switch as h}from"../../Switch/Switch.js";import v from"./hooks/useContactInfo.js";import{DivWithEdit as p}from"../../DivWithEdit/DivWithEdit.js";function C(c){var C=this,b=d().chat,x=u(),k=x.contactData,I=x.setActiveContact,N=x.setActiveConversation,g=m().t,j=c.friend,U=c.showChats,w=j.userID,D=j.profile,T=j.remark,E=a(""),M=E[0],S=E[1],A=a(""),F=A[0],W=A[1],y=a(!1),B=y[0],K=y[1],q=v(),z=q.addToBlocklist,G=q.deleteFriend;s((function(){K(!1),W(T)}),[k,T]);return o(i,{children:[r(f,{profile:D}),o("div",t({className:"tui-contact-info-content"},{children:[o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:g("TUIContact.remark")})),r(p,{name:"remark",className:"content-item-text",value:F,type:"text",toggle:function(){S("remark")},isEdit:"remark"===M,confirm:function(t){b.updateFriend({userID:w,remark:null==t?void 0:t.value}),W(null==t?void 0:t.value),S("")},close:function(){S("")}})]})),o("div",t({className:"content-item"},{children:[r("p",t({className:"content-item-label"},{children:g("TUIContact.block")})),r(h,{className:"content-item-text",onChange:function(){return e(C,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,z(w)];case 1:return t.sent(),K(!0),I(),[2]}}))}))},checked:B})]})),o("div",t({className:"content-btn-container"},{children:[r("div",t({className:"content-item-btn delete-btn",role:"button",tabIndex:0,onClick:function(){return e(C,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,G(w)];case 1:return t.sent(),I(),[2]}}))}))}},{children:g("TUIContact.Delete friend")})),r("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){var t="C2C".concat(w);U&&U(),l.switchConversation(t).then((function(t){N(t.getConversation())}))}},{children:g("TUIContact.Send Message")}))]}))]}))]})}var b=c.memo(C);export{b as FriendInfo,C as UnMemoizedFriendInfo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,Fragment as n,jsx as o}from"react/jsx-runtime";import r from"react";import{useTranslation as i}from"react-i18next";import{TUIConversationService as a}from"@tencentcloud/chat-uikit-engine";import"@tencentcloud/tui-core";import{useUIManager as c}from"../../../context/UIManagerContext.js";import"../../../context/TUIMessageContext.js";import{Icon as s}from"../../Icon/Icon.js";import{IconTypes as m}from"../../Icon/type.js";import{isH5 as d}from"../../../utils/env.js";import{Avatar as l}from"../../Avatar/Avatar.js";import{defaultUserAvatar as h}from"../../Avatar/default.js";function v(r){var v=r.group,f=r.showChats,p=c(),u=p.setActiveContact,C=p.setActiveConversation,g=i().t,x=v.groupID,I=v.name,j=v.avatar;return e(n,{children:[e("div",t({className:"tui-contact-info-header"},{children:[d&&o(s,{width:9,height:16,type:m.BACK,onClick:function(){a.switchConversation(""),u()}}),e("div",t({className:"header-container"},{children:[e("div",t({className:"header-container-avatar"},{children:[o(l,{size:60,image:j||h}),o("div",t({className:"header-container-name"},{children:I||x}))]})),o("div",t({className:"header-container-text"},{children:"groupID:".concat(x)}))]}))]})),o("div",t({className:"tui-contact-info-content"},{children:o("div",t({className:"content-btn-container"},{children:o("div",t({className:"content-item-btn confirm-btn",role:"button",tabIndex:0,onClick:function(){var t="GROUP".concat(x);f&&f(),a.switchConversation(t).then((function(t){C(t.getConversation())}))}},{children:g("TUIContact.Send Message")}))}))}))]})}var f=r.memo(v);export{f as GroupInfo,v as UnMemoizedGroupInfo};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from"tslib";import{useCallback as i}from"react";import n from"@tencentcloud/chat";import{Toast as r}from"../../../Toast/index.js";import{useUIKit as o}from"../../../../context/UIKitContext.js";import"react/jsx-runtime";import"@tencentcloud/chat-uikit-engine";import"../../../../context/TUIMessageContext.js";function c(){var c=this,s=o().chat,u=i((function(e){s.removeFromBlacklist({userIDList:[e]})}),[s]),d=i((function(e){s.addFriend({to:null==e?void 0:e.userID,source:"AddSource_Type_Web",remark:null==e?void 0:e.remark,wording:null==e?void 0:e.wording}).catch((function(e){console.warn("delete friend failed:",e),r({text:e,type:"error"})}))}),[s]),a=i((function(e){s.deleteFriend({userIDList:[e]})}),[s]);return{addToBlocklist:i((function(e){s.addToBlacklist({userIDList:[e]})}),[s]),removeFromBlocklist:u,isFriend:function(e){return new Promise((function(t,i){s.checkFriend({userIDList:[null==e?void 0:e.userID],type:n.TYPES.SNS_CHECK_TYPE_BOTH}).then((function(e){var i,r;switch(null===(r=null===(i=null==e?void 0:e.data)||void 0===i?void 0:i.successUserIDList[0])||void 0===r?void 0:r.relation){case n.TYPES.SNS_TYPE_NO_RELATION:case n.TYPES.SNS_TYPE_A_WITH_B:case n.TYPES.SNS_TYPE_B_WITH_A:t(!1);break;case n.TYPES.SNS_TYPE_BOTH_WAY:t(!0);break;default:t(!1)}})).catch((function(e){console.warn("checkFriend error",e),i(e)}))}))},isBlock:function(i){return e(c,void 0,void 0,(function(){return t(this,(function(e){switch(e.label){case 0:return[4,s.getBlacklist()];case 1:return[2,e.sent().data.includes(i)]}}))}))},addFriend:d,deleteFriend:a,acceptFriendApplication:i((function(e){s.acceptFriendApplication({userID:e,type:n.TYPES.SNS_APPLICATION_AGREE_AND_ADD})}),[s]),refuseFriendApplication:i((function(e){s.refuseFriendApplication({userID:e})}),[s])}}export{c as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as i,jsx as o,Fragment as e}from"react/jsx-runtime";import n,{useState as c}from"react";import{useTranslation as a}from"react-i18next";import s from"@tencentcloud/chat";import{isH5 as r}from"../../../utils/env.js";import"@tencentcloud/tui-core";import{useUIManager as l}from"../../../context/UIManagerContext.js";import"../../../context/TUIMessageContext.js";import{useTUIContactContext as m}from"../../../context/TUIContactContext.js";import p from"../TUIContactInfo/hooks/useContactInfo.js";import u from"../hooks/useTUIContact.js";import{Avatar as d}from"../../Avatar/Avatar.js";import{defaultUserAvatar as f}from"../../Avatar/default.js";import h from"../../Icon/images/right-arrow.svg.js";import v from"../../Icon/images/down-arrow.png.js";function I(){var n=l().setActiveContact,I=a().t,C=m("TUIContactList"),N=C.isShowContactList,g=C.friendList,x=C.blocklistProfile,T=C.friendApplicationList,S=p().acceptFriendApplication,b=u().groupList,w=c(!1),k=w[0],A=w[1],U=c(!1),j=U[0],L=U[1],P=c(!1),_=P[0],y=P[1],E=c(!1),M=E[0],D=E[1],O=function(c){var a=c.type,s=c.isShow,r=c.setShow,l=c.list,m=c.title;return i(e,{children:[i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return r(!s)}},{children:[o("div",t({className:"tui-contacts-list-title"},{children:m})),o("div",t({className:"tui-contacts-list-icon"},{children:o("img",{src:s?v:h,alt:""})}))]})),s&&(null==l?void 0:l.map((function(e){var c=e.profile||e,s=c.userID,r=c.groupID,l=c.avatar,m=c.name,p=c.nick,u=e.remark||p||s||m||r;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(){n({type:a,data:e})}},{children:[o(d,{size:30,image:l||f}),o("div",t({className:"tui-contacts-list-item-container"},{children:o("p",t({className:"tui-contacts-list-item-name"},{children:u}))}))]}),s||r)})))]})};return N&&i("div",t({className:"tui-contacts-list ".concat(r?"tui-contacts-list-h5":""," ")},{children:[i("div",t({className:"tui-contacts-title",role:"button",tabIndex:0,onClick:function(){return A(!k)}},{children:[o("p",t({className:"tui-contacts-list-title"},{children:I("TUIContact.New Contacts")})),o("div",t({className:"tui-contacts-list-icon"},{children:o("img",{src:k?v:h,alt:""})}))]})),k&&(null==T?void 0:T.map((function(e,c){var a=e.userID,r=e.avatar,l=e.nick,m=e.wording,p=e.type;return i("div",t({role:"button",tabIndex:0,className:"tui-contacts-list-item",onClick:function(t){t.stopPropagation(),n({type:"friendApplication",data:e})}},{children:[o(d,{size:30,image:r||f}),i("div",t({className:"tui-contacts-list-item-card"},{children:[i("div",{children:[o("p",t({className:"tui-contacts-list-item-name text-ellipsis"},{children:l||a})),""!==m&&o("p",t({className:"tui-contacts-list-item-text text-ellipsis"},{children:m}))]}),p===s.TYPES.SNS_APPLICATION_SENT_BY_ME&&o("p",t({className:"tui-contacts-list-btn-text text-ellipsis"},{children:I("TUIContact.waiting for verification")})),p===s.TYPES.SNS_APPLICATION_SENT_TO_ME&&o("div",t({className:"application-btn",role:"button",tabIndex:0,onClick:function(t){!function(t,i){t.stopPropagation(),S(i),n()}(t,a)}},{children:I("TUIContact.Agree")}))]}))]}),a)}))),o(O,{type:"block",title:I("TUIContact.Blocked List"),isShow:_,setShow:y,list:x}),o(O,{type:"group",title:I("TUIContact.Group List"),setShow:D,isShow:M,list:b}),o(O,{type:"friend",title:I("TUIContact.Friends"),setShow:L,isShow:j,list:g})]}))}var C=n.memo(I);export{C as TUIContactList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as n}from"tslib";import{useState as i,useEffect as r}from"react";import o from"@tencentcloud/chat";import{TUIStore as e,StoreName as c}from"@tencentcloud/chat-uikit-engine";import{useUIKit as a}from"../../../context/UIKitContext.js";import"react/jsx-runtime";import"../../../context/TUIMessageContext.js";function u(){var u=this,s=a().chat,l=i([]),f=l[0],d=l[1],v=i([]),p=v[0],L=v[1],h=i([]),m=h[0],E=h[1],T=i([]),A=T[0],I=T[1],g=i(),D=g[0],P=g[1],b=i(!0),w=b[0],x=b[1];r((function(){e.watch(c.GRP,{groupList:C}),U(),_(),N()}),[s]);var C=function(t){P(t)};r((function(){null==s||s.on(o.EVENT.BLACKLIST_UPDATED,F),null==s||s.on(o.EVENT.FRIEND_LIST_UPDATED,j),null==s||s.on(o.EVENT.FRIEND_APPLICATION_LIST_UPDATED,k)}),[s]);var N=function(){return t(u,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,s.getFriendApplicationList()];case 1:return t=n.sent().data,E(null==t?void 0:t.friendApplicationList),[2]}}))}))},U=function(){return t(u,void 0,void 0,(function(){var t,i,r;return n(this,(function(n){switch(n.label){case 0:return[4,s.getFriendList()];case 1:return t=n.sent(),i=t.code,r=t.data,0===i&&d(r),[2]}}))}))},_=function(){return t(u,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,s.getBlacklist()];case 1:return 0===(t=n.sent().data).length||(L(t),S(t)),[2]}}))}))},S=function(i){return t(u,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,s.getUserProfile({userIDList:i})];case 1:return t=n.sent().data,I(t),[2]}}))}))},k=function(t){var n;E(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.friendApplicationList)},F=function(t){L(t.data),S(t.data)},j=function(t){d(t.data)};return{friendList:f,groupList:D,blocklistProfile:A,friendApplicationList:m,blockList:p,isShowContactList:w,setShowContactList:x}}export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t,__awaiter as e,__generator as r}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import i,{useState as a}from"react";import{useTranslation as c}from"react-i18next";import"@tencentcloud/tui-core";import{useUIManager as s}from"../../context/UIManagerContext.js";import"../../context/TUIMessageContext.js";import{useTUIContactContext as u}from"../../context/TUIContactContext.js";import m from"./hooks/useContactSearch.js";import{Icon as l}from"../Icon/Icon.js";import{IconTypes as d}from"../Icon/type.js";import{Avatar as v}from"../Avatar/Avatar.js";import{defaultUserAvatar as f}from"../Avatar/default.js";import{Input as p}from"../Input/Input.js";function h(){var i=this,h=s().setActiveContact,I=c().t,C=u("TUIContactList"),x=C.friendList,g=C.setShowContactList,j=a(!1),U=j[0],b=j[1],k=m(),y=k.checkFriend,N=k.isBlock,A=k.getUserProfile,D=a(""),T=D[0],w=D[1],F=a([]),L=F[0],S=F[1];return n("div",t({className:"tui-contact-search"},{children:[o(p,{className:"tui-contact-search-input",placeholder:I("TUIContact.Enter a userID"),clearable:!0,value:T,onBlur:function(t){var e;w(null===(e=t.target)||void 0===e?void 0:e.value)},onFocus:function(){h()},onChange:function(t){var e,r;if(""===(null===(e=t.target)||void 0===e?void 0:e.value))return g&&g(!0),b(!1),void S([]);b(!0),w(null===(r=t.target)||void 0===r?void 0:r.value),g&&g(!1)},onKeyDown:function(){return e(i,void 0,void 0,(function(){return r(this,(function(t){return T&&A(T).then((function(t){var e=t.data;S(e)})),[2]}))}))},prefix:o(l,{type:d.SEARCH,height:16,width:16})}),U&&0===L.length?o("div",t({className:"tui-contact-search-item"},{children:I("TUIContact.No Result")})):L.map((function(a,c){var s=a.userID,u=a.avatar,m=a.nick;return n("div",t({className:"tui-contact-search-item",role:"button",tabIndex:0,onClick:function(){var t;t=a,e(i,void 0,void 0,(function(){var e;return r(this,(function(r){switch(r.label){case 0:return[4,y(t)];case 1:return r.sent()?((e=null==x?void 0:x.find((function(t){return t.userID===T})))&&h({type:"friend",data:e}),[2]):N(t.userID)?(h({type:"block",data:t}),[2]):(h({type:"addFriend",data:t}),[2])}}))}))}},{children:[o(v,{size:30,image:u||f}),o("div",t({className:"search-item-name"},{children:m||s}))]}),s)}))]}))}var I=i.memo(h);export{I as TUIContactSearch,h as UnMemoizedTUIContactSearch};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import t from"@tencentcloud/chat";import{useUIKit as e}from"../../../context/UIKitContext.js";import"tslib";import"react/jsx-runtime";import"react";import"@tencentcloud/chat-uikit-engine";import"../../../context/TUIMessageContext.js";import{useTUIContactContext as n}from"../../../context/TUIContactContext.js";function o(){var o=n("TUIContactList").blockList,i=e().chat;return{checkFriend:function(e){return i.checkFriend({userIDList:[null==e?void 0:e.userID],type:t.TYPES.SNS_CHECK_TYPE_BOTH}).then((function(e){var n,o;return(null===(o=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.successUserIDList[0])||void 0===o?void 0:o.relation)===t.TYPES.SNS_TYPE_BOTH_WAY}))},isBlock:function(t){return null==o?void 0:o.includes(t)},getUserProfile:function(t){return i.getUserProfile({userIDList:[t]})}}}export{o as default};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React__default, { PropsWithChildren } from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
|
|
4
|
-
interface TUIConversationProps {
|
|
5
|
-
createConversation?: (conversationID: string) => Promise<any>;
|
|
6
|
-
deleteConversation?: (conversationID: string) => Promise<any>;
|
|
7
|
-
filterConversation?: (conversationList: Array<Conversation>) => Array<Conversation>;
|
|
8
|
-
}
|
|
9
|
-
declare function UnMemoizedTUIConversation<T extends TUIConversationProps>(props: PropsWithChildren<T>): React__default.ReactElement;
|
|
10
|
-
declare const TUIConversation: typeof UnMemoizedTUIConversation;
|
|
11
|
-
|
|
12
|
-
export { TUIConversation, UnMemoizedTUIConversation };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import o,{useMemo as r}from"react";import{TUIConversationProvider as n}from"../../context/TUIConversationContext.js";import{TUIConversationList as i}from"../TUIConversationList/TUIConversationList.js";import"@tencentcloud/chat";import"@tencentcloud/chat-uikit-engine";function a(o){var a=o.children,c=o.createConversation,m=o.deleteConversation,s=o.filterConversation,v=r((function(){return{createConversation:c,deleteConversation:m,filterConversation:s}}),[c,m,s]);return e(n,t({value:v},{children:a||e(i,{})}))}var c=o.memo(a);export{c as TUIConversation,a as UnMemoizedTUIConversation};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
3
|
-
import { ConversationPreviewUIComponentProps } from '../ConversationPreview/ConversationPreview.js';
|
|
4
|
-
import { ConversationListContainerProps } from '../ConversationPreview/ConversationListContainer.js';
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
componentVisibleOptions?: any;
|
|
8
|
-
filters?: object;
|
|
9
|
-
sort?: object;
|
|
10
|
-
options?: object;
|
|
11
|
-
Preview?: React__default.ComponentType<ConversationPreviewUIComponentProps>;
|
|
12
|
-
Container?: React__default.ComponentType<ConversationListContainerProps>;
|
|
13
|
-
onConversationListUpdated?: (setConversationList: React__default.Dispatch<React__default.SetStateAction<Array<Conversation>>>, event: () => void) => void;
|
|
14
|
-
filterConversation?: (conversationList: Array<Conversation>) => Array<Conversation>;
|
|
15
|
-
}
|
|
16
|
-
declare function UnMemoTUIConversationList<T extends Props>(props: T): React__default.ReactElement;
|
|
17
|
-
declare const TUIConversationList: React__default.MemoExoticComponent<typeof UnMemoTUIConversationList>;
|
|
18
|
-
|
|
19
|
-
export { TUIConversationList, UnMemoTUIConversationList };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import r,{useState as i,useRef as s}from"react";import{useTranslation as a}from"react-i18next";import{useUIKit as v}from"../../context/UIKitContext.js";import{useUIManager as c}from"../../context/UIManagerContext.js";import"../../context/TUIMessageContext.js";import{isH5 as m}from"../../utils/env.js";import l from"./hooks/useConversationList.js";import{ConversationPreview as C}from"../ConversationPreview/ConversationPreview.js";import"@tencentcloud/chat-uikit-engine";import{Icon as u}from"../Icon/Icon.js";import{IconTypes as p}from"../Icon/type.js";import"@tencentcloud/chat";import{useTUIConversationContext as h}from"../../context/TUIConversationContext.js";import{ConversationListContainer as f}from"../ConversationPreview/ConversationListContainer.js";import{ConversationSearchInput as d}from"../ConversationSearch/ConversationSearchInput.js";import{ConversationSearchResult as j}from"../ConversationSearch/ConversationSearchResult.js";import{ConversationCreate as w}from"../ConversationCreate/ConversationCreate.js";import"../ConversationCreate/ConversationGroupTypeInfo.js";import{getDisplayTitle as I}from"../ConversationPreview/utils.js";import{useConversationUpdate as g}from"./hooks/useConversationUpdate.js";function L(r){var L=r.Preview,S=r.Container,x=void 0===S?f:S,P=r.onConversationListUpdated,U=r.filterConversation,N=r.componentVisibleOptions,T=void 0===N?{isProfileShow:!0,isSearchInputShow:!0,isContainerShow:!0}:N;a().t;var k=v().chat,y=c(),A=y.customClasses,b=y.conversation,D=y.setActiveConversation;y.setTUIProfileShow;var E=h("TUIConversationList").filterConversation,R=U||E,F=i(0),M=F[0],O=F[1],V=l(k,(function(o,e){o.length}),R),G=V.conversationList,K=V.setConversationList;g(K,P,(function(){return O((function(o){return o+1}))}),R);var q=i(""),z=q[0],B=q[1],H=i(G),J=H[0],Q=H[1],W=i(!1),X=W[0],Y=W[1],Z=i(""),$=Z[0],_=Z[1],oo=s(null);return e("div",o({className:"tui-conversation ".concat(m?"tui-conversation-h5":""," ").concat(A||""," "),ref:oo},{children:X?e(w,{conversationList:G,setConversationCreated:Y}):t(n,{children:[T.isSearchInputShow&&t("div",o({className:"tui-conversation-header"},{children:[e(d,{value:z,clearable:!0,onChange:function(o){var e,t;if(B(null===(e=o.target)||void 0===e?void 0:e.value),null===(t=o.target)||void 0===t?void 0:t.value){var n=G.filter((function(e){var t;return I(e).toLocaleLowerCase().includes(null===(t=o.target)||void 0===t?void 0:t.value.toLocaleLowerCase())}));Q(n)}else Q([])}}),e("div",o({className:"tui-conversation-create-icon"},{children:e(u,{onClick:function(){B(""),Y(!0)},type:p.CREATE,height:24,width:24})}))]})),T.isContainerShow&&e(x,o({setConversationList:K},{children:0===G.length?t("div",o({className:"no-result"},{children:[e(u,{className:"no-result-icon",type:p.EFFORT,width:42,height:42}),e("div",o({className:"no-result-message"},{children:"No conversation"}))]})):z?e(j,{Preview:L,searchValue:z,result:J}):G.map((function(t){return e(C,o({},{activeConversation:b,conversation:t,setActiveConversation:D,Preview:L,conversationUpdateCount:M,activeConversationID:$,setActiveConversationID:_}),t.conversationID)}))}))]})}))}var S=r.memo(L);export{S as TUIConversationList,L as UnMemoTUIConversationList};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as t,useEffect as n}from"react";import o from"@tencentcloud/chat";import{TUIStore as r,StoreName as e}from"@tencentcloud/chat-uikit-engine";function i(i,c,a){var u=t([]),f=u[0],s=u[1],m=function(t){var n=[];n=a?a(t):t.filter((function(t){return t.type!==o.TYPES.CONV_SYSTEM})),s(n),c&&c(n,s)};return n((function(){r.watch(e.CONV,{conversationList:m})}),[i]),{conversationList:f,setConversationList:s}}export{i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useEffect as t}from"react";import n from"@tencentcloud/chat";import{useUIKit as o}from"../../../context/UIKitContext.js";import"tslib";import"react/jsx-runtime";import"@tencentcloud/chat-uikit-engine";import"../../../context/TUIMessageContext.js";var r=function(r,e,i,c){var u=o().chat;t((function(){var t=function(t){r&&r(c?c(t.data):t.data.filter((function(t){return t.type!==n.TYPES.CONV_SYSTEM}))),i&&i(),e&&"function"==typeof e&&r&&e(r,t)};return null==u||u.on(n.EVENT.CONVERSATION_LIST_UPDATED,t),function(){null==u||u.off(n.EVENT.CONVERSATION_LIST_UPDATED,t)}}),[u,e])};export{r as useConversationUpdate};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import o,{useState as t,useEffect as a}from"react";import{useTranslation as r}from"react-i18next";import{Icon as s}from"../Icon/Icon.js";import{IconTypes as c}from"../Icon/type.js";import{Avatar as m}from"../Avatar/Avatar.js";import{defaultGroupAvatarWork as l,defaultUserAvatar as d}from"../Avatar/default.js";import{Switch as v}from"../Switch/Switch.js";import{useUIKit as h}from"../../context/UIKitContext.js";import{useUIManager as u}from"../../context/UIManagerContext.js";import"../../context/TUIMessageContext.js";import{isH5 as f,isPC as p}from"../../utils/env.js";import{getMessageProfile as g}from"../ConversationPreview/utils.js";import{useConversationUpdate as I}from"../TUIConversationList/hooks/useConversationUpdate.js";import{useConversation as C}from"../../hooks/useConversation.js";function j(){var o=r().t,j=t(),N=j[0],x=j[1],D=t(),U=D[0],k=D[1],w=t(!1),T=w[0],A=w[1],y=t(0),M=y[0],P=y[1],S=h().chat,b=u(),L=b.conversation,K=b.setActiveConversation,z=b.TUIManageShow,B=b.setTUIManageShow;I(void 0,(function(){P((function(n){return n+1}))}));var E=C(S),q=E.pinConversation,F=E.deleteConversation,G=function(){B&&B(!1)};return a((function(){x(L),L&&k(g(L)),A(!!L&&L.isPinned)}),[L,M]),z&&L&&e("div",n({className:"tui-manage ".concat(f?"tui-h5-manage":"")},{children:[e("div",n({className:"tui-manage-title"},{children:[p&&i(s,{onClick:G,type:c.CANCEL,width:9,height:16}),f&&i(s,{onClick:G,type:c.BACK,width:9,height:16}),i("span",n({style:{marginLeft:"10px"}},{children:o("TUIConversation.Conversation Information")}))]})),e("div",n({className:"tui-manage-container"},{children:[e("div",n({className:"tui-manage-info"},{children:[i("div",n({className:"info-avatar"},{children:i(m,{size:64,image:(null==U?void 0:U.avatar)||((null==U?void 0:U.groupID)?l:d)})})),i("div",n({className:"info-name"},{children:(null==U?void 0:U.nick)||(null==U?void 0:U.name)})),e("div",n({className:"info-id"},{children:["ID:",(null==U?void 0:U.userID)||(null==U?void 0:U.groupID)]}))]})),e("div",n({className:"tui-manage-handle"},{children:[e("div",n({className:"manage-handle-box"},{children:[i("div",n({className:"manage-handle-title"},{children:o("TUIConversation.Pin")})),i(v,{onChange:function(n){!function(n){A(n.target.checked),(null==N?void 0:N.conversationID)&&q({conversationID:N.conversationID,isPinned:n.target.checked})}(n)},checked:T})]})),p&&i("div",n({className:"manage-handle-box",role:"presentation",onClick:function(){(null==N?void 0:N.conversationID)&&F(N.conversationID),K(void 0)}},{children:i("div",n({className:"manage-handle-title red"},{children:o("TUIConversation.Delete")}))}))]}))]}))]}))}var N=o.memo(j);export{N as TUIManage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import r,{useState as o,useRef as c,useCallback as i,useEffect as u}from"react";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as a}from"../../context/TUIChatStateContext.js";import{useTUIChatActionContext as s}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";import{Icon as l}from"../Icon/Icon.js";import{IconTypes as d}from"../Icon/type.js";function m(r){var m=r.context,p=r.message,v=r.children,f=s().setAudioSource,h=a("MessageAudioWithContext").audioSource,x=o(0),g=x[0],C=x[1],I=c(null),j=o(!1),E=j[0],y=j[1],L=i((function(){h&&h!==(null==I?void 0:I.current)&&(h.pause(),h.currentTime=0,f&&f(null)),(null==I?void 0:I.current)&&(I.current.paused?(I.current.play(),y(!0),f&&f(I.current)):(I.current.pause(),k()))}),[I,h]),T=function(){y(!1)},k=function(){f&&f(null),I.current&&(I.current.currentTime=0),T()};return u((function(){return(null==I?void 0:I.current)&&(I.current.addEventListener("pause",T),I.current.addEventListener("ended",k),I.current.addEventListener("canplay",(function(){var e;C(parseInt("".concat(null===(e=I.current)||void 0===e?void 0:e.duration),10))}))),function(){(null==I?void 0:I.current)&&(I.current.removeEventListener("pause",T),I.current.removeEventListener("ended",k))}}),[I]),t("div",e({className:"message-audio"},{children:[t("div",e({className:"message-audio-content message-audio-".concat(null==p?void 0:p.flow)},{children:[n(l,{className:"".concat(null==p?void 0:p.flow," ").concat(E?"playing":""),type:d.VOICE,width:16,height:16,onClick:L}),n("span",{children:"".concat(g,"s")})]})),n("audio",e({src:null==m?void 0:m.url,ref:I,controls:!0,className:"message-audio-none"},{children:n("track",{kind:"captions"})})),v]}))}var p=r.memo(m);function v(t){return n(p,e({},t))}export{v as MessageAudio};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as t,Fragment as r}from"react/jsx-runtime";import"tslib";import"react";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{messageShowType as o}from"../../context/TUIMessageContext.js";import{Avatar as e}from"../Avatar/Avatar.js";import{handleDisplayAvatar as i}from"../untils.js";function a(a){a.className;var m=a.CustomAvatar,n=a.message,s=a.showType;return(s===o.ALL||(null==n?void 0:n.flow)===s)&&s!==o.NONE?m||t(e,{size:32,image:i(null==n?void 0:n.avatar)}):t(r,{})}export{a as MessageAvatar};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import s,{useState as n,useEffect as i}from"react";import l from"@tencentcloud/chat";import{MESSAGE_STATUS as a}from"../../constants.js";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as c}from"../../context/TUIChatStateContext.js";import{useTUIChatActionContext as r}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";import{Icon as m}from"../Icon/Icon.js";import{IconTypes as u}from"../Icon/type.js";import{useMessageReply as d}from"./hooks/useMessageReply.js";import{MessageProgress as g}from"./MessageProgress.js";function p(s){var p=s.message,b=s.children,v=s.Context,f=s.Plugins,h=n(!1),I=h[0],x=h[1],M=d({message:p}),N=M.messageReply,y=M.replyMessage,S=M.sender,D=r(),E=D.setHighlightedMessageId,j=D.setActiveMessageID,C=c("MessageBubbleWithContext").activeMessageID;i((function(){C!==(null==p?void 0:p.ID)&&x(!1)}),[C]);return o("div",e({className:"meesage-bubble"},{children:[o("div",e({className:"meesage-bubble-context ".concat(null==p?void 0:p.flow),role:"button",tabIndex:0,onMouseEnter:function(){j&&p&&j(null==p?void 0:p.ID),x(!0)},onMouseLeave:function(){j&&p&&j(p.ID),x(!1)},onClick:function(){j&&p&&j(p.ID)}},{children:[o("div",e({className:"message-context\n ".concat(N?"meesage-bubble-reply meesage-bubble-reply-".concat(null==p?void 0:p.flow):"","\n ").concat((null==p?void 0:p.type)!==l.TYPES.MSG_IMAGE&&(null==p?void 0:p.type)!==l.TYPES.MSG_VIDEO&&(null==p?void 0:p.type)!==l.TYPES.MSG_FILE||(null==p?void 0:p.status)!==a.UNSEND?"":"loading")},{children:[N&&o("div",e({className:"meesage-bubble-reply-main",role:"menuitem",tabIndex:0,onClick:function(){E&&E(null==y?void 0:y.ID)}},{children:[t("header",e({className:"title"},{children:S})),v&&t(v,{message:y})]})),b,t(g,{message:p})]})),f&&t("div",e({className:"message-plugin"},{children:I&&t(f,{message:p})}))]})),o("div",e({className:"message-bubble-status icon"},{children:[(null==p?void 0:p.status)===a.FAIL&&t("i",{className:"icon-fail"}),(null==p?void 0:p.status)===a.UNSEND&&t(m,{width:10,height:10,type:u.PROGRESS})]}))]}))}var b=s.memo(p);function v(o){return t(b,e({},o))}export{v as MessageBubble};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as t}from"react/jsx-runtime";import o from"react";import m from"@tencentcloud/chat";import{MessageAudio as s}from"./MessageAudio.js";import{MessageCustom as r}from"./MessageCustom.js";import{MessageFace as i}from"./MessageFace.js";import{MessageFile as n}from"./MessageFile.js";import{MessageImage as E}from"./MessageImage.js";import{MessageLocation as M}from"./MessageLocation.js";import{MessageMerger as S}from"./MessageMerger.js";import{MessageText as a}from"./MessageText.js";import{MessageVideo as p}from"./MessageVideo.js";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import"../../constants.js";import"date-fns";import"date-fns/locale";import"../Icon/config.js";import"../Icon/type.js";import"@tencentcloud/tui-core";import{useTUIMessageContext as T}from"../../context/TUIMessageContext.js";import{useMessageContextHandler as c}from"./hooks/useMessageContextHandler.js";import{MessageStatus as g}from"./MessageStatus.js";var G,f=((G={})[m.TYPES.MSG_TEXT]=a,G[m.TYPES.MSG_FACE]=i,G[m.TYPES.MSG_IMAGE]=E,G[m.TYPES.MSG_AUDIO]=s,G[m.TYPES.MSG_VIDEO]=p,G[m.TYPES.MSG_FILE]=n,G[m.TYPES.MSG_CUSTOM]=r,G[m.TYPES.MSG_MERGER]=S,G[m.TYPES.MSG_LOCATION]=M,G);function l(o){var s,r=o.message,i=c({message:r}).context,n=T("MessageCustom"),E=n.CustemElement,M=n.TextElement,S=n.FaceElement,a=n.ImageElement,p=n.AudioElement,G=n.VideoElement,l=n.FileElement,u=n.MergerElement,P=n.LocationElement,Y=((s={})[m.TYPES.MSG_TEXT]=M,s[m.TYPES.MSG_FACE]=S,s[m.TYPES.MSG_IMAGE]=a,s[m.TYPES.MSG_AUDIO]=p,s[m.TYPES.MSG_VIDEO]=G,s[m.TYPES.MSG_FILE]=l,s[m.TYPES.MSG_CUSTOM]=E,s[m.TYPES.MSG_MERGER]=u,s[m.TYPES.MSG_LOCATION]=P,s),_=(null==r?void 0:r.type)&&(Y[r.type]||f[r.type]);return _&&t(_,e({context:i,message:r},{children:t(g,{message:r})}))}var u=o.memo(l);function P(o){return t(u,e({},o))}export{P as MessageContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,jsxs as n,Fragment as r}from"react/jsx-runtime";import o from"react";import l from"@tencentcloud/chat";import{useTranslation as i}from"react-i18next";import{JSONStringToParse as u}from"../untils.js";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import"../../context/TUIMessageContext.js";import{useComponentContext as a}from"../../context/ComponentContext.js";function c(o){var c=o.context,m=o.message,s=o.children,d=i().t,v=a().MessageCustomPlugins;return n("div",t({className:"bubble message-custom bubble-".concat(null==m?void 0:m.flow," ").concat((null==m?void 0:m.conversationType)===l.TYPES.CONV_GROUP?"group":"")},{children:[function(o){if("Hyperlink"===o.data){var l=u(null==o?void 0:o.extension);if(null==l?void 0:l.item)return null==l?void 0:l.item.map((function(n){return e("a",t({target:"_blank",href:n.value,rel:"noreferrer"},{children:n.value}),n.value)}));if(null==l?void 0:l.hyperlinks_text){var i=l.hyperlinks_text;return n(r,{children:[l.title," ",e("a",t({target:"_blank",href:null==i?void 0:i.value,rel:"noreferrer"},{children:i.key}),null==i?void 0:i.value)]})}}if("group_create"===o.data)return"".concat((null==m?void 0:m.nick)||(null==m?void 0:m.from)," Create a group");var a=u(o.data);return 1!==(null==a?void 0:a.chatbotPlugin)||15!==(null==a?void 0:a.src)||"welcome_msg"!==(null==a?void 0:a.subtype)&&"clarify_msg"!==(null==a?void 0:a.subtype)?"[".concat(d("TUIChat.Custom message"),"]"):e(v,{data:u(o.data).content})}(null==c?void 0:c.custom),s]}))}var m=o.memo(c);function s(n){return e(m,t({},n))}export{s as MessageCustom};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,Fragment as o}from"react/jsx-runtime";import n from"@tencentcloud/chat";import"react";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{messageShowType as i}from"../../context/TUIMessageContext.js";function r(r){r.className;var l=r.CustomName,m=r.message,c=r.showType;return(c===i.ALL||(null==m?void 0:m.flow)===c)&&(null==m?void 0:m.conversationType)===n.TYPES.CONV_GROUP&&c!==i.NONE?l||e("label",t({htmlFor:"content",className:"text-ellipsis name"},{children:(null==m?void 0:m.nick)||(null==m?void 0:m.from)})):e(o,{})}export{r as MessageName};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as o,jsx as l}from"react/jsx-runtime";import{useState as s,useRef as i}from"react";import{useTranslation as n}from"react-i18next";import t from"@tencentcloud/chat";import{Plugins as r}from"../Plugins/index.js";import{Icon as a}from"../Icon/Icon.js";import{IconTypes as d}from"../Icon/type.js";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as u}from"../../context/TUIChatStateContext.js";import{useTUIMessageContext as c}from"../../context/TUIMessageContext.js";import{useMessageHandler as h}from"./hooks/useMessageHandler.js";import{MESSAGE_STATUS as v,MESSAGE_FLOW as g}from"../../constants.js";import"date-fns";import"date-fns/locale";import{useMessagePluginElement as p}from"./hooks/useMessagePluginElement.js";var m;function f(m){var f,M,S,w,y,C,T=m.plugins,U=m.showNumber,x=m.MoreIcon,E=m.config,I=n().t,N=s(""),R=N[0];N[1];var k=s({}),j=k[0],b=k[1],q=i(),O=c("MessagePlugins"),P=O.message,D=O.plugin,F=u("MessageBubbleWithContext").messageListRef,L=h({message:P}),W=L.handleDelMessage,Y=L.handleRevokeMessage,A=L.handleReplyMessage,V=L.handleCopyMessage,B=L.handleResendMessage,G=L.handleForWardMessage,H={quote:e(e({isShow:!0},null==E?void 0:E.quote),null===(f=null==D?void 0:D.config)||void 0===f?void 0:f.quote),forward:e(e({isShow:!0},null==E?void 0:E.forward),null===(M=null==D?void 0:D.config)||void 0===M?void 0:M.forward),copy:e(e({isShow:!0,relateMessageType:[t.TYPES.MSG_TEXT]},null==E?void 0:E.copy),null===(S=null==D?void 0:D.config)||void 0===S?void 0:S.copy),delete:e(e({isShow:!0},null==E?void 0:E.delete),null===(w=null==D?void 0:D.config)||void 0===w?void 0:w.delete),revoke:e(e({isShow:!0},null==E?void 0:E.revoke),null===(y=null==D?void 0:D.config)||void 0===y?void 0:y.revoke),resend:e(e({isShow:!0},null==E?void 0:E.resend),null===(C=null==D?void 0:D.config)||void 0===C?void 0:C.resend)},Q=p({children:o("div",e({className:"message-plugin-item"},{children:[l("span",{children:I("TUIChat.Recall")}),l(a,{width:20,height:20,type:d.REVOCATION})]})),handle:function(e){var o;(null===(o=null==q?void 0:q.current)||void 0===o?void 0:o.closeMore)&&q.current.closeMore(),Y(e)},message:P,isShow:H.revoke.isShow&&(null==P?void 0:P.status)===v.SUCCESS&&P.flow===g.OUT,relateMessageType:H.revoke.relateMessageType}),X=p({children:o("div",e({className:"message-plugin-item"},{children:[l("span",e({className:"del"},{children:I("TUIChat.Delete")})),l(a,{width:20,height:20,type:d.DEL})]})),handle:function(e){var o;(null===(o=null==q?void 0:q.current)||void 0===o?void 0:o.closeMore)&&q.current.closeMore(),W(e)},message:P,isShow:H.delete.isShow&&(null==P?void 0:P.status)===v.SUCCESS,relateMessageType:H.delete.relateMessageType}),_=p({children:o("div",e({className:"message-plugin-item"},{children:[l("span",{children:I("TUIChat.Reference")}),l(a,{width:20,height:20,type:d.QUOTE})]})),handle:function(e){var o;(null===(o=null==q?void 0:q.current)||void 0===o?void 0:o.closeMore)&&q.current.closeMore(),A(e)},message:P,isShow:H.quote.isShow&&(null==P?void 0:P.status)===v.SUCCESS,relateMessageType:H.quote.relateMessageType}),z=p({children:o("div",e({className:"message-plugin-item"},{children:[l("span",{children:I("TUIChat.Copy")}),l(a,{width:20,height:20,type:d.COPY})]})),handle:function(e){var o;(null===(o=null==q?void 0:q.current)||void 0===o?void 0:o.closeMore)&&q.current.closeMore(),V(e)},message:P,isShow:H.copy.isShow&&(null==P?void 0:P.status)===v.SUCCESS,relateMessageType:H.copy.relateMessageType}),J=p({children:o("div",e({className:"message-plugin-item"},{children:[l("span",{children:I("TUIChat.Resend")}),l(a,{width:20,height:20,type:d.REPLY})]})),handle:function(e){var o;(null===(o=null==q?void 0:q.current)||void 0===o?void 0:o.closeMore)&&q.current.closeMore(),B()},message:P,isShow:H.resend.isShow&&(null==P?void 0:P.status)!==v.SUCCESS,relateMessageType:H.resend.relateMessageType}),K=p({children:o("div",e({className:"message-plugin-item"},{children:[l("span",{children:I("TUIChat.Forward")}),l(a,{width:20,height:20,type:d.FORWARD})]})),handle:function(e){var o;(null===(o=null==q?void 0:q.current)||void 0===o?void 0:o.closeMore)&&q.current.closeMore(),G(e)},message:P,isShow:H.forward.isShow&&(null==P?void 0:P.status)===v.SUCCESS,relateMessageType:H.forward.relateMessageType}),Z=[Q,_,K,X,J,z],$=(T||(null==D?void 0:D.plugins)||Z).filter((function(e){return e})),ee=x||(null==D?void 0:D.MoreIcon)||l(a,{className:"icon-more",width:16,height:16,type:d.MORE}),oe=U||(null==D?void 0:D.showNumber)||0;return(null==P?void 0:P.status)!==v.UNSEND&&l(r,{className:"message-plugin",customClass:R,style:j,ref:q,plugins:$,showNumber:oe,MoreIcon:ee,root:null==F?void 0:F.current,handleVisible:function(e){if(e.x&&e.y){var o=e.y<e.height||e.top,l=e.x<e.width||e.left;b({position:"fixed",left:"".concat(l?e.x:e.x-e.width,"px"),top:"".concat(o?e.y:e.y-e.height,"px")})}}})}!function(e){e.quote="quote",e.forward="forward",e.copy="copy",e.delete="delete",e.resend="resend",e.revoke="revoke"}(m||(m={}));export{f as MessagePlugins};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,Fragment as o,jsxs as r}from"react/jsx-runtime";import s,{useState as n,useEffect as i}from"react";import a from"@tencentcloud/chat";import{MESSAGE_STATUS as c}from"../../constants.js";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as l}from"../../context/TUIChatStateContext.js";import{useTUIMessageContext as m}from"../../context/TUIMessageContext.js";function u(s){var u=s.message,p=s.children,d=s.Progress,g=s.isShow,v=void 0!==g&&g,f=n(),h=f[0],x=f[1],S=n(0),P=S[0],M=S[1],E=l("MessageProgressWithContext").uploadPendingMessageList,I=m("MessageProgressWithContext"),C=I.isShowProgress,T=void 0!==C&&C,j=I.Progress,y=d||j,D=v||T;return i((function(){E&&E.length>0&&E.map((function(t){return(null==t?void 0:t.ID)===(null==u?void 0:u.ID)&&(x(t),(null==t?void 0:t.progress)&&M(t.progress)),t}))}),[E]),D?y&&h?e(y,{message:h}):!((null==u?void 0:u.type)!==a.TYPES.MSG_IMAGE&&(null==u?void 0:u.type)!==a.TYPES.MSG_VIDEO&&(null==u?void 0:u.type)!==a.TYPES.MSG_FILE||(null==u?void 0:u.status)!==c.UNSEND)&&r("div",t({className:"progress-box"},{children:[e("span",{className:"progress",style:{width:"".concat(100*P,"%")}}),p]})):e(o,{})}var p=s.memo(u);function d(o){return e(p,t({},o))}export{d as MessageProgress};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,jsxs as o}from"react/jsx-runtime";import n,{useCallback as r}from"react";import{useTranslation as i}from"react-i18next";import a from"@tencentcloud/chat";import{MESSAGE_OPERATE as l,MESSAGE_FLOW as s}from"../../constants.js";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import{useTUIChatActionContext as m}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";function c(n){var c=n.message,u=i().t,d=m().operateMessage,p=r((function(){var t;d&&c&&d(((t={})[l.REVOKE]=c,t))}),[d]);return o("div",t({className:"bubble message-system message-revoke"},{children:[(null==c?void 0:c.flow)===s.IN&&e("span",{children:(null==c?void 0:c.nick)||(null==c?void 0:c.from)}),(null==c?void 0:c.flow)!==s.IN&&e("span",t({style:{marginRight:"5px"}},{children:u("TUIChat.You")})),e("span",t({style:{marginRight:"5px"}},{children:u("TUIChat.recalled a message")})),(null==c?void 0:c.flow)===s.OUT&&(null==c?void 0:c.type)===a.TYPES.MSG_TEXT&&e("span",t({className:"edit",role:"button",tabIndex:0,onClick:p},{children:u("TUIChat.Re-edit")}))]}))}var u=n.memo(c);function d(o){return e(u,t({},o))}export{d as MessageRevoke};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import i from"react";import{useUIKit as o}from"../../context/UIKitContext.js";import"@tencentcloud/chat-uikit-engine";import{useTUIMessageContext as r}from"../../context/TUIMessageContext.js";import{getTimeStamp as m}from"../untils.js";function s(i){var s=i.message,n=o().language,a=r("MessageStatustWithContext").isShowTime,c=(void 0===a||a)&&e("div",t({className:"time"},{children:(null==s?void 0:s.time)?m(1e3*s.time,n):0}));return e("div",t({className:"message-status"},{children:c}))}var n=i.memo(s);function a(i){return e(n,t({},i))}export{a as MessageStatus};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import o from"react";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import"../../constants.js";import"date-fns";import"date-fns/locale";import"@tencentcloud/chat";import"../Icon/config.js";import"../Icon/type.js";import"@tencentcloud/tui-core";import"../../context/TUIMessageContext.js";import{useMessageContextHandler as r}from"./hooks/useMessageContextHandler.js";function n(o){var n=o.message,i=r({message:n}).context;return e("div",t({className:"bubble message-system"},{children:e("div",{children:i})}))}var i=o.memo(n);function s(o){return e(i,t({},o))}export{s as MessageSystem};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,jsxs as n}from"react/jsx-runtime";import o from"react";import c from"@tencentcloud/chat";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as i}from"../../context/TUIChatStateContext.js";import"../../context/TUIMessageContext.js";import{useComponentContext as r}from"../../context/ComponentContext.js";function s(o){var s=o.context,a=o.message,l=o.children,m=r().MessageTextPlugins,u=i("MessageText").firstSendMessage;return m&&"in"===(null==a?void 0:a.flow)&&u&&(null==u?void 0:u.time)<=(null==a?void 0:a.time)?e("div",t({className:"bubble message-text bubble-".concat(a.flow," ").concat((null==a?void 0:a.conversationType)===c.TYPES.CONV_GROUP?"group":"")},{children:e(m,{data:a})})):e("div",t({className:"bubble message-text bubble-".concat(null==a?void 0:a.flow," ").concat((null==a?void 0:a.conversationType)===c.TYPES.CONV_GROUP?"group":"")},{children:n("div",t({className:"message-text-content"},{children:[null==s?void 0:s.text.map((function(n,o){var c=a&&(null==a?void 0:a.ID)+o;return"text"===n.name?e("p",t({className:"message-text-content-p"},{children:n.text}),n.src+c):e("img",{className:"text-img",src:n.src,alt:""},n.src+c)})),l]}))}))}var a=o.memo(s);function l(n){return e(a,t({},n))}export{l as MessageText};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import o from"react";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import"../../constants.js";import"date-fns";import"date-fns/locale";import"@tencentcloud/chat";import"../Icon/config.js";import"../Icon/type.js";import"@tencentcloud/tui-core";import"../../context/TUIMessageContext.js";import{useMessageContextHandler as r}from"./hooks/useMessageContextHandler.js";function n(o){var n=o.message,i=r({message:n}).context;return e("div",t({className:"bubble message-tip"},{children:i.text}))}var i=o.memo(n);function m(o){return e(i,t({},o))}export{m as MessageTip};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as t}from"react/jsx-runtime";import o from"react";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as l}from"../../context/TUIChatStateContext.js";import{TUIMessageContextProvider as s}from"../../context/TUIMessageContext.js";import{useComponentContext as n}from"../../context/ComponentContext.js";import{useMessageHandler as i}from"./hooks/useMessageHandler.js";import"@tencentcloud/chat";import"../../constants.js";import"date-fns";import"date-fns/locale";import"../Icon/config.js";import"../Icon/type.js";import{TUIMessageDefault as m}from"./TUIMessageDefault.js";import{MessagePlugins as a}from"./MessagePlugins.js";import{MessageContext as r}from"./MessageContext.js";function u(o){var i=o.message,u=o.TUIMessage,d=o.MessagePlugins,g=o.MessageContext,c=o.handleDelete,v=o.CustemElement,f=o.TextElement,p=o.ImageElement,E=o.VideoElement,h=o.AudioElement,x=o.FileElement,M=o.MergerElement,w=o.LocationElement,C=o.FaceElement,j=o.className,T=o.filter,I=o.isShowTime,P=o.isShowRead,S=o.plugin,A=o.prefix,N=o.suffix,D=o.customName,F=o.showAvatar,U=o.showName,L=o.customAvatar,R=o.isShowProgress,V=o.Progress,k=n(),b=k.MessagePlugins,y=k.MessageContext,H=l("TUIMessage").messageConfig,q=u||m,z=d||b||a,B=g||y||r,G=T||(null==H?void 0:H.filter),J=i||(null==H?void 0:H.message);G&&J&&G(J);var K={message:J,handleDelete:c||(null==H?void 0:H.handleDelete),CustemElement:v||(null==H?void 0:H.CustemElement),TextElement:f||(null==H?void 0:H.TextElement),ImageElement:p||(null==H?void 0:H.ImageElement),VideoElement:E||(null==H?void 0:H.VideoElement),AudioElement:h||(null==H?void 0:H.AudioElement),FileElement:x||(null==H?void 0:H.FileElement),MergerElement:M||(null==H?void 0:H.MergerElement),LocationElement:w||(null==H?void 0:H.LocationElement),FaceElement:C||(null==H?void 0:H.FaceElement),isShowTime:I||(null==H?void 0:H.isShowTime),isShowRead:P||(null==H?void 0:H.isShowRead),plugin:S||(null==H?void 0:H.plugin),prefix:A||(null==H?void 0:H.prefix),suffix:N||(null==H?void 0:H.suffix),customName:D||(null==H?void 0:H.customName),showAvatar:F||(null==H?void 0:H.showAvatar),showName:U||(null==H?void 0:H.showName),customAvatar:L||(null==H?void 0:H.customAvatar),isShowProgress:R||(null==H?void 0:H.isShowProgress),Progress:V||(null==H?void 0:H.Progress)};return t(s,e({value:K},{children:t(q,{message:J,MessageContext:B,MessagePlugins:z,className:j||(null==H?void 0:H.className)})}))}var d=o.memo(u);function g(o){var l=o.message,s=i({message:l}).handleDelMessage;return t(d,e({handleDelete:s},o))}export{g as TUIMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as s,jsxs as o}from"react/jsx-runtime";import t from"react";import a from"@tencentcloud/chat";import{MessageBubble as i}from"./MessageBubble.js";import{MessageTip as m}from"./MessageTip.js";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIMessageContext as n,messageShowType as r}from"../../context/TUIMessageContext.js";import{useComponentContext as l}from"../../context/ComponentContext.js";import{MessageSystem as c}from"./MessageSystem.js";import{MessageRevoke as u}from"./MessageRevoke.js";import{MessageName as d}from"./MessageName.js";import{MessageAvatar as g}from"./MessageAvatar.js";function p(t){var p=t.message,v=t.MessageContext,f=t.MessagePlugins,M=t.className,P=l(),S=P.MessageContext,T=P.MessagePlugins,x=n("TUIMessage"),N=x.prefix,_=x.suffix,I=x.customName,h=x.showAvatar,C=void 0===h?r.IN:h,G=x.showName,j=void 0===G?r.IN:G,R=x.customAvatar,y=v||S,E=f||T;return o("div",e({className:"message-default\n ".concat((null==p?void 0:p.type)===a.TYPES.MSG_GRP_TIP||(null==p?void 0:p.isRevoked)?"tip":null==p?void 0:p.flow,"\n ").concat(M,"\n ")},{children:[(null==p?void 0:p.type)===a.TYPES.MSG_GRP_TIP&&s(m,{message:p}),(null==p?void 0:p.type)===a.TYPES.MSG_GRP_SYS_NOTICE&&s(c,{message:p}),(null==p?void 0:p.isRevoked)&&s(u,{message:p}),(null==p?void 0:p.type)!==a.TYPES.MSG_GRP_TIP&&(null==p?void 0:p.type)!==a.TYPES.MSG_GRP_SYS_NOTICE&&!(null==p?void 0:p.isRevoked)&&o("div",e({className:"".concat(null==p?void 0:p.flow)},{children:[N,p&&s(g,{message:p,CustomAvatar:R,showType:C}),o("main",e({"data-message-id":null==p?void 0:p.ID,className:"content"},{children:[s(d,{message:p,CustomName:I,showType:j}),s(i,e({message:p,Context:y,Plugins:E},{children:s(y,{message:p})}))]})),_]}),null==p?void 0:p.ID)]}))}var v=t.memo(p);function f(o){return o.message,s(v,e({},o))}export{f as TUIMessageDefault};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as e,__generator as t}from"tslib";import{useCallback as r}from"react";import{useTranslation as o}from"react-i18next";import{TUIStore as n}from"@tencentcloud/chat-uikit-engine";import{MESSAGE_FLOW as a,MESSAGE_OPERATE as i}from"../../../constants.js";import{enableSampleTaskStatus as s}from"../../untils.js";import{useUIKit as l}from"../../../context/UIKitContext.js";import"react/jsx-runtime";import{useTUIChatActionContext as u}from"../../../context/TUIChatActionContext.js";import"../../../context/TUIMessageContext.js";import{Toast as d}from"../../Toast/index.js";var c=function(c){var v=c.message,f=c.handleError,m=u(),p=m.editLocalMessage,g=m.operateMessage;m.revokeMessage;var h=o().t,M=l().chat,x=r((function(r){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return r.preventDefault(),v?(n.getMessageModel(null==v?void 0:v.ID).deleteMessage(),[2]):[2]}))}))}),[v]),y=r((function(r){return e(void 0,void 0,void 0,(function(){return t(this,(function(e){return r.preventDefault(),v?(n.getMessageModel(null==v?void 0:v.ID).revokeMessage().then((function(){p&&p(v),s("revokeMessage")})).catch((function(e){if(!f){var t=v.flow===a.OUT?h("TUIChat.The message recall exceeded the time limit (default 2 minutes)"):h("TUIChat.Error revoke Message");throw d({text:t,type:"error"}),new Error(e)}f({functionName:"revokeMessage",error:e})})),[2]):[2]}))}))}),[v]),D=r((function(e){var t;e.preventDefault(),(null==v?void 0:v.ID)&&M&&g&&g(((t={})[i.QUOTE]=v,t))}),[v]),C=r((function(e){if(e.preventDefault(),navigator.clipboard)navigator.clipboard.writeText(null==v?void 0:v.payload.text);else{var t=document.createElement("textarea");document.body.appendChild(t),t.style.position="fixed",t.style.clip="rect(0 0 0 0)",t.style.top="10px",t.value=null==v?void 0:v.payload.text,t.select(),document.execCommand("copy",!0),document.body.removeChild(t)}}),[v]),I=r((function(){return e(void 0,void 0,void 0,(function(){var e,r,o,n;return t(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),(r=v)?[4,M.resendMessage(v)]:[3,2];case 1:r=t.sent(),t.label=2;case 2:return e=r,p&&p(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.message),[3,4];case 3:if(o=t.sent(),!f)throw d({text:o,type:"error"}),new Error(o);return f({functionName:"resendMessage",error:o}),[3,4];case 4:return[2]}}))}))}),[v]),T=r((function(r){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){return r.preventDefault(),(null==v?void 0:v.ID)&&M&&g?(g(((e={})[i.FORWARD]=v,e)),[2]):[2]}))}))}),[v]);return{handleDelMessage:x,handleRevokeMessage:y,handleReplyMessage:D,handleCopyMessage:C,handleResendMessage:I,handleForWardMessage:T}};export{c as useMessageHandler};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as e,useLayoutEffect as t}from"react";import s from"@tencentcloud/chat";import{useUIKit as o}from"../../../context/UIKitContext.js";import"tslib";import"react/jsx-runtime";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as n}from"../../../context/TUIChatStateContext.js";import"../../../context/TUIMessageContext.js";import{JSONStringToParse as a}from"../../untils.js";var i,r=((i={})[s.TYPES.MSG_TEXT]=1,i[s.TYPES.MSG_FACE]=8,i[s.TYPES.MSG_IMAGE]=3,i[s.TYPES.MSG_AUDIO]=4,i[s.TYPES.MSG_VIDEO]=5,i[s.TYPES.MSG_FILE]=6,i[s.TYPES.MSG_CUSTOM]=2,i),l=function(i){var l=i.message,m=e(null),u=m[0],c=m[1],S=e(""),p=S[0],g=S[1],d=e(null),T=d[0],v=d[1],E=e(""),M=E[0],f=E[1],I=o().chat,x=n("useMessageReply").messageList;t((function(){l&&D(l)}),[l]);var D=function(e){if(null==e?void 0:e.cloudCustomData){var t=a(null==e?void 0:e.cloudCustomData),o=(null==t?void 0:t.messageReply)||"";if(o){c(o),g(null==o?void 0:o.messageSender),f(null==o?void 0:o.messageID);var n=null==x?void 0:x.filter((function(e){var t=e.ID===(null==o?void 0:o.messageID),n=t&&r[e.type]===o.messageType,a=e.type!==s.TYPES.MSG_TEXT||e.payload.text===o.messageAbstract;return t&&n&&a}));v(n[0]||I.findMessage(null==o?void 0:o.messageID))}}};return{messageReply:u,sender:p,replyMessage:T,messageID:M,message:l}};export{l as useMessageReply};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as a}from"tslib";import t from"@tencentcloud/chat";import{decodeText as e}from"./decodeText.js";import{MESSAGE_STATUS as c}from"../../../constants.js";import{JSONStringToParse as o}from"../../untils.js";function n(a){var t=a.split(".");return t[t.length-1]}function s(a){var e,c,o,s,r,i={message:a,text:""},p=a.nick||(null===(e=null==a?void 0:a.payload)||void 0===e?void 0:e.userIDList.join(","));switch((null===(o=null===(c=null==a?void 0:a.payload)||void 0===c?void 0:c.memberList)||void 0===o?void 0:o.length)>0&&(p="",null===(r=null===(s=null==a?void 0:a.payload)||void 0===s?void 0:s.memberList)||void 0===r||r.map((function(a){return p+="".concat((null==a?void 0:a.nick)||(null==a?void 0:a.userID),","),a})),p=p.slice(0,-1)),a.payload.operationType){case t.TYPES.GRP_TIP_MBR_JOIN:i.text="".concat(p," ").concat(n("message.tip.Join in group"));break;case t.TYPES.GRP_TIP_MBR_QUIT:i.text="".concat(n("message.tip.member"),":").concat(p," ").concat(n("message.tip.quit group"));break;case t.TYPES.GRP_TIP_MBR_KICKED_OUT:i.text="".concat(n("message.tip.member"),":").concat(p," ").concat(n("message.tip.by")," ").concat(a.payload.operatorID," ").concat(n("message.tip.kicked out of group"));break;case t.TYPES.GRP_TIP_MBR_SET_ADMIN:i.text="".concat(n("message.tip.member"),":").concat(p," ").concat(n("message.tip.become admin"));break;case t.TYPES.GRP_TIP_MBR_CANCELED_ADMIN:i.text="".concat(n("message.tip.member"),":").concat(p," ").concat(n("message.tip.by revoked administrator"));break;case t.TYPES.GRP_TIP_GRP_PROFILE_UPDATED:i.text=function(a){var t=a.payload,e=t.newGroupProfile,c=t.operatorID,o="",s=Object.keys(e)[0];switch(s){case"muteAllMembers":o=e[s]?"".concat(n("message.tip.admin")," ").concat(c," ").concat(n("message.tip.enable all staff mute")):"".concat(n("message.tip.admin")," ").concat(c," ").concat(n("message.tip.unmute everyone"));break;case"ownerID":o="".concat(e[s]," ").concat(n("message.tip.become the new owner"));break;case"groupName":o="".concat(c," ").concat(n("message.tip.modify group name")," ").concat(e[s]);break;case"notification":o="".concat(c," ").concat(n("message.tip.post a new announcement"))}return o}(a);break;case t.TYPES.GRP_TIP_MBR_PROFILE_UPDATED:a.payload.memberList.map((function(a){return a.muteTime>0?i.text="".concat(n("message.tip.member"),":").concat(a.userID).concat(n("message.tip.muted")):i.text="".concat(n("message.tip.member"),":").concat(a.userID).concat(n("message.tip.unmuted")),a}));break;default:i.text="[".concat(n("message.tip.reminder message"),"]")}return i}function r(a){return{text:e(a.payload)}}function i(a){var t={message:a,name:"",url:""};return t.name=a.payload.data,a.payload.data.indexOf("@2x")<0&&(t.name="".concat(t.name,"@2x")),t.url="https://web.sdk.qcloud.com/im/assets/face-elem/".concat(t.name,".png"),t}function p(a){var t={lon:"",lat:"",href:"",url:"",description:"",message:a};return t.lon=a.payload.longitude.toFixed(6),t.lat=a.payload.latitude.toFixed(6),t.href="https://map.qq.com/?type=marker&isopeninfowin=1&markertype=1&"+"pointx=".concat(t.lon,"&pointy=").concat(t.lat,"&name=").concat(a.payload.description),t.url="https://apis.map.qq.com/ws/staticmap/v2/?"+"center=".concat(t.lat,",").concat(t.lon,"&zoom=10&size=300*150&maptype=roadmap&")+"markers=size:large|color:0xFFCCFF|label:k|".concat(t.lat,",").concat(t.lon,"&")+"key=UBNBZ-PTP3P-TE7DB-LHRTI-Y4YLE-VWBBD",t.description=a.payload.description,t}function m(a){return{progress:(null==a?void 0:a.status)===c.UNSEND&&a.progress,url:a.payload.imageInfoArray[1].url,message:a}}function l(a){var t,e;return{progress:(null==a?void 0:a.status)===c.UNSEND&&(null==a?void 0:a.progress),url:null===(t=null==a?void 0:a.payload)||void 0===t?void 0:t.videoUrl,snapshotUrl:null===(e=null==a?void 0:a.payload)||void 0===e?void 0:e.snapshotUrl,message:a}}function u(a){return{progress:(null==a?void 0:a.status)===c.UNSEND&&a.progress,url:a.payload.url,message:a,second:a.payload.second}}function d(a){var t="";return t=a.payload.fileSize>=1048576?"".concat((a.payload.fileSize/1048576).toFixed(2)," Mb"):a.payload.fileSize>=1024?"".concat((a.payload.fileSize/1024).toFixed(2)," Kb"):"".concat(a.payload.fileSize.toFixed(2),"B"),{progress:(null==a?void 0:a.status)===c.UNSEND&&a.progress,url:a.payload.fileUrl,message:a,name:a.payload.fileName,size:t}}function g(t){return a({message:t},t.payload)}function y(a){var t={},e={};try{t=o(a.payload.data)}catch(a){t={}}if(1!==t.businessID)return"";try{e=o(t.data)}catch(a){e={}}switch(t.actionType){case 1:return e.call_end>=0&&!t.groupID?"".concat(n("message.custom.talkTime"),":").concat(v(e.call_end)):t.groupID?"".concat(n("message.custom.groupCallEnd")):e.data&&"switchToAudio"===e.data.cmd?"".concat(n("message.custom.switchToAudioCall")):e.data&&"switchToVideo"===e.data.cmd?"".concat(n("message.custom.switchToVideoCall")):"".concat(n("message.custom.all"));case 2:return"".concat(n("message.custom.cancel"));case 3:return e.data&&"switchToAudio"===e.data.cmd?"".concat(n("message.custom.switchToAudioCall")):e.data&&"switchToVideo"===e.data.cmd?"".concat(n("message.custom.switchToVideoCall")):"".concat(n("message.custom.accepted"));case 4:return"".concat(n("message.custom.rejected"));case 5:return e.data&&"switchToAudio"===e.data.cmd?"".concat(n("message.custom.switchToAudioCall")):e.data&&"switchToVideo"===e.data.cmd?"".concat(n("message.custom.switchToVideoCall")):"".concat(n("message.custom.noResp"));default:return""}}function I(a){return{message:a,custom:y(a)||(null==a?void 0:a.payload)||"[".concat(n("message.custom.custom"),"]")}}function f(a){var t=a.payload.groupProfile.name||a.payload.groupProfile.groupID;switch(a.payload.operationType){case 1:return"".concat(a.payload.operatorID," ").concat(n("message.tip.申请加入群组"),":").concat(t);case 2:return"".concat(n("message.tip.成功加入群组"),":").concat(t);case 3:return"".concat(n("message.tip.申请加入群组"),":").concat(t," ").concat(n("message.tip.被拒绝"));case 4:return"".concat(n("message.tip.你被管理员")).concat(a.payload.operatorID," ").concat(n("message.tip.踢出群组"),":").concat(t);case 5:return"".concat(n("message.tip.群"),":").concat(t," ").concat(n("message.tip.被")," ").concat(a.payload.operatorID," ").concat(n("message.tip.解散"));case 6:return"".concat(a.payload.operatorID," ").concat(n("message.tip.创建群"),":").concat(t);case 7:case 12:return"".concat(a.payload.operatorID," ").concat(n("message.tip.邀请你加群"),":").concat(t);case 8:return"".concat(n("message.tip.你退出群组"),":").concat(t);case 9:return"".concat(n("message.tip.你被")).concat(a.payload.operatorID," ").concat(n("message.tip.设置为群"),":").concat(t," ").concat(n("message.tip.的管理员"));case 10:return"".concat(n("message.tip.你被")).concat(a.payload.operatorID," ").concat(n("message.tip.撤销群"),":").concat(t," ").concat(n("message.tip.的管理员身份"));case 13:return"".concat(a.payload.operatorID," ").concat(n("message.tip.同意加群"),":").concat(t);case 14:return"".concat(a.payload.operatorID," ").concat(n("message.tip.拒接加群"),":").concat(t);case 255:return"".concat(n("message.tip.自定义群系统通知"),": ").concat(a.payload.userDefinedField);default:return""}}function v(a){var t,e,c,o,n=a;return n>=3600?(e=parseInt("".concat(n/3600),10)<10?"0".concat(parseInt("".concat(n/3600),10)):parseInt("".concat(n/3600),10),c=parseInt("".concat(n%60/60),10)<10?"0".concat(parseInt("".concat(n%60/60),10)):parseInt("".concat(n%60/60),10),(o=n%3600<10?parseInt("0".concat(n%3600)):n%3600)>60&&(c=parseInt("".concat(o/60),10)<10?"0".concat(parseInt("".concat(o/60),10)):parseInt("".concat(o/60),10),o=o%60<10?"0".concat(o%60):o%60),t="".concat(e,":").concat(c,":").concat(o)):n>=60&&n<3600?(c=parseInt("".concat(n/60),10)<10?"0".concat(parseInt("".concat(n/60),10)):parseInt("".concat(n/60),10),o=n%60<10?"0".concat(n%60):n%60,t="00:".concat(c,":").concat(o)):n<60&&(o=n<10?"0".concat(n):n,t="00:00:".concat(o)),t}export{y as extractCallingInfoFromMessage,v as formatTime,u as handleAudioMessageShowContext,I as handleCustomMessageShowContext,i as handleFaceMessageShowContext,d as handleFileMessageShowContext,m as handleImageMessageShowContext,p as handleLocationMessageShowContext,g as handleMergerMessageShowContext,r as handleTextMessageShowContext,s as handleTipMessageShowContext,l as handleVideoMessageShowContext,f as translateGroupSystemNotice};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useState as o}from"react";import{useTUIMessageInputContext as a}from"../../context/TUIMessageInputContext.js";import{Icon as n}from"../Icon/Icon.js";import{IconTypes as r}from"../Icon/type.js";import{Popup as c}from"../Popup/index.js";import{emojiName as p,emojiUrl as s,emojiMap as m}from"../TUIMessage/utils/emojiMap.js";function l(){var l=o(!1),u=l[0],f=l[1],d=o(0),g=d[0];d[1];var j=o(""),h=j[0],I=j[1],x=function(){f(!u)},M=a("TUIMessageInputDefault"),v=M.onSelectEmoji,N=M.sendFaceMessage,b=function(t){var e={index:g,data:t.target.dataset.data};e.data&&(0===g?v&&v(e):(N&&N(e),x()))};return e("div",t({className:"emoji-picker input-plugin-popup"},{children:[i(n,{width:20,height:20,type:r.EMOJI,onClick:x}),i(c,t({className:"input-plugin-popup-box ".concat(h),show:u,close:x,handleVisible:function(t){I("".concat(!t.top&&"emoji-plugin-top"," ").concat(!t.left&&"emoji-plugin-right"))}},{children:i("ul",t({className:"face-list"},{children:0===g&&p.map((function(e,o){var a=e+o;return i("li",t({role:"menuitem",className:"face-list-item",onClick:b},{children:i("img",{src:"".concat(s+m[e]),alt:"","data-data":e})}),a)}))}))}))]}))}export{l as EmojiPicker};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as i,__spreadArray as o}from"tslib";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useRef as l}from"react";import{useTranslation as t}from"react-i18next";import{EmojiPicker as r}from"./EmojiPicker.js";import{Plugins as u}from"../Plugins/index.js";import{useUploadElement as c}from"./hooks/useUploadElement.js";import{MESSAGE_TYPE_NAME as d}from"../../constants.js";import{useTUIMessageInputContext as s}from"../../context/TUIMessageInputContext.js";import{Icon as p}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as v}from"../../context/TUIChatStateContext.js";import"../../context/TUIMessageContext.js";function a(){var a,g,f,h,I,C,M,j=s("TUIMessageInputDefault"),U=j.sendUploadMessage,k=j.pluginConfig,x=t().t,E=v("TUIMessageInput").TUIMessageInputConfig,P=(null==k?void 0:k.plugins)||(null===(a=null==E?void 0:E.pluginConfig)||void 0===a?void 0:a.plugins)||[],T=(null==k?void 0:k.showNumber)||(null===(g=null==E?void 0:E.pluginConfig)||void 0===g?void 0:g.showNumber)||1,y=(null==k?void 0:k.MoreIcon)||(null===(f=null==E?void 0:E.pluginConfig)||void 0===f?void 0:f.MoreIcon),N=function(i,o,e){return"boolean"==typeof i?i:"boolean"==typeof o?o:e},b=N(null==k?void 0:k.isEmojiPicker,null===(h=null==E?void 0:E.pluginConfig)||void 0===h?void 0:h.isEmojiPicker,!0),w=N(null==k?void 0:k.isImagePicker,null===(I=null==E?void 0:E.pluginConfig)||void 0===I?void 0:I.isImagePicker,!0),V=N(null==k?void 0:k.isVideoPicker,null===(C=null==E?void 0:E.pluginConfig)||void 0===C?void 0:C.isVideoPicker,!0),D=N(null==k?void 0:k.isFilePicker,null===(M=null==E?void 0:E.pluginConfig)||void 0===M?void 0:M.isFilePicker,!0),F=l(),O=w&&c({children:e("div",i({className:"input-plugin-item"},{children:[n(p,{width:20,height:20,type:m.IMAGE}),n("span",{children:x("TUIChat.Image")})]})),type:"image",accept:"image/*",onChange:function(i){var o;(null===(o=null==F?void 0:F.current)||void 0===o?void 0:o.closeMore)&&F.current.closeMore(),U&&U({file:i},d.IMAGE)}}),A=V&&c({children:e("div",i({className:"input-plugin-item"},{children:[n(p,{width:20,height:20,type:m.VIDEO}),n("span",{children:x("TUIChat.Video")})]})),type:"video",accept:"video/*",onChange:function(i){var o;(null===(o=null==F?void 0:F.current)||void 0===o?void 0:o.closeMore)&&F.current.closeMore(),U&&U({file:i},d.VIDEO)}}),G=D&&c({children:e("div",i({className:"input-plugin-item"},{children:[n(p,{width:20,height:20,type:m.DOCUMENT}),n("span",{children:x("TUIChat.File")})]})),type:"file",accept:"file/*",onChange:function(i){var o;(null===(o=null==F?void 0:F.current)||void 0===o?void 0:o.closeMore)&&F.current.closeMore(),U&&U({file:i},d.FILE)}}),L=o([b&&n(r,{}),O,A,G],P,!0).filter((function(i){return i}));return n(u,{ref:F,plugins:L,showNumber:T,MoreIcon:y})}export{a as InputPluginsDefalut};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as o}from"react/jsx-runtime";import{useCallback as n}from"react";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatActionContext as i}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";import{Icon as r}from"../Icon/Icon.js";import{IconTypes as s}from"../Icon/type.js";import{MESSAGE_OPERATE as m}from"../../constants.js";import{useHandleQuoteMessage as c}from"./hooks/useHandleQuoteMessage.js";import{formatEmojiString as a}from"../TUIMessage/utils/emojiMap.js";function l(l){var u=l.message,p=i().operateMessage,d=c(u),f=d.cloudCustomData,h=d.message,g=n((function(){var t;p&&p(((t={})[m.QUOTE]=null,t))}),[p]),j=null==f?void 0:f.messageReply;return j&&e("div",t({className:"input-quote"},{children:[e("div",t({className:"input-quote-content"},{children:[o("label",t({htmlFor:"input-quote-content"},{children:(null==h?void 0:h.nick)||(null==h?void 0:h.from)})),o("span",{children:a(null==j?void 0:j.messageAbstract,1)})]})),o(r,{className:"icon",width:12,height:12,type:s.CLOSE,onClick:g})]}))}export{l as InputQuoteDefalut};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as t}from"tslib";import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useState as i,useCallback as a,useEffect as n}from"react";import{useTranslation as l}from"react-i18next";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import{useTUIChatActionContext as c}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";import{Model as s}from"../Model/index.js";import{Icon as d}from"../Icon/Icon.js";import{IconTypes as m}from"../Icon/type.js";import{Input as u}from"../Input/Input.js";import{Checkbox as h}from"../Checkbox/index.js";import{Avatar as f}from"../Avatar/Avatar.js";import{getDisplayImage as p,getDisplayTitle as v}from"../ConversationPreview/utils.js";import{MESSAGE_OPERATE as g}from"../../constants.js";import"date-fns";import"date-fns/locale";import"@tencentcloud/chat";import"./hooks/useHandleQuoteMessage.js";import{useHandleForwardMessage as w}from"./hooks/useHandleForwardMessage.js";function C(C){var N,I=C.handleForward,j=l().t,x=i([]),b=x[0],k=x[1],F=i([]),D=F[0],A=F[1],L=i(""),M=L[0],T=L[1],U=c().operateMessage,R=w(),y=R.message,S=R.sendForwardMessage,H=R.conversationList,z=void 0===H?[]:H,E=a((function(){var e;U&&U(((e={})[g.FORWARD]=null,e))}),[U]),P=z,O=function(e){e.checked?k(t(t([],b,!0),[e.value],!1)):k(b.filter((function(t){return t!==e.value})))};return n((function(){k([]),A([]),T("")}),[y]),y&&z.length>0&&o(s,e({onClick:E},{children:r("div",e({role:"button",tabIndex:0,className:"tui-forward",onClick:function(e){!function(e){e.stopPropagation()}(e)}},{children:[r("header",e({className:"tui-forward-header"},{children:[o(d,{type:m.CANCEL,width:16,height:16,onClick:E}),o("h2",e({className:"tui-forward-title"},{children:j("TUIChat.Forward to")}))]})),o("div",e({className:"tui-forward-search"},{children:o(u,{className:"tui-forward-search-input",placeholder:"Search",clearable:!0,value:M,onChange:function(e){var t,o;if(T(null===(t=e.target)||void 0===t?void 0:t.value),null===(o=e.target)||void 0===o?void 0:o.value){var r=z.filter((function(t){var o,r=v(t).toLocaleLowerCase(),i=null===(o=e.target)||void 0===o?void 0:o.value.toLocaleLowerCase();return r.includes(i)}));A(r)}else A([])},prefix:o(d,{type:m.SEARCH,height:16,width:16})})})),r("main",e({className:"tui-forward-main"},{children:[M&&r("ul",e({className:"tui-forward-list"},{children:[o("h3",e({className:"tui-forward-list-title"},{children:j("TUIChat.Search Result")})),D.length>0&&D.map((function(t){return r("li",e({className:"tui-forward-list-item"},{children:[r("label",e({htmlFor:"".concat(t.conversationID),className:"info"},{children:[o(f,{image:p(t),size:40}),o("div",e({className:"info-nick"},{children:v(t)}))]})),o(h,{onChange:function(e){O(e)},id:"".concat(t.conversationID),value:t})]}),t.conversationID)})),0===D.length&&o("p",e({className:"no-result"},{children:j("TUIChat.No Result")}))]})),!M&&P.length>0&&o("ul",e({className:"tui-forward-list"},{children:P.map((function(t){return r("li",e({className:"tui-forward-list-item"},{children:[r("label",e({htmlFor:"".concat(t.conversationID),className:"info"},{children:[o(f,{image:p(t),size:40}),o("div",e({className:"info-nick"},{children:v(t)}))]})),o(h,{onChange:O,id:"".concat(t.conversationID),value:t})]}),t.conversationID)}))}))]})),r("footer",e({className:"tui-forward-footer"},{children:[o("div",e({className:"tui-forward-footer-name"},{children:b.length>0&&(N=b,(null==N?void 0:N.map((function(e){return v(e)}))).toString())})),o("button",e({type:"button",className:"button",onClick:function(){I?I({list:b,message:y}):S(b),E()},disabled:0===b.length},{children:j("TUIChat.Forward")}))]}))]}))}))}export{C as TUIForward};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e,jsxs as o}from"react/jsx-runtime";import n from"react";import s from"@tencentcloud/chat";import{TUIMessageInputContextProvider as i}from"../../context/TUIMessageInputContext.js";import{useCreateMessageInputContext as r}from"./hooks/useCreateMessageInputContext.js";import{useMessageInputState as a}from"./hooks/useMessageInputState.js";import"@tencentcloud/chat-uikit-engine";import"../../constants.js";import"@tencentcloud/tui-core";import"react-i18next";import{useTUIChatStateContext as m}from"../../context/TUIChatStateContext.js";import"../../context/TUIMessageContext.js";import{useComponentContext as u}from"../../context/ComponentContext.js";import"date-fns";import"date-fns/locale";import"../Icon/config.js";import"../Icon/type.js";import"./hooks/useHandleQuoteMessage.js";import{EmptyStateIndicator as p}from"../EmptyStateIndicator/EmptyStateIndicator.js";import{InputQuoteDefalut as l}from"./InputQuoteDefalut.js";import{TUIMessageInputDefault as c}from"./TUIMessageInputDefault.js";import{InputPluginsDefalut as f}from"./InputPluginsDefalut.js";import{TUIForward as I}from"./TUIForward.js";import{Transmitter as d}from"./Transmitter.js";function g(o){var n=o.children,u=o.disabled,p=o.focus,l=o.pluginConfig,c=o.textareaRef,f=a(o),I=m("TUIMessageInput"),d=I.textareaRef,g=I.conversation,j=(null==g?void 0:g.type)===s.TYPES.CONV_SYSTEM,x=m("TUIMessageInput").TUIMessageInputConfig,T=p||(null==x?void 0:x.focus),v=r(t(t(t({},f),o),{textareaRef:c||(null==x?void 0:x.textareaRef)||d,disabled:u||(null==x?void 0:x.disabled)||j,focus:"boolean"!=typeof T||T,pluginConfig:l}));return e(i,t({value:v},{children:n}))}function j(n){var s=n.TUIMessageInput,i=n.InputPlugins,r=n.InputQuote,a=n.isTransmitter,j=n.className,x=m("TUIMessageInput").TUIMessageInputConfig,T=j||(null==x?void 0:x.className),v=a||(null==x?void 0:x.isTransmitter)||!1,M=u(),C=M.TUIMessageInput,h=M.InputPlugins,U=M.InputQuote,S=s||C||c,b=i||h||f||p,N=r||U||l;return e("div",t({className:"tui-message-input ".concat(T)},{children:o(g,t({},n,{children:[e(I,{}),e(N,{}),o("div",t({className:"tui-message-input-main"},{children:[o("div",t({className:"tui-message-input-box"},{children:[e(b,{}),e(S,{})]})),v&&e(d,{})]}))]}))}))}var x=n.memo(j);export{x as TUIMessageInput};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsxs as e,jsx as n}from"react/jsx-runtime";import{useEffect as o,useState as r}from"react";import{useTranslation as i}from"react-i18next";import{MESSAGE_OPERATE as a}from"../../constants.js";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as u}from"../../context/TUIChatStateContext.js";import"../../context/TUIMessageContext.js";import{useTUIMessageInputContext as s}from"../../context/TUIMessageInputContext.js";import{isPC as c}from"../../utils/env.js";import{formatEmojiString as l}from"../TUIMessage/utils/emojiMap.js";function d(){var d=s("TUIMessageInputDefault"),m=d.text,p=d.disabled,f=d.handleChange,v=d.handleKeyDown,x=d.handlePasete,g=d.textareaRef,h=d.focus,I=d.setText,b=d.setCursorPos,j=i().t,C=u("TUIMessageInputDefault").operateData;o((function(){C&&C[a.REVOKE]&&I&&I(l(C[a.REVOKE].payload.text,1))}),[C]),o((function(){var t,e;return h&&g&&g.current&&(g.current.autofocus=!0,c&&(null===(t=null==g?void 0:g.current)||void 0===t||t.focus({preventScroll:!0})),null===(e=null==g?void 0:g.current)||void 0===e||e.addEventListener("paste",x)),function(){var t;null===(t=null==g?void 0:g.current)||void 0===t||t.removeEventListener("paste",x)}}),[h,g]);var E=r(!1),T=E[0],U=E[1];return e("div",t({className:"input-box ".concat(p?"disabled":""," ").concat(T?"tui-kit-input-box--focus":"tui-kit-input-box--blur")},{children:[n("div",t({className:"input-visibility-content"},{children:m})),!p&&n("textarea",{placeholder:j("TUIChat.Enter a message"),rows:1,value:m,ref:g,onChange:f,onKeyDown:v,onFocus:function(){U(!0)},onBlur:function(t){!function(t){var e;b&&b({start:null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.selectionStart,end:t.target.selectionEnd}),U(!1)}(t)}})]}))}export{d as TUIMessageInputDefault};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as r}from"react/jsx-runtime";import{useTUIMessageInputContext as o}from"../../context/TUIMessageInputContext.js";import{Icon as e}from"../Icon/Icon.js";import{IconTypes as n}from"../Icon/type.js";function m(){var m=o("Transmitter").handleSubmit;return r("div",t({className:"transmitter"},{children:r(e,{className:"icon-send",type:n.SEND,onClick:m})}))}export{m as Transmitter};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{useTranslation as t}from"react-i18next";import{TUIChatService as a}from"@tencentcloud/chat-uikit-engine";import{emojiEnKey as n}from"../../TUIMessage/utils/emojiMap.js";function o(o){o.textareaRef;var i=o.insertText,r=t().i18n;return{onSelectEmoji:function(e){"zh-CN"===r.language?i&&i(e.data):i&&i(n[e.data])},sendFaceMessage:e((function(e){a.sendFaceMessage({payload:e})}),[])}}export{o as useEmojiPicker};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from"tslib";import{useState as n,useEffect as o}from"react";import r from"@tencentcloud/chat";import{TUIChatService as i}from"@tencentcloud/chat-uikit-engine";import{MESSAGE_OPERATE as s}from"../../../constants.js";import{useUIKit as a}from"../../../context/UIKitContext.js";import"react/jsx-runtime";import{useTUIChatStateContext as c}from"../../../context/TUIChatStateContext.js";import"../../../context/TUIMessageContext.js";function u(u){var m=this,f=c("TUIMessageInputDefault").operateData,p=n([]),d=p[0],l=p[1],v=a().chat,x=u||f&&f[s.FORWARD];return o((function(){t(m,void 0,void 0,(function(){var t,n;return e(this,(function(e){switch(e.label){case 0:return[4,v.getConversationList()];case 1:return t=e.sent(),l(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.conversationList.filter((function(t){return t.type!==r.TYPES.CONV_SYSTEM}))),[2]}}))}))}),[v]),{message:x,conversationList:d,sendForwardMessage:function(t){t.map((function(t){return x&&i.sendForwardMessage([t],[x]),t}))}}}export{u as useHandleForwardMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as e,useEffect as t}from"react";import o from"@tencentcloud/chat";import{MESSAGE_OPERATE as n}from"../../../constants.js";import"tslib";import"react/jsx-runtime";import"@tencentcloud/tui-core";import"react-i18next";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as a}from"../../../context/TUIChatStateContext.js";import"../../../context/TUIMessageContext.js";var i,r,S=((i={})[o.TYPES.MSG_TEXT]=1,i[o.TYPES.MSG_CUSTOM]=2,i[o.TYPES.MSG_IMAGE]=3,i[o.TYPES.MSG_AUDIO]=4,i[o.TYPES.MSG_VIDEO]=5,i[o.TYPES.MSG_FILE]=6,i[o.TYPES.MSG_FACE]=8,i),l=((r={})[o.TYPES.MSG_CUSTOM]="[custom]",r[o.TYPES.MSG_IMAGE]="[image]",r[o.TYPES.MSG_AUDIO]="[audio]",r[o.TYPES.MSG_VIDEO]="[video]",r[o.TYPES.MSG_FILE]="[file]",r[o.TYPES.MSG_FACE]="[face]",r);function s(i){var r=a("TUIMessageInputDefault").operateData,s=e({messageReply:null}),u=s[0],m=s[1],E=function(e){var t,n=S[null==e?void 0:e.type];return{messageAbstract:(null==e?void 0:e.type)===o.TYPES.MSG_TEXT?null===(t=null==e?void 0:e.payload)||void 0===t?void 0:t.text:l[null==e?void 0:e.type],messageSender:(null==e?void 0:e.nick)||(null==e?void 0:e.from),messageID:null==e?void 0:e.ID,messageType:n,version:1}};return t((function(){var e=i||r&&r[n.QUOTE];m({messageReply:e?E(e):null})}),[r,i]),{cloudCustomData:u,handleQuoteMessage:E,message:i||r&&r[n.QUOTE]}}export{s as useHandleQuoteMessage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__awaiter as t,__generator as e}from"tslib";import{useCallback as n}from"react";import{TUIChatService as o}from"@tencentcloud/chat-uikit-engine";import{CONSTANT_DISPATCH_TYPE as r,MESSAGE_TYPE_NAME as i,MESSAGE_OPERATE as u}from"../../../constants.js";import{useUIKit as a}from"../../../context/UIKitContext.js";import"react/jsx-runtime";import{useTUIChatActionContext as s}from"../../../context/TUIChatActionContext.js";import"../../../context/TUIMessageContext.js";import{enableSampleTaskStatus as l}from"../../untils.js";import{formatEmojiString as c}from"../../TUIMessage/utils/emojiMap.js";import{useHandleQuoteMessage as d}from"./useHandleQuoteMessage.js";var v=function(v){var f=v.state,p=v.dispatch;v.focus;var T=v.textareaRef,m=v.sendUploadMessage,g=a().chat,x=s(),y=x.operateMessage,E=x.setFirstSendMessage,S=d().cloudCustomData,h=["Enter","NumpadEnter"],C=n((function(t){t.preventDefault(),t&&t.target&&p({type:r.SET_TEXT,getNewText:function(e){return t.target.value}})}),[g]),D=function(n){return t(void 0,void 0,void 0,(function(){var t,i;return e(this,(function(e){return null==n||n.preventDefault(),f.text?(t={payload:{text:c(f.text)}},S.messageReply&&(t.cloudCustomData=JSON.stringify(S)),o.sendTextMessage(t).then((function(t){var e=t.data.message;E&&E(e)})),l("sendMessage"),p({getNewText:function(t){return""},type:r.SET_TEXT}),y&&y(((i={})[u.QUOTE]=null,i)),[2]):[2]}))}))},M=n((function(t){!(null==t?void 0:t.ctrlKey)&&(null==t?void 0:t.code)&&h.indexOf(null==t?void 0:t.code)>-1&&13===t.keyCode&&(null==t||t.preventDefault(),D(t)),(null==t?void 0:t.ctrlKey)&&h.indexOf(null==t?void 0:t.code)>-1&&13===t.keyCode&&p({type:r.SET_TEXT,getNewText:function(t){return"".concat(t,"\n")}})}),[D,p]),P=n((function(n){return t(void 0,void 0,void 0,(function(){var t,o,u;return e(this,(function(e){return n.preventDefault(),n.clipboardData&&n.clipboardData.items?(t=n.clipboardData,o=t.types,u=t.items,o.find((function(t,e){var n=u[e];switch(t){case"text/plain":return n.getAsString((function(t){p({type:r.SET_TEXT,getNewText:function(e){return"".concat(e).concat(t)}})})),!0;case"Files":var o=n.getAsFile();return n&&"file"===n.kind&&n.type.match(/^image\//i)&&m&&m({file:o},i.IMAGE),!0;default:return!1}})),[2]):[2]}))}))}),[T]),_=n((function(t){var e,n,o;p({type:r.SET_TEXT,getNewText:function(e){var n,o;return"".concat(e.slice(0,(null===(n=null==f?void 0:f.cursorPos)||void 0===n?void 0:n.start)||0)).concat(t).concat(e.slice((null===(o=null==f?void 0:f.cursorPos)||void 0===o?void 0:o.start)||0))}}),p({type:r.SET_CURSOR_POS,value:{start:(null===(e=null==f?void 0:f.cursorPos)||void 0===e?void 0:e.start)&&f.cursorPos.start+t.length,end:(null===(n=null==f?void 0:f.cursorPos)||void 0===n?void 0:n.end)&&f.cursorPos.end+t.length}}),null===(o=null==T?void 0:T.current)||void 0===o||o.focus({preventScroll:!0})}),[T,f]),j=n((function(t){var e;p({type:r.SET_TEXT,getNewText:function(){return"".concat(t)}}),null===(e=null==T?void 0:T.current)||void 0===e||e.focus()}),[T]),w=n((function(t){p({type:r.SET_CURSOR_POS,value:t})}),[T]);return{handleChange:C,handleSubmit:D,handleKeyDown:M,handlePasete:P,insertText:_,setText:j,setCursorPos:w}};export{v as useMessageInputText};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{TUIChatService as t}from"@tencentcloud/chat-uikit-engine";import{MESSAGE_TYPE_NAME as o}from"../../../constants.js";import{enableSampleTaskStatus as s}from"../../untils.js";import"tslib";import"react/jsx-runtime";import"@tencentcloud/tui-core";import"react-i18next";import{useTUIChatActionContext as n}from"../../../context/TUIChatActionContext.js";import"../../../context/TUIMessageContext.js";function i(i){var r;n().updateUploadPendingMessageList;var a=((r={})[o.IMAGE]=t.sendImageMessage,r[o.VIDEO]=t.sendVideoMessage,r[o.FILE]=t.sendFileMessage,r);return{sendUploadMessage:e((function(e,t){a[t]({payload:e}),s("sendMessage")}),[])}}export{i as useUploadPicker};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as i}from"tslib";import{jsx as o,jsxs as n}from"react/jsx-runtime";import r,{useState as l,useEffect as s}from"react";import{useTranslation as a}from"react-i18next";import"@tencentcloud/tui-core";import"@tencentcloud/chat-uikit-engine";import{useTUIChatStateContext as c}from"../../context/TUIChatStateContext.js";import{useTUIChatActionContext as d}from"../../context/TUIChatActionContext.js";import"../../context/TUIMessageContext.js";import{useComponentContext as m}from"../../context/ComponentContext.js";import u from"./hooks/useMessageListElement.js";import{InfiniteScroll as g}from"../InfiniteScrollPaginator/InfiniteScroll.js";import{EmptyStateIndicator as h}from"../EmptyStateIndicator/EmptyStateIndicator.js";function v(r){var v=this,f=r.highlightedMessageId,p=r.loadMore,M=r.intervalsTimer,T=r.className,I=a().t,C=l(null),x=C[0],L=C[1],j=l(!1),S=j[0],U=j[1],E=c("TUIMessageList"),y=E.messageList,N=E.highlightedMessageId,b=E.isCompleted;E.isSameLastMessageID;var H=E.messageListRef,R=E.noMore,k=E.TUIMessageListConfig,B=d(),q=B.loadMore,w=B.setHighlightedMessageId,A=m(),D=A.TUIMessage,P=A.EmptyStateIndicator,z=void 0===P?h:P,F=f||(null==k?void 0:k.highlightedMessageId)||N,G=60*(M||(null==k?void 0:k.intervalsTimer)||30),J=p||(null==k?void 0:k.loadMore)||q,K=y&&u({enrichedMessageList:y,TUIMessage:D,intervalsTimer:G});return s((function(){t(v,void 0,void 0,(function(){var e,t,o,n;return i(this,(function(i){switch(i.label){case 0:return e=null===(n=null==x?void 0:x.parentElement)||void 0===n?void 0:n.parentElement,!b&&e&&(null==e?void 0:e.clientHeight)>=(null==x?void 0:x.clientHeight)?J?[4,J()]:[3,2]:[3,3];case 1:i.sent(),i.label=2;case 2:i.label=3;case 3:return(null==x?void 0:x.children)&&((t=(null==x?void 0:x.children)||[])[t.length-1],o=setTimeout((function(){(null==H?void 0:H.current)&&(H.current.scrollTop=H.current.scrollHeight),U(!0),clearTimeout(o)}),100)),[2]}}))}))}),[K,S]),s((function(){if(F){var e=null==x?void 0:x.querySelector("[data-message-id='".concat(F,"']"));if(!e)return;var t=e.children;if(t[t.length-1].classList.add("high-lighted"),null==H?void 0:H.current){var i=e.getBoundingClientRect(),o=H.current.getBoundingClientRect(),n=i.top-o.top+H.current.scrollTop;H.current.scrollTop=n}var r=setTimeout((function(){t[t.length-1].classList.remove("high-lighted"),clearTimeout(r),w&&w("")}),1e3)}}),[F]),n("div",e({className:"message-list ".concat(T," ").concat(S?"":"hide"),ref:H},{children:[R,R&&o("p",e({className:"no-more"},{children:I("TUIChat.No More")})),o(g,e({className:"message-list-infinite-scroll",hasMore:!0,loadMore:J,threshold:1},{children:o("ul",e({ref:L},{children:(null==K?void 0:K.length)&&K.length>0?K:o(z,{listType:"message"})}))}))]}))}var f=r.memo(v);function p(t){return o(f,e({},t))}export{p as TUIMessageList};
|
|
@@ -1 +0,0 @@
|
|
|
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"../../untils.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 +0,0 @@
|
|
|
1
|
-
import React__default, { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
3
|
-
interface TUIProfileProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
TUIProfile?: React__default.ComponentType<any>;
|
|
6
|
-
}
|
|
7
|
-
declare function UnMemoizedTUIProfile<T extends TUIProfileProps>(props: PropsWithChildren<T>): React__default.ReactElement;
|
|
8
|
-
declare const TUIProfile: typeof UnMemoizedTUIProfile;
|
|
9
|
-
|
|
10
|
-
export { TUIProfile };
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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"../untils.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 +0,0 @@
|
|
|
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,enGB as c,ja as f,ko as u}from"date-fns/locale";import l from"@tencentcloud/chat";import{TUIStore as p,StoreName as s}from"@tencentcloud/chat-uikit-engine";import"tslib";import"react/jsx-runtime";import"react";import"./Icon/config.js";import"./Icon/type.js";import{defaultGroupAvatarWork as m,defaultUserAvatar as d}from"./Avatar/default.js";function P(t){if("string"==typeof t)try{return!!JSON.parse(t)}catch(t){return!1}return!1}function C(t){return P(t)?JSON.parse(t):t}var v=function(t,e){void 0===e&&(e=l.TYPES.CONV_C2C);var r=t;if(!t)switch(e){case l.TYPES.CONV_C2C:r=d;break;case l.TYPES.CONV_GROUP:default:r=m}return r},y=function(l,p){void 0===p&&(p="en-US");var s={"zh-CN":i,"en-US":c,"ja-JP":f,"ko-KR":u};return l?t(l)?r(l)?e(l,"p",{locale:s[p]}):o(l)?a(l,new Date,{locale:s[p]}):n(l)?e(l,"eeee",{locale:s[p]}):e(l,"MMM dd",{locale:s[p]}):e(l,"yyyy MMM dd",{locale:s[p]}):""};function S(t){var e=p.getData(s.APP,"tasks");t in e&&!e[t]&&(e[t]=!0,p.update(s.APP,"tasks",e))}export{C as JSONStringToParse,S as enableSampleTaskStatus,y as getTimeStamp,v as handleDisplayAvatar,P as isJSON};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{__assign as t}from"tslib";import{jsx as e}from"react/jsx-runtime";import o,{useContext as s}from"react";import{TUIConversationList as n}from"../components/TUIConversationList/TUIConversationList.js";import"@tencentcloud/chat";import"@tencentcloud/chat-uikit-engine";import"date-fns";import"date-fns/locale";import"../components/Icon/config.js";import"../components/Icon/type.js";import"@tencentcloud/tui-core";import"react-i18next";import"./TUIMessageContext.js";import"../constants.js";import"../components/TUIMessage/hooks/useMessageReply.js";import"../components/TUIMessage/MessagePlugins.js";import"../components/TUIMessage/MessageContext.js";import"../utils/env.js";import"../components/TUIMessageInput/hooks/useHandleQuoteMessage.js";import"../components/TUIProfile/TUIProfileDefault.js";var r=o.createContext({});function i(o){var s=o.children,i=o.value;return e(r.Provider,t({value:i},{children:s||e(n,{})}))}var m=function(t){var e=s(r);return!e&&t?{}:e};export{r as TUIConversationContext,i as TUIConversationProvider,m as useTUIConversationContext};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a={chats:"Messages",contacts:"Contacts"};export{a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a={chats:"メッセージ",contacts:"連絡先"};export{a as TUIGlobal,a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a={chats:"채팅",contacts:"연락처"};export{a as TUIGlobal,a as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a={chats:"消息",contacts:"通讯录"};export{a as TUIGlobal,a as default};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { execSync } = require('child_process');
|
|
4
|
-
|
|
5
|
-
// Change directory to tuikit/examples/sample-chat
|
|
6
|
-
process.chdir(path.join('examples', 'sample-chat'));
|
|
7
|
-
|
|
8
|
-
// Remove .env file
|
|
9
|
-
fs.unlinkSync('.env');
|
|
10
|
-
|
|
11
|
-
// Remove package.json
|
|
12
|
-
fs.unlinkSync('package.json');
|
|
13
|
-
|
|
14
|
-
// Rename package-github.json to package.json
|
|
15
|
-
fs.renameSync('package-github.json', 'package.json');
|
|
16
|
-
|
|
17
|
-
// Change directory to src
|
|
18
|
-
process.chdir('src');
|
|
19
|
-
|
|
20
|
-
// Remove demo directory
|
|
21
|
-
fs.rmdirSync('demo', { recursive: true });
|
|
22
|
-
|
|
23
|
-
// Rename 'components' directory to 'demo'
|
|
24
|
-
fs.renameSync('components', 'demo');
|
|
25
|
-
|
|
26
|
-
// Remove social-demo to demo
|
|
27
|
-
fs.rmdirSync('social-demo', { recursive: true });
|
|
28
|
-
|
|
29
|
-
// Change directory to live-demo
|
|
30
|
-
process.chdir('live-demo');
|
|
31
|
-
|
|
32
|
-
// Remove live-demo.tsx file
|
|
33
|
-
fs.unlinkSync('live-demo.tsx');
|
|
34
|
-
|
|
35
|
-
// Change directory back to src
|
|
36
|
-
process.chdir('../');
|
|
37
|
-
|
|
38
|
-
// Copy live-demo directory to ../../live-chat/src
|
|
39
|
-
execSync('cp -r live-demo ../../live-chat/src');
|
|
40
|
-
|
|
41
|
-
// Remove live-demo directory
|
|
42
|
-
fs.rmdirSync('live-demo', { recursive: true });
|
|
43
|
-
|
|
44
|
-
// Remove bot-demo directory
|
|
45
|
-
fs.rmdirSync('bot-demo', { recursive: true });
|
|
46
|
-
|
|
47
|
-
// Change directory to debug
|
|
48
|
-
process.chdir('debug');
|
|
49
|
-
|
|
50
|
-
// Replace 20000737 with 0 in GenerateTestUserSig.js
|
|
51
|
-
fs.writeFileSync('GenerateTestUserSig.js', fs.readFileSync('GenerateTestUserSig.js', 'utf8').replace(/20000737/g, '0'));
|
|
52
|
-
|
|
53
|
-
// Change directory back to src
|
|
54
|
-
process.chdir('../');
|
|
55
|
-
|
|
56
|
-
// Change directory to ../../live-chat/src/debug
|
|
57
|
-
process.chdir(path.join('../', '../', 'live-chat', 'src', 'debug'));
|
|
58
|
-
|
|
59
|
-
// Replace 20000737 with 0 in GenerateTestUserSig.js
|
|
60
|
-
fs.writeFileSync('GenerateTestUserSig.js', fs.readFileSync('GenerateTestUserSig.js', 'utf8').replace(/20000737/g, '0'));
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const { execSync } = require('child_process');
|
|
4
|
-
|
|
5
|
-
// Change directory to tuikit/examples/sample-chat
|
|
6
|
-
process.chdir(path.join('examples', 'sample-chat'));
|
|
7
|
-
|
|
8
|
-
// Change directory to src
|
|
9
|
-
process.chdir('src');
|
|
10
|
-
process.chdir('social-demo');
|
|
11
|
-
// Remove file
|
|
12
|
-
fs.unlinkSync('index.tsx');
|
|
13
|
-
// Rename index-intl.tsx to index
|
|
14
|
-
fs.renameSync('index-intl.tsx', 'index.tsx');
|