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
|
@@ -61,7 +61,6 @@ var _textBubble = require("agora-ui-foundation/lib/components/text-bubble");
|
|
|
61
61
|
var _latestButton = require("agora-ui-foundation/lib/components/latest-button");
|
|
62
62
|
var _store = require("./store");
|
|
63
63
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
64
|
-
var _contex = require("./contex");
|
|
65
64
|
var _mobxReact = require("mobx-react");
|
|
66
65
|
var _throttle = _interopRequireDefault(require("lodash/throttle"));
|
|
67
66
|
var _multiSelect = require("agora-ui-foundation/lib/components/multi-select");
|
|
@@ -70,6 +69,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
70
69
|
var _copyText = require("../../utilities/copyText");
|
|
71
70
|
var _platform = require("../../utilities/platform");
|
|
72
71
|
var _env = require("agora-foundation/lib/utilities/env");
|
|
72
|
+
var _fcr_defaultpage = _interopRequireDefault(require("../../../public/assets/fcr_defaultpage.png"));
|
|
73
73
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
74
74
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
75
75
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -94,40 +94,43 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
94
94
|
selectCnt = _ref.selectCnt,
|
|
95
95
|
copyTips = _ref.copyTips;
|
|
96
96
|
var t = (0, _i18n.useI18n)();
|
|
97
|
-
var _useContext = (0, _react.useContext)(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
97
|
+
var _useContext = (0, _react.useContext)(_store.StoreContext),
|
|
98
|
+
chatRoomStores = _useContext.chatRoomStores,
|
|
99
|
+
activeTabIndex = _useContext.activeTabIndex;
|
|
100
|
+
var _ref2 = chatRoomStores[activeTabIndex],
|
|
101
|
+
storeMsgs = _ref2.messageList,
|
|
102
|
+
readMsgIndex = _ref2.readMsgIndex,
|
|
103
|
+
needCbBottomCount = _ref2.needCbBottomCount,
|
|
104
|
+
list = _ref2.list,
|
|
105
|
+
mostRecentHeight = _ref2.mostRecentHeight,
|
|
106
|
+
mostRecentWidth = _ref2.mostRecentWidth,
|
|
107
|
+
cache = _ref2.cache,
|
|
108
|
+
scrollHeight = _ref2.scrollHeight,
|
|
109
|
+
scrollTop = _ref2.scrollTop,
|
|
110
|
+
clientHeight = _ref2.clientHeight,
|
|
111
|
+
firstMsgId = _ref2.firstMsgId,
|
|
112
|
+
readIdx = _ref2.readIdx,
|
|
113
|
+
viewIdx = _ref2.viewIdx,
|
|
114
|
+
historyUnReadCount = _ref2.historyUnreadCount,
|
|
115
|
+
hasHistoryMsg = _ref2.hasHistoryMsg,
|
|
116
|
+
newMsgsUnReadCnt = _ref2.newMsgsUnReadCnt,
|
|
117
|
+
isHost = _ref2.isHost,
|
|
118
|
+
isCohost = _ref2.isCohost,
|
|
119
|
+
initReadInfo = _ref2.initReadInfo,
|
|
120
|
+
updateScrollInfo = _ref2.updateScrollInfo,
|
|
121
|
+
updateHasHistoryMsg = _ref2.updateHasHistoryMsg,
|
|
122
|
+
updateHistoryCnt = _ref2.updateHistoryUnreadCnt,
|
|
123
|
+
updateViewIdx = _ref2.updateViewIdx,
|
|
124
|
+
updateReadIdx = _ref2.updateReadIdx,
|
|
125
|
+
updateFirstMsgId = _ref2.updateFirstMsgId,
|
|
126
|
+
updateHistoryUnReadCount = _ref2.updateHistoryUnReadCount,
|
|
127
|
+
updateList = _ref2.updateList,
|
|
128
|
+
updateMostRecentHeight = _ref2.updateMostRecentHeight,
|
|
129
|
+
updateMostRecentWidth = _ref2.updateMostRecentWidth,
|
|
130
|
+
forceNotifyMsgs = _ref2.forceNotifyMsgs,
|
|
131
|
+
permitPrivateChat = _ref2.permitPrivateChat,
|
|
132
|
+
lastScrollTop = _ref2.lastScrollTop,
|
|
133
|
+
setLastScrollTop = _ref2.setLastScrollTop;
|
|
131
134
|
var _useState = (0, _react.useState)(storeMsgs !== null && storeMsgs !== void 0 ? storeMsgs : []),
|
|
132
135
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
133
136
|
messageList = _useState2[0],
|
|
@@ -207,7 +210,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
207
210
|
scrollToIdx(viewIdx);
|
|
208
211
|
}, [newMsgsUnReadCnt]);
|
|
209
212
|
var handleCopyMsg = /*#__PURE__*/function () {
|
|
210
|
-
var
|
|
213
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(msg, time, publisherNickName, targetNickname) {
|
|
211
214
|
var msgHandled;
|
|
212
215
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
213
216
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -224,7 +227,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
224
227
|
}, _callee);
|
|
225
228
|
}));
|
|
226
229
|
return function handleCopyMsg(_x, _x2, _x3, _x4) {
|
|
227
|
-
return
|
|
230
|
+
return _ref3.apply(this, arguments);
|
|
228
231
|
};
|
|
229
232
|
}();
|
|
230
233
|
var handleSelectMsg = function handleSelectMsg(idx, checked) {
|
|
@@ -245,12 +248,12 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
245
248
|
// list?.scrollToPosition(_scrollTop);
|
|
246
249
|
};
|
|
247
250
|
var rowRenderer = function rowRenderer(messageList) {
|
|
248
|
-
return function (
|
|
251
|
+
return function (_ref4) {
|
|
249
252
|
var _arr, _arr2, _arr3, _arr4, _datum$img;
|
|
250
|
-
var index =
|
|
251
|
-
key =
|
|
252
|
-
parent =
|
|
253
|
-
style =
|
|
253
|
+
var index = _ref4.index,
|
|
254
|
+
key = _ref4.key,
|
|
255
|
+
parent = _ref4.parent,
|
|
256
|
+
style = _ref4.style;
|
|
254
257
|
var datum = messageList[index % messageList.length];
|
|
255
258
|
var publisherRole = datum.role,
|
|
256
259
|
time = datum.time,
|
|
@@ -295,7 +298,9 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
295
298
|
marginRight: 15,
|
|
296
299
|
marginLeft: multiSelectActive ? 8 : 15,
|
|
297
300
|
alignItems: 'flex-start'
|
|
298
|
-
}),
|
|
301
|
+
}), {}, {
|
|
302
|
+
pointerEvents: 'all'
|
|
303
|
+
}, index === 0 ? {
|
|
299
304
|
paddingTop: 10
|
|
300
305
|
} : {}),
|
|
301
306
|
id: String(idx),
|
|
@@ -308,6 +313,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
308
313
|
marginBottom: 16
|
|
309
314
|
}
|
|
310
315
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_textBubble.TextBubble, {
|
|
316
|
+
classnames: "fcr-line-system-message",
|
|
311
317
|
txt: "".concat((0, _util.handleChatLevelChangedSystemMsg)(t, chatLevel, publisherRole, publisherNickName, publisherIsSelf)),
|
|
312
318
|
marginBottom: 15
|
|
313
319
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -379,7 +385,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
379
385
|
width: 'auto'
|
|
380
386
|
},
|
|
381
387
|
onCopy: (/*#__PURE__*/function () {
|
|
382
|
-
var
|
|
388
|
+
var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(type) {
|
|
383
389
|
var currentScrollTop;
|
|
384
390
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
385
391
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -410,7 +416,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
410
416
|
}, _callee2);
|
|
411
417
|
}));
|
|
412
418
|
return function (_x5) {
|
|
413
|
-
return
|
|
419
|
+
return _ref5.apply(this, arguments);
|
|
414
420
|
};
|
|
415
421
|
}()),
|
|
416
422
|
onPrivate: function onPrivate() {
|
|
@@ -576,13 +582,24 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
576
582
|
styles: {
|
|
577
583
|
zIndex: 999
|
|
578
584
|
}
|
|
579
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.
|
|
585
|
+
}) : null, messageList.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
586
|
+
className: "fcr-no-data-chat",
|
|
587
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
588
|
+
style: {
|
|
589
|
+
width: 138,
|
|
590
|
+
height: 100
|
|
591
|
+
},
|
|
592
|
+
src: _fcr_defaultpage["default"]
|
|
593
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
594
|
+
children: t('fmt_chat_tips_nodata')
|
|
595
|
+
})]
|
|
596
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactVirtualized.AutoSizer, {
|
|
580
597
|
style: {
|
|
581
598
|
alignSelf: 'stretch'
|
|
582
599
|
},
|
|
583
|
-
children: function children(
|
|
584
|
-
var height =
|
|
585
|
-
width =
|
|
600
|
+
children: function children(_ref6) {
|
|
601
|
+
var height = _ref6.height,
|
|
602
|
+
width = _ref6.width;
|
|
586
603
|
if (height !== mostRecentHeight || width !== mostRecentWidth) {
|
|
587
604
|
cache.clearAll();
|
|
588
605
|
if (list) {
|
|
@@ -592,8 +609,8 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
592
609
|
updateMostRecentHeight(height);
|
|
593
610
|
updateMostRecentWidth(width);
|
|
594
611
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactVirtualized.List, {
|
|
595
|
-
ref: function ref(
|
|
596
|
-
updateList(
|
|
612
|
+
ref: function ref(_ref7) {
|
|
613
|
+
updateList(_ref7);
|
|
597
614
|
},
|
|
598
615
|
style: {
|
|
599
616
|
padding: 'inherit',
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.DialogContainerBody = DialogContainerBody;
|
|
8
8
|
require("../index.css");
|
|
9
|
-
var _env = require("agora-foundation/lib/utilities/env");
|
|
10
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
10
|
function DialogContainerBody(props) {
|
|
12
11
|
var actions = props.actions,
|
|
@@ -33,7 +32,7 @@ function DialogContainerBody(props) {
|
|
|
33
32
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("section", {
|
|
34
33
|
className: "fcr-dialog-container-content",
|
|
35
34
|
style: title || actions ? {
|
|
36
|
-
height:
|
|
35
|
+
height: 'calc(100vh - 76px)' /* 76px 包含 46px 的 title 高度,和 30px 的阴影 */
|
|
37
36
|
} : {},
|
|
38
37
|
children: children
|
|
39
38
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DialogKey } from '../../../utilities/constant';
|
|
3
3
|
declare const DialogContainer: (props: PropsWithChildren<{
|
|
4
4
|
width?: number;
|
|
5
5
|
height?: number;
|
|
6
|
-
dialogKey:
|
|
6
|
+
dialogKey: DialogKey;
|
|
7
7
|
title?: string;
|
|
8
8
|
onClose?: () => void;
|
|
9
9
|
actions?: React.ReactNode;
|
package/lib/modules/components/member-window/components/member-actions/components/audio-control.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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.AudioControl = void 0;
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _provider = require("../provider");
|
|
11
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
12
|
+
var _iconButtons = require("./icon-buttons");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
var AudioControl = exports.AudioControl = function AudioControl(_ref) {
|
|
15
|
+
var isMeeting = _ref.isMeeting,
|
|
16
|
+
iconSize = _ref.iconSize;
|
|
17
|
+
var store = (0, _provider.useMemberWindowActionsStore)();
|
|
18
|
+
var t = (0, _i18n.useI18n)();
|
|
19
|
+
if (!store.hasMicrophoneAudioStream) {
|
|
20
|
+
return isMeeting ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.SipDeviceIconButton, {
|
|
21
|
+
iconSize: iconSize,
|
|
22
|
+
backgroundColor: ""
|
|
23
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.NoMuteIconButton, {
|
|
24
|
+
iconSize: iconSize,
|
|
25
|
+
tooltip: t('fmt_device_label_audio_mute')
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
if (store.isPhone) {
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.PhoneCallIconButton, {
|
|
30
|
+
iconSize: iconSize
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return isMeeting ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.SipDeviceIconButton, {
|
|
34
|
+
iconSize: iconSize
|
|
35
|
+
}) : null;
|
|
36
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare const SipDeviceIconButton: (props: {
|
|
3
|
+
iconSize: number;
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const PhoneCallSilenceIconButton: (props: {
|
|
7
|
+
iconSize: number;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const PhoneCallIconButton: (props: {
|
|
11
|
+
iconSize: number;
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const NoMuteIconButton: (props: {
|
|
15
|
+
iconSize: number;
|
|
16
|
+
tooltip?: string;
|
|
17
|
+
isManager?: boolean;
|
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare const InterpreterTag: (props: PropsWithChildren<{
|
|
20
|
+
className?: string;
|
|
21
|
+
isShow?: boolean;
|
|
22
|
+
showActionBottomLabel?: boolean;
|
|
23
|
+
windowSize?: string;
|
|
24
|
+
}>) => import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
export declare const ShareScreenIconButton: (props: {
|
|
26
|
+
hasScreenSharing: boolean;
|
|
27
|
+
windowSize: string;
|
|
28
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const ShareSoundIconButton: (props: {
|
|
30
|
+
hasScreenSharing: boolean;
|
|
31
|
+
windowSize: string;
|
|
32
|
+
hasLoopbackAudioStream: boolean;
|
|
33
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const ActionsTagIconButton: (props: PropsWithChildren<{
|
|
35
|
+
hostTag: boolean;
|
|
36
|
+
coHostTag: boolean;
|
|
37
|
+
}>) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const RenameTagIconButton: (props: {
|
|
39
|
+
onClick: () => void;
|
|
40
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,170 @@
|
|
|
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.SipDeviceIconButton = exports.ShareSoundIconButton = exports.ShareScreenIconButton = exports.RenameTagIconButton = exports.PhoneCallSilenceIconButton = exports.PhoneCallIconButton = exports.NoMuteIconButton = exports.InterpreterTag = exports.ActionsTagIconButton = void 0;
|
|
9
|
+
var _icon = require("agora-ui-foundation/lib/components/icon");
|
|
10
|
+
var _type = require("agora-ui-foundation/lib/components/icon/type");
|
|
11
|
+
var _tooltip = require("agora-ui-foundation/lib/components/tooltip");
|
|
12
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
13
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var SipDeviceIconButton = exports.SipDeviceIconButton = function SipDeviceIconButton(props) {
|
|
16
|
+
var iconSize = props.iconSize,
|
|
17
|
+
_props$backgroundColo = props.backgroundColor,
|
|
18
|
+
backgroundColor = _props$backgroundColo === void 0 ? 'var(--fcr_ui_scene_ramp_purple7)' : _props$backgroundColo;
|
|
19
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
20
|
+
className: "fcr-user-window-actions-microphone",
|
|
21
|
+
style: {
|
|
22
|
+
backgroundColor: backgroundColor
|
|
23
|
+
},
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
25
|
+
type: _type.FcrIconType.FCR_SIPDEVICE,
|
|
26
|
+
size: iconSize,
|
|
27
|
+
colors: {
|
|
28
|
+
iconPrimary: 'var(--fcr_ui_scene_white10)',
|
|
29
|
+
iconSecondary: 'var(--fcr_ui_scene_ramp_green6)'
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var PhoneCallSilenceIconButton = exports.PhoneCallSilenceIconButton = function PhoneCallSilenceIconButton(props) {
|
|
35
|
+
var iconSize = props.iconSize,
|
|
36
|
+
tooltip = props.tooltip;
|
|
37
|
+
var t = (0, _i18n.useI18n)();
|
|
38
|
+
var button = /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
39
|
+
className: "fcr-user-window-actions-microphone",
|
|
40
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
41
|
+
type: _type.FcrIconType.FCR_PHONECALL_SILENCE,
|
|
42
|
+
size: iconSize,
|
|
43
|
+
colors: {
|
|
44
|
+
iconPrimary: 'var(--fcr_ui_scene_ramp_red6)'
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
return tooltip ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
|
|
49
|
+
content: tooltip,
|
|
50
|
+
children: button
|
|
51
|
+
}) : button;
|
|
52
|
+
};
|
|
53
|
+
var PhoneCallIconButton = exports.PhoneCallIconButton = function PhoneCallIconButton(props) {
|
|
54
|
+
var iconSize = props.iconSize,
|
|
55
|
+
_props$backgroundColo2 = props.backgroundColor,
|
|
56
|
+
backgroundColor = _props$backgroundColo2 === void 0 ? 'var(--fcr_ui_scene_ramp_lightgreen6)' : _props$backgroundColo2;
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
58
|
+
className: "fcr-user-window-actions-microphone",
|
|
59
|
+
style: {
|
|
60
|
+
backgroundColor: backgroundColor
|
|
61
|
+
},
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
63
|
+
type: _type.FcrIconType.FCR_PHONECALL3,
|
|
64
|
+
size: iconSize,
|
|
65
|
+
colors: {
|
|
66
|
+
iconPrimary: 'var(--fcr_ui_scene_white10)'
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
var NoMuteIconButton = exports.NoMuteIconButton = function NoMuteIconButton(props) {
|
|
72
|
+
var iconSize = props.iconSize,
|
|
73
|
+
tooltip = props.tooltip,
|
|
74
|
+
isManager = props.isManager;
|
|
75
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
|
|
76
|
+
content: tooltip,
|
|
77
|
+
mouseEnterDelay: 0,
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
79
|
+
className: "fcr-user-window-actions-microphone",
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
81
|
+
type: _type.FcrIconType.FCR_NOMUTE,
|
|
82
|
+
size: iconSize,
|
|
83
|
+
colors: {
|
|
84
|
+
iconPrimary: isManager ? 'currentColor' : 'var(--fcr_ui_scene_ramp_red6)',
|
|
85
|
+
iconSecondary: 'var(--fcr_ui_scene_ramp_red6)'
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
var InterpreterTag = exports.InterpreterTag = function InterpreterTag(props) {
|
|
92
|
+
var _props$isShow = props.isShow,
|
|
93
|
+
isShow = _props$isShow === void 0 ? true : _props$isShow,
|
|
94
|
+
children = props.children,
|
|
95
|
+
showActionBottomLabel = props.showActionBottomLabel,
|
|
96
|
+
windowSize = props.windowSize,
|
|
97
|
+
className = props.className;
|
|
98
|
+
var t = (0, _i18n.useI18n)();
|
|
99
|
+
if (!isShow) {
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
103
|
+
className: (0, _classnames["default"])('fcr-user-window-actions-tag', 'fcr-user-window-actions-tag-host', className || (0, _classnames["default"])('fcr-user-window-actions-bottom', 'fcr-user-window-actions-middle', {
|
|
104
|
+
'fcr-user-window-actions-bottom-show': showActionBottomLabel,
|
|
105
|
+
'fcr-user-window-actions-tag_large': windowSize === 'large'
|
|
106
|
+
})),
|
|
107
|
+
children: children || /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
108
|
+
children: t('fmt_ai_transcriptions_setting_label_translator')
|
|
109
|
+
})
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
var ShareScreenIconButton = exports.ShareScreenIconButton = function ShareScreenIconButton(props) {
|
|
113
|
+
var hasScreenSharing = props.hasScreenSharing,
|
|
114
|
+
windowSize = props.windowSize;
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
116
|
+
className: (0, _classnames["default"])('fcr-member-window-members-sharebtn', {
|
|
117
|
+
'fcr-member-window-members-sharebtn-show': hasScreenSharing,
|
|
118
|
+
'fcr-member-window-members-sharebtn-large': windowSize === 'large'
|
|
119
|
+
}),
|
|
120
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
121
|
+
type: _type.FcrIconType.FCR_MOBILE_SHARESCREEN,
|
|
122
|
+
colors: {
|
|
123
|
+
iconPrimary: 'var(--fcr_ui_scene_white10)'
|
|
124
|
+
},
|
|
125
|
+
size: windowSize === 'large' ? 24 : 18
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
var ShareSoundIconButton = exports.ShareSoundIconButton = function ShareSoundIconButton(props) {
|
|
130
|
+
var hasScreenSharing = props.hasScreenSharing,
|
|
131
|
+
windowSize = props.windowSize,
|
|
132
|
+
hasLoopbackAudioStream = props.hasLoopbackAudioStream;
|
|
133
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
134
|
+
className: (0, _classnames["default"])('fcr-member-window-members-shareSound', {
|
|
135
|
+
'fcr-member-window-members-sharebtn-show': hasScreenSharing && hasLoopbackAudioStream,
|
|
136
|
+
'fcr-member-window-members-sharebtn-large': windowSize === 'large'
|
|
137
|
+
}),
|
|
138
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
139
|
+
type: _type.FcrIconType.FCR_SHARE_SOUND,
|
|
140
|
+
colors: {
|
|
141
|
+
iconPrimary: 'var(--fcr_ui_scene_ramp_green6)'
|
|
142
|
+
},
|
|
143
|
+
size: windowSize === 'large' ? 24 : 18
|
|
144
|
+
})
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
var ActionsTagIconButton = exports.ActionsTagIconButton = function ActionsTagIconButton(props) {
|
|
148
|
+
var hostTag = props.hostTag,
|
|
149
|
+
coHostTag = props.coHostTag,
|
|
150
|
+
children = props.children;
|
|
151
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
152
|
+
className: (0, _classnames["default"])('fcr-user-window-actions-tag', {
|
|
153
|
+
'fcr-user-window-actions-tag-host': hostTag,
|
|
154
|
+
'fcr-user-window-actions-tag-cohost': coHostTag
|
|
155
|
+
}),
|
|
156
|
+
children: children
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
var RenameTagIconButton = exports.RenameTagIconButton = function RenameTagIconButton(props) {
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
161
|
+
className: "fcr-user-window-actions-name-rename",
|
|
162
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
163
|
+
onClick: props.onClick,
|
|
164
|
+
type: _type.FcrIconType.FCR_RENAME,
|
|
165
|
+
colors: {
|
|
166
|
+
iconPrimary: 'var(--fcr_ui_scene_icontext1)'
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
};
|
package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FcrRoomConnectorType } from 'fcr-core';
|
|
3
|
+
interface IconStatusProps {
|
|
4
|
+
windowSize: 'large' | 'normal';
|
|
5
|
+
iconSize: number;
|
|
6
|
+
meetingConnectorTypes: Set<FcrRoomConnectorType>;
|
|
7
|
+
id: string | undefined;
|
|
8
|
+
volume: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const IconStatus: React.FC<IconStatusProps>;
|
|
11
|
+
export {};
|
package/lib/modules/components/member-window/components/member-actions/components/icon-status.js
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
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.IconStatus = void 0;
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _mobxReact = require("mobx-react");
|
|
11
|
+
var _fcrCore = require("fcr-core");
|
|
12
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
13
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
+
var _micVolume = require("../../mic-volume");
|
|
15
|
+
var _iconButtons = require("./icon-buttons");
|
|
16
|
+
var _iconPhoneCall = require("agora-ui-foundation/lib/components/icon-phone-call");
|
|
17
|
+
var _provider = require("../provider");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
var IconStatus = exports.IconStatus = (0, _mobxReact.observer)(function (_ref) {
|
|
20
|
+
var windowSize = _ref.windowSize,
|
|
21
|
+
iconSize = _ref.iconSize,
|
|
22
|
+
meetingConnectorTypes = _ref.meetingConnectorTypes,
|
|
23
|
+
id = _ref.id,
|
|
24
|
+
volume = _ref.volume;
|
|
25
|
+
var t = (0, _i18n.useI18n)();
|
|
26
|
+
var store = (0, _provider.useMemberWindowActionsStore)();
|
|
27
|
+
var connectorType = store.connectorType,
|
|
28
|
+
audioStreamId = store.audioStreamId,
|
|
29
|
+
videoStreamId = store.videoStreamId,
|
|
30
|
+
hasMicrophoneAudioStream = store.hasMicrophoneAudioStream,
|
|
31
|
+
isManager = store.isManager,
|
|
32
|
+
phoneMicEnabled = store.phoneMicEnabled;
|
|
33
|
+
var isNormal = connectorType === _fcrCore.FcrRoomConnectorType.NONE;
|
|
34
|
+
var isPhone = store.isPhone;
|
|
35
|
+
var isMeeting = meetingConnectorTypes.has(connectorType);
|
|
36
|
+
var isPurePhone = audioStreamId === videoStreamId;
|
|
37
|
+
var renderNormalStatus = function renderNormalStatus() {
|
|
38
|
+
if (!hasMicrophoneAudioStream && !isMeeting) {
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.NoMuteIconButton, {
|
|
40
|
+
iconSize: iconSize,
|
|
41
|
+
tooltip: t('fmt_device_label_audio_mute'),
|
|
42
|
+
isManager: isManager
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
if (windowSize === 'large') {
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_micVolume.MicVolume, {
|
|
47
|
+
id: id,
|
|
48
|
+
size: iconSize,
|
|
49
|
+
volume: volume
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
var renderPhoneStatus = function renderPhoneStatus() {
|
|
55
|
+
if (windowSize === 'large' && !isPurePhone) {
|
|
56
|
+
return hasMicrophoneAudioStream ? /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
57
|
+
className: "fcr-user-window-actions-microphone",
|
|
58
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconPhoneCall.FcrIconPhoneCall, {
|
|
59
|
+
size: iconSize,
|
|
60
|
+
isMuted: !phoneMicEnabled,
|
|
61
|
+
iconColors: {
|
|
62
|
+
iconPrimary: store.ownerRoleType === _fcrCore.FcrUserRole.HOST ? 'var(--fcr_ui_scene_white10)' : 'var(--fcr_ui_scene_ramp_lightgreen6)'
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.PhoneCallSilenceIconButton, {
|
|
66
|
+
tooltip: t('fmt_popup_label_muted'),
|
|
67
|
+
iconSize: iconSize
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
if (windowSize === 'normal') {
|
|
71
|
+
if (isPurePhone) {
|
|
72
|
+
return hasMicrophoneAudioStream ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.PhoneCallIconButton, {
|
|
73
|
+
iconSize: iconSize
|
|
74
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.PhoneCallSilenceIconButton, {
|
|
75
|
+
tooltip: t('fmt_popup_label_muted'),
|
|
76
|
+
iconSize: iconSize
|
|
77
|
+
});
|
|
78
|
+
} else {
|
|
79
|
+
return hasMicrophoneAudioStream ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.PhoneCallSilenceIconButton, {
|
|
80
|
+
tooltip: t('fmt_popup_label_muted'),
|
|
81
|
+
iconSize: iconSize
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var renderMeetingStatus = function renderMeetingStatus() {
|
|
87
|
+
if (!hasMicrophoneAudioStream) {
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
89
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.SipDeviceIconButton, {
|
|
90
|
+
iconSize: iconSize
|
|
91
|
+
}), windowSize === 'normal' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.PhoneCallSilenceIconButton, {
|
|
92
|
+
tooltip: t('fmt_popup_label_muted'),
|
|
93
|
+
iconSize: iconSize
|
|
94
|
+
})]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_iconButtons.SipDeviceIconButton, {
|
|
98
|
+
iconSize: iconSize
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
102
|
+
className: (0, _classnames["default"])('fcr-audio-status', "fcr-audio-status-".concat(windowSize)),
|
|
103
|
+
children: [isNormal && renderNormalStatus(), isPhone && renderPhoneStatus(), isMeeting && renderMeetingStatus()]
|
|
104
|
+
});
|
|
105
|
+
});
|
package/lib/modules/components/member-window/components/member-actions/components/layout/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface MemberActionsLayoutProps {
|
|
3
|
+
headerSlot?: ReactNode;
|
|
4
|
+
topSlot?: ReactNode;
|
|
5
|
+
bottomSlot?: ReactNode;
|
|
6
|
+
onContextMenu?: () => void;
|
|
7
|
+
customClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const MemberActionsLayout: React.FC<MemberActionsLayoutProps>;
|