fcr-ui-scene 3.2.0 → 3.3.0
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/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +16 -0
- package/lib/common/device-store.d.ts +1 -1
- package/lib/common/device-store.js +11 -3
- package/lib/common/event-store.d.ts +17 -1
- package/lib/common/event-store.js +38 -5
- package/lib/common/security-store.d.ts +14 -4
- package/lib/common/security-store.js +149 -30
- package/lib/electron/bootstrap-dev.d.ts +1 -0
- package/lib/electron/bootstrap-dev.js +51 -0
- package/lib/electron/bootstrap-sdk.d.ts +1 -0
- package/lib/electron/bootstrap-sdk.js +56 -0
- package/lib/electron/bootstrap.d.ts +1 -0
- package/lib/electron/bootstrap.js +56 -0
- package/lib/electron/default-options.js +1 -1
- package/lib/electron/dev.d.ts +1 -0
- package/lib/electron/dev.js +51 -0
- package/lib/electron/injections.d.ts +1 -1
- package/lib/electron/injections.js +3 -6
- package/lib/electron/main.js +4 -16
- package/lib/electron/plugins/meeting-state.d.ts +2 -0
- package/lib/electron/plugins/meeting-state.js +39 -0
- package/lib/electron/preload.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +34 -1
- package/lib/fragments/control-bar/control-bar-store.js +371 -79
- package/lib/fragments/control-bar/device/index.js +5 -3
- package/lib/fragments/control-bar/index.css +15 -10
- package/lib/fragments/control-bar/index.js +18 -0
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +109 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.d.ts +3 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.js +60 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.d.ts +2 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +179 -0
- package/lib/fragments/control-bar/more-actions/index.css +53 -0
- package/lib/fragments/control-bar/more-actions/index.js +72 -37
- package/lib/fragments/control-bar/security-content/index.css +10 -0
- package/lib/fragments/control-bar/security-content/index.js +40 -18
- package/lib/fragments/control-bar/view.js +8 -2
- package/lib/login-confirm-dialog.d.ts +12 -0
- package/lib/login-confirm-dialog.js +80 -0
- package/lib/modules/action-bar/action-bar-collapes-items.js +5 -5
- package/lib/modules/action-bar/chat/index.js +5 -5
- package/lib/modules/action-bar/device/index.css +7 -2
- package/lib/modules/action-bar/device/index.js +4 -4
- package/lib/modules/action-bar/index.css +59 -12
- package/lib/modules/action-bar/index.d.ts +3 -2
- package/lib/modules/action-bar/index.dev.js +1 -1
- package/lib/modules/action-bar/index.js +21 -0
- package/lib/modules/action-bar/leave/assign-host.d.ts +3 -0
- package/lib/modules/action-bar/leave/assign-host.js +2 -4
- package/lib/modules/action-bar/leave/index.js +29 -6
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +11 -0
- package/lib/modules/action-bar/leave/leave-meeting.js +25 -16
- package/lib/modules/action-bar/more/poppover-content.js +4 -4
- package/lib/modules/action-bar/participants/index.css +12 -0
- package/lib/modules/action-bar/participants/index.js +21 -14
- package/lib/modules/action-bar/screen-share/index.js +5 -1
- package/lib/modules/action-bar/screen-share/submenu.js +16 -22
- package/lib/modules/action-bar/security/drop-menu.js +90 -13
- package/lib/modules/action-bar/store.d.ts +38 -6
- package/lib/modules/action-bar/store.js +487 -95
- package/lib/modules/action-bar/view.js +65 -42
- package/lib/modules/chat/chat-bar/index.js +39 -27
- package/lib/modules/chat/chat-select/index.css +14 -4
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +184 -105
- package/lib/modules/chat/index.css +49 -0
- package/lib/modules/chat/index.d.ts +2 -2
- package/lib/modules/chat/index.dev.js +1 -1
- package/lib/modules/chat/index.js +13 -8
- package/lib/modules/chat/message-list.js +59 -48
- package/lib/modules/chat/store.d.ts +48 -2
- package/lib/modules/chat/store.js +258 -45
- package/lib/modules/connection-gateway/index.d.ts +2 -1
- package/lib/modules/connection-gateway/store.d.ts +6 -3
- package/lib/modules/connection-gateway/store.js +5 -1
- package/lib/modules/device-pretest/audio-preview/speaker-control.js +1 -1
- package/lib/modules/device-pretest/index.css +0 -4
- package/lib/modules/device-pretest/settings/beauty.js +17 -6
- package/lib/modules/device-pretest/store.js +7 -11
- package/lib/modules/dialog/components/chat/electron.js +2 -1
- package/lib/modules/dialog/components/confirm/electron.js +5 -3
- package/lib/modules/dialog/components/connection-gateway/electron.js +3 -1
- package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
- package/lib/modules/dialog/components/device-setting/electron.js +3 -1
- package/lib/modules/dialog/components/device-setting/index.css +0 -1
- package/lib/modules/dialog/components/operation-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.css +44 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.js +156 -0
- package/lib/modules/dialog/components/participant/electron.js +2 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.css +50 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +90 -0
- package/lib/modules/dialog/components/whiteboard/index.js +2 -1
- package/lib/modules/dialog/dialogs.js +17 -13
- package/lib/modules/dialog/index.css +2 -0
- package/lib/modules/dialog/store.d.ts +4 -0
- package/lib/modules/dialog/store.js +16 -2
- package/lib/modules/event-notification/context.d.ts +2 -0
- package/lib/modules/event-notification/context.js +9 -0
- package/lib/modules/event-notification/index.css +58 -0
- package/lib/modules/event-notification/index.d.ts +13 -0
- package/lib/modules/event-notification/index.js +48 -0
- package/lib/modules/event-notification/store.d.ts +17 -0
- package/lib/modules/event-notification/store.js +133 -0
- package/lib/modules/event-notification/view.d.ts +5 -0
- package/lib/modules/event-notification/view.js +114 -0
- package/lib/modules/invite/index.css +4 -4
- package/lib/modules/invite/pstn-invite.js +1 -0
- package/lib/modules/layout/components/Gallery.js +7 -1
- package/lib/modules/layout/components/Layout.js +82 -57
- package/lib/modules/layout/components/index.css +33 -6
- package/lib/modules/layout/index.css +30 -0
- package/lib/modules/layout/member-window/index.js +9 -3
- package/lib/modules/layout/store.d.ts +19 -2
- package/lib/modules/layout/store.js +177 -70
- package/lib/modules/layout/video-window-datasource.d.ts +1 -1
- package/lib/modules/layout/video-window-datasource.js +1 -1
- package/lib/modules/live-streaming/index.dev.js +1 -1
- package/lib/modules/participant/attendee/index.d.ts +12 -3
- package/lib/modules/participant/attendee/index.js +132 -30
- package/lib/modules/participant/index.css +20 -0
- package/lib/modules/participant/index.d.ts +5 -2
- package/lib/modules/participant/index.dev.js +1 -1
- package/lib/modules/participant/index.js +27 -0
- package/lib/modules/participant/room-control-drop-menu/index.css +37 -0
- package/lib/modules/participant/store.d.ts +30 -5
- package/lib/modules/participant/store.js +347 -74
- package/lib/modules/participant/view.js +133 -34
- package/lib/modules/setting/index.css +1 -5
- package/lib/modules/setting/index.dev.js +1 -1
- package/lib/modules/setting/store.d.ts +2 -2
- package/lib/modules/setting/store.js +3 -8
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/video-settings/index.css +9 -6
- package/lib/modules/share-screen/index.d.ts +2 -0
- package/lib/modules/share-screen/index.dev.js +3 -2
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/store.d.ts +6 -3
- package/lib/modules/share-screen/store.js +170 -129
- package/lib/modules/state-bar/index.css +2 -2
- package/lib/modules/state-bar/index.d.ts +2 -2
- package/lib/modules/state-bar/index.dev.js +1 -1
- package/lib/modules/state-bar/meeting-detail.css +6 -4
- package/lib/modules/state-bar/meeting-details.js +29 -3
- package/lib/modules/state-bar/meeting-network-state.css +14 -3
- package/lib/modules/state-bar/meeting-network-state.js +10 -4
- package/lib/modules/state-bar/recording.js +3 -5
- package/lib/modules/state-bar/store.d.ts +4 -2
- package/lib/modules/state-bar/store.js +18 -3
- package/lib/modules/state-bar/view.js +1 -6
- package/lib/modules/video-window/index.css +1 -0
- package/lib/modules/video-window/store.d.ts +2 -2
- package/lib/modules/video-window/store.js +14 -11
- package/lib/modules/waiting-room-layout/context.d.ts +2 -0
- package/lib/modules/waiting-room-layout/context.js +9 -0
- package/lib/modules/waiting-room-layout/index.css +71 -0
- package/lib/modules/waiting-room-layout/index.d.ts +8 -0
- package/lib/modules/waiting-room-layout/index.js +47 -0
- package/lib/modules/waiting-room-layout/store.d.ts +30 -0
- package/lib/modules/waiting-room-layout/store.js +189 -0
- package/lib/modules/waiting-room-layout/type.d.ts +0 -0
- package/lib/modules/waiting-room-layout/type.js +1 -0
- package/lib/modules/waiting-room-layout/view.d.ts +3 -0
- package/lib/modules/waiting-room-layout/view.js +67 -0
- package/lib/modules/whiteboard/app.js +0 -6
- package/lib/modules/whiteboard/components/control-bar/index.css +3 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +6 -1
- package/lib/modules/whiteboard/components/progress/electron.js +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.css +4 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +20 -15
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +1 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +9 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +14 -10
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +3 -0
- package/lib/modules/whiteboard/context.d.ts +4 -0
- package/lib/modules/whiteboard/context.js +4 -2
- package/lib/modules/whiteboard/index.js +22 -6
- package/lib/plugins/browser-runtime-plugin.js +1 -1
- package/lib/plugins/module-dev-plugin.js +8 -6
- package/lib/runtime.d.ts +1 -1
- package/lib/translations/enUS.d.ts +449 -6
- package/lib/translations/enUS.js +485 -32
- package/lib/translations/zhCN.d.ts +447 -6
- package/lib/translations/zhCN.js +468 -17
- package/lib/type.d.ts +6 -2
- package/lib/ui-manager.d.ts +7 -3
- package/lib/ui-manager.js +576 -139
- package/lib/ui-scene.d.ts +1 -0
- package/lib/ui-scene.js +26 -21
- package/lib/utilities/constant.d.ts +43 -4
- package/lib/utilities/constant.js +41 -1
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +6 -2
- package/package.json +14 -14
- package/public/assets/fcr_defaultpage.png +0 -0
- package/public/assets/login_confirm.png +0 -0
- package/public/index.html +29 -11
- package/dist/132.js +0 -2
- package/dist/132.js.LICENSE.txt +0 -311
- package/dist/651.js +0 -2
- package/dist/651.js.LICENSE.txt +0 -1
- package/dist/73.js +0 -1
- package/dist/index.html +0 -13
- package/dist/main.da7c203ab32d15742cfe.css +0 -11760
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -254
- package/dist/worker-entry.worker.js.LICENSE.txt +0 -13
- package/lib/modules/device-pretest/settings/index.css +0 -15
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -278
|
@@ -15,3 +15,52 @@
|
|
|
15
15
|
.fcr-message-label .fcr-avatar {
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
.chat-tabs-container {
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fcr-no-data-chat {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.fcr-no-data-chat span {
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
font-size: 13px;
|
|
37
|
+
line-height: 14px;
|
|
38
|
+
font-family: PingFang HK;
|
|
39
|
+
color: var(--fcr_ui_scene_icontext2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.fcr-no-data-chat img {
|
|
43
|
+
width: 50%;
|
|
44
|
+
object-fit: contain;
|
|
45
|
+
margin-bottom: 20px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.chat-container-icon {
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.chat-container-red {
|
|
53
|
+
width: 8px;
|
|
54
|
+
height: 8px;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: var(--fcr_ui_scene_ramp_red6);
|
|
57
|
+
position: absolute;
|
|
58
|
+
right: -5px;
|
|
59
|
+
top: -5px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.chat-tabs-container .fcr-action-bar-chat-unread-count {
|
|
63
|
+
top: -16px;
|
|
64
|
+
right: -16px;
|
|
65
|
+
left: auto;
|
|
66
|
+
}
|
|
@@ -4,7 +4,7 @@ import { FcrUIEventStore } from '../../common/event-store';
|
|
|
4
4
|
import { FcrSecurityStore } from '../../common/security-store';
|
|
5
5
|
import { CHAT_WRAPPER_CLASS } from 'agora-ui-foundation/lib/components/chat-wrapper';
|
|
6
6
|
import { FcrChatRoomFile, FcrChatRoomMessageType } from 'agora-edu-core/lib/room-control/chatroom-control/type';
|
|
7
|
-
import {
|
|
7
|
+
import { FcrMainRoomControl, FcrWaitingRoomControl } from 'agora-edu-core/lib/room-control/type';
|
|
8
8
|
export { CHAT_WRAPPER_CLASS };
|
|
9
9
|
export declare class ChatUIModule extends UIModule {
|
|
10
10
|
private _store;
|
|
@@ -12,7 +12,7 @@ export declare class ChatUIModule extends UIModule {
|
|
|
12
12
|
private _uiEventStore;
|
|
13
13
|
private _uid;
|
|
14
14
|
constructor({ roomControl, uiEventStore, securityStore, }: {
|
|
15
|
-
roomControl:
|
|
15
|
+
roomControl: FcrMainRoomControl | FcrWaitingRoomControl;
|
|
16
16
|
uiEventStore: FcrUIEventStore;
|
|
17
17
|
securityStore: FcrSecurityStore;
|
|
18
18
|
});
|
|
@@ -23,7 +23,7 @@ window.__DEV_ENGINE_IS_READY__.then(/*#__PURE__*/(0, _asyncToGenerator2["default
|
|
|
23
23
|
engine = window.__DEV_ENGINE__;
|
|
24
24
|
roomId = window.__DEV_ROOM_ID__; // TODO: dev 环境需要 login
|
|
25
25
|
// await engine.login();
|
|
26
|
-
roomControl = engine.
|
|
26
|
+
roomControl = engine.createMainRoomControl(roomId);
|
|
27
27
|
uiEventStore = new _eventStore.FcrUIEventStore();
|
|
28
28
|
securityStore = new _securityStore.FcrSecurityStore(roomControl.getPrivilegeControl(), roomControl.getUserControl(), roomControl.getStreamControl(), roomControl.getRoomSessionControl(), uiEventStore); // TODO: dev 环境需要 join
|
|
29
29
|
// await roomControl.join({
|
|
@@ -62,13 +62,13 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
62
62
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
63
63
|
var _base = require("../../base");
|
|
64
64
|
require("./index.css");
|
|
65
|
-
var _store = _interopRequireDefault(require("./store"));
|
|
66
65
|
var _chat = require("./chat");
|
|
67
66
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
68
67
|
var _contex = require("./contex");
|
|
69
68
|
var _messageTextarea = require("agora-ui-foundation/lib/components/message-textarea");
|
|
70
69
|
var _chatWrapper = require("agora-ui-foundation/lib/components/chat-wrapper");
|
|
71
70
|
var _type = require("agora-edu-core/lib/room-control/chatroom-control/type");
|
|
71
|
+
var _store = _interopRequireDefault(require("./store"));
|
|
72
72
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
73
73
|
var _ChatUIModule;
|
|
74
74
|
var _initProto;
|
|
@@ -95,7 +95,8 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
95
95
|
chatRoomControl: _this._chatRoomControl,
|
|
96
96
|
userControl: roomControl.getUserControl(),
|
|
97
97
|
uiEventStore: uiEventStore,
|
|
98
|
-
securityStore: securityStore
|
|
98
|
+
securityStore: securityStore,
|
|
99
|
+
roomControl: roomControl
|
|
99
100
|
});
|
|
100
101
|
_this.sendMessage = _this.sendMessage.bind(_this);
|
|
101
102
|
_this.updateReadMsgIndex = _this.updateReadMsgIndex.bind(_this);
|
|
@@ -123,8 +124,9 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
123
124
|
_this2.sendMessage(imgData, _type.FcrChatRoomMessageType.Image);
|
|
124
125
|
});
|
|
125
126
|
},
|
|
126
|
-
userId: this._uid
|
|
127
|
-
isHost
|
|
127
|
+
userId: this._uid
|
|
128
|
+
// isHost={this._store.isHost}
|
|
129
|
+
,
|
|
128
130
|
singling: singling
|
|
129
131
|
})
|
|
130
132
|
});
|
|
@@ -141,19 +143,20 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
141
143
|
key: "sendMessage",
|
|
142
144
|
value: function () {
|
|
143
145
|
var _sendMessage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(msg, type) {
|
|
146
|
+
var _this$_store$chatRoom, _this$_store$chatRoom2;
|
|
144
147
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
145
148
|
while (1) switch (_context.prev = _context.next) {
|
|
146
149
|
case 0:
|
|
147
150
|
_context.prev = 0;
|
|
148
151
|
_context.next = 3;
|
|
149
|
-
return this._store.sendMessage(msg, type);
|
|
152
|
+
return (_this$_store$chatRoom = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom === void 0 ? void 0 : _this$_store$chatRoom.sendMessage(msg, type);
|
|
150
153
|
case 3:
|
|
151
154
|
_context.next = 8;
|
|
152
155
|
break;
|
|
153
156
|
case 5:
|
|
154
157
|
_context.prev = 5;
|
|
155
158
|
_context.t0 = _context["catch"](0);
|
|
156
|
-
this._store.handleToast({
|
|
159
|
+
(_this$_store$chatRoom2 = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom2 === void 0 || _this$_store$chatRoom2.handleToast({
|
|
157
160
|
id: 'send-msg',
|
|
158
161
|
toastProps: {
|
|
159
162
|
content: _context.t0.reason,
|
|
@@ -176,10 +179,11 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
176
179
|
key: "updateReadMsgIndex",
|
|
177
180
|
value: function () {
|
|
178
181
|
var _updateReadMsgIndex = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(data) {
|
|
182
|
+
var _this$_store$chatRoom3;
|
|
179
183
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
180
184
|
while (1) switch (_context2.prev = _context2.next) {
|
|
181
185
|
case 0:
|
|
182
|
-
this._store.updateReadMsgIndex(data);
|
|
186
|
+
(_this$_store$chatRoom3 = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom3 === void 0 || _this$_store$chatRoom3.updateReadMsgIndex(data);
|
|
183
187
|
case 1:
|
|
184
188
|
case "end":
|
|
185
189
|
return _context2.stop();
|
|
@@ -194,7 +198,8 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
194
198
|
}, {
|
|
195
199
|
key: "onUnload",
|
|
196
200
|
value: function onUnload() {
|
|
197
|
-
|
|
201
|
+
var _this$_store$chatRoom4;
|
|
202
|
+
(_this$_store$chatRoom4 = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom4 === void 0 || _this$_store$chatRoom4.release();
|
|
198
203
|
}
|
|
199
204
|
}]);
|
|
200
205
|
}(_base.UIModule);
|
|
@@ -70,6 +70,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
|
70
70
|
var _copyText = require("../../utilities/copyText");
|
|
71
71
|
var _platform = require("../../utilities/platform");
|
|
72
72
|
var _env = require("agora-foundation/lib/utilities/env");
|
|
73
|
+
var _fcr_defaultpage = _interopRequireDefault(require("../../../public/assets/fcr_defaultpage.png"));
|
|
73
74
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
74
75
|
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
76
|
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; }
|
|
@@ -95,39 +96,42 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
95
96
|
copyTips = _ref.copyTips;
|
|
96
97
|
var t = (0, _i18n.useI18n)();
|
|
97
98
|
var _useContext = (0, _react.useContext)(_contex.StoreContext),
|
|
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
|
-
|
|
99
|
+
chatRoomStores = _useContext.chatRoomStores,
|
|
100
|
+
activeTabIndex = _useContext.activeTabIndex;
|
|
101
|
+
var _ref2 = chatRoomStores[activeTabIndex],
|
|
102
|
+
storeMsgs = _ref2.messageList,
|
|
103
|
+
readMsgIndex = _ref2.readMsgIndex,
|
|
104
|
+
needCbBottomCount = _ref2.needCbBottomCount,
|
|
105
|
+
list = _ref2.list,
|
|
106
|
+
mostRecentHeight = _ref2.mostRecentHeight,
|
|
107
|
+
mostRecentWidth = _ref2.mostRecentWidth,
|
|
108
|
+
cache = _ref2.cache,
|
|
109
|
+
scrollHeight = _ref2.scrollHeight,
|
|
110
|
+
scrollTop = _ref2.scrollTop,
|
|
111
|
+
clientHeight = _ref2.clientHeight,
|
|
112
|
+
firstMsgId = _ref2.firstMsgId,
|
|
113
|
+
readIdx = _ref2.readIdx,
|
|
114
|
+
viewIdx = _ref2.viewIdx,
|
|
115
|
+
historyUnReadCount = _ref2.historyUnreadCount,
|
|
116
|
+
hasHistoryMsg = _ref2.hasHistoryMsg,
|
|
117
|
+
newMsgsUnReadCnt = _ref2.newMsgsUnReadCnt,
|
|
118
|
+
isHost = _ref2.isHost,
|
|
119
|
+
isCohost = _ref2.isCohost,
|
|
120
|
+
initReadInfo = _ref2.initReadInfo,
|
|
121
|
+
updateScrollInfo = _ref2.updateScrollInfo,
|
|
122
|
+
updateHasHistoryMsg = _ref2.updateHasHistoryMsg,
|
|
123
|
+
updateHistoryCnt = _ref2.updateHistoryUnreadCnt,
|
|
124
|
+
updateViewIdx = _ref2.updateViewIdx,
|
|
125
|
+
updateReadIdx = _ref2.updateReadIdx,
|
|
126
|
+
updateFirstMsgId = _ref2.updateFirstMsgId,
|
|
127
|
+
updateHistoryUnReadCount = _ref2.updateHistoryUnReadCount,
|
|
128
|
+
updateList = _ref2.updateList,
|
|
129
|
+
updateMostRecentHeight = _ref2.updateMostRecentHeight,
|
|
130
|
+
updateMostRecentWidth = _ref2.updateMostRecentWidth,
|
|
131
|
+
forceNotifyMsgs = _ref2.forceNotifyMsgs,
|
|
132
|
+
permitPrivateChat = _ref2.permitPrivateChat,
|
|
133
|
+
lastScrollTop = _ref2.lastScrollTop,
|
|
134
|
+
setLastScrollTop = _ref2.setLastScrollTop;
|
|
131
135
|
var _useState = (0, _react.useState)(storeMsgs !== null && storeMsgs !== void 0 ? storeMsgs : []),
|
|
132
136
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
133
137
|
messageList = _useState2[0],
|
|
@@ -207,7 +211,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
207
211
|
scrollToIdx(viewIdx);
|
|
208
212
|
}, [newMsgsUnReadCnt]);
|
|
209
213
|
var handleCopyMsg = /*#__PURE__*/function () {
|
|
210
|
-
var
|
|
214
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(msg, time, publisherNickName, targetNickname) {
|
|
211
215
|
var msgHandled;
|
|
212
216
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
213
217
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -224,7 +228,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
224
228
|
}, _callee);
|
|
225
229
|
}));
|
|
226
230
|
return function handleCopyMsg(_x, _x2, _x3, _x4) {
|
|
227
|
-
return
|
|
231
|
+
return _ref3.apply(this, arguments);
|
|
228
232
|
};
|
|
229
233
|
}();
|
|
230
234
|
var handleSelectMsg = function handleSelectMsg(idx, checked) {
|
|
@@ -245,12 +249,12 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
245
249
|
// list?.scrollToPosition(_scrollTop);
|
|
246
250
|
};
|
|
247
251
|
var rowRenderer = function rowRenderer(messageList) {
|
|
248
|
-
return function (
|
|
252
|
+
return function (_ref4) {
|
|
249
253
|
var _arr, _arr2, _arr3, _arr4, _datum$img;
|
|
250
|
-
var index =
|
|
251
|
-
key =
|
|
252
|
-
parent =
|
|
253
|
-
style =
|
|
254
|
+
var index = _ref4.index,
|
|
255
|
+
key = _ref4.key,
|
|
256
|
+
parent = _ref4.parent,
|
|
257
|
+
style = _ref4.style;
|
|
254
258
|
var datum = messageList[index % messageList.length];
|
|
255
259
|
var publisherRole = datum.role,
|
|
256
260
|
time = datum.time,
|
|
@@ -379,7 +383,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
379
383
|
width: 'auto'
|
|
380
384
|
},
|
|
381
385
|
onCopy: (/*#__PURE__*/function () {
|
|
382
|
-
var
|
|
386
|
+
var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(type) {
|
|
383
387
|
var currentScrollTop;
|
|
384
388
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
385
389
|
while (1) switch (_context2.prev = _context2.next) {
|
|
@@ -410,7 +414,7 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
410
414
|
}, _callee2);
|
|
411
415
|
}));
|
|
412
416
|
return function (_x5) {
|
|
413
|
-
return
|
|
417
|
+
return _ref5.apply(this, arguments);
|
|
414
418
|
};
|
|
415
419
|
}()),
|
|
416
420
|
onPrivate: function onPrivate() {
|
|
@@ -576,13 +580,20 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
576
580
|
styles: {
|
|
577
581
|
zIndex: 999
|
|
578
582
|
}
|
|
579
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.
|
|
583
|
+
}) : null, messageList.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
584
|
+
className: "fcr-no-data-chat",
|
|
585
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
586
|
+
src: _fcr_defaultpage["default"]
|
|
587
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
588
|
+
children: t('fmt_chat_tips_nodata')
|
|
589
|
+
})]
|
|
590
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactVirtualized.AutoSizer, {
|
|
580
591
|
style: {
|
|
581
592
|
alignSelf: 'stretch'
|
|
582
593
|
},
|
|
583
|
-
children: function children(
|
|
584
|
-
var height =
|
|
585
|
-
width =
|
|
594
|
+
children: function children(_ref6) {
|
|
595
|
+
var height = _ref6.height,
|
|
596
|
+
width = _ref6.width;
|
|
586
597
|
if (height !== mostRecentHeight || width !== mostRecentWidth) {
|
|
587
598
|
cache.clearAll();
|
|
588
599
|
if (list) {
|
|
@@ -592,8 +603,8 @@ var MessageList = exports.MessageList = (0, _mobxReact.observer)(function (_ref)
|
|
|
592
603
|
updateMostRecentHeight(height);
|
|
593
604
|
updateMostRecentWidth(width);
|
|
594
605
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactVirtualized.List, {
|
|
595
|
-
ref: function ref(
|
|
596
|
-
updateList(
|
|
606
|
+
ref: function ref(_ref7) {
|
|
607
|
+
updateList(_ref7);
|
|
597
608
|
},
|
|
598
609
|
style: {
|
|
599
610
|
padding: 'inherit',
|
|
@@ -4,9 +4,13 @@ import { FcrUserRole, FcrUserInfo } from 'agora-edu-core/lib/type';
|
|
|
4
4
|
import { FcrUIEventStore } from '../../common/event-store';
|
|
5
5
|
import { FcrSecurityStore } from '../../common/security-store';
|
|
6
6
|
import { CellMeasurerCache, List } from 'react-virtualized';
|
|
7
|
+
import { RoomType } from '../../utilities/constant';
|
|
7
8
|
import { AllowChatLevelType } from 'agora-ui-foundation/lib/components/chat-manager';
|
|
8
9
|
import { ToastConfig } from 'agora-ui-foundation/lib/components/toast';
|
|
9
|
-
import { FcrChatRoomConnectionState, FcrChatRoomControl, FcrChatRoomFile, FcrChatRoomMessageType } from 'agora-edu-core/lib/room-control/chatroom-control/type';
|
|
10
|
+
import { FcrChatRoomConnectionState, FcrChatRoomControl, FcrChatRoomFile, FcrChatRoomMessageType, FcrChatRoomReceiveImageMessage, FcrChatRoomReceiveTextMessage } from 'agora-edu-core/lib/room-control/chatroom-control/type';
|
|
11
|
+
import { FcrMainRoomControl, FcrWaitingRoomControl } from 'agora-edu-core/lib/room-control/type';
|
|
12
|
+
import { AgoraObservable } from 'agora-foundation/lib/utilities/observable';
|
|
13
|
+
type FcrChatRoomReceiveMessage = FcrChatRoomReceiveTextMessage | FcrChatRoomReceiveImageMessage;
|
|
10
14
|
export interface MsgListType {
|
|
11
15
|
id: string;
|
|
12
16
|
nickName: string;
|
|
@@ -25,7 +29,35 @@ export declare const USER_ALL = "All";
|
|
|
25
29
|
export declare const USER_NONE = "NONE";
|
|
26
30
|
export declare const allToUser: FcrUserInfo;
|
|
27
31
|
export declare const noUser: FcrUserInfo;
|
|
32
|
+
type FcrChatStoreObserver = {
|
|
33
|
+
onReceiveMessage: (msgs: FcrChatRoomReceiveMessage[], type: RoomType) => void;
|
|
34
|
+
};
|
|
35
|
+
type ChatRoomStoreMap = {
|
|
36
|
+
[K in RoomType]?: ChatRoomStore;
|
|
37
|
+
};
|
|
38
|
+
type RoomTypeKeys = keyof typeof RoomType;
|
|
28
39
|
export default class ChatStore {
|
|
40
|
+
private _observable;
|
|
41
|
+
private _securityStore;
|
|
42
|
+
private _uiEventStore;
|
|
43
|
+
private _chatVisible;
|
|
44
|
+
private _eventObserver;
|
|
45
|
+
private _chatStoreObserver;
|
|
46
|
+
accessor chatRoomStores: ChatRoomStoreMap;
|
|
47
|
+
accessor activeTabIndex: RoomTypeKeys;
|
|
48
|
+
constructor({ chatRoomControl, userControl, uiEventStore, securityStore, roomControl, }: {
|
|
49
|
+
chatRoomControl: FcrChatRoomControl;
|
|
50
|
+
userControl: FcrUserControl;
|
|
51
|
+
uiEventStore: FcrUIEventStore;
|
|
52
|
+
securityStore: FcrSecurityStore;
|
|
53
|
+
roomControl: FcrWaitingRoomControl | FcrMainRoomControl;
|
|
54
|
+
});
|
|
55
|
+
hasWaitingRoomPermission(): boolean;
|
|
56
|
+
private _handleReceiveMessage;
|
|
57
|
+
handlerActiveTab(key: RoomType): void;
|
|
58
|
+
private _handleEvent;
|
|
59
|
+
}
|
|
60
|
+
export declare class ChatRoomStore {
|
|
29
61
|
needCbBottomCount: number;
|
|
30
62
|
list: List | undefined;
|
|
31
63
|
mostRecentHeight: number;
|
|
@@ -45,9 +77,11 @@ export default class ChatStore {
|
|
|
45
77
|
private _userControl;
|
|
46
78
|
private _chatRoomControl;
|
|
47
79
|
private _securityStore;
|
|
80
|
+
private _chatStoreObservable;
|
|
48
81
|
private _maxMsgCount;
|
|
49
82
|
private _originalMessages;
|
|
50
83
|
private _disposers;
|
|
84
|
+
private _type;
|
|
51
85
|
private accessor _userInfo;
|
|
52
86
|
accessor messageList: MsgListType[];
|
|
53
87
|
accessor readMsgIndex: {
|
|
@@ -65,20 +99,28 @@ export default class ChatStore {
|
|
|
65
99
|
accessor textMsg: string;
|
|
66
100
|
accessor privateTargetList: FcrUserInfo[];
|
|
67
101
|
accessor chatRoomState: FcrChatRoomConnectionState;
|
|
102
|
+
accessor hasNewMsg: boolean;
|
|
103
|
+
accessor userCount: number;
|
|
104
|
+
accessor unReadMsgCount: number;
|
|
68
105
|
private _chatRoomObserver;
|
|
69
106
|
private _userObserver;
|
|
70
|
-
constructor({ chatRoomControl, userControl, uiEventStore, securityStore, }: {
|
|
107
|
+
constructor({ chatRoomControl, userControl, uiEventStore, securityStore, type, chatStoreObservable, }: {
|
|
71
108
|
chatRoomControl: FcrChatRoomControl;
|
|
72
109
|
userControl: FcrUserControl;
|
|
73
110
|
uiEventStore: FcrUIEventStore;
|
|
74
111
|
securityStore: FcrSecurityStore;
|
|
112
|
+
type: RoomType;
|
|
113
|
+
chatStoreObservable: AgoraObservable<FcrChatStoreObserver>;
|
|
75
114
|
});
|
|
76
115
|
release(): void;
|
|
77
116
|
setLastScrollTop(value: number | undefined): void;
|
|
78
117
|
setMessageList(messages: MsgListType[]): void;
|
|
79
118
|
sendMessage(msg: string | FcrChatRoomFile, type: FcrChatRoomMessageType): Promise<void>;
|
|
80
119
|
private messageReceived;
|
|
120
|
+
setUnReadMsgCount(count: number): void;
|
|
121
|
+
setHasNewMsg(value: boolean): void;
|
|
81
122
|
private _handleTextMessageReceived;
|
|
123
|
+
getUserCount(): number;
|
|
82
124
|
private _onRemoteUserUpdate;
|
|
83
125
|
private _onUserPropertiesUpdated;
|
|
84
126
|
private _onUserInfoUpdated;
|
|
@@ -94,6 +136,7 @@ export default class ChatStore {
|
|
|
94
136
|
get disallowedPublicChatAndDisallowedPrivateChatToParticipant(): boolean | undefined;
|
|
95
137
|
get disallowedAllChat(): boolean | undefined;
|
|
96
138
|
get hasChatPermission(): boolean;
|
|
139
|
+
get hasChatSendPrivatePermission(): boolean;
|
|
97
140
|
get isHost(): boolean;
|
|
98
141
|
get isCohost(): boolean;
|
|
99
142
|
get localIsManager(): boolean;
|
|
@@ -121,6 +164,8 @@ export default class ChatStore {
|
|
|
121
164
|
updateChatLevel(chatLevel: AllowChatLevelType): void;
|
|
122
165
|
get privilegeOperator(): FcrUserInfo | undefined;
|
|
123
166
|
updateChatTextMsg(txt: string): void;
|
|
167
|
+
filterChatMember(list: FcrUserInfo[]): FcrUserInfo[];
|
|
168
|
+
hasSendMessagePermission(): boolean;
|
|
124
169
|
permitPrivateChat(userId: string): void;
|
|
125
170
|
handleToast(params: ToastConfig): void;
|
|
126
171
|
get isHostOrCoHost(): boolean;
|
|
@@ -130,3 +175,4 @@ export default class ChatStore {
|
|
|
130
175
|
}
|
|
131
176
|
export declare function isManager(role: FcrUserRole): role is FcrUserRole.HOST | FcrUserRole.COHOST;
|
|
132
177
|
export declare function sortUsers(users: FcrUserInfo[]): FcrUserInfo[];
|
|
178
|
+
export {};
|