@tencentcloud/chat-uikit-react 2.3.0 → 2.3.1
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 +5 -0
- package/dist/cjs/components/Chat/Chat.js +1 -1
- package/dist/cjs/components/Chat/index.js +1 -1
- package/dist/cjs/components/ChatHeader/ChatHeader.js +1 -1
- package/dist/cjs/components/ChatHeader/ChatHeaderDefault.js +1 -1
- package/dist/cjs/components/ChatSetting/ChatSetting.js +1 -1
- package/dist/cjs/components/Contact/Contact.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/ContactInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/addFriendInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/basicInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/blockInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/friendApplication.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/friendInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/groupInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -1
- package/dist/cjs/components/Contact/ContactList/ContactList.js +1 -1
- package/dist/cjs/components/Contact/hooks/useTUIContact.js +1 -1
- package/dist/cjs/components/ContactSearch/ContactSearch.js +1 -1
- package/dist/cjs/components/ContactSearch/hooks/useContactSearch.js +1 -1
- package/dist/cjs/components/ConversationActions/ConversationActions.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/cjs/components/ConversationList/ConversationList.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -1
- package/dist/cjs/components/MessageElement/Message.js +1 -1
- package/dist/cjs/components/MessageElement/MessageAudio.js +1 -1
- package/dist/cjs/components/MessageElement/MessageAvatar.js +1 -1
- package/dist/cjs/components/MessageElement/MessageBubble.js +1 -1
- package/dist/cjs/components/MessageElement/MessageContext.js +1 -1
- package/dist/cjs/components/MessageElement/MessageCustom.js +1 -1
- package/dist/cjs/components/MessageElement/MessageDefault.js +1 -1
- package/dist/cjs/components/MessageElement/MessageName.js +1 -1
- package/dist/cjs/components/MessageElement/MessagePlugins.js +1 -1
- package/dist/cjs/components/MessageElement/MessageProgress.js +1 -1
- package/dist/cjs/components/MessageElement/MessageRevoke.js +1 -1
- package/dist/cjs/components/MessageElement/MessageStatus.js +1 -1
- package/dist/cjs/components/MessageElement/MessageSystem.js +1 -1
- package/dist/cjs/components/MessageElement/MessageText.js +1 -1
- package/dist/cjs/components/MessageElement/MessageTip.js +1 -1
- package/dist/cjs/components/MessageElement/hooks/useMessageHandler.js +1 -1
- package/dist/cjs/components/MessageElement/hooks/useMessageReply.js +1 -1
- package/dist/cjs/components/MessageElement/utils/decodeText.js +1 -1
- package/dist/cjs/components/MessageElement/utils/emojiMap.js +1 -1
- package/dist/cjs/components/MessageElement/utils/index.js +1 -1
- package/dist/cjs/components/MessageInput/EmojiPicker.js +1 -1
- package/dist/cjs/components/MessageInput/Forward.js +1 -1
- package/dist/cjs/components/MessageInput/InputPluginsDefalut.js +1 -1
- package/dist/cjs/components/MessageInput/InputQuoteDefalut.js +1 -1
- package/dist/cjs/components/MessageInput/MessageInput.js +1 -1
- package/dist/cjs/components/MessageInput/MessageInputDefault.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -1
- package/dist/cjs/components/MessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/cjs/components/MessageList/MessageList.js +1 -1
- package/dist/cjs/components/MessageList/hooks/useMessageListElement.js +1 -1
- package/dist/cjs/components/Profile/Profile.js +1 -1
- package/dist/cjs/components/Profile/ProfileDefault.js +1 -1
- package/dist/cjs/context/UIKitContext.js +1 -1
- package/dist/cjs/index.css +2 -2
- package/dist/cjs/index.d.css +213 -207
- package/dist/cjs/index.d.ts +0 -3
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en-US/emoji.js +1 -0
- package/dist/cjs/locales/en-US/index.js +1 -1
- package/dist/cjs/locales/index.js +1 -1
- package/dist/cjs/locales/ja-JP/emoji.js +1 -0
- package/dist/cjs/locales/ja-JP/index.js +1 -1
- package/dist/cjs/locales/ko-KR/emoji.js +1 -0
- package/dist/cjs/locales/ko-KR/index.js +1 -1
- package/dist/cjs/locales/zh-CN/emoji.js +1 -0
- package/dist/cjs/locales/zh-CN/index.js +1 -1
- package/dist/cjs/locales/zh-TW/emoji.js +1 -0
- package/dist/cjs/locales/zh-TW/index.js +1 -1
- package/dist/cjs/node_modules/zustand/esm/react.mjs.js +1 -0
- package/dist/cjs/node_modules/zustand/esm/vanilla.mjs.js +1 -0
- package/dist/cjs/store/UIManagerStore.js +1 -0
- package/dist/esm/components/Chat/Chat.js +1 -1
- package/dist/esm/components/Chat/index.js +1 -1
- package/dist/esm/components/ChatHeader/ChatHeader.js +1 -1
- package/dist/esm/components/ChatHeader/ChatHeaderDefault.js +1 -1
- package/dist/esm/components/ChatSetting/ChatSetting.js +1 -1
- package/dist/esm/components/Contact/Contact.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/ContactInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/addFriendInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/basicInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/blockInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/friendApplication.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/friendInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/groupInfo.js +1 -1
- package/dist/esm/components/Contact/ContactInfo/hooks/useContactInfo.js +1 -1
- package/dist/esm/components/Contact/ContactList/ContactList.js +1 -1
- package/dist/esm/components/Contact/hooks/useTUIContact.js +1 -1
- package/dist/esm/components/ContactSearch/ContactSearch.js +1 -1
- package/dist/esm/components/ContactSearch/hooks/useContactSearch.js +1 -1
- package/dist/esm/components/ConversationActions/ConversationActions.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateGroupDetail.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/esm/components/ConversationList/ConversationList.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js +1 -1
- package/dist/esm/components/MessageElement/Message.js +1 -1
- package/dist/esm/components/MessageElement/MessageAudio.js +1 -1
- package/dist/esm/components/MessageElement/MessageAvatar.js +1 -1
- package/dist/esm/components/MessageElement/MessageBubble.js +1 -1
- package/dist/esm/components/MessageElement/MessageContext.js +1 -1
- package/dist/esm/components/MessageElement/MessageCustom.js +1 -1
- package/dist/esm/components/MessageElement/MessageDefault.js +1 -1
- package/dist/esm/components/MessageElement/MessageName.js +1 -1
- package/dist/esm/components/MessageElement/MessagePlugins.js +1 -1
- package/dist/esm/components/MessageElement/MessageProgress.js +1 -1
- package/dist/esm/components/MessageElement/MessageRevoke.js +1 -1
- package/dist/esm/components/MessageElement/MessageStatus.js +1 -1
- package/dist/esm/components/MessageElement/MessageSystem.js +1 -1
- package/dist/esm/components/MessageElement/MessageText.js +1 -1
- package/dist/esm/components/MessageElement/MessageTip.js +1 -1
- package/dist/esm/components/MessageElement/hooks/useMessageHandler.js +1 -1
- package/dist/esm/components/MessageElement/hooks/useMessageReply.js +1 -1
- package/dist/esm/components/MessageElement/utils/decodeText.js +1 -1
- package/dist/esm/components/MessageElement/utils/emojiMap.js +1 -1
- package/dist/esm/components/MessageElement/utils/index.js +1 -1
- package/dist/esm/components/MessageInput/EmojiPicker.js +1 -1
- package/dist/esm/components/MessageInput/Forward.js +1 -1
- package/dist/esm/components/MessageInput/InputPluginsDefalut.js +1 -1
- package/dist/esm/components/MessageInput/InputQuoteDefalut.js +1 -1
- package/dist/esm/components/MessageInput/MessageInput.js +1 -1
- package/dist/esm/components/MessageInput/MessageInputDefault.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useHandleForwardMessage.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useHandleQuoteMessage.js +1 -1
- package/dist/esm/components/MessageInput/hooks/useMessageInputText.js +1 -1
- package/dist/esm/components/MessageList/MessageList.js +1 -1
- package/dist/esm/components/MessageList/hooks/useMessageListElement.js +1 -1
- package/dist/esm/components/Profile/Profile.js +1 -1
- package/dist/esm/components/Profile/ProfileDefault.js +1 -1
- package/dist/esm/context/UIKitContext.js +1 -1
- package/dist/esm/index.css +2 -2
- package/dist/esm/index.d.css +213 -207
- package/dist/esm/index.d.ts +0 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en-US/emoji.js +1 -0
- package/dist/esm/locales/en-US/index.js +1 -1
- package/dist/esm/locales/index.js +1 -1
- package/dist/esm/locales/ja-JP/emoji.js +1 -0
- package/dist/esm/locales/ja-JP/index.js +1 -1
- package/dist/esm/locales/ko-KR/emoji.js +1 -0
- package/dist/esm/locales/ko-KR/index.js +1 -1
- package/dist/esm/locales/zh-CN/emoji.js +1 -0
- package/dist/esm/locales/zh-CN/index.js +1 -1
- package/dist/esm/locales/zh-TW/emoji.js +1 -0
- package/dist/esm/locales/zh-TW/index.js +1 -1
- package/dist/esm/node_modules/zustand/esm/react.mjs.js +1 -0
- package/dist/esm/node_modules/zustand/esm/vanilla.mjs.js +1 -0
- package/dist/esm/store/UIManagerStore.js +1 -0
- package/package.json +5 -3
- package/src/components/Chat/Chat.tsx +3 -3
- package/src/components/Chat/styles/layout.scss +1 -1
- package/src/components/ChatHeader/ChatHeaderDefault.tsx +4 -3
- package/src/components/ChatHeader/styles/layout.scss +1 -1
- package/src/components/ChatSetting/ChatSetting.tsx +8 -7
- package/src/components/ChatSetting/styles/index.scss +2 -1
- package/src/components/Checkbox/styles/color.scss +1 -1
- package/src/components/Contact/Contact.tsx +4 -4
- package/src/components/Contact/ContactInfo/ContactInfo.tsx +2 -2
- package/src/components/Contact/ContactInfo/addFriendInfo.tsx +38 -36
- package/src/components/Contact/ContactInfo/basicInfo.tsx +10 -10
- package/src/components/Contact/ContactInfo/blockInfo.tsx +4 -4
- package/src/components/Contact/ContactInfo/friendApplication.tsx +4 -4
- package/src/components/Contact/ContactInfo/friendInfo.tsx +7 -7
- package/src/components/Contact/ContactInfo/groupInfo.tsx +23 -23
- package/src/components/Contact/ContactInfo/hooks/useContactInfo.tsx +2 -2
- package/src/components/Contact/ContactInfo/index.scss +1 -1
- package/src/components/Contact/ContactList/ContactList.tsx +5 -4
- package/src/components/Contact/ContactList/index.scss +1 -1
- package/src/components/Contact/hooks/useTUIContact.tsx +2 -2
- package/src/components/Contact/index.scss +1 -1
- package/src/components/ContactSearch/ContactSearch.tsx +5 -4
- package/src/components/ContactSearch/hooks/useContactSearch.tsx +4 -3
- package/src/components/ContactSearch/index.scss +1 -1
- package/src/components/ConversationActions/ConversationActions.scss +1 -1
- package/src/components/ConversationActions/ConversationActions.tsx +2 -2
- package/src/components/ConversationCreate/ConversationCreate.tsx +2 -2
- package/src/components/ConversationCreate/ConversationCreateGroupDetail.tsx +4 -4
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +4 -4
- package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +2 -2
- package/src/components/ConversationCreate/styles/ConversationCreateGroupDetail.scss +1 -1
- package/src/components/ConversationCreate/styles/conversationCreateSelectView.scss +1 -1
- package/src/components/ConversationCreate/styles/conversationGroupTypeInfo.scss +1 -1
- package/src/components/ConversationCreate/styles/index.scss +1 -1
- package/src/components/ConversationList/ConversationList.scss +1 -1
- package/src/components/ConversationList/ConversationListContent/ConversationListContent.scss +1 -1
- package/src/components/ConversationList/ConversationListHeader/ConversationListHeader.scss +1 -1
- package/src/components/ConversationPreview/ConversationPreview.scss +1 -1
- package/src/components/ConversationPreview/ConversationPreview.tsx +3 -3
- package/src/components/ConversationPreview/utils.tsx +2 -2
- package/src/components/ConversationSearch/ConversationSearch.scss +1 -1
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.scss +1 -1
- package/src/components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.tsx +2 -2
- package/src/components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.scss +1 -1
- package/src/components/DivWithEdit/styles/index.scss +1 -1
- package/src/components/Icon/styles/index.scss +1 -1
- package/src/components/Input/styles/index.scss +2 -2
- package/src/components/MessageElement/MessageCustom.tsx +4 -4
- package/src/components/MessageElement/MessagePlugins.tsx +3 -3
- package/src/components/MessageElement/MessageRevoke.tsx +5 -5
- package/src/components/MessageElement/MessageStatus.tsx +2 -1
- package/src/components/MessageElement/hooks/useMessageHandler.ts +9 -6
- package/src/components/MessageElement/hooks/useMessageReply.ts +3 -2
- package/src/components/MessageElement/styles/color.scss +1 -1
- package/src/components/MessageElement/styles/layout.scss +2 -2
- package/src/components/MessageElement/utils/decodeText.ts +59 -9
- package/src/components/MessageElement/utils/emojiMap.ts +73 -474
- package/src/components/MessageElement/utils/index.ts +1 -5
- package/src/components/MessageInput/EmojiPicker.tsx +10 -8
- package/src/components/MessageInput/Forward.tsx +2 -2
- package/src/components/MessageInput/InputPluginsDefalut.tsx +2 -2
- package/src/components/MessageInput/InputQuoteDefalut.tsx +6 -6
- package/src/components/MessageInput/MessageInput.tsx +0 -1
- package/src/components/MessageInput/MessageInputDefault.tsx +5 -5
- package/src/components/MessageInput/hooks/useEmojiPicker.tsx +11 -16
- package/src/components/MessageInput/hooks/useHandleForwardMessage.tsx +3 -4
- package/src/components/MessageInput/hooks/useMessageInputText.tsx +17 -11
- package/src/components/MessageInput/styles/color.scss +1 -1
- package/src/components/MessageInput/styles/layout.scss +2 -2
- package/src/components/MessageList/MessageList.tsx +2 -2
- package/src/components/MessageList/hooks/useMessageListElement.tsx +3 -2
- package/src/components/MessageList/styles/layout.scss +1 -1
- package/src/components/Plugins/styles/color.scss +1 -1
- package/src/components/Profile/Profile.tsx +2 -2
- package/src/components/Profile/ProfileDefault.tsx +4 -4
- package/src/components/Profile/myProfile/styles/index.scss +1 -1
- package/src/components/Profile/styles/color.scss +1 -1
- package/src/components/Profile/styles/layout.scss +1 -1
- package/src/context/UIKitContext.tsx +2 -8
- package/src/context/UIManagerContext.tsx +5 -5
- package/src/context/index.ts +0 -1
- package/src/locales/en-US/emoji.ts +66 -0
- package/src/locales/en-US/index.ts +2 -0
- package/src/locales/index.ts +4 -22
- package/src/locales/ja-JP/emoji.ts +66 -0
- package/src/locales/ja-JP/index.ts +2 -0
- package/src/locales/ko-KR/emoji.ts +66 -0
- package/src/locales/ko-KR/index.ts +2 -0
- package/src/locales/zh-CN/emoji.ts +66 -0
- package/src/locales/zh-CN/index.ts +2 -0
- package/src/locales/zh-TW/emoji.ts +65 -0
- package/src/locales/zh-TW/index.ts +2 -0
- package/src/store/UIManagerStore.ts +108 -0
- package/src/store/index.ts +5 -0
- package/.babelrc +0 -7
- package/.editorconfig +0 -16
- package/.husky/pre-commit +0 -4
- package/.lintstagedrc.json +0 -6
- package/.stylelintrc.js +0 -40
- package/dist/cjs/context/UIManagerContext.d.ts +0 -46
- package/dist/cjs/context/UIManagerContext.js +0 -1
- package/dist/cjs/locales/index.d.ts +0 -6
- package/dist/esm/context/UIManagerContext.d.ts +0 -46
- package/dist/esm/context/UIManagerContext.js +0 -1
- package/dist/esm/locales/index.d.ts +0 -6
- package/rollup.config.js +0 -81
- package/scripts/publish-npm.js +0 -22
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { Chat } from './components/Chat/Chat.js';
|
|
2
2
|
export { UIKitProvider, useUIKit } from './context/UIKitContext.js';
|
|
3
|
-
export { UIManagerContextType, UIManagerProvider, useUIManager } from './context/UIManagerContext.js';
|
|
4
3
|
export { TUIChatStateContext, TUIChatStateContextProvider, TUIChatStateContextValue, useTUIChatStateContext } from './context/ChatStateContext.js';
|
|
5
4
|
export { TUIChatActionContext, TUIChatActionContextValue, TUIChatActionProvider, useTUIChatActionContext } from './context/ChatActionContext.js';
|
|
6
5
|
export { TUIMessageContext, TUIMessageContextProvider, TUIMessageContextValue, messageShowType, useTUIMessageContext } from './context/MessageContext.js';
|
|
@@ -55,6 +54,4 @@ export { Contact, UnMemoizedContact } from './components/Contact/Contact.js';
|
|
|
55
54
|
export { createC2CConversation, createGroupConversation } from './hooks/useConversation.js';
|
|
56
55
|
export { useProfile } from './hooks/useProfile.js';
|
|
57
56
|
export { isTouchEvent } from './hooks/useLongPress.js';
|
|
58
|
-
export { t } from './locales/index.js';
|
|
59
57
|
export { isH5, isPC, setPlatform } from './utils/env.js';
|
|
60
|
-
export { default as i18next } from 'i18next';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from"./server.js";import"./components/Chat/index.js";export{ConversationList}from"./components/ConversationList/ConversationList.js";export{ConversationListHeader}from"./components/ConversationList/ConversationListHeader/ConversationListHeader.js";export{ConversationListContent}from"./components/ConversationList/ConversationListContent/ConversationListContent.js";export{ConversationActions}from"./components/ConversationActions/ConversationActions.js";export{ConversationPreview,ConversationPreviewUI}from"./components/ConversationPreview/ConversationPreview.js";export{ConversationSearchInput}from"./components/ConversationSearch/ConversationSearchInput/ConversationSearchInput.js";export{ConversationSearchResult}from"./components/ConversationSearch/ConversationSearchResult/ConversationSearchResult.js";export{ConversationSearch,defaultSearchFn}from"./components/ConversationSearch/ConversationSearch.js";export{ConversationCreate,PageStateTypes}from"./components/ConversationCreate/ConversationCreate.js";export{ConversationCreateSelectView}from"./components/ConversationCreate/ConversationCreateSelectView.js";export{ConversationCreateGroupDetail}from"./components/ConversationCreate/ConversationCreateGroupDetail.js";export{ConversationCreateUserSelectList}from"./components/ConversationCreate/ConversationCreateUserSelectList.js";export{useConversationCreate}from"./components/ConversationCreate/hooks/useConversationCreate.js";export{ConversationGroupTypeInfo,GroupType,typeInfoList}from"./components/ConversationCreate/ConversationGroupTypeInfo.js";export{ConversationCreateButton}from"./components/ConversationCreate/ConversationCreateButton.js";export{ChatHeader}from"./components/ChatHeader/ChatHeader.js";export{ChatHeaderDefault}from"./components/ChatHeader/ChatHeaderDefault.js";export{MessageList}from"./components/MessageList/MessageList.js";export{TUIMessage}from"./components/MessageElement/Message.js";export{MessagePlugins}from"./components/MessageElement/MessagePlugins.js";export{MessageContext}from"./components/MessageElement/MessageContext.js";export{MessageInput}from"./components/MessageInput/MessageInput.js";export{TUIMessageInputDefault}from"./components/MessageInput/MessageInputDefault.js";export{InputPluginsDefalut}from"./components/MessageInput/InputPluginsDefalut.js";export{Profile}from"./components/Profile/Profile.js";export{TUIProfileDefault}from"./components/Profile/ProfileDefault.js";export{Avatar}from"./components/Avatar/Avatar.js";export{defaultGroupAvatarAVChatRoom,defaultGroupAvatarMeeting,defaultGroupAvatarPublic,defaultGroupAvatarWork,defaultUserAvatar}from"./components/Avatar/default.js";export{ChatSetting}from"./components/ChatSetting/ChatSetting.js";export{Popup}from"./components/Popup/index.js";export{Checkbox}from"./components/Checkbox/index.js";export{DivWithEdit}from"./components/DivWithEdit/DivWithEdit.js";export{Icon,changeTypeToIconClassName}from"./components/Icon/Icon.js";export{IconTypes}from"./components/Icon/type.js";export{PlaceHolder,PlaceHolderIconTypes,PlaceHolderStringTypes,PlaceHolderTypes}from"./components/PlaceHolder/index.js";export{EmptyStateIndicator}from"./components/EmptyStateIndicator/EmptyStateIndicator.js";export{Input}from"./components/Input/Input.js";export{Model}from"./components/Model/index.js";export{Plugins}from"./components/Plugins/index.js";export{Switch}from"./components/Switch/Switch.js";export{Toast}from"./components/Toast/index.js";export{ContactList}from"./components/Contact/ContactList/ContactList.js";export{ContactInfo,UnMemoizedContactInfo}from"./components/Contact/ContactInfo/ContactInfo.js";export{Contact,UnMemoizedContact}from"./components/Contact/Contact.js";export{UIKitProvider,useUIKit}from"./context/UIKitContext.js";export{TUIChatStateContext,TUIChatStateContextProvider,useTUIChatStateContext}from"./context/ChatStateContext.js";export{TUIChatActionContext,TUIChatActionProvider,useTUIChatActionContext}from"./context/ChatActionContext.js";export{TUIMessageContext,TUIMessageContextProvider,messageShowType,useTUIMessageContext}from"./context/MessageContext.js";export{ComponentContext,ComponentProvider,useComponentContext}from"./context/ComponentContext.js";export{TUIMessageInputContext,TUIMessageInputContextProvider,useTUIMessageInputContext}from"./context/MessageInputContext.js";export{TUIContactContext,TUIContactContextProvider,useTUIContactContext}from"./context/ContactContext.js";export{ConversationListProvider,useConversationList}from"./context/ConversationListContext.js";import"./hooks/index.js";import"./locales/index.js";export{isH5,isPC,setPlatform}from"./utils/env.js";export{Chat}from"./components/Chat/Chat.js";export{createC2CConversation,createGroupConversation}from"./hooks/useConversation.js";export{useProfile}from"./hooks/useProfile.js";export{isTouchEvent}from"./hooks/useLongPress.js";new o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i={"[TUIEmoji_Smile]":"[Smile]","[TUIEmoji_Expect]":"[Expect]","[TUIEmoji_Blink]":"[Blink]","[TUIEmoji_Guffaw]":"[Guffaw]","[TUIEmoji_KindSmile]":"[KindSmile]","[TUIEmoji_Haha]":"[Haha]","[TUIEmoji_Cheerful]":"[Cheerful]","[TUIEmoji_Speechless]":"[Speechless]","[TUIEmoji_Amazed]":"[Amazed]","[TUIEmoji_Sorrow]":"[Sorrow]","[TUIEmoji_Complacent]":"[Complacent]","[TUIEmoji_Silly]":"[Silly]","[TUIEmoji_Lustful]":"[Lustful]","[TUIEmoji_Giggle]":"[Giggle]","[TUIEmoji_Kiss]":"[Kiss]","[TUIEmoji_Wail]":"[Wail]","[TUIEmoji_TearsLaugh]":"[TearsLaugh]","[TUIEmoji_Trapped]":"[Trapped]","[TUIEmoji_Mask]":"[Mask]","[TUIEmoji_Fear]":"[Fear]","[TUIEmoji_BareTeeth]":"[BareTeeth]","[TUIEmoji_FlareUp]":"[FlareUp]","[TUIEmoji_Yawn]":"[Yawn]","[TUIEmoji_Tact]":"[Tact]","[TUIEmoji_Stareyes]":"[StarEyes]","[TUIEmoji_ShutUp]":"[ShutUp]","[TUIEmoji_Sigh]":"[Sigh]","[TUIEmoji_Hehe]":"[Hehe]","[TUIEmoji_Silent]":"[Silent]","[TUIEmoji_Surprised]":"[Surprised]","[TUIEmoji_Askance]":"[Askance]]","[TUIEmoji_Ok]":"[OK]","[TUIEmoji_Shit]":"[Shit]","[TUIEmoji_Monster]":"[Monster]","[TUIEmoji_Daemon]":"[Daemon]","[TUIEmoji_Rage]":"[Rage]","[TUIEmoji_Fool]":"[Fool]","[TUIEmoji_Pig]":"[Pig]","[TUIEmoji_Cow]":"[Cow]","[TUIEmoji_Ai]":"[AI]","[TUIEmoji_Skull]":"[Skull]","[TUIEmoji_Bombs]":"[Bombs]","[TUIEmoji_Coffee]":"[Coffee]","[TUIEmoji_Cake]":"[Cake]","[TUIEmoji_Beer]":"[Beer]","[TUIEmoji_Flower]":"[Flower]","[TUIEmoji_Watermelon]":"[Watermelon]","[TUIEmoji_Rich]":"[Rich]","[TUIEmoji_Heart]":"[Heart]","[TUIEmoji_Moon]":"[Moon]","[TUIEmoji_Sun]":"[Sun]","[TUIEmoji_Star]":"[Star]","[TUIEmoji_RedPacket]":"[RedPacket]","[TUIEmoji_Celebrate]":"[Celebrate]","[TUIEmoji_Bless]":"[Bless]","[TUIEmoji_Fortune]":"[Fortune]","[TUIEmoji_Convinced]":"[Convinced]","[TUIEmoji_Prohibit]":"[Prohibit]","[TUIEmoji_666]":"[666]","[TUIEmoji_857]":"[857]","[TUIEmoji_Knife]":"[Knife]","[TUIEmoji_Like]":"[Like]"};export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import r from"./
|
|
1
|
+
import o from"./TUIChat.js";import r from"./emoji.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import i from"./TUIProfile.js";var I={TUIChat:o,Emoji:r,TUIConversation:t,TUIContact:m,TUIProfile:i};export{I as message};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{i18next as a}from"@tencentcloud/uikit-base-component-react";import{message as n}from"./en-US/index.js";import{message as t}from"./zh-CN/index.js";import{message as e}from"./ja-JP/index.js";import{message as s}from"./ko-KR/index.js";import{message as o}from"./zh-TW/index.js";for(var r={"en-US":{translation:n},"zh-CN":{translation:t},"ja-JP":{translation:e},"ko-KR":{translation:s},"zh-TW":{translation:o}},i=0,m=Object.entries(r);i<m.length;i++){var l=m[i],d=l[0],j=l[1];a.addResourceBundle(d,"translation",j.translation,!0,!1)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i={"[TUIEmoji_Smile]":"[微笑]","[TUIEmoji_Expect]":"[期待]","[TUIEmoji_Blink]":"[瞬き]","[TUIEmoji_Guffaw]":"[大笑]","[TUIEmoji_KindSmile]":"[親しみ]","[TUIEmoji_Haha]":"[笑い]","[TUIEmoji_Cheerful]":"[愉快]","[TUIEmoji_Speechless]":"[言葉無し]","[TUIEmoji_Amazed]":"[驚き]","[TUIEmoji_Sorrow]":"[悲しみ]","[TUIEmoji_Complacent]":"[満足]","[TUIEmoji_Silly]":"[ばか]","[TUIEmoji_Lustful]":"[欲望]","[TUIEmoji_Giggle]":"[笑い]","[TUIEmoji_Kiss]":"[キス]","[TUIEmoji_Wail]":"[泣き]","[TUIEmoji_TearsLaugh]":"[泣き笑い]","[TUIEmoji_Trapped]":"[困り]","[TUIEmoji_Mask]":"[マスク]","[TUIEmoji_Fear]":"[恐怖]","[TUIEmoji_BareTeeth]":"[歯見せ]","[TUIEmoji_FlareUp]":"[怒り]","[TUIEmoji_Yawn]":"[あくび]","[TUIEmoji_Tact]":"[機知]","[TUIEmoji_Stareyes]":"[星目]","[TUIEmoji_ShutUp]":"[黙れ]","[TUIEmoji_Sigh]":"[ため息]","[TUIEmoji_Hehe]":"[へへ]","[TUIEmoji_Silent]":"[沈黙]","[TUIEmoji_Surprised]":"[驚き]","[TUIEmoji_Askance]":"[白目]","[TUIEmoji_Ok]":"[OK]","[TUIEmoji_Shit]":"[便便]","[TUIEmoji_Monster]":"[モンスター]","[TUIEmoji_Daemon]":"[悪魔]","[TUIEmoji_Rage]":"[激怒]","[TUIEmoji_Fool]":"[バカ]","[TUIEmoji_Pig]":"[豚]","[TUIEmoji_Cow]":"[牛]","[TUIEmoji_Ai]":"[AI]","[TUIEmoji_Skull]":"[骸骨]","[TUIEmoji_Bombs]":"[爆弾]","[TUIEmoji_Coffee]":"[コーヒー]","[TUIEmoji_Cake]":"[ケーキ]","[TUIEmoji_Beer]":"[ビール]","[TUIEmoji_Flower]":"[花]","[TUIEmoji_Watermelon]":"[スイカ]","[TUIEmoji_Rich]":"[金持ち]","[TUIEmoji_Heart]":"[ハート]","[TUIEmoji_Moon]":"[月]","[TUIEmoji_Sun]":"[太陽]","[TUIEmoji_Star]":"[星]","[TUIEmoji_RedPacket]":"[紅包]","[TUIEmoji_Celebrate]":"[祝い]","[TUIEmoji_Bless]":"[祝福]","[TUIEmoji_Fortune]":"[幸運]","[TUIEmoji_Convinced]":"[納得]","[TUIEmoji_Prohibit]":"[禁止]","[TUIEmoji_666]":"[666]","[TUIEmoji_857]":"[857]","[TUIEmoji_Knife]":"[ナイフ]","[TUIEmoji_Like]":"[いいね]"};export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import r from"./
|
|
1
|
+
import o from"./TUIChat.js";import r from"./emoji.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import i from"./TUIProfile.js";var I={TUIChat:o,Emoji:r,TUIConversation:t,TUIContact:m,TUIProfile:i};export{I as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i={"[TUIEmoji_Smile]":"[미소]","[TUIEmoji_Expect]":"[기대]","[TUIEmoji_Blink]":"[눈길림]","[TUIEmoji_Guffaw]":"[대소]","[TUIEmoji_KindSmile]":"[친절]","[TUIEmoji_Haha]":"[하하]","[TUIEmoji_Cheerful]":"[기쁨]","[TUIEmoji_Speechless]":"[무언]","[TUIEmoji_Amazed]":"[놀람]","[TUIEmoji_Sorrow]":"[슬픔]","[TUIEmoji_Complacent]":"[만족]","[TUIEmoji_Silly]":"[바보]","[TUIEmoji_Lustful]":"[욕망]","[TUIEmoji_Giggle]":"[kichigae]","[TUIEmoji_Kiss]":"[키스]","[TUIEmoji_Wail]":"[울음]","[TUIEmoji_TearsLaugh]":"[울먹임]","[TUIEmoji_Trapped]":"[갇힘]","[TUIEmoji_Mask]":"[마스크]","[TUIEmoji_Fear]":"[공포]","[TUIEmoji_BareTeeth]":"[이빨보임]","[TUIEmoji_FlareUp]":"[화남]","[TUIEmoji_Yawn]":"[하품]","[TUIEmoji_Tact]":"[기지]","[TUIEmoji_Stareyes]":"[별눈]","[TUIEmoji_ShutUp]":"[조용히]","[TUIEmoji_Sigh]":"[한숨]","[TUIEmoji_Hehe]":"[헤헤]","[TUIEmoji_Silent]":"[침묵]","[TUIEmoji_Surprised]":"[놀람]","[TUIEmoji_Askance]":"[백안]","[TUIEmoji_Ok]":"[OK]","[TUIEmoji_Shit]":"[똥]","[TUIEmoji_Monster]":"[몬스터]","[TUIEmoji_Daemon]":"[악마]","[TUIEmoji_Rage]":"[분노]","[TUIEmoji_Fool]":"[바보]","[TUIEmoji_Pig]":"[돼지]","[TUIEmoji_Cow]":"[소]","[TUIEmoji_Ai]":"[AI]","[TUIEmoji_Skull]":"[해골]","[TUIEmoji_Bombs]":"[폭탄]","[TUIEmoji_Coffee]":"[커피]","[TUIEmoji_Cake]":"[케이크]","[TUIEmoji_Beer]":"[맥주]","[TUIEmoji_Flower]":"[꽃]","[TUIEmoji_Watermelon]":"[수박]","[TUIEmoji_Rich]":"[부자]","[TUIEmoji_Heart]":"[사랑]","[TUIEmoji_Moon]":"[달]","[TUIEmoji_Sun]":"[태양]","[TUIEmoji_Star]":"[별]","[TUIEmoji_RedPacket]":"[레드패킷]","[TUIEmoji_Celebrate]":"[축하]","[TUIEmoji_Bless]":"[복]","[TUIEmoji_Fortune]":"[운]","[TUIEmoji_Convinced]":"[복종]","[TUIEmoji_Prohibit]":"[금지]","[TUIEmoji_666]":"[666]","[TUIEmoji_857]":"[857]","[TUIEmoji_Knife]":"[칼]","[TUIEmoji_Like]":"[좋아요]"};export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import r from"./
|
|
1
|
+
import o from"./TUIChat.js";import r from"./emoji.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import i from"./TUIProfile.js";var I={TUIChat:o,Emoji:r,TUIConversation:t,TUIContact:m,TUIProfile:i};export{I as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i={"[TUIEmoji_Smile]":"[微笑]","[TUIEmoji_Expect]":"[期待]","[TUIEmoji_Blink]":"[眨眼]","[TUIEmoji_Guffaw]":"[大笑]","[TUIEmoji_KindSmile]":"[姨母笑]","[TUIEmoji_Haha]":"[哈哈哈]","[TUIEmoji_Cheerful]":"[愉快]","[TUIEmoji_Speechless]":"[无语]","[TUIEmoji_Amazed]":"[惊讶]","[TUIEmoji_Sorrow]":"[悲伤]","[TUIEmoji_Complacent]":"[得意]","[TUIEmoji_Silly]":"[傻了]","[TUIEmoji_Lustful]":"[色]","[TUIEmoji_Giggle]":"[憨笑]","[TUIEmoji_Kiss]":"[亲亲]","[TUIEmoji_Wail]":"[大哭]","[TUIEmoji_TearsLaugh]":"[哭笑]","[TUIEmoji_Trapped]":"[困]","[TUIEmoji_Mask]":"[口罩]","[TUIEmoji_Fear]":"[恐惧]","[TUIEmoji_BareTeeth]":"[龇牙]","[TUIEmoji_FlareUp]":"[发怒]","[TUIEmoji_Yawn]":"[打哈欠]","[TUIEmoji_Tact]":"[机智]","[TUIEmoji_Stareyes]":"[星星眼]","[TUIEmoji_ShutUp]":"[闭嘴]","[TUIEmoji_Sigh]":"[叹气]","[TUIEmoji_Hehe]":"[呵呵]","[TUIEmoji_Silent]":"[收声]","[TUIEmoji_Surprised]":"[惊喜]","[TUIEmoji_Askance]":"[白眼]","[TUIEmoji_Ok]":"[OK]","[TUIEmoji_Shit]":"[便便]","[TUIEmoji_Monster]":"[怪兽]","[TUIEmoji_Daemon]":"[恶魔]","[TUIEmoji_Rage]":"[恶魔怒]","[TUIEmoji_Fool]":"[衰]","[TUIEmoji_Pig]":"[猪]","[TUIEmoji_Cow]":"[牛]","[TUIEmoji_Ai]":"[AI]","[TUIEmoji_Skull]":"[骷髅]","[TUIEmoji_Bombs]":"[炸弹]","[TUIEmoji_Coffee]":"[咖啡]","[TUIEmoji_Cake]":"[蛋糕]","[TUIEmoji_Beer]":"[啤酒]","[TUIEmoji_Flower]":"[花]","[TUIEmoji_Watermelon]":"[瓜]","[TUIEmoji_Rich]":"[壕]","[TUIEmoji_Heart]":"[爱心]","[TUIEmoji_Moon]":"[月亮]","[TUIEmoji_Sun]":"[太阳]","[TUIEmoji_Star]":"[星星]","[TUIEmoji_RedPacket]":"[红包]","[TUIEmoji_Celebrate]":"[庆祝]","[TUIEmoji_Bless]":"[福]","[TUIEmoji_Fortune]":"[发]","[TUIEmoji_Convinced]":"[服]","[TUIEmoji_Prohibit]":"[禁]","[TUIEmoji_666]":"[666]","[TUIEmoji_857]":"[857]","[TUIEmoji_Knife]":"[刀]","[TUIEmoji_Like]":"[赞]"};export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import r from"./
|
|
1
|
+
import o from"./TUIChat.js";import r from"./emoji.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import i from"./TUIProfile.js";var I={TUIChat:o,Emoji:r,TUIConversation:t,TUIContact:m,TUIProfile:i};export{I as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var i={"[TUIEmoji_Smile]":"[微笑]","[TUIEmoji_Expect]":"[期待]","[TUIEmoji_Blink]":"[眨眼]","[TUIEmoji_Guffaw]":"[大笑]","[TUIEmoji_KindSmile]":"[姨母笑]","[TUIEmoji_Haha]":"[哈哈哈]","[TUIEmoji_Cheerful]":"[愉快]","[TUIEmoji_Speechless]":"[無語]","[TUIEmoji_Amazed]":"[驚訝]","[TUIEmoji_Sorrow]":"[悲傷]","[TUIEmoji_Complacent]":"[得意]","[TUIEmoji_Silly]":"[傻了]","[TUIEmoji_Lustful]":"[色]","[TUIEmoji_Giggle]":"[憨笑]","[TUIEmoji_Kiss]":"[親親]","[TUIEmoji_Wail]":"[大哭]","[TUIEmoji_TearsLaugh]":"[哭笑]","[TUIEmoji_Trapped]":"[困]","[TUIEmoji_Mask]":"[口罩]","[TUIEmoji_Fear]":"[恐懼]","[TUIEmoji_BareTeeth]":"[齜牙]","[TUIEmoji_FlareUp]":"[發怒]","[TUIEmoji_Yawn]":"[打哈欠]","[TUIEmoji_Tact]":"[機智]","[TUIEmoji_Stareyes]":"[星星眼]","[TUIEmoji_ShutUp]":"[閉嘴]","[TUIEmoji_Sigh]":"[嘆氣]","[TUIEmoji_Hehe]":"[呵呵]","[TUIEmoji_Silent]":"[收聲]","[TUIEmoji_Surprised]":"[驚喜]","[TUIEmoji_Askance]":"[白眼]","[TUIEmoji_Ok]":"[OK]","[TUIEmoji_Shit]":"[便便]","[TUIEmoji_Monster]":"[怪獸]","[TUIEmoji_Daemon]":"[惡魔]","[TUIEmoji_Rage]":"[惡魔怒]","[TUIEmoji_Fool]":"[衰]","[TUIEmoji_Pig]":"[豬]","[TUIEmoji_Cow]":"[牛]","[TUIEmoji_Ai]":"[AI]","[TUIEmoji_Skull]":"[骷髏]","[TUIEmoji_Bombs]":"[炸彈]","[TUIEmoji_Coffee]":"[咖啡]","[TUIEmoji_Cake]":"[蛋糕]","[TUIEmoji_Flower]":"[花]","[TUIEmoji_Watermelon]":"[瓜]","[TUIEmoji_Rich]":"[壕]","[TUIEmoji_Heart]":"[愛心]","[TUIEmoji_Moon]":"[月亮]","[TUIEmoji_Sun]":"[太陽]","[TUIEmoji_Star]":"[星星]","[TUIEmoji_RedPacket]":"[紅包]","[TUIEmoji_Celebrate]":"[慶祝]","[TUIEmoji_Bless]":"[福]","[TUIEmoji_Fortune]":"[發]","[TUIEmoji_Convinced]":"[服]","[TUIEmoji_Prohibit]":"[禁]","[TUIEmoji_666]":"[666]","[TUIEmoji_857]":"[857]","[TUIEmoji_Knife]":"[刀]","[TUIEmoji_Like]":"[讚]"};export{i as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./TUIChat.js";import r from"./
|
|
1
|
+
import o from"./TUIChat.js";import r from"./emoji.js";import t from"./TUIConversation.js";import m from"./TUIContact.js";import i from"./TUIProfile.js";var I={TUIChat:o,Emoji:r,TUIConversation:t,TUIContact:m,TUIProfile:i};export{I as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";const e=t=>t;function r(r,n=e){const o=t.useSyncExternalStore(r.subscribe,(()=>n(r.getState())),(()=>n(r.getInitialState())));return t.useDebugValue(o),o}export{r as useStore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=t=>{let e;const n=new Set,c=(t,c)=>{const o="function"==typeof t?t(e):t;if(!Object.is(o,e)){const t=e;e=(null!=c?c:"object"!=typeof o||null===o)?o:Object.assign({},e,o),n.forEach((n=>n(e,t)))}},o=()=>e,s={setState:c,getState:o,getInitialState:()=>a,subscribe:t=>(n.add(t),()=>n.delete(t))},a=e=t(c,o,s);return s},e=e=>e?t(e):t;export{e as createStore};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createStore as t}from"../node_modules/zustand/esm/vanilla.mjs.js";import{TUILogin as n}from"@tencentcloud/tui-core";import{TUIStore as e,StoreName as o}from"@tencentcloud/chat-uikit-engine";import{useStore as r}from"../node_modules/zustand/esm/react.mjs.js";var i=t()((function(t){return{chat:null,myProfile:void 0,contactData:void 0,conversation:void 0,TUIProfileShow:!1,TUIManageShow:!1,setMyProfile:function(n){return t((function(){return{myProfile:n}}))},setActiveContact:function(n){return t((function(){return{contactData:n}}))},setActiveConversation:function(n){return t((function(){return{conversation:n}}))},setTUIProfileShow:function(n){return t((function(){return{TUIProfileShow:n}}))},setTUIManageShow:function(n){return t((function(){return{TUIManageShow:n}}))}}}));function a(){return{chat:n.getContext().chat,myProfile:r(i,(function(t){return t.myProfile})),contactData:r(i,(function(t){return t.contactData})),conversation:r(i,(function(t){return t.conversation})),TUIProfileShow:r(i,(function(t){return t.TUIProfileShow})),TUIManageShow:r(i,(function(t){return t.TUIManageShow})),setActiveContact:r(i,(function(t){return t.setActiveContact})),setActiveConversation:r(i,(function(t){return t.setActiveConversation})),setTUIProfileShow:r(i,(function(t){return t.setTUIProfileShow})),setTUIManageShow:r(i,(function(t){return t.setTUIManageShow}))}}e.watch(o.USER,{userProfile:function(t){i.getState().setMyProfile(t)}}),e.watch(o.CONV,{currentConversation:function(t){var n;(null==t?void 0:t.conversationID)!==(null===(n=i.getState().conversation)||void 0===n?void 0:n.conversationID)&&i.getState().setTUIManageShow(!1);i.getState().setActiveConversation(t)}});export{i as default,a as useUIManagerStore};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/chat-uikit-react",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "rimraf dist && rollup -c",
|
|
19
19
|
"start": "rimraf dist && rollup -c -w",
|
|
20
|
-
"clean": "rimraf -g
|
|
20
|
+
"clean": "rimraf -g **/dist **/node_modules **/package-lock.json",
|
|
21
21
|
"prepare": "husky install"
|
|
22
22
|
},
|
|
23
23
|
"homepage": "https://www.tencentcloud.com/document/product/1047/45912",
|
|
@@ -70,12 +70,14 @@
|
|
|
70
70
|
"@tencentcloud/chat": "latest",
|
|
71
71
|
"@tencentcloud/chat-uikit-engine": "latest",
|
|
72
72
|
"@tencentcloud/tui-core": "latest",
|
|
73
|
+
"@tencentcloud/uikit-base-component-react": "^0.0.1",
|
|
73
74
|
"@tencentcloud/universal-api": "latest",
|
|
74
75
|
"classnames": "^2.5.1",
|
|
75
76
|
"date-fns": "^2.29.3",
|
|
76
77
|
"react-date-picker": "^9.0.0",
|
|
77
78
|
"react-dom": "^18.2.0",
|
|
78
|
-
"rollup-plugin-copy": "^3.5.0"
|
|
79
|
+
"rollup-plugin-copy": "^3.5.0",
|
|
80
|
+
"zustand": "^5.0.0"
|
|
79
81
|
},
|
|
80
82
|
"peerDependencies": {
|
|
81
83
|
"date-fns": "^2.29.3",
|
|
@@ -10,7 +10,7 @@ import TUIChatEngine, {
|
|
|
10
10
|
StoreName,
|
|
11
11
|
} from '@tencentcloud/chat-uikit-engine';
|
|
12
12
|
import { JSONStringToParse } from '../utils';
|
|
13
|
-
import {
|
|
13
|
+
import { useUIManagerStore } from '../../store';
|
|
14
14
|
import { TUIChatStateContextProvider } from '../../context/ChatStateContext';
|
|
15
15
|
import { TUIChatActionProvider } from '../../context/ChatActionContext';
|
|
16
16
|
import { ComponentProvider, UnknowPorps } from '../../context/ComponentContext';
|
|
@@ -80,8 +80,8 @@ function UnMemoizedChat<T extends TUIChatProps>(
|
|
|
80
80
|
EmptyPlaceholder = <EmptyStateIndicator listType="chat" />,
|
|
81
81
|
} = props;
|
|
82
82
|
|
|
83
|
-
const { chat } =
|
|
84
|
-
const { conversation: contextConversation } =
|
|
83
|
+
const { chat } = useUIManagerStore();
|
|
84
|
+
const { conversation: contextConversation } = useUIManagerStore('TUIChat');
|
|
85
85
|
|
|
86
86
|
const conversation = propsConversation || contextConversation;
|
|
87
87
|
|
|
@@ -7,7 +7,8 @@ import { handleDisplayAvatar } from '../utils';
|
|
|
7
7
|
import { isH5 } from '../../utils/env';
|
|
8
8
|
import './styles/index.scss';
|
|
9
9
|
import { Icon, IconTypes } from '../Icon';
|
|
10
|
-
import {
|
|
10
|
+
import { useTUIChatActionContext } from '../../context';
|
|
11
|
+
import { useUIManagerStore } from '../../store';
|
|
11
12
|
import { startCall } from '../Chat/utils';
|
|
12
13
|
|
|
13
14
|
export interface TUIChatHeaderDefaultProps {
|
|
@@ -37,7 +38,7 @@ function TUIChatHeaderDefaultWithContext<T extends TUIChatHeaderBasicProps>(
|
|
|
37
38
|
enableCall: propCallEnabled = false,
|
|
38
39
|
} = props;
|
|
39
40
|
const { callButtonClicked } = useTUIChatActionContext('TUIChat');
|
|
40
|
-
const { setActiveContact } =
|
|
41
|
+
const { setActiveContact } = useUIManagerStore('TUIContact');
|
|
41
42
|
const [title, setTitle] = useState(propTitle);
|
|
42
43
|
const [avatar, setAvatar] = useState<React.ReactElement | string>('');
|
|
43
44
|
const [isShowCallIcon, setIsShowCallIcon] = useState<boolean>(false);
|
|
@@ -91,7 +92,7 @@ function TUIChatHeaderDefaultWithContext<T extends TUIChatHeaderBasicProps>(
|
|
|
91
92
|
TUIConversationService.switchConversation('');
|
|
92
93
|
setActiveContact();
|
|
93
94
|
};
|
|
94
|
-
const { setTUIManageShow } =
|
|
95
|
+
const { setTUIManageShow } = useUIManagerStore();
|
|
95
96
|
const openTUIManage = () => {
|
|
96
97
|
setTUIManageShow && setTUIManageShow(true);
|
|
97
98
|
};
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
|
-
import { Conversation } from '@tencentcloud/chat';
|
|
4
2
|
import { TUIStore } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import '
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
6
4
|
import { Icon, IconTypes } from '../Icon';
|
|
7
5
|
import { Avatar, defaultGroupAvatarWork, defaultUserAvatar } from '../Avatar';
|
|
8
6
|
import { Switch } from '../Switch';
|
|
9
|
-
import {
|
|
7
|
+
import { useUIManagerStore } from '../../store';
|
|
10
8
|
import { isH5, isPC } from '../../utils/env';
|
|
11
9
|
import { getMessageProfile } from '../ConversationPreview/utils';
|
|
10
|
+
import type { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
11
|
+
|
|
12
|
+
import './styles/index.scss';
|
|
12
13
|
|
|
13
14
|
function UnMemoizedChatSetting<T>(
|
|
14
15
|
): React.ReactElement {
|
|
15
|
-
const { t } =
|
|
16
|
-
const [conversation, setConversation] = useState<
|
|
16
|
+
const { t } = useUIKit();
|
|
17
|
+
const [conversation, setConversation] = useState<IConversationModel>();
|
|
17
18
|
const [profile, setProfile] = useState<any>();
|
|
18
19
|
const [isPinned, setIsPinned] = useState<boolean>(false);
|
|
19
20
|
const [forceUpdateCount, setForceUpdateCount] = useState(0);
|
|
@@ -22,7 +23,7 @@ function UnMemoizedChatSetting<T>(
|
|
|
22
23
|
setActiveConversation,
|
|
23
24
|
TUIManageShow,
|
|
24
25
|
setTUIManageShow,
|
|
25
|
-
} =
|
|
26
|
+
} = useUIManagerStore('TUIManage');
|
|
26
27
|
|
|
27
28
|
const pinChatChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
28
29
|
setIsPinned(e.target.checked);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "
|
|
1
|
+
@use "~@tencentcloud/uikit-base-component-react/dist/styles/theme/util" as *;
|
|
2
2
|
|
|
3
3
|
.tui-manage {
|
|
4
4
|
display: flex;
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
font-size: 16px;
|
|
52
52
|
margin-bottom: 30px;
|
|
53
53
|
text-align: center;
|
|
54
|
+
|
|
54
55
|
@include theme() {
|
|
55
56
|
color: get(text-color-secondary);
|
|
56
57
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useMemo, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import {
|
|
4
4
|
TUIContactContextProvider,
|
|
5
5
|
TUIContactContextValue,
|
|
6
6
|
} from '../../context/ContactContext';
|
|
7
7
|
import { isH5 } from '../../utils/env';
|
|
8
|
-
import {
|
|
8
|
+
import { useUIManagerStore } from '../../store';
|
|
9
9
|
import useTUIContact from './hooks/useTUIContact';
|
|
10
10
|
import { ContactList } from './ContactList/ContactList';
|
|
11
11
|
import { ContactSearch } from '../ContactSearch/ContactSearch';
|
|
@@ -16,8 +16,8 @@ export function UnMemoizedContact<T>(
|
|
|
16
16
|
props: PropsWithChildren<T>,
|
|
17
17
|
): React.ReactElement {
|
|
18
18
|
const { children } = props;
|
|
19
|
-
const { t } =
|
|
20
|
-
const { setActiveContact } =
|
|
19
|
+
const { t } = useUIKit();
|
|
20
|
+
const { setActiveContact } = useUIManagerStore('TUIContact');
|
|
21
21
|
const [isShowAddFriend, setShowAddFriend] = useState(false);
|
|
22
22
|
const addFriend = () => {
|
|
23
23
|
setActiveContact();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, {
|
|
2
2
|
PropsWithChildren,
|
|
3
3
|
} from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { useUIManagerStore } from '../../../store';
|
|
5
5
|
import { isH5 } from '../../../utils/env';
|
|
6
6
|
import { FriendInfo } from './friendInfo';
|
|
7
7
|
import { BlockInfo } from './blockInfo';
|
|
@@ -18,7 +18,7 @@ export function UnMemoizedContactInfo<T extends TUIContactInfoProps>(
|
|
|
18
18
|
props: PropsWithChildren<T>,
|
|
19
19
|
): React.ReactElement {
|
|
20
20
|
const { showChats } = props;
|
|
21
|
-
const { contactData } =
|
|
21
|
+
const { contactData } = useUIManagerStore('TUIContact');
|
|
22
22
|
if (!contactData?.type) {
|
|
23
23
|
return (<> </>);
|
|
24
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
2
|
import { Profile } from '@tencentcloud/chat';
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
4
4
|
import useContactInfo from './hooks/useContactInfo';
|
|
5
5
|
import { BasicInfo } from './basicInfo';
|
|
6
6
|
import { DivWithEdit } from '../../DivWithEdit';
|
|
@@ -13,7 +13,7 @@ export function UnMemoizedAddFriendInfo<T extends Props>(
|
|
|
13
13
|
): React.ReactElement {
|
|
14
14
|
const { profile } = props;
|
|
15
15
|
const { userID } = profile;
|
|
16
|
-
const { t } =
|
|
16
|
+
const { t } = useUIKit();
|
|
17
17
|
const [isEditName, setIsEditRemark] = useState('');
|
|
18
18
|
const [remark, setRemark] = useState('');
|
|
19
19
|
const [wording, setWording] = useState('');
|
|
@@ -36,7 +36,7 @@ export function UnMemoizedAddFriendInfo<T extends Props>(
|
|
|
36
36
|
setIsSendAddFriend(true);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
const editText = (data?:any) => {
|
|
39
|
+
const editText = (data?: any) => {
|
|
40
40
|
setRemark(data?.value);
|
|
41
41
|
setIsEditRemark('');
|
|
42
42
|
};
|
|
@@ -47,39 +47,41 @@ export function UnMemoizedAddFriendInfo<T extends Props>(
|
|
|
47
47
|
return (
|
|
48
48
|
<>
|
|
49
49
|
<BasicInfo profile={profile} />
|
|
50
|
-
{!isSendedAdd
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
50
|
+
{!isSendedAdd
|
|
51
|
+
? (
|
|
52
|
+
<div className="tui-contact-info-content">
|
|
53
|
+
<div className="content-item-wording">
|
|
54
|
+
<p className="content-item-label">{t('TUIContact.Enter the verification info')}</p>
|
|
55
|
+
<textarea className="content-item-wording-text" value={wording} onChange={(e: any) => { handleChange(e); }} />
|
|
56
|
+
</div>
|
|
57
|
+
<div className="content-item">
|
|
58
|
+
<p className="content-item-label">{t('TUIContact.remark')}</p>
|
|
59
|
+
<DivWithEdit
|
|
60
|
+
name="remark"
|
|
61
|
+
className="content-item-text"
|
|
62
|
+
value={remark}
|
|
63
|
+
type="text"
|
|
64
|
+
toggle={handleSetEditRemark}
|
|
65
|
+
isEdit={isEditName === 'remark'}
|
|
66
|
+
confirm={editText}
|
|
67
|
+
close={() => {
|
|
68
|
+
setIsEditRemark('');
|
|
69
|
+
}}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
<div className="content-btn-container">
|
|
73
|
+
<div className="content-item-btn confirm-btn" role="button" tabIndex={0} onClick={addFriendHandler}>{t('TUIContact.Send application')}</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
)
|
|
77
|
+
: (
|
|
78
|
+
<div className="tui-contact-info-content">
|
|
79
|
+
<div className="content-item">
|
|
80
|
+
<p className="content-item-label">{t('TUIContact.verification info')}</p>
|
|
81
|
+
<p className="content-item-text">{wording}</p>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
)}
|
|
83
85
|
</>
|
|
84
86
|
);
|
|
85
87
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
2
|
import { Profile } from '@tencentcloud/chat';
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
4
4
|
import { TUIConversationService } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import {
|
|
5
|
+
import { useUIManagerStore } from '../../../store';
|
|
6
6
|
import { Icon, IconTypes } from '../../Icon';
|
|
7
7
|
import { isH5 } from '../../../utils/env';
|
|
8
8
|
|
|
@@ -15,11 +15,11 @@ export function UnMemoizedBasicInfo<T extends Props>(
|
|
|
15
15
|
props: T,
|
|
16
16
|
): React.ReactElement {
|
|
17
17
|
const { profile } = props;
|
|
18
|
-
const { t } =
|
|
18
|
+
const { t } = useUIKit();
|
|
19
19
|
const {
|
|
20
20
|
userID, nick, selfSignature, avatar,
|
|
21
21
|
} = profile;
|
|
22
|
-
const { setActiveContact } =
|
|
22
|
+
const { setActiveContact } = useUIManagerStore('TUIContact');
|
|
23
23
|
const back = () => {
|
|
24
24
|
TUIConversationService.switchConversation('');
|
|
25
25
|
setActiveContact();
|
|
@@ -27,12 +27,12 @@ export function UnMemoizedBasicInfo<T extends Props>(
|
|
|
27
27
|
return (
|
|
28
28
|
<div className="tui-contact-info-header">
|
|
29
29
|
{isH5 && (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
<Icon
|
|
31
|
+
width={9}
|
|
32
|
+
height={16}
|
|
33
|
+
type={IconTypes.BACK}
|
|
34
|
+
onClick={back}
|
|
35
|
+
/>
|
|
36
36
|
)}
|
|
37
37
|
<div className="header-container">
|
|
38
38
|
<div className="header-container-avatar">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
2
|
import { Profile } from '@tencentcloud/chat';
|
|
4
|
-
import {
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
5
4
|
import { BasicInfo } from './basicInfo';
|
|
6
5
|
import { Switch } from '../../Switch';
|
|
6
|
+
import { useUIManagerStore } from '../../../store';
|
|
7
7
|
import useContactInfo from './hooks/useContactInfo';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
@@ -13,8 +13,8 @@ export function UnMemoizedBlockInfo<T extends Props>(
|
|
|
13
13
|
props: T,
|
|
14
14
|
): React.ReactElement {
|
|
15
15
|
const { profile } = props;
|
|
16
|
-
const { contactData, setActiveContact } =
|
|
17
|
-
const { t } =
|
|
16
|
+
const { contactData, setActiveContact } = useUIManagerStore('TUIContact');
|
|
17
|
+
const { t } = useUIKit();
|
|
18
18
|
const [isAddToBlocklist, setIsAddToBlocklist] = useState(false);
|
|
19
19
|
|
|
20
20
|
const {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useTranslation } from 'react-i18next';
|
|
3
2
|
import TencentCloudChat, { FriendApplication } from '@tencentcloud/chat';
|
|
4
|
-
import {
|
|
3
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
4
|
+
import { useUIManagerStore } from '../../../store';
|
|
5
5
|
import { Avatar, defaultUserAvatar } from '../../Avatar';
|
|
6
6
|
import useContactInfo from './hooks/useContactInfo';
|
|
7
7
|
|
|
@@ -11,8 +11,8 @@ interface Props {
|
|
|
11
11
|
export function UnMemoizedFriendApplication<T extends Props>(
|
|
12
12
|
props: T,
|
|
13
13
|
): React.ReactElement {
|
|
14
|
-
const { setActiveContact } =
|
|
15
|
-
const { t } =
|
|
14
|
+
const { setActiveContact } = useUIManagerStore('TUIContact');
|
|
15
|
+
const { t } = useUIKit();
|
|
16
16
|
const { application } = props;
|
|
17
17
|
const {
|
|
18
18
|
userID,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useUIKit } from '@tencentcloud/uikit-base-component-react';
|
|
3
3
|
import { Friend } from '@tencentcloud/chat';
|
|
4
4
|
import { TUIConversationService, IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
5
|
-
import {
|
|
5
|
+
import { useUIManagerStore } from '../../../store';
|
|
6
6
|
import { BasicInfo } from './basicInfo';
|
|
7
7
|
import { Switch } from '../../Switch';
|
|
8
8
|
import useContactInfo from './hooks/useContactInfo';
|
|
@@ -11,16 +11,16 @@ import '../index.scss';
|
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
friend: Friend;
|
|
14
|
-
showChats?: () => void
|
|
14
|
+
showChats?: () => void;
|
|
15
15
|
}
|
|
16
16
|
export function UnMemoizedFriendInfo<T extends Props>(
|
|
17
17
|
props: T,
|
|
18
18
|
): React.ReactElement {
|
|
19
|
-
const { chat } =
|
|
19
|
+
const { chat } = useUIManagerStore();
|
|
20
20
|
const {
|
|
21
21
|
contactData, setActiveContact, setActiveConversation,
|
|
22
|
-
} =
|
|
23
|
-
const { t } =
|
|
22
|
+
} = useUIManagerStore('TUIContact');
|
|
23
|
+
const { t } = useUIKit();
|
|
24
24
|
const { friend, showChats } = props;
|
|
25
25
|
const { userID, profile, remark } = friend;
|
|
26
26
|
const [isEditName, setIsEditRemark] = useState('');
|
|
@@ -64,7 +64,7 @@ export function UnMemoizedFriendInfo<T extends Props>(
|
|
|
64
64
|
TUIConversationService.switchConversation(conversationID).then(
|
|
65
65
|
(conversationModel: IConversationModel) => {
|
|
66
66
|
setActiveConversation(conversationModel.getConversation());
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
68
|
);
|
|
69
69
|
};
|
|
70
70
|
|