@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.
Files changed (112) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +8 -8
  3. package/dist/{ChatSetting-C7QlwAiq.js → ChatSetting-BtQwjHr0.js} +4996 -4920
  4. package/dist/components/Chat/Chat.js +10 -9
  5. package/dist/components/ChatHeader/ChatHeader.js +12 -11
  6. package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +10 -9
  7. package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +10 -9
  8. package/dist/components/Checkbox/index.js +1 -1
  9. package/dist/components/IconFont/Icon.js +1 -1
  10. package/dist/components/Modal/Modal.js +1 -1
  11. package/dist/components/Model/index.js +1 -1
  12. package/dist/components/Plugins/index.js +1 -1
  13. package/dist/components/Popup/index.js +1 -1
  14. package/dist/components/PopupNew/Popup.js +1 -1
  15. package/dist/components/Profile/Profile.d.ts +1 -1
  16. package/dist/components/Profile/Profile.js +16 -16
  17. package/dist/components/Profile/ProfileDefault.js +39 -39
  18. package/dist/components/Profile/myProfile/MyProfile.js +10 -9
  19. package/dist/components/index.d.ts +0 -1
  20. package/dist/components/index.js +25 -33
  21. package/dist/constant/avatar.d.ts +2 -1
  22. package/dist/constant/avatar.js +2 -1
  23. package/dist/context/ChatContext.js +6 -5
  24. package/dist/external_modules/{mui-CbGEJVT2.js → mui-BcA3SBHM.js} +1 -1
  25. package/dist/external_modules/{zustand-Dvydplxp.js → zustand-CDmQR4co.js} +7 -7
  26. package/dist/hooks/index.js +0 -1
  27. package/dist/index.js +2950 -1530
  28. package/dist/locales/en-US/TUIContact.d.ts +44 -0
  29. package/dist/locales/en-US/TUIContact.js +46 -1
  30. package/dist/locales/en-US/index.d.ts +44 -0
  31. package/dist/locales/ja-JP/TUIContact.d.ts +44 -0
  32. package/dist/locales/ja-JP/TUIContact.js +46 -1
  33. package/dist/locales/ja-JP/index.d.ts +44 -0
  34. package/dist/locales/ko-KR/TUIContact.d.ts +44 -0
  35. package/dist/locales/ko-KR/TUIContact.js +46 -1
  36. package/dist/locales/ko-KR/index.d.ts +44 -0
  37. package/dist/locales/zh-CN/TUIContact.d.ts +44 -0
  38. package/dist/locales/zh-CN/TUIContact.js +46 -1
  39. package/dist/locales/zh-CN/index.d.ts +44 -0
  40. package/dist/locales/zh-TW/TUIContact.d.ts +44 -0
  41. package/dist/locales/zh-TW/TUIContact.js +46 -1
  42. package/dist/locales/zh-TW/index.d.ts +44 -0
  43. package/dist/states/ChatHeaderState.js +23 -22
  44. package/dist/states/UIManagerState.js +1 -1
  45. package/dist/styles/ChatSetting.css +1 -1
  46. package/dist/styles/index.css +1 -1
  47. package/dist/styles/index2.css +1 -1
  48. package/dist/styles/index3.css +1 -1
  49. package/dist/styles/index4.css +1 -1
  50. package/dist/styles/index5.css +1 -1
  51. package/package.json +3 -3
  52. package/src/components/Profile/Profile.tsx +20 -17
  53. package/src/components/Profile/ProfileDefault.tsx +4 -6
  54. package/src/components/index.ts +0 -1
  55. package/src/constant/avatar.ts +2 -1
  56. package/src/hooks/index.ts +0 -2
  57. package/src/locales/en-US/TUIContact.ts +45 -0
  58. package/src/locales/ja-JP/TUIContact.ts +45 -0
  59. package/src/locales/ko-KR/TUIContact.ts +45 -0
  60. package/src/locales/zh-CN/TUIContact.ts +45 -0
  61. package/src/locales/zh-TW/TUIContact.ts +46 -0
  62. package/src/states/ChatHeaderState.ts +2 -2
  63. package/dist/components/Contact/Contact.d.ts +0 -3
  64. package/dist/components/Contact/Contact.js +0 -81
  65. package/dist/components/Contact/ContactInfo/ContactInfo.d.ts +0 -8
  66. package/dist/components/Contact/ContactInfo/ContactInfo.js +0 -27
  67. package/dist/components/Contact/ContactInfo/addFriendInfo.d.ts +0 -8
  68. package/dist/components/Contact/ContactInfo/addFriendInfo.js +0 -61
  69. package/dist/components/Contact/ContactInfo/basicInfo.d.ts +0 -8
  70. package/dist/components/Contact/ContactInfo/basicInfo.js +0 -48
  71. package/dist/components/Contact/ContactInfo/blockInfo.d.ts +0 -8
  72. package/dist/components/Contact/ContactInfo/blockInfo.js +0 -33
  73. package/dist/components/Contact/ContactInfo/friendApplication.d.ts +0 -8
  74. package/dist/components/Contact/ContactInfo/friendApplication.js +0 -47
  75. package/dist/components/Contact/ContactInfo/friendInfo.d.ts +0 -9
  76. package/dist/components/Contact/ContactInfo/friendInfo.js +0 -83
  77. package/dist/components/Contact/ContactInfo/groupInfo.d.ts +0 -9
  78. package/dist/components/Contact/ContactInfo/groupInfo.js +0 -45
  79. package/dist/components/Contact/ContactInfo/hooks/useContactInfo.d.ts +0 -11
  80. package/dist/components/Contact/ContactInfo/hooks/useContactInfo.js +0 -84
  81. package/dist/components/Contact/ContactList/ContactList.d.ts +0 -4
  82. package/dist/components/Contact/ContactList/ContactList.js +0 -152
  83. package/dist/components/Contact/hooks/useTUIContact.d.ts +0 -12
  84. package/dist/components/Contact/hooks/useTUIContact.js +0 -58
  85. package/dist/components/Contact/index.d.ts +0 -3
  86. package/dist/components/Contact/index.js +0 -10
  87. package/dist/components/ContactSearch/ContactSearch.d.ts +0 -3
  88. package/dist/components/ContactSearch/ContactSearch.js +0 -85
  89. package/dist/components/ContactSearch/hooks/useContactSearch.d.ts +0 -6
  90. package/dist/components/ContactSearch/hooks/useContactSearch.js +0 -28
  91. package/dist/styles/ContactInfo.css +0 -1
  92. package/dist/styles/ContactList.css +0 -1
  93. package/dist/styles/ContactSearch.css +0 -1
  94. package/dist/styles/index6.css +0 -1
  95. package/src/components/Contact/Contact.tsx +0 -97
  96. package/src/components/Contact/ContactInfo/ContactInfo.tsx +0 -36
  97. package/src/components/Contact/ContactInfo/addFriendInfo.tsx +0 -88
  98. package/src/components/Contact/ContactInfo/basicInfo.tsx +0 -52
  99. package/src/components/Contact/ContactInfo/blockInfo.tsx +0 -45
  100. package/src/components/Contact/ContactInfo/friendApplication.tsx +0 -68
  101. package/src/components/Contact/ContactInfo/friendInfo.tsx +0 -101
  102. package/src/components/Contact/ContactInfo/groupInfo.tsx +0 -62
  103. package/src/components/Contact/ContactInfo/hooks/useContactInfo.tsx +0 -101
  104. package/src/components/Contact/ContactInfo/index.scss +0 -136
  105. package/src/components/Contact/ContactList/ContactList.tsx +0 -174
  106. package/src/components/Contact/ContactList/index.scss +0 -111
  107. package/src/components/Contact/hooks/useTUIContact.tsx +0 -88
  108. package/src/components/Contact/index.scss +0 -91
  109. package/src/components/Contact/index.ts +0 -3
  110. package/src/components/ContactSearch/ContactSearch.tsx +0 -102
  111. package/src/components/ContactSearch/hooks/useContactSearch.tsx +0 -31
  112. package/src/components/ContactSearch/index.scss +0 -33
