@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
|
@@ -2,14 +2,14 @@ import React, { PropsWithChildren, useEffect, useState } from 'react';
|
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import DatePicker from 'react-date-picker';
|
|
4
4
|
import TencentCloudChat, { Profile } from '@tencentcloud/chat';
|
|
5
|
-
import { UpdateMyProfileParams } from
|
|
5
|
+
import { UpdateMyProfileParams } from '@tencentcloud/chat-uikit-engine';
|
|
6
6
|
import { isH5 } from '../../utils/env';
|
|
7
7
|
import { useUIManager } from '../../context';
|
|
8
8
|
|
|
9
9
|
import { Avatar } from '../Avatar';
|
|
10
10
|
import { DivWithEdit } from '../DivWithEdit';
|
|
11
11
|
import { Icon, IconTypes } from '../Icon';
|
|
12
|
-
import { handleDisplayAvatar } from '../
|
|
12
|
+
import { handleDisplayAvatar } from '../utils';
|
|
13
13
|
|
|
14
14
|
const gender: any = {
|
|
15
15
|
[TencentCloudChat.TYPES.GENDER_UNKNOWN]: 'unknow',
|
|
@@ -58,9 +58,9 @@ const allowTypeList = [
|
|
|
58
58
|
];
|
|
59
59
|
|
|
60
60
|
export interface TUIProfileDefaultProps {
|
|
61
|
-
userInfo?: Profile
|
|
62
|
-
update?: (option: UpdateMyProfileParams) => void
|
|
63
|
-
className?: string
|
|
61
|
+
userInfo?: Profile;
|
|
62
|
+
update?: (option: UpdateMyProfileParams) => void;
|
|
63
|
+
className?: string;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function TUIProfileDefaultWithContext<T extends TUIProfileDefaultProps>(
|
|
@@ -117,13 +117,15 @@ function TUIProfileDefaultWithContext<T extends TUIProfileDefaultProps>(
|
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
name: 'Gender',
|
|
120
|
-
value: t(
|
|
120
|
+
value: t(userInfo?.gender && gender[userInfo?.gender]?.replace(
|
|
121
121
|
gender[userInfo?.gender][0],
|
|
122
122
|
gender[userInfo?.gender][0]?.toLocaleUpperCase(),
|
|
123
|
-
)
|
|
123
|
+
)
|
|
124
|
+
? `TUIProfile.${gender[userInfo?.gender]?.replace(
|
|
124
125
|
gender[userInfo?.gender][0],
|
|
125
126
|
gender[userInfo?.gender][0]?.toLocaleUpperCase(),
|
|
126
|
-
)}`
|
|
127
|
+
)}`
|
|
128
|
+
: ''),
|
|
127
129
|
type: 'select',
|
|
128
130
|
children: (
|
|
129
131
|
<ul className="select-list">
|
|
@@ -193,7 +195,7 @@ function TUIProfileDefaultWithContext<T extends TUIProfileDefaultProps>(
|
|
|
193
195
|
if (isH5) {
|
|
194
196
|
editListMap = editListMap.filter((item: any) => item.name !== 'Birthday');
|
|
195
197
|
}
|
|
196
|
-
const handleSetEditName = (name:string) => {
|
|
198
|
+
const handleSetEditName = (name: string) => {
|
|
197
199
|
setIsEditName(name);
|
|
198
200
|
};
|
|
199
201
|
|
|
@@ -312,8 +314,7 @@ function TUIProfileDefaultWithContext<T extends TUIProfileDefaultProps>(
|
|
|
312
314
|
const MemoizedTUIProfileDefault = React.memo(TUIProfileDefaultWithContext) as
|
|
313
315
|
typeof TUIProfileDefaultWithContext;
|
|
314
316
|
|
|
315
|
-
export function TUIProfileDefault(props: TUIProfileDefaultProps)
|
|
316
|
-
: React.ReactElement {
|
|
317
|
+
export function TUIProfileDefault(props: TUIProfileDefaultProps): React.ReactElement {
|
|
317
318
|
const options = { ...props };
|
|
318
319
|
return <MemoizedTUIProfileDefault {...options} />;
|
|
319
320
|
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './Profile';
|
|
1
|
+
export * from './Profile';
|
|
2
|
+
export * from './ProfileDefault';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/index.scss';
|
|
3
|
+
import { Profile as TProfile } from '@tencentcloud/chat';
|
|
4
|
+
import { Avatar, defaultUserAvatar } from '../../Avatar';
|
|
5
|
+
import { Icon, IconTypes } from '../../Icon';
|
|
6
|
+
|
|
7
|
+
export interface ProfileProps {
|
|
8
|
+
profile?: TProfile;
|
|
9
|
+
className?: string;
|
|
10
|
+
handleAvatar?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export function MyProfile<T extends ProfileProps>(props: T) {
|
|
13
|
+
const { profile, className = '', handleAvatar } = props;
|
|
14
|
+
return (profile?.nick || profile?.userID) && (
|
|
15
|
+
<div className={`profile ${className}`}>
|
|
16
|
+
<div className="profile-content">
|
|
17
|
+
<Avatar size={32} image={profile.avatar || defaultUserAvatar} onClick={handleAvatar} />
|
|
18
|
+
<div className="profile-name">{profile.nick || profile.userID}</div>
|
|
19
|
+
</div>
|
|
20
|
+
<div className="profile-more">
|
|
21
|
+
<Icon type={IconTypes.ELLIPSE} width={18} height={5} onClick={handleAvatar} />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MyProfile';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@use "../../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
3
|
+
.profile {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding: 16px 20px;
|
|
9
|
+
|
|
10
|
+
@include theme() {
|
|
11
|
+
background-color: get(bg-color-operate);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.profile-content {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
|
|
18
|
+
.profile-name {
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
margin-left: 10px;
|
|
21
|
+
font-size: 14px;
|
|
22
|
+
text-overflow: ellipsis;
|
|
23
|
+
white-space: nowrap;
|
|
24
|
+
max-width: 200px;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
|
|
27
|
+
@include theme() {
|
|
28
|
+
color: get(text-color-primary);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
background: #F9FAFB;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
justify-content: space-between;
|
|
7
|
-
align-items: center;
|
|
8
|
-
padding: 16px 20px;
|
|
9
|
-
.profile-content {
|
|
10
|
-
display: flex;
|
|
11
|
-
align-items: center;
|
|
12
|
-
.profile-name {
|
|
13
|
-
font-family: PingFangSC-Medium;
|
|
14
|
-
font-weight: 600;
|
|
15
|
-
margin-left: 10px;
|
|
16
|
-
font-size: 14px;
|
|
17
|
-
text-overflow: ellipsis;
|
|
18
|
-
white-space: nowrap;
|
|
19
|
-
max-width: 200px;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
@import "./layout.scss";
|
|
2
|
+
@import "./color.scss";
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
@use "../../../styles/colors/color-theme" as *;
|
|
2
|
+
|
|
1
3
|
.tui-profile {
|
|
2
4
|
display: flex;
|
|
3
5
|
flex-direction: column;
|
|
4
6
|
align-items: center;
|
|
7
|
+
height: 100%;
|
|
8
|
+
|
|
9
|
+
@include theme() {
|
|
10
|
+
color: get(text-color-primary);
|
|
11
|
+
}
|
|
5
12
|
|
|
6
13
|
&-header {
|
|
7
14
|
box-sizing: border-box;
|
|
@@ -38,7 +45,6 @@
|
|
|
38
45
|
&-nick {
|
|
39
46
|
font-weight: 700;
|
|
40
47
|
font-size: 24px;
|
|
41
|
-
font-family: PingFangSC-Medium;
|
|
42
48
|
line-height: 29px;
|
|
43
49
|
text-align: center;
|
|
44
50
|
|
|
@@ -48,15 +54,14 @@
|
|
|
48
54
|
}
|
|
49
55
|
|
|
50
56
|
&-ID {
|
|
51
|
-
|
|
52
|
-
margin: 0;
|
|
57
|
+
margin: 6px 0;
|
|
53
58
|
display: flex;
|
|
54
59
|
align-items: center;
|
|
55
|
-
font-weight: 400;
|
|
56
60
|
font-size: 12px;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
|
|
62
|
+
@include theme() {
|
|
63
|
+
color: get(text-color-secondary);
|
|
64
|
+
}
|
|
60
65
|
|
|
61
66
|
h5 {
|
|
62
67
|
margin: 0;
|
|
@@ -76,20 +81,18 @@
|
|
|
76
81
|
cursor: pointer;
|
|
77
82
|
|
|
78
83
|
h4 {
|
|
79
|
-
padding-bottom: 3px;
|
|
80
|
-
font-weight: 400;
|
|
81
84
|
font-size: 16px;
|
|
82
|
-
font-family: PingFangSC-Medium;
|
|
83
|
-
line-height: 22px;
|
|
84
85
|
margin: 10px 0;
|
|
85
|
-
color: rgba(0, 0, 0, 60%);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
&-div-with-edit {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
height: auto !important;
|
|
92
|
+
|
|
93
|
+
@include theme() {
|
|
94
|
+
border-bottom: 1px solid get(stroke-color-primary);
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
&-edit {
|
package/src/components/index.ts
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
1
|
+
export * from './Chat';
|
|
2
|
+
export * from './ConversationList';
|
|
3
|
+
export * from './ConversationActions';
|
|
4
4
|
export * from './ConversationPreview';
|
|
5
|
-
export * from './TUIChatHeader';
|
|
6
|
-
export * from './TUIMessageList';
|
|
7
|
-
export * from './TUIMessage';
|
|
8
|
-
export * from './TUIMessageInput';
|
|
9
|
-
export * from './TUIProfile';
|
|
10
|
-
export * from './Avatar';
|
|
11
5
|
export * from './ConversationSearch';
|
|
12
|
-
export * from './
|
|
6
|
+
export * from './ConversationCreate';
|
|
7
|
+
export * from './ChatHeader';
|
|
8
|
+
export * from './MessageList';
|
|
9
|
+
export * from './MessageElement';
|
|
10
|
+
export * from './MessageInput';
|
|
11
|
+
export * from './Profile';
|
|
12
|
+
export * from './Avatar';
|
|
13
|
+
export * from './ChatSetting';
|
|
13
14
|
export * from './Popup';
|
|
14
15
|
export * from './Checkbox';
|
|
15
16
|
export * from './DivWithEdit';
|
|
16
17
|
export * from './Icon';
|
|
18
|
+
export * from './PlaceHolder';
|
|
17
19
|
export * from './EmptyStateIndicator';
|
|
18
20
|
export * from './Input';
|
|
19
21
|
export * from './Model';
|
|
@@ -21,4 +23,4 @@ export * from './Plugins';
|
|
|
21
23
|
export * from './Switch';
|
|
22
24
|
export * from './Toast';
|
|
23
25
|
export * from './Popup';
|
|
24
|
-
export * from './
|
|
26
|
+
export * from './Contact';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
isToday,
|
|
7
7
|
isYesterday,
|
|
8
8
|
} from 'date-fns';
|
|
9
|
-
import { enGB, zhCN, ja, ko } from 'date-fns/locale';
|
|
9
|
+
import { enGB, zhCN, ja, ko, zhTW } from 'date-fns/locale';
|
|
10
10
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
11
11
|
import { TUIStore, StoreName } from '@tencentcloud/chat-uikit-engine';
|
|
12
12
|
import { defaultGroupAvatarWork, defaultUserAvatar } from './Avatar';
|
|
@@ -34,7 +34,7 @@ export function JSONStringToParse(str: string) {
|
|
|
34
34
|
return JSON.parse(str);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export const handleDisplayAvatar = (avatar: string, type:string = TencentCloudChat.TYPES.CONV_C2C) => {
|
|
37
|
+
export const handleDisplayAvatar = (avatar: string, type: string = TencentCloudChat.TYPES.CONV_C2C) => {
|
|
38
38
|
let displayImage = avatar;
|
|
39
39
|
if (!avatar) {
|
|
40
40
|
switch (type) {
|
|
@@ -51,13 +51,14 @@ export const handleDisplayAvatar = (avatar: string, type:string = TencentCloudCh
|
|
|
51
51
|
return displayImage;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
export const getTimeStamp = (time: number, language
|
|
54
|
+
export const getTimeStamp = (time: number, language = 'en-US') => {
|
|
55
55
|
const locales: any = {
|
|
56
56
|
'zh-CN': zhCN,
|
|
57
|
+
'zh-TW': zhTW,
|
|
57
58
|
'en-US': enGB,
|
|
58
59
|
'ja-JP': ja,
|
|
59
60
|
'ko-KR': ko,
|
|
60
|
-
|
|
61
|
+
};
|
|
61
62
|
if (!time) {
|
|
62
63
|
return '';
|
|
63
64
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
import { Message } from '@tencentcloud/chat';
|
|
3
3
|
import { IMessageModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
|
-
import { OperateMessageParams } from '../components/
|
|
4
|
+
import { OperateMessageParams } from '../components/Chat/hooks/useHandleMessage';
|
|
5
5
|
|
|
6
6
|
export interface TUIChatActionContextValue {
|
|
7
|
-
updateMessage?: (messages:
|
|
8
|
-
setFirstSendMessage?: (message: IMessageModel) => void
|
|
9
|
-
editLocalMessage?: (message: Message) => void
|
|
10
|
-
operateMessage?: (data?: OperateMessageParams) => void
|
|
11
|
-
loadMore?: () => Promise<void
|
|
12
|
-
revokeMessage?: (message:Message) => Promise<Message
|
|
13
|
-
setAudioSource?: (source: HTMLAudioElement | null) => void
|
|
14
|
-
setVideoSource?: (source: HTMLVideoElement | null) => void
|
|
15
|
-
setHighlightedMessageId?: (highlightedMessageId: string) => void
|
|
16
|
-
updateUploadPendingMessageList?: (message?:Message) => void
|
|
17
|
-
setActiveMessageID?: (messageID: string) => void
|
|
7
|
+
updateMessage?: (messages: Message[]) => void;
|
|
8
|
+
setFirstSendMessage?: (message: IMessageModel) => void;
|
|
9
|
+
editLocalMessage?: (message: Message) => void;
|
|
10
|
+
operateMessage?: (data?: OperateMessageParams) => void;
|
|
11
|
+
loadMore?: () => Promise<void>;
|
|
12
|
+
revokeMessage?: (message: Message) => Promise<Message>;
|
|
13
|
+
setAudioSource?: (source: HTMLAudioElement | null) => void;
|
|
14
|
+
setVideoSource?: (source: HTMLVideoElement | null) => void;
|
|
15
|
+
setHighlightedMessageId?: (highlightedMessageId: string) => void;
|
|
16
|
+
updateUploadPendingMessageList?: (message?: Message) => void;
|
|
17
|
+
setActiveMessageID?: (messageID: string) => void;
|
|
18
|
+
callButtonClicked?: (callMediaType?: number, callType?: any) => void;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
export const TUIChatActionContext = React.createContext<
|
|
@@ -26,8 +27,8 @@ export function TUIChatActionProvider({
|
|
|
26
27
|
children,
|
|
27
28
|
value,
|
|
28
29
|
}: PropsWithChildren<{
|
|
29
|
-
value: TUIChatActionContextValue
|
|
30
|
-
}>):React.ReactElement {
|
|
30
|
+
value: TUIChatActionContextValue;
|
|
31
|
+
}>): React.ReactElement {
|
|
31
32
|
return (
|
|
32
33
|
<TUIChatActionContext.Provider
|
|
33
34
|
value={(value as unknown) as TUIChatActionContextValue}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
PropsWithChildren, useContext, MutableRefObject, RefObject,
|
|
3
|
+
} from 'react';
|
|
4
|
+
import { Conversation, Message } from '@tencentcloud/chat';
|
|
5
|
+
import { MessageListProps, TUIMessageInputBasicProps, TUIMessageProps } from '../components';
|
|
6
|
+
import { OperateMessageParams } from '../components/Chat/hooks/useHandleMessage';
|
|
7
|
+
|
|
8
|
+
export interface TUIChatStateContextValue {
|
|
9
|
+
conversation?: Conversation;
|
|
10
|
+
messageList?: Message[];
|
|
11
|
+
nextReqMessageID?: string;
|
|
12
|
+
isCompleted?: boolean;
|
|
13
|
+
init?: boolean;
|
|
14
|
+
highlightedMessageId?: string;
|
|
15
|
+
lastMessageID?: string;
|
|
16
|
+
isSameLastMessageID?: boolean;
|
|
17
|
+
messageListRef?: RefObject<HTMLDivElement>;
|
|
18
|
+
textareaRef?: MutableRefObject<HTMLTextAreaElement | undefined>;
|
|
19
|
+
operateData?: OperateMessageParams;
|
|
20
|
+
noMore?: boolean;
|
|
21
|
+
messageConfig?: TUIMessageProps;
|
|
22
|
+
cloudCustomData?: string;
|
|
23
|
+
TUIMessageInputConfig?: TUIMessageInputBasicProps;
|
|
24
|
+
audioSource?: HTMLAudioElement | null;
|
|
25
|
+
vidoeSource?: HTMLVideoElement | null;
|
|
26
|
+
TUIMessageListConfig?: MessageListProps;
|
|
27
|
+
uploadPendingMessageList?: Message[];
|
|
28
|
+
firstSendMessage?: Message | null;
|
|
29
|
+
activeMessageID?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const TUIChatStateContext = React.createContext<TUIChatStateContextValue | null>(null);
|
|
33
|
+
export function TUIChatStateContextProvider({ children, value }: PropsWithChildren<{
|
|
34
|
+
value: TUIChatStateContextValue;
|
|
35
|
+
}>): React.ReactElement {
|
|
36
|
+
return (
|
|
37
|
+
<TUIChatStateContext.Provider value={value}>
|
|
38
|
+
{children}
|
|
39
|
+
</TUIChatStateContext.Provider>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function useTUIChatStateContext(componentName?: string): TUIChatStateContextValue {
|
|
44
|
+
const contextValue = useContext(TUIChatStateContext);
|
|
45
|
+
if (!contextValue && componentName) {
|
|
46
|
+
return {} as TUIChatStateContextValue;
|
|
47
|
+
}
|
|
48
|
+
return (contextValue as unknown) as TUIChatStateContextValue;
|
|
49
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import React, { PropsWithChildren, useContext } from 'react';
|
|
2
2
|
import { TUIChatHeaderDefaultProps } from '../components';
|
|
3
|
-
import type{ EmptyStateIndicatorProps } from '../components/EmptyStateIndicator';
|
|
4
|
-
import { MessageContextProps, TUIMessageProps } from '../components/
|
|
3
|
+
import type { EmptyStateIndicatorProps } from '../components/EmptyStateIndicator';
|
|
4
|
+
import { MessageContextProps, TUIMessageProps } from '../components/MessageElement';
|
|
5
5
|
|
|
6
6
|
export interface UnknowPorps {
|
|
7
|
-
[propsName: string]: any
|
|
7
|
+
[propsName: string]: any;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export interface ComponentContextValue {
|
|
11
|
-
TUIMessage?: React.ComponentType<TUIMessageProps | UnknowPorps
|
|
12
|
-
TUIChatHeader?: React.ComponentType<TUIChatHeaderDefaultProps
|
|
13
|
-
EmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps
|
|
14
|
-
TUIMessageInput?: React.ComponentType<UnknowPorps
|
|
15
|
-
MessageContext?: React.ComponentType<MessageContextProps
|
|
16
|
-
InputPlugins?: React.ComponentType<UnknowPorps
|
|
17
|
-
MessagePlugins?: React.ComponentType<UnknowPorps
|
|
18
|
-
MessageCustomPlugins?: React.ComponentType<UnknowPorps
|
|
19
|
-
MessageTextPlugins?: React.ComponentType<UnknowPorps
|
|
20
|
-
InputQuote?: React.ComponentType<UnknowPorps
|
|
11
|
+
TUIMessage?: React.ComponentType<TUIMessageProps | UnknowPorps>;
|
|
12
|
+
TUIChatHeader?: React.ComponentType<TUIChatHeaderDefaultProps>;
|
|
13
|
+
EmptyStateIndicator?: React.ComponentType<EmptyStateIndicatorProps>;
|
|
14
|
+
TUIMessageInput?: React.ComponentType<UnknowPorps>;
|
|
15
|
+
MessageContext?: React.ComponentType<MessageContextProps>;
|
|
16
|
+
InputPlugins?: React.ComponentType<UnknowPorps>;
|
|
17
|
+
MessagePlugins?: React.ComponentType<UnknowPorps>;
|
|
18
|
+
MessageCustomPlugins?: React.ComponentType<UnknowPorps>;
|
|
19
|
+
MessageTextPlugins?: React.ComponentType<UnknowPorps>;
|
|
20
|
+
InputQuote?: React.ComponentType<UnknowPorps>;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export const ComponentContext = React.createContext<ComponentContextValue | undefined>(undefined);
|
|
@@ -4,17 +4,17 @@ import React, {
|
|
|
4
4
|
import { Friend, Profile, FriendApplication } from '@tencentcloud/chat';
|
|
5
5
|
|
|
6
6
|
export interface TUIContactContextValue {
|
|
7
|
-
friendList?:
|
|
8
|
-
blocklistProfile?:
|
|
9
|
-
friendApplicationList?:
|
|
10
|
-
blockList?:
|
|
11
|
-
isShowContactList?: boolean
|
|
12
|
-
setShowContactList?: React.Dispatch<React.SetStateAction<boolean
|
|
7
|
+
friendList?: Friend[];
|
|
8
|
+
blocklistProfile?: Profile[];
|
|
9
|
+
friendApplicationList?: FriendApplication[];
|
|
10
|
+
blockList?: string[];
|
|
11
|
+
isShowContactList?: boolean;
|
|
12
|
+
setShowContactList?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
13
|
}
|
|
14
14
|
export const TUIContactContext = React.createContext<TUIContactContextValue>({});
|
|
15
|
-
export function TUIContactContextProvider({ children, value }:PropsWithChildren<{
|
|
16
|
-
|
|
17
|
-
}>):React.ReactElement {
|
|
15
|
+
export function TUIContactContextProvider({ children, value }: PropsWithChildren<{
|
|
16
|
+
value: TUIContactContextValue;
|
|
17
|
+
}>): React.ReactElement {
|
|
18
18
|
return (
|
|
19
19
|
<TUIContactContext.Provider value={value}>
|
|
20
20
|
{children}
|
|
@@ -22,8 +22,7 @@ export function TUIContactContextProvider({ children, value }:PropsWithChildren<
|
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function useTUIContactContext(componentName?:string)
|
|
26
|
-
:TUIContactContextValue {
|
|
25
|
+
export function useTUIContactContext(componentName?: string): TUIContactContextValue {
|
|
27
26
|
const contextValue = useContext(TUIContactContext);
|
|
28
27
|
if (!contextValue && componentName) {
|
|
29
28
|
return {} as TUIContactContextValue;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import React, { PropsWithChildren, useContext, useEffect, useState } from 'react';
|
|
2
|
+
import TUIChatEngine, { IConversationModel, StoreName, TUIConversationService, TUIStore } from '@tencentcloud/chat-uikit-engine';
|
|
3
|
+
|
|
4
|
+
interface ConversationListProviderProps {
|
|
5
|
+
/** Specifies a function to filter conversations in the conversation list. */
|
|
6
|
+
filter?: (conversationList: IConversationModel[]) => IConversationModel[];
|
|
7
|
+
/** Specifies a function to sort conversations in the conversation list. */
|
|
8
|
+
sort?: (conversationList: IConversationModel[]) => IConversationModel[];
|
|
9
|
+
}
|
|
10
|
+
interface ConversationListContextType {
|
|
11
|
+
conversationList: IConversationModel[];
|
|
12
|
+
filteredAndSortedConversationList: IConversationModel[];
|
|
13
|
+
currentConversation: IConversationModel | undefined;
|
|
14
|
+
setCurrentConversation: (conversation: IConversationModel) => void;
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
isLoadError: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const ConversationListContext = React.createContext<ConversationListContextType | null>(null);
|
|
20
|
+
|
|
21
|
+
function ConversationListProvider(props: PropsWithChildren<Partial<ConversationListProviderProps>>) {
|
|
22
|
+
const {
|
|
23
|
+
filter,
|
|
24
|
+
sort,
|
|
25
|
+
children,
|
|
26
|
+
} = props;
|
|
27
|
+
|
|
28
|
+
const [conversationList, setConversationList] = useState<IConversationModel[]>([]);
|
|
29
|
+
|
|
30
|
+
const [currentConversation, _setCurrentConversation] = useState<IConversationModel | undefined>(undefined);
|
|
31
|
+
|
|
32
|
+
const [filteredAndSortedConversationList, setFilteredAndSortedConversationList] = useState<IConversationModel[]>([]);
|
|
33
|
+
|
|
34
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
35
|
+
const [isLoadError, setIsLoadError] = useState(false);
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
TUIStore.watch(StoreName.CONV, {
|
|
39
|
+
conversationList: onConversationListUpdated,
|
|
40
|
+
currentConversation: onCurrentConversationUpdated,
|
|
41
|
+
});
|
|
42
|
+
TUIStore.watch(StoreName.USER, {
|
|
43
|
+
netStateChange: onNetStateChange,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return () => {
|
|
47
|
+
TUIStore.unwatch(StoreName.CONV, {
|
|
48
|
+
conversationList: onConversationListUpdated,
|
|
49
|
+
currentConversation: onCurrentConversationUpdated,
|
|
50
|
+
});
|
|
51
|
+
TUIStore.unwatch(StoreName.USER, {
|
|
52
|
+
netStateChange: onNetStateChange,
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
// filter & sort conversationList
|
|
59
|
+
let _conversationList = conversationList;
|
|
60
|
+
filter && (_conversationList = filter(_conversationList));
|
|
61
|
+
sort && (_conversationList = sort(_conversationList));
|
|
62
|
+
setFilteredAndSortedConversationList(_conversationList);
|
|
63
|
+
}, [conversationList, sort, filter]);
|
|
64
|
+
|
|
65
|
+
function onConversationListUpdated(list: IConversationModel[]) {
|
|
66
|
+
// original conversationList
|
|
67
|
+
setConversationList(list);
|
|
68
|
+
if (isLoading) {
|
|
69
|
+
setIsLoading(false);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function onCurrentConversationUpdated(conversation: IConversationModel) {
|
|
74
|
+
_setCurrentConversation(conversation);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function onNetStateChange(netState: string) {
|
|
78
|
+
if (netState === TUIChatEngine.TYPES.NET_STATE_DISCONNECTED) {
|
|
79
|
+
setIsLoadError(true);
|
|
80
|
+
} else {
|
|
81
|
+
setIsLoadError(false);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function setCurrentConversation(conversation: IConversationModel) {
|
|
86
|
+
TUIConversationService.switchConversation(conversation?.conversationID);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const value = {
|
|
90
|
+
conversationList,
|
|
91
|
+
filteredAndSortedConversationList,
|
|
92
|
+
currentConversation,
|
|
93
|
+
setCurrentConversation,
|
|
94
|
+
isLoading,
|
|
95
|
+
isLoadError,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<ConversationListContext.Provider value={value}>
|
|
100
|
+
{children}
|
|
101
|
+
</ConversationListContext.Provider>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function useConversationList() {
|
|
106
|
+
const context = useContext(ConversationListContext);
|
|
107
|
+
if (!context) {
|
|
108
|
+
throw new Error('useConversationList must be used within a useConversationList');
|
|
109
|
+
}
|
|
110
|
+
return context;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export { useConversationList, ConversationListProvider, ConversationListContextType, ConversationListProviderProps };
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
PropsWithChildren,
|
|
7
7
|
} from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
+
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
|
|
9
10
|
|
|
10
11
|
interface LanguageContextType {
|
|
11
12
|
language: string;
|
|
@@ -29,12 +30,13 @@ function LanguageProvider(props: PropsWithChildren<Partial<LanguageProviderProps
|
|
|
29
30
|
const [language, setLanguage] = useState(_language);
|
|
30
31
|
|
|
31
32
|
useLayoutEffect(() => {
|
|
32
|
-
i18n.changeLanguage(
|
|
33
|
-
|
|
33
|
+
i18n.changeLanguage(_language);
|
|
34
|
+
setLanguage(_language);
|
|
35
|
+
}, [_language, i18n]);
|
|
34
36
|
|
|
35
37
|
useLayoutEffect(() => {
|
|
36
|
-
document.documentElement.lang =
|
|
37
|
-
}, [
|
|
38
|
+
document.documentElement.lang = _language;
|
|
39
|
+
}, [_language]);
|
|
38
40
|
|
|
39
41
|
const value = {
|
|
40
42
|
language,
|