@tencentcloud/chat-uikit-react 3.0.0 → 3.0.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/README.md +8 -8
  3. package/dist/{ChatSetting-C7QlwAiq.js → ChatSetting-79tDbXT3.js} +5953 -5890
  4. package/dist/components/Chat/Chat.js +10 -9
  5. package/dist/components/ChatHeader/ChatHeader.js +12 -11
  6. package/dist/components/ChatHeader/ChatHeaderActions/ChatHeaderActions.js +10 -9
  7. package/dist/components/ChatHeader/ChatHeaderUI/ChatHeaderUI.js +10 -9
  8. package/dist/components/Checkbox/index.js +1 -1
  9. package/dist/components/Model/index.js +1 -1
  10. package/dist/components/Plugins/index.js +1 -1
  11. package/dist/components/Popup/index.js +1 -1
  12. package/dist/components/Profile/Profile.d.ts +1 -1
  13. package/dist/components/Profile/Profile.js +16 -16
  14. package/dist/components/Profile/ProfileDefault.js +39 -39
  15. package/dist/components/Profile/myProfile/MyProfile.js +10 -9
  16. package/dist/components/index.d.ts +0 -1
  17. package/dist/components/index.js +25 -33
  18. package/dist/context/ChatContext.js +6 -5
  19. package/dist/hooks/index.js +0 -1
  20. package/dist/index.js +2924 -1516
  21. package/dist/locales/en-US/TUIContact.d.ts +44 -0
  22. package/dist/locales/en-US/TUIContact.js +46 -1
  23. package/dist/locales/en-US/index.d.ts +44 -0
  24. package/dist/locales/ja-JP/TUIContact.d.ts +44 -0
  25. package/dist/locales/ja-JP/TUIContact.js +46 -1
  26. package/dist/locales/ja-JP/index.d.ts +44 -0
  27. package/dist/locales/ko-KR/TUIContact.d.ts +44 -0
  28. package/dist/locales/ko-KR/TUIContact.js +46 -1
  29. package/dist/locales/ko-KR/index.d.ts +44 -0
  30. package/dist/locales/zh-CN/TUIContact.d.ts +44 -0
  31. package/dist/locales/zh-CN/TUIContact.js +46 -1
  32. package/dist/locales/zh-CN/index.d.ts +44 -0
  33. package/dist/locales/zh-TW/TUIContact.d.ts +44 -0
  34. package/dist/locales/zh-TW/TUIContact.js +46 -1
  35. package/dist/locales/zh-TW/index.d.ts +44 -0
  36. package/dist/states/ChatHeaderState.js +8 -7
  37. package/dist/styles/ChatSetting.css +1 -1
  38. package/dist/styles/index.css +1 -1
  39. package/dist/styles/index2.css +1 -1
  40. package/dist/styles/index3.css +1 -1
  41. package/dist/styles/index4.css +1 -1
  42. package/dist/styles/index5.css +1 -1
  43. package/package.json +3 -3
  44. package/src/components/Profile/Profile.tsx +20 -17
  45. package/src/components/Profile/ProfileDefault.tsx +4 -6
  46. package/src/components/index.ts +0 -1
  47. package/src/hooks/index.ts +0 -2
  48. package/src/locales/en-US/TUIContact.ts +45 -0
  49. package/src/locales/ja-JP/TUIContact.ts +45 -0
  50. package/src/locales/ko-KR/TUIContact.ts +45 -0
  51. package/src/locales/zh-CN/TUIContact.ts +45 -0
  52. package/src/locales/zh-TW/TUIContact.ts +46 -0
  53. package/dist/components/Contact/Contact.d.ts +0 -3
  54. package/dist/components/Contact/Contact.js +0 -81
  55. package/dist/components/Contact/ContactInfo/ContactInfo.d.ts +0 -8
  56. package/dist/components/Contact/ContactInfo/ContactInfo.js +0 -27
  57. package/dist/components/Contact/ContactInfo/addFriendInfo.d.ts +0 -8
  58. package/dist/components/Contact/ContactInfo/addFriendInfo.js +0 -61
  59. package/dist/components/Contact/ContactInfo/basicInfo.d.ts +0 -8
  60. package/dist/components/Contact/ContactInfo/basicInfo.js +0 -48
  61. package/dist/components/Contact/ContactInfo/blockInfo.d.ts +0 -8
  62. package/dist/components/Contact/ContactInfo/blockInfo.js +0 -33
  63. package/dist/components/Contact/ContactInfo/friendApplication.d.ts +0 -8
  64. package/dist/components/Contact/ContactInfo/friendApplication.js +0 -47
  65. package/dist/components/Contact/ContactInfo/friendInfo.d.ts +0 -9
  66. package/dist/components/Contact/ContactInfo/friendInfo.js +0 -83
  67. package/dist/components/Contact/ContactInfo/groupInfo.d.ts +0 -9
  68. package/dist/components/Contact/ContactInfo/groupInfo.js +0 -45
  69. package/dist/components/Contact/ContactInfo/hooks/useContactInfo.d.ts +0 -11
  70. package/dist/components/Contact/ContactInfo/hooks/useContactInfo.js +0 -84
  71. package/dist/components/Contact/ContactList/ContactList.d.ts +0 -4
  72. package/dist/components/Contact/ContactList/ContactList.js +0 -152
  73. package/dist/components/Contact/hooks/useTUIContact.d.ts +0 -12
  74. package/dist/components/Contact/hooks/useTUIContact.js +0 -58
  75. package/dist/components/Contact/index.d.ts +0 -3
  76. package/dist/components/Contact/index.js +0 -10
  77. package/dist/components/ContactSearch/ContactSearch.d.ts +0 -3
  78. package/dist/components/ContactSearch/ContactSearch.js +0 -85
  79. package/dist/components/ContactSearch/hooks/useContactSearch.d.ts +0 -6
  80. package/dist/components/ContactSearch/hooks/useContactSearch.js +0 -28
  81. package/dist/styles/ContactInfo.css +0 -1
  82. package/dist/styles/ContactList.css +0 -1
  83. package/dist/styles/ContactSearch.css +0 -1
  84. package/dist/styles/index6.css +0 -1
  85. package/src/components/Contact/Contact.tsx +0 -97
  86. package/src/components/Contact/ContactInfo/ContactInfo.tsx +0 -36
  87. package/src/components/Contact/ContactInfo/addFriendInfo.tsx +0 -88
  88. package/src/components/Contact/ContactInfo/basicInfo.tsx +0 -52
  89. package/src/components/Contact/ContactInfo/blockInfo.tsx +0 -45
  90. package/src/components/Contact/ContactInfo/friendApplication.tsx +0 -68
  91. package/src/components/Contact/ContactInfo/friendInfo.tsx +0 -101
  92. package/src/components/Contact/ContactInfo/groupInfo.tsx +0 -62
  93. package/src/components/Contact/ContactInfo/hooks/useContactInfo.tsx +0 -101
  94. package/src/components/Contact/ContactInfo/index.scss +0 -136
  95. package/src/components/Contact/ContactList/ContactList.tsx +0 -174
  96. package/src/components/Contact/ContactList/index.scss +0 -111
  97. package/src/components/Contact/hooks/useTUIContact.tsx +0 -88
  98. package/src/components/Contact/index.scss +0 -91
  99. package/src/components/Contact/index.ts +0 -3
  100. package/src/components/ContactSearch/ContactSearch.tsx +0 -102
  101. package/src/components/ContactSearch/hooks/useContactSearch.tsx +0 -31
  102. package/src/components/ContactSearch/index.scss +0 -33
