@tencentcloud/chat-uikit-react 3.0.2 → 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/debug/GenerateTestUserSig-es.js +26 -0
- package/debug/lib-generate-test-usersig-es.min.js +2 -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 +14 -9
- 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 -4129
- 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 +33 -40
- 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} +19 -22
- 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-BtQwjHr0.js +0 -28525
- 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 -48
- 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
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useMemo as s } from "react";
|
|
2
|
-
import { TUIChatEngine as i } from "@tencentcloud/chat-uikit-engine";
|
|
3
|
-
import { E as p } from "../ChatSetting-BtQwjHr0.js";
|
|
4
|
-
import "@tencentcloud/uikit-base-component-react";
|
|
5
|
-
import "@tencentcloud/tui-core";
|
|
6
|
-
import "react/jsx-runtime";
|
|
7
|
-
import "@tencentcloud/chat";
|
|
8
|
-
import { defaultUserAvatar as C, DEFAULT_GROUP_COMMON_AVATAR as E } from "../constant/avatar.js";
|
|
9
|
-
import { useUIManagerState as T } from "./UIManagerState.js";
|
|
10
|
-
function G() {
|
|
11
|
-
const { userStatusMap: u } = T(), { activeConversation: t } = p(), n = t ? t.type === i.TYPES.CONV_SYSTEM : void 0, a = s(() => {
|
|
12
|
-
if (!t)
|
|
13
|
-
return;
|
|
14
|
-
if (n)
|
|
15
|
-
return "System Notice";
|
|
16
|
-
const {
|
|
17
|
-
type: e,
|
|
18
|
-
userProfile: r,
|
|
19
|
-
remark: m,
|
|
20
|
-
groupProfile: o
|
|
21
|
-
} = t;
|
|
22
|
-
return e === i.TYPES.CONV_C2C ? m || (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)) || "";
|
|
23
|
-
}, [t, n]), O = s(() => {
|
|
24
|
-
if (!t || n)
|
|
25
|
-
return;
|
|
26
|
-
const {
|
|
27
|
-
type: e,
|
|
28
|
-
userProfile: r,
|
|
29
|
-
groupProfile: m
|
|
30
|
-
} = t;
|
|
31
|
-
return e === i.TYPES.CONV_C2C ? (r == null ? void 0 : r.avatar) || C : e === i.TYPES.CONV_GROUP ? (m == null ? void 0 : m.avatar) || E : "";
|
|
32
|
-
}, [t, n]), f = s(() => {
|
|
33
|
-
var e;
|
|
34
|
-
if (t && !n && t.type !== i.TYPES.CONV_GROUP)
|
|
35
|
-
return u == null ? void 0 : u[(e = t == null ? void 0 : t.userProfile) == null ? void 0 : e.userID];
|
|
36
|
-
}, [t, u, n]), S = s(() => (t == null ? void 0 : t.type) === i.TYPES.CONV_GROUP, [t]);
|
|
37
|
-
return {
|
|
38
|
-
title: a,
|
|
39
|
-
avatar: O,
|
|
40
|
-
isGroup: S,
|
|
41
|
-
system: n,
|
|
42
|
-
conversation: t,
|
|
43
|
-
userStatus: f
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
G as useChatHeaderState
|
|
48
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.uikit-chat-header-actions{flex:0 0 auto;display:flex;flex-direction:row;align-items:center;margin-left:auto;gap:8px}[data-uikit-theme=light] .uikit-chat-header-actions__button{color:var(--uikit-theme-light-text-color-link);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}[data-uikit-theme=dark] .uikit-chat-header-actions__button{color:var(--uikit-theme-dark-text-color-link);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}.uikit-icon-button{flex:0 0 auto;border:none;padding:4px;margin:0;background:none;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;transition:background-color .2s ease;cursor:pointer}[data-uikit-theme=light] .uikit-icon-button{color:var(--uikit-theme-light-text-color-link);background-color:var(--uikit-theme-light-dropdown-color-default);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}[data-uikit-theme=light] .uikit-icon-button:hover{background-color:var(--uikit-theme-light-dropdown-color-hover)}[data-uikit-theme=light] .uikit-icon-button:active{background-color:var(--uikit-theme-light-dropdown-color-active)}[data-uikit-theme=dark] .uikit-icon-button{color:var(--uikit-theme-dark-text-color-link);background-color:var(--uikit-theme-dark-dropdown-color-default);transition:color .3s ease-out,border-color .3s ease-out,background-color .3s ease-out}[data-uikit-theme=dark] .uikit-icon-button:hover{background-color:var(--uikit-theme-dark-dropdown-color-hover)}[data-uikit-theme=dark] .uikit-icon-button:active{background-color:var(--uikit-theme-dark-dropdown-color-active)}
|