@@ -1,39 +1,31 @@
1
- import { ChatHeader as r } from "./ChatHeader/ChatHeader.js";
2
- import { ChatHeaderActions as f } from "./ChatHeader/ChatHeaderActions/ChatHeaderActions.js";
1
+ import { ChatHeader as e } from "./ChatHeader/ChatHeader.js";
2
+ import { ChatHeaderActions as p } from "./ChatHeader/ChatHeaderActions/ChatHeaderActions.js";
3
3
  import { Chat as m } from "./Chat/Chat.js";
4
4
  import { Checkbox as a } from "./Checkbox/index.js";
5
- import { ContactList as c } from "./Contact/ContactList/ContactList.js";
6
- import { ContactInfo as C, UnMemoizedContactInfo as d } from "./Contact/ContactInfo/ContactInfo.js";
7
- import { Contact as I, UnMemoizedContact as l } from "./Contact/Contact.js";
8
- import { DivWithEdit as P } from "./DivWithEdit/DivWithEdit.js";
9
- import { EmptyStateIndicator as u } from "./EmptyStateIndicator/EmptyStateIndicator.js";
10
- import { Icon as M, changeTypeToIconClassName as U } from "./Icon/Icon.js";
11
- import { IconTypes as z } from "./Icon/type.js";
12
- import { Model as E } from "./Model/index.js";
13
- import { Plugins as S } from "./Plugins/index.js";
14
- import { Popup as k } from "./Popup/index.js";
15
- import { Profile as w } from "./Profile/Profile.js";
16
- import { TUIProfileDefault as L } from "./Profile/ProfileDefault.js";
17
- import { Switch as W } from "./Switch/Switch.js";
5
+ import { DivWithEdit as c } from "./DivWithEdit/DivWithEdit.js";
6
+ import { EmptyStateIndicator as n } from "./EmptyStateIndicator/EmptyStateIndicator.js";
7
+ import { Icon as d, changeTypeToIconClassName as s } from "./Icon/Icon.js";
8
+ import { IconTypes as I } from "./Icon/type.js";
9
+ import { Model as T } from "./Model/index.js";
10
+ import { Plugins as y } from "./Plugins/index.js";
11
+ import { Popup as D } from "./Popup/index.js";
12
+ import { Profile as H } from "./Profile/Profile.js";
13
+ import { TUIProfileDefault as b } from "./Profile/ProfileDefault.js";
14
+ import { Switch as v } from "./Switch/Switch.js";
18
15
  export {
19
16
  m as Chat,
20
- r as ChatHeader,
21
- f as ChatHeaderActions,
17
+ e as ChatHeader,
18
+ p as ChatHeaderActions,
22
19
  a as Checkbox,
23
- I as Contact,
24
- C as ContactInfo,
25
- c as ContactList,
26
- P as DivWithEdit,
27
- u as EmptyStateIndicator,
28
- M as Icon,
29
- z as IconTypes,
30
- E as Model,
31
- S as Plugins,
32
- k as Popup,
33
- w as Profile,
34
- W as Switch,
35
- L as TUIProfileDefault,
36
- l as UnMemoizedContact,
37
- d as UnMemoizedContactInfo,
38
- U as changeTypeToIconClassName
20
+ c as DivWithEdit,
21
+ n as EmptyStateIndicator,
22
+ d as Icon,
23
+ I as IconTypes,
24
+ T as Model,
25
+ y as Plugins,
26
+ D as Popup,
27
+ H as Profile,
28
+ v as Switch,
29
+ b as TUIProfileDefault,
30
+ s as changeTypeToIconClassName
39
31
  };