@@ -1,29 +1,30 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { E as a, m as e } from "../../ChatSetting-C7QlwAiq.js";
2
+ import { E as a, m as e } from "../../ChatSetting-79tDbXT3.js";
3
3
  import "@tencentcloud/uikit-base-component-react";
4
4
  import "@tencentcloud/chat-uikit-engine";
5
5
  import "@tencentcloud/tui-core";
6
6
  import "react";
7
- import { c as l } from "../../external_modules/classnames-HRMVOjAa.js";
8
- import { ChatProvider as n } from "../../context/ChatContext.js";
9
- import '../../styles/Chat.css';const p = "uikit-chat", h = {
10
- chat: p
11
- }, j = (o) => {
7
+ import "@tencentcloud/chat";
8
+ import { c as p } from "../../external_modules/classnames-HRMVOjAa.js";
9
+ import { ChatProvider as l } from "../../context/ChatContext.js";
10
+ import '../../styles/Chat.css';const n = "uikit-chat", h = {
11
+ chat: n
12
+ }, k = (o) => {
12
13
  const {
13
14
  PlaceholderEmpty: c = null,
14
15
  className: m,
15
16
  style: s,
16
17
  children: i
17
18
  } = o, { activeConversation: t } = a();
18
- return t != null && t.conversationID ? /* @__PURE__ */ r(n, { children: /* @__PURE__ */ r(
19
+ return t != null && t.conversationID ? /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
19
20
  e,
20
21
  {
21
- className: l(h.chat, m),
22
+ className: p(h.chat, m),
22
23
  style: s,
23
24
  children: i
24
25
  }
25
26
  ) }) : c;
26
27
  };
27
28
  export {
28
- j as Chat
29
+ k as Chat
29
30
  };
@@ -1,23 +1,24 @@
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-C7QlwAiq.js";
4
+ import { j as C } from "../../ChatSetting-79tDbXT3.js";
5
5
  import "@tencentcloud/uikit-base-component-react";
6
6
  import "@tencentcloud/tui-core";
7
+ import "@tencentcloud/chat";
7
8
  import "../../states/UIManagerState.js";
8
9
  import { useChatHeaderState as U } from "../../states/ChatHeaderState.js";
9
10
  import x from "./ChatHeaderUI/ChatHeaderUI.js";
10
- const w = (e) => {
11
+ const E = (e) => {
11
12
  const {
12
13
  title: r,
13
14
  avatar: a,
14
15
  enableUserStatus: t = !1,
15
- chatHeaderActions: s,
16
- Avatar: o,
16
+ chatHeaderActions: o,
17
+ Avatar: s,
17
18
  className: i,
18
- style: c
19
+ style: m
19
20
  } = e, {
20
- system: m,
21
+ system: c,
21
22
  conversation: n,
22
23
  isGroup: p,
23
24
  title: l,
@@ -35,16 +36,16 @@ const w = (e) => {
35
36
  userStatus: u,
36
37
  conversation: n,
37
38
  isPeerTyping: S,
38
- system: m,
39
+ system: c,
39
40
  enableUserStatus: t,
40
- chatHeaderActions: s,
41
- Avatar: o,
42
- style: c,
41
+ chatHeaderActions: o,
42
+ Avatar: s,
43
+ style: m,
43
44
  className: i,
44
45
  onSearchClick: e.onSearchClick
45
46
  }
46
47
  );
47
48
  };
48
49
  export {
49
- w as ChatHeader
50
+ E as ChatHeader
50
51
  };
@@ -4,29 +4,30 @@ 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 { h as z, E as N, p as A, m as M } from "../../../ChatSetting-C7QlwAiq.js";
7
+ import { i as z, E as N, p as A, m as M } from "../../../ChatSetting-79tDbXT3.js";
8
+ import "@tencentcloud/chat";
8
9
  import { c as p } from "../../../external_modules/classnames-HRMVOjAa.js";
9
10
  import '../../../styles/ChatHeaderActions.css';const C = {
10
11
  "chat-header-actions": "uikit-chat-header-actions",
11
12
  "icon-button": "uikit-icon-button"
12
- }, K = (I) => {
13
+ }, L = (I) => {
13
14
  const {
14
15
  chatHeaderActions: l = ["videoCall", "audioCall", "search", "chatSetting"],
15
16
  className: f,
16
17
  style: d
17
- } = I, { searchConfig: r } = 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((c) => {
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) => {
18
19
  var t;
19
20
  if (i) {
20
21
  if (!((t = o == null ? void 0 : o.userProfile) != null && t.userID))
21
22
  throw new Error("User ID is not available in Call.");
22
23
  A({
23
24
  callType: o.type,
24
- callMediaType: c,
25
+ callMediaType: r,
25
26
  userIDList: [o.userProfile.userID]
26
27
  });
27
28
  }
28
29
  }, [o, i]), S = u(() => {
29
- const c = {
30
+ const r = {
30
31
  videoCall: {
31
32
  icon: /* @__PURE__ */ e(y, { size: "28px" }),
32
33
  onClick: () => a(m.VIDEO),
@@ -40,7 +41,7 @@ import '../../../styles/ChatHeaderActions.css';const C = {
40
41
  search: {
41
42
  icon: /* @__PURE__ */ e(D, { size: "28px" }),
42
43
  onClick: g,
43
- show: !(r != null && r.hideSearch)
44
+ show: !(c != null && c.hideSearch)
44
45
  },
45
46
  chatSetting: {
46
47
  icon: /* @__PURE__ */ e(b, { size: "28px" }),
@@ -50,9 +51,9 @@ import '../../../styles/ChatHeaderActions.css';const C = {
50
51
  };
51
52
  return l.filter((t) => {
52
53
  var n;
53
- return !!((n = c[t]) != null && n.show);
54
+ return !!((n = r[t]) != null && n.show);
54
55
  }).map((t) => {
55
- const n = c[t];
56
+ const n = r[t];
56
57
  return /* @__PURE__ */ e(
57
58
  "button",
58
59
  {
@@ -74,5 +75,5 @@ import '../../../styles/ChatHeaderActions.css';const C = {
74
75
  );
75
76
  };
76
77
  export {
77
- K as ChatHeaderActions
78
+ L as ChatHeaderActions
78
79
  };
@@ -1,10 +1,11 @@
1
1
  import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
2
  import { useUIKit as O, IconChevronLeft as U } from "@tencentcloud/uikit-base-component-react";
3
- import { h as g, E as I, m as a, P as T } from "../../../ChatSetting-C7QlwAiq.js";
3
+ import { i as g, E as I, m as a, V as T } from "../../../ChatSetting-79tDbXT3.js";
4
4
  import "@tencentcloud/chat-uikit-engine";
5
5
  import "@tencentcloud/tui-core";
6
6
  import "react";
7
- import { c as h } from "../../../external_modules/classnames-HRMVOjAa.js";
7
+ import "@tencentcloud/chat";
8
+ import { c as n } from "../../../external_modules/classnames-HRMVOjAa.js";
8
9
  import { ChatHeaderActions as x } from "../ChatHeaderActions/ChatHeaderActions.js";
9
10
  import '../../../styles/ChatHeaderUI.css';const e = {
10
11
  "chat-header": "uikit-chat-header",
@@ -19,10 +20,10 @@ import '../../../styles/ChatHeaderUI.css';const e = {
19
20
  }, m = {
20
21
  Online: "Online",
21
22
  Offline: "Offline"
22
- }, G = (f) => {
23
+ }, L = (f) => {
23
24
  const {
24
25
  title: u,
25
- avatar: n,
26
+ avatar: h,
26
27
  isPeerTyping: p = !1,
27
28
  system: k = !1,
28
29
  userStatus: c,
@@ -37,7 +38,7 @@ import '../../../styles/ChatHeaderUI.css';const e = {
37
38
  return /* @__PURE__ */ t(
38
39
  a,
39
40
  {
40
- className: h(e["chat-header"], l),
41
+ className: n(e["chat-header"], l),
41
42
  style: _,
42
43
  children: "System Notice"
43
44
  }
@@ -48,18 +49,18 @@ import '../../../styles/ChatHeaderUI.css';const e = {
48
49
  return /* @__PURE__ */ t(
49
50
  a,
50
51
  {
51
- className: h(e["chat-header"], l),
52
+ className: n(e["chat-header"], l),
52
53
  style: _,
53
54
  children: /* @__PURE__ */ i(a, { className: e["chat-header__container"], children: [
54
55
  /* @__PURE__ */ i(a, { className: e["chat-header__left"], children: [
55
- /* @__PURE__ */ t("button", { className: h(e["icon-button"], e["chat-header__back-icon"]), onClick: d, children: /* @__PURE__ */ t(
56
+ /* @__PURE__ */ t("button", { className: n(e["icon-button"], e["chat-header__back-icon"]), onClick: d, children: /* @__PURE__ */ t(
56
57
  U,
57
58
  {
58
59
  onClick: d,
59
60
  size: "28px"
60
61
  }
61
62
  ) }),
62
- s ? /* @__PURE__ */ t(s, { src: n || "" }) : /* @__PURE__ */ t(T, { src: n || "" }),
63
+ s ? /* @__PURE__ */ t(s, { src: h || "" }) : /* @__PURE__ */ t(T, { src: h || "" }),
63
64
  /* @__PURE__ */ i(a, { className: e["chat-header__info"], children: [
64
65
  /* @__PURE__ */ i(a, { className: e["chat-header__title"], children: [
65
66
  u,
@@ -82,5 +83,5 @@ import '../../../styles/ChatHeaderUI.css';const e = {
82
83
  );
83
84
  };
84
85
  export {
85
- G as default
86
+ L as default
86
87
  };
@@ -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/index2.css';function g(a) {
5
+ import '../../styles/index.css';function g(a) {
6
6
  const {
7
7
  checked: n = !1,
8
8
  className: s,
@@ -1,5 +1,5 @@
1
1
  import { jsx as c } from "react/jsx-runtime";
2
- import '../../styles/index3.css';function i(e) {
2
+ import '../../styles/index2.css';function i(e) {
3
3
  const {
4
4
  className: n,
5
5
  onClick: o,
@@ -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/index4.css';function M(g, f) {
7
+ import '../../styles/index3.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/index5.css';function N(g) {
3
+ import '../../styles/index4.css';function N(g) {
4
4
  const {
5
5
  show: o,
6
6
  close: c,
@@ -1,4 +1,4 @@
1
- import { default as React, PropsWithChildren } from 'react';
1
+ import { PropsWithChildren, default as React } from 'react';
2
2
  interface TUIProfileProps {
3
3
  className?: string | undefined;
4
4
  TUIProfile?: React.ComponentType<any>;
@@ -1,36 +1,36 @@
1
1
  import { jsx as o, Fragment as n } from "react/jsx-runtime";
2
2
  import p from "react";
3
3
  import { MyProfile as P } from "./myProfile/MyProfile.js";
4
- import { useMyProfile as a } from "./hooks/useMyProfile.js";
5
- import { TUIProfileDefault as s } from "./ProfileDefault.js";
6
- import { useUIManagerState as I } from "../../states/UIManagerState.js";
7
- import "@tencentcloud/chat-uikit-engine";
8
- import "../../ChatSetting-C7QlwAiq.js";
4
+ import { useMyProfile as s } from "./hooks/useMyProfile.js";
5
+ import { TUIProfileDefault as a } from "./ProfileDefault.js";
6
+ import { i as c } from "../../ChatSetting-79tDbXT3.js";
9
7
  import "@tencentcloud/uikit-base-component-react";
8
+ import "@tencentcloud/chat-uikit-engine";
10
9
  import "@tencentcloud/tui-core";
11
- import '../../styles/Profile.css';function U(i) {
10
+ import "@tencentcloud/chat";
11
+ import '../../styles/Profile.css';function u(i) {
12
12
  const {
13
- className: f,
14
- TUIProfile: m
15
- } = i, { myProfile: r, updateMyProfile: l } = a(), { setTUIProfileShow: e, TUIProfileShow: t } = I("TUIProfile");
16
- return /* @__PURE__ */ o(n, { children: t ? /* @__PURE__ */ o(
17
- m || s,
13
+ className: t,
14
+ TUIProfile: f
15
+ } = i, { myProfile: r, updateMyProfile: m } = s(), { setProfileOpen: l, isProfileOpen: e } = c();
16
+ return /* @__PURE__ */ o(n, { children: e ? /* @__PURE__ */ o(
17
+ f || a,
18
18
  {
19
- className: f,
19
+ className: t,
20
20
  userInfo: r,
21
- update: l
21
+ update: m
22
22
  }
23
23
  ) : /* @__PURE__ */ o(
24
24
  P,
25
25
  {
26
26
  profile: r,
27
27
  handleAvatar: () => {
28
- e && e(!t);
28
+ l(!e);
29
29
  }
30
30
  }
31
31
  ) });
32
32
  }
33
- const C = p.memo(U);
33
+ const g = p.memo(u);
34
34
  export {
35
- C as Profile
35
+ g as Profile
36
36
  };
@@ -2,16 +2,16 @@ 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 { P as G } from "../../ChatSetting-C7QlwAiq.js";
5
+ import { i as G, V as B } from "../../ChatSetting-79tDbXT3.js";
6
6
  import "@tencentcloud/tui-core";
7
- import { useUIManagerState as B } from "../../states/UIManagerState.js";
8
- import { DivWithEdit as A } from "../DivWithEdit/DivWithEdit.js";
7
+ import "@tencentcloud/chat";
8
+ import { DivWithEdit as L } from "../DivWithEdit/DivWithEdit.js";
9
9
  import { DatePicker as z } from "./DatePicker/DatePicker.js";
10
10
  const c = {
11
11
  [a.TYPES.GENDER_UNKNOWN]: "Unknown",
12
12
  [a.TYPES.GENDER_MALE]: "male",
13
13
  [a.TYPES.GENDER_FEMALE]: "female"
14
- }, p = {
14
+ }, h = {
15
15
  [a.TYPES.ALLOW_TYPE_ALLOW_ANY]: "allowAny",
16
16
  [a.TYPES.ALLOW_TYPE_NEED_CONFIRM]: "needConfirm",
17
17
  [a.TYPES.ALLOW_TYPE_DENY_ANY]: "denyAny"
@@ -42,43 +42,43 @@ const c = {
42
42
  value: a.TYPES.ALLOW_TYPE_DENY_ANY
43
43
  }
44
44
  ];
45
- function K(h) {
46
- var D, _, f, Y, b, S;
45
+ function K(p) {
46
+ var P, _, D, Y, b, A;
47
47
  const {
48
48
  userInfo: e,
49
- className: L,
49
+ className: S,
50
50
  update: y
51
- } = h, { t: r } = R(), { setTUIProfileShow: T } = B("TUIProfileDefault"), [u, o] = x(""), U = (t) => {
51
+ } = p, { t: r } = R(), { setProfileOpen: f } = G(), [T, o] = x(""), $ = (t) => {
52
52
  const l = String(t);
53
53
  if (l.length === 8) {
54
54
  const n = l.substring(0, 4), d = l.substring(4, 6), O = l.substring(6, 8);
55
55
  return `${n}/${d}/${O}`;
56
56
  }
57
57
  return `${t}`;
58
- }, $ = (t) => {
58
+ }, v = (t) => {
59
59
  if ((t == null ? void 0 : t.length) === 8) {
60
60
  const l = Number(t.slice(0, 4)), n = Number(t.slice(4, 6)), d = Number(t.slice(-2));
61
61
  return new Date(l, n - 1, d);
62
62
  }
63
63
  return /* @__PURE__ */ new Date();
64
- }, v = (t) => {
64
+ }, k = (t) => {
65
65
  const l = t.getDate() > 9 ? t.getDate() : `0${t.getDate()}`, n = t.getMonth() > 8 ? t.getMonth() + 1 : `0${t.getMonth() + 1}`;
66
66
  return `${t.getFullYear()}${n}${l}`;
67
- }, g = (t) => {
67
+ }, u = (t) => {
68
68
  o(t);
69
69
  }, m = (t) => {
70
70
  y && y(t), o("");
71
- }, k = (t) => {
71
+ }, U = (t) => {
72
72
  m({ gender: t.value });
73
73
  }, w = (t) => {
74
74
  m({ allowType: t.value });
75
75
  };
76
- function M(t) {
76
+ function C(t) {
77
77
  m({
78
- birthday: Number(v(t))
78
+ birthday: Number(k(t))
79
79
  });
80
80
  }
81
- const P = (t) => {
81
+ const g = (t) => {
82
82
  let l = "";
83
83
  switch (t == null ? void 0 : t.name) {
84
84
  case "nick":
@@ -95,7 +95,7 @@ function K(h) {
95
95
  [l]: t.value
96
96
  };
97
97
  m(n);
98
- }, C = [
98
+ }, M = [
99
99
  {
100
100
  name: "Signature",
101
101
  value: e == null ? void 0 : e.selfSignature,
@@ -106,10 +106,10 @@ function K(h) {
106
106
  name: "Gender",
107
107
  value: r(e != null && e.gender && ((_ = c[e == null ? void 0 : e.gender]) != null && _.replace(
108
108
  c[e == null ? void 0 : e.gender][0],
109
- (D = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : D.toLocaleUpperCase()
109
+ (P = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : P.toLocaleUpperCase()
110
110
  )) ? `TUIProfile.${(Y = c[e == null ? void 0 : e.gender]) == null ? void 0 : Y.replace(
111
111
  c[e == null ? void 0 : e.gender][0],
112
- (f = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : f.toLocaleUpperCase()
112
+ (D = c[e == null ? void 0 : e.gender][0]) == null ? void 0 : D.toLocaleUpperCase()
113
113
  )}` : ""),
114
114
  type: "select",
115
115
  children: /* @__PURE__ */ i("ul", { className: "select-list", children: E == null ? void 0 : E.map((t, l) => {
@@ -121,7 +121,7 @@ function K(h) {
121
121
  role: "menuitem",
122
122
  tabIndex: l,
123
123
  onClick: () => {
124
- k(t);
124
+ U(t);
125
125
  },
126
126
  children: r(`TUIProfile.${t.label}`)
127
127
  },
@@ -131,9 +131,9 @@ function K(h) {
131
131
  },
132
132
  {
133
133
  name: "AllowType",
134
- value: r(`TUIProfile.${(S = p[(e == null ? void 0 : e.allowType) || ""]) == null ? void 0 : S.replace(
135
- e && p[e == null ? void 0 : e.allowType][0],
136
- e && ((b = p[e == null ? void 0 : e.allowType][0]) == null ? void 0 : b.toLocaleUpperCase())
134
+ value: r(`TUIProfile.${(A = h[(e == null ? void 0 : e.allowType) || ""]) == null ? void 0 : A.replace(
135
+ e && h[e == null ? void 0 : e.allowType][0],
136
+ e && ((b = h[e == null ? void 0 : e.allowType][0]) == null ? void 0 : b.toLocaleUpperCase())
137
137
  )}`),
138
138
  type: "select",
139
139
  children: /* @__PURE__ */ i("ul", { className: "select-list", children: N == null ? void 0 : N.map((t, l) => {
@@ -155,7 +155,7 @@ function K(h) {
155
155
  },
156
156
  {
157
157
  name: "Birthday",
158
- value: e != null && e.birthday ? U(e.birthday) : "",
158
+ value: e != null && e.birthday ? $(e.birthday) : "",
159
159
  type: "select",
160
160
  children: /* @__PURE__ */ i(
161
161
  z,
@@ -163,19 +163,19 @@ function K(h) {
163
163
  className: "tui-profile-birthday",
164
164
  isOpen: !0,
165
165
  format: "y-MM-dd",
166
- onChange: M,
167
- value: $(`${e == null ? void 0 : e.birthday}`)
166
+ onChange: C,
167
+ value: v(`${e == null ? void 0 : e.birthday}`)
168
168
  }
169
169
  )
170
170
  }
171
171
  ];
172
- return /* @__PURE__ */ s("div", { className: `${L} tui-profile`, children: [
172
+ return /* @__PURE__ */ s("div", { className: `${S} tui-profile`, children: [
173
173
  /* @__PURE__ */ s(
174
174
  "header",
175
175
  {
176
176
  className: "tui-profile-header",
177
177
  onClick: () => {
178
- T && T(!1);
178
+ f(!1);
179
179
  },
180
180
  children: [
181
181
  /* @__PURE__ */ i(F, { size: "24px" }),
@@ -185,22 +185,22 @@ function K(h) {
185
185
  ),
186
186
  /* @__PURE__ */ s("main", { className: "tui-profile-main", children: [
187
187
  /* @__PURE__ */ i("div", { className: "tui-profile-avatar", children: /* @__PURE__ */ i(
188
- G,
188
+ B,
189
189
  {
190
190
  src: (e == null ? void 0 : e.avatar) || "",
191
191
  size: "xl"
192
192
  }
193
193
  ) }),
194
194
  /* @__PURE__ */ i(
195
- A,
195
+ L,
196
196
  {
197
197
  name: "nick",
198
198
  className: "tui-profile-nick",
199
199
  value: e == null ? void 0 : e.nick,
200
200
  type: "text",
201
- toggle: g,
202
- isEdit: u === "nick",
203
- confirm: P,
201
+ toggle: u,
202
+ isEdit: T === "nick",
203
+ confirm: g,
204
204
  close: () => {
205
205
  o("");
206
206
  }
@@ -211,21 +211,21 @@ function K(h) {
211
211
  /* @__PURE__ */ i("span", { children: e == null ? void 0 : e.userID })
212
212
  ] })
213
213
  ] }),
214
- /* @__PURE__ */ i("ul", { className: "tui-profile-list", children: C.map((t) => {
214
+ /* @__PURE__ */ i("ul", { className: "tui-profile-list", children: M.map((t) => {
215
215
  const l = `${t.name}`;
216
216
  return /* @__PURE__ */ s("li", { className: "tui-profile-list-item", children: [
217
217
  /* @__PURE__ */ i("h4", { children: r(`TUIProfile.${t.name}`) }),
218
218
  /* @__PURE__ */ i(
219
- A,
219
+ L,
220
220
  {
221
221
  className: "tui-profile-div-with-edit",
222
222
  classEditName: "tui-profile-edit",
223
223
  name: t.name,
224
224
  value: t.value,
225
225
  type: t.type,
226
- toggle: g,
227
- isEdit: u === t.name,
228
- confirm: P,
226
+ toggle: u,
227
+ isEdit: T === t.name,
228
+ confirm: g,
229
229
  close: () => {
230
230
  o("");
231
231
  },
@@ -237,8 +237,8 @@ function K(h) {
237
237
  ] });
238
238
  }
239
239
  const j = W.memo(K);
240
- function te(h) {
241
- const e = { ...h };
240
+ function te(p) {
241
+ const e = { ...p };
242
242
  return /* @__PURE__ */ i(j, { ...e });
243
243
  }
244
244
  export {
@@ -1,20 +1,21 @@
1
1
  import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
- import { defaultUserAvatar as c } from "../../../constant/avatar.js";
3
- import { P as m } from "../../../ChatSetting-C7QlwAiq.js";
4
- import { IconHorizontalMoreTwo as n } from "@tencentcloud/uikit-base-component-react";
2
+ import { defaultUserAvatar as s } from "../../../constant/avatar.js";
3
+ import { V as t } from "../../../ChatSetting-79tDbXT3.js";
4
+ import { IconHorizontalMoreTwo as c } from "@tencentcloud/uikit-base-component-react";
5
5
  import "@tencentcloud/chat-uikit-engine";
6
6
  import "@tencentcloud/tui-core";
7
7
  import "react";
8
- import '../../../styles/MyProfile.css';function u(a) {
9
- const { profile: r, className: s = "", handleAvatar: i } = a;
10
- return ((r == null ? void 0 : r.nick) || (r == null ? void 0 : r.userID)) && /* @__PURE__ */ e("div", { className: `profile ${s}`, children: [
8
+ import "@tencentcloud/chat";
9
+ import '../../../styles/MyProfile.css';function N(a) {
10
+ const { profile: r, className: m = "", handleAvatar: i } = a;
11
+ return ((r == null ? void 0 : r.nick) || (r == null ? void 0 : r.userID)) && /* @__PURE__ */ e("div", { className: `profile ${m}`, children: [
11
12
  /* @__PURE__ */ e("div", { className: "profile-content", onClick: i, children: [
12
- /* @__PURE__ */ o(m, { src: r.avatar || c }),
13
+ /* @__PURE__ */ o(t, { src: r.avatar || s }),
13
14
  /* @__PURE__ */ o("div", { className: "profile-name", children: r.nick || r.userID })
14
15
  ] }),
15
- /* @__PURE__ */ o("div", { className: "profile-more", onClick: i, children: /* @__PURE__ */ o(n, { size: "24px" }) })
16
+ /* @__PURE__ */ o("div", { className: "profile-more", onClick: i, children: /* @__PURE__ */ o(c, { size: "24px" }) })
16
17
  ] });
17
18
  }
18
19
  export {
19
- u as MyProfile
20
+ N as MyProfile
20
21
  };
@@ -1,7 +1,6 @@
1
1
  export * from './ChatHeader';
2
2
  export * from './Chat';
3
3
  export * from './Checkbox';
4
- export * from './Contact';
5
4
  export * from './DivWithEdit';
6
5
  export * from './EmptyStateIndicator';
7
6
  export * from './Icon';
@@ -1,39 +1,31 @@
1
- import { ChatHeader as r } from "./ChatHeader/ChatHeader.js";
2
- import { ChatHeaderActions as f } from "./ChatHeader/ChatHeaderActions/ChatHeaderActions.js";
1
+ import { ChatHeader as e } from "./ChatHeader/ChatHeader.js";
2
+ import { ChatHeaderActions as p } from "./ChatHeader/ChatHeaderActions/ChatHeaderActions.js";
3
3
  import { Chat as m } from "./Chat/Chat.js";
4
4
  import { Checkbox as a } from "./Checkbox/index.js";
5
- import { ContactList as c } from "./Contact/ContactList/ContactList.js";
6
- import { ContactInfo as C, UnMemoizedContactInfo as d } from "./Contact/ContactInfo/ContactInfo.js";
7
- import { Contact as I, UnMemoizedContact as l } from "./Contact/Contact.js";
8
- import { DivWithEdit as P } from "./DivWithEdit/DivWithEdit.js";
9
- import { EmptyStateIndicator as u } from "./EmptyStateIndicator/EmptyStateIndicator.js";
10
- import { Icon as M, changeTypeToIconClassName as U } from "./Icon/Icon.js";
11
- import { IconTypes as z } from "./Icon/type.js";
12
- import { Model as E } from "./Model/index.js";
13
- import { Plugins as S } from "./Plugins/index.js";
14
- import { Popup as k } from "./Popup/index.js";
15
- import { Profile as w } from "./Profile/Profile.js";
16
- import { TUIProfileDefault as L } from "./Profile/ProfileDefault.js";
17
- import { Switch as W } from "./Switch/Switch.js";
5
+ import { DivWithEdit as c } from "./DivWithEdit/DivWithEdit.js";
6
+ import { EmptyStateIndicator as n } from "./EmptyStateIndicator/EmptyStateIndicator.js";
7
+ import { Icon as d, changeTypeToIconClassName as s } from "./Icon/Icon.js";
8
+ import { IconTypes as I } from "./Icon/type.js";
9
+ import { Model as T } from "./Model/index.js";
10
+ import { Plugins as y } from "./Plugins/index.js";
11
+ import { Popup as D } from "./Popup/index.js";
12
+ import { Profile as H } from "./Profile/Profile.js";
13
+ import { TUIProfileDefault as b } from "./Profile/ProfileDefault.js";
14
+ import { Switch as v } from "./Switch/Switch.js";
18
15
  export {
19
16
  m as Chat,
20
- r as ChatHeader,
21
- f as ChatHeaderActions,
17
+ e as ChatHeader,
18
+ p as ChatHeaderActions,
22
19
  a as Checkbox,
23
- I as Contact,
24
- C as ContactInfo,
25
- c as ContactList,
26
- P as DivWithEdit,
27
- u as EmptyStateIndicator,
28
- M as Icon,
29
- z as IconTypes,
30
- E as Model,
31
- S as Plugins,
32
- k as Popup,
33
- w as Profile,
34
- W as Switch,
35
- L as TUIProfileDefault,
36
- l as UnMemoizedContact,
37
- d as UnMemoizedContactInfo,
38
- U as changeTypeToIconClassName
20
+ c as DivWithEdit,
21
+ n as EmptyStateIndicator,
22
+ d as Icon,
23
+ I as IconTypes,
24
+ T as Model,
25
+ y as Plugins,
26
+ D as Popup,
27
+ H as Profile,
28
+ v as Switch,
29
+ b as TUIProfileDefault,
30
+ s as changeTypeToIconClassName
39
31
  };