@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.
Files changed (30) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/debug/GenerateTestUserSig-es.js +26 -0
  3. package/debug/lib-generate-test-usersig-es.min.js +2 -0
  4. package/dist/{ChatSetting-79tDbXT3.js → ChatSetting-LYkP2NWu.js} +9516 -8138
  5. package/dist/components/Chat/Chat.js +1 -1
  6. package/dist/components/ChatHeader/ChatHeader.js +1 -1
  7. package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.d.ts +3 -3
  8. package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +2 -2
  9. package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.d.ts +2 -2
  10. package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +37 -37
  11. package/dist/components/IconFont/Icon.js +1 -1
  12. package/dist/components/Modal/Modal.js +1 -1
  13. package/dist/components/PopupNew/Popup.js +1 -1
  14. package/dist/components/Profile/Profile.js +1 -1
  15. package/dist/components/Profile/ProfileDefault.js +1 -1
  16. package/dist/components/Profile/myProfile/MyProfile.js +1 -1
  17. package/dist/constant/avatar.d.ts +2 -1
  18. package/dist/constant/avatar.js +2 -1
  19. package/dist/context/ChatContext.js +1 -1
  20. package/dist/external_modules/{mui-CbGEJVT2.js → mui-BcA3SBHM.js} +1 -1
  21. package/dist/external_modules/{zustand-Dvydplxp.js → zustand-CDmQR4co.js} +7 -7
  22. package/dist/index.js +1510 -1494
  23. package/dist/states/ChatHeaderState.js +20 -22
  24. package/dist/states/UIManagerState.js +1 -1
  25. package/dist/styles/ChatSetting.css +1 -1
  26. package/package.json +3 -3
  27. package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +4 -4
  28. package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +5 -5
  29. package/src/constant/avatar.ts +2 -1
  30. package/src/states/ChatHeaderState.ts +5 -6
@@ -1,14 +1,13 @@
1
1
  import { useMemo as m } from "react";
2
- import { TUIChatEngine as o } from "@tencentcloud/chat-uikit-engine";
3
- import { E as C } from "../ChatSetting-79tDbXT3.js";
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 { defaultUserAvatar as O, defaultGroupAvatarWork as c } from "../constant/avatar.js";
9
- import { useUIManagerState as d } from "./UIManagerState.js";
10
- function G() {
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: u,
20
- groupProfile: i
18
+ remark: p,
19
+ groupProfile: o
21
20
  } = t;
22
- return e === o.TYPES.CONV_C2C ? u || (r == null ? void 0 : r.nick) || (r == null ? void 0 : r.userID) || "" : e === o.TYPES.CONV_GROUP && ((i == null ? void 0 : i.name) || (i == null ? void 0 : i.groupID)) || "";
23
- }, [t, n]), f = m(() => {
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 === o.TYPES.CONV_C2C ? (r == null ? void 0 : r.avatar) || O : e === o.TYPES.CONV_GROUP ? (u == null ? void 0 : u.avatar) || c : "";
32
- }, [t, n]), p = m(() => {
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 !== o.TYPES.CONV_GROUP)
35
- return a == null ? void 0 : a[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
36
- }, [t, a, n]), S = m(() => (t == null ? void 0 : t.type) === o.TYPES.CONV_GROUP, [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: f,
40
- isGroup: S,
37
+ avatar: a,
38
+ isGroup: f,
41
39
  system: n,
42
40
  conversation: t,
43
- userStatus: p
41
+ userStatus: S
44
42
  };
45
43
  }
46
44
  export {
47
- G as useChatHeaderState
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-Dvydplxp.js";
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,