tuikit-atomicx-vue3 4.5.2 → 4.5.4

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 (66) hide show
  1. package/dist/baseComp/Input/InputH5.vue.d.ts +1 -1
  2. package/dist/baseComp/Input/InputPC.vue.d.ts +1 -1
  3. package/dist/baseComp/Input/InputWX.vue.d.ts +1 -1
  4. package/dist/baseComp/Input/index.d.ts +15 -15
  5. package/dist/components/BarrageInput/TextEditor/TextEditor.vue.d.ts +1 -1
  6. package/dist/components/BarrageInput/index.d.ts +6 -6
  7. package/dist/components/ChatSetting/SettingItem/SettingItem.vue.d.ts +2 -2
  8. package/dist/components/ContactList/index.d.ts +6 -6
  9. package/dist/components/ConversationList/ConversationList.vue.d.ts +190 -190
  10. package/dist/components/ConversationList/ConversationPreview/ConversationPreview.vue.d.ts +82 -82
  11. package/dist/components/ConversationList/ConversationPreview/ConversationPreviewUI.vue.d.ts +16 -16
  12. package/dist/components/ConversationList/ConversationSearch/ConversationSearch.vue.d.ts +36 -36
  13. package/dist/components/ConversationList/index.d.ts +416 -416
  14. package/dist/components/LiveView/PlayerControl/PlayerControl.js +145 -128
  15. package/dist/components/LiveView/PlayerControl/PlayerControlState.d.ts +6 -4
  16. package/dist/components/LiveView/PlayerControl/PlayerControlState.js +148 -122
  17. package/dist/components/LiveView/PlayerControl/utils/domHelpers.d.ts +2 -1
  18. package/dist/components/LiveView/PlayerControl/utils/domHelpers.js +7 -6
  19. package/dist/components/LiveView/i18n/en-US/index.d.ts +3 -0
  20. package/dist/components/LiveView/i18n/en-US/index.js +4 -1
  21. package/dist/components/LiveView/i18n/zh-CN/index.d.ts +3 -0
  22. package/dist/components/LiveView/i18n/zh-CN/index.js +4 -1
  23. package/dist/components/LiveView/index.js +78 -78
  24. package/dist/components/MessageInput/MessageInput.vue.d.ts +1 -1
  25. package/dist/components/MessageInput/TextEditor/TextEditor.vue.d.ts +1 -1
  26. package/dist/components/MessageInput/index.d.ts +30 -30
  27. package/dist/components/RoomParticipantList/useParticpantAction/useNameCardAction/index.d.ts +10 -2
  28. package/dist/components/Search/Search.vue.d.ts +12 -12
  29. package/dist/components/Search/index.d.ts +18 -18
  30. package/dist/components/StreamView/Layout/CustomLayout.vue.d.ts +2 -1
  31. package/dist/components/StreamView/Layout/FloatLayout.vue.d.ts +2 -1
  32. package/dist/components/StreamView/Layout/GridLayout.vue.d.ts +2 -1
  33. package/dist/components/StreamView/Layout/MeetingLayout.vue.d.ts +1 -1
  34. package/dist/components/StreamView/common/StreamList/index.vue.d.ts +1 -1
  35. package/dist/components/StreamView/common/StreamRegion/StreamRegionPC.vue.d.ts +2 -2
  36. package/dist/components/StreamView/index.d.ts +1 -1
  37. package/dist/components/StreamView/index.vue.d.ts +1 -1
  38. package/dist/hooks/useRoomEngine.d.ts +2 -2
  39. package/dist/hooks/useUserActions/index.d.ts +18 -2
  40. package/dist/hooks/useUserActions/useChangeNameCardAction/index.d.ts +9 -1
  41. package/dist/hooks/useUserActions/useKickUserAction.d.ts +9 -1
  42. package/dist/hooks/useUserActions/useTransferOwnerAction.d.ts +9 -1
  43. package/dist/hooks/useUserActions/useVideoAction.d.ts +9 -1
  44. package/dist/states/BarrageState/BarrageState.d.ts +2 -2
  45. package/dist/states/BattleState/BattleState.d.ts +5 -5
  46. package/dist/states/CoGuestState.d.ts +1 -1
  47. package/dist/states/LiveAudienceState.d.ts +4 -4
  48. package/dist/states/LiveListState/LiveListState.d.ts +2 -2
  49. package/dist/states/LiveSeatState/index.d.ts +6 -6
  50. package/dist/states/LiveSeatState/seatManager.d.ts +6 -6
  51. package/dist/states/RoomState/roomManager.d.ts +1 -0
  52. package/dist/states/RoomState/roomManager.js +38 -29
  53. package/dist/states/RoomState/scheduleManager.js +19 -25
  54. package/dist/states/SeatStore.d.ts +148 -16
  55. package/dist/states/UserState/userManager.d.ts +1 -1
  56. package/dist/styles/index.css +1 -1
  57. package/dist/subEntry/chat/chat.d.ts +457 -457
  58. package/dist/subEntry/live/server.d.ts +1 -1
  59. package/dist/subEntry/room/server.d.ts +1 -1
  60. package/package.json +3 -2
  61. package/src/components/LiveView/PlayerControl/PlayerControl.vue +39 -15
  62. package/src/components/LiveView/PlayerControl/PlayerControlState.ts +61 -18
  63. package/src/components/LiveView/PlayerControl/utils/domHelpers.ts +4 -4
  64. package/src/components/LiveView/i18n/en-US/index.ts +3 -0
  65. package/src/components/LiveView/i18n/zh-CN/index.ts +3 -0
  66. package/src/components/LiveView/index.vue +7 -3
