@tencentcloud/chat-uikit-react 1.1.0 → 1.2.0
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 +6 -0
- package/README.md +8 -8
- package/dist/cjs/_virtual/extends.js +1 -0
- package/dist/cjs/components/Checkbox/index.d.ts +2 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/cjs/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/cjs/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/cjs/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/cjs/components/ConversationPreview/utils.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput.d.ts +2 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchInput.js +1 -1
- package/dist/cjs/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/cjs/components/DivWithEdit/DivWithEdit.d.ts +2 -1
- package/dist/cjs/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +2 -1
- package/dist/cjs/components/Icon/Icon.d.ts +2 -1
- package/dist/cjs/components/Icon/config.js +1 -1
- package/dist/cjs/components/Icon/images/add-friend.svg.js +1 -0
- package/dist/cjs/components/Icon/images/down-arrow.png.js +1 -0
- package/dist/cjs/components/Icon/images/right-arrow.svg.js +1 -0
- package/dist/cjs/components/Icon/type.d.ts +2 -1
- package/dist/cjs/components/Icon/type.js +1 -1
- package/dist/cjs/components/Input/Input.d.ts +1 -0
- package/dist/cjs/components/Input/Input.js +1 -1
- package/dist/cjs/components/Plugins/index.d.ts +1 -0
- package/dist/cjs/components/Plugins/index.js +1 -1
- package/dist/cjs/components/Popup/index.d.ts +1 -0
- package/dist/cjs/components/Popup/index.js +1 -1
- package/dist/cjs/components/Switch/Switch.d.ts +2 -1
- package/dist/cjs/components/TUIChat/TUIChat.js +1 -1
- package/dist/cjs/components/TUIChat/hooks/useHandleMessageList.js +1 -1
- package/dist/cjs/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/cjs/components/TUIContact/TUIContact.d.ts +6 -0
- package/dist/cjs/components/TUIContact/TUIContact.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +10 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/addFriendInfo.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/basicInfo.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/blockInfo.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendApplication.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/friendInfo.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -0
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.d.ts +6 -0
- package/dist/cjs/components/TUIContact/TUIContactList/TUIContactList.js +1 -0
- package/dist/cjs/components/TUIContact/hooks/useTUIContact.js +1 -0
- package/dist/cjs/components/TUIContactSearch/TUIContactSearch.js +1 -0
- package/dist/cjs/components/TUIContactSearch/hooks/useContactSearch.js +1 -0
- package/dist/cjs/components/TUIConversationList/TUIConversationList.js +1 -1
- package/dist/cjs/components/TUIKit/TUIKit.d.ts +1 -0
- package/dist/cjs/components/TUIKit/TUIKit.js +1 -1
- package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +4 -0
- package/dist/cjs/components/TUIKit/hooks/useCreateTUIKitContext.js +1 -1
- package/dist/cjs/components/TUIKit/hooks/useTUIKit.d.ts +23 -3
- package/dist/cjs/components/TUIKit/hooks/useTUIKit.js +1 -1
- package/dist/cjs/components/TUIManage/TUIManage.d.ts +3 -1
- package/dist/cjs/components/TUIManage/TUIManage.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageContext.js +1 -1
- package/dist/cjs/components/TUIMessage/MessagePlugins.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageRevoke.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageStatus.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageSystem.js +1 -1
- package/dist/cjs/components/TUIMessage/MessageTip.js +1 -1
- package/dist/cjs/components/TUIMessage/TUIMessage.js +1 -1
- package/dist/cjs/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/cjs/components/TUIMessage/utils/emojiMap.js +1 -1
- package/dist/cjs/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIForward.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInput.js +1 -1
- package/dist/cjs/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useCreateMessageInputContext.js +1 -1
- package/dist/cjs/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/cjs/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/cjs/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
- package/dist/cjs/components/TUIProfile/TUIProfile.js +1 -1
- package/dist/cjs/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/cjs/components/untils.js +1 -1
- package/dist/cjs/context/ComponentContext.d.ts +2 -1
- package/dist/cjs/context/TUIContactContext.d.ts +18 -0
- package/dist/cjs/context/TUIContactContext.js +1 -0
- package/dist/cjs/context/TUIConversationContext.js +1 -1
- package/dist/cjs/context/TUIKitContext.d.ts +4 -0
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.d.css +266 -13
- package/dist/cjs/index.d.ts +5 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/locales/en/TUIChat.js +1 -0
- package/dist/cjs/locales/en/TUIContact.js +1 -0
- package/dist/cjs/locales/en/TUIConversation.js +1 -0
- package/dist/cjs/locales/en/TUIProfile.js +1 -0
- package/dist/cjs/locales/en/index.js +1 -0
- package/dist/cjs/locales/index.js +1 -0
- package/dist/cjs/locales/zh_cn/TUIChat.js +1 -0
- package/dist/cjs/locales/zh_cn/TUIContact.js +1 -0
- package/dist/cjs/locales/zh_cn/TUIConversation.js +1 -0
- package/dist/cjs/locales/zh_cn/TUIProfile.js +1 -0
- package/dist/cjs/locales/zh_cn/index.js +1 -0
- package/dist/esm/_virtual/extends.js +1 -0
- package/dist/esm/components/Checkbox/index.d.ts +2 -1
- package/dist/esm/components/ConversationCreate/ConversationCreatGroupDetail.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreate.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationCreateUserSelectList.js +1 -1
- package/dist/esm/components/ConversationCreate/ConversationGroupTypeInfo.js +1 -1
- package/dist/esm/components/ConversationCreate/hooks/useConversationCreate.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreview.js +1 -1
- package/dist/esm/components/ConversationPreview/ConversationPreviewContent.js +1 -1
- package/dist/esm/components/ConversationPreview/utils.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchInput.d.ts +2 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchInput.js +1 -1
- package/dist/esm/components/ConversationSearch/ConversationSearchResult.js +1 -1
- package/dist/esm/components/DivWithEdit/DivWithEdit.d.ts +2 -1
- package/dist/esm/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +2 -1
- package/dist/esm/components/Icon/Icon.d.ts +2 -1
- package/dist/esm/components/Icon/config.js +1 -1
- package/dist/esm/components/Icon/images/add-friend.svg.js +1 -0
- package/dist/esm/components/Icon/images/down-arrow.png.js +1 -0
- package/dist/esm/components/Icon/images/right-arrow.svg.js +1 -0
- package/dist/esm/components/Icon/type.d.ts +2 -1
- package/dist/esm/components/Icon/type.js +1 -1
- package/dist/esm/components/Input/Input.d.ts +1 -0
- package/dist/esm/components/Input/Input.js +1 -1
- package/dist/esm/components/Plugins/index.d.ts +1 -0
- package/dist/esm/components/Plugins/index.js +1 -1
- package/dist/esm/components/Popup/index.d.ts +1 -0
- package/dist/esm/components/Popup/index.js +1 -1
- package/dist/esm/components/Switch/Switch.d.ts +2 -1
- package/dist/esm/components/TUIChat/TUIChat.js +1 -1
- package/dist/esm/components/TUIChat/hooks/useHandleMessageList.js +1 -1
- package/dist/esm/components/TUIChatHeader/TUIChatHeaderDefault.js +1 -1
- package/dist/esm/components/TUIContact/TUIContact.d.ts +6 -0
- package/dist/esm/components/TUIContact/TUIContact.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.d.ts +10 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/TUIContactInfo.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/addFriendInfo.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/basicInfo.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/blockInfo.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/friendApplication.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/friendInfo.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactInfo/hooks/useContactInfo.js +1 -0
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.d.ts +6 -0
- package/dist/esm/components/TUIContact/TUIContactList/TUIContactList.js +1 -0
- package/dist/esm/components/TUIContact/hooks/useTUIContact.js +1 -0
- package/dist/esm/components/TUIContactSearch/TUIContactSearch.js +1 -0
- package/dist/esm/components/TUIContactSearch/hooks/useContactSearch.js +1 -0
- package/dist/esm/components/TUIConversationList/TUIConversationList.js +1 -1
- package/dist/esm/components/TUIKit/TUIKit.d.ts +1 -0
- package/dist/esm/components/TUIKit/TUIKit.js +1 -1
- package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.d.ts +4 -0
- package/dist/esm/components/TUIKit/hooks/useCreateTUIKitContext.js +1 -1
- package/dist/esm/components/TUIKit/hooks/useTUIKit.d.ts +23 -3
- package/dist/esm/components/TUIKit/hooks/useTUIKit.js +1 -1
- package/dist/esm/components/TUIManage/TUIManage.d.ts +3 -1
- package/dist/esm/components/TUIManage/TUIManage.js +1 -1
- package/dist/esm/components/TUIMessage/MessageContext.js +1 -1
- package/dist/esm/components/TUIMessage/MessagePlugins.js +1 -1
- package/dist/esm/components/TUIMessage/MessageRevoke.js +1 -1
- package/dist/esm/components/TUIMessage/MessageStatus.js +1 -1
- package/dist/esm/components/TUIMessage/MessageSystem.js +1 -1
- package/dist/esm/components/TUIMessage/MessageTip.js +1 -1
- package/dist/esm/components/TUIMessage/TUIMessage.js +1 -1
- package/dist/esm/components/TUIMessage/hooks/useMessageHandler.js +1 -1
- package/dist/esm/components/TUIMessage/utils/emojiMap.js +1 -1
- package/dist/esm/components/TUIMessageInput/InputPluginsDefalut.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIForward.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInput.js +1 -1
- package/dist/esm/components/TUIMessageInput/TUIMessageInputDefault.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useCreateMessageInputContext.js +1 -1
- package/dist/esm/components/TUIMessageInput/hooks/useEmojiPicker.js +1 -1
- package/dist/esm/components/TUIMessageList/TUIMessageList.js +1 -1
- package/dist/esm/components/TUIMessageList/hooks/useMessageListElement.js +1 -1
- package/dist/esm/components/TUIProfile/TUIProfile.js +1 -1
- package/dist/esm/components/TUIProfile/TUIProfileDefault.js +1 -1
- package/dist/esm/components/untils.js +1 -1
- package/dist/esm/context/ComponentContext.d.ts +2 -1
- package/dist/esm/context/TUIContactContext.d.ts +18 -0
- package/dist/esm/context/TUIContactContext.js +1 -0
- package/dist/esm/context/TUIConversationContext.js +1 -1
- package/dist/esm/context/TUIKitContext.d.ts +4 -0
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.d.css +266 -13
- package/dist/esm/index.d.ts +5 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/locales/en/TUIChat.js +1 -0
- package/dist/esm/locales/en/TUIContact.js +1 -0
- package/dist/esm/locales/en/TUIConversation.js +1 -0
- package/dist/esm/locales/en/TUIProfile.js +1 -0
- package/dist/esm/locales/en/index.js +1 -0
- package/dist/esm/locales/index.js +1 -0
- package/dist/esm/locales/zh_cn/TUIChat.js +1 -0
- package/dist/esm/locales/zh_cn/TUIContact.js +1 -0
- package/dist/esm/locales/zh_cn/TUIConversation.js +1 -0
- package/dist/esm/locales/zh_cn/TUIProfile.js +1 -0
- package/dist/esm/locales/zh_cn/index.js +1 -0
- package/package.json +5 -1
- package/src/components/ConversationCreate/ConversationCreatGroupDetail.tsx +10 -8
- package/src/components/ConversationCreate/ConversationCreate.tsx +4 -1
- package/src/components/ConversationCreate/ConversationCreateUserSelectList.tsx +6 -4
- package/src/components/ConversationCreate/ConversationGroupTypeInfo.tsx +7 -3
- package/src/components/ConversationCreate/hooks/useConversationCreate.tsx +0 -1
- package/src/components/ConversationPreview/ConversationPreview.tsx +6 -5
- package/src/components/ConversationPreview/ConversationPreviewContent.tsx +4 -2
- package/src/components/ConversationPreview/utils.tsx +12 -27
- package/src/components/ConversationSearch/ConversationSearchInput.tsx +3 -1
- package/src/components/Icon/config.ts +5 -0
- package/src/components/Icon/images/add-friend.svg +15 -0
- package/src/components/Icon/images/down-arrow.png +0 -0
- package/src/components/Icon/images/right-arrow.svg +3 -0
- package/src/components/Icon/styles/index.scss +0 -1
- package/src/components/Icon/type.ts +1 -0
- package/src/components/Input/Input.tsx +11 -2
- package/src/components/Plugins/index.tsx +26 -2
- package/src/components/Popup/index.tsx +20 -2
- package/src/components/TUIChat/hooks/useHandleMessageList.tsx +3 -8
- package/src/components/TUIChatHeader/TUIChatHeaderDefault.tsx +3 -3
- package/src/components/TUIContact/TUIContact.tsx +96 -0
- package/src/components/TUIContact/TUIContactInfo/TUIContactInfo.tsx +32 -0
- package/src/components/TUIContact/TUIContactInfo/addFriendInfo.tsx +86 -0
- package/src/components/TUIContact/TUIContactInfo/basicInfo.tsx +34 -0
- package/src/components/TUIContact/TUIContactInfo/blockInfo.tsx +45 -0
- package/src/components/TUIContact/TUIContactInfo/friendApplication.tsx +66 -0
- package/src/components/TUIContact/TUIContactInfo/friendInfo.tsx +103 -0
- package/src/components/TUIContact/TUIContactInfo/hooks/useContactInfo.tsx +112 -0
- package/src/components/TUIContact/TUIContactInfo/index.scss +108 -0
- package/src/components/TUIContact/TUIContactList/TUIContactList.tsx +162 -0
- package/src/components/TUIContact/TUIContactList/index.scss +90 -0
- package/src/components/TUIContact/hooks/useTUIContact.tsx +76 -0
- package/src/components/TUIContact/index.scss +67 -0
- package/src/components/TUIContact/index.ts +3 -0
- package/src/components/TUIContactSearch/TUIContactSearch.tsx +100 -0
- package/src/components/TUIContactSearch/hooks/useContactSearch.tsx +32 -0
- package/src/components/TUIContactSearch/index.scss +24 -0
- package/src/components/TUIConversationList/TUIConversationList.tsx +3 -4
- package/src/components/TUIConversationList/index.scss +2 -2
- package/src/components/TUIKit/TUIKit.tsx +9 -2
- package/src/components/TUIKit/hooks/useCreateTUIKitContext.tsx +8 -0
- package/src/components/TUIKit/hooks/useTUIKit.tsx +43 -4
- package/src/components/TUIManage/TUIManage.tsx +5 -3
- package/src/components/TUIMessage/MessagePlugins.tsx +17 -7
- package/src/components/TUIMessage/MessageRevoke.tsx +5 -4
- package/src/components/TUIMessage/MessageStatus.tsx +3 -3
- package/src/components/TUIMessage/hooks/useMessageHandler.ts +4 -2
- package/src/components/TUIMessage/styles/layout.scss +2 -9
- package/src/components/TUIMessage/utils/emojiMap.ts +6 -2
- package/src/components/TUIMessageInput/InputPluginsDefalut.tsx +5 -3
- package/src/components/TUIMessageInput/TUIForward.tsx +8 -27
- package/src/components/TUIMessageInput/TUIMessageInputDefault.tsx +3 -1
- package/src/components/TUIMessageInput/hooks/useCreateMessageInputContext.ts +3 -3
- package/src/components/TUIMessageInput/hooks/useEmojiPicker.tsx +7 -1
- package/src/components/TUIMessageInput/styles/layout.scss +0 -1
- package/src/components/TUIMessageList/TUIMessageList.tsx +3 -1
- package/src/components/TUIMessageList/hooks/useMessageListElement.tsx +3 -2
- package/src/components/TUIProfile/TUIProfile.tsx +18 -7
- package/src/components/TUIProfile/TUIProfileDefault.tsx +64 -6
- package/src/components/TUIProfile/styles/layout.scss +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/untils.ts +26 -6
- package/src/context/TUIContactContext.tsx +32 -0
- package/src/context/TUIKitContext.tsx +5 -0
- package/src/context/index.ts +1 -0
- package/src/hooks/useConversation.tsx +3 -3
- package/src/locales/en/TUIChat.ts +27 -0
- package/src/locales/en/TUIContact.ts +28 -0
- package/src/locales/en/TUIConversation.ts +34 -0
- package/src/locales/en/TUIProfile.ts +14 -0
- package/src/locales/en/index.ts +11 -0
- package/src/locales/index.ts +23 -0
- package/src/locales/zh_cn/TUIChat.ts +27 -0
- package/src/locales/zh_cn/TUIContact.ts +29 -0
- package/src/locales/zh_cn/TUIConversation.ts +33 -0
- package/src/locales/zh_cn/TUIProfile.ts +14 -0
- package/src/locales/zh_cn/index.ts +11 -0
- package/tsconfig.json +1 -0
package/dist/esm/index.d.css
CHANGED
|
@@ -62,10 +62,10 @@ table {
|
|
|
62
62
|
text-align: initial;
|
|
63
63
|
}
|
|
64
64
|
.tui-conversation {
|
|
65
|
-
height:
|
|
65
|
+
height: 0;
|
|
66
|
+
flex: 1;
|
|
66
67
|
min-width: 360px;
|
|
67
68
|
max-width: 400px;
|
|
68
|
-
width: 30%;
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
71
|
position: relative;
|
|
@@ -464,15 +464,8 @@ table {
|
|
|
464
464
|
transform: scale(1.5);
|
|
465
465
|
}
|
|
466
466
|
.message-plugin .plugin-popup-box {
|
|
467
|
-
top: 100%;
|
|
468
467
|
bottom: auto;
|
|
469
|
-
|
|
470
|
-
.message-plugin-top {
|
|
471
|
-
top: auto !important;
|
|
472
|
-
bottom: 100% !important;
|
|
473
|
-
}
|
|
474
|
-
.message-plugin-left {
|
|
475
|
-
left: -140px !important;
|
|
468
|
+
top: 100%;
|
|
476
469
|
}
|
|
477
470
|
.message-plugin-box {
|
|
478
471
|
padding: 6px 0;
|
|
@@ -767,7 +760,6 @@ ul li {
|
|
|
767
760
|
min-width: 180px;
|
|
768
761
|
}
|
|
769
762
|
.upload-picker:hover {
|
|
770
|
-
background: rgba(0, 110, 255, 0.1);
|
|
771
763
|
color: #147aff;
|
|
772
764
|
}
|
|
773
765
|
.upload-picker input {
|
|
@@ -1198,7 +1190,7 @@ ul li {
|
|
|
1198
1190
|
flex-direction: column;
|
|
1199
1191
|
align-items: center;
|
|
1200
1192
|
width: 30%;
|
|
1201
|
-
max-width:
|
|
1193
|
+
max-width: 360px;
|
|
1202
1194
|
min-width: 360px;
|
|
1203
1195
|
height: 100%;
|
|
1204
1196
|
}
|
|
@@ -1536,7 +1528,6 @@ ul li {
|
|
|
1536
1528
|
}
|
|
1537
1529
|
.tui-kit-icon .icon-image {
|
|
1538
1530
|
width: 100%;
|
|
1539
|
-
height: 100%;
|
|
1540
1531
|
}
|
|
1541
1532
|
.tui-kit-icon:hover {
|
|
1542
1533
|
color: royalblue;
|
|
@@ -1629,4 +1620,266 @@ ul li {
|
|
|
1629
1620
|
.error {
|
|
1630
1621
|
color: #FFFFFF;
|
|
1631
1622
|
background: #ff4d4f;
|
|
1623
|
+
}
|
|
1624
|
+
.tui-contacts-list {
|
|
1625
|
+
flex: 1 1 auto;
|
|
1626
|
+
min-width: 360px;
|
|
1627
|
+
max-width: 360px;
|
|
1628
|
+
display: flex;
|
|
1629
|
+
flex-direction: column;
|
|
1630
|
+
position: relative;
|
|
1631
|
+
border-right: 1px solid #F9FAFB;
|
|
1632
|
+
text-align: initial;
|
|
1633
|
+
overflow-y: scroll;
|
|
1634
|
+
overflow-x: hidden;
|
|
1635
|
+
}
|
|
1636
|
+
.tui-contacts-list .tui-contacts-title {
|
|
1637
|
+
display: flex;
|
|
1638
|
+
justify-content: space-between;
|
|
1639
|
+
}
|
|
1640
|
+
.tui-contacts-list .tui-contacts-list-title {
|
|
1641
|
+
display: flex;
|
|
1642
|
+
padding: 10px 20px;
|
|
1643
|
+
}
|
|
1644
|
+
.tui-contacts-list .tui-contacts-list-icon {
|
|
1645
|
+
display: flex;
|
|
1646
|
+
align-items: center;
|
|
1647
|
+
justify-content: center;
|
|
1648
|
+
margin-right: 20px;
|
|
1649
|
+
}
|
|
1650
|
+
.tui-contacts-list .tui-contacts-list-item {
|
|
1651
|
+
align-items: center;
|
|
1652
|
+
cursor: pointer;
|
|
1653
|
+
display: flex;
|
|
1654
|
+
padding: 10px 20px;
|
|
1655
|
+
text-align: center;
|
|
1656
|
+
font-family: PingFangSC-Medium;
|
|
1657
|
+
font-size: 14px;
|
|
1658
|
+
line-height: 20px;
|
|
1659
|
+
}
|
|
1660
|
+
.tui-contacts-list .tui-contacts-list-item .tui-contacts-list-item-card {
|
|
1661
|
+
display: flex;
|
|
1662
|
+
padding: 0 10px;
|
|
1663
|
+
overflow: hidden;
|
|
1664
|
+
align-items: center;
|
|
1665
|
+
justify-content: space-between;
|
|
1666
|
+
flex: 1;
|
|
1667
|
+
}
|
|
1668
|
+
.tui-contacts-list .tui-contacts-list-item .tui-contacts-list-item-container {
|
|
1669
|
+
margin-left: 10px;
|
|
1670
|
+
}
|
|
1671
|
+
.tui-contacts-list .tui-contacts-list-item .tui-contacts-list-item-text {
|
|
1672
|
+
color: #999;
|
|
1673
|
+
font-size: 12px;
|
|
1674
|
+
text-align: left;
|
|
1675
|
+
}
|
|
1676
|
+
.tui-contacts-list .tui-contacts-list-item .tui-contacts-list-btn-text {
|
|
1677
|
+
color: #999;
|
|
1678
|
+
font-size: 12px;
|
|
1679
|
+
text-align: left;
|
|
1680
|
+
}
|
|
1681
|
+
.tui-contacts-list .tui-contacts-list-item .tui-contacts-list-item-name {
|
|
1682
|
+
color: #000;
|
|
1683
|
+
font-weight: 400;
|
|
1684
|
+
text-align: left;
|
|
1685
|
+
}
|
|
1686
|
+
.tui-contacts-list .text-ellipsis, .tui-contacts-list .tui-contacts-list-item .tui-contacts-list-item-text, .tui-contacts-list .tui-contacts-list-item .tui-contacts-list-item-name {
|
|
1687
|
+
overflow: hidden;
|
|
1688
|
+
text-overflow: ellipsis;
|
|
1689
|
+
white-space: nowrap;
|
|
1690
|
+
}
|
|
1691
|
+
.tui-contacts-list .application-btn {
|
|
1692
|
+
width: 30px;
|
|
1693
|
+
height: 14px;
|
|
1694
|
+
padding: 5px;
|
|
1695
|
+
border-radius: 15px;
|
|
1696
|
+
border: none;
|
|
1697
|
+
font-size: 10px;
|
|
1698
|
+
text-align: center;
|
|
1699
|
+
line-height: 14px;
|
|
1700
|
+
letter-spacing: 0;
|
|
1701
|
+
cursor: pointer;
|
|
1702
|
+
-webkit-user-select: none;
|
|
1703
|
+
user-select: none;
|
|
1704
|
+
border: 1px solid #006EFF;
|
|
1705
|
+
background: #006EFF;
|
|
1706
|
+
color: #fff;
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
::-webkit-scrollbar {
|
|
1710
|
+
display: none;
|
|
1711
|
+
}
|
|
1712
|
+
.tui-contact-info {
|
|
1713
|
+
width: 100%;
|
|
1714
|
+
height: 100%;
|
|
1715
|
+
display: flex;
|
|
1716
|
+
padding: 60px;
|
|
1717
|
+
box-sizing: border-box;
|
|
1718
|
+
flex-direction: column;
|
|
1719
|
+
overflow: hidden;
|
|
1720
|
+
}
|
|
1721
|
+
.tui-contact-info .tui-contact-info-header {
|
|
1722
|
+
padding-bottom: 15px;
|
|
1723
|
+
border-bottom: 1px solid #ddd;
|
|
1724
|
+
overflow: hidden;
|
|
1725
|
+
box-sizing: border-box;
|
|
1726
|
+
width: 100%;
|
|
1727
|
+
}
|
|
1728
|
+
.tui-contact-info .tui-contact-info-header .header-container {
|
|
1729
|
+
flex: 1;
|
|
1730
|
+
}
|
|
1731
|
+
.tui-contact-info .tui-contact-info-header .header-container .header-container-avatar {
|
|
1732
|
+
display: flex;
|
|
1733
|
+
align-items: center;
|
|
1734
|
+
padding: 10px;
|
|
1735
|
+
}
|
|
1736
|
+
.tui-contact-info .tui-contact-info-header .header-container .header-container-name {
|
|
1737
|
+
font-size: 24px;
|
|
1738
|
+
padding: 15px;
|
|
1739
|
+
}
|
|
1740
|
+
.tui-contact-info .tui-contact-info-header .header-container .header-container-text {
|
|
1741
|
+
font-size: 16px;
|
|
1742
|
+
line-height: 50px;
|
|
1743
|
+
font-weight: 400;
|
|
1744
|
+
color: #999999;
|
|
1745
|
+
}
|
|
1746
|
+
.tui-contact-info .tui-contact-info-content {
|
|
1747
|
+
padding: 15px 0;
|
|
1748
|
+
overflow: hidden;
|
|
1749
|
+
}
|
|
1750
|
+
.tui-contact-info .tui-contact-info-content .content-item {
|
|
1751
|
+
display: flex;
|
|
1752
|
+
flex-direction: row;
|
|
1753
|
+
align-items: center;
|
|
1754
|
+
padding: 6px 0;
|
|
1755
|
+
font-size: 16px;
|
|
1756
|
+
font-weight: 400;
|
|
1757
|
+
min-height: 56px;
|
|
1758
|
+
}
|
|
1759
|
+
.tui-contact-info .tui-contact-info-content .content-item-wording {
|
|
1760
|
+
padding: 6px 0;
|
|
1761
|
+
font-size: 16px;
|
|
1762
|
+
font-weight: 400;
|
|
1763
|
+
min-height: 56px;
|
|
1764
|
+
}
|
|
1765
|
+
.tui-contact-info .tui-contact-info-content .content-item-wording-text {
|
|
1766
|
+
margin-top: 5px;
|
|
1767
|
+
flex: 1;
|
|
1768
|
+
border: 1px solid #e8e8e9;
|
|
1769
|
+
border-radius: 4px;
|
|
1770
|
+
padding: 4px;
|
|
1771
|
+
color: inherit;
|
|
1772
|
+
resize: none;
|
|
1773
|
+
height: 100px;
|
|
1774
|
+
width: 95%;
|
|
1775
|
+
}
|
|
1776
|
+
.tui-contact-info .tui-contact-info-content .content-item-label {
|
|
1777
|
+
color: #999;
|
|
1778
|
+
margin-right: 5px;
|
|
1779
|
+
}
|
|
1780
|
+
.tui-contact-info .tui-contact-info-content .content-item-text {
|
|
1781
|
+
flex: 1;
|
|
1782
|
+
display: flex;
|
|
1783
|
+
flex-direction: row;
|
|
1784
|
+
color: #333;
|
|
1785
|
+
overflow: hidden;
|
|
1786
|
+
}
|
|
1787
|
+
.tui-contact-info .tui-contact-info-content .content-btn-container {
|
|
1788
|
+
display: flex;
|
|
1789
|
+
padding: 30px;
|
|
1790
|
+
justify-content: center;
|
|
1791
|
+
}
|
|
1792
|
+
.tui-contact-info .tui-contact-info-content .content-btn-container .content-item-btn {
|
|
1793
|
+
margin: 15px;
|
|
1794
|
+
width: 122px;
|
|
1795
|
+
height: 26px;
|
|
1796
|
+
padding: 8px 20px;
|
|
1797
|
+
border-radius: 25px;
|
|
1798
|
+
border: none;
|
|
1799
|
+
font-size: 14px;
|
|
1800
|
+
text-align: center;
|
|
1801
|
+
line-height: 26px;
|
|
1802
|
+
font-weight: 400;
|
|
1803
|
+
letter-spacing: 0;
|
|
1804
|
+
min-width: 100px;
|
|
1805
|
+
cursor: pointer;
|
|
1806
|
+
-webkit-user-select: none;
|
|
1807
|
+
user-select: none;
|
|
1808
|
+
}
|
|
1809
|
+
.tui-contact-info .tui-contact-info-content .content-btn-container .delete-btn {
|
|
1810
|
+
border: 1px solid #e54545;
|
|
1811
|
+
background: transparent;
|
|
1812
|
+
color: #e54545;
|
|
1813
|
+
}
|
|
1814
|
+
.tui-contact-info .tui-contact-info-content .content-btn-container .confirm-btn {
|
|
1815
|
+
border: 1px solid #006eff;
|
|
1816
|
+
background: #006eff;
|
|
1817
|
+
color: #fff;
|
|
1818
|
+
}
|
|
1819
|
+
.tui-contacts {
|
|
1820
|
+
height: 100%;
|
|
1821
|
+
min-width: 360px;
|
|
1822
|
+
max-width: 360px;
|
|
1823
|
+
display: flex;
|
|
1824
|
+
flex-direction: column;
|
|
1825
|
+
position: relative;
|
|
1826
|
+
text-align: initial;
|
|
1827
|
+
overflow: hidden;
|
|
1828
|
+
}
|
|
1829
|
+
.tui-contacts .tui-contacts-header {
|
|
1830
|
+
position: relative;
|
|
1831
|
+
display: flex;
|
|
1832
|
+
align-items: center;
|
|
1833
|
+
padding: 10px 20px 10px 10px;
|
|
1834
|
+
}
|
|
1835
|
+
.tui-contacts .tui-contact-input {
|
|
1836
|
+
width: 100%;
|
|
1837
|
+
}
|
|
1838
|
+
.tui-contacts .tui-contacts-add {
|
|
1839
|
+
display: flex;
|
|
1840
|
+
color: #147AFF;
|
|
1841
|
+
font-size: 20px;
|
|
1842
|
+
align-items: center;
|
|
1843
|
+
cursor: pointer;
|
|
1844
|
+
display: flex;
|
|
1845
|
+
text-align: center;
|
|
1846
|
+
}
|
|
1847
|
+
.tui-contacts .tui-contacts-add .tui-conversation-create-icon {
|
|
1848
|
+
display: flex;
|
|
1849
|
+
align-items: center;
|
|
1850
|
+
justify-content: center;
|
|
1851
|
+
}
|
|
1852
|
+
.tui-contacts .tui-contacts-add-header {
|
|
1853
|
+
align-items: center;
|
|
1854
|
+
background-color: #f9fafb;
|
|
1855
|
+
display: flex;
|
|
1856
|
+
flex-direction: row;
|
|
1857
|
+
padding: 16px 20px;
|
|
1858
|
+
text-align: center;
|
|
1859
|
+
margin-bottom: 10px;
|
|
1860
|
+
}
|
|
1861
|
+
.tui-contacts .tui-contacts-add-header .tui-contacts-add-header-title {
|
|
1862
|
+
color: #000;
|
|
1863
|
+
font-family: PingFangSC-Medium;
|
|
1864
|
+
font-size: 20px;
|
|
1865
|
+
font-weight: 600;
|
|
1866
|
+
letter-spacing: -0.41px;
|
|
1867
|
+
line-height: 32px;
|
|
1868
|
+
margin-left: 10px;
|
|
1869
|
+
}
|
|
1870
|
+
.tui-contacts .no-result {
|
|
1871
|
+
padding: 0 20px;
|
|
1872
|
+
display: flex;
|
|
1873
|
+
flex-direction: column;
|
|
1874
|
+
align-items: center;
|
|
1875
|
+
}
|
|
1876
|
+
.tui-contacts .no-result-icon {
|
|
1877
|
+
margin: 100px auto 50px;
|
|
1878
|
+
}
|
|
1879
|
+
.tui-contacts .no-result-message {
|
|
1880
|
+
color: #999999;
|
|
1881
|
+
font-weight: 400;
|
|
1882
|
+
font-size: 16px;
|
|
1883
|
+
font-family: PingFangSC-Medium;
|
|
1884
|
+
line-height: 22px;
|
|
1632
1885
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ChatProps, TUIKit } from './components/TUIKit/TUIKit.js';
|
|
2
|
-
export { UseChatParams, useTUIKit } from './components/TUIKit/hooks/useTUIKit.js';
|
|
2
|
+
export { UseChatParams, UseContactParams, useTUIKit } from './components/TUIKit/hooks/useTUIKit.js';
|
|
3
3
|
export { useCreateTUIKitContext } from './components/TUIKit/hooks/useCreateTUIKitContext.js';
|
|
4
4
|
export { TUIConversation, UnMemoizedTUIConversation } from './components/TUIConversation/TUIConversation.js';
|
|
5
5
|
export { TUIConversationList, UnMemoTUIConversationList } from './components/TUIConversationList/TUIConversationList.js';
|
|
@@ -10,6 +10,7 @@ export { TUIChatActionContext, TUIChatActionContextValue, TUIChatActionProvider,
|
|
|
10
10
|
export { TUIMessageContext, TUIMessageContextProvider, TUIMessageContextValue, messageShowType, useTUIMessageContext } from './context/TUIMessageContext.js';
|
|
11
11
|
export { ComponentContext, ComponentContextValue, ComponentProvider, UnknowPorps, useComponentContext } from './context/ComponentContext.js';
|
|
12
12
|
export { TUIMessageInputContext, TUIMessageInputContextProvider, TUIMessageInputContextValue, useTUIMessageInputContext } from './context/TUIMessageInputContext.js';
|
|
13
|
+
export { TUIContactContext, TUIContactContextProvider, TUIContactContextValue, useTUIContactContext } from './context/TUIContactContext.js';
|
|
13
14
|
export { ConversationPreview, ConversationPreviewProps, ConversationPreviewUIComponentProps } from './components/ConversationPreview/ConversationPreview.js';
|
|
14
15
|
export { ConversationPreviewContent, unMemoConversationPreviewContent } from './components/ConversationPreview/ConversationPreviewContent.js';
|
|
15
16
|
export { TUIChatHeader } from './components/TUIChatHeader/TUIChatHeader.js';
|
|
@@ -39,5 +40,8 @@ export { Model } from './components/Model/index.js';
|
|
|
39
40
|
export { Plugins, PluginsProps } from './components/Plugins/index.js';
|
|
40
41
|
export { Switch } from './components/Switch/Switch.js';
|
|
41
42
|
export { Toast } from './components/Toast/index.js';
|
|
43
|
+
export { TUIContactList } from './components/TUIContact/TUIContactList/TUIContactList.js';
|
|
44
|
+
export { TUIContactInfo, UnMemoizedTUIContactInfo } from './components/TUIContact/TUIContactInfo/TUIContactInfo.js';
|
|
45
|
+
export { TUIContact, UnMemoizedTUIContact } from './components/TUIContact/TUIContact.js';
|
|
42
46
|
export { CreateGroupConversationParams, useConversation } from './hooks/useConversation.js';
|
|
43
47
|
export { useProfile } from './hooks/useProfile.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{TUIKit}from"./components/TUIKit/TUIKit.js";export{useTUIKit}from"./components/TUIKit/hooks/useTUIKit.js";export{useCreateTUIKitContext}from"./components/TUIKit/hooks/useCreateTUIKitContext.js";export{TUIConversation,UnMemoizedTUIConversation}from"./components/TUIConversation/TUIConversation.js";export{TUIConversationList,UnMemoTUIConversationList}from"./components/TUIConversationList/TUIConversationList.js";import"tslib";import"react";import"@tencentcloud/chat";export{TUIChat}from"./components/TUIChat/TUIChat.js";export{ConversationPreview}from"./components/ConversationPreview/ConversationPreview.js";export{ConversationPreviewContent,unMemoConversationPreviewContent}from"./components/ConversationPreview/ConversationPreviewContent.js";export{TUIChatHeader}from"./components/TUIChatHeader/TUIChatHeader.js";export{TUIChatHeaderDefault}from"./components/TUIChatHeader/TUIChatHeaderDefault.js";export{TUIMessageList}from"./components/TUIMessageList/TUIMessageList.js";export{TUIMessage}from"./components/TUIMessage/TUIMessage.js";export{MessagePlugins}from"./components/TUIMessage/MessagePlugins.js";export{MessageContext}from"./components/TUIMessage/MessageContext.js";export{TUIMessageInput}from"./components/TUIMessageInput/TUIMessageInput.js";export{TUIMessageInputDefault}from"./components/TUIMessageInput/TUIMessageInputDefault.js";export{InputPluginsDefalut}from"./components/TUIMessageInput/InputPluginsDefalut.js";export{TUIProfile}from"./components/TUIProfile/TUIProfile.js";export{TUIProfileDefault}from"./components/TUIProfile/TUIProfileDefault.js";export{Avatar}from"./components/Avatar/Avatar.js";export{defaultGroupAvatarAVChatRoom,defaultGroupAvatarMeeting,defaultGroupAvatarPublic,defaultGroupAvatarWork,defaultUserAvatar}from"./components/Avatar/default.js";export{ConversationSearchInput}from"./components/ConversationSearch/ConversationSearchInput.js";export{ConversationSearchResult}from"./components/ConversationSearch/ConversationSearchResult.js";export{TUIManage}from"./components/TUIManage/TUIManage.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{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{TUIKitContext,TUIKitProvider,useTUIKitContext}from"./context/TUIKitContext.js";export{TUIChatStateContext,TUIChatStateContextProvider,useTUIChatStateContext}from"./context/TUIChatStateContext.js";export{TUIChatActionContext,TUIChatActionProvider,useTUIChatActionContext}from"./context/TUIChatActionContext.js";export{TUIMessageContext,TUIMessageContextProvider,messageShowType,useTUIMessageContext}from"./context/TUIMessageContext.js";export{ComponentContext,ComponentProvider,useComponentContext}from"./context/ComponentContext.js";export{TUIMessageInputContext,TUIMessageInputContextProvider,useTUIMessageInputContext}from"./context/TUIMessageInputContext.js";export{useConversation}from"./hooks/useConversation.js";export{useProfile}from"./hooks/useProfile.js";
|
|
1
|
+
export{TUIKit}from"./components/TUIKit/TUIKit.js";export{useTUIKit}from"./components/TUIKit/hooks/useTUIKit.js";export{useCreateTUIKitContext}from"./components/TUIKit/hooks/useCreateTUIKitContext.js";export{TUIConversation,UnMemoizedTUIConversation}from"./components/TUIConversation/TUIConversation.js";export{TUIConversationList,UnMemoTUIConversationList}from"./components/TUIConversationList/TUIConversationList.js";import"tslib";import"react";import"@tencentcloud/chat";export{TUIChat}from"./components/TUIChat/TUIChat.js";export{ConversationPreview}from"./components/ConversationPreview/ConversationPreview.js";export{ConversationPreviewContent,unMemoConversationPreviewContent}from"./components/ConversationPreview/ConversationPreviewContent.js";export{TUIChatHeader}from"./components/TUIChatHeader/TUIChatHeader.js";export{TUIChatHeaderDefault}from"./components/TUIChatHeader/TUIChatHeaderDefault.js";export{TUIMessageList}from"./components/TUIMessageList/TUIMessageList.js";export{TUIMessage}from"./components/TUIMessage/TUIMessage.js";export{MessagePlugins}from"./components/TUIMessage/MessagePlugins.js";export{MessageContext}from"./components/TUIMessage/MessageContext.js";export{TUIMessageInput}from"./components/TUIMessageInput/TUIMessageInput.js";export{TUIMessageInputDefault}from"./components/TUIMessageInput/TUIMessageInputDefault.js";export{InputPluginsDefalut}from"./components/TUIMessageInput/InputPluginsDefalut.js";export{TUIProfile}from"./components/TUIProfile/TUIProfile.js";export{TUIProfileDefault}from"./components/TUIProfile/TUIProfileDefault.js";export{Avatar}from"./components/Avatar/Avatar.js";export{defaultGroupAvatarAVChatRoom,defaultGroupAvatarMeeting,defaultGroupAvatarPublic,defaultGroupAvatarWork,defaultUserAvatar}from"./components/Avatar/default.js";export{ConversationSearchInput}from"./components/ConversationSearch/ConversationSearchInput.js";export{ConversationSearchResult}from"./components/ConversationSearch/ConversationSearchResult.js";export{TUIManage}from"./components/TUIManage/TUIManage.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{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{TUIContactList}from"./components/TUIContact/TUIContactList/TUIContactList.js";export{TUIContactInfo,UnMemoizedTUIContactInfo}from"./components/TUIContact/TUIContactInfo/TUIContactInfo.js";export{TUIContact,UnMemoizedTUIContact}from"./components/TUIContact/TUIContact.js";export{TUIKitContext,TUIKitProvider,useTUIKitContext}from"./context/TUIKitContext.js";export{TUIChatStateContext,TUIChatStateContextProvider,useTUIChatStateContext}from"./context/TUIChatStateContext.js";export{TUIChatActionContext,TUIChatActionProvider,useTUIChatActionContext}from"./context/TUIChatActionContext.js";export{TUIMessageContext,TUIMessageContextProvider,messageShowType,useTUIMessageContext}from"./context/TUIMessageContext.js";export{ComponentContext,ComponentProvider,useComponentContext}from"./context/ComponentContext.js";export{TUIMessageInputContext,TUIMessageInputContextProvider,useTUIMessageInputContext}from"./context/TUIMessageInputContext.js";export{TUIContactContext,TUIContactContextProvider,useTUIContactContext}from"./context/TUIContactContext.js";export{useConversation}from"./hooks/useConversation.js";export{useProfile}from"./hooks/useProfile.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={TUIChat:"TUIChat",Recall:"Recall",Reference:"Reference",Forward:"Forward",Copy:"Copy",Delete:"Delete","Forward to":"Forward to","recalled a message":"recalled a message","Re-edit":"Re-edit",Resend:"Resend",You:"You","Recent Chats":"Recent Chats","Frequently Contacted":"Frequently Contacted","No Result":"No Result","Search Result":"Search Result",Image:"Image",Video:"Video",File:"File","Enter a message":"Enter a message","No More":"No More","Error deleting message":"Error deleting message","The message recall exceeded the time limit (default 2 minutes)":"The message recall exceeded the time limit (default 2 minutes)","Error revoke Message":"Error revoke Message"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Enter a userID":"Enter a userID","Enter the verification info":"Enter the verification info","Request to join":"Request to join",Requested:"Requested",Accept:"Accept",Refuse:"Refuse",Handled:"Handled",Friend:"Friend","Send Message":"Send Message",Signature:"Signature","New Contacts":"New Contacts","Blocked List":"Blocked List","No Result":"No Result",ID:"ID",User:"User","Add Friend":"Add Friend",remark:"remark",block:"block","Delete friend":"Delete friend","waiting for verification":"waiting for verification","verification info":"verification info","Send application":"Send application",Agree:"Agree"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Start chat":"Start chat","New one-to-one chat":"New one-to-one chat","New group chat":"New group chat","Enter a user ID":"Enter a user ID",Delete:"Delete","Conversation Information":"Conversation Information",Pin:"Pin",Unpin:"Unpin",Search:"Search","Add Participants":"Add Participants","No conversation":"No conversation",Next:"Next","Group Name":"Group Name","Group ID":"Group ID","Group Type":"Group Type",Participants:"Participants",Create:"Create",Details:"Details",Work:"Work",Public:"Public",Meeting:"Meeting",AVChatRoom:"AVChatRoom",Community:"Community","Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.":"Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.","After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.":"After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.","After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.":"After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.","After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.":"After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.","After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.":"After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.","Participant cannot be empty":"Participant cannot be empty"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Personal information":"Personal information",Signature:"Signature",Gender:"Gender",Male:"Male",Female:"Female",AllowType:"AllowType",NeedConfirm:"NeedConfirm",AllowAny:"AllowAny",DenyAny:"DenyAny",Birthday:"Birthday"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./TUIChat.js";import r from"./TUIConversation.js";import t from"./TUIContact.js";import i from"./TUIProfile.js";var m={TUIChat:o,TUIConversation:r,TUIContact:t,TUIProfile:i};export{m as message};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"../node_modules/i18next/dist/esm/i18next.js";export{default}from"../node_modules/i18next/dist/esm/i18next.js";import"react";import"../node_modules/@babel/runtime/helpers/extends.js";import"../node_modules/html-parse-stringify/dist/html-parse-stringify.js";import"../node_modules/react-i18next/dist/es/context.js";import{initReactI18next as t}from"../node_modules/react-i18next/dist/es/initReactI18next.js";import{message as s}from"./en/index.js";import{message as i}from"./zh_cn/index.js";var n={en:{translation:s},zh:{translation:i}};e.use(t).init({resources:n,lng:"zh",interpolation:{escapeValue:!1}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={Recall:"撤回",Reference:"引用",Forward:"转发",Copy:"复制",Delete:"删除","Forward to":"转发给","recalled a message":"撤回了一条消息","Re-edit":"重新编辑",Resend:"重新发送",You:"您","Recent Chats":"会话","Frequently Contacted":"最近的会话","No Result":"无搜索结果","Search Result":"搜索结果",Image:"图片",Video:"视频",File:"文件","Enter a message":"请输入消息","No More":"没有更多","Error deleting message":"消息删除失败","The message recall exceeded the time limit (default 2 minutes)":"消息已超过 2 分钟","Error revoke Message":"消息撤回失败"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Enter a userID":"请输入用户 ID,回车搜索","Enter the verification info":"请填写验证信息","Request to join":"申请加入",Requested:"已申请",Accept:"接受",Refuse:"拒绝",Handled:"已处理",Friend:"我的好友","Send Message":"发送消息",Signature:"个性签名","Successful application, waiting for the administrator to agree to join the group application":"等待管理员同意","New Contacts":"新的联系人","Blocked List":"黑名单","No Result":"无搜索结果",ID:"ID",User:"联系人","Add Friend":"添加好友",remark:"备注",block:"加入黑名单","Delete friend":"删除好友","waiting for verification":"等待验证","verification info":"验证信息","Send application":"发送申请",Agree:"同意"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Start chat":"发起会话","New one-to-one chat":"发起单聊","New group chat":"发起群聊",Delete:"删除会话",Pin:"置顶会话",Unpin:"取消置顶","Conversation Information":"会话信息",Search:"搜索","Add Participants":"创建群聊","No conversation":"无会话",Next:"下一步","Group Name":"群名称","Group ID":"群 ID","Group Type":"群类型",Participants:"成员",Create:"创建",Details:"详情",Work:"好友工作群(Work)",Public:"陌生人社交群(Public)",Meeting:"临时会议群(Meeting)",AVChatRoom:"直播群(AVChatroom)",Community:"社群(Community)","Users can join the group only via invitation by existing members. The invitation does not need to be agreed by the invitee or approved by the group owner. See the documentation for details.":"类似普通微信群,创建后仅支持已在群内的好友邀请加群,且无需被邀请方同意或群主同意。","After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.":"类似 QQ 群,创建后群主可以指定群管理员,用户搜索群 ID 发起加群申请后,需要群主或管理员审批通过才能入群。","After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.":"创建后可以随意进出,且支持查看入群前消息;适合用于音视频会议场景、在线教育场景等与实时音视频产品结合的场景。","After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.":"创建后可以随意进出,没有群成员数量上限,但不支持历史消息存储;适合与直播产品结合,用于弹幕聊天场景。","After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.":"创建后可以随意进出,最多支持100000人,支持历史消息存储,用户搜索群 ID 发起加群申请后,无需管理员审批即可进群。","Participant cannot be empty":"不能为空"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"Personal information":"个人信息",Signature:"个性签名",Gender:"性别",Male:"男",Female:"女",AllowType:"加好友验证方式",NeedConfirm:"需要验证",AllowAny:"同意任何用户加好友",DenyAny:"拒绝任何用户加好友",Birthday:"生日"};export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./TUIChat.js";import r from"./TUIConversation.js";import t from"./TUIContact.js";import i from"./TUIProfile.js";var m={TUIChat:o,TUIConversation:r,TUIContact:t,TUIProfile:i};export{m as message};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/chat-uikit-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@rollup/plugin-node-resolve": "^14.1.0",
|
|
35
35
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
36
36
|
"@rollup/plugin-url": "^7.0.0",
|
|
37
|
+
"@types/node": "^20.10.5",
|
|
37
38
|
"@types/react": "^18.0.20",
|
|
38
39
|
"@typescript-eslint/eslint-plugin": "^5.36.2",
|
|
39
40
|
"@typescript-eslint/parser": "^5.36.2",
|
|
@@ -59,7 +60,10 @@
|
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
62
|
"date-fns": "^2.29.3",
|
|
63
|
+
"i18next": "^23.7.11",
|
|
62
64
|
"react-date-picker": "^9.0.0",
|
|
65
|
+
"react-dom": "^18.2.0",
|
|
66
|
+
"react-i18next": "^13.5.0",
|
|
63
67
|
"tim-upload-plugin": "^1.0.5"
|
|
64
68
|
},
|
|
65
69
|
"peerDependencies": {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import TencentCloudChat, { Conversation, Profile } from '@tencentcloud/chat';
|
|
3
4
|
import { Input } from '../Input';
|
|
4
5
|
import './styles/ConversationCreatGroupDetail.scss';
|
|
5
6
|
import { Icon, IconTypes } from '../Icon';
|
|
@@ -27,6 +28,7 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
27
28
|
const {
|
|
28
29
|
profileList, pageState, setPageState, createConversation, setConversationCreated,
|
|
29
30
|
} = props;
|
|
31
|
+
const { t } = useTranslation();
|
|
30
32
|
const { setActiveConversation, myProfile } = useTUIKitContext();
|
|
31
33
|
const temp = [...profileList];
|
|
32
34
|
temp.unshift(myProfile);
|
|
@@ -94,7 +96,7 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
94
96
|
border="bottom"
|
|
95
97
|
customClassName="input-group-name"
|
|
96
98
|
clearable
|
|
97
|
-
prefix={<div className="input-group-title">Group Name</div>}
|
|
99
|
+
prefix={<div className="input-group-title">{t('TUIConversation.Group Name')}</div>}
|
|
98
100
|
/>
|
|
99
101
|
</div>
|
|
100
102
|
<div className="create-group-box create-group-id">
|
|
@@ -106,7 +108,7 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
106
108
|
onChange={(e) => {
|
|
107
109
|
groupInfoChange(e, 'id');
|
|
108
110
|
}}
|
|
109
|
-
prefix={<div className="input-group-title">Group ID</div>}
|
|
111
|
+
prefix={<div className="input-group-title">{t('TUIConversation.Group ID')}</div>}
|
|
110
112
|
/>
|
|
111
113
|
</div>
|
|
112
114
|
<div className="create-group-box create-group-type">
|
|
@@ -114,7 +116,7 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
114
116
|
disabled
|
|
115
117
|
border="bottom"
|
|
116
118
|
customClassName="input-group-text"
|
|
117
|
-
prefix={<div className="input-group-title">Group
|
|
119
|
+
prefix={<div className="input-group-title">{t('TUIConversation.Group Type')}</div>}
|
|
118
120
|
suffix={(
|
|
119
121
|
<Icon
|
|
120
122
|
onClick={showGroupTypeInfo}
|
|
@@ -123,17 +125,17 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
123
125
|
height={12}
|
|
124
126
|
/>
|
|
125
127
|
)}
|
|
126
|
-
value={groupType}
|
|
128
|
+
value={t(`TUIConversation.${groupType}`)}
|
|
127
129
|
onChange={(e) => {
|
|
128
130
|
groupInfoChange(e, 'type');
|
|
129
131
|
}}
|
|
130
132
|
/>
|
|
131
133
|
</div>
|
|
132
134
|
<div className="create-group-illustrate">
|
|
133
|
-
{getDes()}
|
|
135
|
+
{t(`TUIConversation.${getDes()}`)}
|
|
134
136
|
</div>
|
|
135
137
|
<div className="create-group-portrait">
|
|
136
|
-
<div className="create-group-portrait-title">Participants</div>
|
|
138
|
+
<div className="create-group-portrait-title">{t('TUIConversation.Participants')}</div>
|
|
137
139
|
<div className="create-group-portrait-info-container">
|
|
138
140
|
{profileList.map(({ avatar, userID, nick }) => (
|
|
139
141
|
<div className="create-group-portrait-info" key={userID}>
|
|
@@ -145,7 +147,7 @@ export function ConversationCreatGroupDetail(props: ConversationCreatGroupDetail
|
|
|
145
147
|
</div>
|
|
146
148
|
</div>
|
|
147
149
|
<div className="tui-conversation-create-next-container">
|
|
148
|
-
<div role="presentation" className="tui-conversation-create-next" onClick={next}>Create</div>
|
|
150
|
+
<div role="presentation" className="tui-conversation-create-next" onClick={next}>{t('TUIConversation.Create')}</div>
|
|
149
151
|
</div>
|
|
150
152
|
</>
|
|
151
153
|
) : (
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useMemo, useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import './styles/index.scss';
|
|
3
4
|
import { Conversation } from '@tencentcloud/chat';
|
|
4
5
|
import { Icon, IconTypes } from '../Icon';
|
|
@@ -19,11 +20,13 @@ export enum PageStateTypes {
|
|
|
19
20
|
}
|
|
20
21
|
export function ConversationCreate<T extends ConversationCreateProps>(props:T) {
|
|
21
22
|
const { className = '', setConversationCreated, conversationList = [] } = props;
|
|
23
|
+
const { t } = useTranslation();
|
|
22
24
|
const [isCreateGroup, setIsCreateGroup] = useState(false);
|
|
23
25
|
const [pageState, setPageState] = useState<PageStateTypes>(PageStateTypes.USER_SELECT);
|
|
24
26
|
const [selectList, setSelectList] = useState([]);
|
|
25
27
|
const { chat } = useTUIKitContext();
|
|
26
28
|
const { createConversation } = useConversation(chat);
|
|
29
|
+
|
|
27
30
|
const back = () => {
|
|
28
31
|
if (isCreateGroup) {
|
|
29
32
|
switch (pageState) {
|
|
@@ -47,7 +50,7 @@ export function ConversationCreate<T extends ConversationCreateProps>(props:T) {
|
|
|
47
50
|
<>
|
|
48
51
|
<div className="tui-conversation-create-header">
|
|
49
52
|
<Icon onClick={back} type={IconTypes.BACK} width={9} height={16} />
|
|
50
|
-
<div className="title">{ !isCreateGroup ? '
|
|
53
|
+
<div className="title">{ t(!isCreateGroup ? 'TUIConversation.Start chat' : 'TUIConversation.Add Participants')}</div>
|
|
51
54
|
</div>
|
|
52
55
|
{pageState === PageStateTypes.USER_SELECT ? (
|
|
53
56
|
<ConversationCreateUserSelectList
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { useRef, useState } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import { Conversation } from '@tencentcloud/chat';
|
|
3
4
|
import { Input } from '../Input';
|
|
4
5
|
import { Icon, IconTypes } from '../Icon';
|
|
@@ -29,6 +30,7 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
29
30
|
setConversationCreated,
|
|
30
31
|
setPageState,
|
|
31
32
|
} = props;
|
|
33
|
+
const { t } = useTranslation();
|
|
32
34
|
const [searchValue, setSearchValue] = useState('');
|
|
33
35
|
const { chat, setActiveConversation } = useTUIKitContext();
|
|
34
36
|
const [friendList, setFriendList] = useState({});
|
|
@@ -81,7 +83,7 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
81
83
|
};
|
|
82
84
|
const next = () => {
|
|
83
85
|
if (selectList && selectList.length === 0) {
|
|
84
|
-
Toast({ text: 'Participant cannot be empty
|
|
86
|
+
Toast({ text: t('TUIConversation.Participant cannot be empty'), type: 'error' });
|
|
85
87
|
return;
|
|
86
88
|
}
|
|
87
89
|
setPageState(PageStateTypes.CREATE_DETAIL);
|
|
@@ -90,7 +92,7 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
90
92
|
<>
|
|
91
93
|
<Input
|
|
92
94
|
className="tui-conversation-create-search-input"
|
|
93
|
-
placeholder=
|
|
95
|
+
placeholder={t('TUIConversation.Search')}
|
|
94
96
|
clearable
|
|
95
97
|
value={searchValue}
|
|
96
98
|
onChange={searchValueChange}
|
|
@@ -102,7 +104,7 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
102
104
|
{!isCreateGroup && (
|
|
103
105
|
<div role="presentation" className="tui-user" onClick={createGroup}>
|
|
104
106
|
<Icon type={IconTypes.ADD} />
|
|
105
|
-
<div className="tui-user-name active">New
|
|
107
|
+
<div className="tui-user-name active">{t('TUIConversation.New group chat')}</div>
|
|
106
108
|
</div>
|
|
107
109
|
)}
|
|
108
110
|
<div className={`tui-conversation-create ${className}`}>
|
|
@@ -150,7 +152,7 @@ export function ConversationCreateUserSelectList(props: ConversationCreateUserSe
|
|
|
150
152
|
</div>
|
|
151
153
|
{isCreateGroup && (
|
|
152
154
|
<div className="tui-conversation-create-next-container">
|
|
153
|
-
<div role="presentation" className="tui-conversation-create-next" onClick={next}>Next</div>
|
|
155
|
+
<div role="presentation" className="tui-conversation-create-next" onClick={next}>{t('TUIConversation.Next')}</div>
|
|
154
156
|
</div>
|
|
155
157
|
)}
|
|
156
158
|
</>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
2
3
|
import './styles/conversationGroupTypeInfo.scss';
|
|
3
4
|
import TencentCloudChat from '@tencentcloud/chat';
|
|
4
5
|
import { PageStateTypes } from './ConversationCreate';
|
|
@@ -9,6 +10,7 @@ export enum GroupType {
|
|
|
9
10
|
Public= TencentCloudChat.TYPES.GRP_PUBLIC,
|
|
10
11
|
Meeting= TencentCloudChat.TYPES.GRP_MEETING,
|
|
11
12
|
AVChatRoom= TencentCloudChat.TYPES.GRP_AVCHATROOM,
|
|
13
|
+
Community = TencentCloudChat.TYPES.GRP_COMMUNITY,
|
|
12
14
|
}
|
|
13
15
|
export interface ConversationGroupTypeInfoProps {
|
|
14
16
|
groupType: string,
|
|
@@ -20,10 +22,12 @@ export const typeInfoList = [
|
|
|
20
22
|
{ type: 'Public', des: 'After a public group is created, the group owner can designate group admins. To join the group, a user needs to search the group ID and send a request, which needs to be approved by the group owner or an admin before the user can join the group. See the documentation for details.' },
|
|
21
23
|
{ type: 'Meeting', des: 'After the group is created, a user can join and quit the group freely and can view the messages sent before joining the group. It is suitable for scenarios that integrate Tencent Real-Time Communication (TRTC), such as audio and video conferences and online education. See the documentation for details.' },
|
|
22
24
|
{ type: 'AVChatRoom', des: 'After a group is created, a user can join and quit the group freely. The group can have an unlimited number of members, but it does not store message history. It can be combined with Live Video Broadcasting (LVB) to support on-screen comment scenarios. See the documentation for details.' },
|
|
25
|
+
{ type: 'Community', des: 'After creation, you can enter and leave at will, support up to 100,000 people, support historical message storage, and after users search for group ID and initiate a group application, they can join the group without administrator approval. See product documentation for details.' },
|
|
23
26
|
];
|
|
24
27
|
export function ConversationGroupTypeInfo(props: ConversationGroupTypeInfoProps) {
|
|
25
28
|
const { groupType, setGroupType, setPageState } = props;
|
|
26
29
|
|
|
30
|
+
const { t } = useTranslation();
|
|
27
31
|
const selectGroupType = (type: string) => {
|
|
28
32
|
setGroupType(type);
|
|
29
33
|
setPageState(PageStateTypes.CREATE_DETAIL);
|
|
@@ -39,12 +43,12 @@ export function ConversationGroupTypeInfo(props: ConversationGroupTypeInfoProps)
|
|
|
39
43
|
>
|
|
40
44
|
<div className="group-type-info-title">
|
|
41
45
|
{type === groupType && <Icon className="box-active-icon" type={IconTypes.RIGHT} width={16} height={16} />}
|
|
42
|
-
{type}
|
|
46
|
+
{t(`TUIConversation.${type}`)}
|
|
43
47
|
</div>
|
|
44
|
-
<div className="group-type-info-description">{des}</div>
|
|
48
|
+
<div className="group-type-info-description">{t(`TUIConversation.${des}`)}</div>
|
|
45
49
|
</div>
|
|
46
50
|
))}
|
|
47
|
-
<a className="group-type-info-document" target="_blank" href="https://www.tencentcloud.com/document/product/1047/33515?lang=en&pg=#group-features" rel="bookmark noreferrer">Details</a>
|
|
51
|
+
<a className="group-type-info-document" target="_blank" href="https://www.tencentcloud.com/document/product/1047/33515?lang=en&pg=#group-features" rel="bookmark noreferrer">{t('TUIConversation.Details')}</a>
|
|
48
52
|
</div>
|
|
49
53
|
);
|
|
50
54
|
}
|