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.
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jPzZ5INK.js → MessageInput.vue_vue_type_script_setup_true_lang-3RVYOdkv.js} +38 -38
- package/dist/{PopoverPortal-DghpKKm8.js → PopoverPortal-DV6zFXcf.js} +3 -3
- package/dist/{PopoverTrigger-BajjNkGO.js → PopoverTrigger-DIjW4PKa.js} +4 -4
- package/dist/{PopperContent-SLoFuK7k.js → PopperContent-D__dbwpA.js} +1 -1
- package/dist/{Teleport-DFrneqLM.js → Teleport-98QrIYDI.js} +278 -268
- package/dist/baseComp/Modal/Modal.js +3 -3
- package/dist/components/AudioSettingPanel/index.js +14 -14
- package/dist/components/BarrageInput/EmojiPicker/EmojiPicker.js +2 -2
- package/dist/components/BarrageInput/TextEditor/CharacterCountExtension.js +1 -1
- package/dist/components/BarrageInput/TextEditor/EditorCore.js +4 -4
- package/dist/components/ConversationList/ConversationActions/ConversationActions.js +53 -50
- package/dist/components/ConversationList/ConversationActions/ConversationActions.vue.d.ts +2 -0
- package/dist/components/ConversationList/ConversationCreate/ConversationCreate.js +25 -25
- package/dist/components/ConversationList/ConversationList.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +16 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewAbstract.js +18 -18
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTimestamp.js +13 -13
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewTitle.js +11 -11
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.js +84 -75
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +4 -0
- package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUnread.js +14 -14
- package/dist/components/ConversationList/i18n/en-US.d.ts +1 -0
- package/dist/components/ConversationList/i18n/en-US.js +2 -1
- package/dist/components/ConversationList/i18n/zh-CN.d.ts +1 -0
- package/dist/components/ConversationList/i18n/zh-CN.js +2 -1
- package/dist/components/ConversationList/index.d.ts +48 -0
- package/dist/components/LiveScenePanel/index.js +9 -10
- package/dist/components/MessageInput/AttachmentPicker/index.js +2 -2
- package/dist/components/MessageInput/EmojiPicker/EmojiPicker.js +2 -2
- package/dist/components/MessageInput/MessageInput.js +1 -1
- package/dist/components/MessageInput/TextEditor/EditorCore.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/MentionSuggestion.js +3 -3
- package/dist/components/MessageInput/TextEditor/extensions/characterCountExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/emojiExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/enterKeyExtension.js +1 -1
- package/dist/components/MessageInput/TextEditor/extensions/imageExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/extensions/mentionExtension.js +2 -2
- package/dist/components/MessageInput/TextEditor/index.js +1 -1
- package/dist/components/MessageInput/index.js +1 -1
- package/dist/components/MessageList/Message/MessageLayout/MessageActionDropdown/MessageActionDropdown.js +3 -3
- package/dist/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.js +37 -28
- package/dist/components/MessageList/MessageList.js +77 -67
- package/dist/components/ScheduleRoomPanel/RoomDetail.js +22 -22
- package/dist/components/ScheduleRoomPanel/RoomEdit.js +1 -1
- package/dist/components/ScheduleRoomPanel/RoomShare.js +4 -4
- package/dist/components/ScheduleRoomPanel/ScheduleRoomPanel.js +1 -1
- package/dist/components/ScheduleRoomPanel/ScheduledRoomList.js +1 -1
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.d.ts +72 -0
- package/dist/components/UIKitModal/chatErrorModal/chatErrorModal.js +95 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/en-US/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.d.ts +4 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/index.js +6 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.d.ts +40 -0
- package/dist/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.js +51 -0
- package/dist/components/UIKitModal/chatErrorModal/index.d.ts +3 -0
- package/dist/components/UIKitModal/chatErrorModal/index.js +11 -0
- package/dist/components/VideoSettingPanel/index.js +1 -1
- package/dist/hooks/useReadReceipt/useReadReceipt.js +44 -41
- package/dist/index-CTthrJb2.js +1461 -0
- package/dist/{index-CzCDLp99.js → index-DXC5bPY4.js} +32 -32
- package/dist/{index-C8Jw_xE4.js → index-DuAffztD.js} +1731 -1648
- package/dist/{index-CiYL_XsE.js → index-hHVD-MG2.js} +1 -1
- package/dist/index.js +59 -58
- package/dist/states/GroupSettingState/GroupSettingState.js +109 -102
- package/dist/states/LoginState.js +43 -43
- package/dist/states/MessageInputState/MessageInputState.js +75 -78
- package/dist/states/MessageListState/MessageListState.js +26 -23
- package/dist/states/RoomParticipantState/index.js +83 -24
- package/dist/states/RoomParticipantState/participantEventManager.d.ts +2 -2
- package/dist/states/RoomParticipantState/participantEventManager.js +217 -205
- package/dist/states/RoomParticipantState/participantManager.d.ts +4 -0
- package/dist/states/RoomParticipantState/participantManager.js +159 -127
- package/dist/states/RoomState/callManager.d.ts +3 -3
- package/dist/states/RoomState/callManager.js +20 -20
- package/dist/states/RoomState/common.d.ts +3 -2
- package/dist/states/RoomState/common.js +34 -24
- package/dist/states/RoomState/roomManager.d.ts +1 -1
- package/dist/states/RoomState/roomManager.js +37 -34
- package/dist/states/RoomState/scheduleManager.js +21 -27
- package/dist/styles/index.css +1 -1
- package/dist/subEntry/chat/chat.d.ts +48 -0
- package/dist/subEntry/live/index.js +46 -45
- package/dist/subEntry/room/index.js +39 -38
- package/dist/types/beauty.d.ts +20 -0
- package/dist/types/index.js +37 -36
- package/dist/types/participant.d.ts +2 -0
- package/dist/types/room.d.ts +45 -1
- package/dist/types/room.js +4 -3
- package/dist/{useId-D5WE76CM.js → useId-B1VwPJLm.js} +1 -1
- package/dist/utils/call.js +77 -71
- package/dist/{utils-CttDpxqz.js → utils-BU8IkP_V.js} +1 -1
- package/package.json +5 -6
- package/src/components/AudioSettingPanel/index.vue +4 -5
- package/src/components/ConversationList/ConversationActions/ConversationActions.vue +7 -1
- package/src/components/ConversationList/ConversationCreate/ConversationCreate.vue +5 -1
- package/src/components/ConversationList/ConversationList.vue +0 -1
- package/src/components/ConversationList/ConversationPreview/ConversationPreview.scss +2 -2
- package/src/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue +15 -0
- package/src/components/ConversationList/i18n/en-US.ts +1 -0
- package/src/components/ConversationList/i18n/zh-CN.ts +1 -0
- package/src/components/LiveScenePanel/index.vue +0 -1
- package/src/components/MessageInput/MessageInput.module.scss +1 -0
- package/src/components/MessageList/Message/MessageLayout/MessageMeta/MessageMeta.vue +12 -3
- package/src/components/MessageList/MessageList.vue +14 -0
- package/src/components/ScheduleRoomPanel/RoomDetail.vue +1 -0
- package/src/components/ScheduleRoomPanel/RoomEdit.vue +2 -1
- package/src/components/ScheduleRoomPanel/RoomShare.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduleRoomPanel.vue +1 -0
- package/src/components/ScheduleRoomPanel/ScheduledRoomList.vue +1 -0
- package/src/components/UIKitModal/chatErrorModal/chatErrorModal.ts +205 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/en-US/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/index.ts +4 -0
- package/src/components/UIKitModal/chatErrorModal/i18n/zh-CN/index.ts +56 -0
- package/src/components/UIKitModal/chatErrorModal/index.ts +16 -0
- package/src/components/VideoSettingPanel/index.vue +1 -0
- package/src/hooks/useReadReceipt/useReadReceipt.ts +5 -4
- package/src/types/beauty.ts +20 -0
- package/src/types/participant.ts +3 -0
- package/src/types/room.ts +49 -1
- package/src/utils/call.ts +8 -0
- package/dist/index-BvFYOUyz.js +0 -2936
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TUIInvitationStatus as r, TUIConferenceStatus as
|
|
2
|
-
import { RoomCallStatus as a, RoomStatus as t, RoomCallResult as s } from "../../types/room.js";
|
|
3
|
-
function
|
|
1
|
+
import { TUIInvitationStatus as r, TUIConferenceStatus as l, TUIInvitationCode as o, TUIInvitationRejectedReason as n } from "@tencentcloud/tuiroom-engine-js";
|
|
2
|
+
import { RoomCallStatus as a, RoomStatus as t, RoomCallResult as s, CallRejectReason as i } from "../../types/room.js";
|
|
3
|
+
function m(e) {
|
|
4
4
|
return {
|
|
5
5
|
roomId: e.basicRoomInfo.roomId,
|
|
6
6
|
roomName: e.basicRoomInfo.roomName,
|
|
@@ -11,7 +11,7 @@ function n(e) {
|
|
|
11
11
|
},
|
|
12
12
|
participantCount: e.basicRoomInfo.roomMemberCount,
|
|
13
13
|
createTime: e.basicRoomInfo.createTime,
|
|
14
|
-
roomStatus:
|
|
14
|
+
roomStatus: u(e.status),
|
|
15
15
|
scheduledStartTime: e.scheduleStartTime,
|
|
16
16
|
scheduledEndTime: e.scheduleEndTime,
|
|
17
17
|
startReminderInSeconds: e.reminderSecondsBeforeStart,
|
|
@@ -22,7 +22,7 @@ function n(e) {
|
|
|
22
22
|
isAllMessageDisabled: e.basicRoomInfo.isMessageDisableForAllUser
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function d(e) {
|
|
26
26
|
return {
|
|
27
27
|
roomId: e.roomId,
|
|
28
28
|
roomName: e.roomName,
|
|
@@ -41,24 +41,24 @@ function u(e) {
|
|
|
41
41
|
isAllMessageDisabled: e.isMessageDisableForAllUser
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function u(e) {
|
|
45
45
|
switch (e) {
|
|
46
|
-
case
|
|
46
|
+
case l.kConferenceStatusNotStarted:
|
|
47
47
|
return t.Scheduled;
|
|
48
|
-
case
|
|
48
|
+
case l.kConferenceStatusRunning:
|
|
49
49
|
return t.Running;
|
|
50
50
|
default:
|
|
51
51
|
return t.Scheduled;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function c(e) {
|
|
55
55
|
return {
|
|
56
56
|
userId: e.userId,
|
|
57
57
|
userName: e.userName,
|
|
58
58
|
avatarUrl: e.avatarUrl
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function R(e) {
|
|
62
62
|
switch (e) {
|
|
63
63
|
case r.kPending:
|
|
64
64
|
return a.Calling;
|
|
@@ -72,13 +72,13 @@ function d(e) {
|
|
|
72
72
|
return a.None;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
const
|
|
76
|
-
transferConferenceInfoToRoomInfo:
|
|
77
|
-
transferTUIRoomInfoToRoomInfo:
|
|
78
|
-
transferConferenceStatusToRoomStatus:
|
|
79
|
-
transferTUIUserInfoToRoomUser:
|
|
80
|
-
transferTUIInvitationStatusToRoomCallStatus:
|
|
81
|
-
},
|
|
75
|
+
const T = {
|
|
76
|
+
transferConferenceInfoToRoomInfo: m,
|
|
77
|
+
transferTUIRoomInfoToRoomInfo: d,
|
|
78
|
+
transferConferenceStatusToRoomStatus: u,
|
|
79
|
+
transferTUIUserInfoToRoomUser: c,
|
|
80
|
+
transferTUIInvitationStatusToRoomCallStatus: R
|
|
81
|
+
}, C = (e) => {
|
|
82
82
|
switch (e) {
|
|
83
83
|
case o.kAlreadyInConference:
|
|
84
84
|
return s.AlreadyInRoom;
|
|
@@ -89,13 +89,23 @@ const S = {
|
|
|
89
89
|
default:
|
|
90
90
|
return s.Success;
|
|
91
91
|
}
|
|
92
|
+
}, U = (e) => {
|
|
93
|
+
switch (e) {
|
|
94
|
+
case n.kRejectToEnter:
|
|
95
|
+
return i.Rejected;
|
|
96
|
+
case n.kInOtherConference:
|
|
97
|
+
return i.InOtherRoom;
|
|
98
|
+
default:
|
|
99
|
+
return i.Rejected;
|
|
100
|
+
}
|
|
92
101
|
};
|
|
93
102
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
T as roomInfoTransfer,
|
|
104
|
+
m as transferConferenceInfoToRoomInfo,
|
|
105
|
+
u as transferConferenceStatusToRoomStatus,
|
|
106
|
+
C as transferTUIInvitationCodeToRoomCallResult,
|
|
107
|
+
U as transferTUIInvitationRejectedReasonToCallRejectReason,
|
|
108
|
+
R as transferTUIInvitationStatusToRoomCallStatus,
|
|
109
|
+
d as transferTUIRoomInfoToRoomInfo,
|
|
110
|
+
c as transferTUIUserInfoToRoomUser
|
|
101
111
|
};
|
|
@@ -21,7 +21,6 @@ declare class RoomManager {
|
|
|
21
21
|
roomId: string;
|
|
22
22
|
options: UpdateRoomOptions;
|
|
23
23
|
}): Promise<void>;
|
|
24
|
-
private onRoomDismissed;
|
|
25
24
|
private onRoomNameChanged;
|
|
26
25
|
private onAllUserCameraDisableChanged;
|
|
27
26
|
private onScreenShareForAllUserDisableChanged;
|
|
@@ -30,6 +29,7 @@ declare class RoomManager {
|
|
|
30
29
|
private onRoomUserCountChanged;
|
|
31
30
|
private onConferenceInfoChanged;
|
|
32
31
|
private onKickedOutOfRoom;
|
|
32
|
+
private onConferenceDidCancelled;
|
|
33
33
|
private bindEvent;
|
|
34
34
|
}
|
|
35
35
|
export default RoomManager;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { useRoomEngine as
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var A = (d, e, o) => e in d ? v(d, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : d[e] = o;
|
|
3
|
+
var g = (d, e, o) => A(d, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import D, { TUIRoomType as c, TUIConferenceCancelReason as I, TUIConferenceListManagerEvents as b, TUIRoomEvents as t } from "@tencentcloud/tuiroom-engine-js";
|
|
5
|
+
import { useRoomEngine as p } from "../../hooks/useRoomEngine.js";
|
|
6
6
|
import { eventCenter as S } from "../../utils/eventCenter.js";
|
|
7
|
-
import { isUndefined as
|
|
7
|
+
import { isUndefined as R } from "../../utils/utils.js";
|
|
8
8
|
import { useLoginState as w } from "../LoginState.js";
|
|
9
|
-
import { transferTUIRoomInfoToRoomInfo as
|
|
10
|
-
import { useRoomStore as
|
|
11
|
-
import { RoomEvent as
|
|
12
|
-
const { loginUserInfo:
|
|
9
|
+
import { transferTUIRoomInfoToRoomInfo as h, roomInfoTransfer as y } from "./common.js";
|
|
10
|
+
import { useRoomStore as T } from "./store.js";
|
|
11
|
+
import { RoomEvent as N } from "../../types/room.js";
|
|
12
|
+
const { loginUserInfo: M } = w(), s = p(), { currentRoom: n } = T(), m = class m {
|
|
13
13
|
constructor() {
|
|
14
|
-
this.
|
|
14
|
+
this.onRoomNameChanged = this.onRoomNameChanged.bind(this), this.onAllUserCameraDisableChanged = this.onAllUserCameraDisableChanged.bind(this), this.onScreenShareForAllUserDisableChanged = this.onScreenShareForAllUserDisableChanged.bind(this), this.onAllUserMicrophoneDisableChanged = this.onAllUserMicrophoneDisableChanged.bind(this), this.onAllUserMessageDisableChanged = this.onAllUserMessageDisableChanged.bind(this), this.onRoomUserCountChanged = this.onRoomUserCountChanged.bind(this), this.onKickedOutOfRoom = this.onKickedOutOfRoom.bind(this), this.bindEvent();
|
|
15
15
|
}
|
|
16
16
|
static getInstance() {
|
|
17
|
-
return
|
|
17
|
+
return m.instance || (m.instance = new m()), m.instance;
|
|
18
18
|
}
|
|
19
19
|
async createAndJoinRoom({ roomId: e, options: o }) {
|
|
20
|
-
var i,
|
|
21
|
-
if (!((i =
|
|
20
|
+
var i, l, r;
|
|
21
|
+
if (!((i = M.value) != null && i.userId) || !s.instance)
|
|
22
22
|
throw new Error("please login firstly by useLoginState");
|
|
23
|
-
await ((
|
|
23
|
+
await ((l = s.instance) == null ? void 0 : l.createRoom({
|
|
24
24
|
roomId: e,
|
|
25
25
|
roomName: o.roomName,
|
|
26
|
-
roomType:
|
|
26
|
+
roomType: c.kConference,
|
|
27
27
|
password: o.password || "",
|
|
28
28
|
isMicrophoneDisableForAllUser: o.isAllMicrophoneDisabled,
|
|
29
29
|
isScreenShareDisableForAllUser: o.isAllScreenShareDisabled,
|
|
30
30
|
isCameraDisableForAllUser: o.isAllCameraDisabled,
|
|
31
31
|
isMessageDisableForAllUser: o.isAllMessageDisabled
|
|
32
32
|
}));
|
|
33
|
-
const a = await ((
|
|
33
|
+
const a = await ((r = s.instance) == null ? void 0 : r.enterRoom({
|
|
34
34
|
roomId: e,
|
|
35
|
-
roomType:
|
|
35
|
+
roomType: c.kConference
|
|
36
36
|
}));
|
|
37
|
-
a && (n.value =
|
|
37
|
+
a && (n.value = h(a));
|
|
38
38
|
}
|
|
39
39
|
async joinRoom({ roomId: e, password: o }) {
|
|
40
40
|
var i;
|
|
41
41
|
const a = await ((i = s.instance) == null ? void 0 : i.enterRoom({
|
|
42
42
|
roomId: e,
|
|
43
|
-
roomType:
|
|
43
|
+
roomType: c.kConference,
|
|
44
44
|
options: { password: o }
|
|
45
45
|
}));
|
|
46
|
-
a && (n.value =
|
|
46
|
+
a && (n.value = h(a));
|
|
47
47
|
}
|
|
48
48
|
async leaveRoom() {
|
|
49
49
|
var e;
|
|
@@ -55,18 +55,14 @@ const { loginUserInfo: N } = w(), s = I(), { currentRoom: n } = y(), l = class l
|
|
|
55
55
|
}
|
|
56
56
|
async getRoomInfo({ roomId: e }) {
|
|
57
57
|
var a;
|
|
58
|
-
const o = await ((a = s.instance) == null ? void 0 : a.fetchRoomInfo({ roomId: e, roomType:
|
|
58
|
+
const o = await ((a = s.instance) == null ? void 0 : a.fetchRoomInfo({ roomId: e, roomType: c.kConference }));
|
|
59
59
|
if (!o)
|
|
60
60
|
throw new Error("roomInfo is undefined");
|
|
61
|
-
return
|
|
61
|
+
return h(o);
|
|
62
62
|
}
|
|
63
63
|
async updateRoomInfo({ options: e }) {
|
|
64
64
|
var o, a;
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
onRoomDismissed({ roomId: e }) {
|
|
68
|
-
var o;
|
|
69
|
-
e === ((o = n.value) == null ? void 0 : o.roomId) && (n.value = null), S.emit(M.onRoomEnded, { roomId: e });
|
|
65
|
+
R(e.roomName) || await ((o = s.instance) == null ? void 0 : o.updateRoomNameByAdmin({ roomName: e.roomName || "" })), R(e.password) || await ((a = s.instance) == null ? void 0 : a.updateRoomPasswordByAdmin({ password: e.password || "" }));
|
|
70
66
|
}
|
|
71
67
|
onRoomNameChanged({ roomId: e, roomName: o }) {
|
|
72
68
|
var a;
|
|
@@ -114,16 +110,23 @@ const { loginUserInfo: N } = w(), s = I(), { currentRoom: n } = y(), l = class l
|
|
|
114
110
|
var o;
|
|
115
111
|
e === ((o = n.value) == null ? void 0 : o.roomId) && (n.value = null);
|
|
116
112
|
}
|
|
113
|
+
onConferenceDidCancelled({ conferenceInfo: e, reason: o, operateUser: a }) {
|
|
114
|
+
var r;
|
|
115
|
+
const { roomId: i } = e.basicRoomInfo, l = y.transferConferenceInfoToRoomInfo(e);
|
|
116
|
+
i === ((r = n.value) == null ? void 0 : r.roomId) && o === I.kConferenceCancelReasonCancelledByAdmin && (n.value = null, S.emit(N.onRoomEnded, {
|
|
117
|
+
roomInfo: l
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
117
120
|
bindEvent() {
|
|
118
|
-
|
|
119
|
-
var o, a, i,
|
|
121
|
+
D.once("ready", () => {
|
|
122
|
+
var o, a, i, l, r, C, f, u;
|
|
120
123
|
const e = (o = s.instance) == null ? void 0 : o.getConferenceListManager();
|
|
121
|
-
|
|
124
|
+
e == null || e.on(b.onConferenceDidCancelled, this.onConferenceDidCancelled), e == null || e.on(b.onConferenceInfoChanged, this.onConferenceInfoChanged), (a = s.instance) == null || a.on(t.onRoomNameChanged, this.onRoomNameChanged), (i = s.instance) == null || i.on(t.onKickedOutOfRoom, this.onKickedOutOfRoom), (l = s.instance) == null || l.on(t.onRoomUserCountChanged, this.onRoomUserCountChanged), (r = s.instance) == null || r.on(t.onAllUserCameraDisableChanged, this.onAllUserCameraDisableChanged), (C = s.instance) == null || C.on(t.onScreenShareForAllUserDisableChanged, this.onScreenShareForAllUserDisableChanged), (f = s.instance) == null || f.on(t.onAllUserMicrophoneDisableChanged, this.onAllUserMicrophoneDisableChanged), (u = s.instance) == null || u.on(t.onSendMessageForAllUserDisableChanged, this.onAllUserMessageDisableChanged);
|
|
122
125
|
});
|
|
123
126
|
}
|
|
124
127
|
};
|
|
125
|
-
|
|
126
|
-
let
|
|
128
|
+
g(m, "instance");
|
|
129
|
+
let U = m;
|
|
127
130
|
export {
|
|
128
|
-
|
|
131
|
+
U as default
|
|
129
132
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var g = Object.defineProperty;
|
|
2
2
|
var p = (h, e, n) => e in h ? g(h, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : h[e] = n;
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { useRoomEngine as
|
|
6
|
-
import { eventCenter as
|
|
3
|
+
var v = (h, e, n) => p(h, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import w, { TUIRoomType as y, TUIConferenceCancelReason as A, TUIConferenceListManagerEvents as f } from "@tencentcloud/tuiroom-engine-js";
|
|
5
|
+
import { useRoomEngine as E } from "../../hooks/useRoomEngine.js";
|
|
6
|
+
import { eventCenter as I } from "../../utils/eventCenter.js";
|
|
7
7
|
import { roomInfoTransfer as a } from "./common.js";
|
|
8
8
|
import { useRoomStore as D } from "./store.js";
|
|
9
|
-
import { RoomEvent as
|
|
10
|
-
const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom:
|
|
9
|
+
import { RoomEvent as R } from "../../types/room.js";
|
|
10
|
+
const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom: T } = D(), c = E(), l = class l {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.onConferenceScheduled = this.onConferenceScheduled.bind(this), this.onConferenceWillStart = this.onConferenceWillStart.bind(this), this.onConferenceDidCancelled = this.onConferenceDidCancelled.bind(this), this.onConferenceInfoChanged = this.onConferenceInfoChanged.bind(this), this.onScheduleAttendeesUpdated = this.onScheduleAttendeesUpdated.bind(this), this.onConferenceStatusUpdated = this.onConferenceStatusUpdated.bind(this), this.bindEvent();
|
|
13
13
|
}
|
|
@@ -24,11 +24,11 @@ const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom: A } = D()
|
|
|
24
24
|
cursor: e,
|
|
25
25
|
count: 20
|
|
26
26
|
}), i = ((s == null ? void 0 : s.conferenceList) || []).map((r) => a.transferConferenceInfoToRoomInfo(r)).reduce((r, u) => {
|
|
27
|
-
const
|
|
28
|
-
return
|
|
27
|
+
const S = r.findIndex((b) => b.roomId === u.roomId);
|
|
28
|
+
return S === -1 ? r.push(u) : r[S] = u, r;
|
|
29
29
|
}, []);
|
|
30
30
|
e === "" && (d.value = []), i.forEach((r) => {
|
|
31
|
-
const u = d.value.findIndex((
|
|
31
|
+
const u = d.value.findIndex((S) => S.roomId === r.roomId);
|
|
32
32
|
u !== -1 ? d.value[u] = r : d.value.push(r);
|
|
33
33
|
});
|
|
34
34
|
const C = (s == null ? void 0 : s.cursor) || "";
|
|
@@ -46,7 +46,7 @@ const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom: A } = D()
|
|
|
46
46
|
await (o == null ? void 0 : o.scheduleConference({
|
|
47
47
|
roomId: e,
|
|
48
48
|
roomName: n.roomName,
|
|
49
|
-
roomType:
|
|
49
|
+
roomType: y.kConference,
|
|
50
50
|
scheduleStartTime: n.scheduleStartTime,
|
|
51
51
|
scheduleEndTime: n.scheduleEndTime,
|
|
52
52
|
reminderSecondsBeforeStart: n.reminderSecondsBeforeStart,
|
|
@@ -111,7 +111,7 @@ const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom: A } = D()
|
|
|
111
111
|
// TODO: 缺少 operateUser 的数据,xxx 邀请我加入 xxx 的会议, 需要确认
|
|
112
112
|
async onConferenceScheduled({ conferenceInfo: e }) {
|
|
113
113
|
const { roomId: n } = e.basicRoomInfo, o = d.value.findIndex((s) => s.roomId === n), t = a.transferConferenceInfoToRoomInfo(e);
|
|
114
|
-
o !== -1 ? d.value[o] = t : d.value.push(t),
|
|
114
|
+
o !== -1 ? d.value[o] = t : d.value.push(t), I.emit(R.onAddedToScheduledRoom, { roomInfo: t });
|
|
115
115
|
}
|
|
116
116
|
onConferenceInfoChanged({ conferenceModifyInfo: e }) {
|
|
117
117
|
const { roomId: n } = e.basicRoomInfo, o = d.value.findIndex((t) => t.roomId === n);
|
|
@@ -132,42 +132,36 @@ const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom: A } = D()
|
|
|
132
132
|
onScheduleAttendeesUpdated(e) {
|
|
133
133
|
}
|
|
134
134
|
onConferenceDidCancelled({ conferenceInfo: e, reason: n, operateUser: o }) {
|
|
135
|
-
var m, i
|
|
135
|
+
var m, i;
|
|
136
136
|
const { roomId: t } = e.basicRoomInfo;
|
|
137
|
-
d.value = d.value.filter((
|
|
137
|
+
d.value = d.value.filter((C) => C.roomId !== t);
|
|
138
138
|
const s = a.transferConferenceInfoToRoomInfo(e);
|
|
139
|
-
if (t
|
|
140
|
-
|
|
141
|
-
roomInfo: s
|
|
142
|
-
});
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
if (t !== ((i = A.value) == null ? void 0 : i.roomId) && n === v.kConferenceCancelReasonCancelledByAdmin) {
|
|
146
|
-
S.emit(I.onScheduledRoomCancelled, {
|
|
139
|
+
if (t !== ((m = T.value) == null ? void 0 : m.roomId) && n === A.kConferenceCancelReasonCancelledByAdmin) {
|
|
140
|
+
I.emit(R.onScheduledRoomCancelled, {
|
|
147
141
|
roomInfo: s,
|
|
148
|
-
|
|
142
|
+
operator: a.transferTUIUserInfoToRoomUser(o)
|
|
149
143
|
});
|
|
150
144
|
return;
|
|
151
145
|
}
|
|
152
|
-
t !== ((
|
|
146
|
+
t !== ((i = T.value) == null ? void 0 : i.roomId) && n === A.kConferenceCancelReasonRemovedFromAttendees && I.emit(R.onRemovedFromScheduledRoom, {
|
|
153
147
|
roomInfo: s,
|
|
154
|
-
|
|
148
|
+
operator: a.transferTUIUserInfoToRoomUser(o)
|
|
155
149
|
});
|
|
156
150
|
}
|
|
157
151
|
onConferenceWillStart({ conferenceInfo: e }) {
|
|
158
|
-
|
|
152
|
+
I.emit(R.onScheduledRoomStartingSoon, {
|
|
159
153
|
roomInfo: a.transferConferenceInfoToRoomInfo(e)
|
|
160
154
|
});
|
|
161
155
|
}
|
|
162
156
|
bindEvent() {
|
|
163
|
-
|
|
157
|
+
w.once("ready", () => {
|
|
164
158
|
var n;
|
|
165
159
|
const e = (n = c.instance) == null ? void 0 : n.getConferenceListManager();
|
|
166
160
|
e == null || e.on(f.onConferenceScheduled, this.onConferenceScheduled), e == null || e.on(f.onConferenceWillStart, this.onConferenceWillStart), e == null || e.on(f.onConferenceDidCancelled, this.onConferenceDidCancelled), e == null || e.on(f.onConferenceInfoChanged, this.onConferenceInfoChanged), e == null || e.on(f.onScheduleAttendeesUpdated, this.onScheduleAttendeesUpdated), e == null || e.on(f.onConferenceStatusUpdated, this.onConferenceStatusUpdated);
|
|
167
161
|
});
|
|
168
162
|
}
|
|
169
163
|
};
|
|
170
|
-
|
|
164
|
+
v(l, "instance");
|
|
171
165
|
let U = l;
|
|
172
166
|
export {
|
|
173
167
|
U as default
|