@@ -1,3 +1,4 @@
1
+ import { TUIVideoStreamType } from '@tencentcloud/tuiroom-engine-js';
1
2
  import { UserInfo } from '../../../types';
2
3
 
3
4
  interface Props {
@@ -8,7 +9,7 @@ interface Props {
8
9
  declare function __VLS_template(): {
9
10
  streamViewUI?(_: {
10
11
  userInfo: UserInfo;
11
- streamType: any;
12
+ streamType: TUIVideoStreamType;
12
13
  }): any;
13
14
  };
14
15
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -1,9 +1,10 @@
1
+ import { TUIVideoStreamType } from '@tencentcloud/tuiroom-engine-js';
1
2
  import { UserInfo } from '../../../types';
2
3
 
3
4
  declare function __VLS_template(): {
4
5
  streamViewUI?(_: {
5
6
  userInfo: UserInfo;
6
- streamType: any;
7
+ streamType: TUIVideoStreamType;
7
8
  }): any;
8
9
  };
9
10
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
@@ -1,3 +1,4 @@
1
+ import { TUIVideoStreamType } from '@tencentcloud/tuiroom-engine-js';
1
2
  import { UserInfo } from '../../../types';
2
3
 
3
4
  interface Props {
@@ -8,7 +9,7 @@ interface Props {
8
9
  declare function __VLS_template(): {
9
10
  streamViewUI?(_: {
10
11
  userInfo: UserInfo;
11
- streamType: any;
12
+ streamType: TUIVideoStreamType;
12
13
  }): any;
13
14
  };
14
15
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -13,7 +13,7 @@ interface Props {
13
13
  declare function __VLS_template(): {
14
14
  streamViewUI?(_: {
15
15
  userInfo: UserInfo;
16
- streamType: any;
16
+ streamType: TUIVideoStreamType;
17
17
  }): any;
18
18
  };
19
19
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -16,7 +16,7 @@ interface Props {
16
16
  declare function __VLS_template(): {
17
17
  streamViewUI?(_: {
18
18
  userInfo: UserInfo;
19
- streamType: any;
19
+ streamType: import('@tencentcloud/tuiroom-engine-js').TUIVideoStreamType;
20
20
  }): any;
21
21
  };
22
22
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -13,11 +13,11 @@ interface Props {
13
13
  declare function __VLS_template(): {
14
14
  "stream-cover"?(_: {
15
15
  userInfo: UserInfo;
16
- streamType: any;
16
+ streamType: TUIVideoStreamType;
17
17
  }): any;
18
18
  streamViewUI?(_: {
19
19
  userInfo: UserInfo;
20
- streamType: any;
20
+ streamType: TUIVideoStreamType;
21
21
  }): any;
22
22
  };
23
23
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -83,7 +83,7 @@ declare const StreamView: {
83
83
  $slots: {
84
84
  streamViewUI?(_: {
85
85
  userInfo: import('../..').UserInfo;
86
- streamType: any;
86
+ streamType: import('@tencentcloud/tuiroom-engine-js').TUIVideoStreamType;
87
87
  }): any;
88
88
  };
89
89
  });
@@ -9,7 +9,7 @@ interface Props {
9
9
  declare function __VLS_template(): {
10
10
  streamViewUI?(_: {
11
11
  userInfo: UserInfo;
12
- streamType: any;
12
+ streamType: import('@tencentcloud/tuiroom-engine-js').TUIVideoStreamType;
13
13
  }): any;
14
14
  };
15
15
  declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
@@ -1,7 +1,7 @@
1
- import { TUIRoomDeviceManager } from '@tencentcloud/tuiroom-engine-js';
1
+ import { default as TUIRoomEngine, TUIRoomDeviceManager } from '@tencentcloud/tuiroom-engine-js';
2
2
 
3
3
  export declare function useDeviceManager(): {
4
4
  instance: TUIRoomDeviceManager | null | undefined;
5
5
  };
6
- export declare function useRoomEngine(): Record<string, any>;
6
+ export declare function useRoomEngine(): Record<string, TUIRoomEngine | null>;
7
7
  export default useRoomEngine;
@@ -6,7 +6,15 @@ export declare function useUserActions(option: {
6
6
  }): {
7
7
  userActions: import('vue').ComputedRef<(import('../..').ActionType<UserAction> | {
8
8
  key: UserAction;
9
- icon: any;
9
+ icon: import('vue').Raw<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
10
+ size: {
11
+ type: import('vue').PropType<string | number>;
12
+ };
13
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
14
+ size: {
15
+ type: import('vue').PropType<string | number>;
16
+ };
17
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
10
18
  label: any;
11
19
  handler: () => void;
12
20
  })[]>;
@@ -17,7 +25,15 @@ export declare function useUserActions(option: {
17
25
  inviteStageList: import('vue').ComputedRef<import('../..').ActionType<UserAction>[]>;
18
26
  onStageControlList: import('vue').ComputedRef<(import('../..').ActionType<UserAction> | {
19
27
  key: UserAction;
20
- icon: any;
28
+ icon: import('vue').Raw<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
29
+ size: {
30
+ type: import('vue').PropType<string | number>;
31
+ };
32
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
33
+ size: {
34
+ type: import('vue').PropType<string | number>;
35
+ };
36
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
21
37
  label: any;
22
38
  handler: () => Promise<void>;
23
39
  })[]>;
@@ -2,7 +2,15 @@ import { UserAction, UserInfo } from '../../../types';
2
2
 
3
3
  export default function useNameCardAction(userInfo: UserInfo): {
4
4
  key: UserAction;
5
- icon: any;
5
+ icon: import('vue').Raw<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ size: {
7
+ type: import('vue').PropType<string | number>;
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ size: {
11
+ type: import('vue').PropType<string | number>;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
6
14
  label: any;
7
15
  handler: () => void;
8
16
  };
@@ -2,7 +2,15 @@ import { UserInfo, UserAction } from '../../types';
2
2
 
3
3
  export default function useKickUserAction(userInfo: UserInfo): {
4
4
  key: UserAction;
5
- icon: any;
5
+ icon: import('vue').Raw<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ size: {
7
+ type: import('vue').PropType<string | number>;
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ size: {
11
+ type: import('vue').PropType<string | number>;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
6
14
  label: any;
7
15
  handler: () => Promise<void>;
8
16
  };
@@ -2,7 +2,15 @@ import { UserAction, UserInfo } from '../../types';
2
2
 
3
3
  export default function useTransferOwnerAction(userInfo: UserInfo): {
4
4
  key: UserAction;
5
- icon: any;
5
+ icon: import('vue').Raw<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ size: {
7
+ type: import('vue').PropType<string | number>;
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ size: {
11
+ type: import('vue').PropType<string | number>;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
6
14
  label: any;
7
15
  handler: () => void;
8
16
  };
@@ -2,7 +2,15 @@ import { UserInfo, UserAction } from '../../types';
2
2
 
3
3
  export default function useVideoAction(userInfo: UserInfo): {
4
4
  key: UserAction;
5
- icon: any;
5
+ icon: import('vue').Raw<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
6
+ size: {
7
+ type: import('vue').PropType<string | number>;
8
+ };
9
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
10
+ size: {
11
+ type: import('vue').PropType<string | number>;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>;
6
14
  label: any;
7
15
  handler: () => Promise<void>;
8
16
  };
@@ -91,10 +91,10 @@ export declare function useBarrageState(): {
91
91
  sendTextMessage: (options: {
92
92
  text: string;
93
93
  extensionInfo?: Record<string, string>;
94
- }) => any;
94
+ }) => Promise<void> | undefined;
95
95
  sendCustomMessage: (options: {
96
96
  businessId: string;
97
97
  data: string;
98
- }) => any;
98
+ }) => Promise<void> | undefined;
99
99
  appendLocalTip: (message: Barrage) => void;
100
100
  };
@@ -124,18 +124,18 @@ export declare function useBattleState(): {
124
124
  config: BattleConfig;
125
125
  userIdList: string[];
126
126
  timeout: number;
127
- }) => any;
127
+ }) => Promise<any> | undefined;
128
128
  cancelBattleRequest: (options: {
129
129
  battleId: string;
130
130
  userIdList: string[];
131
- }) => any;
131
+ }) => Promise<void> | undefined;
132
132
  acceptBattle: (options: {
133
133
  battleId: string;
134
- }) => any;
134
+ }) => Promise<void> | undefined;
135
135
  rejectBattle: (options: {
136
136
  battleId: string;
137
- }) => any;
137
+ }) => Promise<void> | undefined;
138
138
  exitBattle: (options: {
139
139
  battleId: string;
140
- }) => any;
140
+ }) => Promise<void> | undefined;
141
141
  };
@@ -82,7 +82,7 @@ export declare function useCoGuestState(): {
82
82
  rejectInvitation: (options: {
83
83
  inviterId: string;
84
84
  }) => Promise<void>;
85
- disConnect: () => Promise<any>;
85
+ disConnect: () => Promise<void | undefined>;
86
86
  subscribeEvent: (event: HostEvent | GuestEvent, callback: (eventInfo: any) => void) => void;
87
87
  unsubscribeEvent: (event: HostEvent | GuestEvent, callback: (eventInfo: any) => void) => void;
88
88
  };
@@ -44,17 +44,17 @@ export declare function useLiveAudienceState(): {
44
44
  fetchAudienceList: () => Promise<AudienceInfo[]>;
45
45
  setAdministrator: ({ userId }: {
46
46
  userId: string;
47
- }) => Promise<any>;
47
+ }) => Promise<void | undefined>;
48
48
  revokeAdministrator: ({ userId }: {
49
49
  userId: string;
50
- }) => Promise<any>;
50
+ }) => Promise<void | undefined>;
51
51
  kickUserOutOfRoom: ({ userId }: {
52
52
  userId: string;
53
- }) => Promise<any>;
53
+ }) => Promise<void | undefined>;
54
54
  disableSendMessage: ({ userId, isDisable }: {
55
55
  userId: string;
56
56
  isDisable: boolean;
57
- }) => Promise<any>;
57
+ }) => Promise<void | undefined>;
58
58
  subscribeEvent: (event: LiveAudienceEvent, callback: (eventInfo: any) => void) => void;
