@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
package/dist/components/index.js
CHANGED
|
@@ -1,39 +1,31 @@
|
|
|
1
|
-
import { ChatHeader as
|
|
2
|
-
import { ChatHeaderActions as
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
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
|
-
|
|
21
|
-
|
|
17
|
+
e as ChatHeader,
|
|
18
|
+
p as ChatHeaderActions,
|
|
22
19
|
a as Checkbox,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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/
|
|
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";
|
package/dist/constant/avatar.js
CHANGED
|
@@ -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/
|
|
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-
|
|
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
|
|
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
|
|
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
|
-
|
|
25
|
-
|
|
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
|
|
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
|
|
1
|
+
import o from "react";
|
|
2
2
|
const f = (e) => {
|
|
3
3
|
let t;
|
|
4
|
-
const n = /* @__PURE__ */ new Set(),
|
|
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
|
-
},
|
|
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 =
|
|
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
|
|
19
|
+
return o.useDebugValue(n), n;
|
|
20
20
|
}
|
|
21
21
|
export {
|
|
22
22
|
j as c,
|
package/dist/hooks/index.js
CHANGED