tuikit-atomicx-vue3 4.5.1 → 4.5.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.
Files changed (122) hide show
  1. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
  2. package/dist/{PopoverPortal-DghpKKm8.js → PopoverPortal-DV6zFXcf.js} +3 -3
  3. package/dist/{PopoverTrigger-BajjNkGO.js → PopoverTrigger-DIjW4PKa.js} +4 -4
  4. package/dist/{PopperContent-SLoFuK7k.js → PopperContent-D__dbwpA.js} +1 -1
  5. package/dist/{Teleport-DFrneqLM.js → Teleport-98QrIYDI.js} +278 -268
  6. package/dist/baseComp/Modal/Modal.js +3 -3
  7. package/dist/components/AudioSettingPanel/index.js +14 -14
  8. package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +2 -2
  9. package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
  10. package/dist/components/BarrageInput/TextEditor/EditorCore.js +4 -4
  11. package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
  12. package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
  13. package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
  14. package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
  15. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
  16. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +18 -18
  17. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +13 -13
  18. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +11 -11
  19. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -75
  20. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
  21. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
  22. package/dist/components/ConversationList/i18n/en-US.d.ts +1 -0
  23. package/dist/components/ConversationList/i18n/en-US.js +2 -1
  24. package/dist/components/ConversationList/i18n/zh-CN.d.ts +1 -0
  25. package/dist/components/ConversationList/i18n/zh-CN.js +2 -1
  26. package/dist/components/ConversationList/index.d.ts +48 -0
  27. package/dist/components/LiveScenePanel/index.js +9 -10
  28. package/dist/components/MessageInput/AttachmentPicker/index.js +2 -2
  29. package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +2 -2
  30. package/dist/components/MessageInput/MessageInput.js +1 -1
  31. package/dist/components/MessageInput/TextEditor/EditorCore.js +1 -1
  32. package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +3 -3
  33. package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
  34. package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +1 -1
  35. package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +1 -1
  36. package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
  37. package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +2 -2
  38. package/dist/components/MessageInput/TextEditor/index.js +1 -1
  39. package/dist/components/MessageInput/index.js +1 -1
  40. package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
  41. package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
  42. package/dist/components/MessageList/MessageList.js +77 -67
  43. package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
  44. package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
  45. package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
  46. package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
  47. package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
  48. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
  49. package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
  50. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
  51. package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
  52. package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
  53. package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
  54. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
  55. package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
  56. package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
  57. package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
  58. package/dist/components/VideoSettingPanel/index.js +1 -1
  59. package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
  60. package/dist/index-CTthrJb2.js +1461 -0
  61. package/dist/{index-CzCDLp99.js → index-DXC5bPY4.js} +32 -32
  62. package/dist/{index-C8Jw_xE4.js → index-DuAffztD.js} +1731 -1648
  63. package/dist/{index-CiYL_XsE.js → index-hHVD-MG2.js} +1 -1
  64. package/dist/index.js +59 -58
  65. package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
  66. package/dist/states/LoginState.js +43 -43
  67. package/dist/states/MessageInputState/MessageInputState.js +75 -78
  68. package/dist/states/MessageListState/MessageListState.js +26 -23
  69. package/dist/states/RoomParticipantState/index.js +83 -24
  70. package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
  71. package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
  72. package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
  73. package/dist/states/RoomParticipantState/participantManager.js +159 -127
  74. package/dist/states/RoomState/callManager.d.ts +3 -3
  75. package/dist/states/RoomState/callManager.js +20 -20
  76. package/dist/states/RoomState/common.d.ts +3 -2
  77. package/dist/states/RoomState/common.js +34 -24
  78. package/dist/states/RoomState/roomManager.d.ts +1 -1
  79. package/dist/states/RoomState/roomManager.js +37 -34
  80. package/dist/states/RoomState/scheduleManager.js +21 -27
  81. package/dist/styles/index.css +1 -1
  82. package/dist/subEntry/chat/chat.d.ts +48 -0
  83. package/dist/subEntry/live/index.js +46 -45
  84. package/dist/subEntry/room/index.js +39 -38
  85. package/dist/types/beauty.d.ts +20 -0
  86. package/dist/types/index.js +37 -36
  87. package/dist/types/participant.d.ts +2 -0
  88. package/dist/types/room.d.ts +45 -1
  89. package/dist/types/room.js +4 -3
  90. package/dist/{useId-D5WE76CM.js → useId-B1VwPJLm.js} +1 -1
  91. package/dist/utils/call.js +77 -71
  92. package/dist/{utils-CttDpxqz.js → utils-BU8IkP_V.js} +1 -1
  93. package/package.json +5 -6
  94. package/src/components/AudioSettingPanel/index.vue +4 -5
  95. package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
  96. package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
  97. package/src/components/ConversationList/ConversationList.vue +0 -1
  98. package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +2 -2
  99. package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
  100. package/src/components/ConversationList/i18n/en-US.ts +1 -0
  101. package/src/components/ConversationList/i18n/zh-CN.ts +1 -0
  102. package/src/components/LiveScenePanel/index.vue +0 -1
  103. package/src/components/MessageInput/MessageInput.module.scss +1 -0
  104. package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
  105. package/src/components/MessageList/MessageList.vue +14 -0
  106. package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
  107. package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
  108. package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
  109. package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
  110. package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
  111. package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
  112. package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
  113. package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
  114. package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
  115. package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
  116. package/src/components/VideoSettingPanel/index.vue +1 -0
  117. package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
  118. package/src/types/beauty.ts +20 -0
  119. package/src/types/participant.ts +3 -0
  120. package/src/types/room.ts +49 -1
  121. package/src/utils/call.ts +8 -0
  122. package/dist/index-BvFYOUyz.js +0 -2936
