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.
- package/lib/common/device-store.d.ts +23 -14
- package/lib/common/device-store.js +361 -252
- package/lib/common/device-stream-store.d.ts +8 -14
- package/lib/common/device-stream-store.js +254 -116
- package/lib/common/event-store.d.ts +35 -10
- package/lib/common/event-store.js +64 -13
- package/lib/common/security-store.d.ts +47 -39
- package/lib/common/security-store.js +335 -379
- package/lib/electron/app.js +1 -0
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +4 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +38 -21
- package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +7 -0
- package/lib/modules/action-bar/components/apps/useWidgetList.js +43 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +8 -1
- package/lib/modules/action-bar/components/leave/assign-host.js +1 -1
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +16 -1
- package/lib/modules/action-bar/smaller.js +5 -5
- package/lib/modules/chat/chat-bar/index.css +6 -0
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +51 -39
- package/lib/modules/chat/chat-select/index.css +27 -7
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +18 -4
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +196 -128
- package/lib/modules/chat/components/chat-select/select-input/index.d.ts +7 -0
- package/lib/modules/chat/components/chat-select/select-input/index.js +35 -0
- package/lib/modules/chat/components/chat-select/select-item/index.d.ts +12 -0
- package/lib/modules/chat/components/chat-select/select-item/index.js +153 -0
- package/lib/modules/chat/components/chat-tabs/index.d.ts +2 -0
- package/lib/modules/chat/components/chat-tabs/index.js +61 -0
- package/lib/modules/chat/components/message-list/chat-empty/index.d.ts +2 -0
- package/lib/modules/chat/components/message-list/chat-empty/index.js +26 -0
- package/lib/modules/chat/components/message-list/history-unread-message-button/index.d.ts +7 -0
- package/lib/modules/chat/components/message-list/history-unread-message-button/index.js +55 -0
- package/lib/modules/chat/components/message-list/message-item/index.d.ts +15 -0
- package/lib/modules/chat/components/message-list/message-item/index.js +279 -0
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.d.ts +9 -0
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.js +67 -0
- package/lib/modules/chat/message-list.js +68 -51
- package/lib/modules/components/dialog-container/component/body.js +1 -2
- package/lib/modules/components/dialog-container/index.d.ts +2 -2
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +6 -0
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +36 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +40 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +170 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +11 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +105 -0
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.d.ts +9 -0
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +42 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +11 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +159 -0
- package/lib/modules/components/member-window/components/member-actions/components/share-status.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +32 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +16 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +130 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +12 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +57 -0
- package/lib/modules/components/member-window/components/member-actions/index.d.ts +3 -0
- package/lib/modules/components/member-window/components/member-actions/index.js +122 -0
- package/lib/modules/components/member-window/components/member-actions/libs/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/libs/index.js +24 -0
- package/lib/modules/components/member-window/components/member-actions/provider.d.ts +21 -0
- package/lib/modules/components/member-window/components/member-actions/provider.js +77 -0
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +48 -0
- package/lib/modules/components/member-window/components/member-actions/store.js +306 -0
- package/lib/modules/components/member-window/components/member-board.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-board.js +63 -0
- package/lib/modules/components/member-window/components/mic-volume.d.ts +2 -0
- package/lib/modules/components/member-window/components/mic-volume.js +23 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +4 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +40 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +8 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +62 -0
- package/lib/modules/components/member-window/components/video-player/index.d.ts +9 -0
- package/lib/modules/components/member-window/components/video-player/index.js +38 -0
- package/lib/modules/components/member-window/types.d.ts +78 -0
- package/lib/modules/components/member-window/types.js +6 -0
- package/lib/modules/connection-gateway/components/tabs/index.js +2 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +7 -15
- package/lib/modules/control-bar/components/more-actions/index.js +5 -15
- package/lib/modules/dialog/components/system-preference/assets/bg1.png +0 -0
- package/lib/modules/dialog/components/system-preference/assets/bg2.png +0 -0
- package/lib/modules/dialog/components/system-preference/assets/fcr_png_host.png +0 -0
- package/lib/modules/dialog/components/widget/electron.d.ts +5 -0
- package/lib/modules/dialog/components/widget/electron.js +41 -0
- package/lib/modules/dialog/components/widget/index.d.ts +6 -0
- package/lib/modules/dialog/components/widget/index.js +41 -0
- package/lib/modules/dialog/type.d.ts +84 -0
- package/lib/modules/dialog/type.js +6 -0
- package/lib/modules/invite/components/pstn-invite.js +4 -13
- package/lib/modules/invite/pstn-invite.js +7 -9
- package/lib/modules/invite/store.d.ts +2 -0
- package/lib/modules/invite/store.js +6 -0
- package/lib/modules/invite/voip-invite.js +5 -6
- package/lib/modules/layout/member-window/index.css +116 -18
- package/lib/modules/layout/member-window/index.d.ts +10 -3
- package/lib/modules/layout/member-window/index.js +227 -115
- package/lib/modules/participant/attendee/index.css +0 -51
- package/lib/modules/participant/attendee/index.d.ts +8 -5
- package/lib/modules/participant/attendee/index.js +61 -15
- package/lib/modules/participant/components/attendee/components/interpreter-tag/index.d.ts +3 -0
- package/lib/modules/participant/components/attendee/components/interpreter-tag/index.js +48 -0
- package/lib/modules/participant/components/confirm-input/index.d.ts +6 -0
- package/lib/modules/participant/components/confirm-input/index.js +49 -0
- package/lib/modules/participant/components/drop-menu/util.d.ts +5 -0
- package/lib/modules/participant/components/drop-menu/util.js +28 -0
- package/lib/modules/participant/components/participants/components/footer/components/buttons.d.ts +6 -0
- package/lib/modules/participant/components/participants/components/footer/components/buttons.js +52 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +60 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +166 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.js +28 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +13 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +242 -0
- package/lib/modules/participant/components/participants/components/footer/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/index.js +47 -0
- package/lib/modules/participant/components/participants/components/merge/index.d.ts +11 -0
- package/lib/modules/participant/components/participants/components/merge/index.js +49 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +191 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.d.ts +4 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +204 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +49 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +219 -0
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +70 -0
- package/lib/modules/participant/components/participants/components/participants/index.css +104 -0
- package/lib/modules/participant/components/participants/components/participants/index.d.ts +3 -0
- package/lib/modules/participant/components/participants/components/participants/index.js +110 -0
- package/lib/modules/participant/components/participants/components/render-tab/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/render-tab/index.js +49 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.d.ts +3 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +48 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.d.ts +6 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +28 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.d.ts +7 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.js +39 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +69 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +135 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.d.ts +7 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.js +31 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +12 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +82 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.d.ts +4 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.js +26 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +75 -0
- package/lib/modules/participant/components/participants/components/render-user/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/render-user/index.js +21 -0
- package/lib/modules/participant/components/participants/render-tab/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/render-tab/index.js +49 -0
- package/lib/modules/participant/components/participants/render-user/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/render-user/index.js +21 -0
- package/lib/modules/participant/components/participants/types.d.ts +96 -0
- package/lib/modules/participant/components/participants/types.js +37 -0
- package/lib/modules/participant/components/user-action/audio-button/index.d.ts +7 -0
- package/lib/modules/participant/components/user-action/audio-button/index.js +31 -0
- package/lib/modules/participant/components/user-action/move-actions-popover/index.d.ts +12 -0
- package/lib/modules/participant/components/user-action/move-actions-popover/index.js +82 -0
- package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.d.ts +4 -0
- package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.js +26 -0
- package/lib/modules/share-screen/selection/index.css +4 -0
- package/lib/modules/share-screen/selection/index.js +126 -129
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/state-bar/meeting-details.js +29 -34
- package/lib/modules/video-window/components/deviceState/index.d.ts +7 -0
- package/lib/modules/video-window/components/deviceState/index.js +75 -0
- package/lib/modules/video-window/components/members/index.css +51 -0
- package/lib/modules/video-window/components/members/index.d.ts +2 -0
- package/lib/modules/video-window/components/members/index.js +130 -0
- package/lib/modules/video-window/components/speaking/index.css +86 -0
- package/lib/modules/video-window/components/speaking/index.d.ts +3 -0
- package/lib/modules/video-window/components/speaking/index.js +48 -0
- package/lib/modules/video-window/components/topControl/index.css +35 -0
- package/lib/modules/video-window/components/topControl/index.d.ts +3 -0
- package/lib/modules/video-window/components/topControl/index.js +79 -0
- package/lib/modules/widget/index.css +17 -0
- package/lib/modules/widget/index.d.ts +10 -0
- package/lib/modules/widget/index.js +114 -0
- package/lib/modules/widget/sdk.d.ts +30 -0
- package/lib/modules/widget/sdk.js +221 -0
- package/lib/modules/widget/store.d.ts +14 -0
- package/lib/modules/widget/store.js +28 -0
- package/lib/modules/widget/type.d.ts +155 -0
- package/lib/modules/widget/type.js +6 -0
- package/lib/modules/widget/view.d.ts +2 -0
- package/lib/modules/widget/view.js +47 -0
- package/lib/modules/widget/web-widget.d.ts +29 -0
- package/lib/modules/widget/web-widget.js +234 -0
- package/lib/providers/ability-provider.d.ts +24 -0
- package/lib/providers/ability-provider.js +36 -0
- package/lib/providers/widget-provider.d.ts +44 -0
- package/lib/providers/widget-provider.js +167 -0
- package/lib/schema.d.ts +114 -0
- package/lib/schema.js +77 -0
- package/lib/shared-data-source/member-data.d.ts +126 -0
- package/lib/shared-data-source/member-data.js +465 -0
- package/lib/translations/enUS.d.ts +5 -0
- package/lib/translations/enUS.js +9 -3
- package/lib/translations/zhCN.d.ts +5 -0
- package/lib/translations/zhCN.js +13 -7
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/logger.d.ts +8 -0
- package/lib/utilities/logger.js +42 -0
- package/lib/utilities/meeting-detail.d.ts +2 -0
- package/lib/utilities/meeting-detail.js +56 -0
- package/lib/utilities/validate-params.d.ts +2 -0
- package/lib/utilities/validate-params.js +16 -0
- package/lib/widget-sdk.d.ts +2 -0
- package/lib/widget-sdk.js +13 -0
- package/package.json +5 -5
|
@@ -18,7 +18,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: true
|
|
20
20
|
});
|
|
21
|
-
exports.ParticipantAttendee = exports.OperateWaitingRoomMemberDialog = void 0;
|
|
21
|
+
exports.WaitingRoomDialogKeyMap = exports.ParticipantAttendee = exports.OperateWaitingRoomMemberDialog = void 0;
|
|
22
22
|
require("core-js/modules/es.array.find.js");
|
|
23
23
|
require("core-js/modules/es.object.to-string.js");
|
|
24
24
|
require("core-js/modules/esnext.async-iterator.find.js");
|
|
@@ -46,26 +46,47 @@ require("./index.css");
|
|
|
46
46
|
var _helper = require("agora-ui-foundation/lib/components/avatar/helper");
|
|
47
47
|
var _fcrCore = require("fcr-core");
|
|
48
48
|
var _participantsMore = require("agora-ui-foundation/lib/components/participants/participants-more");
|
|
49
|
+
var _constant = require("../../../utilities/constant");
|
|
49
50
|
var _checkbox = require("agora-ui-foundation/lib/components/checkbox");
|
|
51
|
+
var _button = require("agora-ui-foundation/lib/components/button");
|
|
50
52
|
var _useLanguageConfig = require("../../interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig");
|
|
53
|
+
var _type3 = require("fcr-core/lib/room-control/user-control/type");
|
|
51
54
|
var _useClickAnywhere = require("agora-ui-foundation/lib/hooks/use-click-anywhere");
|
|
52
55
|
var _useElectron = require("../../dialog/hooks/useElectron");
|
|
53
|
-
var _type3 = require("fcr-core/lib/room-control/type");
|
|
54
56
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
55
57
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
56
58
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
59
|
+
var WaitingRoomDialogKeyMap = exports.WaitingRoomDialogKeyMap = {
|
|
60
|
+
remove: _constant.DialogKey.WAITING_ROOM_SINGLE_REMOVE,
|
|
61
|
+
removeAll: _constant.DialogKey.WAITING_ROOM_ALL_REMOVE,
|
|
62
|
+
admitAll: _constant.DialogKey.WAITING_ROOM_ALL_ADMIT
|
|
63
|
+
};
|
|
57
64
|
var OperateWaitingRoomMemberDialog = exports.OperateWaitingRoomMemberDialog = function OperateWaitingRoomMemberDialog(_ref) {
|
|
58
65
|
var type = _ref.type,
|
|
59
66
|
tooltip = _ref.tooltip,
|
|
60
|
-
|
|
67
|
+
title = _ref.title,
|
|
68
|
+
userId = _ref.userId;
|
|
61
69
|
var t = (0, _i18n.useI18n)();
|
|
62
70
|
var _useState = (0, _react.useState)(false),
|
|
63
71
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
64
72
|
isChecked = _useState2[0],
|
|
65
73
|
setIsChecked = _useState2[1];
|
|
74
|
+
var _useContext = (0, _react.useContext)(_store.StoreContext),
|
|
75
|
+
removeWaitingRoomUser = _useContext.removeWaitingRoomUser,
|
|
76
|
+
moveToMainRoomAllMember = _useContext.moveToMainRoomAllMember,
|
|
77
|
+
kickOutWaitingRoomAllMember = _useContext.kickOutWaitingRoomAllMember,
|
|
78
|
+
closeRemoveAdmitWaitingRoomDialog = _useContext.closeRemoveAdmitWaitingRoomDialog;
|
|
79
|
+
var buttonTextMap = {
|
|
80
|
+
removeAll: t('fmt_waitingroom_sidebar_button_removeall'),
|
|
81
|
+
admitAll: t('fmt_waitingroom_sidebar_button_admitall'),
|
|
82
|
+
remove: t('fmt_waitingroom_sidebar_popup_button_remove')
|
|
83
|
+
};
|
|
66
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
67
85
|
className: "operate-waiting-room-dialog-content",
|
|
68
86
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
|
+
className: "operate-waiting-room-dialog-title",
|
|
88
|
+
children: title
|
|
89
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
90
|
className: "operate-waiting-room-dialog-tooltip",
|
|
70
91
|
children: tooltip
|
|
71
92
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -73,10 +94,7 @@ var OperateWaitingRoomMemberDialog = exports.OperateWaitingRoomMemberDialog = fu
|
|
|
73
94
|
children: type === 'admitAll' ? null : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
74
95
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.FcrCheckbox, {
|
|
75
96
|
checked: isChecked,
|
|
76
|
-
onChange:
|
|
77
|
-
setIsChecked(value);
|
|
78
|
-
onChecked && onChecked(value);
|
|
79
|
-
},
|
|
97
|
+
onChange: setIsChecked,
|
|
80
98
|
size: "small",
|
|
81
99
|
styleType: "white"
|
|
82
100
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -86,6 +104,34 @@ var OperateWaitingRoomMemberDialog = exports.OperateWaitingRoomMemberDialog = fu
|
|
|
86
104
|
children: t('fmt_waitingroom_sidebar_popup_option_notagain')
|
|
87
105
|
})]
|
|
88
106
|
})
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
108
|
+
className: "operate-waiting-room-dialog-btns",
|
|
109
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
|
|
110
|
+
size: "S",
|
|
111
|
+
shape: "rounded",
|
|
112
|
+
styleType: "white",
|
|
113
|
+
onClick: function onClick() {
|
|
114
|
+
closeRemoveAdmitWaitingRoomDialog(WaitingRoomDialogKeyMap[type]);
|
|
115
|
+
},
|
|
116
|
+
children: t('fmt_waitingroom_sidebar_popup_button_cancel')
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
|
|
118
|
+
size: "S",
|
|
119
|
+
shape: "rounded",
|
|
120
|
+
styleType: type === 'admitAll' ? 'normal' : 'danger',
|
|
121
|
+
onClick: function onClick() {
|
|
122
|
+
if (type === 'remove') {
|
|
123
|
+
removeWaitingRoomUser(userId, isChecked ? _type3.FcrUserKickedOutType.Forever : _type3.FcrUserKickedOutType.Once);
|
|
124
|
+
}
|
|
125
|
+
if (type === 'removeAll') {
|
|
126
|
+
kickOutWaitingRoomAllMember(isChecked ? _type3.FcrUserKickedOutType.Forever : _type3.FcrUserKickedOutType.Once);
|
|
127
|
+
}
|
|
128
|
+
if (type === 'admitAll') {
|
|
129
|
+
moveToMainRoomAllMember();
|
|
130
|
+
}
|
|
131
|
+
closeRemoveAdmitWaitingRoomDialog(WaitingRoomDialogKeyMap[type]);
|
|
132
|
+
},
|
|
133
|
+
children: buttonTextMap[type]
|
|
134
|
+
})]
|
|
89
135
|
})]
|
|
90
136
|
});
|
|
91
137
|
};
|
|
@@ -228,14 +274,14 @@ var ParticipantAttendee = exports.ParticipantAttendee = (0, _mobxReact.observer)
|
|
|
228
274
|
var timeoutId = (0, _react.useRef)();
|
|
229
275
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
230
276
|
className: "attendee__user-action attendee__user-action-host ".concat(isShowDropMenu ? 'attendee__user-action-hovered' : ''),
|
|
231
|
-
children: [isShowActionAudio && activeTab ===
|
|
277
|
+
children: [isShowActionAudio && activeTab === _constant.RoomType.MAIN_ROOM && /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
|
|
232
278
|
size: "small",
|
|
233
279
|
onClick: handleAudioButtonClick,
|
|
234
280
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
235
281
|
className: hasAudio ? 'attendee__danger-operate' : 'attendee__normal-operate',
|
|
236
282
|
children: t(actionAudioTag)
|
|
237
283
|
})
|
|
238
|
-
}), activeTab ===
|
|
284
|
+
}), activeTab === _constant.RoomType.WAITING_ROOM && /*#__PURE__*/(0, _jsxRuntime.jsx)(_action.FcrActionButton, {
|
|
239
285
|
size: "small",
|
|
240
286
|
onClick: function onClick() {
|
|
241
287
|
return moveToMainRoomByUserIds([userId]);
|
|
@@ -280,7 +326,7 @@ var ParticipantAttendee = exports.ParticipantAttendee = (0, _mobxReact.observer)
|
|
|
280
326
|
hasAudio: hasAudio,
|
|
281
327
|
userName: userName,
|
|
282
328
|
audioDeviceType: audioDeviceType,
|
|
283
|
-
hideActions: activeTab ===
|
|
329
|
+
hideActions: activeTab === _constant.RoomType.MAIN_ROOM ? mainRoomParticipateActionsNeedHiden : waitingRoomParticipateActionsNeedHiden
|
|
284
330
|
}))
|
|
285
331
|
}),
|
|
286
332
|
placement: "bottomRight",
|
|
@@ -370,12 +416,12 @@ var ParticipantAttendee = exports.ParticipantAttendee = (0, _mobxReact.observer)
|
|
|
370
416
|
colors: {
|
|
371
417
|
iconPrimary: 'var(--fcr_ui_scene_ramp_green6)'
|
|
372
418
|
}
|
|
373
|
-
}), audioDeviceType !== 'none' && activeTab ===
|
|
419
|
+
}), audioDeviceType !== 'none' && activeTab === _constant.RoomType.MAIN_ROOM && /*#__PURE__*/(0, _jsxRuntime.jsx)(MicrophoneIndicator, {
|
|
374
420
|
audioDeviceType: audioDeviceType,
|
|
375
421
|
hasAudio: hasAudio,
|
|
376
422
|
isLocal: !!isMe,
|
|
377
423
|
userId: userId
|
|
378
|
-
}), videoDeviceType !== 'none' && activeTab ===
|
|
424
|
+
}), videoDeviceType !== 'none' && activeTab === _constant.RoomType.MAIN_ROOM && /*#__PURE__*/(0, _jsxRuntime.jsx)(_cameraState.CameraState, {
|
|
379
425
|
isCameraMuted: !hasVideo,
|
|
380
426
|
size: 28,
|
|
381
427
|
renderIconType: 'surface'
|
|
@@ -388,9 +434,9 @@ var MicrophoneIndicator = (0, _mobxReact.observer)(function (_ref2) {
|
|
|
388
434
|
hasAudio = _ref2.hasAudio,
|
|
389
435
|
isLocal = _ref2.isLocal,
|
|
390
436
|
userId = _ref2.userId;
|
|
391
|
-
var
|
|
392
|
-
audioVolumeMap =
|
|
393
|
-
localMicVolume =
|
|
437
|
+
var _useContext2 = (0, _react.useContext)(_store.StoreContext),
|
|
438
|
+
audioVolumeMap = _useContext2.audioVolumeMap,
|
|
439
|
+
localMicVolume = _useContext2.localMicVolume;
|
|
394
440
|
var volume = isLocal ? localMicVolume : audioVolumeMap.get(userId);
|
|
395
441
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_microphoneState.MicrophoneState, {
|
|
396
442
|
isMicrophoneMuted: !hasAudio,
|
|
@@ -0,0 +1,48 @@
|
|
|
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.ParticipantAttendeeinterpreterTag = void 0;
|
|
8
|
+
require("core-js/modules/es.array.find.js");
|
|
9
|
+
require("core-js/modules/es.object.to-string.js");
|
|
10
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
11
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
12
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
13
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
14
|
+
var _mobxReact = require("mobx-react");
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
var _useLanguageConfig = require("../../../../../interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig");
|
|
17
|
+
var _store = require("../../../../store");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
var ParticipantAttendeeinterpreterTag = exports.ParticipantAttendeeinterpreterTag = (0, _mobxReact.observer)(function (_ref) {
|
|
20
|
+
var _interpreterInputLang;
|
|
21
|
+
var userId = _ref.userId;
|
|
22
|
+
var _useContext = (0, _react.useContext)(_store.StoreContext),
|
|
23
|
+
interpreterUserList = _useContext.interpreterUserList,
|
|
24
|
+
isInterpreterOpened = _useContext.isInterpreterEnabled,
|
|
25
|
+
interpreterInputLanguageList = _useContext.interpreterInputLanguageList;
|
|
26
|
+
var userInterpreterInputLanguage = (_interpreterInputLang = interpreterInputLanguageList.find(function (inputLanguageByUserId) {
|
|
27
|
+
return inputLanguageByUserId.userId === userId;
|
|
28
|
+
})) === null || _interpreterInputLang === void 0 ? void 0 : _interpreterInputLang.language;
|
|
29
|
+
var t = (0, _i18n.useI18n)();
|
|
30
|
+
var isUserIdInterpreter = (0, _react.useMemo)(function () {
|
|
31
|
+
return interpreterUserList === null || interpreterUserList === void 0 ? void 0 : interpreterUserList.find(function (ele) {
|
|
32
|
+
return ele.userId === userId;
|
|
33
|
+
});
|
|
34
|
+
}, [interpreterUserList]);
|
|
35
|
+
var getLanguageConfig = (0, _useLanguageConfig.useLanguageConfig)();
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
37
|
+
children: isInterpreterOpened && isUserIdInterpreter && userInterpreterInputLanguage && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
38
|
+
className: "attendee__host-badge attendee__interpreter-tag-bg",
|
|
39
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
|
+
className: "attendee__interpreter-tag-user",
|
|
41
|
+
children: t('fmt_ai_transcriptions_setting_label_translator')
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
43
|
+
className: "attendee__interpreter-tag-language",
|
|
44
|
+
children: getLanguageConfig(userInterpreterInputLanguage).abbr
|
|
45
|
+
})]
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
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["default"] = void 0;
|
|
9
|
+
require("core-js/modules/es.string.trim.js");
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
11
|
+
var _input = require("agora-ui-foundation/lib/components/input");
|
|
12
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
13
|
+
var _react = require("react");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
function ConfirmInput(props) {
|
|
16
|
+
var onChange = props.onChange,
|
|
17
|
+
placeholder = props.placeholder,
|
|
18
|
+
_props$type = props.type,
|
|
19
|
+
type = _props$type === void 0 ? 'text' : _props$type;
|
|
20
|
+
var _useState = (0, _react.useState)(''),
|
|
21
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
22
|
+
name = _useState2[0],
|
|
23
|
+
setName = _useState2[1];
|
|
24
|
+
var t = (0, _i18n.useI18n)();
|
|
25
|
+
(0, _react.useEffect)(function () {
|
|
26
|
+
onChange(name);
|
|
27
|
+
}, [name]);
|
|
28
|
+
function handleNameChange(name) {
|
|
29
|
+
setName(name.trim());
|
|
30
|
+
}
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: "participants-container-rename",
|
|
33
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.FcrInput, {
|
|
34
|
+
type: type,
|
|
35
|
+
autoFocus: true,
|
|
36
|
+
style: {
|
|
37
|
+
flex: 1
|
|
38
|
+
},
|
|
39
|
+
value: name,
|
|
40
|
+
onChange: handleNameChange,
|
|
41
|
+
size: "large",
|
|
42
|
+
allowClear: true,
|
|
43
|
+
shape: "rounded",
|
|
44
|
+
maxLength: 18,
|
|
45
|
+
placeholder: placeholder || t('fmt_additional_popup_label_enter_nickname')
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
var _default = exports["default"] = ConfirmInput;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FcrDropMenuOption } from 'agora-ui-foundation/lib/components/drop-menu';
|
|
2
|
+
export declare const CHECKBOX_STYLE_TYPE = "white";
|
|
3
|
+
export declare const UNDERLINE_CLASS = "room-control-drop-with-under-line";
|
|
4
|
+
export declare const CHECKBOX_WRAPPER_CLASS = "security-drop-menu-checkbox";
|
|
5
|
+
export declare const createCheckboxMenuItem: (key: string, label: string, checked: boolean | undefined, type?: "primary" | "danger" | "title" | "disabled" | "group", onButtonClick?: () => void, classNames?: string) => FcrDropMenuOption;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.createCheckboxMenuItem = exports.UNDERLINE_CLASS = exports.CHECKBOX_WRAPPER_CLASS = exports.CHECKBOX_STYLE_TYPE = void 0;
|
|
8
|
+
var _checkbox = require("agora-ui-foundation/lib/components/checkbox");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
var CHECKBOX_STYLE_TYPE = exports.CHECKBOX_STYLE_TYPE = 'white';
|
|
11
|
+
var UNDERLINE_CLASS = exports.UNDERLINE_CLASS = 'room-control-drop-with-under-line';
|
|
12
|
+
var CHECKBOX_WRAPPER_CLASS = exports.CHECKBOX_WRAPPER_CLASS = 'security-drop-menu-checkbox';
|
|
13
|
+
|
|
14
|
+
// 封装创建复选框菜单项的函数
|
|
15
|
+
var createCheckboxMenuItem = exports.createCheckboxMenuItem = function createCheckboxMenuItem(key, label, checked, type, onButtonClick) {
|
|
16
|
+
var classNames = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
|
|
17
|
+
return {
|
|
18
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.FcrCheckbox, {
|
|
19
|
+
checked: checked,
|
|
20
|
+
label: label,
|
|
21
|
+
styleType: CHECKBOX_STYLE_TYPE
|
|
22
|
+
}),
|
|
23
|
+
key: key,
|
|
24
|
+
type: type,
|
|
25
|
+
classNames: classNames,
|
|
26
|
+
onButtonClick: onButtonClick
|
|
27
|
+
};
|
|
28
|
+
};
|
package/lib/modules/participant/components/participants/components/footer/components/buttons.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OperateWaitingRoomMemberDialogProps } from '../../../../../type';
|
|
2
|
+
type ParticipantWaitingRoomFooterBtnListProps = {
|
|
3
|
+
openRemoveAdmitWaitingRoomDialog: (params: OperateWaitingRoomMemberDialogProps) => void;
|
|
4
|
+
};
|
|
5
|
+
declare const ParticipantWaitingRoomFooterBtnList: ({ openRemoveAdmitWaitingRoomDialog, }: ParticipantWaitingRoomFooterBtnListProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default ParticipantWaitingRoomFooterBtnList;
|
package/lib/modules/participant/components/participants/components/footer/components/buttons.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
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 _i18n = require("agora-ui-foundation/lib/i18n");
|
|
9
|
+
var _tooltip = require("agora-ui-foundation/lib/components/tooltip");
|
|
10
|
+
var _button = require("agora-ui-foundation/lib/components/button");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var ParticipantWaitingRoomFooterBtnList = function ParticipantWaitingRoomFooterBtnList(_ref) {
|
|
13
|
+
var openRemoveAdmitWaitingRoomDialog = _ref.openRemoveAdmitWaitingRoomDialog;
|
|
14
|
+
var t = (0, _i18n.useI18n)();
|
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
16
|
+
className: "fcr-participant__footer fcr-participant__footer_waiting_room",
|
|
17
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
|
|
18
|
+
content: t('fmt_waitingroom_sidebar_button_removeall'),
|
|
19
|
+
mouseEnterDelay: 0,
|
|
20
|
+
trigger: "hover",
|
|
21
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
|
|
22
|
+
type: "secondary-bordered",
|
|
23
|
+
size: "XS",
|
|
24
|
+
onClick: function onClick() {
|
|
25
|
+
openRemoveAdmitWaitingRoomDialog({
|
|
26
|
+
title: t('fmt_waitingroom_sidebar_popup_removeall'),
|
|
27
|
+
type: 'removeAll',
|
|
28
|
+
tooltip: t('fmt_waitingroom_mobile_memberlist_popup_label_sure_to_remove_all')
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
children: t('fmt_waitingroom_sidebar_button_removeall')
|
|
32
|
+
})
|
|
33
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
|
|
34
|
+
content: t('fmt_waitingroom_sidebar_button_admitall'),
|
|
35
|
+
mouseEnterDelay: 0,
|
|
36
|
+
trigger: "hover",
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.FcrButton, {
|
|
38
|
+
type: "secondary-bordered",
|
|
39
|
+
size: "XS",
|
|
40
|
+
onClick: function onClick() {
|
|
41
|
+
openRemoveAdmitWaitingRoomDialog({
|
|
42
|
+
title: t('fmt_waitingroom_mobile_memberlist_popup_label_admit_all'),
|
|
43
|
+
type: 'admitAll',
|
|
44
|
+
tooltip: t('fmt_waitingroom_mobile_memberlist_popup_label_sure_to_admit_all')
|
|
45
|
+
});
|
|
46
|
+
},
|
|
47
|
+
children: t('fmt_waitingroom_sidebar_button_admitall')
|
|
48
|
+
})
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
var _default = exports["default"] = ParticipantWaitingRoomFooterBtnList;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.room-control-drop-with-under-line {
|
|
2
|
+
position: relative;
|
|
3
|
+
/* margin: 8px 0; */
|
|
4
|
+
}
|
|
5
|
+
.room-control-options-box {
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
}
|
|
9
|
+
.room-control-options-box .fcr-checkbox {
|
|
10
|
+
width: fit-content;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.room-control-options-watermark-btns {
|
|
14
|
+
min-width: 104px;
|
|
15
|
+
height: 24px;
|
|
16
|
+
display: flex;
|
|
17
|
+
background-color: var(--fcr_mobile_ui_scene_fill1);
|
|
18
|
+
align-items: center;
|
|
19
|
+
padding: 2px;
|
|
20
|
+
margin-left: 80px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.room-control-options-watermark-btn {
|
|
24
|
+
min-width: 50px;
|
|
25
|
+
height: 20px;
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
color: var(--fcr_ui_scene_icontext1);
|
|
30
|
+
font-size: 12px;
|
|
31
|
+
background-color: transparent;
|
|
32
|
+
padding: 0px 4px;
|
|
33
|
+
width: auto !important;
|
|
34
|
+
border-radius: var(--fcr_cornerradius_xxs);
|
|
35
|
+
}
|
|
36
|
+
.room-control-options-watermark-btn--active {
|
|
37
|
+
background-color: #ffffff;
|
|
38
|
+
color: var(--fcr_ui_scene_ramp_brand6);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.room-control-options-watermark-title-box {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
font-size: 13px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.room-control-drop-with-under-line::after {
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
left: -10px;
|
|
51
|
+
right: -10px;
|
|
52
|
+
bottom: -12px;
|
|
53
|
+
border-top: 1px solid var(--fcr_ui_scene_line1);
|
|
54
|
+
margin: 8px 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.room-control-drop-disable {
|
|
58
|
+
opacity: 0.5;
|
|
59
|
+
cursor: not-allowed;
|
|
60
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.array.for-each.js");
|
|
5
|
+
require("core-js/modules/es.array.push.js");
|
|
6
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
7
|
+
require("core-js/modules/es.object.define-property.js");
|
|
8
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
9
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
10
|
+
require("core-js/modules/es.object.keys.js");
|
|
11
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
12
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
13
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
14
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
18
|
+
exports.RoomControlDropMenu = void 0;
|
|
19
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
20
|
+
require("core-js/modules/es.array.filter.js");
|
|
21
|
+
require("core-js/modules/es.array.map.js");
|
|
22
|
+
require("core-js/modules/es.array.unshift.js");
|
|
23
|
+
require("core-js/modules/es.object.to-string.js");
|
|
24
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
25
|
+
require("core-js/modules/esnext.async-iterator.map.js");
|
|
26
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
27
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
28
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
29
|
+
var _dropMenu = require("agora-ui-foundation/lib/components/drop-menu");
|
|
30
|
+
var _mobxReact = require("mobx-react");
|
|
31
|
+
var _react = require("react");
|
|
32
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
33
|
+
require("./index.css");
|
|
34
|
+
var _util = require("./util");
|
|
35
|
+
var _icon = require("agora-ui-foundation/lib/components/icon");
|
|
36
|
+
var _type = require("agora-ui-foundation/lib/components/icon/type");
|
|
37
|
+
var _store = require("../../../../../../store");
|
|
38
|
+
var _constant = require("../../../../../../../../utilities/constant");
|
|
39
|
+
var _fcrCore = require("fcr-core");
|
|
40
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
41
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
42
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
43
|
+
var RoomControlDropMenu = exports.RoomControlDropMenu = (0, _mobxReact.observer)(function () {
|
|
44
|
+
var _useContext = (0, _react.useContext)(_store.StoreContext),
|
|
45
|
+
allowUnmuteSelfAudio = _useContext.allowUnmuteSelfAudio,
|
|
46
|
+
allowJoinWithMuteAudio = _useContext.allowJoinWithMuteAudio,
|
|
47
|
+
isLockRoomEnabled = _useContext.isLockRoomEnabled,
|
|
48
|
+
isWaitingRoomEnabled = _useContext.isWaitingRoomEnabled,
|
|
49
|
+
allowChangeSelfName = _useContext.allowChangeSelfName,
|
|
50
|
+
allowUnmuteSelfVideo = _useContext.allowUnmuteSelfVideo,
|
|
51
|
+
handlerRoomControlAction = _useContext.handlerRoomControlAction,
|
|
52
|
+
hasRevokeHostPermission = _useContext.hasRevokeHostPermission,
|
|
53
|
+
localUserRole = _useContext.localUserRole,
|
|
54
|
+
showBecomeHostButton = _useContext.showBecomeHostButton,
|
|
55
|
+
isHostKeyEnabled = _useContext.isHostKeyEnabled;
|
|
56
|
+
var t = (0, _i18n.useI18n)();
|
|
57
|
+
|
|
58
|
+
// 定义所有操作项
|
|
59
|
+
var allActions = [{
|
|
60
|
+
type: 'title',
|
|
61
|
+
title: t('fmt_internalsetting_other_join'),
|
|
62
|
+
key: ''
|
|
63
|
+
},
|
|
64
|
+
// createCheckboxMenuItem(
|
|
65
|
+
// 'mute_all',
|
|
66
|
+
// t('fmt_security_buttons_allhandsdown'),
|
|
67
|
+
// false,
|
|
68
|
+
// 'disabled',
|
|
69
|
+
// () => {},
|
|
70
|
+
// UNDERLINE_CLASS
|
|
71
|
+
// ),
|
|
72
|
+
(0, _util.createCheckboxMenuItem)('join_room_with_mute', t('fmt_security_options_silence'), allowJoinWithMuteAudio, 'primary', function () {
|
|
73
|
+
return handlerRoomControlAction(_constant.FcrUIRoomControlType.JOIN_WITH_MUTE_AUDIO, !allowJoinWithMuteAudio);
|
|
74
|
+
}, ''),
|
|
75
|
+
// createCheckboxMenuItem(
|
|
76
|
+
// 'play_join_leave_sound',
|
|
77
|
+
// t('fmt_security_options_playnotification'),
|
|
78
|
+
// false,
|
|
79
|
+
// 'disabled',
|
|
80
|
+
// () => handlerRoomControlAction(FcrUIRoomControlType.PLAY_JOIN_LEAVE_SOUND),
|
|
81
|
+
// ''
|
|
82
|
+
// ),
|
|
83
|
+
(0, _util.createCheckboxMenuItem)('lock_room', t('fmt_screenshare_controlbar_security_list_lock'), isLockRoomEnabled, 'primary', function () {
|
|
84
|
+
return handlerRoomControlAction(_constant.FcrUIRoomControlType.LOCK_ROOM, !isLockRoomEnabled);
|
|
85
|
+
}, ''),
|
|
86
|
+
// createCheckboxMenuItem(
|
|
87
|
+
// 'enable_waiting_room',
|
|
88
|
+
// t('fmt_screenshare_options_allow'),
|
|
89
|
+
// isWaitingRoomEnabled,
|
|
90
|
+
// 'disabled',
|
|
91
|
+
// () =>
|
|
92
|
+
// handlerRoomControlAction(FcrUIRoomControlType.ENABLE_WAITING_ROOM, !isWaitingRoomEnabled),
|
|
93
|
+
// UNDERLINE_CLASS
|
|
94
|
+
// ),
|
|
95
|
+
{
|
|
96
|
+
type: 'line',
|
|
97
|
+
title: '',
|
|
98
|
+
key: ''
|
|
99
|
+
}, {
|
|
100
|
+
title: t('fmt_screenshare_options_allow'),
|
|
101
|
+
key: 'allow_attendee_title',
|
|
102
|
+
type: 'title'
|
|
103
|
+
}, (0, _util.createCheckboxMenuItem)('unmute_yourself', t('fmt_screenshare_controlbar_security_list_participant_unmute'), allowUnmuteSelfAudio, 'primary', function () {
|
|
104
|
+
return handlerRoomControlAction(_constant.FcrUIRoomControlType.ALLOW_ATTENDEE_TO_UNMUTE, !allowUnmuteSelfAudio);
|
|
105
|
+
}, ''), (0, _util.createCheckboxMenuItem)('start_video', t('fmt_security_options_openvideo'), allowUnmuteSelfVideo, 'primary', function () {
|
|
106
|
+
return handlerRoomControlAction(_constant.FcrUIRoomControlType.ALLOW_ATTENDEE_TO_OPEN_CAMERA, !allowUnmuteSelfVideo);
|
|
107
|
+
}, ''), (0, _util.createCheckboxMenuItem)('change_name', t('fmt_additional_label_change_name_self'), allowChangeSelfName, 'primary', function () {
|
|
108
|
+
return handlerRoomControlAction(_constant.FcrUIRoomControlType.RENAME, !allowChangeSelfName);
|
|
109
|
+
}, '')
|
|
110
|
+
// 移除参与者项暂时注释
|
|
111
|
+
// createCheckboxMenuItem(
|
|
112
|
+
// 'remove_participants',
|
|
113
|
+
// 'fmt_security_options_removemultiple',
|
|
114
|
+
// false,
|
|
115
|
+
// 'danger',
|
|
116
|
+
// () => {},
|
|
117
|
+
// 'room-control-drop-disable'
|
|
118
|
+
// )
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
// 如果有撤销主持人权限,添加撤销主持人菜单项
|
|
122
|
+
if (hasRevokeHostPermission) {
|
|
123
|
+
allActions.unshift((0, _util.createCheckboxMenuItem)('revoke_host', t('fmt_security_options_restract'), false, 'primary', function () {
|
|
124
|
+
return handlerRoomControlAction(_constant.FcrUIRoomControlType.REVOKE_HOST);
|
|
125
|
+
}, _util.UNDERLINE_CLASS));
|
|
126
|
+
}
|
|
127
|
+
if (localUserRole === _fcrCore.FcrUserRole.COHOST && showBecomeHostButton && isHostKeyEnabled) {
|
|
128
|
+
allActions.unshift({
|
|
129
|
+
type: 'primary',
|
|
130
|
+
title: t('fmt_hostkey_participant_button_claim_host'),
|
|
131
|
+
key: 'become_host',
|
|
132
|
+
onButtonClick: function onButtonClick() {
|
|
133
|
+
handlerRoomControlAction(_constant.FcrUIRoomControlType.ACTION_REVOKE_HOST_BY_TICKET, !hasRevokeHostPermission);
|
|
134
|
+
},
|
|
135
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
136
|
+
type: _type.FcrIconType.FCR_HOST,
|
|
137
|
+
size: 24,
|
|
138
|
+
colors: {
|
|
139
|
+
iconPrimary: 'var(--fcr_ui_scene_icontext1)'
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
}, {
|
|
143
|
+
type: 'line',
|
|
144
|
+
title: '',
|
|
145
|
+
key: ''
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// 过滤掉禁用的项,并处理主要类型的项
|
|
150
|
+
var filteredActions = allActions.filter(function (action) {
|
|
151
|
+
return action.type !== 'disabled';
|
|
152
|
+
}).map(function (action) {
|
|
153
|
+
if (action.type === 'primary') {
|
|
154
|
+
return _objectSpread(_objectSpread({}, action), {}, {
|
|
155
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
156
|
+
className: _util.CHECKBOX_WRAPPER_CLASS,
|
|
157
|
+
children: action.title
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
return action;
|
|
162
|
+
});
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_dropMenu.FcrDropMenu, {
|
|
164
|
+
options: filteredActions
|
|
165
|
+
});
|
|
166
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FcrDropMenuOption } from 'agora-ui-foundation/lib/components/drop-menu';
|
|
2
|
+
export declare const CHECKBOX_STYLE_TYPE = "white";
|
|
3
|
+
export declare const UNDERLINE_CLASS = "room-control-drop-with-under-line";
|
|
4
|
+
export declare const CHECKBOX_WRAPPER_CLASS = "security-drop-menu-checkbox";
|
|
5
|
+
export declare const createCheckboxMenuItem: (key: string, label: string, checked: boolean | undefined, type?: "primary" | "danger" | "title" | "disabled" | "group", onButtonClick?: () => void, classNames?: string) => FcrDropMenuOption;
|
|
@@ -0,0 +1,28 @@
|
|
|
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.createCheckboxMenuItem = exports.UNDERLINE_CLASS = exports.CHECKBOX_WRAPPER_CLASS = exports.CHECKBOX_STYLE_TYPE = void 0;
|
|
8
|
+
var _checkbox = require("agora-ui-foundation/lib/components/checkbox");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
var CHECKBOX_STYLE_TYPE = exports.CHECKBOX_STYLE_TYPE = 'white';
|
|
11
|
+
var UNDERLINE_CLASS = exports.UNDERLINE_CLASS = 'room-control-drop-with-under-line';
|
|
12
|
+
var CHECKBOX_WRAPPER_CLASS = exports.CHECKBOX_WRAPPER_CLASS = 'security-drop-menu-checkbox';
|
|
13
|
+
|
|
14
|
+
// 封装创建复选框菜单项的函数
|
|
15
|
+
var createCheckboxMenuItem = exports.createCheckboxMenuItem = function createCheckboxMenuItem(key, label, checked, type, onButtonClick) {
|
|
16
|
+
var classNames = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
|
|
17
|
+
return {
|
|
18
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.FcrCheckbox, {
|
|
19
|
+
checked: checked,
|
|
20
|
+
label: label,
|
|
21
|
+
styleType: CHECKBOX_STYLE_TYPE
|
|
22
|
+
}),
|
|
23
|
+
key: key,
|
|
24
|
+
type: type,
|
|
25
|
+
classNames: classNames,
|
|
26
|
+
onButtonClick: onButtonClick
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { ParticipantsFooterParticipantProps, ParticipantsHostFooterProps } from '../../../../types';
|
|
3
|
+
export declare const FcrParticipantsFooter: (props: ParticipantsHostFooterProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const FcrParticipantsFooterRename: ({ onRoomControlClick, }: ParticipantsFooterParticipantProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const FcrParticipantsFooterWithRevokeHost: ({ type, onRoomControlClick, }: ParticipantsFooterParticipantProps) => import("react/jsx-runtime").JSX.Element;
|