@tencentcloud/chat-uikit-react 3.0.3 → 3.4.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/.eslintrc.cjs +5 -4
- package/CHANGELOG.md +9 -0
- package/dist/components/Chat/Chat.d.ts +1 -1
- package/dist/components/Chat/Chat.js +18 -23
- package/dist/components/ChatHeader/AudioCallPicker/AudioCallPicker.d.ts +30 -0
- package/dist/components/ChatHeader/AudioCallPicker/AudioCallPicker.js +135 -0
- package/dist/components/ChatHeader/AudioCallPicker/index.d.ts +1 -0
- package/dist/components/ChatHeader/AudioCallPicker/index.js +4 -0
- package/dist/components/ChatHeader/ChatHeader.d.ts +6 -0
- package/dist/components/ChatHeader/ChatHeader.js +43 -41
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.d.ts +12 -7
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +47 -65
- package/dist/components/ChatHeader/VideoCallPicker/VideoCallPicker.d.ts +30 -0
- package/dist/components/ChatHeader/VideoCallPicker/VideoCallPicker.js +135 -0
- package/dist/components/ChatHeader/VideoCallPicker/index.d.ts +1 -0
- package/dist/components/ChatHeader/VideoCallPicker/index.js +4 -0
- package/dist/components/ChatHeader/index.d.ts +2 -1
- package/dist/components/ChatHeader/index.js +4 -2
- package/dist/components/Checkbox/index.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.js +20 -22
- package/dist/components/Profile/ProfileDefault.d.ts +3 -2
- package/dist/components/Profile/ProfileDefault.js +55 -56
- package/dist/components/Profile/hooks/useMyProfile.d.ts +2 -3
- package/dist/components/Profile/hooks/useMyProfile.js +1 -1
- package/dist/components/Profile/myProfile/MyProfile.d.ts +1 -1
- package/dist/components/Profile/myProfile/MyProfile.js +12 -16
- package/dist/components/index.js +27 -25
- package/dist/context/ChatContext.d.ts +1 -1
- package/dist/context/ChatContext.js +11 -16
- package/dist/context/ContactContext.d.ts +1 -1
- package/dist/external_modules/mui-BhvHeL5-.js +2253 -0
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +2 -2
- package/dist/{states/ChatHeaderState.d.ts → hooks/useChatHeader.d.ts} +6 -6
- package/dist/hooks/useChatHeader.js +41 -0
- package/dist/index-UBuvRM8r-DTXQB6zV.js +34000 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +93 -4133
- package/dist/server/mainServer.js +2 -2
- package/dist/states/UIManagerState.d.ts +5 -5
- package/dist/states/UIManagerState.js +2 -2
- package/dist/states/index.d.ts +0 -1
- package/dist/states/index.js +2 -4
- package/dist/styles/AudioCallPicker.css +1 -0
- package/dist/styles/ChatHeaderUI.css +1 -1
- package/dist/styles/VideoCallPicker.css +1 -0
- package/dist/styles/index-UBuvRM8r.css +1 -0
- 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/dist/types/message.d.ts +1 -1
- package/dist/types/user.d.ts +4 -4
- package/package.json +12 -20
- package/src/components/ChatHeader/AudioCallPicker/AudioCallPicker.module.scss +57 -0
- package/src/components/ChatHeader/AudioCallPicker/AudioCallPicker.tsx +234 -0
- package/src/components/ChatHeader/AudioCallPicker/index.ts +1 -0
- package/src/components/ChatHeader/ChatHeader.tsx +15 -3
- package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +29 -36
- package/src/components/ChatHeader/VideoCallPicker/VideoCallPicker.module.scss +57 -0
- package/src/components/ChatHeader/VideoCallPicker/VideoCallPicker.tsx +233 -0
- package/src/components/ChatHeader/VideoCallPicker/index.ts +1 -0
- package/src/components/ChatHeader/index.ts +2 -1
- package/src/components/Profile/Profile.tsx +7 -6
- package/src/components/Profile/ProfileDefault.tsx +8 -8
- package/src/components/Profile/hooks/useMyProfile.tsx +2 -3
- package/src/components/Profile/myProfile/MyProfile.tsx +1 -1
- package/src/context/ChatContext.tsx +1 -1
- package/src/context/ContactContext.tsx +1 -1
- package/src/hooks/index.ts +2 -2
- package/src/{states/ChatHeaderState.ts → hooks/useChatHeader.ts} +15 -17
- package/src/index.ts +3 -5
- package/src/server/mainServer.ts +2 -2
- package/src/states/UIManagerState.ts +9 -9
- package/src/states/index.ts +0 -2
- package/src/styles/index.scss +0 -1
- package/src/types/message.ts +1 -1
- package/src/types/user.ts +4 -4
- package/vite.config.ts +4 -25
- package/dist/ChatSetting-LYkP2NWu.js +0 -29890
- package/dist/assets/fonts/iconfont.ttf +0 -0
- package/dist/assets/fonts/iconfont.woff +0 -0
- package/dist/assets/fonts/iconfont.woff2 +0 -0
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.d.ts +0 -11
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +0 -79
- package/dist/components/ChatHeader/ChatHeaderActions/index.d.ts +0 -1
- package/dist/components/ChatHeader/ChatHeaderActions/index.js +0 -4
- package/dist/components/IconFont/Icon.d.ts +0 -21
- package/dist/components/IconFont/Icon.js +0 -47
- package/dist/components/IconFont/index.d.ts +0 -2
- package/dist/components/IconFont/index.js +0 -4
- package/dist/external_modules/lodash-vwDjcXxQ.js +0 -0
- package/dist/external_modules/mui-BcA3SBHM.js +0 -2473
- package/dist/states/ChatHeaderState.js +0 -46
- package/dist/styles/ChatHeaderActions.css +0 -1
- package/dist/styles/ChatSetting.css +0 -1
- package/dist/styles/Icon2.css +0 -1
- package/src/assets/fonts/iconfont.ttf +0 -0
- package/src/assets/fonts/iconfont.woff +0 -0
- package/src/assets/fonts/iconfont.woff2 +0 -0
- package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.module.scss +0 -44
- package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +0 -105
- package/src/components/ChatHeader/ChatHeaderActions/index.ts +0 -1
- package/src/components/IconFont/Icon.module.scss +0 -42
- package/src/components/IconFont/Icon.tsx +0 -68
- package/src/components/IconFont/index.ts +0 -3
- package/src/styles/fonts/icon-font.scss +0 -18
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import { useChatHeader } from './useChatHeader';
|
|
2
|
+
export { useChatHeader, };
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { UserStatus } from '../types/user';
|
|
2
|
+
import { ConversationModel } from 'tuikit-atomicx-react';
|
|
3
3
|
interface UseChatHeaderStoreReturn {
|
|
4
4
|
/** im avatar can't be undefined */
|
|
5
5
|
avatar: string;
|
|
@@ -10,9 +10,9 @@ interface UseChatHeaderStoreReturn {
|
|
|
10
10
|
/** im title */
|
|
11
11
|
title: string | undefined;
|
|
12
12
|
/** current conversation */
|
|
13
|
-
conversation:
|
|
13
|
+
conversation: ConversationModel | undefined;
|
|
14
14
|
/** user status */
|
|
15
|
-
userStatus:
|
|
15
|
+
userStatus: UserStatus | undefined;
|
|
16
16
|
}
|
|
17
|
-
declare function
|
|
18
|
-
export {
|
|
17
|
+
declare function useChatHeader(): UseChatHeaderStoreReturn;
|
|
18
|
+
export { useChatHeader, };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useMemo as o } from "react";
|
|
2
|
+
import { a as p, C as s } from "../index-UBuvRM8r-DTXQB6zV.js";
|
|
3
|
+
import { useUIManagerState as d } from "../states/UIManagerState.js";
|
|
4
|
+
function G() {
|
|
5
|
+
const { userStatusMap: i } = d(), { activeConversation: t } = p(), n = t ? t.type === s.SYSTEM : void 0, a = o(() => {
|
|
6
|
+
if (!t)
|
|
7
|
+
return;
|
|
8
|
+
if (n)
|
|
9
|
+
return "System Notice";
|
|
10
|
+
const {
|
|
11
|
+
type: e,
|
|
12
|
+
userProfile: r,
|
|
13
|
+
remark: y,
|
|
14
|
+
groupProfile: u
|
|
15
|
+
} = t;
|
|
16
|
+
return e === s.C2C ? y || (r == null ? void 0 : r.nick) || (r == null ? void 0 : r.userID) || "" : e === s.GROUP && ((u == null ? void 0 : u.name) || (u == null ? void 0 : u.groupID)) || "";
|
|
17
|
+
}, [t, n]), m = o(() => {
|
|
18
|
+
if (!t || n)
|
|
19
|
+
return "";
|
|
20
|
+
const {
|
|
21
|
+
type: e,
|
|
22
|
+
userProfile: r
|
|
23
|
+
} = t;
|
|
24
|
+
return e === s.C2C ? r == null ? void 0 : r.avatar : e === s.GROUP ? t.getAvatar() : "";
|
|
25
|
+
}, [t, n]), f = o(() => {
|
|
26
|
+
var e;
|
|
27
|
+
if (t && !n && t.type !== s.GROUP)
|
|
28
|
+
return i == null ? void 0 : i[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
|
|
29
|
+
}, [t, i, n]), c = o(() => (t == null ? void 0 : t.type) === s.GROUP, [t]);
|
|
30
|
+
return {
|
|
31
|
+
title: a,
|
|
32
|
+
avatar: m,
|
|
33
|
+
isGroup: c,
|
|
34
|
+
system: n,
|
|
35
|
+
conversation: t,
|
|
36
|
+
userStatus: f
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
G as useChatHeader
|
|
41
|
+
};
|