@@ -1,21 +1,23 @@
1
1
  import { ref as o } from "vue";
2
- import { TUIStore as Y, StoreName as j, TUIChatEngine as q, TUIGroupService as s } from "@tencentcloud/chat-uikit-engine";
2
+ import { TUIStore as Y, StoreName as j, TUIChatEngine as q, TUIGroupService as v } from "@tencentcloud/chat-uikit-engine";
3
3
  import { FULL_PERMISSION_MATRIX as U } from "./permissions.js";
4
- import { GroupInviteType as R, GroupMemberRole as D } from "./types.js";
5
- import { GroupPermission as ge, GroupType as Ge } from "./types.js";
6
- const f = o(void 0), i = o(void 0), p = o(void 0), G = o(void 0), h = o(void 0), M = o(void 0), b = o(void 0), m = o(void 0), O = o(void 0), y = o(void 0), g = o([]), l = o([]), k = o(void 0), x = o(void 0), d = o(void 0), N = o(void 0), S = o(void 0), T = o(void 0), C = o(void 0), w = o(void 0);
4
+ import "../../components/UIKitModal/chatErrorModal/index.js";
5
+ import { GroupInviteType as C, GroupMemberRole as D } from "./types.js";
6
+ import { GroupPermission as Me, GroupType as me } from "./types.js";
7
+ import { handleChatErrorWithModal as X } from "../../components/UIKitModal/chatErrorModal/chatErrorModal.js";
8
+ const f = o(void 0), i = o(void 0), p = o(void 0), h = o(void 0), G = o(void 0), M = o(void 0), m = o(void 0), b = o(void 0), y = o(void 0), O = o(void 0), g = o([]), s = o([]), k = o(void 0), x = o(void 0), d = o(void 0), N = o(void 0), S = o(void 0), T = o(void 0), R = o(void 0), w = o(void 0);
7
9
  async function L(e) {
8
- var v;
10
+ var n;
9
11
  const r = (e == null ? void 0 : e.groupID) || i.value;
10
12
  if (!r)
11
13
  throw new Error("getGroupMemberList::groupID is required");
12
- const t = await s.getGroupMemberList({
14
+ const t = await v.getGroupMemberList({
13
15
  groupID: r,
14
16
  count: (e == null ? void 0 : e.count) || 100,
15
17
  offset: (e == null ? void 0 : e.offset) || 0
16
18
  });
17
- if ((v = t == null ? void 0 : t.data) != null && v.memberList) {
18
- const n = t.data.memberList.map((u) => ({
19
+ if ((n = t == null ? void 0 : t.data) != null && n.memberList) {
20
+ const a = t.data.memberList.map((u) => ({
19
21
  userID: u.userID,
20
22
  nick: u.nick || u.userID,
21
23
  avatar: u.avatar || "",
@@ -23,18 +25,18 @@ async function L(e) {
23
25
  joinTime: u.joinTime,
24
26
  muteUntil: u.muteUntil || "",
25
27
  memberCustomField: u.memberCustomField || ""
26
- })), c = l.value || [], I = (e == null ? void 0 : e.offset) || 0;
27
- let a;
28
- I === 0 ? a = n : (a = [...c], n.forEach((u, _) => {
28
+ })), c = s.value || [], I = (e == null ? void 0 : e.offset) || 0;
29
+ let l;
30
+ I === 0 ? l = a : (l = [...c], a.forEach((u, _) => {
29
31
  const P = I + _;
30
- P < a.length ? a[P] = u : a.push(u);
32
+ P < l.length ? l[P] = u : l.push(u);
31
33
  }));
32
- const E = a.find((u) => u.role === D.OWNER), A = a.filter((u) => u.role === D.ADMIN);
33
- return E && (y.value = E), g.value = A, l.value = a, a;
34
+ const E = l.find((u) => u.role === D.OWNER), A = l.filter((u) => u.role === D.ADMIN);
35
+ return E && (O.value = E), g.value = A, s.value = l, l;
34
36
  }
35
37
  throw new Error("getGroupMemberList::getGroupMemberList failed");
36
38
  }
37
- async function X(e) {
39
+ async function z(e) {
38
40
  const r = e.groupID || i.value;
39
41
  if (!r)
40
42
  throw new Error("updateGroupProfile::groupID is required");
@@ -46,7 +48,7 @@ async function X(e) {
46
48
  throw new Error("updateGroupProfile::name cannot be empty");
47
49
  if (e.name.length > 30)
48
50
  throw new Error("updateGroupProfile::name must be less than or equal to 25 characters");
49
- if (e.name === G.value)
51
+ if (e.name === h.value)
50
52
  throw new Error("updateGroupProfile::name cannot be the same as current value");
51
53
  t.name = e.name;
52
54
  }
@@ -64,7 +66,7 @@ async function X(e) {
64
66
  throw new Error("updateGroupProfile::notification must be a string");
65
67
  if (e.notification.length > 130)
66
68
  throw new Error("updateGroupProfile::notification must be less than 100 characters");
67
- if (e.notification === b.value)
69
+ if (e.notification === m.value)
68
70
  throw new Error("updateGroupProfile::notification cannot be the same as current value");
69
71
  t.notification = e.notification;
70
72
  }
@@ -73,172 +75,177 @@ async function X(e) {
73
75
  throw new Error("updateGroupProfile::avatar must be a string");
74
76
  if (e.avatar.length > 500)
75
77
  throw new Error("updateGroupProfile::avatar must be less than 500 characters");
76
- if (e.avatar === h.value)
78
+ if (e.avatar === G.value)
77
79
  throw new Error("updateGroupProfile::avatar cannot be the same as current value");
78
80
  t.avatar = e.avatar;
79
81
  }
80
- await s.updateGroupProfile(t), e.name !== void 0 && (G.value = e.name), e.introduction !== void 0 && (M.value = e.introduction), e.notification !== void 0 && (b.value = e.notification), e.avatar !== void 0 && (h.value = e.avatar);
82
+ try {
83
+ await v.updateGroupProfile(t);
84
+ } catch (n) {
85
+ throw X(n), n;
86
+ }
87
+ e.name !== void 0 && (h.value = e.name), e.introduction !== void 0 && (M.value = e.introduction), e.notification !== void 0 && (m.value = e.notification), e.avatar !== void 0 && (G.value = e.avatar);
81
88
  }
82
- async function z(e) {
89
+ async function H(e) {
83
90
  const r = e.groupID || i.value;
84
91
  if (!r)
85
92
  throw new Error("addGroupMember::groupID is required");
86
- const t = await s.addGroupMember({
93
+ const t = await v.addGroupMember({
87
94
  groupID: r,
88
95
  userIDList: e.userIDList
89
96
  });
90
97
  return L({ count: 100 }), t;
91
98
  }
92
- async function H(e) {
93
- var n, c;
99
+ async function K(e) {
100
+ var a, c;
94
101
  const r = e.groupID || i.value;
95
102
  if (!r)
96
103
  throw new Error("deleteGroupMember::groupID is required");
97
- await s.deleteGroupMember({
104
+ await v.deleteGroupMember({
98
105
  groupID: r,
99
106
  userIDList: e.userIDList
100
107
  });
101
- const t = (n = l.value) == null ? void 0 : n.filter((I) => !e.userIDList.includes(I.userID)), v = (c = g.value) == null ? void 0 : c.filter((I) => !e.userIDList.includes(I.userID));
102
- l.value = t, g.value = v;
108
+ const t = (a = s.value) == null ? void 0 : a.filter((I) => !e.userIDList.includes(I.userID)), n = (c = g.value) == null ? void 0 : c.filter((I) => !e.userIDList.includes(I.userID));
109
+ s.value = t, g.value = n;
103
110
  }
104
- async function K(e) {
111
+ async function Q(e) {
105
112
  const r = e.groupID || i.value;
106
- r && await s.changeGroupOwner({
113
+ r && await v.changeGroupOwner({
107
114
  groupID: r,
108
115
  newOwnerID: e.newOwnerID
109
116
  });
110
117
  }
111
- async function Q(e) {
118
+ async function Z(e) {
112
119
  const r = e.groupID || i.value;
113
- r && (await s.setGroupMemberRole({
120
+ r && (await v.setGroupMemberRole({
114
121
  groupID: r,
115
122
  userID: e.userID,
116
123
  role: e.role
117
124
  }), L({ count: 100 }));
118
125
  }
119
- async function Z(e) {
126
+ async function ee(e) {
120
127
  const r = e.groupID || i.value;
121
- !r || !d.value || (S.value = e.nameCard, await s.setGroupMemberNameCard({
128
+ !r || !d.value || (S.value = e.nameCard, await v.setGroupMemberNameCard({
122
129
  groupID: r,
123
130
  userID: e.userID || d.value,
124
131
  nameCard: e.nameCard
125
132
  }));
126
133
  }
127
- async function ee(e) {
134
+ async function re(e) {
128
135
  if (!f.value)
129
136
  throw new Error("setChatPinned::currentConversation is required");
130
- e !== f.value.isPinned && (O.value = e, await f.value.pinConversation());
137
+ e !== f.value.isPinned && (y.value = e, await f.value.pinConversation());
131
138
  }
132
- async function re(e) {
139
+ async function oe(e) {
133
140
  if (!f.value)
134
141
  throw new Error("setChatMuted::currentConversation is required");
135
142
  if (e !== f.value.isMuted) {
136
- m.value = e;
143
+ b.value = e;
137
144
  try {
138
145
  await f.value.muteConversation();
139
146
  } catch (r) {
140
- throw m.value = !e, r;
147
+ throw b.value = !e, r;
141
148
  }
142
149
  }
143
150
  }
144
- async function oe(e) {
151
+ async function te(e) {
145
152
  const r = e.groupID || i.value;
146
153
  if (!r)
147
154
  throw new Error("setGroupMemberMuteTime::groupID is required");
148
- await s.setGroupMemberMuteTime({
155
+ await v.setGroupMemberMuteTime({
149
156
  groupID: r,
150
157
  userID: e.userID,
151
158
  muteTime: e.time
152
159
  }), L({ count: 100 });
153
160
  }
154
- async function te(e) {
161
+ async function ue(e) {
155
162
  if (!i.value)
156
163
  throw new Error("setMuteAllMember::groupID is required");
157
- await s.updateGroupProfile({
164
+ await v.updateGroupProfile({
158
165
  groupID: i.value,
159
166
  muteAllMembers: e
160
167
  }), T.value = e;
161
168
  }
162
- async function ue(e) {
169
+ async function ie(e) {
163
170
  const r = e || i.value;
164
171
  if (!r)
165
172
  throw new Error("dismissGroup::groupID is required");
166
- await s.dismissGroup(r);
173
+ await v.dismissGroup(r);
167
174
  }
168
- async function ie(e) {
175
+ async function ne(e) {
169
176
  const r = e || i.value;
170
177
  if (!r)
171
178
  throw new Error("quitGroup::groupID is required");
172
- await s.quitGroup(r);
179
+ await v.quitGroup(r);
173
180
  }
174
- function ne(e, r, t) {
175
- const v = t || p.value, n = r || N.value || D.COMMON;
176
- if (!v || !n)
181
+ function ae(e, r, t) {
182
+ const n = t || p.value, a = r || N.value || D.COMMON;
183
+ if (!n || !a)
177
184
  throw new Error("hasPermission::groupType or userRole is required");
178
- const c = U[v][n][e];
185
+ const c = U[n][a][e];
179
186
  if (typeof c != "boolean")
180
- throw new Error(`hasPermission::${e}-${v}-${n} is not defined`);
187
+ throw new Error(`hasPermission::${e}-${n}-${a} is not defined`);
181
188
  return c;
182
189
  }
183
- function ae(e) {
184
- if (!d.value || !l.value)
190
+ function le(e) {
191
+ if (!d.value || !s.value)
185
192
  return !1;
186
- const r = l.value.find((t) => t.userID === d.value);
193
+ const r = s.value.find((t) => t.userID === d.value);
187
194
  return !r || r.userID === e.userID ? !1 : r.role === D.OWNER ? !0 : r.role === D.ADMIN ? e.role === D.COMMON : !1;
188
195
  }
189
- function le() {
190
- if (!p.value || !d.value || !l.value)
196
+ function se() {
197
+ if (!p.value || !d.value || !s.value)
191
198
  return [];
192
- const e = l.value.find((r) => r.userID === d.value);
199
+ const e = s.value.find((r) => r.userID === d.value);
193
200
  return e ? U[p.value][e.role] ? Object.keys(U[p.value][e.role]) : [] : [];
194
201
  }
195
- function se() {
196
- f.value = void 0, i.value = void 0, p.value = void 0, G.value = void 0, h.value = void 0, M.value = void 0, b.value = void 0, m.value = void 0, O.value = void 0, y.value = void 0, g.value = [], l.value = [], k.value = void 0, x.value = void 0, d.value = void 0, N.value = void 0, S.value = void 0, T.value = void 0, C.value = void 0, w.value = void 0;
197
- }
198
202
  function ve() {
203
+ f.value = void 0, i.value = void 0, p.value = void 0, h.value = void 0, G.value = void 0, M.value = void 0, m.value = void 0, b.value = void 0, y.value = void 0, O.value = void 0, g.value = [], s.value = [], k.value = void 0, x.value = void 0, d.value = void 0, N.value = void 0, S.value = void 0, T.value = void 0, R.value = void 0, w.value = void 0;
204
+ }
205
+ function ce() {
199
206
  Y.watch(j.CONV, {
200
207
  currentConversation: (e) => {
201
208
  var r;
202
209
  if (e && e.type === "GROUP") {
203
- ((r = f.value) == null ? void 0 : r.conversationID) !== e.conversationID && (l.value = void 0, g.value = void 0, y.value = void 0), f.value = e;
210
+ ((r = f.value) == null ? void 0 : r.conversationID) !== e.conversationID && (s.value = void 0, g.value = void 0, O.value = void 0), f.value = e;
204
211
  const {
205
212
  groupProfile: {
206
- groupID: v,
207
- name: n,
213
+ groupID: n,
214
+ name: a,
208
215
  avatar: c,
209
216
  introduction: I,
210
- muteAllMembers: a,
217
+ muteAllMembers: l,
211
218
  memberCount: E,
212
219
  maxMemberCount: A,
213
220
  notification: u,
214
221
  type: _,
215
222
  inviteOption: P,
216
223
  selfInfo: {
217
- role: B,
218
- userID: J,
219
- nameCard: W
224
+ role: W,
225
+ userID: B,
226
+ nameCard: J
220
227
  }
221
228
  },
222
229
  isMuted: $,
223
230
  isPinned: V,
224
231
  operationType: F
225
232
  } = e;
226
- switch (i.value = v, p.value = _, G.value = n, h.value = c, M.value = I, m.value = $, O.value = V, T.value = a, k.value = E, d.value = J, N.value = B, S.value = W, x.value = A, b.value = u, P) {
233
+ switch (i.value = n, p.value = _, h.value = a, G.value = c, M.value = I, b.value = $, y.value = V, T.value = l, k.value = E, d.value = B, N.value = W, S.value = J, x.value = A, m.value = u, P) {
227
234
  case q.TYPES.JOIN_OPTIONS_FREE_ACCESS:
228
- w.value = R.FREE_ACCESS;
235
+ w.value = C.FREE_ACCESS;
229
236
  break;
230
237
  case q.TYPES.JOIN_OPTIONS_NEED_PERMISSION:
231
- w.value = R.NEED_PERMISSION;
238
+ w.value = C.NEED_PERMISSION;
232
239
  break;
233
240
  case q.TYPES.JOIN_OPTIONS_DISABLE_INVITE:
234
- w.value = R.DISABLE_APPLY;
241
+ w.value = C.DISABLE_APPLY;
235
242
  break;
236
243
  default:
237
- w.value = R.DISABLE_APPLY;
244
+ w.value = C.DISABLE_APPLY;
238
245
  }
239
- [4, 5, 8].includes(F) ? C.value = !1 : F === 0 && (C.value = !0);
246
+ [4, 5, 8].includes(F) ? R.value = !1 : F === 0 && (R.value = !0);
240
247
  } else
241
- se();
248
+ ve();
242
249
  }
243
250
  }), Y.watch(j.GRP, {
244
251
  groupProfile: (e) => {
@@ -246,53 +253,53 @@ function ve() {
246
253
  }
247
254
  });
248
255
  }
249
- ve();
250
- function pe() {
256
+ ce();
257
+ function ge() {
251
258
  return {
252
259
  // State
253
260
  groupID: i,
254
261
  groupType: p,
255
- groupName: G,
256
- avatar: h,
262
+ groupName: h,
263
+ avatar: G,
257
264
  introduction: M,
258
- notification: b,
259
- isMuted: m,
260
- isPinned: O,
261
- groupOwner: y,
265
+ notification: m,
266
+ isMuted: b,
267
+ isPinned: y,
268
+ groupOwner: O,
262
269
  adminMembers: g,
263
- allMembers: l,
270
+ allMembers: s,
264
271
  memberCount: k,
265
272
  maxMemberCount: x,
266
273
  currentUserID: d,
267
274
  currentUserRole: N,
268
275
  nameCard: S,
269
276
  isMuteAllMembers: T,
270
- isInGroup: C,
277
+ isInGroup: R,
271
278
  inviteOption: w,
272
279
  // Permission utilities
273
- hasPermission: ne,
274
- canOperateOnMember: ae,
275
- getAvailablePermissions: le,
280
+ hasPermission: ae,
281
+ canOperateOnMember: le,
282
+ getAvailablePermissions: se,
276
283
  // Business actions
277
284
  getGroupMemberList: L,
278
- updateGroupProfile: X,
279
- addGroupMember: z,
280
- deleteGroupMember: H,
281
- changeGroupOwner: K,
282
- setGroupMemberRole: Q,
283
- setGroupMemberNameCard: Z,
284
- setChatPinned: ee,
285
- setChatMuted: re,
286
- setGroupMemberMuteTime: oe,
287
- setMuteAllMember: te,
288
- dismissGroup: ue,
289
- quitGroup: ie
285
+ updateGroupProfile: z,
286
+ addGroupMember: H,
287
+ deleteGroupMember: K,
288
+ changeGroupOwner: Q,
289
+ setGroupMemberRole: Z,
290
+ setGroupMemberNameCard: ee,
291
+ setChatPinned: re,
292
+ setChatMuted: oe,
293
+ setGroupMemberMuteTime: te,
294
+ setMuteAllMember: ue,
295
+ dismissGroup: ie,
296
+ quitGroup: ne
290
297
  };
291
298
  }
292
299
  export {
293
- R as GroupInviteType,
300
+ C as GroupInviteType,
294
301
  D as GroupMemberRole,
295
- ge as GroupPermission,
296
- Ge as GroupType,
297
- pe as useGroupSettingState
302
+ Me as GroupPermission,
303
+ me as GroupType,
304
+ ge as useGroupSettingState
298
305
  };
@@ -1,64 +1,64 @@
1
- import { ref as c } from "vue";
2
- import { TUILogin as u } from "@tencentcloud/tui-core";
3
- import { useStatistical as i } from "../statistical/statistical.js";
4
- const s = c(null), { getChatScene: f } = i();
5
- async function g(r) {
6
- if (!r.userId || !r.userSig || !r.sdkAppId)
7
- throw new Error("[loginState login] params error");
8
- const { userId: l, userSig: t, sdkAppId: n, ...e } = r, a = {
9
- SDKAppID: n,
10
- userID: l,
11
- userSig: t,
1
+ import { ref as f } from "vue";
2
+ import { TUILogin as c } from "@tencentcloud/tui-core";
3
+ import "../components/UIKitModal/chatErrorModal/index.js";
4
+ import { useStatistical as I } from "../statistical/statistical.js";
5
+ import { handleChatErrorWithModal as d, showChatErrorModalById as i, ChatErrorModalId as u } from "../components/UIKitModal/chatErrorModal/chatErrorModal.js";
6
+ const s = f(null), { getChatScene: g } = I();
7
+ async function m(t) {
8
+ const { userId: a, userSig: r, sdkAppId: e, ...o } = t, l = {
9
+ SDKAppID: e,
10
+ userID: a,
11
+ userSig: r,
12
12
  useUploadPlugin: !0,
13
- scene: f(),
14
- ...e
13
+ scene: g(),
14
+ ...o
15
15
  };
16
16
  try {
17
- await u.login(a);
18
- } catch (o) {
19
- throw console.error("[loginState login] error", o), o;
17
+ await c.login(l);
18
+ } catch (n) {
19
+ throw d(n) || (a ? r ? e || i(u.LOGIN_INVALID_SDK_APP_ID) : i(u.LOGIN_INVALID_USER_SIG) : i(u.LOGIN_INVALID_USER_ID)), n;
20
20
  }
21
21
  }
22
- async function m(r) {
23
- const l = s.value || {}, { chat: t } = u.getContext();
24
- if (t) {
25
- const n = [];
26
- r.customInfo && Object.keys(r.customInfo).forEach((e) => {
27
- var o;
28
- let a = e;
29
- e.includes("Tag_Profile_Custom") || (a = `Tag_Profile_Custom_${e}`), n.push({
30
- key: a,
31
- value: (o = r.customInfo) == null ? void 0 : o[e]
22
+ async function h(t) {
23
+ const a = s.value || {}, { chat: r } = c.getContext();
24
+ if (r) {
25
+ const e = [];
26
+ t.customInfo && Object.keys(t.customInfo).forEach((o) => {
27
+ var n;
28
+ let l = o;
29
+ o.includes("Tag_Profile_Custom") || (l = `Tag_Profile_Custom_${o}`), e.push({
30
+ key: l,
31
+ value: (n = t.customInfo) == null ? void 0 : n[o]
32
32
  });
33
33
  });
34
34
  try {
35
- const e = await t.updateMyProfile({
36
- nick: r.userName,
37
- avatar: r.avatarUrl,
38
- profileCustomField: n
35
+ const o = await r.updateMyProfile({
36
+ nick: t.userName,
37
+ avatar: t.avatarUrl,
38
+ profileCustomField: e
39
39
  });
40
40
  return s.value = {
41
- ...l,
42
- ...r
43
- }, e;
44
- } catch (e) {
45
- throw console.error("[loginState setSelfInfo] error", e), e;
41
+ ...a,
42
+ ...t
43
+ }, o;
44
+ } catch (o) {
45
+ throw console.error("[loginState setSelfInfo] error", o), o;
46
46
  }
47
47
  } else
48
48
  throw Error("[loginState setSelfInfo] not login");
49
49
  }
50
- async function I() {
51
- s.value = null, u.logout();
50
+ async function _() {
51
+ s.value = null, c.logout();
52
52
  }
53
- function p() {
53
+ function E() {
54
54
  return {
55
55
  loginUserInfo: s,
56
- login: g,
57
- logout: I,
58
- setSelfInfo: m
56
+ login: m,
57
+ logout: _,
58
+ setSelfInfo: h
59
59
  };
60
60
  }
61
61
  export {
62
- p as default,
63
- p as useLoginState
62
+ E as default,
63
+ E as useLoginState
64
64
  };