@tencentcloud/chat-uikit-react 3.4.8 → 4.5.1
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/dist/components/Chat/Chat.js +13 -13
- package/dist/components/ChatHeader/AudioCallPicker/AudioCallPicker.js +12 -12
- package/dist/components/ChatHeader/ChatHeader.d.ts +1 -1
- package/dist/components/ChatHeader/ChatHeader.js +7 -7
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.d.ts +1 -1
- package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +1 -1
- package/dist/components/ChatHeader/VideoCallPicker/VideoCallPicker.js +18 -18
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/Input/Input.js +6 -6
- package/dist/components/Modal/Modal.js +13 -13
- 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 +11 -11
- package/dist/components/Profile/Profile.js +5 -5
- package/dist/components/Profile/ProfileDefault.d.ts +1 -1
- package/dist/components/Profile/ProfileDefault.js +25 -25
- package/dist/components/Profile/myProfile/MyProfile.js +5 -5
- package/dist/context/ContactContext.js +2 -2
- package/dist/external_modules/{react-vendors-3raCpd-g.js → react-vendors-x_iUMC12.js} +69 -70
- package/dist/hooks/useChatHeader.d.ts +1 -1
- package/dist/hooks/useChatHeader.js +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +49 -114
- package/dist/locales/en-US/TUIConversation.d.ts +2 -0
- package/dist/locales/en-US/TUIConversation.js +3 -1
- package/dist/locales/en-US/index.d.ts +2 -0
- package/dist/locales/ja-JP/TUIConversation.d.ts +2 -0
- package/dist/locales/ja-JP/TUIConversation.js +3 -1
- package/dist/locales/ja-JP/index.d.ts +2 -0
- package/dist/locales/ko-KR/TUIConversation.d.ts +2 -0
- package/dist/locales/ko-KR/TUIConversation.js +3 -1
- package/dist/locales/ko-KR/index.d.ts +2 -0
- package/dist/locales/zh-CN/TUIConversation.d.ts +2 -0
- package/dist/locales/zh-CN/TUIConversation.js +3 -1
- package/dist/locales/zh-CN/index.d.ts +2 -0
- package/dist/locales/zh-TW/TUIConversation.d.ts +2 -0
- package/dist/locales/zh-TW/TUIConversation.js +3 -1
- package/dist/locales/zh-TW/index.d.ts +2 -0
- package/dist/states/UIManagerState.js +7 -6
- 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/package.json +2 -2
- package/src/components/Chat/Chat.tsx +1 -1
- package/src/components/ChatHeader/AudioCallPicker/AudioCallPicker.tsx +2 -2
- package/src/components/ChatHeader/ChatHeader.tsx +2 -2
- package/src/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.tsx +2 -2
- package/src/components/ChatHeader/VideoCallPicker/VideoCallPicker.tsx +2 -2
- package/src/components/Profile/ProfileDefault.tsx +2 -2
- package/src/components/Profile/myProfile/MyProfile.tsx +3 -3
- package/src/hooks/useChatHeader.ts +2 -2
- package/src/index.ts +11 -2
- package/src/locales/en-US/TUIConversation.ts +2 -0
- package/src/locales/ja-JP/TUIConversation.ts +2 -0
- package/src/locales/ko-KR/TUIConversation.ts +2 -0
- package/src/locales/zh-CN/TUIConversation.ts +2 -0
- package/src/locales/zh-TW/TUIConversation.ts +2 -0
- package/vite.config.ts +32 -18
- package/dist/external_modules/mui-BhvHeL5-.js +0 -2253
- package/dist/external_modules/zustand-CDmQR4co.js +0 -24
- package/dist/index-BLFl-K0_-DzfAZFZt.js +0 -32905
- package/dist/styles/index-BLFl-K0_.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [4.5.1] (2025-12-16)
|
|
2
|
+
|
|
3
|
+
### feat
|
|
4
|
+
* Add ImagePreview component with zoom and drag functionality for viewing images in modal
|
|
5
|
+
* Add @ mention feature in text editor
|
|
6
|
+
* Add maxLength property to MessageInput for controlling input length
|
|
7
|
+
|
|
8
|
+
### refactor
|
|
9
|
+
* Refactor editor core code to optimize extension management and content conversion
|
|
10
|
+
* Optimize input handling logic in MessageInputState to improve message processing flow
|
|
11
|
+
|
|
1
12
|
## [3.4.8] (2025-12-08)
|
|
2
13
|
|
|
3
14
|
### feat
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { c as i } from "../../external_modules/classnames-HRMVOjAa.js";
|
|
3
|
+
import { useConversationListState as n, View as m } from "tuikit-atomicx-react/chat";
|
|
4
4
|
import { ChatProvider as l } from "../../context/ChatContext.js";
|
|
5
5
|
import '../../styles/Chat.css';const h = "uikit-chat", p = {
|
|
6
6
|
chat: h
|
|
7
|
-
}, y = (
|
|
7
|
+
}, y = (s) => {
|
|
8
8
|
const {
|
|
9
9
|
PlaceholderEmpty: o = null,
|
|
10
|
-
className:
|
|
11
|
-
style:
|
|
12
|
-
children:
|
|
13
|
-
} =
|
|
14
|
-
return t != null && t.conversationID ? /* @__PURE__ */
|
|
15
|
-
|
|
10
|
+
className: c,
|
|
11
|
+
style: e,
|
|
12
|
+
children: a
|
|
13
|
+
} = s, { activeConversation: t } = n();
|
|
14
|
+
return t != null && t.conversationID ? /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
|
|
15
|
+
m,
|
|
16
16
|
{
|
|
17
|
-
className:
|
|
18
|
-
style:
|
|
19
|
-
children:
|
|
17
|
+
className: i(p.chat, c),
|
|
18
|
+
style: e,
|
|
19
|
+
children: a
|
|
20
20
|
}
|
|
21
21
|
) }) : o;
|
|
22
22
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as s, Fragment as
|
|
1
|
+
import { jsx as s, Fragment as B, jsxs as V } from "react/jsx-runtime";
|
|
2
2
|
import { useState as j, useRef as z, useMemo as n, useCallback as r } from "react";
|
|
3
3
|
import { useUIKit as K, IconCallFilled as X, Dialog as Y } from "@tencentcloud/uikit-base-component-react";
|
|
4
4
|
import { c as Z } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useLoginState as $, useConversationListState as q, useGroupSettingState as H, ConversationType as h, startCall as y, View as J, UserPicker as Q } from "tuikit-atomicx-react/chat";
|
|
6
6
|
import '../../../styles/AudioCallPicker.css';const u = {
|
|
7
7
|
"audio-call-picker__button": "uikit-audio-call-picker__button",
|
|
8
8
|
"audio-call-picker__button--disabled": "uikit-audio-call-picker__button--disabled",
|
|
@@ -16,7 +16,7 @@ import '../../../styles/AudioCallPicker.css';const u = {
|
|
|
16
16
|
className: L,
|
|
17
17
|
style: P,
|
|
18
18
|
children: E
|
|
19
|
-
} = G, { t: p } = K(), { loginUserInfo: c } = $(), { activeConversation: e } = q(), { allMembers: t, getGroupMemberList: _, memberCount: g } = H(), [
|
|
19
|
+
} = G, { t: p } = K(), { loginUserInfo: c } = $(), { activeConversation: e } = q(), { allMembers: t, getGroupMemberList: _, memberCount: g } = H(), [R, b] = j(!1), d = z(null), k = n(() => c == null ? void 0 : c.userId, [c]), U = n(() => (e == null ? void 0 : e.type) === h.C2C, [e]), x = n(() => (t == null ? void 0 : t.map((o) => ({
|
|
20
20
|
key: o.userID,
|
|
21
21
|
label: o.nick || o.userID,
|
|
22
22
|
avatarUrl: o.avatar
|
|
@@ -32,8 +32,8 @@ import '../../../styles/AudioCallPicker.css';const u = {
|
|
|
32
32
|
userIDList: [o],
|
|
33
33
|
type: D
|
|
34
34
|
});
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("Failed to start private audio call:",
|
|
35
|
+
} catch (m) {
|
|
36
|
+
console.error("Failed to start private audio call:", m);
|
|
37
37
|
}
|
|
38
38
|
}, [e == null ? void 0 : e.conversationID]), f = r(() => {
|
|
39
39
|
if ((e == null ? void 0 : e.type) !== h.GROUP)
|
|
@@ -59,26 +59,26 @@ import '../../../styles/AudioCallPicker.css';const u = {
|
|
|
59
59
|
console.warn("No members selected for group call");
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const m = l.map((C) => C.key);
|
|
63
63
|
try {
|
|
64
64
|
y({
|
|
65
|
-
userIDList:
|
|
65
|
+
userIDList: m,
|
|
66
66
|
chatGroupID: o,
|
|
67
67
|
type: D
|
|
68
68
|
}), i();
|
|
69
|
-
} catch (
|
|
70
|
-
console.error("Failed to start group audio call:",
|
|
69
|
+
} catch (C) {
|
|
70
|
+
console.error("Failed to start group audio call:", C);
|
|
71
71
|
}
|
|
72
72
|
}, [i]), F = r(() => {
|
|
73
73
|
if (!N) {
|
|
74
74
|
console.warn("Cannot start audio call");
|
|
75
75
|
return;
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
U ? w() : O();
|
|
78
78
|
}, []), T = r(() => {
|
|
79
79
|
I();
|
|
80
80
|
}, [I]);
|
|
81
|
-
return /* @__PURE__ */ s(
|
|
81
|
+
return /* @__PURE__ */ s(B, { children: /* @__PURE__ */ V(J, { children: [
|
|
82
82
|
/* @__PURE__ */ s(
|
|
83
83
|
"button",
|
|
84
84
|
{
|
|
@@ -106,7 +106,7 @@ import '../../../styles/AudioCallPicker.css';const u = {
|
|
|
106
106
|
/* @__PURE__ */ s(
|
|
107
107
|
Y,
|
|
108
108
|
{
|
|
109
|
-
visible:
|
|
109
|
+
visible: R,
|
|
110
110
|
title: p("MessageInput.select_call_members"),
|
|
111
111
|
cancelText: p("MessageInput.cancel"),
|
|
112
112
|
onCancel: i,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { AvatarProps } from 'tuikit-atomicx-react';
|
|
2
|
+
import { AvatarProps } from 'tuikit-atomicx-react/chat';
|
|
3
3
|
interface ChatHeaderProps {
|
|
4
4
|
/** Custom title, if not provided, will use conversation info */
|
|
5
5
|
title?: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as v } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as H } from "react";
|
|
3
3
|
import { TUIUserService as U } from "@tencentcloud/chat-uikit-engine-lite";
|
|
4
|
-
import {
|
|
4
|
+
import { useMessageInputState as x } from "tuikit-atomicx-react/chat";
|
|
5
5
|
import { useChatHeader as y } from "../../hooks/useChatHeader.js";
|
|
6
6
|
import g from "./ChatHeaderUI/ChatHeaderUI.js";
|
|
7
7
|
const w = (t) => {
|
|
@@ -17,9 +17,9 @@ const w = (t) => {
|
|
|
17
17
|
ChatHeaderLeft: n,
|
|
18
18
|
ChatHeaderRight: m
|
|
19
19
|
} = t, {
|
|
20
|
-
system:
|
|
21
|
-
conversation:
|
|
22
|
-
isGroup:
|
|
20
|
+
system: f,
|
|
21
|
+
conversation: p,
|
|
22
|
+
isGroup: u,
|
|
23
23
|
title: h,
|
|
24
24
|
avatar: d,
|
|
25
25
|
userStatus: C
|
|
@@ -29,13 +29,13 @@ const w = (t) => {
|
|
|
29
29
|
}, [e]), /* @__PURE__ */ v(
|
|
30
30
|
g,
|
|
31
31
|
{
|
|
32
|
-
isGroup:
|
|
32
|
+
isGroup: u,
|
|
33
33
|
title: a || h || "",
|
|
34
34
|
avatar: r || d,
|
|
35
35
|
userStatus: C,
|
|
36
|
-
conversation:
|
|
36
|
+
conversation: p,
|
|
37
37
|
isPeerTyping: S,
|
|
38
|
-
system:
|
|
38
|
+
system: f,
|
|
39
39
|
enableUserStatus: e,
|
|
40
40
|
enableCall: s,
|
|
41
41
|
chatHeaderActions: i,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { UserStatus } from '../../../types/user';
|
|
3
|
-
import { ConversationModel } from 'tuikit-atomicx-react';
|
|
3
|
+
import { ConversationModel } from 'tuikit-atomicx-react/chat';
|
|
4
4
|
interface ChatHeaderUIProps {
|
|
5
5
|
/** Custom title, if not provided, will use conversation info */
|
|
6
6
|
title: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useUIKit as C } from "@tencentcloud/uikit-base-component-react";
|
|
3
3
|
import { c as m } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
4
|
-
import {
|
|
4
|
+
import { View as a, Avatar as v } from "tuikit-atomicx-react/chat";
|
|
5
5
|
import { AudioCallPicker as g } from "../AudioCallPicker/AudioCallPicker.js";
|
|
6
6
|
import { VideoCallPicker as T } from "../VideoCallPicker/VideoCallPicker.js";
|
|
7
7
|
import '../../../styles/ChatHeaderUI.css';const e = {
|
|
@@ -2,25 +2,25 @@ import { jsx as s, Fragment as F, jsxs as T } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as B, useRef as j, useMemo as n, useCallback as l } from "react";
|
|
3
3
|
import { useUIKit as z, IconVideoFilled as K, Dialog as X } from "@tencentcloud/uikit-base-component-react";
|
|
4
4
|
import { c as Y } from "../../../external_modules/classnames-HRMVOjAa.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useLoginState as Z, useConversationListState as $, useGroupSettingState as q, ConversationType as P, startCall as S, View as H, UserPicker as J } from "tuikit-atomicx-react/chat";
|
|
6
6
|
import '../../../styles/VideoCallPicker.css';const u = {
|
|
7
7
|
"video-call-picker__button": "uikit-video-call-picker__button",
|
|
8
8
|
"video-call-picker__button--disabled": "uikit-video-call-picker__button--disabled",
|
|
9
9
|
"video-call-picker__icon": "uikit-video-call-picker__icon",
|
|
10
10
|
"group-call-dialog": "uikit-group-call-dialog"
|
|
11
|
-
}, E = 2, Q = 80, W = 8, ee = 1,
|
|
11
|
+
}, E = 2, Q = 80, W = 8, ee = 1, ie = (L) => {
|
|
12
12
|
const {
|
|
13
13
|
label: R = "",
|
|
14
14
|
iconSize: U = 20,
|
|
15
|
-
disabled:
|
|
15
|
+
disabled: i = !1,
|
|
16
16
|
className: V,
|
|
17
17
|
style: v,
|
|
18
18
|
children: x
|
|
19
|
-
} = L, { t: d } = z(), { loginUserInfo:
|
|
19
|
+
} = L, { t: d } = z(), { loginUserInfo: c } = Z(), { activeConversation: e } = $(), { allMembers: t, getGroupMemberList: C, memberCount: g } = q(), [A, b] = B(!1), p = j(null), k = n(() => c == null ? void 0 : c.userId, [c]), I = n(() => (e == null ? void 0 : e.type) === P.C2C, [e]), N = n(() => (t == null ? void 0 : t.map((o) => ({
|
|
20
20
|
key: o.userID,
|
|
21
21
|
label: o.nick || o.userID,
|
|
22
22
|
avatarUrl: o.avatar
|
|
23
|
-
}))) ?? [], [t]), M = n(() => !(!e ||
|
|
23
|
+
}))) ?? [], [t]), M = n(() => !(!e || i), [e, i]), h = l(() => {
|
|
24
24
|
var r;
|
|
25
25
|
const o = (r = e == null ? void 0 : e.userProfile) == null ? void 0 : r.userID;
|
|
26
26
|
if (!o) {
|
|
@@ -39,13 +39,13 @@ import '../../../styles/VideoCallPicker.css';const u = {
|
|
|
39
39
|
if ((e == null ? void 0 : e.type) !== P.GROUP)
|
|
40
40
|
return;
|
|
41
41
|
const o = (t == null ? void 0 : t.length) || 0;
|
|
42
|
-
o < (g || 0) &&
|
|
42
|
+
o < (g || 0) && C({
|
|
43
43
|
count: Q,
|
|
44
44
|
offset: o
|
|
45
45
|
});
|
|
46
|
-
}, [e, t, g,
|
|
46
|
+
}, [e, t, g, C]), y = l(() => {
|
|
47
47
|
f(), b(!0);
|
|
48
|
-
}, [f]),
|
|
48
|
+
}, [f]), a = l(() => {
|
|
49
49
|
b(!1);
|
|
50
50
|
}, []), G = l(() => {
|
|
51
51
|
var D;
|
|
@@ -59,17 +59,17 @@ import '../../../styles/VideoCallPicker.css';const u = {
|
|
|
59
59
|
console.warn("No members selected for group call");
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
const m = r.map((
|
|
62
|
+
const m = r.map((_) => _.key);
|
|
63
63
|
try {
|
|
64
64
|
S({
|
|
65
65
|
userIDList: m,
|
|
66
66
|
chatGroupID: o,
|
|
67
67
|
type: E
|
|
68
|
-
}),
|
|
69
|
-
} catch (
|
|
70
|
-
console.error("Failed to start group video call:",
|
|
68
|
+
}), a();
|
|
69
|
+
} catch (_) {
|
|
70
|
+
console.error("Failed to start group video call:", _);
|
|
71
71
|
}
|
|
72
|
-
}, [e,
|
|
72
|
+
}, [e, a]), w = l(() => {
|
|
73
73
|
if (!M) {
|
|
74
74
|
console.warn("Cannot start video call");
|
|
75
75
|
return;
|
|
@@ -86,13 +86,13 @@ import '../../../styles/VideoCallPicker.css';const u = {
|
|
|
86
86
|
className: Y(
|
|
87
87
|
u["video-call-picker__button"],
|
|
88
88
|
{
|
|
89
|
-
[u["video-call-picker__button--disabled"]]:
|
|
89
|
+
[u["video-call-picker__button--disabled"]]: i
|
|
90
90
|
},
|
|
91
91
|
V
|
|
92
92
|
),
|
|
93
93
|
style: v,
|
|
94
94
|
onClick: w,
|
|
95
|
-
disabled:
|
|
95
|
+
disabled: i,
|
|
96
96
|
"aria-label": R || "Video Call",
|
|
97
97
|
children: x || /* @__PURE__ */ s(
|
|
98
98
|
K,
|
|
@@ -109,8 +109,8 @@ import '../../../styles/VideoCallPicker.css';const u = {
|
|
|
109
109
|
visible: A,
|
|
110
110
|
title: d("MessageInput.select_call_members"),
|
|
111
111
|
cancelText: d("MessageInput.cancel"),
|
|
112
|
-
onCancel:
|
|
113
|
-
onClose:
|
|
112
|
+
onCancel: a,
|
|
113
|
+
onClose: a,
|
|
114
114
|
confirmText: d("MessageInput.initiate_call"),
|
|
115
115
|
onConfirm: O,
|
|
116
116
|
className: u["group-call-dialog"],
|
|
@@ -131,5 +131,5 @@ import '../../../styles/VideoCallPicker.css';const u = {
|
|
|
131
131
|
] }) });
|
|
132
132
|
};
|
|
133
133
|
export {
|
|
134
|
-
|
|
134
|
+
ie as VideoCallPicker
|
|
135
135
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as k } from "react";
|
|
3
3
|
import { Icon as p } from "../Icon/Icon.js";
|
|
4
4
|
import { IconTypes as l } from "../Icon/type.js";
|
|
5
|
-
import '../../styles/
|
|
5
|
+
import '../../styles/index2.css';function g(a) {
|
|
6
6
|
const {
|
|
7
7
|
checked: n = !1,
|
|
8
8
|
className: s,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as s, jsxs as F } from "react/jsx-runtime";
|
|
2
2
|
import O, { useState as m, useRef as S, useImperativeHandle as V } from "react";
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { IconTypes as
|
|
5
|
-
import '../../styles/Input.css';const
|
|
3
|
+
import { Icon as A } from "../Icon/Icon.js";
|
|
4
|
+
import { IconTypes as B } from "../Icon/type.js";
|
|
5
|
+
import '../../styles/Input.css';const J = O.forwardRef(
|
|
6
6
|
(v, b) => {
|
|
7
7
|
const {
|
|
8
8
|
className: h = "",
|
|
@@ -68,9 +68,9 @@ import '../../styles/Input.css';const G = O.forwardRef(
|
|
|
68
68
|
),
|
|
69
69
|
g,
|
|
70
70
|
N && l && /* @__PURE__ */ s(
|
|
71
|
-
|
|
71
|
+
A,
|
|
72
72
|
{
|
|
73
|
-
type:
|
|
73
|
+
type: B.CLEAR,
|
|
74
74
|
height: 13,
|
|
75
75
|
width: 13,
|
|
76
76
|
onClick: (t) => {
|
|
@@ -82,5 +82,5 @@ import '../../styles/Input.css';const G = O.forwardRef(
|
|
|
82
82
|
}
|
|
83
83
|
);
|
|
84
84
|
export {
|
|
85
|
-
|
|
85
|
+
J as Input
|
|
86
86
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as r, 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
|
+
import { Modal as x } from "@mui/base/Modal";
|
|
3
4
|
import { c as u } from "../../external_modules/classnames-HRMVOjAa.js";
|
|
4
|
-
import {
|
|
5
|
-
import { C as A } from "../../external_modules/react-vendors-3raCpd-g.js";
|
|
5
|
+
import { C as A } from "../../external_modules/react-vendors-x_iUMC12.js";
|
|
6
6
|
import '../../styles/Modal.css';const E = "uikit-root", N = "uikit-backdrop", R = "uikit-backdropEnterActive", t = {
|
|
7
7
|
root: E,
|
|
8
8
|
backdrop: N,
|
|
@@ -16,15 +16,15 @@ import '../../styles/Modal.css';const E = "uikit-root", N = "uikit-backdrop", R
|
|
|
16
16
|
const { className: e, open: c, onClick: o } = i, [s, n] = m(!1), l = p(null);
|
|
17
17
|
return b(() => {
|
|
18
18
|
n(c || !1);
|
|
19
|
-
}, [c]), /* @__PURE__ */
|
|
19
|
+
}, [c]), /* @__PURE__ */ r(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
ref: l,
|
|
23
23
|
className: u(t.backdrop, {
|
|
24
24
|
[t.backdropEnterActive]: s
|
|
25
25
|
}, e),
|
|
26
|
-
onClick: (
|
|
27
|
-
n(!1), o == null || o(
|
|
26
|
+
onClick: (a) => {
|
|
27
|
+
n(!1), o == null || o(a);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
);
|
|
@@ -37,8 +37,8 @@ function T(i) {
|
|
|
37
37
|
style: c,
|
|
38
38
|
className: o,
|
|
39
39
|
children: s
|
|
40
|
-
} = i, n = p(null), [l,
|
|
41
|
-
return /* @__PURE__ */
|
|
40
|
+
} = i, n = p(null), [l, a] = m(!0);
|
|
41
|
+
return /* @__PURE__ */ r(
|
|
42
42
|
x,
|
|
43
43
|
{
|
|
44
44
|
open: d,
|
|
@@ -52,10 +52,10 @@ function T(i) {
|
|
|
52
52
|
style: { ...c }
|
|
53
53
|
},
|
|
54
54
|
backdrop: {
|
|
55
|
-
onClick: () =>
|
|
55
|
+
onClick: () => a(!1)
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(
|
|
59
59
|
A,
|
|
60
60
|
{
|
|
61
61
|
in: l,
|
|
@@ -73,12 +73,12 @@ function T(i) {
|
|
|
73
73
|
exitActive: t["modal-content-exit-active"]
|
|
74
74
|
},
|
|
75
75
|
onEnter: () => {
|
|
76
|
-
|
|
76
|
+
a(!0);
|
|
77
77
|
},
|
|
78
78
|
onExited: () => {
|
|
79
|
-
e == null || e(),
|
|
79
|
+
e == null || e(), a(!0);
|
|
80
80
|
},
|
|
81
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ r("div", { ref: n, children: s })
|
|
82
82
|
}
|
|
83
83
|
) })
|
|
84
84
|
}
|
|
@@ -4,7 +4,7 @@ import { Icon as B } from "../Icon/Icon.js";
|
|
|
4
4
|
import { IconTypes as D } from "../Icon/type.js";
|
|
5
5
|
import { Popup as H } from "../Popup/index.js";
|
|
6
6
|
import { usePluginsElement as L } from "./hooks/usePluginsElement.js";
|
|
7
|
-
import '../../styles/
|
|
7
|
+
import '../../styles/index4.css';function M(g, f) {
|
|
8
8
|
const {
|
|
9
9
|
plugins: N = [],
|
|
10
10
|
showNumber: x,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as f, Fragment as P } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as I, useState as x, useLayoutEffect as h } from "react";
|
|
3
|
-
import '../../styles/
|
|
3
|
+
import '../../styles/index5.css';function N(g) {
|
|
4
4
|
const {
|
|
5
5
|
show: o,
|
|
6
6
|
close: c,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Unstable_Popup as u } from "@mui/base/Unstable_Popup";
|
|
3
3
|
function m(t) {
|
|
4
4
|
const {
|
|
5
5
|
anchor: o,
|
|
6
6
|
children: e,
|
|
7
7
|
open: r = !1,
|
|
8
|
-
placement:
|
|
9
|
-
disablePortal:
|
|
10
|
-
strategy:
|
|
11
|
-
offset:
|
|
12
|
-
slotProps:
|
|
8
|
+
placement: l = "top",
|
|
9
|
+
disablePortal: s = !1,
|
|
10
|
+
strategy: a = "absolute",
|
|
11
|
+
offset: n = 10,
|
|
12
|
+
slotProps: p = {}
|
|
13
13
|
} = t;
|
|
14
14
|
return o ? /* @__PURE__ */ f(
|
|
15
15
|
u,
|
|
16
16
|
{
|
|
17
17
|
open: r,
|
|
18
18
|
anchor: o,
|
|
19
|
-
placement:
|
|
20
|
-
disablePortal:
|
|
21
|
-
strategy:
|
|
22
|
-
slotProps:
|
|
23
|
-
offset:
|
|
19
|
+
placement: l,
|
|
20
|
+
disablePortal: s,
|
|
21
|
+
strategy: a,
|
|
22
|
+
slotProps: p,
|
|
23
|
+
offset: n,
|
|
24
24
|
children: e
|
|
25
25
|
}
|
|
26
26
|
) : null;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import s, { useState as
|
|
3
|
-
import { useMyProfile as
|
|
4
|
-
import { MyProfile as
|
|
2
|
+
import s, { useState as p } from "react";
|
|
3
|
+
import { useMyProfile as P } from "./hooks/useMyProfile.js";
|
|
4
|
+
import { MyProfile as a } from "./myProfile/MyProfile.js";
|
|
5
5
|
import { TUIProfileDefault as c } from "./ProfileDefault.js";
|
|
6
6
|
import '../../styles/Profile.css';function u(t) {
|
|
7
7
|
const {
|
|
8
8
|
className: i,
|
|
9
9
|
TUIProfile: l
|
|
10
|
-
} = t, { myProfile: e, updateMyProfile: n } =
|
|
10
|
+
} = t, { myProfile: e, updateMyProfile: n } = P(), [r, f] = p(!1);
|
|
11
11
|
return /* @__PURE__ */ o(m, { children: r ? /* @__PURE__ */ o(
|
|
12
12
|
l || c,
|
|
13
13
|
{
|
|
@@ -19,7 +19,7 @@ import '../../styles/Profile.css';function u(t) {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
) : /* @__PURE__ */ o(
|
|
22
|
-
|
|
22
|
+
a,
|
|
23
23
|
{
|
|
24
24
|
profile: e,
|
|
25
25
|
handleAvatar: () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Profile } from '@tencentcloud/lite-chat';
|
|
3
2
|
import { UpdateMyProfileParams } from '@tencentcloud/chat-uikit-engine-lite';
|
|
3
|
+
import { Profile } from '@tencentcloud/lite-chat';
|
|
4
4
|
export interface TUIProfileDefaultProps {
|
|
5
5
|
userInfo?: Profile | undefined;
|
|
6
6
|
update?: ((option: UpdateMyProfileParams) => void) | undefined;
|
|
@@ -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-lite";
|
|
4
4
|
import { useUIKit as R, IconChevronLeft as F } from "@tencentcloud/uikit-base-component-react";
|
|
5
|
-
import {
|
|
5
|
+
import { Avatar as G } from "tuikit-atomicx-react/chat";
|
|
6
6
|
import { DivWithEdit as S } from "../DivWithEdit/DivWithEdit.js";
|
|
7
7
|
import { DatePicker as B } from "./DatePicker/DatePicker.js";
|
|
8
8
|
const c = {
|
|
@@ -41,39 +41,39 @@ const c = {
|
|
|
41
41
|
}
|
|
42
42
|
];
|
|
43
43
|
function z(h) {
|
|
44
|
-
var
|
|
44
|
+
var D, Y, b, A, _, L;
|
|
45
45
|
const {
|
|
46
46
|
userInfo: e,
|
|
47
47
|
update: T,
|
|
48
48
|
onClose: p,
|
|
49
|
-
className:
|
|
50
|
-
} = h, { t: r } = R(), [
|
|
49
|
+
className: v
|
|
50
|
+
} = h, { t: r } = R(), [g, o] = x(""), $ = (t) => {
|
|
51
51
|
const l = String(t);
|
|
52
52
|
if (l.length === 8) {
|
|
53
|
-
const n = l.substring(0, 4),
|
|
54
|
-
return `${n}/${
|
|
53
|
+
const n = l.substring(0, 4), d = l.substring(4, 6), O = l.substring(6, 8);
|
|
54
|
+
return `${n}/${d}/${O}`;
|
|
55
55
|
}
|
|
56
56
|
return `${t}`;
|
|
57
57
|
}, f = (t) => {
|
|
58
58
|
if ((t == null ? void 0 : t.length) === 8) {
|
|
59
|
-
const l = Number(t.slice(0, 4)), n = Number(t.slice(4, 6)),
|
|
60
|
-
return new Date(l, n - 1,
|
|
59
|
+
const l = Number(t.slice(0, 4)), n = Number(t.slice(4, 6)), d = Number(t.slice(-2));
|
|
60
|
+
return new Date(l, n - 1, d);
|
|
61
61
|
}
|
|
62
62
|
return /* @__PURE__ */ new Date();
|
|
63
63
|
}, k = (t) => {
|
|
64
64
|
const l = t.getDate() > 9 ? t.getDate() : `0${t.getDate()}`, n = t.getMonth() > 8 ? t.getMonth() + 1 : `0${t.getMonth() + 1}`;
|
|
65
65
|
return `${t.getFullYear()}${n}${l}`;
|
|
66
|
-
},
|
|
66
|
+
}, u = (t) => {
|
|
67
67
|
o(t);
|
|
68
|
-
},
|
|
68
|
+
}, m = (t) => {
|
|
69
69
|
T && T(t), o("");
|
|
70
70
|
}, U = (t) => {
|
|
71
|
-
|
|
71
|
+
m({ gender: t.value });
|
|
72
72
|
}, w = (t) => {
|
|
73
|
-
|
|
73
|
+
m({ allowType: t.value });
|
|
74
74
|
};
|
|
75
75
|
function M(t) {
|
|
76
|
-
|
|
76
|
+
m({
|
|
77
77
|
birthday: Number(k(t))
|
|
78
78
|
});
|
|
79
79
|
}
|
|
@@ -93,7 +93,7 @@ function z(h) {
|
|
|
93
93
|
const n = {
|
|
94
94
|
[l]: t.value
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
m(n);
|
|
97
97
|
}, C = [
|
|
98
98
|
{
|
|
99
99
|
name: "Signature",
|
|
@@ -103,12 +103,12 @@ function z(h) {
|
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
name: "Gender",
|
|
106
|
-
value: r(e != null && e.gender && ((
|
|
107
|
-
c[e == null ? void 0 : e.gender][0],
|
|
108
|
-
(_ = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : _.toLocaleUpperCase()
|
|
109
|
-
)) ? `TUIProfile.${(Y = c[e == null ? void 0 : e.gender]) == null ? void 0 : Y.replace(
|
|
106
|
+
value: r(e != null && e.gender && ((Y = c[e == null ? void 0 : e.gender]) != null && Y.replace(
|
|
110
107
|
c[e == null ? void 0 : e.gender][0],
|
|
111
108
|
(D = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : D.toLocaleUpperCase()
|
|
109
|
+
)) ? `TUIProfile.${(A = c[e == null ? void 0 : e.gender]) == null ? void 0 : A.replace(
|
|
110
|
+
c[e == null ? void 0 : e.gender][0],
|
|
111
|
+
(b = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : b.toLocaleUpperCase()
|
|
112
112
|
)}` : ""),
|
|
113
113
|
type: "select",
|
|
114
114
|
children: /* @__PURE__ */ i("ul", { className: "select-list", children: N == null ? void 0 : N.map((t, l) => {
|
|
@@ -132,7 +132,7 @@ function z(h) {
|
|
|
132
132
|
name: "AllowType",
|
|
133
133
|
value: r(`TUIProfile.${(L = E[(e == null ? void 0 : e.allowType) || ""]) == null ? void 0 : L.replace(
|
|
134
134
|
e && E[e == null ? void 0 : e.allowType][0],
|
|
135
|
-
e && ((
|
|
135
|
+
e && ((_ = E[e == null ? void 0 : e.allowType][0]) == null ? void 0 : _.toLocaleUpperCase())
|
|
136
136
|
)}`),
|
|
137
137
|
type: "select",
|
|
138
138
|
children: /* @__PURE__ */ i("ul", { className: "select-list", children: y == null ? void 0 : y.map((t, l) => {
|
|
@@ -154,7 +154,7 @@ function z(h) {
|
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
name: "Birthday",
|
|
157
|
-
value: e != null && e.birthday ?
|
|
157
|
+
value: e != null && e.birthday ? $(e.birthday) : "",
|
|
158
158
|
type: "select",
|
|
159
159
|
children: /* @__PURE__ */ i(
|
|
160
160
|
B,
|
|
@@ -168,7 +168,7 @@ function z(h) {
|
|
|
168
168
|
)
|
|
169
169
|
}
|
|
170
170
|
];
|
|
171
|
-
return /* @__PURE__ */ s("div", { className: `${
|
|
171
|
+
return /* @__PURE__ */ s("div", { className: `${v} tui-profile`, children: [
|
|
172
172
|
/* @__PURE__ */ s(
|
|
173
173
|
"header",
|
|
174
174
|
{
|
|
@@ -197,8 +197,8 @@ function z(h) {
|
|
|
197
197
|
className: "tui-profile-nick",
|
|
198
198
|
value: e == null ? void 0 : e.nick,
|
|
199
199
|
type: "text",
|
|
200
|
-
toggle:
|
|
201
|
-
isEdit:
|
|
200
|
+
toggle: u,
|
|
201
|
+
isEdit: g === "nick",
|
|
202
202
|
confirm: P,
|
|
203
203
|
close: () => {
|
|
204
204
|
o("");
|
|
@@ -222,8 +222,8 @@ function z(h) {
|
|
|
222
222
|
name: t.name,
|
|
223
223
|
value: t.value,
|
|
224
224
|
type: t.type,
|
|
225
|
-
toggle:
|
|
226
|
-
isEdit:
|
|
225
|
+
toggle: u,
|
|
226
|
+
isEdit: g === t.name,
|
|
227
227
|
confirm: P,
|
|
228
228
|
close: () => {
|
|
229
229
|
o("");
|