@tencentcloud/chat-uikit-react 3.0.1 → 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/CHANGELOG.md +11 -0
- package/debug/GenerateTestUserSig-es.js +26 -0
- package/debug/lib-generate-test-usersig-es.min.js +2 -0
- package/dist/{ChatSetting-79tDbXT3.js → ChatSetting-LYkP2NWu.js} +9516 -8138
- 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/IconFont/Icon.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/PopupNew/Popup.js +1 -1
- 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/constant/avatar.d.ts +2 -1
- package/dist/constant/avatar.js +2 -1
- package/dist/context/ChatContext.js +1 -1
- 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/index.js +1510 -1494
- package/dist/states/ChatHeaderState.js +20 -22
- package/dist/states/UIManagerState.js +1 -1
- package/dist/styles/ChatSetting.css +1 -1
- package/package.json +3 -3
- package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +4 -4
- package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +5 -5
- package/src/constant/avatar.ts +2 -1
- package/src/states/ChatHeaderState.ts +5 -6
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { useMemo as m } from "react";
|
|
2
|
-
import { TUIChatEngine as
|
|
3
|
-
import { E as C } from "../ChatSetting-
|
|
2
|
+
import { TUIChatEngine as i } from "@tencentcloud/chat-uikit-engine";
|
|
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: a } = d(), { activeConversation: t } = C(), n = t ? t.type === o.TYPES.CONV_SYSTEM : void 0, s = m(() => {
|
|
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:
|
|
20
|
-
groupProfile:
|
|
18
|
+
remark: p,
|
|
19
|
+
groupProfile: o
|
|
21
20
|
} = t;
|
|
22
|
-
return e ===
|
|
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: u
|
|
27
|
+
userProfile: r
|
|
30
28
|
} = t;
|
|
31
|
-
return e ===
|
|
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
|
-
if (t && !n && t.type !==
|
|
35
|
-
return
|
|
36
|
-
}, [t,
|
|
32
|
+
if (t && !n && t.type !== i.TYPES.CONV_GROUP)
|
|
33
|
+
return u == null ? void 0 : u[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
|
|
34
|
+
}, [t, u, n]), f = m(() => (t == null ? void 0 : t.type) === i.TYPES.CONV_GROUP, [t]);
|
|
37
35
|
return {
|
|
38
36
|
title: s,
|
|
39
|
-
avatar:
|
|
40
|
-
isGroup:
|
|
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
|
};
|
|
@@ -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,
|