@tencentcloud/chat-uikit-react 3.0.1 → 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/CHANGELOG.md +11 -0
- package/debug/GenerateTestUserSig-es.js +26 -0
- package/debug/lib-generate-test-usersig-es.min.js +2 -0
- package/dist/{ChatSetting-79tDbXT3.js → ChatSetting-LYkP2NWu.js} +9516 -8138
- 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/IconFont/Icon.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/PopupNew/Popup.js +1 -1
- 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/constant/avatar.d.ts +2 -1
- package/dist/constant/avatar.js +2 -1
- package/dist/context/ChatContext.js +1 -1
- 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/index.js +1510 -1494
- package/dist/states/ChatHeaderState.js +20 -22
- package/dist/states/UIManagerState.js +1 -1
- package/dist/styles/ChatSetting.css +1 -1
- package/package.json +3 -3
- package/src/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.tsx +4 -4
- package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +5 -5
- package/src/constant/avatar.ts +2 -1
- package/src/states/ChatHeaderState.ts +5 -6
|
@@ -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-79tDbXT3.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
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import d from "react";
|
|
3
3
|
import { c as n } from "../../external_modules/classnames-HRMVOjAa.js";
|
|
4
|
-
import { B as h } from "../../external_modules/mui-
|
|
4
|
+
import { B as h } from "../../external_modules/mui-BcA3SBHM.js";
|
|
5
5
|
import '../../styles/Icon2.css';const i = {
|
|
6
6
|
"icon-font": "uikit-icon-font",
|
|
7
7
|
"icon-button": "uikit-icon-button"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, Fragment as k } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as v, useState as m, useRef as p, useEffect as b } from "react";
|
|
3
3
|
import { c as u } from "../../external_modules/classnames-HRMVOjAa.js";
|
|
4
|
-
import { M as x } from "../../external_modules/mui-
|
|
4
|
+
import { M as x } from "../../external_modules/mui-BcA3SBHM.js";
|
|
5
5
|
import { C as A } from "../../external_modules/react-vendors-3raCpd-g.js";
|
|
6
6
|
import '../../styles/Modal.css';const E = "uikit-root", N = "uikit-backdrop", R = "uikit-backdropEnterActive", t = {
|
|
7
7
|
root: E,
|
|
@@ -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,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,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";
|
|
@@ -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,
|