59
59
  unsubscribeEvent: (event: LiveAudienceEvent, callback: (eventInfo: any) => void) => void;
60
60
  };
@@ -121,10 +121,10 @@ export declare function useLiveListState(): {
121
121
  updateLiveInfo: (params: UpdateLiveInfoParams) => Promise<void>;
122
122
  queryMetaData: (options: {
123
123
  keys: string[];
124
- }) => any;
124
+ }) => Promise<any> | undefined;
125
125
  updateLiveMetaData: (options: {
126
126
  metaData: string;
127
- }) => any;
127
+ }) => Promise<void> | undefined;
128
128
  subscribeEvent: (event: LiveListEvent, callback: (eventInfo: any) => void) => void;
129
129
  unsubscribeEvent: (event: LiveListEvent, callback: (eventInfo: any) => void) => void;
130
130
  };
@@ -80,8 +80,8 @@ export declare function useLiveSeatState(): {
80
80
  }> & Omit<Map<string, import('../..').NetworkInfo>, keyof Map<any, any>>)>;
81
81
  takeSeat: ({ seatIndex }: {
82
82
  seatIndex: number;
83
- }) => Promise<any>;
84
- leaveSeat: () => Promise<any>;
83
+ }) => Promise<import('@tencentcloud/tuiroom-engine-js').TUIRequest | undefined>;
84
+ leaveSeat: () => Promise<void | undefined>;
85
85
  lockSeat: ({ seatIndex }: {
86
86
  seatIndex: number;
87
87
  }) => Promise<any>;
