@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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
interface IChatHeaderActionsProps {
|
|
2
|
-
/** Whether to enable call features */
|
|
3
|
-
chatHeaderActions?: Array<'videoCall' | 'audioCall' | 'chatSetting' | 'search'> | undefined;
|
|
4
|
-
/** Additional class names */
|
|
5
|
-
className?: string | undefined;
|
|
6
|
-
/** Additional style */
|
|
7
|
-
style?: React.CSSProperties | undefined;
|
|
8
|
-
}
|
|
9
|
-
declare const ChatHeaderActions: (props: IChatHeaderActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export { ChatHeaderActions };
|
|
11
|
-
export type { IChatHeaderActionsProps };
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as u, useCallback as k } from "react";
|
|
3
|
-
import { CallMediaType as m } from "@tencentcloud/call-uikit-react";
|
|
4
|
-
import w from "@tencentcloud/chat-uikit-engine";
|
|
5
|
-
import E, { TUIConstants as T } from "@tencentcloud/tui-core";
|
|
6
|
-
import { useUIKit as U, IconHorizontalMoreTwo as b, IconSearch as D, IconCall1 as x, IconVideoDefault as y } from "@tencentcloud/uikit-base-component-react";
|
|
7
|
-
import { i as z, E as N, p as A, m as M } from "../../../ChatSetting-BtQwjHr0.js";
|
|
8
|
-
import "@tencentcloud/chat";
|
|
9
|
-
import { c as p } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
10
|
-
import '../../../styles/ChatHeaderActions.css';const C = {
|
|
11
|
-
"chat-header-actions": "uikit-chat-header-actions",
|
|
12
|
-
"icon-button": "uikit-icon-button"
|
|
13
|
-
}, L = (I) => {
|
|
14
|
-
const {
|
|
15
|
-
chatHeaderActions: l = ["videoCall", "audioCall", "search", "chatSetting"],
|
|
16
|
-
className: f,
|
|
17
|
-
style: d
|
|
18
|
-
} = I, { searchConfig: c } = U(), { toggleChatSetting: h, toggleChatSearch: g } = z(), { activeConversation: o } = N(), i = u(() => !!E.getService(T.TUICalling.SERVICE.NAME), []), s = (o == null ? void 0 : o.type) === w.TYPES.CONV_GROUP, a = k((r) => {
|
|
19
|
-
var t;
|
|
20
|
-
if (i) {
|
|
21
|
-
if (!((t = o == null ? void 0 : o.userProfile) != null && t.userID))
|
|
22
|
-
throw new Error("User ID is not available in Call.");
|
|
23
|
-
A({
|
|
24
|
-
callType: o.type,
|
|
25
|
-
callMediaType: r,
|
|
26
|
-
userIDList: [o.userProfile.userID]
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}, [o, i]), S = u(() => {
|
|
30
|
-
const r = {
|
|
31
|
-
videoCall: {
|
|
32
|
-
icon: /* @__PURE__ */ e(y, { size: "28px" }),
|
|
33
|
-
onClick: () => a(m.VIDEO),
|
|
34
|
-
show: i && !s
|
|
35
|
-
},
|
|
36
|
-
audioCall: {
|
|
37
|
-
icon: /* @__PURE__ */ e(x, { size: "28px" }),
|
|
38
|
-
onClick: () => a(m.AUDIO),
|
|
39
|
-
show: i && !s
|
|
40
|
-
},
|
|
41
|
-
search: {
|
|
42
|
-
icon: /* @__PURE__ */ e(D, { size: "28px" }),
|
|
43
|
-
onClick: g,
|
|
44
|
-
show: !(c != null && c.hideSearch)
|
|
45
|
-
},
|
|
46
|
-
chatSetting: {
|
|
47
|
-
icon: /* @__PURE__ */ e(b, { size: "28px" }),
|
|
48
|
-
onClick: h,
|
|
49
|
-
show: !0
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
return l.filter((t) => {
|
|
53
|
-
var n;
|
|
54
|
-
return !!((n = r[t]) != null && n.show);
|
|
55
|
-
}).map((t) => {
|
|
56
|
-
const n = r[t];
|
|
57
|
-
return /* @__PURE__ */ e(
|
|
58
|
-
"button",
|
|
59
|
-
{
|
|
60
|
-
className: p(C["icon-button"]),
|
|
61
|
-
onClick: n.onClick,
|
|
62
|
-
children: n.icon
|
|
63
|
-
},
|
|
64
|
-
t
|
|
65
|
-
);
|
|
66
|
-
});
|
|
67
|
-
}, [l, i, a, s, h]);
|
|
68
|
-
return /* @__PURE__ */ e(
|
|
69
|
-
M,
|
|
70
|
-
{
|
|
71
|
-
className: p(C["chat-header-actions"], f),
|
|
72
|
-
style: d,
|
|
73
|
-
children: S
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
L as ChatHeaderActions
|
|
79
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ChatHeaderActions';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface IBaseIconProps {
|
|
3
|
-
name: string;
|
|
4
|
-
size?: number | undefined;
|
|
5
|
-
className?: string | undefined;
|
|
6
|
-
style?: React.CSSProperties | undefined;
|
|
7
|
-
}
|
|
8
|
-
interface IPureIconProps extends IBaseIconProps {
|
|
9
|
-
variant?: 'icon' | undefined;
|
|
10
|
-
hotSize?: never;
|
|
11
|
-
onClick?: never;
|
|
12
|
-
}
|
|
13
|
-
interface IButtonIconProps extends IBaseIconProps {
|
|
14
|
-
variant: 'button';
|
|
15
|
-
hotSize: number;
|
|
16
|
-
borderRadius?: number | undefined;
|
|
17
|
-
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void | undefined;
|
|
18
|
-
}
|
|
19
|
-
type IconProps = IPureIconProps | IButtonIconProps;
|
|
20
|
-
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
-
export default Icon;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import d from "react";
|
|
3
|
-
import { c as n } from "../../external_modules/classnames-HRMVOjAa.js";
|
|
4
|
-
import { B as h } from "../../external_modules/mui-BcA3SBHM.js";
|
|
5
|
-
import '../../styles/Icon2.css';const i = {
|
|
6
|
-
"icon-font": "uikit-icon-font",
|
|
7
|
-
"icon-button": "uikit-icon-button"
|
|
8
|
-
}, y = d.forwardRef((e, s) => {
|
|
9
|
-
const {
|
|
10
|
-
name: c,
|
|
11
|
-
size: t = 20,
|
|
12
|
-
variant: l = "icon",
|
|
13
|
-
hotSize: m = 0,
|
|
14
|
-
onClick: f,
|
|
15
|
-
className: a,
|
|
16
|
-
style: r
|
|
17
|
-
} = e;
|
|
18
|
-
if (l === "button") {
|
|
19
|
-
const { borderRadius: u } = e;
|
|
20
|
-
return /* @__PURE__ */ o(
|
|
21
|
-
h,
|
|
22
|
-
{
|
|
23
|
-
ref: s,
|
|
24
|
-
className: n(i["icon-button"], a),
|
|
25
|
-
style: {
|
|
26
|
-
padding: m,
|
|
27
|
-
borderRadius: u,
|
|
28
|
-
...r
|
|
29
|
-
},
|
|
30
|
-
onClick: f,
|
|
31
|
-
children: /* @__PURE__ */ o(
|
|
32
|
-
"i",
|
|
33
|
-
{
|
|
34
|
-
className: n(i["icon-font"]),
|
|
35
|
-
style: { fontSize: t, width: t, height: t },
|
|
36
|
-
dangerouslySetInnerHTML: { __html: c }
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
return /* @__PURE__ */ o("i", { ref: s, className: n(i["icon-font"], a), style: { fontSize: t, width: t, height: t, ...r }, dangerouslySetInnerHTML: { __html: c } });
|
|
43
|
-
});
|
|
44
|
-
y.displayName = "Icon";
|
|
45
|
-
export {
|
|
46
|
-
y as default
|
|
47
|
-
};
|
|
File without changes
|