@tencentcloud/chat-uikit-react 3.0.2 → 3.0.3
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/debug/GenerateTestUserSig-es.js +26 -0
- package/debug/lib-generate-test-usersig-es.min.js +2 -0
- package/dist/{ChatSetting-BtQwjHr0.js → ChatSetting-LYkP2NWu.js} +9562 -8197
- package/dist/components/Chat/Chat.js +1 -1
- package/dist/components/ChatHeader/ChatHeader.js +1 -1
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.d.ts +3 -3
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +2 -2
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.d.ts +2 -2
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +37 -37
- package/dist/components/Profile/Profile.js +1 -1
- package/dist/components/Profile/ProfileDefault.js +1 -1
- package/dist/components/Profile/myProfile/MyProfile.js +1 -1
- package/dist/context/ChatContext.js +1 -1
- package/dist/index.js +611 -607
- package/dist/states/ChatHeaderState.js +18 -20
- package/dist/styles/ChatSetting.css +1 -1
- package/package.json +2 -2
- package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +4 -4
- package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +5 -5
- package/src/states/ChatHeaderState.ts +4 -5
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { useMemo as
|
|
1
|
+
import { useMemo as m } from "react";
|
|
2
2
|
import { TUIChatEngine as i } from "@tencentcloud/chat-uikit-engine";
|
|
3
|
-
import { E as
|
|
3
|
+
import { E as C } from "../ChatSetting-LYkP2NWu.js";
|
|
4
4
|
import "@tencentcloud/uikit-base-component-react";
|
|
5
5
|
import "@tencentcloud/tui-core";
|
|
6
6
|
import "react/jsx-runtime";
|
|
7
7
|
import "@tencentcloud/chat";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const { userStatusMap: u } = T(), { activeConversation: t } = p(), n = t ? t.type === i.TYPES.CONV_SYSTEM : void 0, a = s(() => {
|
|
8
|
+
import { useUIManagerState as O } from "./UIManagerState.js";
|
|
9
|
+
function d() {
|
|
10
|
+
const { userStatusMap: u } = O(), { activeConversation: t } = C(), n = t ? t.type === i.TYPES.CONV_SYSTEM : void 0, s = m(() => {
|
|
12
11
|
if (!t)
|
|
13
12
|
return;
|
|
14
13
|
if (n)
|
|
@@ -16,33 +15,32 @@ function G() {
|
|
|
16
15
|
const {
|
|
17
16
|
type: e,
|
|
18
17
|
userProfile: r,
|
|
19
|
-
remark:
|
|
18
|
+
remark: p,
|
|
20
19
|
groupProfile: o
|
|
21
20
|
} = t;
|
|
22
|
-
return e === i.TYPES.CONV_C2C ?
|
|
23
|
-
}, [t, n]),
|
|
21
|
+
return e === i.TYPES.CONV_C2C ? p || (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)) || "";
|
|
22
|
+
}, [t, n]), a = m(() => {
|
|
24
23
|
if (!t || n)
|
|
25
|
-
return;
|
|
24
|
+
return "";
|
|
26
25
|
const {
|
|
27
26
|
type: e,
|
|
28
|
-
userProfile: r
|
|
29
|
-
groupProfile: m
|
|
27
|
+
userProfile: r
|
|
30
28
|
} = t;
|
|
31
|
-
return e === i.TYPES.CONV_C2C ?
|
|
32
|
-
}, [t, n]),
|
|
29
|
+
return e === i.TYPES.CONV_C2C ? r == null ? void 0 : r.avatar : e === i.TYPES.CONV_GROUP ? t.getAvatar() : "";
|
|
30
|
+
}, [t, n]), S = m(() => {
|
|
33
31
|
var e;
|
|
34
32
|
if (t && !n && t.type !== i.TYPES.CONV_GROUP)
|
|
35
33
|
return u == null ? void 0 : u[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
|
|
36
|
-
}, [t, u, n]),
|
|
34
|
+
}, [t, u, n]), f = m(() => (t == null ? void 0 : t.type) === i.TYPES.CONV_GROUP, [t]);
|
|
37
35
|
return {
|
|
38
|
-
title:
|
|
39
|
-
avatar:
|
|
40
|
-
isGroup:
|
|
36
|
+
title: s,
|
|
37
|
+
avatar: a,
|
|
38
|
+
isGroup: f,
|
|
41
39
|
system: n,
|
|
42
40
|
conversation: t,
|
|
43
|
-
userStatus:
|
|
41
|
+
userStatus: S
|
|
44
42
|
};
|
|
45
43
|
}
|
|
46
44
|
export {
|
|
47
|
-
|
|
45
|
+
d as useChatHeaderState
|
|
48
46
|
};
|