@tencentcloud/chat-uikit-react 3.0.0 → 3.0.2
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 +17 -1
- package/README.md +8 -8
- package/dist/{ChatSetting-C7QlwAiq.js → ChatSetting-BtQwjHr0.js} +4996 -4920
- package/dist/components/Chat/Chat.js +10 -9
- package/dist/components/ChatHeader/ChatHeader.js +12 -11
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +10 -9
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +10 -9
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/IconFont/Icon.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Model/index.js +1 -1
- package/dist/components/Plugins/index.js +1 -1
- package/dist/components/Popup/index.js +1 -1
- package/dist/components/PopupNew/Popup.js +1 -1
- package/dist/components/Profile/Profile.d.ts +1 -1
- package/dist/components/Profile/Profile.js +16 -16
- package/dist/components/Profile/ProfileDefault.js +39 -39
- package/dist/components/Profile/myProfile/MyProfile.js +10 -9
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +25 -33
- package/dist/constant/avatar.d.ts +2 -1
- package/dist/constant/avatar.js +2 -1
- package/dist/context/ChatContext.js +6 -5
- package/dist/external_modules/{mui-CbGEJVT2.js → mui-BcA3SBHM.js} +1 -1
- package/dist/external_modules/{zustand-Dvydplxp.js → zustand-CDmQR4co.js} +7 -7
- package/dist/hooks/index.js +0 -1
- package/dist/index.js +2950 -1530
- package/dist/locales/en-US/TUIContact.d.ts +44 -0
- package/dist/locales/en-US/TUIContact.js +46 -1
- package/dist/locales/en-US/index.d.ts +44 -0
- package/dist/locales/ja-JP/TUIContact.d.ts +44 -0
- package/dist/locales/ja-JP/TUIContact.js +46 -1
- package/dist/locales/ja-JP/index.d.ts +44 -0
- package/dist/locales/ko-KR/TUIContact.d.ts +44 -0
- package/dist/locales/ko-KR/TUIContact.js +46 -1
- package/dist/locales/ko-KR/index.d.ts +44 -0
- package/dist/locales/zh-CN/TUIContact.d.ts +44 -0
- package/dist/locales/zh-CN/TUIContact.js +46 -1
- package/dist/locales/zh-CN/index.d.ts +44 -0
- package/dist/locales/zh-TW/TUIContact.d.ts +44 -0
- package/dist/locales/zh-TW/TUIContact.js +46 -1
- package/dist/locales/zh-TW/index.d.ts +44 -0
- package/dist/states/ChatHeaderState.js +23 -22
- package/dist/states/UIManagerState.js +1 -1
- package/dist/styles/ChatSetting.css +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/styles/index2.css +1 -1
- package/dist/styles/index3.css +1 -1
- package/dist/styles/index4.css +1 -1
- package/dist/styles/index5.css +1 -1
- package/package.json +3 -3
- package/src/components/Profile/Profile.tsx +20 -17
- package/src/components/Profile/ProfileDefault.tsx +4 -6
- package/src/components/index.ts +0 -1
- package/src/constant/avatar.ts +2 -1
- package/src/hooks/index.ts +0 -2
- package/src/locales/en-US/TUIContact.ts +45 -0
- package/src/locales/ja-JP/TUIContact.ts +45 -0
- package/src/locales/ko-KR/TUIContact.ts +45 -0
- package/src/locales/zh-CN/TUIContact.ts +45 -0
- package/src/locales/zh-TW/TUIContact.ts +46 -0
- package/src/states/ChatHeaderState.ts +2 -2
- package/dist/components/Contact/Contact.d.ts +0 -3
- package/dist/components/Contact/Contact.js +0 -81
- package/dist/components/Contact/ContactInfo/ContactInfo.d.ts +0 -8
- package/dist/components/Contact/ContactInfo/ContactInfo.js +0 -27
- package/dist/components/Contact/ContactInfo/addFriendInfo.d.ts +0 -8
- package/dist/components/Contact/ContactInfo/addFriendInfo.js +0 -61
- package/dist/components/Contact/ContactInfo/basicInfo.d.ts +0 -8
- package/dist/components/Contact/ContactInfo/basicInfo.js +0 -48
- package/dist/components/Contact/ContactInfo/blockInfo.d.ts +0 -8
- package/dist/components/Contact/ContactInfo/blockInfo.js +0 -33
- package/dist/components/Contact/ContactInfo/friendApplication.d.ts +0 -8
- package/dist/components/Contact/ContactInfo/friendApplication.js +0 -47
- package/dist/components/Contact/ContactInfo/friendInfo.d.ts +0 -9
- package/dist/components/Contact/ContactInfo/friendInfo.js +0 -83
- package/dist/components/Contact/ContactInfo/groupInfo.d.ts +0 -9
- package/dist/components/Contact/ContactInfo/groupInfo.js +0 -45
- package/dist/components/Contact/ContactInfo/hooks/useContactInfo.d.ts +0 -11
- package/dist/components/Contact/ContactInfo/hooks/useContactInfo.js +0 -84
- package/dist/components/Contact/ContactList/ContactList.d.ts +0 -4
- package/dist/components/Contact/ContactList/ContactList.js +0 -152
- package/dist/components/Contact/hooks/useTUIContact.d.ts +0 -12
- package/dist/components/Contact/hooks/useTUIContact.js +0 -58
- package/dist/components/Contact/index.d.ts +0 -3
- package/dist/components/Contact/index.js +0 -10
- package/dist/components/ContactSearch/ContactSearch.d.ts +0 -3
- package/dist/components/ContactSearch/ContactSearch.js +0 -85
- package/dist/components/ContactSearch/hooks/useContactSearch.d.ts +0 -6
- package/dist/components/ContactSearch/hooks/useContactSearch.js +0 -28
- package/dist/styles/ContactInfo.css +0 -1
- package/dist/styles/ContactList.css +0 -1
- package/dist/styles/ContactSearch.css +0 -1
- package/dist/styles/index6.css +0 -1
- package/src/components/Contact/Contact.tsx +0 -97
- package/src/components/Contact/ContactInfo/ContactInfo.tsx +0 -36
- package/src/components/Contact/ContactInfo/addFriendInfo.tsx +0 -88
- package/src/components/Contact/ContactInfo/basicInfo.tsx +0 -52
- package/src/components/Contact/ContactInfo/blockInfo.tsx +0 -45
- package/src/components/Contact/ContactInfo/friendApplication.tsx +0 -68
- package/src/components/Contact/ContactInfo/friendInfo.tsx +0 -101
- package/src/components/Contact/ContactInfo/groupInfo.tsx +0 -62
- package/src/components/Contact/ContactInfo/hooks/useContactInfo.tsx +0 -101
- package/src/components/Contact/ContactInfo/index.scss +0 -136
- package/src/components/Contact/ContactList/ContactList.tsx +0 -174
- package/src/components/Contact/ContactList/index.scss +0 -111
- package/src/components/Contact/hooks/useTUIContact.tsx +0 -88
- package/src/components/Contact/index.scss +0 -91
- package/src/components/Contact/index.ts +0 -3
- package/src/components/ContactSearch/ContactSearch.tsx +0 -102
- package/src/components/ContactSearch/hooks/useContactSearch.tsx +0 -31
- package/src/components/ContactSearch/index.scss +0 -33
|
@@ -23,7 +23,52 @@ const e = {
|
|
|
23
23
|
"waiting for verification": "等待驗證",
|
|
24
24
|
"verification info": "驗證信息",
|
|
25
25
|
"Send application": "發送申請",
|
|
26
|
-
Agree: "同意"
|
|
26
|
+
Agree: "同意",
|
|
27
|
+
// ContactList component translations
|
|
28
|
+
"New contacts": "新的聯繫人",
|
|
29
|
+
"Group applications": "群組申請",
|
|
30
|
+
"My friends": "我的好友",
|
|
31
|
+
"My groups": "我的群組",
|
|
32
|
+
Blacklist: "黑名單",
|
|
33
|
+
"Search contacts": "搜索聯繫人",
|
|
34
|
+
"No contacts": "暫無聯繫人",
|
|
35
|
+
Cancel: "取消",
|
|
36
|
+
"Add friend/group": "添加好友/群聊",
|
|
37
|
+
"Unknown contact type": "未知聯繫人類型",
|
|
38
|
+
"Request to add you as friend": "請求添加您為好友",
|
|
39
|
+
"Apply to join group": "申請加入群組",
|
|
40
|
+
"Invite you to join group": "邀請您加入群組",
|
|
41
|
+
"Application status": "申請狀態",
|
|
42
|
+
Pending: "待處理",
|
|
43
|
+
"Application note": "申請備註",
|
|
44
|
+
None: "無",
|
|
45
|
+
"Verification info": "驗證信息",
|
|
46
|
+
"Personal signature": "個性簽名",
|
|
47
|
+
"Remark name": "備註名",
|
|
48
|
+
Save: "保存",
|
|
49
|
+
"Add to blacklist": "加入黑名單",
|
|
50
|
+
"Send message": "發送消息",
|
|
51
|
+
"Apply to add friend": "申請添加好友",
|
|
52
|
+
"Add friend failed": "添加好友失敗",
|
|
53
|
+
"User is already your friend": "該用戶已經是您的好友",
|
|
54
|
+
"Friend request sent, waiting for confirmation": "好友申請已發送,等待對方確認",
|
|
55
|
+
"Application info": "申請信息",
|
|
56
|
+
"Please enter application info...": "請輸入申請信息...",
|
|
57
|
+
"Group ID": "群ID",
|
|
58
|
+
"Group type": "群類型",
|
|
59
|
+
"Group introduction": "群介紹",
|
|
60
|
+
"No introduction": "暫無介紹",
|
|
61
|
+
"Work group": "工作群",
|
|
62
|
+
"Public group": "公開群",
|
|
63
|
+
"Meeting group": "會議群",
|
|
64
|
+
"Live group": "直播群",
|
|
65
|
+
Community: "社群",
|
|
66
|
+
Unknown: "未知",
|
|
67
|
+
"You are already in this group": "您已經在該群組中",
|
|
68
|
+
"Group application sent, waiting for admin approval": "入群申請已發送,等待管理員審核",
|
|
69
|
+
"Apply to join group failed": "申請加入群組失敗",
|
|
70
|
+
"Remove from blacklist": "移出黑名單",
|
|
71
|
+
"Enter group chat": "進入群聊"
|
|
27
72
|
};
|
|
28
73
|
export {
|
|
29
74
|
e as default
|
|
@@ -184,6 +184,50 @@ export declare const message: {
|
|
|
184
184
|
'verification info': string;
|
|
185
185
|
'Send application': string;
|
|
186
186
|
Agree: string;
|
|
187
|
+
'New contacts': string;
|
|
188
|
+
'Group applications': string;
|
|
189
|
+
'My friends': string;
|
|
190
|
+
'My groups': string;
|
|
191
|
+
Blacklist: string;
|
|
192
|
+
'Search contacts': string;
|
|
193
|
+
'No contacts': string;
|
|
194
|
+
Cancel: string;
|
|
195
|
+
'Add friend/group': string;
|
|
196
|
+
'Unknown contact type': string;
|
|
197
|
+
'Request to add you as friend': string;
|
|
198
|
+
'Apply to join group': string;
|
|
199
|
+
'Invite you to join group': string;
|
|
200
|
+
'Application status': string;
|
|
201
|
+
Pending: string;
|
|
202
|
+
'Application note': string;
|
|
203
|
+
None: string;
|
|
204
|
+
'Verification info': string;
|
|
205
|
+
'Personal signature': string;
|
|
206
|
+
'Remark name': string;
|
|
207
|
+
Save: string;
|
|
208
|
+
'Add to blacklist': string;
|
|
209
|
+
'Send message': string;
|
|
210
|
+
'Apply to add friend': string;
|
|
211
|
+
'Add friend failed': string;
|
|
212
|
+
'User is already your friend': string;
|
|
213
|
+
'Friend request sent, waiting for confirmation': string;
|
|
214
|
+
'Application info': string;
|
|
215
|
+
'Please enter application info...': string;
|
|
216
|
+
'Group ID': string;
|
|
217
|
+
'Group type': string;
|
|
218
|
+
'Group introduction': string;
|
|
219
|
+
'No introduction': string;
|
|
220
|
+
'Work group': string;
|
|
221
|
+
'Public group': string;
|
|
222
|
+
'Meeting group': string;
|
|
223
|
+
'Live group': string;
|
|
224
|
+
Community: string;
|
|
225
|
+
Unknown: string;
|
|
226
|
+
'You are already in this group': string;
|
|
227
|
+
'Group application sent, waiting for admin approval': string;
|
|
228
|
+
'Apply to join group failed': string;
|
|
229
|
+
'Remove from blacklist': string;
|
|
230
|
+
'Enter group chat': string;
|
|
187
231
|
};
|
|
188
232
|
TUIProfile: {
|
|
189
233
|
'Personal information': string;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { TUIChatEngine as
|
|
3
|
-
import { E as
|
|
1
|
+
import { useMemo as s } from "react";
|
|
2
|
+
import { TUIChatEngine as i } from "@tencentcloud/chat-uikit-engine";
|
|
3
|
+
import { E as p } from "../ChatSetting-BtQwjHr0.js";
|
|
4
4
|
import "@tencentcloud/uikit-base-component-react";
|
|
5
5
|
import "@tencentcloud/tui-core";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import "@tencentcloud/chat";
|
|
8
|
+
import { defaultUserAvatar as C, DEFAULT_GROUP_COMMON_AVATAR as E } from "../constant/avatar.js";
|
|
9
|
+
import { useUIManagerState as T } from "./UIManagerState.js";
|
|
10
|
+
function G() {
|
|
11
|
+
const { userStatusMap: u } = T(), { activeConversation: t } = p(), n = t ? t.type === i.TYPES.CONV_SYSTEM : void 0, a = s(() => {
|
|
11
12
|
if (!t)
|
|
12
13
|
return;
|
|
13
14
|
if (n)
|
|
@@ -15,33 +16,33 @@ function _() {
|
|
|
15
16
|
const {
|
|
16
17
|
type: e,
|
|
17
18
|
userProfile: r,
|
|
18
|
-
remark:
|
|
19
|
-
groupProfile:
|
|
19
|
+
remark: m,
|
|
20
|
+
groupProfile: o
|
|
20
21
|
} = t;
|
|
21
|
-
return e ===
|
|
22
|
-
}, [t, n]),
|
|
22
|
+
return e === i.TYPES.CONV_C2C ? m || (r == null ? void 0 : r.nick) || (r == null ? void 0 : r.userID) || "" : e === i.TYPES.CONV_GROUP && ((o == null ? void 0 : o.name) || (o == null ? void 0 : o.groupID)) || "";
|
|
23
|
+
}, [t, n]), O = s(() => {
|
|
23
24
|
if (!t || n)
|
|
24
25
|
return;
|
|
25
26
|
const {
|
|
26
27
|
type: e,
|
|
27
28
|
userProfile: r,
|
|
28
|
-
groupProfile:
|
|
29
|
+
groupProfile: m
|
|
29
30
|
} = t;
|
|
30
|
-
return e ===
|
|
31
|
-
}, [t, n]),
|
|
31
|
+
return e === i.TYPES.CONV_C2C ? (r == null ? void 0 : r.avatar) || C : e === i.TYPES.CONV_GROUP ? (m == null ? void 0 : m.avatar) || E : "";
|
|
32
|
+
}, [t, n]), f = s(() => {
|
|
32
33
|
var e;
|
|
33
|
-
if (t && !n && t.type !==
|
|
34
|
-
return
|
|
35
|
-
}, [t,
|
|
34
|
+
if (t && !n && t.type !== i.TYPES.CONV_GROUP)
|
|
35
|
+
return u == null ? void 0 : u[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
|
|
36
|
+
}, [t, u, n]), S = s(() => (t == null ? void 0 : t.type) === i.TYPES.CONV_GROUP, [t]);
|
|
36
37
|
return {
|
|
37
|
-
title:
|
|
38
|
-
avatar:
|
|
39
|
-
isGroup:
|
|
38
|
+
title: a,
|
|
39
|
+
avatar: O,
|
|
40
|
+
isGroup: S,
|
|
40
41
|
system: n,
|
|
41
42
|
conversation: t,
|
|
42
|
-
userStatus:
|
|
43
|
+
userStatus: f
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
G as useChatHeaderState
|
|
47
48
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TUIStore as a, StoreName as i, TUIConversationService as r } from "@tencentcloud/chat-uikit-engine";
|
|
2
2
|
import { TUILogin as s } from "@tencentcloud/tui-core";
|
|
3
|
-
import { c, u as n } from "../external_modules/zustand-
|
|
3
|
+
import { c, u as n } from "../external_modules/zustand-CDmQR4co.js";
|
|
4
4
|
const o = c()((e) => ({
|
|
5
5
|
chat: null,
|
|
6
6
|
myProfile: void 0,
|