fcr-ui-scene 3.4.2 → 3.4.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 (215) hide show
  1. package/lib/common/device-store.d.ts +23 -14
  2. package/lib/common/device-store.js +361 -252
  3. package/lib/common/device-stream-store.d.ts +8 -14
  4. package/lib/common/device-stream-store.js +254 -116
  5. package/lib/common/event-store.d.ts +35 -10
  6. package/lib/common/event-store.js +64 -13
  7. package/lib/common/security-store.d.ts +47 -39
  8. package/lib/common/security-store.js +335 -379
  9. package/lib/electron/app.js +1 -0
  10. package/lib/modules/action-bar/action-bar-collapes-items.d.ts +4 -1
  11. package/lib/modules/action-bar/action-bar-collapes-items.js +38 -21
  12. package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +7 -0
  13. package/lib/modules/action-bar/components/apps/useWidgetList.js +43 -0
  14. package/lib/modules/action-bar/components/leave/assign-host.d.ts +8 -1
  15. package/lib/modules/action-bar/components/leave/assign-host.js +1 -1
  16. package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +16 -1
  17. package/lib/modules/action-bar/smaller.js +5 -5
  18. package/lib/modules/chat/chat-bar/index.css +6 -0
  19. package/lib/modules/chat/chat-bar/index.d.ts +3 -3
  20. package/lib/modules/chat/chat-bar/index.js +51 -39
  21. package/lib/modules/chat/chat-select/index.css +27 -7
  22. package/lib/modules/chat/chat-select/index.d.ts +1 -1
  23. package/lib/modules/chat/chat-select/index.js +18 -4
  24. package/lib/modules/chat/chat.d.ts +1 -2
  25. package/lib/modules/chat/chat.js +196 -128
  26. package/lib/modules/chat/components/chat-select/select-input/index.d.ts +7 -0
  27. package/lib/modules/chat/components/chat-select/select-input/index.js +35 -0
  28. package/lib/modules/chat/components/chat-select/select-item/index.d.ts +12 -0
  29. package/lib/modules/chat/components/chat-select/select-item/index.js +153 -0
  30. package/lib/modules/chat/components/chat-tabs/index.d.ts +2 -0
  31. package/lib/modules/chat/components/chat-tabs/index.js +61 -0
  32. package/lib/modules/chat/components/message-list/chat-empty/index.d.ts +2 -0
  33. package/lib/modules/chat/components/message-list/chat-empty/index.js +26 -0
  34. package/lib/modules/chat/components/message-list/history-unread-message-button/index.d.ts +7 -0
  35. package/lib/modules/chat/components/message-list/history-unread-message-button/index.js +55 -0
  36. package/lib/modules/chat/components/message-list/message-item/index.d.ts +15 -0
  37. package/lib/modules/chat/components/message-list/message-item/index.js +279 -0
  38. package/lib/modules/chat/components/message-list/scroll-bottom-button/index.d.ts +9 -0
  39. package/lib/modules/chat/components/message-list/scroll-bottom-button/index.js +67 -0
  40. package/lib/modules/chat/message-list.js +68 -51
  41. package/lib/modules/components/dialog-container/component/body.js +1 -2
  42. package/lib/modules/components/dialog-container/index.d.ts +2 -2
  43. package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +6 -0
  44. package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +36 -0
  45. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +40 -0
  46. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +170 -0
  47. package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +11 -0
  48. package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +105 -0
  49. package/lib/modules/components/member-window/components/member-actions/components/layout/index.d.ts +9 -0
  50. package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +42 -0
  51. package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +11 -0
  52. package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +159 -0
  53. package/lib/modules/components/member-window/components/member-actions/components/share-status.d.ts +2 -0
  54. package/lib/modules/components/member-window/components/member-actions/components/share-status.js +32 -0
  55. package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +16 -0
  56. package/lib/modules/components/member-window/components/member-actions/components/user-info.js +130 -0
  57. package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +12 -0
  58. package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +57 -0
  59. package/lib/modules/components/member-window/components/member-actions/index.d.ts +3 -0
  60. package/lib/modules/components/member-window/components/member-actions/index.js +122 -0
  61. package/lib/modules/components/member-window/components/member-actions/libs/index.d.ts +2 -0
  62. package/lib/modules/components/member-window/components/member-actions/libs/index.js +24 -0
  63. package/lib/modules/components/member-window/components/member-actions/provider.d.ts +21 -0
  64. package/lib/modules/components/member-window/components/member-actions/provider.js +77 -0
  65. package/lib/modules/components/member-window/components/member-actions/store.d.ts +48 -0
  66. package/lib/modules/components/member-window/components/member-actions/store.js +306 -0
  67. package/lib/modules/components/member-window/components/member-board.d.ts +2 -0
  68. package/lib/modules/components/member-window/components/member-board.js +63 -0
  69. package/lib/modules/components/member-window/components/mic-volume.d.ts +2 -0
  70. package/lib/modules/components/member-window/components/mic-volume.js +23 -0
  71. package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +4 -0
  72. package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +40 -0
  73. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +8 -0
  74. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +62 -0
  75. package/lib/modules/components/member-window/components/video-player/index.d.ts +9 -0
  76. package/lib/modules/components/member-window/components/video-player/index.js +38 -0
  77. package/lib/modules/components/member-window/types.d.ts +78 -0
  78. package/lib/modules/components/member-window/types.js +6 -0
  79. package/lib/modules/connection-gateway/components/tabs/index.js +2 -1
  80. package/lib/modules/control-bar/components/meeting-details/index.js +7 -15
  81. package/lib/modules/control-bar/components/more-actions/index.js +5 -15
  82. package/lib/modules/dialog/components/system-preference/assets/bg1.png +0 -0
  83. package/lib/modules/dialog/components/system-preference/assets/bg2.png +0 -0
  84. package/lib/modules/dialog/components/system-preference/assets/fcr_png_host.png +0 -0
  85. package/lib/modules/dialog/components/widget/electron.d.ts +5 -0
  86. package/lib/modules/dialog/components/widget/electron.js +41 -0
  87. package/lib/modules/dialog/components/widget/index.d.ts +6 -0
  88. package/lib/modules/dialog/components/widget/index.js +41 -0
  89. package/lib/modules/dialog/type.d.ts +84 -0
  90. package/lib/modules/dialog/type.js +6 -0
  91. package/lib/modules/invite/components/pstn-invite.js +4 -13
  92. package/lib/modules/invite/pstn-invite.js +7 -9
  93. package/lib/modules/invite/store.d.ts +2 -0
  94. package/lib/modules/invite/store.js +6 -0
  95. package/lib/modules/invite/voip-invite.js +5 -6
  96. package/lib/modules/layout/member-window/index.css +116 -18
  97. package/lib/modules/layout/member-window/index.d.ts +10 -3
  98. package/lib/modules/layout/member-window/index.js +227 -115
  99. package/lib/modules/participant/attendee/index.css +0 -51
  100. package/lib/modules/participant/attendee/index.d.ts +8 -5
  101. package/lib/modules/participant/attendee/index.js +61 -15
  102. package/lib/modules/participant/components/attendee/components/interpreter-tag/index.d.ts +3 -0
  103. package/lib/modules/participant/components/attendee/components/interpreter-tag/index.js +48 -0
  104. package/lib/modules/participant/components/confirm-input/index.d.ts +6 -0
  105. package/lib/modules/participant/components/confirm-input/index.js +49 -0
  106. package/lib/modules/participant/components/drop-menu/util.d.ts +5 -0
  107. package/lib/modules/participant/components/drop-menu/util.js +28 -0
  108. package/lib/modules/participant/components/participants/components/footer/components/buttons.d.ts +6 -0
  109. package/lib/modules/participant/components/participants/components/footer/components/buttons.js +52 -0
  110. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +60 -0
  111. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.d.ts +2 -0
  112. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +166 -0
  113. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.d.ts +5 -0
  114. package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.js +28 -0
  115. package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +13 -0
  116. package/lib/modules/participant/components/participants/components/footer/components/footer/index.d.ts +5 -0
  117. package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +242 -0
  118. package/lib/modules/participant/components/participants/components/footer/index.d.ts +5 -0
  119. package/lib/modules/participant/components/participants/components/footer/index.js +47 -0
  120. package/lib/modules/participant/components/participants/components/merge/index.d.ts +11 -0
  121. package/lib/modules/participant/components/participants/components/merge/index.js +49 -0
  122. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +191 -0
  123. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.d.ts +4 -0
  124. package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +204 -0
  125. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +49 -0
  126. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.d.ts +5 -0
  127. package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +219 -0
  128. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +5 -0
  129. package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +70 -0
  130. package/lib/modules/participant/components/participants/components/participants/index.css +104 -0
  131. package/lib/modules/participant/components/participants/components/participants/index.d.ts +3 -0
  132. package/lib/modules/participant/components/participants/components/participants/index.js +110 -0
  133. package/lib/modules/participant/components/participants/components/render-tab/index.d.ts +2 -0
  134. package/lib/modules/participant/components/participants/components/render-tab/index.js +49 -0
  135. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.d.ts +3 -0
  136. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +48 -0
  137. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.d.ts +6 -0
  138. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +28 -0
  139. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.d.ts +7 -0
  140. package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.js +39 -0
  141. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +69 -0
  142. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.d.ts +5 -0
  143. package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +135 -0
  144. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.d.ts +7 -0
  145. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.js +31 -0
  146. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +12 -0
  147. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +82 -0
  148. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.d.ts +4 -0
  149. package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.js +26 -0
  150. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.d.ts +2 -0
  151. package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +75 -0
  152. package/lib/modules/participant/components/participants/components/render-user/index.d.ts +5 -0
  153. package/lib/modules/participant/components/participants/components/render-user/index.js +21 -0
  154. package/lib/modules/participant/components/participants/render-tab/index.d.ts +2 -0
  155. package/lib/modules/participant/components/participants/render-tab/index.js +49 -0
  156. package/lib/modules/participant/components/participants/render-user/index.d.ts +5 -0
  157. package/lib/modules/participant/components/participants/render-user/index.js +21 -0
  158. package/lib/modules/participant/components/participants/types.d.ts +96 -0
  159. package/lib/modules/participant/components/participants/types.js +37 -0
  160. package/lib/modules/participant/components/user-action/audio-button/index.d.ts +7 -0
  161. package/lib/modules/participant/components/user-action/audio-button/index.js +31 -0
  162. package/lib/modules/participant/components/user-action/move-actions-popover/index.d.ts +12 -0
  163. package/lib/modules/participant/components/user-action/move-actions-popover/index.js +82 -0
  164. package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.d.ts +4 -0
  165. package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.js +26 -0
  166. package/lib/modules/share-screen/selection/index.css +4 -0
  167. package/lib/modules/share-screen/selection/index.js +126 -129
  168. package/lib/modules/share-screen/share-state-bar/index.js +1 -1
  169. package/lib/modules/state-bar/meeting-details.js +29 -34
  170. package/lib/modules/video-window/components/deviceState/index.d.ts +7 -0
  171. package/lib/modules/video-window/components/deviceState/index.js +75 -0
  172. package/lib/modules/video-window/components/members/index.css +51 -0
  173. package/lib/modules/video-window/components/members/index.d.ts +2 -0
  174. package/lib/modules/video-window/components/members/index.js +130 -0
  175. package/lib/modules/video-window/components/speaking/index.css +86 -0
  176. package/lib/modules/video-window/components/speaking/index.d.ts +3 -0
  177. package/lib/modules/video-window/components/speaking/index.js +48 -0
  178. package/lib/modules/video-window/components/topControl/index.css +35 -0
  179. package/lib/modules/video-window/components/topControl/index.d.ts +3 -0
  180. package/lib/modules/video-window/components/topControl/index.js +79 -0
  181. package/lib/modules/widget/index.css +17 -0
  182. package/lib/modules/widget/index.d.ts +10 -0
  183. package/lib/modules/widget/index.js +114 -0
  184. package/lib/modules/widget/sdk.d.ts +30 -0
  185. package/lib/modules/widget/sdk.js +221 -0
  186. package/lib/modules/widget/store.d.ts +14 -0
  187. package/lib/modules/widget/store.js +28 -0
  188. package/lib/modules/widget/type.d.ts +155 -0
  189. package/lib/modules/widget/type.js +6 -0
  190. package/lib/modules/widget/view.d.ts +2 -0
  191. package/lib/modules/widget/view.js +47 -0
  192. package/lib/modules/widget/web-widget.d.ts +29 -0
  193. package/lib/modules/widget/web-widget.js +234 -0
  194. package/lib/providers/ability-provider.d.ts +24 -0
  195. package/lib/providers/ability-provider.js +36 -0
  196. package/lib/providers/widget-provider.d.ts +44 -0
  197. package/lib/providers/widget-provider.js +167 -0
  198. package/lib/schema.d.ts +114 -0
  199. package/lib/schema.js +77 -0
  200. package/lib/shared-data-source/member-data.d.ts +126 -0
  201. package/lib/shared-data-source/member-data.js +465 -0
  202. package/lib/translations/enUS.d.ts +5 -0
  203. package/lib/translations/enUS.js +9 -3
  204. package/lib/translations/zhCN.d.ts +5 -0
  205. package/lib/translations/zhCN.js +13 -7
  206. package/lib/utilities/extract.d.ts +1 -1
  207. package/lib/utilities/logger.d.ts +8 -0
  208. package/lib/utilities/logger.js +42 -0
  209. package/lib/utilities/meeting-detail.d.ts +2 -0
  210. package/lib/utilities/meeting-detail.js +56 -0
  211. package/lib/utilities/validate-params.d.ts +2 -0
  212. package/lib/utilities/validate-params.js +16 -0
  213. package/lib/widget-sdk.d.ts +2 -0
  214. package/lib/widget-sdk.js +13 -0
  215. package/package.json +5 -5
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.MoveToMainRoomButton = void 0;
8
+ var _action = require("agora-ui-foundation/lib/components/button/action");
9
+ var _i18n = require("agora-ui-foundation/lib/i18n");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ // 处理移入主房间按钮点击的组件
12
+ var MoveToMainRoomButton = exports.MoveToMainRoomButton = function MoveToMainRoomButton(props) {
13
+ var userId = props.userId,
14
+ moveToMainRoomByUserIds = props.moveToMainRoomByUserIds;
15
+ var t = (0, _i18n.useI18n)();
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
17
+ size: "small",
18
+ onClick: function onClick() {
19
+ return moveToMainRoomByUserIds([userId]);
20
+ },
21
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
22
+ className: 'attendee__normal-operate',
23
+ children: t('fmt_waitingroom_sidebar_button_admit')
24
+ })
25
+ });
26
+ };
@@ -0,0 +1,2 @@
1
+ import { UserActionsPropsType } from '../../../../types';
2
+ export declare const UserActions: (props: UserActionsPropsType) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.UserActions = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
+ var _react = require("react");
11
+ var _fcrCore = require("fcr-core");
12
+ var _useClickAnywhere = require("agora-ui-foundation/lib/hooks/use-click-anywhere");
13
+ var _audioButton = require("./components/audio-button");
14
+ var _moveToMainroomButton = require("./components/move-to-mainroom-button");
15
+ var _moveActionsPopover = require("./components/move-actions-popover");
16
+ var _store = require("../../../../../../store");
17
+ var _useElectron = require("../../../../../../../dialog/hooks/useElectron");
18
+ var _muteAction = require("../../../../../../../../utilities/mute-action");
19
+ var _type = require("../../../../../../../../type");
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+ var waitingRoomParticipateActionsNeedHiden = ['start_video', 'request_start_video', 'stop_video', 'pin', 'set_as_host', 'set_as_co_host', 'revoke_co_host', 'merge_video', 'put_into_waiting_room'];
22
+ var UserActions = exports.UserActions = function UserActions(props) {
23
+ var user = props.user;
24
+ var _useContext = (0, _react.useContext)(_store.StoreContext),
25
+ activeTab = _useContext.activeTab,
26
+ hasMutePermission = _useContext.hasMutePermission,
27
+ hasUnmutePermission = _useContext.hasUnmutePermission,
28
+ hasRequestStartAudioPermission = _useContext.hasRequestStartAudioPermission,
29
+ moveToMainRoomByUserIds = _useContext.moveToMainRoomByUserIds,
30
+ type = _useContext.currentModal,
31
+ onParticipantsButtonClick = _useContext.handlerUserAction;
32
+ var hasAudio = user.hasAudio,
33
+ userId = user.userId,
34
+ userRole = user.userRole,
35
+ isMe = user.isMe;
36
+ var dialogInstanceContext = (0, _react.useContext)(_useElectron.DialogInstanceContext);
37
+ var _useState = (0, _react.useState)(false),
38
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
39
+ isShowDropMenu = _useState2[0],
40
+ setIsShowDropMenu = _useState2[1];
41
+ var clickAnywhere = (0, _react.useCallback)(function () {
42
+ setIsShowDropMenu(false);
43
+ }, [setIsShowDropMenu]);
44
+ var clickRef = (0, _useClickAnywhere.useClickAnywhere)(clickAnywhere, type === 'modal' ? dialogInstanceContext === null || dialogInstanceContext === void 0 ? void 0 : dialogInstanceContext.newRendererWindow : window);
45
+ var mainRoomParticipateActionsNeedHiden = isMe ? ['private_chat'] : [];
46
+ var muteAudioPermission = hasMutePermission(isMe ? _fcrCore.FcrPrivilegeUserRole.SELF : userRole);
47
+ var startAudioPermission = hasUnmutePermission(isMe ? _fcrCore.FcrPrivilegeUserRole.SELF : userRole);
48
+ var requestStartAudioPermission = hasRequestStartAudioPermission(userRole);
49
+ var _actionMute = (0, _muteAction.actionMute)(!!isMe, hasAudio, muteAudioPermission, startAudioPermission, requestStartAudioPermission),
50
+ isShowActionAudio = _actionMute.isShowActionAudio,
51
+ actionAudioTag = _actionMute.actionAudioTag;
52
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
53
+ className: "attendee__user-action attendee__user-action-host ".concat(isShowDropMenu ? 'attendee__user-action-hovered' : ''),
54
+ children: [isShowActionAudio && activeTab === _type.FcrUIRoomType.MAIN_ROOM && /*#__PURE__*/(0, _jsxRuntime.jsx)(_audioButton.AudioButton, {
55
+ hasAudio: hasAudio,
56
+ userId: userId,
57
+ onParticipantsButtonClick: onParticipantsButtonClick,
58
+ actionAudioTag: actionAudioTag
59
+ }), activeTab === _type.FcrUIRoomType.WAITING_ROOM && /*#__PURE__*/(0, _jsxRuntime.jsx)(_moveToMainroomButton.MoveToMainRoomButton, {
60
+ userId: userId,
61
+ moveToMainRoomByUserIds: moveToMainRoomByUserIds
62
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_moveActionsPopover.MoreActionsPopover, {
63
+ user: user,
64
+ isShowDropMenu: isShowDropMenu,
65
+ setIsShowDropMenu: setIsShowDropMenu,
66
+ clickRef: clickRef,
67
+ handleMoreActionsClick: function handleMoreActionsClick(action, userId) {
68
+ onParticipantsButtonClick(action, userId);
69
+ setIsShowDropMenu(false);
70
+ },
71
+ waitingRoomParticipateActionsNeedHiden: waitingRoomParticipateActionsNeedHiden,
72
+ mainRoomParticipateActionsNeedHiden: mainRoomParticipateActionsNeedHiden
73
+ })]
74
+ });
75
+ };
@@ -0,0 +1,5 @@
1
+ import { User } from '../../types';
2
+ declare const RenderUser: ({ user }: {
3
+ user: User;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default RenderUser;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _mobxReact = require("mobx-react");
9
+ var _attendee = require("./components/attendee");
10
+ var _userAction = require("./components/user-action");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ var RenderUser = (0, _mobxReact.observer)(function (_ref) {
13
+ var user = _ref.user;
14
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_attendee.ParticipantAttendee, {
15
+ user: user,
16
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_userAction.UserActions, {
17
+ user: user
18
+ })
19
+ });
20
+ });
21
+ var _default = exports["default"] = RenderUser;
@@ -0,0 +1,2 @@
1
+ declare const RenderTabs: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export default RenderTabs;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _tabs = require("agora-ui-foundation/lib/components/tabs");
9
+ var _type = require("fcr-core/lib/room-control/type");
10
+ var _react = require("react");
11
+ var _store = require("../../../store");
12
+ var _i18n = require("agora-ui-foundation/lib/i18n");
13
+ var _mobxReact = require("mobx-react");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ var RenderTabs = (0, _mobxReact.observer)(function () {
16
+ var _useContext = (0, _react.useContext)(_store.StoreContext),
17
+ waitingRoomUserCount = _useContext.waitingRoomUserCount,
18
+ isNewWaitingRoomUserEnter = _useContext.isNewWaitingRoomUserEnter,
19
+ activeTab = _useContext.activeTab,
20
+ handleActiveTab = _useContext.handleActiveTab;
21
+ var transI18n = (0, _i18n.useI18n)();
22
+ var renderTabs = (0, _react.useCallback)(function () {
23
+ if (waitingRoomUserCount > 0) {
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabs.FcrTabs, {
25
+ items: [{
26
+ label: transI18n('fmt_waitingroom_sidebar_chat_label_meeting'),
27
+ key: _type.FcrRoomType.Mainroom
28
+ }, {
29
+ label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
30
+ className: "participants-container-icon",
31
+ children: [isNewWaitingRoomUserEnter ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
32
+ className: "participants-container-red"
33
+ }) : null, transI18n('fmt_waitingroom_sidebar_label_waiting', {
34
+ reason1: waitingRoomUserCount
35
+ })]
36
+ }),
37
+ key: _type.FcrRoomType.Waitingroom
38
+ }],
39
+ activeKey: activeTab,
40
+ onChange: function onChange(key) {
41
+ handleActiveTab(key);
42
+ }
43
+ });
44
+ }
45
+ return null;
46
+ }, [waitingRoomUserCount, isNewWaitingRoomUserEnter, transI18n, activeTab, handleActiveTab]);
47
+ return renderTabs();
48
+ });
49
+ var _default = exports["default"] = RenderTabs;
@@ -0,0 +1,5 @@
1
+ import { User } from 'agora-ui-foundation/lib/components/participants/attendee';
2
+ declare const RenderUser: ({ user }: {
3
+ user: User;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default RenderUser;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _attendee = require("../../attendee");
9
+ var _userAction = require("../../user-action");
10
+ var _mobxReact = require("mobx-react");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ var RenderUser = (0, _mobxReact.observer)(function (_ref) {
13
+ var user = _ref.user;
14
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_attendee.ParticipantAttendee, {
15
+ user: user,
16
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_userAction.UserActions, {
17
+ user: user
18
+ })
19
+ });
20
+ });
21
+ var _default = exports["default"] = RenderUser;
@@ -0,0 +1,96 @@
1
+ export interface ParticipantProps {
2
+ type: 'window' | 'modal';
3
+ userList: User[];
4
+ header?: React.ReactNode;
5
+ footer?: React.ReactNode;
6
+ userRenderer?: (user: User) => React.ReactNode;
7
+ toggleParticipantAction?: (action: ParticipantActionType, userId: string) => void;
8
+ toggleRoomControlAction?: (action: string, userId?: string) => void;
9
+ onSearch: (value: string) => void;
10
+ searchText?: string;
11
+ onInvite?: () => void;
12
+ hasPinnedStream: boolean;
13
+ hasInvite: boolean;
14
+ }
15
+ export interface User {
16
+ userId: string;
17
+ userName: string;
18
+ avatar?: string;
19
+ hasVideo: boolean;
20
+ hasAudio: boolean;
21
+ isHost: boolean;
22
+ isMe?: boolean;
23
+ isScreenSharing?: boolean;
24
+ audioDeviceType: 'none' | 'computer-mic' | 'phone-mic';
25
+ videoDeviceType: 'none' | 'computer-cam';
26
+ userType: 'normal' | 'phone' | 'meeting-system';
27
+ volume?: number;
28
+ userRole?: number;
29
+ isSpotlight?: boolean;
30
+ isBoardActive?: boolean;
31
+ allowedOperations?: string[];
32
+ isPin?: boolean;
33
+ }
34
+ export declare enum ParticipantActionType {
35
+ MUTE_AUDIO = "MUTE_AUDIO",
36
+ UNMUTE_AUDIO = "UNMUTE_AUDIO",
37
+ MUTE_VIDEO = "MUTE_VIDEO",
38
+ UNMUTE_VIDEO = "UNMUTE_VIDEO",
39
+ PRIVATE_CHAT = "PRIVATE_CHAT",
40
+ KICK_OUT = "KICK_OUT",
41
+ ADD_PIN = "ADD_PIN",
42
+ REMOVE_PIN = "REMOVE_PIN",
43
+ SET_AS_HOST = "SET_AS_HOST",
44
+ SET_AS_CO_HOST = "SET_AS_CO_HOST",
45
+ SET_AS_ATTENDEE = "SET_AS_ATTENDEE",
46
+ RENAME = "RENAME",
47
+ ALL_RECORDING_LOCAL_VIDEO = "ALL_RECORDING_LOCAL_VIDEO",
48
+ PUT_IN_WAITING_ROOM = "PUT_IN_WAITING_ROOM",
49
+ STOP_RAISE_HAND = "STOP_RAISE_HAND",
50
+ SET_MAIN_SPEAKER = "SET_MAIN_SPEAKER",
51
+ MERGE_VIDEO = "MERGE_VIDEO",
52
+ RENAME_IN_MEETING = "RENAME_IN_MEETING"
53
+ }
54
+ export declare const enum FcrUserRole {
55
+ HOST = 1,
56
+ COHOST = 2,
57
+ PARTICIPANT = 3,
58
+ AUDIENCE = 4,
59
+ OBSERVER = 5,
60
+ ROBOT = 6
61
+ }
62
+ export type FcrUserRoleValue = 1 | 2 | 3 | 4 | 5 | 6;
63
+ export interface ParticipantsMoreActionsProps {
64
+ user: Omit<User, 'videoDeviceType'>;
65
+ onParticipantsButtonClick: (action: ParticipantActionType, userId: string) => void;
66
+ hasPinnedStream: boolean;
67
+ hideActions: string[];
68
+ }
69
+ export interface IFcrParticipantItemProps {
70
+ user: User;
71
+ hasPinnedStream: boolean;
72
+ hideActions?: string[];
73
+ onParticipantsButtonClick?: (action: ParticipantActionType, userId: string) => void;
74
+ }
75
+ export interface MoreActionsPopoverPropsType {
76
+ isShowDropMenu: boolean;
77
+ setIsShowDropMenu: React.Dispatch<React.SetStateAction<boolean>>;
78
+ clickRef: (dom: HTMLElement | null) => void;
79
+ handleMoreActionsClick: (action: ParticipantActionType, userId: string) => void;
80
+ user: User;
81
+ waitingRoomParticipateActionsNeedHiden: string[];
82
+ mainRoomParticipateActionsNeedHiden: string[];
83
+ }
84
+ export interface ParticipantsHostFooterProps {
85
+ onRoomControlClick?: (action: string, userId?: string) => void;
86
+ moreDropMenu?: React.ReactNode;
87
+ model?: 'mute' | 'unmute';
88
+ hasRevokeHostPermission?: boolean;
89
+ }
90
+ export interface ParticipantsFooterParticipantProps {
91
+ type?: 'revoke' | 'become';
92
+ onRoomControlClick?: (action: string, userId?: string) => void;
93
+ }
94
+ export interface UserActionsPropsType {
95
+ user: User;
96
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ParticipantActionType = exports.FcrUserRole = void 0;
8
+ var ParticipantActionType = exports.ParticipantActionType = /*#__PURE__*/function (ParticipantActionType) {
9
+ ParticipantActionType["MUTE_AUDIO"] = "MUTE_AUDIO";
10
+ ParticipantActionType["UNMUTE_AUDIO"] = "UNMUTE_AUDIO";
11
+ ParticipantActionType["MUTE_VIDEO"] = "MUTE_VIDEO";
12
+ ParticipantActionType["UNMUTE_VIDEO"] = "UNMUTE_VIDEO";
13
+ ParticipantActionType["PRIVATE_CHAT"] = "PRIVATE_CHAT";
14
+ ParticipantActionType["KICK_OUT"] = "KICK_OUT";
15
+ ParticipantActionType["ADD_PIN"] = "ADD_PIN";
16
+ ParticipantActionType["REMOVE_PIN"] = "REMOVE_PIN";
17
+ ParticipantActionType["SET_AS_HOST"] = "SET_AS_HOST";
18
+ ParticipantActionType["SET_AS_CO_HOST"] = "SET_AS_CO_HOST";
19
+ ParticipantActionType["SET_AS_ATTENDEE"] = "SET_AS_ATTENDEE";
20
+ ParticipantActionType["RENAME"] = "RENAME";
21
+ ParticipantActionType["ALL_RECORDING_LOCAL_VIDEO"] = "ALL_RECORDING_LOCAL_VIDEO";
22
+ ParticipantActionType["PUT_IN_WAITING_ROOM"] = "PUT_IN_WAITING_ROOM";
23
+ ParticipantActionType["STOP_RAISE_HAND"] = "STOP_RAISE_HAND";
24
+ ParticipantActionType["SET_MAIN_SPEAKER"] = "SET_MAIN_SPEAKER";
25
+ ParticipantActionType["MERGE_VIDEO"] = "MERGE_VIDEO";
26
+ ParticipantActionType["RENAME_IN_MEETING"] = "RENAME_IN_MEETING";
27
+ return ParticipantActionType;
28
+ }({});
29
+ var FcrUserRole = exports.FcrUserRole = /*#__PURE__*/function (FcrUserRole) {
30
+ FcrUserRole[FcrUserRole["HOST"] = 1] = "HOST";
31
+ FcrUserRole[FcrUserRole["COHOST"] = 2] = "COHOST";
32
+ FcrUserRole[FcrUserRole["PARTICIPANT"] = 3] = "PARTICIPANT";
33
+ FcrUserRole[FcrUserRole["AUDIENCE"] = 4] = "AUDIENCE";
34
+ FcrUserRole[FcrUserRole["OBSERVER"] = 5] = "OBSERVER";
35
+ FcrUserRole[FcrUserRole["ROBOT"] = 6] = "ROBOT";
36
+ return FcrUserRole;
37
+ }({}); // 定义一个类型来表示该枚举的值类型
@@ -0,0 +1,7 @@
1
+ import { ParticipantActionType } from 'agora-ui-foundation/lib/components/participants/attendee';
2
+ export declare const AudioButton: (props: {
3
+ hasAudio: boolean;
4
+ userId: string;
5
+ onParticipantsButtonClick: (action: ParticipantActionType, userId: string) => void;
6
+ actionAudioTag: string;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.AudioButton = void 0;
8
+ var _action = require("agora-ui-foundation/lib/components/button/action");
9
+ var _attendee = require("agora-ui-foundation/lib/components/participants/attendee");
10
+ var _i18n = require("agora-ui-foundation/lib/i18n");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ // 处理音频按钮点击的组件
13
+ var AudioButton = exports.AudioButton = function AudioButton(props) {
14
+ var hasAudio = props.hasAudio,
15
+ userId = props.userId,
16
+ onParticipantsButtonClick = props.onParticipantsButtonClick,
17
+ actionAudioTag = props.actionAudioTag;
18
+ var t = (0, _i18n.useI18n)();
19
+ var handleAudioButtonClick = function handleAudioButtonClick() {
20
+ var action = hasAudio ? _attendee.ParticipantActionType.MUTE_AUDIO : _attendee.ParticipantActionType.UNMUTE_AUDIO;
21
+ onParticipantsButtonClick(action, userId);
22
+ };
23
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
24
+ size: "small",
25
+ onClick: handleAudioButtonClick,
26
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
27
+ className: hasAudio ? 'attendee__danger-operate' : 'attendee__normal-operate',
28
+ children: t(actionAudioTag)
29
+ })
30
+ });
31
+ };
@@ -0,0 +1,12 @@
1
+ import { ParticipantActionType, User } from 'agora-ui-foundation/lib/components/participants/attendee';
2
+ interface MoreActionsPopoverPropsType {
3
+ isShowDropMenu: boolean;
4
+ setIsShowDropMenu: React.Dispatch<React.SetStateAction<boolean>>;
5
+ clickRef: (dom: HTMLElement | null) => void;
6
+ handleMoreActionsClick: (action: ParticipantActionType, userId: string) => void;
7
+ user: User;
8
+ waitingRoomParticipateActionsNeedHiden: string[];
9
+ mainRoomParticipateActionsNeedHiden: string[];
10
+ }
11
+ export declare const MoreActionsPopover: (props: MoreActionsPopoverPropsType) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.MoreActionsPopover = void 0;
8
+ require("core-js/modules/web.timers.js");
9
+ var _action = require("agora-ui-foundation/lib/components/button/action");
10
+ var _type = require("agora-ui-foundation/lib/components/icon/type");
11
+ var _participantsMore = require("agora-ui-foundation/lib/components/participants/participants-more");
12
+ var _popover = require("agora-ui-foundation/lib/components/popover");
13
+ var _i18n = require("agora-ui-foundation/lib/i18n");
14
+ var _type2 = require("fcr-core/lib/room-control/type");
15
+ var _react = require("react");
16
+ var _store = require("../../../store");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ // 处理更多操作弹出框的组件
19
+ var MoreActionsPopover = exports.MoreActionsPopover = function MoreActionsPopover(props) {
20
+ var isShowDropMenu = props.isShowDropMenu,
21
+ setIsShowDropMenu = props.setIsShowDropMenu,
22
+ clickRef = props.clickRef,
23
+ handleMoreActionsClick = props.handleMoreActionsClick,
24
+ waitingRoomParticipateActionsNeedHiden = props.waitingRoomParticipateActionsNeedHiden,
25
+ mainRoomParticipateActionsNeedHiden = props.mainRoomParticipateActionsNeedHiden,
26
+ user = props.user;
27
+ var _useContext = (0, _react.useContext)(_store.StoreContext),
28
+ activeTab = _useContext.activeTab,
29
+ hasPinnedStream = _useContext.hasPinnedStream;
30
+ var t = (0, _i18n.useI18n)();
31
+ var timeoutId = (0, _react.useRef)();
32
+ (0, _react.useEffect)(function () {
33
+ return function () {
34
+ if (timeoutId.current) {
35
+ clearTimeout(timeoutId.current);
36
+ }
37
+ };
38
+ }, []);
39
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.FcrPopover, {
40
+ visible: isShowDropMenu,
41
+ overlayInnerStyle: {
42
+ border: 0,
43
+ boxShadow: '0px 0px 15px var(--fcr_web_light_dropup_m)',
44
+ borderRadius: 'var(--fcr_cornerradius_l)',
45
+ minWidth: '210px',
46
+ maxWidth: '300px',
47
+ width: 'fit-content'
48
+ },
49
+ overlayClassName: "attendee__more-actions",
50
+ mouseEnterDelay: 0,
51
+ content: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
52
+ ref: clickRef,
53
+ onMouseEnter: function onMouseEnter() {
54
+ if (timeoutId.current) {
55
+ clearTimeout(timeoutId.current);
56
+ }
57
+ },
58
+ onMouseLeave: function onMouseLeave() {
59
+ timeoutId.current = setTimeout(function () {
60
+ setIsShowDropMenu(false);
61
+ }, 200);
62
+ },
63
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_participantsMore.FcrParticipantsMoreActions, {
64
+ onParticipantsButtonClick: handleMoreActionsClick,
65
+ user: user,
66
+ hasPinnedStream: hasPinnedStream,
67
+ hideActions: activeTab === _type2.FcrRoomType.Mainroom ? mainRoomParticipateActionsNeedHiden : waitingRoomParticipateActionsNeedHiden
68
+ })
69
+ }),
70
+ placement: "bottomRight",
71
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
72
+ onClick: function onClick() {
73
+ if (!isShowDropMenu) {
74
+ setIsShowDropMenu(true);
75
+ }
76
+ },
77
+ size: "small",
78
+ iconType: _type.FcrIconType.FCR_DROPDOWN,
79
+ children: t('fmt_participants_member_button_more')
80
+ })
81
+ });
82
+ };
@@ -0,0 +1,4 @@
1
+ export declare const MoveToMainRoomButton: (props: {
2
+ userId: string;
3
+ moveToMainRoomByUserIds: (userId: string[]) => void;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.define-property.js");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.MoveToMainRoomButton = void 0;
8
+ var _action = require("agora-ui-foundation/lib/components/button/action");
9
+ var _i18n = require("agora-ui-foundation/lib/i18n");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ // 处理移入主房间按钮点击的组件
12
+ var MoveToMainRoomButton = exports.MoveToMainRoomButton = function MoveToMainRoomButton(props) {
13
+ var userId = props.userId,
14
+ moveToMainRoomByUserIds = props.moveToMainRoomByUserIds;
15
+ var t = (0, _i18n.useI18n)();
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
17
+ size: "small",
18
+ onClick: function onClick() {
19
+ return moveToMainRoomByUserIds([userId]);
20
+ },
21
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
22
+ className: 'attendee__normal-operate',
23
+ children: t('fmt_waitingroom_sidebar_button_admit')
24
+ })
25
+ });
26
+ };
@@ -18,6 +18,10 @@
18
18
  min-height: 550px;
19
19
  overflow: hidden;
20
20
  -webkit-app-region: no-drag;
21
+ background-color: #fff;
22
+ border-radius: var(--fcr_cornerradius_l);
23
+ display: flex;
24
+ flex-direction: column;
21
25
  }
22
26
 
23
27
  .share-selection-window__share-content {