@@ -90,26 +90,26 @@ export declare function useLiveSeatState(): {
90
90
  }) => Promise<any>;
91
91
  kickUserOutOfSeat: ({ userId }: {
92
92
  userId: string;
93
- }) => Promise<any>;
93
+ }) => Promise<void>;
94
94
  moveUserToSeat: ({ userId, targetIndex, policy }: {
95
95
  userId: string;
96
96
  targetIndex: number;
97
97
  policy: import('../..').MoveSeatPolicy;
98
- }) => Promise<any>;
98
+ }) => Promise<void>;
99
99
  openRemoteCamera: ({ userId, policy }: {
100
100
  userId: string;
101
101
  policy: import('../..').DeviceControlPolicy;
102
102
  }) => Promise<any>;
103
103
  closeRemoteCamera: ({ userId }: {
104
104
  userId: string;
105
- }) => Promise<any>;
105
+ }) => Promise<void | undefined>;
106
106
  openRemoteMicrophone: ({ userId, policy }: {
107
107
  userId: string;
108
108
  policy: import('../..').DeviceControlPolicy;
109
109
  }) => Promise<any>;
110
110
  closeRemoteMicrophone: ({ userId }: {
111
111
  userId: string;
112
- }) => Promise<any>;
112
+ }) => Promise<void | undefined>;
113
113
  muteMicrophone: () => Promise<void>;
