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
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,67 @@
|
|
|
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 _react = require("react");
|
|
9
|
+
var _context = require("./context");
|
|
10
|
+
var _localVideoPlayer = require("agora-ui-foundation/lib/components/local-video-player");
|
|
11
|
+
require("./index.css");
|
|
12
|
+
var _mobxReact = require("mobx-react");
|
|
13
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var View = (0, _mobxReact.observer)(function () {
|
|
16
|
+
var t = (0, _i18n.useI18n)();
|
|
17
|
+
var _useContext = (0, _react.useContext)(_context.StoreContext),
|
|
18
|
+
stateBar = _useContext.stateBar,
|
|
19
|
+
actionBar = _useContext.actionBar,
|
|
20
|
+
chat = _useContext.chat,
|
|
21
|
+
cameraDeviceId = _useContext.cameraId,
|
|
22
|
+
startPlayLocalVideo = _useContext.startPlayLocalVideo,
|
|
23
|
+
stopPlayLocalVideo = _useContext.stopPlayLocalVideo,
|
|
24
|
+
cameraEnabled = _useContext.cameraEnabled,
|
|
25
|
+
localUser = _useContext.localUser;
|
|
26
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
27
|
+
className: "waiting-room-layout",
|
|
28
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
29
|
+
className: "waiting-room-module",
|
|
30
|
+
children: stateBar
|
|
31
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
32
|
+
className: "waiting-room-title",
|
|
33
|
+
children: t('fmt_waitingroom_attendie_overview_label_waitingroom')
|
|
34
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
35
|
+
className: "waiting-room-desc",
|
|
36
|
+
children: t('fmt_waitingroom_attendie_overview_label_wait_moment')
|
|
37
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
38
|
+
className: "waiting-room-content",
|
|
39
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
40
|
+
className: "waiting-room-video-content",
|
|
41
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_localVideoPlayer.LocalVideoPlayer, {
|
|
42
|
+
isLocalMirrorEnabled: false,
|
|
43
|
+
userName: localUser.userName,
|
|
44
|
+
showSlider: false,
|
|
45
|
+
cameraDeviceId: cameraDeviceId,
|
|
46
|
+
showCameraPreview: cameraEnabled,
|
|
47
|
+
showTopTips: false,
|
|
48
|
+
startLocalVideo: startPlayLocalVideo,
|
|
49
|
+
stopLocalVideo: stopPlayLocalVideo
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
51
|
+
className: "waiting-room-attendee-name",
|
|
52
|
+
children: [localUser.userName, /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
53
|
+
className: "attendee__me-badge",
|
|
54
|
+
children: ["(", t('fmt_participant_label_Me'), ")"]
|
|
55
|
+
})]
|
|
56
|
+
})]
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
58
|
+
className: "waiting-room-chat-content",
|
|
59
|
+
children: chat
|
|
60
|
+
})]
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
62
|
+
className: "waiting-room-module waiting-room-bottom",
|
|
63
|
+
children: actionBar
|
|
64
|
+
})]
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
var _default = exports["default"] = View;
|
|
@@ -32,12 +32,6 @@ var Whiteboard = exports.Whiteboard = (0, _mobxReact.observer)(function () {
|
|
|
32
32
|
handleClose = _useContext2.handleClose,
|
|
33
33
|
handleOpen = _useContext2.handleOpen;
|
|
34
34
|
var loading = connectionState === _agoraEduCore.FcrConnectionState.CONNECTING || connectionState === _agoraEduCore.FcrConnectionState.RECONNECTING;
|
|
35
|
-
(0, _react.useEffect)(function () {
|
|
36
|
-
handleOpen();
|
|
37
|
-
return function () {
|
|
38
|
-
handleClose();
|
|
39
|
-
};
|
|
40
|
-
}, []);
|
|
41
35
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
42
36
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
43
37
|
className: "board-widget-app",
|
|
@@ -17,10 +17,14 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
var MultiWindowWidgetDialog = exports.MultiWindowWidgetDialog = (0, _mobxReact.observer)(function (_ref) {
|
|
18
18
|
var children = _ref.children;
|
|
19
19
|
var _useContext = (0, _react.useContext)(_context.BoardUIContext),
|
|
20
|
-
connectionState = _useContext.observables.connectionState
|
|
20
|
+
connectionState = _useContext.observables.connectionState,
|
|
21
|
+
setWhiteboardVisible = _useContext.setWhiteboardVisible;
|
|
21
22
|
var _useContext2 = (0, _react.useContext)(_boardContext["default"]),
|
|
22
23
|
showToolbar = _useContext2.showToolbar;
|
|
23
24
|
var showControlbar = connectionState === _agoraEduCore.FcrConnectionState.CONNECTED;
|
|
25
|
+
var handleCancel = function handleCancel() {
|
|
26
|
+
setWhiteboardVisible(false);
|
|
27
|
+
};
|
|
24
28
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
25
29
|
className: "fcr-widget-dialog-zindex-wrapper fcr-widget-dialog",
|
|
26
30
|
children: [showControlbar && showToolbar && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -28,6 +32,7 @@ var MultiWindowWidgetDialog = exports.MultiWindowWidgetDialog = (0, _mobxReact.o
|
|
|
28
32
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_controlBar.WhiteboardControlbar, {})
|
|
29
33
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
34
|
className: "fcr-widget-dialog-content",
|
|
35
|
+
onClick: handleCancel,
|
|
31
36
|
children: children
|
|
32
37
|
})]
|
|
33
38
|
});
|
|
@@ -21,7 +21,8 @@ var ProgressElectronDialog = (0, _mobxReact.observer)(function (_ref) {
|
|
|
21
21
|
fullscreen: false,
|
|
22
22
|
maximizable: false,
|
|
23
23
|
width: 290,
|
|
24
|
-
height: 60
|
|
24
|
+
height: 60,
|
|
25
|
+
transparent: true
|
|
25
26
|
});
|
|
26
27
|
return function () {
|
|
27
28
|
(0, _reactDom.unmountComponentAtNode)(node);
|
|
@@ -30,6 +30,10 @@
|
|
|
30
30
|
background: var(--fcr_web_ui_scene_fill4_popup);
|
|
31
31
|
color: var(--fcr_ui_scene_icontext1);
|
|
32
32
|
}
|
|
33
|
+
.whiteboard-switch-theme_item-active {
|
|
34
|
+
background-color: var(--fcr_ui_scene_ramp_brand6);
|
|
35
|
+
}
|
|
36
|
+
|
|
33
37
|
.whiteboard-switch-theme_item-close {
|
|
34
38
|
width: 30px;
|
|
35
39
|
height: 30px;
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
require("core-js/modules/es.array.find.js");
|
|
10
10
|
require("core-js/modules/es.array.map.js");
|
|
11
11
|
require("core-js/modules/es.object.to-string.js");
|
|
@@ -14,7 +14,6 @@ require("core-js/modules/esnext.async-iterator.map.js");
|
|
|
14
14
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
15
15
|
require("core-js/modules/esnext.iterator.find.js");
|
|
16
16
|
require("core-js/modules/esnext.iterator.map.js");
|
|
17
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
18
17
|
var _icon = require("agora-ui-foundation/lib/components/icon");
|
|
19
18
|
var _type = require("agora-ui-foundation/lib/components/icon/type");
|
|
20
19
|
var _popover = require("agora-ui-foundation/lib/components/popover");
|
|
@@ -24,15 +23,21 @@ var _libs = _interopRequireDefault(require("./libs"));
|
|
|
24
23
|
var _react = require("react");
|
|
25
24
|
var _store = require("../toolbar/store");
|
|
26
25
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
26
|
+
var _context = require("../../context");
|
|
27
|
+
var _mobxReact = require("mobx-react");
|
|
27
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
|
-
|
|
29
|
+
var WhiteboardSwitchTheme = (0, _mobxReact.observer)(function () {
|
|
29
30
|
var _useContext = (0, _react.useContext)(_store.ToolbarContext),
|
|
30
|
-
setTheme = _useContext.setTheme
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
setTheme = _useContext.setTheme,
|
|
32
|
+
currentThemeType = _useContext.observables.currentThemeType;
|
|
33
|
+
// const [visible, setVisible] = useState(false);
|
|
34
|
+
var _useContext2 = (0, _react.useContext)(_context.BoardUIContext),
|
|
35
|
+
whiteboardVisible = _useContext2.observables.whiteboardVisible,
|
|
36
|
+
setWhiteboardVisible = _useContext2.setWhiteboardVisible;
|
|
35
37
|
var t = (0, _i18n.useI18n)();
|
|
38
|
+
var handleCancel = function handleCancel() {
|
|
39
|
+
setWhiteboardVisible(false);
|
|
40
|
+
};
|
|
36
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.FcrPopover, {
|
|
37
42
|
trigger: "click",
|
|
38
43
|
overlayClassName: "whiteboard-switch-theme-popover",
|
|
@@ -40,7 +45,7 @@ function WhiteboardSwitchTheme() {
|
|
|
40
45
|
width: '100%'
|
|
41
46
|
},
|
|
42
47
|
overlayOffset: 2,
|
|
43
|
-
visible:
|
|
48
|
+
visible: whiteboardVisible,
|
|
44
49
|
content: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
45
50
|
className: "whiteboard-switch-theme",
|
|
46
51
|
children: [(0, _libs["default"])(t).map(function (theme, idx) {
|
|
@@ -48,19 +53,18 @@ function WhiteboardSwitchTheme() {
|
|
|
48
53
|
colors: theme.showColors,
|
|
49
54
|
title: theme.title,
|
|
50
55
|
theme: theme.theme,
|
|
56
|
+
isActive: currentThemeType.theme === theme.theme,
|
|
51
57
|
onClick: function onClick(theme) {
|
|
52
58
|
var result = (0, _libs["default"])(t).find(function (item) {
|
|
53
59
|
return item.theme === theme.theme;
|
|
54
60
|
});
|
|
55
61
|
setTheme(result);
|
|
56
|
-
|
|
62
|
+
setWhiteboardVisible(false);
|
|
57
63
|
}
|
|
58
64
|
}, theme.theme);
|
|
59
65
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
60
66
|
className: "whiteboard-switch-theme_item-close",
|
|
61
|
-
onClick:
|
|
62
|
-
return setVisible(false);
|
|
63
|
-
},
|
|
67
|
+
onClick: handleCancel,
|
|
64
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
65
69
|
size: 20,
|
|
66
70
|
type: _type.FcrIconType.FCR_CLOSE,
|
|
@@ -77,8 +81,9 @@ function WhiteboardSwitchTheme() {
|
|
|
77
81
|
iconPrimary: 'var(--fcr_ui_scene_icontext1)'
|
|
78
82
|
},
|
|
79
83
|
onClick: function onClick() {
|
|
80
|
-
return
|
|
84
|
+
return setWhiteboardVisible(!whiteboardVisible);
|
|
81
85
|
}
|
|
82
86
|
})
|
|
83
87
|
});
|
|
84
|
-
}
|
|
88
|
+
});
|
|
89
|
+
var _default = exports["default"] = WhiteboardSwitchTheme;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -9,13 +10,19 @@ require("core-js/modules/es.array.concat.js");
|
|
|
9
10
|
require("core-js/modules/es.array.map.js");
|
|
10
11
|
require("core-js/modules/esnext.async-iterator.map.js");
|
|
11
12
|
require("core-js/modules/esnext.iterator.map.js");
|
|
13
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
15
|
function WhiteboardSwitchThemeItem(props) {
|
|
14
16
|
var title = props.title,
|
|
15
17
|
colors = props.colors,
|
|
16
|
-
theme = props.theme
|
|
18
|
+
theme = props.theme,
|
|
19
|
+
_props$isActive = props.isActive,
|
|
20
|
+
isActive = _props$isActive === void 0 ? false : _props$isActive;
|
|
21
|
+
var cls = (0, _classnames["default"])('whiteboard-switch-theme_item', {
|
|
22
|
+
'whiteboard-switch-theme_item-active': isActive
|
|
23
|
+
});
|
|
17
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
18
|
-
className:
|
|
25
|
+
className: cls,
|
|
19
26
|
onClick: function onClick() {
|
|
20
27
|
return props.onClick({
|
|
21
28
|
colors: colors,
|
|
@@ -73,19 +73,23 @@ var ShapePickerPanel = (0, _mobxReact.observer)(function () {
|
|
|
73
73
|
type: _type.FcrBoardShape.Ellipse,
|
|
74
74
|
icon: _type2.FcrIconType.FCR_WHITEBOARD_SHAP_CIRCLE,
|
|
75
75
|
tip: t('fmt_whiteboard_tips_circle')
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
},
|
|
77
|
+
// {
|
|
78
|
+
// type: FcrBoardShape.Pentagram,
|
|
79
|
+
// icon: FcrIconType.FCR_WHITEBOARD_SHAP_STAR,
|
|
80
|
+
// tip: t('fmt_whiteboard_label_pentagon'),
|
|
81
|
+
// },
|
|
82
|
+
{
|
|
81
83
|
type: _type.FcrBoardShape.Triangle,
|
|
82
84
|
icon: _type2.FcrIconType.FCR_WHITEBOARD_SHAP_TRIANGLE,
|
|
83
85
|
tip: t('fmt_whiteboard_tips_triangle')
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
},
|
|
87
|
+
// {
|
|
88
|
+
// type: FcrBoardShape.Rhombus,
|
|
89
|
+
// icon: FcrIconType.FCR_WHITEBOARD_SHAP_REHUMBUS,
|
|
90
|
+
// tip: t('fmt_whiteboard_label_prismatic'),
|
|
91
|
+
// },
|
|
92
|
+
{
|
|
89
93
|
type: _type.FcrBoardShape.Straight,
|
|
90
94
|
icon: _type2.FcrIconType.FCR_WHITEBOARD_SHAP_LINE,
|
|
91
95
|
tip: t('fmt_whiteboard_tips_straight')
|
|
@@ -51,6 +51,8 @@ var _mobx = require("mobx");
|
|
|
51
51
|
var _type = require("../../type");
|
|
52
52
|
var _react = require("react");
|
|
53
53
|
var _rendererEvent = require("../../../../utilities/renderer-event");
|
|
54
|
+
var _libs = _interopRequireDefault(require("../switch-theme/libs"));
|
|
55
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
54
56
|
var _ToolbarStore;
|
|
55
57
|
var _initProto, _init_observables;
|
|
56
58
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -72,6 +74,7 @@ var ToolbarStore = exports.ToolbarStore = /*#__PURE__*/function () {
|
|
|
72
74
|
currentShape: undefined,
|
|
73
75
|
currentColor: '',
|
|
74
76
|
currentStrokeWidth: 0,
|
|
77
|
+
currentThemeType: (0, _libs["default"])(_i18n.transI18n)[0],
|
|
75
78
|
toolbarPosition: {
|
|
76
79
|
x: 0,
|
|
77
80
|
y: 0
|
|
@@ -32,6 +32,7 @@ declare const boardUIContextDefault: {
|
|
|
32
32
|
};
|
|
33
33
|
progress: number;
|
|
34
34
|
writeEnabled: boolean;
|
|
35
|
+
whiteboardVisible: boolean;
|
|
35
36
|
};
|
|
36
37
|
handleBoardDomLoad: (ref: HTMLDivElement | null) => void;
|
|
37
38
|
handleCollectorDomLoad: (ref: HTMLDivElement | null) => void;
|
|
@@ -39,6 +40,7 @@ declare const boardUIContextDefault: {
|
|
|
39
40
|
handleOpen: () => void;
|
|
40
41
|
setPrivilege: (canOperate: boolean) => void;
|
|
41
42
|
setWriteEnable: (enable: boolean) => void;
|
|
43
|
+
setWhiteboardVisible: (visible: boolean) => void;
|
|
42
44
|
};
|
|
43
45
|
export declare const BoardUIContext: React.Context<{
|
|
44
46
|
observables: {
|
|
@@ -54,6 +56,7 @@ export declare const BoardUIContext: React.Context<{
|
|
|
54
56
|
};
|
|
55
57
|
progress: number;
|
|
56
58
|
writeEnabled: boolean;
|
|
59
|
+
whiteboardVisible: boolean;
|
|
57
60
|
};
|
|
58
61
|
handleBoardDomLoad: (ref: HTMLDivElement | null) => void;
|
|
59
62
|
handleCollectorDomLoad: (ref: HTMLDivElement | null) => void;
|
|
@@ -61,6 +64,7 @@ export declare const BoardUIContext: React.Context<{
|
|
|
61
64
|
handleOpen: () => void;
|
|
62
65
|
setPrivilege: (canOperate: boolean) => void;
|
|
63
66
|
setWriteEnable: (enable: boolean) => void;
|
|
67
|
+
setWhiteboardVisible: (visible: boolean) => void;
|
|
64
68
|
}>;
|
|
65
69
|
export type BoardUIContextValue = typeof boardUIContextDefault;
|
|
66
70
|
export {};
|
|
@@ -22,13 +22,15 @@ var boardUIContextDefault = {
|
|
|
22
22
|
top: 0
|
|
23
23
|
},
|
|
24
24
|
progress: 0,
|
|
25
|
-
writeEnabled: false
|
|
25
|
+
writeEnabled: false,
|
|
26
|
+
whiteboardVisible: false
|
|
26
27
|
},
|
|
27
28
|
handleBoardDomLoad: function handleBoardDomLoad(ref) {},
|
|
28
29
|
handleCollectorDomLoad: function handleCollectorDomLoad(ref) {},
|
|
29
30
|
handleClose: function handleClose() {},
|
|
30
31
|
handleOpen: function handleOpen() {},
|
|
31
32
|
setPrivilege: function setPrivilege(canOperate) {},
|
|
32
|
-
setWriteEnable: function setWriteEnable(enable) {}
|
|
33
|
+
setWriteEnable: function setWriteEnable(enable) {},
|
|
34
|
+
setWhiteboardVisible: function setWhiteboardVisible(visible) {}
|
|
33
35
|
};
|
|
34
36
|
var BoardUIContext = exports.BoardUIContext = /*#__PURE__*/(0, _react.createContext)(boardUIContextDefault);
|
|
@@ -123,6 +123,7 @@ var _libs = _interopRequireDefault(require("./components/switch-theme/libs"));
|
|
|
123
123
|
var _types = require("agora-edu-core/lib/room-control/whiteboard-control/types");
|
|
124
124
|
var _type3 = require("../layout/type");
|
|
125
125
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
126
|
+
var _type4 = require("agora-ui-foundation/lib/components/icon/type");
|
|
126
127
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
127
128
|
var _FcrWhiteboardUIModule;
|
|
128
129
|
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _boardUIEventsDecs, _createToolbarUIContextDecs, _repositionToolbarDecs, _updateRedoDecs, _updateUndoDecs, _setConnectionStateDecs, _getSnapshotImageDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _ref;
|
|
@@ -526,6 +527,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
526
527
|
});
|
|
527
528
|
this._ownerUser = undefined;
|
|
528
529
|
this._initialized = false;
|
|
530
|
+
this._close();
|
|
529
531
|
}
|
|
530
532
|
this._mounted = false;
|
|
531
533
|
if (this._timer) clearTimeout(this._timer);
|
|
@@ -576,7 +578,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
576
578
|
value: function _checkBoard() {
|
|
577
579
|
if (!this._initialized) {
|
|
578
580
|
this._open();
|
|
579
|
-
this._initialized = true;
|
|
580
581
|
}
|
|
581
582
|
}
|
|
582
583
|
}, {
|
|
@@ -588,18 +589,22 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
588
589
|
_this2._boardDom = ref;
|
|
589
590
|
if (_this2._boardDom) {
|
|
590
591
|
_this2.mount();
|
|
592
|
+
} else {
|
|
593
|
+
_this2._mounted = false;
|
|
591
594
|
}
|
|
592
595
|
},
|
|
593
596
|
handleCollectorDomLoad: function handleCollectorDomLoad(ref) {
|
|
594
597
|
_this2._collectorDom = ref;
|
|
595
598
|
},
|
|
596
599
|
handleClose: function handleClose() {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
+
// this._close();
|
|
601
|
+
// this._isActive = false;
|
|
602
|
+
// this.unmount();
|
|
603
|
+
// console.log('whiteboard close');
|
|
600
604
|
},
|
|
601
605
|
handleOpen: function handleOpen() {
|
|
602
|
-
|
|
606
|
+
// console.log('whiteboard open');
|
|
607
|
+
// !this._initialized && this._open();
|
|
603
608
|
},
|
|
604
609
|
setPrivilege: function setPrivilege(canOperate) {
|
|
605
610
|
observables.canOperate = canOperate;
|
|
@@ -608,6 +613,9 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
608
613
|
observables.writeEnabled = enable;
|
|
609
614
|
observables.canOperate = enable;
|
|
610
615
|
_this2._repositionToolbar();
|
|
616
|
+
},
|
|
617
|
+
setWhiteboardVisible: function setWhiteboardVisible(visible) {
|
|
618
|
+
observables.whiteboardVisible = visible;
|
|
611
619
|
}
|
|
612
620
|
};
|
|
613
621
|
}
|
|
@@ -701,7 +709,8 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
701
709
|
connectionState: this._connectionState,
|
|
702
710
|
joinSuccessed: this._joinSuccessed,
|
|
703
711
|
progress: 0,
|
|
704
|
-
writeEnabled: this._isHost
|
|
712
|
+
writeEnabled: this._isHost,
|
|
713
|
+
whiteboardVisible: false
|
|
705
714
|
});
|
|
706
715
|
return _objectSpread({
|
|
707
716
|
observables: observables
|
|
@@ -784,6 +793,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
784
793
|
setTheme: (0, _mobx.action)(function (theme) {
|
|
785
794
|
_this4._setBackgroundColor(theme.background);
|
|
786
795
|
observables.colors = theme.colors;
|
|
796
|
+
observables.currentThemeType = theme;
|
|
787
797
|
}),
|
|
788
798
|
setCommonColor: (0, _mobx.action)(function (color) {
|
|
789
799
|
if (observables.commonColors.length < 2) observables.commonColors.push(color);
|
|
@@ -923,6 +933,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
923
933
|
value: function _open() {
|
|
924
934
|
var _this$_whiteboardCont4;
|
|
925
935
|
this._joined = true;
|
|
936
|
+
this._initialized = true;
|
|
926
937
|
(_this$_whiteboardCont4 = this._whiteboardControl) === null || _this$_whiteboardCont4 === void 0 || _this$_whiteboardCont4.open();
|
|
927
938
|
}
|
|
928
939
|
}, {
|
|
@@ -1009,6 +1020,9 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
1009
1020
|
if (state === _agoraEduCore.FcrConnectionState.DISCONNECTED) {
|
|
1010
1021
|
if (_this6._joined) {
|
|
1011
1022
|
(_this6$_whiteboardCon = _this6._whiteboardControl) === null || _this6$_whiteboardCon === void 0 || _this6$_whiteboardCon.open();
|
|
1023
|
+
} else {
|
|
1024
|
+
_this6.unmount();
|
|
1025
|
+
_this6.unload();
|
|
1012
1026
|
}
|
|
1013
1027
|
}
|
|
1014
1028
|
if (state === _agoraEduCore.FcrConnectionState.CONNECTED) {
|
|
@@ -1075,6 +1089,8 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
1075
1089
|
title: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard'),
|
|
1076
1090
|
content: (_type2.FcrUserRole.HOST === userRole ? (0, _i18n.transI18n)('fmt_role_host') : _type2.FcrUserRole.COHOST === userRole ? (0, _i18n.transI18n)('fmt_role_cohost') : '') + "".concat(userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare')),
|
|
1077
1091
|
okText: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_button_gotit'),
|
|
1092
|
+
showCancel: false,
|
|
1093
|
+
icon: _type4.FcrIconType.FCR_SCREENSHARING,
|
|
1078
1094
|
onOk: function onOk() {
|
|
1079
1095
|
_this8._uiEventStore.closeDialog(dialogId);
|
|
1080
1096
|
},
|
|
@@ -155,14 +155,16 @@ window.__DEV_ENGINE_IS_READY__ = createRoom(roomId).then(/*#__PURE__*/function (
|
|
|
155
155
|
bitrate: 400
|
|
156
156
|
},
|
|
157
157
|
enableDualStreamMode: false
|
|
158
|
+
},
|
|
159
|
+
parameters: {
|
|
160
|
+
rte: {
|
|
161
|
+
rteIpList: ['http://api-solutions-dev.bj2.agoralab.co']
|
|
162
|
+
},
|
|
163
|
+
core: {
|
|
164
|
+
coreIpList: ['http://api-solutions-dev.bj2.agoralab.co']
|
|
165
|
+
}
|
|
158
166
|
}
|
|
159
167
|
});
|
|
160
|
-
var params = {
|
|
161
|
-
rte: {
|
|
162
|
-
restfulApiHost: 'http://api-solutions-dev.bj2.agoralab.co'
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
window.__DEV_ENGINE__.setParameters(params);
|
|
166
168
|
window.__DEV_ROOM_ID__ = roomId;
|
|
167
169
|
window.__DEV_USER_ID__ = userId;
|
|
168
170
|
window.__DEV_USER_ROLE__ = role;
|
package/lib/runtime.d.ts
CHANGED