@@ -2,4 +2,5 @@ export declare const defaultGroupAvatarWork = "https://web.sdk.qcloud.com/im/dem
2
2
  export declare const defaultGroupAvatarPublic = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_public.png";
3
3
  export declare const defaultGroupAvatarMeeting = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_meeting.png";
4
4
  export declare const defaultGroupAvatarAVChatRoom = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_AVChatRoom.png";
5
- export declare const defaultUserAvatar = "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
5
+ export declare const defaultUserAvatar = "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_16.png";
6
+ export declare const DEFAULT_GROUP_COMMON_AVATAR = "https://web.sdk.qcloud.com/im/demo/TUIkit/web/img/constomer.png";
@@ -1,5 +1,6 @@
1
- const t = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_work.png", a = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_public.png", o = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_meeting.png", e = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_AVChatRoom.png", s = "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_21.png";
1
+ const t = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_work.png", a = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_public.png", o = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_meeting.png", e = "https://web.sdk.qcloud.com/im/demo/TUIkit/react-static/images/group_avatar_AVChatRoom.png", s = "https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_16.png", c = "https://web.sdk.qcloud.com/im/demo/TUIkit/web/img/constomer.png";
2
2
  export {
3
+ c as DEFAULT_GROUP_COMMON_AVATAR,
3
4
  e as defaultGroupAvatarAVChatRoom,
4
5
  o as defaultGroupAvatarMeeting,
5
6
  a as defaultGroupAvatarPublic,
@@ -2,11 +2,12 @@ import { jsx as n } from "react/jsx-runtime";
2
2
  import { createContext as i, useMemo as s, useContext as u } from "react";
3
3
  import { useUIManagerState as a } from "../states/UIManagerState.js";
4
4
  import "@tencentcloud/chat-uikit-engine";
5
- import "../ChatSetting-C7QlwAiq.js";
5
+ import "../ChatSetting-BtQwjHr0.js";
6
6
  import "@tencentcloud/uikit-base-component-react";
7
7
  import "@tencentcloud/tui-core";
8
+ import "@tencentcloud/chat";
8
9
  const r = i(null);
9
- function f(t) {
10
+ function v(t) {
10
11
  const {
11
12
  conversation: o
12
13
  } = a(), e = s(() => ({
@@ -14,13 +15,13 @@ function f(t) {
14
15
  }), [o]);
15
16
  return /* @__PURE__ */ n(r.Provider, { value: e, children: t.children });
16
17
  }
17
- function v() {
18
+ function l() {
18
19
  const t = u(r);
19
20
  if (!t)
20
21
  throw new Error("useChatContext must be used within a ChatProvider");
21
22
  return t;
22
23
  }
23
24
  export {
24
- f as ChatProvider,
25
- v as useChatContext
25
+ v as ChatProvider,
26
+ l as useChatContext
26
27
  };
@@ -303,7 +303,7 @@ const qt = function(e) {
303
303
  const F = (((y = s.flip) == null ? void 0 : y.index) || 0) + 1, B = S[F];
304
304
  if (B && (!(d === "alignment" ? R !== z(B) : !1) || // We leave the current main axis only if every placement on that axis
305
305
  // overflows the main axis.
306
- L.every((O) => O.overflows[0] > 0 && z(O.placement) === R)))
306
+ L.every((O) => z(O.placement) === R ? O.overflows[0] > 0 : !0)))
307
307
  return {
308
308
  data: {
309
309
  index: F,
@@ -1,22 +1,22 @@
1
- import u from "react";
1
+ import o from "react";
2
2
  const f = (e) => {
3
3
  let t;
4
- const n = /* @__PURE__ */ new Set(), o = (s, r) => {
4
+ const n = /* @__PURE__ */ new Set(), a = (s, r) => {
5
5
  const c = typeof s == "function" ? s(t) : s;
6
6
  if (!Object.is(c, t)) {
7
7
  const l = t;
8
8
  t = r ?? (typeof c != "object" || c === null) ? c : Object.assign({}, t, c), n.forEach((b) => b(t, l));
9
9
  }
10
- }, a = () => t, i = { setState: o, getState: a, getInitialState: () => S, subscribe: (s) => (n.add(s), () => n.delete(s)) }, S = t = e(o, a, i);
10
+ }, u = () => t, i = { setState: a, getState: u, getInitialState: () => S, subscribe: (s) => (n.add(s), () => n.delete(s)) }, S = t = e(a, u, i);
11
11
  return i;
12
12
  }, j = (e) => f, g = (e) => e;
13
13
  function m(e, t = g) {
14
- const n = u.useSyncExternalStore(
14
+ const n = o.useSyncExternalStore(
15
15
  e.subscribe,
16
- () => t(e.getState()),
17
- () => t(e.getInitialState())
16
+ o.useCallback(() => t(e.getState()), [e, t]),
17
+ o.useCallback(() => t(e.getInitialState()), [e, t])
18
18
  );
19
- return u.useDebugValue(n), n;
19
+ return o.useDebugValue(n), n;
20
20
  }
21
21
  export {
22
22
  j as c,
@@ -1,4 +1,3 @@
1
- window.tencent_cloud_im_csig_react_uikit_23F_xa = !0;
2
1
  const t = "chat-uikit-react";
3
2
  export {
4
3
  t as tagDoNotDelete