114
114
  unmuteMicrophone: () => Promise<void>;
115
115
  startPlayStream: ({ view }: {
@@ -34,7 +34,7 @@ declare class SeatManager {
34
34
  */
35
35
  takeSeat({ seatIndex }: {
36
36
  seatIndex: number;
37
- }): Promise<any>;
37
+ }): Promise<import('@tencentcloud/tuiroom-engine-js').TUIRequest | undefined>;
38
38
  /**
39
39
  * 用户下麦
40
40
  * @memberof module:LiveSeatState/seatManager
@@ -53,7 +53,7 @@ declare class SeatManager {
53
53
  * }
54
54
  * ```
55
55
  */
56
- leaveSeat(): Promise<any>;
56
+ leaveSeat(): Promise<void | undefined>;
57
57
  /**
58
58
  * 锁定麦位
59
59
  * @memberof module:LiveSeatState/seatManager
@@ -122,7 +122,7 @@ declare class SeatManager {
122
122
  */
123
123
  kickUserOutOfSeat({ userId }: {
124
124
  userId: string;
125
- }): Promise<any>;
125
+ }): Promise<void>;
126
126
  /**
127
127
  * 移动用户到指定麦位
128
128
  * @memberof module:LiveSeatState/seatManager
@@ -153,7 +153,7 @@ declare class SeatManager {
153
153
  userId: string;
154
154
  targetIndex: number;
155
155
  policy: MoveSeatPolicy;
156
- }): Promise<any>;
156
+ }): Promise<void>;
157
157
  /**
158
158
  * 关闭远端摄像头
159
159
  * @memberof module:LiveSeatState/seatManager
@@ -176,7 +176,7 @@ declare class SeatManager {
176
176
  */
177
177
  closeRemoteCamera({ userId }: {
178
178
  userId: string;
179
- }): Promise<any>;
179
+ }): Promise<void | undefined>;
180
180
  /**
181
181
  * 关闭远端麦克风
182
182
  * @memberof module:LiveSeatState/seatManager
@@ -199,7 +199,7 @@ declare class SeatManager {
199
199
  */
