@tencentcloud/chat-uikit-react 3.0.2 → 3.0.3
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/debug/GenerateTestUserSig-es.js +26 -0
- package/debug/lib-generate-test-usersig-es.min.js +2 -0
- package/dist/{ChatSetting-BtQwjHr0.js → ChatSetting-LYkP2NWu.js} +9562 -8197
- package/dist/components/Chat/Chat.js +1 -1
- package/dist/components/ChatHeader/ChatHeader.js +1 -1
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.d.ts +3 -3
- package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +2 -2
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.d.ts +2 -2
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +37 -37
- package/dist/components/Profile/Profile.js +1 -1
- package/dist/components/Profile/ProfileDefault.js +1 -1
- package/dist/components/Profile/myProfile/MyProfile.js +1 -1
- package/dist/context/ChatContext.js +1 -1
- package/dist/index.js +611 -607
- package/dist/states/ChatHeaderState.js +18 -20
- package/dist/styles/ChatSetting.css +1 -1
- package/package.json +2 -2
- package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +4 -4
- package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +5 -5
- package/src/states/ChatHeaderState.ts +4 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { E as a, m as e } from "../../ChatSetting-
|
|
2
|
+
import { E as a, m as e } from "../../ChatSetting-LYkP2NWu.js";
|
|
3
3
|
import "@tencentcloud/uikit-base-component-react";
|
|
4
4
|
import "@tencentcloud/chat-uikit-engine";
|
|
5
5
|
import "@tencentcloud/tui-core";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as h } from "react";
|
|
3
3
|
import { TUIUserService as v } from "@tencentcloud/chat-uikit-engine";
|
|
4
|
-
import { j as C } from "../../ChatSetting-
|
|
4
|
+
import { j as C } from "../../ChatSetting-LYkP2NWu.js";
|
|
5
5
|
import "@tencentcloud/uikit-base-component-react";
|
|
6
6
|
import "@tencentcloud/tui-core";
|
|
7
7
|
import "@tencentcloud/chat";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface ChatHeaderActionsProps {
|
|
2
2
|
/** Whether to enable call features */
|
|
3
3
|
chatHeaderActions?: Array<'videoCall' | 'audioCall' | 'chatSetting' | 'search'> | undefined;
|
|
4
4
|
/** Additional class names */
|
|
@@ -6,6 +6,6 @@ interface IChatHeaderActionsProps {
|
|
|
6
6
|
/** Additional style */
|
|
7
7
|
style?: React.CSSProperties | undefined;
|
|
8
8
|
}
|
|
9
|
-
declare const ChatHeaderActions: (props:
|
|
9
|
+
declare const ChatHeaderActions: (props: ChatHeaderActionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export { ChatHeaderActions };
|
|
11
|
-
export type {
|
|
11
|
+
export type { ChatHeaderActionsProps };
|
|
@@ -4,9 +4,9 @@ import { CallMediaType as m } from "@tencentcloud/call-uikit-react";
|
|
|
4
4
|
import w from "@tencentcloud/chat-uikit-engine";
|
|
5
5
|
import E, { TUIConstants as T } from "@tencentcloud/tui-core";
|
|
6
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
7
|
import { c as p } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
8
|
+
import { i as z, E as N, p as A, m as M } from "../../../ChatSetting-LYkP2NWu.js";
|
|
9
|
+
import "@tencentcloud/chat";
|
|
10
10
|
import '../../../styles/ChatHeaderActions.css';const C = {
|
|
11
11
|
"chat-header-actions": "uikit-chat-header-actions",
|
|
12
12
|
"icon-button": "uikit-icon-button"
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { IUserStatus } from '../../../types/user';
|
|
3
3
|
import { IConversationModel } from '@tencentcloud/chat-uikit-engine';
|
|
4
4
|
import { AvatarProps } from 'tuikit-atomicx-react';
|
|
5
|
-
interface
|
|
5
|
+
interface ChatHeaderUIProps {
|
|
6
6
|
/** Custom title, if not provided, will use conversation info */
|
|
7
7
|
title: string;
|
|
8
8
|
/** Whether it's a group conversation */
|
|
@@ -30,5 +30,5 @@ interface IChatHeaderUIProps {
|
|
|
30
30
|
/** Search click callback */
|
|
31
31
|
onSearchClick?: (() => void) | undefined;
|
|
32
32
|
}
|
|
33
|
-
declare const ChatHeaderUI: (props:
|
|
33
|
+
declare const ChatHeaderUI: (props: ChatHeaderUIProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export default ChatHeaderUI;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useUIKit as
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useUIKit as b, IconChevronLeft as T } from "@tencentcloud/uikit-base-component-react";
|
|
3
|
+
import { c as s } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
4
|
+
import { i as U, E as g, m as a, V as I } from "../../../ChatSetting-LYkP2NWu.js";
|
|
4
5
|
import "@tencentcloud/chat-uikit-engine";
|
|
5
6
|
import "@tencentcloud/tui-core";
|
|
6
7
|
import "react";
|
|
7
8
|
import "@tencentcloud/chat";
|
|
8
|
-
import { c as n } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
9
9
|
import { ChatHeaderActions as x } from "../ChatHeaderActions/ChatHeaderActions.js";
|
|
10
10
|
import '../../../styles/ChatHeaderUI.css';const e = {
|
|
11
11
|
"chat-header": "uikit-chat-header",
|
|
@@ -17,59 +17,59 @@ import '../../../styles/ChatHeaderUI.css';const e = {
|
|
|
17
17
|
"chat-header__typing-indicator": "uikit-chat-header__typing-indicator",
|
|
18
18
|
"chat-header__live": "uikit-chat-header__live",
|
|
19
19
|
"icon-button": "uikit-icon-button"
|
|
20
|
-
},
|
|
20
|
+
}, p = {
|
|
21
21
|
Online: "Online",
|
|
22
22
|
Offline: "Offline"
|
|
23
|
-
},
|
|
23
|
+
}, K = (u) => {
|
|
24
24
|
const {
|
|
25
|
-
title:
|
|
26
|
-
avatar:
|
|
27
|
-
isPeerTyping:
|
|
28
|
-
system:
|
|
29
|
-
userStatus:
|
|
30
|
-
enableUserStatus:
|
|
25
|
+
title: n,
|
|
26
|
+
avatar: o,
|
|
27
|
+
isPeerTyping: k = !1,
|
|
28
|
+
system: C = !1,
|
|
29
|
+
userStatus: i,
|
|
30
|
+
enableUserStatus: l = !0,
|
|
31
31
|
chatHeaderActions: N,
|
|
32
|
-
Avatar:
|
|
33
|
-
isGroup:
|
|
34
|
-
className:
|
|
35
|
-
style:
|
|
36
|
-
} =
|
|
37
|
-
if (
|
|
32
|
+
Avatar: _,
|
|
33
|
+
isGroup: r,
|
|
34
|
+
className: d,
|
|
35
|
+
style: m
|
|
36
|
+
} = u, { t: h } = b(), { setChatSettingOpen: v, setChatSearchOpen: y } = U(), { setActiveConversation: O } = g();
|
|
37
|
+
if (C)
|
|
38
38
|
return /* @__PURE__ */ t(
|
|
39
39
|
a,
|
|
40
40
|
{
|
|
41
|
-
className:
|
|
42
|
-
style:
|
|
41
|
+
className: s(e["chat-header"], d),
|
|
42
|
+
style: m,
|
|
43
43
|
children: "System Notice"
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function f() {
|
|
47
|
+
O(""), v(!1), y(!1);
|
|
48
48
|
}
|
|
49
49
|
return /* @__PURE__ */ t(
|
|
50
50
|
a,
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
53
|
-
style:
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
/* @__PURE__ */
|
|
56
|
-
/* @__PURE__ */ t("button", { className:
|
|
57
|
-
|
|
52
|
+
className: s(e["chat-header"], d),
|
|
53
|
+
style: m,
|
|
54
|
+
children: /* @__PURE__ */ c(a, { className: e["chat-header__container"], children: [
|
|
55
|
+
/* @__PURE__ */ c(a, { className: e["chat-header__left"], children: [
|
|
56
|
+
/* @__PURE__ */ t("button", { className: s(e["icon-button"], e["chat-header__back-icon"]), onClick: f, children: /* @__PURE__ */ t(
|
|
57
|
+
T,
|
|
58
58
|
{
|
|
59
|
-
onClick:
|
|
59
|
+
onClick: f,
|
|
60
60
|
size: "28px"
|
|
61
61
|
}
|
|
62
62
|
) }),
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
67
|
-
!
|
|
63
|
+
_ ? /* @__PURE__ */ t(_, { src: o || "", alt: n }) : /* @__PURE__ */ t(I, { src: o || "", alt: n, isShowOnlineStatus: !r && l, isOnline: (i == null ? void 0 : i.statusType) === 1 }),
|
|
64
|
+
/* @__PURE__ */ c(a, { className: e["chat-header__info"], children: [
|
|
65
|
+
/* @__PURE__ */ c(a, { className: e["chat-header__title"], children: [
|
|
66
|
+
n,
|
|
67
|
+
!r && k && /* @__PURE__ */ c("span", { className: e["chat-header__typing-indicator"], children: [
|
|
68
68
|
" ",
|
|
69
|
-
|
|
69
|
+
h("TUIChat.Typing")
|
|
70
70
|
] })
|
|
71
71
|
] }),
|
|
72
|
-
!
|
|
72
|
+
!r && l && ((i == null ? void 0 : i.statusType) === 1 ? /* @__PURE__ */ t(a, { className: e["chat-header__live"], children: h(`TUIChat.${p.Online}`) }) : /* @__PURE__ */ t(a, { className: e["chat-header__live"], children: h(`TUIChat.${p.Offline}`) }))
|
|
73
73
|
] })
|
|
74
74
|
] }),
|
|
75
75
|
/* @__PURE__ */ t(
|
|
@@ -83,5 +83,5 @@ import '../../../styles/ChatHeaderUI.css';const e = {
|
|
|
83
83
|
);
|
|
84
84
|
};
|
|
85
85
|
export {
|
|
86
|
-
|
|
86
|
+
K as default
|
|
87
87
|
};
|
|
@@ -3,7 +3,7 @@ import p from "react";
|
|
|
3
3
|
import { MyProfile as P } from "./myProfile/MyProfile.js";
|
|
4
4
|
import { useMyProfile as s } from "./hooks/useMyProfile.js";
|
|
5
5
|
import { TUIProfileDefault as a } from "./ProfileDefault.js";
|
|
6
|
-
import { i as c } from "../../ChatSetting-
|
|
6
|
+
import { i as c } from "../../ChatSetting-LYkP2NWu.js";
|
|
7
7
|
import "@tencentcloud/uikit-base-component-react";
|
|
8
8
|
import "@tencentcloud/chat-uikit-engine";
|
|
9
9
|
import "@tencentcloud/tui-core";
|
|
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as s } from "react/jsx-runtime";
|
|
|
2
2
|
import W, { useState as x } from "react";
|
|
3
3
|
import a from "@tencentcloud/chat-uikit-engine";
|
|
4
4
|
import { useUIKit as R, IconChevronLeft as F } from "@tencentcloud/uikit-base-component-react";
|
|
5
|
-
import { i as G, V as B } from "../../ChatSetting-
|
|
5
|
+
import { i as G, V as B } from "../../ChatSetting-LYkP2NWu.js";
|
|
6
6
|
import "@tencentcloud/tui-core";
|
|
7
7
|
import "@tencentcloud/chat";
|
|
8
8
|
import { DivWithEdit as L } from "../DivWithEdit/DivWithEdit.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { defaultUserAvatar as s } from "../../../constant/avatar.js";
|
|
3
|
-
import { V as t } from "../../../ChatSetting-
|
|
3
|
+
import { V as t } from "../../../ChatSetting-LYkP2NWu.js";
|
|
4
4
|
import { IconHorizontalMoreTwo as c } from "@tencentcloud/uikit-base-component-react";
|
|
5
5
|
import "@tencentcloud/chat-uikit-engine";
|
|
6
6
|
import "@tencentcloud/tui-core";
|
|
@@ -2,7 +2,7 @@ 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-LYkP2NWu.js";
|
|
6
6
|
import "@tencentcloud/uikit-base-component-react";
|
|
7
7
|
import "@tencentcloud/tui-core";
|
|
8
8
|
import "@tencentcloud/chat";
|