200
200
  closeRemoteMicrophone({ userId }: {
201
201
  userId: string;
202
- }): Promise<any>;
202
+ }): Promise<void | undefined>;
203
203
  /**
204
204
  * 开启远端摄像头
205
205
  * @memberof module:LiveSeatState/seatManager
@@ -29,6 +29,7 @@ declare class RoomManager {
29
29
  private onRoomUserCountChanged;
30
30
  private onConferenceInfoChanged;
31
31
  private onKickedOutOfRoom;
32
+ private onConferenceDidCancelled;
32
33
  private bindEvent;
33
34
  }
34
35
  export default RoomManager;
@@ -1,47 +1,49 @@
1
- var U = Object.defineProperty;
2
- var A = (t, e, o) => e in t ? U(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var g = (t, e, o) => A(t, typeof e != "symbol" ? e + "" : e, o);
4
- import v, { TUIRoomType as d, TUIRoomEvents as r, TUIConferenceListManagerEvents as D } from "@tencentcloud/tuiroom-engine-js";
5
- import { useRoomEngine as I } from "../../hooks/useRoomEngine.js";
6
- import { isUndefined as b } from "../../utils/utils.js";
7
- import { useLoginState as p } from "../LoginState.js";
8
- import { transferTUIRoomInfoToRoomInfo as c } from "./common.js";
9
- import { useRoomStore as S } from "./store.js";
10
- const { loginUserInfo: w } = p(), s = I(), { currentRoom: n } = S(), l = class l {
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
+ import { eventCenter as S } from "../../utils/eventCenter.js";
7
+ import { isUndefined as R } from "../../utils/utils.js";
8
+ import { useLoginState as w } from "../LoginState.js";
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 {
11
13
  constructor() {
12
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();
13
15
  }
14
16
  static getInstance() {
15
- return l.instance || (l.instance = new l()), l.instance;
17
+ return m.instance || (m.instance = new m()), m.instance;
16
18
  }
17
19
  async createAndJoinRoom({ roomId: e, options: o }) {
18
- var i, m, h;
19
- if (!((i = w.value) != null && i.userId) || !s.instance)
20
+ var i, l, r;
21
+ if (!((i = M.value) != null && i.userId) || !s.instance)
20
22
  throw new Error("please login firstly by useLoginState");
21
- await ((m = s.instance) == null ? void 0 : m.createRoom({
23
+ await ((l = s.instance) == null ? void 0 : l.createRoom({
22
24
  roomId: e,
23
25
  roomName: o.roomName,
24
- roomType: d.kConference,
26
+ roomType: c.kConference,
25
27
  password: o.password || "",
26
28
  isMicrophoneDisableForAllUser: o.isAllMicrophoneDisabled,
27
29
  isScreenShareDisableForAllUser: o.isAllScreenShareDisabled,
28
30
  isCameraDisableForAllUser: o.isAllCameraDisabled,
29
31
  isMessageDisableForAllUser: o.isAllMessageDisabled
30
32
  }));
31
- const a = await ((h = s.instance) == null ? void 0 : h.enterRoom({
33
+ const a = await ((r = s.instance) == null ? void 0 : r.enterRoom({
32
34
  roomId: e,
33
- roomType: d.kConference
35
+ roomType: c.kConference
34
36
  }));
35
- a && (n.value = c(a));
37
+ a && (n.value = h(a));
36
38
  }
37
39
  async joinRoom({ roomId: e, password: o }) {
38
40
  var i;
39
41
  const a = await ((i = s.instance) == null ? void 0 : i.enterRoom({
40
42
  roomId: e,
41
- roomType: d.kConference,
43
+ roomType: c.kConference,
42
44
  options: { password: o }
43
45
  }));
44
- a && (n.value = c(a));
46
+ a && (n.value = h(a));
45
47
  }
46
48
  async leaveRoom() {
47
49
  var e;
@@ -53,14 +55,14 @@ const { loginUserInfo: w } = p(), s = I(), { currentRoom: n } = S(), l = class l
53
55
  }
54
56
  async getRoomInfo({ roomId: e }) {
55
57
  var a;
56
- const o = await ((a = s.instance) == null ? void 0 : a.fetchRoomInfo({ roomId: e, roomType: d.kConference }));
58
+ const o = await ((a = s.instance) == null ? void 0 : a.fetchRoomInfo({ roomId: e, roomType: c.kConference }));
57
59
  if (!o)
58
60
  throw new Error("roomInfo is undefined");
59
- return c(o);
61
+ return h(o);
60
62
  }
61
63
  async updateRoomInfo({ options: e }) {
62
64
  var o, a;
63
- b(e.roomName) || await ((o = s.instance) == null ? void 0 : o.updateRoomNameByAdmin({ roomName: e.roomName || "" })), b(e.password) || await ((a = s.instance) == null ? void 0 : a.updateRoomPasswordByAdmin({ password: e.password || "" }));
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 || "" }));
64
66
  }
65
67
  onRoomNameChanged({ roomId: e, roomName: o }) {
66
68
  var a;
@@ -108,16 +110,23 @@ const { loginUserInfo: w } = p(), s = I(), { currentRoom: n } = S(), l = class l
108
110
  var o;
109
111
  e === ((o = n.value) == null ? void 0 : o.roomId) && (n.value = null);
110
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
+ }
111
120
  bindEvent() {
112
- v.once("ready", () => {
113
- var o, a, i, m, h, u, C, f;
121
+ D.once("ready", () => {
122
+ var o, a, i, l, r, C, f, u;
114
123
  const e = (o = s.instance) == null ? void 0 : o.getConferenceListManager();
115
- (a = s.instance) == null || a.on(r.onRoomNameChanged, this.onRoomNameChanged), e == null || e.on(D.onConferenceInfoChanged, this.onConferenceInfoChanged), (i = s.instance) == null || i.on(r.onKickedOutOfRoom, this.onKickedOutOfRoom), (m = s.instance) == null || m.on(r.onRoomUserCountChanged, this.onRoomUserCountChanged), (h = s.instance) == null || h.on(r.onAllUserCameraDisableChanged, this.onAllUserCameraDisableChanged), (u = s.instance) == null || u.on(r.onScreenShareForAllUserDisableChanged, this.onScreenShareForAllUserDisableChanged), (C = s.instance) == null || C.on(r.onAllUserMicrophoneDisableChanged, this.onAllUserMicrophoneDisableChanged), (f = s.instance) == null || f.on(r.onSendMessageForAllUserDisableChanged, this.onAllUserMessageDisableChanged);
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);
116
125
  });
117
126
  }
118
127
  };
119
- g(l, "instance");
120
- let R = l;
128
+ g(m, "instance");
129
+ let U = m;
121
130
  export {
122
- R as default
131
+ U as default
123
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 T = (h, e, n) => p(h, typeof e != "symbol" ? e + "" : e, n);
4
- import y, { TUIRoomType as E, TUIConferenceCancelReason as v, TUIConferenceListManagerEvents as f } from "@tencentcloud/tuiroom-engine-js";
5
- import { useRoomEngine as w } from "../../hooks/useRoomEngine.js";
6
- import { eventCenter as S } from "../../utils/eventCenter.js";
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 I } from "../../types/room.js";
10
- const { scheduledRoomList: d, scheduledRoomListCursor: x, currentRoom: A } = D(), c = w(), l = class l {
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 R = r.findIndex((b) => b.roomId === u.roomId);
28
- return R === -1 ? r.push(u) : r[R] = u, r;
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((R) => R.roomId === r.roomId);
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: E.kConference,
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), S.emit(I.onAddedToScheduledRoom, { roomInfo: 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, C;
135
+ var m, i;
136
136
  const { roomId: t } = e.basicRoomInfo;
137
- d.value = d.value.filter((r) => r.roomId !== t);
137
+ d.value = d.value.filter((C) => C.roomId !== t);
138
138
  const s = a.transferConferenceInfoToRoomInfo(e);
139
- if (t === ((m = A.value) == null ? void 0 : m.roomId) && n === v.kConferenceCancelReasonCancelledByAdmin) {
140
- S.emit(I.onRoomEnded, {
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 !== ((C = A.value) == null ? void 0 : C.roomId) && n === v.kConferenceCancelReasonRemovedFromAttendees && S.emit(I.onRemovedFromScheduledRoom, {
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
- S.emit(I.onScheduledRoomStartingSoon, {
152
+ I.emit(R.onScheduledRoomStartingSoon, {
159
153
  roomInfo: a.transferConferenceInfoToRoomInfo(e)
160
154
  });
161
155
  }
162
156
  bindEvent() {
163
- y.once("ready", () => {
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
- T(l, "instance");
164
+ v(l, "instance");
171
165
  let U = l;
172
166
  export {
173
167
  U as default