fcr-ui-scene 3.7.6 → 3.7.7-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/lib/creator/index.js +12 -6
  2. package/lib/creator/provider-initializer.browser.js +0 -3
  3. package/lib/creator/provider-initializer.electron.js +0 -4
  4. package/lib/electron/bootstrap-sdk.js +70 -20
  5. package/lib/electron/struct.d.ts +7 -1
  6. package/lib/electron/struct.js +8 -1
  7. package/lib/electron/until.d.ts +3 -1
  8. package/lib/electron/until.js +7 -2
  9. package/lib/modules/action-bar/components/item/index.js +1 -0
  10. package/lib/modules/action-bar/components/screen-share/submenu.js +1 -1
  11. package/lib/modules/chat/index.css +5 -1
  12. package/lib/modules/chat/view.js +6 -1
  13. package/lib/modules/components/control-bar/components/switch-theme/index.css +2 -0
  14. package/lib/modules/components/control-bar/components/switch-theme/index.js +5 -7
  15. package/lib/modules/components/control-bar/index.js +26 -7
  16. package/lib/modules/components/toolbar/components/capture-tool/index.d.ts +0 -1
  17. package/lib/modules/components/toolbar/components/capture-tool/index.js +1 -2
  18. package/lib/modules/components/toolbar/components/vertical-frame/index.js +2 -2
  19. package/lib/modules/components/toolbar/hooks/use-resize-visible.js +43 -42
  20. package/lib/modules/components/toolbar/index.js +6 -24
  21. package/lib/modules/control-bar/components/cloud-recording-buttons.d.ts +3 -0
  22. package/lib/modules/control-bar/components/cloud-recording-buttons.js +65 -3
  23. package/lib/modules/control-bar/store.js +11 -6
  24. package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -0
  25. package/lib/modules/dialog/components/dialog-container/component/body.js +3 -2
  26. package/lib/modules/dialog/components/dialog-container/index.css +1 -1
  27. package/lib/modules/dialog/components/dialog-container/index.d.ts +1 -0
  28. package/lib/modules/dialog/components/dialog-container/index.js +4 -1
  29. package/lib/modules/dialog/components/normal-window/index.d.ts +1 -0
  30. package/lib/modules/dialog/components/normal-window/index.js +3 -1
  31. package/lib/modules/dialog/dialogs/chat/index.js +2 -1
  32. package/lib/modules/dialog/dialogs/control-bar-leave-meeting/index.js +0 -1
  33. package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +1 -0
  34. package/lib/modules/dialog/dialogs/end-meeting/index.js +2 -1
  35. package/lib/modules/dialog/dialogs/participant/index.js +2 -1
  36. package/lib/modules/layout/store.electron.js +1 -1
  37. package/lib/modules/secondary-window/store.d.ts +0 -1
  38. package/lib/modules/secondary-window/store.js +9 -22
  39. package/lib/modules/secondary-window/view.js +6 -5
  40. package/lib/modules/setting/index.css +0 -1
  41. package/lib/modules/setting/store.base.js +6 -0
  42. package/lib/modules/setting/view.js +0 -3
  43. package/lib/modules/share-screen/store.electron.js +1 -1
  44. package/lib/modules/state-bar/layout-config.js +6 -0
  45. package/lib/modules/state-bar/main-scene/store.base.d.ts +2 -0
  46. package/lib/modules/state-bar/main-scene/store.base.js +6 -0
  47. package/lib/modules/video-window/index.css +6 -0
  48. package/lib/modules/video-window/popover-watcher.d.ts +4 -1
  49. package/lib/modules/video-window/popover-watcher.js +15 -2
  50. package/lib/modules/video-window/store.d.ts +18 -1
  51. package/lib/modules/video-window/store.js +55 -7
  52. package/lib/modules/whiteboard/store.js +20 -2
  53. package/lib/object-manager.d.ts +0 -1
  54. package/lib/object-manager.js +0 -1
  55. package/lib/providers/board-share/bar-control/base.d.ts +1 -1
  56. package/lib/providers/board-share/bar-control/base.js +37 -28
  57. package/lib/providers/board-share/bar-control/electron.d.ts +1 -1
  58. package/lib/providers/board-share/bar-control/electron.js +19 -16
  59. package/lib/providers/board-share/provider.browser.d.ts +3 -0
  60. package/lib/providers/board-share/provider.browser.js +21 -3
  61. package/lib/providers/device-provider.js +5 -1
  62. package/lib/providers/dialog/provider.electron.js +6 -0
  63. package/lib/providers/mouse-detect/provider.d.ts +5 -0
  64. package/lib/providers/mouse-detect/provider.js +74 -49
  65. package/lib/providers/multi-display-provider.d.ts +3 -5
  66. package/lib/providers/multi-display-provider.js +0 -9
  67. package/lib/providers/room-provider/room-provider.d.ts +3 -14
  68. package/lib/providers/room-provider/room-provider.js +5 -26
  69. package/lib/providers/screen-share/stream-state-sync.js +19 -12
  70. package/lib/providers/window/main-window.d.ts +0 -5
  71. package/lib/providers/window/main-window.js +0 -44
  72. package/lib/providers/window/renderer-window.d.ts +1 -0
  73. package/lib/providers/window/renderer-window.js +9 -1
  74. package/lib/scenes/main-scene.js +0 -2
  75. package/lib/ui-scene.js +4 -2
  76. package/package.json +5 -5
  77. package/public/index.html +22 -1
  78. package/lib/providers/board-share/bar-control.d.ts +0 -51
  79. package/lib/providers/board-share/bar-control.js +0 -390
@@ -60,18 +60,14 @@ var WhiteboardToolbar = exports.WhiteboardToolbar = function WhiteboardToolbar(p
60
60
  onCaptureScreen = props.onCaptureScreen,
61
61
  setProgress = props.setProgress;
62
62
  var t = (0, _i18n.useI18n)();
63
- var _useState = (0, _react.useState)(false),
63
+ var _useState = (0, _react.useState)('right'),
64
64
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
65
- popoverVisible = _useState2[0],
66
- setPopoverVisible = _useState2[1];
67
- var _useState3 = (0, _react.useState)('right'),
65
+ placement = _useState2[0],
66
+ setPlacement = _useState2[1];
67
+ var _useState3 = (0, _react.useState)(-1),
68
68
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
69
- placement = _useState4[0],
70
- setPlacement = _useState4[1];
71
- var _useState5 = (0, _react.useState)(-1),
72
- _useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
73
- coverCount = _useState6[0],
74
- setCoverCount = _useState6[1];
69
+ coverCount = _useState4[0],
70
+ setCoverCount = _useState4[1];
75
71
  var effects = [coverCount, currentTool, currentColor, currentShape, currentStrokeWidth, commonColors, undoSteps, redoSteps, placement];
76
72
  var needHiddenTools = (0, _react.useMemo)(function () {
77
73
  return [/*#__PURE__*/(0, _jsxRuntime.jsx)(_graphicTool.AnnotationGraphicTool, {
@@ -88,9 +84,6 @@ var WhiteboardToolbar = exports.WhiteboardToolbar = function WhiteboardToolbar(p
88
84
  direction: direction
89
85
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.AnnotationToolItem, {
90
86
  size: size,
91
- onVisibleChange: function onVisibleChange() {
92
- return setPopoverVisible(false);
93
- },
94
87
  active: currentTool === _enums.FcrBoardToolType.TEXT,
95
88
  onClick: function onClick() {
96
89
  return setTool(_enums.FcrBoardToolType.TEXT);
@@ -101,9 +94,6 @@ var WhiteboardToolbar = exports.WhiteboardToolbar = function WhiteboardToolbar(p
101
94
  placement: placement
102
95
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.AnnotationToolItem, {
103
96
  size: size,
104
- onVisibleChange: function onVisibleChange() {
105
- return setPopoverVisible(false);
106
- },
107
97
  active: currentTool === _enums.FcrBoardToolType.HAND,
108
98
  onClick: function onClick() {
109
99
  return setTool(_enums.FcrBoardToolType.HAND);
@@ -122,9 +112,6 @@ var WhiteboardToolbar = exports.WhiteboardToolbar = function WhiteboardToolbar(p
122
112
  direction: direction
123
113
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.AnnotationToolItem, {
124
114
  size: size,
125
- onVisibleChange: function onVisibleChange() {
126
- return setPopoverVisible(false);
127
- },
128
115
  active: currentTool === _enums.FcrBoardToolType.ERASER,
129
116
  onClick: function onClick() {
130
117
  return setTool(_enums.FcrBoardToolType.ERASER);
@@ -134,8 +121,6 @@ var WhiteboardToolbar = exports.WhiteboardToolbar = function WhiteboardToolbar(p
134
121
  hideTitle: true,
135
122
  placement: placement
136
123
  }), (0, _env.isElectron)() && onCaptureScreen && commonColors && /*#__PURE__*/(0, _jsxRuntime.jsx)(_captureTool.AnnotationCaptureTool, {
137
- popoverVisible: popoverVisible,
138
- setPopoverVisible: setPopoverVisible,
139
124
  size: size,
140
125
  direction: direction,
141
126
  hideTitle: true,
@@ -143,9 +128,6 @@ var WhiteboardToolbar = exports.WhiteboardToolbar = function WhiteboardToolbar(p
143
128
  onClick: onCaptureScreen
144
129
  }), !commonColors && /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.AnnotationToolItem, {
145
130
  size: size,
146
- onVisibleChange: function onVisibleChange() {
147
- return setPopoverVisible(false);
148
- },
149
131
  onClick: clean,
150
132
  iconType: _type.FcrIconType.FCR_DELETE5,
151
133
  title: t('fmt_screenshare_whiteboard_button_empty'),
@@ -1 +1,4 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { StopCloudRecordingProps } from '../../action-bar/type';
1
3
  export declare const CloudRecordingButtons: () => import("react/jsx-runtime").JSX.Element;
4
+ export declare const StopCloudRecording: ({ stopCloudRecording, children }: PropsWithChildren<StopCloudRecordingProps>) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,12 @@
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
  });
7
- exports.CloudRecordingButtons = void 0;
8
+ exports.StopCloudRecording = exports.CloudRecordingButtons = void 0;
9
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
8
10
  var _mobxReact = require("mobx-react");
9
11
  var _react = require("react");
10
12
  var _type = require("fcr-core/lib/type");
@@ -12,8 +14,10 @@ var _icon = require("agora-ui-foundation/lib/components/icon");
12
14
  var _type2 = require("agora-ui-foundation/lib/components/icon/type");
13
15
  var _tooltip = require("agora-ui-foundation/lib/components/tooltip");
14
16
  var _store = require("../store");
15
- var _stopRecordDialog = require("../../action-bar/components/record/stop-record-dialog");
16
17
  var _i18n = require("agora-ui-foundation/lib/i18n");
18
+ var _boundaryDetector = require("./boundary-detector");
19
+ var _popover = require("agora-ui-foundation/lib/components/popover");
20
+ var _context = require("../context");
17
21
  var _jsxRuntime = require("react/jsx-runtime");
18
22
  var CloudRecordingButtons = exports.CloudRecordingButtons = (0, _mobxReact.observer)(function () {
19
23
  var _useContext = (0, _react.useContext)(_store.StoreContext),
@@ -50,7 +54,7 @@ var CloudRecordingButtons = exports.CloudRecordingButtons = (0, _mobxReact.obser
50
54
  }
51
55
  })
52
56
  })
53
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_stopRecordDialog.StopCloudRecording, {
57
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(StopCloudRecording, {
54
58
  stopCloudRecording: stopCloudRecording,
55
59
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
56
60
  mouseEnterDelay: 0,
@@ -67,4 +71,62 @@ var CloudRecordingButtons = exports.CloudRecordingButtons = (0, _mobxReact.obser
67
71
  })
68
72
  })]
69
73
  });
74
+ });
75
+
76
+ // TODO: 删除重复的 StopCloudRecording 组件
77
+ var StopCloudRecording = exports.StopCloudRecording = (0, _mobxReact.observer)(function (_ref) {
78
+ var stopCloudRecording = _ref.stopCloudRecording,
79
+ children = _ref.children;
80
+ var _useContext2 = (0, _react.useContext)(_store.StoreContext),
81
+ setPopoverArea = _useContext2.setPopoverArea;
82
+ var _useState = (0, _react.useState)(false),
83
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
84
+ visible = _useState2[0],
85
+ setVisible = _useState2[1];
86
+ var transI18n = (0, _i18n.useI18n)();
87
+ var handleBoundariesChanged = (0, _react.useCallback)(function (boundaries) {
88
+ setPopoverArea(boundaries);
89
+ }, []);
90
+ var _useContext3 = (0, _react.useContext)(_context.ControlBarCalculationContext),
91
+ isShareActionNavHidden = _useContext3.isShareActionNavHidden;
92
+ (0, _react.useEffect)(function () {
93
+ if (isShareActionNavHidden) {
94
+ setVisible(false);
95
+ setPopoverArea({
96
+ x: 0,
97
+ y: 0,
98
+ width: 0,
99
+ height: 0
100
+ });
101
+ }
102
+ }, [isShareActionNavHidden]);
103
+ var content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_boundaryDetector.BoundaryDetector, {
104
+ onBoundariesChanged: handleBoundariesChanged,
105
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
106
+ className: "leave-container",
107
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
108
+ className: "leave-title",
109
+ children: transI18n('fmt_actionbar_record_tips_stoprecord')
110
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
111
+ className: "leave-confirm",
112
+ onClick: stopCloudRecording,
113
+ children: transI18n('fmt_actionbar_record_option_stoprecord')
114
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
115
+ className: "leave-cancel",
116
+ onClick: function onClick() {
117
+ return setVisible(false);
118
+ },
119
+ children: transI18n('fmt_security_buttons_cancel')
120
+ })]
121
+ })
122
+ });
123
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_popover.FcrPopover, {
124
+ showArrow: false,
125
+ overlayClassName: "fcr-stop-cloud-recording-popover",
126
+ visible: visible,
127
+ onVisibleChange: setVisible,
128
+ trigger: "click",
129
+ content: content,
130
+ children: children
131
+ });
70
132
  });
@@ -149,13 +149,17 @@ var ControlBarStore = exports["default"] = /*#__PURE__*/function () {
149
149
  }
150
150
  });
151
151
  (0, _defineProperty2["default"])(this, "_mouseDetectObserver", {
152
- onMouseEnterDetectArea: function onMouseEnterDetectArea() {
153
- _this._controlBarWindow.setIgnoreMouseEvents(false);
152
+ onMouseEnterDetectArea: function onMouseEnterDetectArea(areaId) {
153
+ if (areaId === _struct.FcrUIDetectAreaID.ControlBar) {
154
+ _this._controlBarWindow.setIgnoreMouseEvents(false);
155
+ }
154
156
  },
155
- onMouseLeaveDetectArea: function onMouseLeaveDetectArea() {
156
- _this._controlBarWindow.setIgnoreMouseEvents(true, {
157
- forward: true
158
- });
157
+ onMouseLeaveDetectArea: function onMouseLeaveDetectArea(areaId) {
158
+ if (areaId === _struct.FcrUIDetectAreaID.ControlBar) {
159
+ _this._controlBarWindow.setIgnoreMouseEvents(true, {
160
+ forward: true
161
+ });
162
+ }
159
163
  }
160
164
  });
161
165
  (0, _defineProperty2["default"])(this, "_stateNavArea", {
@@ -622,6 +626,7 @@ var ControlBarStore = exports["default"] = /*#__PURE__*/function () {
622
626
  this._mainRoomControl.removeObserver(this._roomObserver);
623
627
  this._screenShareProvider.removeObserver(this._screenShareObserver);
624
628
  this._mouseDetectProvider.removeObserver(this._mouseDetectObserver);
629
+ this._mouseDetectProvider.deleteDetectArea(_struct.FcrUIDetectAreaID.ControlBar);
625
630
  }
626
631
  }, {
627
632
  key: "setStateNavArea",
@@ -6,6 +6,7 @@ type DialogBodyProps = PropsWithChildren<{
6
6
  autoHeight: boolean;
7
7
  closable: boolean;
8
8
  onClose?: () => void;
9
+ hasSystemShadow?: boolean;
9
10
  }>;
10
11
  export declare const DialogContainerBody: FC<DialogBodyProps>;
11
12
  export {};
@@ -14,7 +14,8 @@ var DialogContainerBody = exports.DialogContainerBody = function DialogContainer
14
14
  children = _ref.children,
15
15
  onClose = _ref.onClose,
16
16
  autoHeight = _ref.autoHeight,
17
- closable = _ref.closable;
17
+ closable = _ref.closable,
18
+ hasSystemShadow = _ref.hasSystemShadow;
18
19
  // const { bind } = useContext(DialogContainerStore);
19
20
 
20
21
  // const { resizable } = isElectron() ? useContext(DialogInstanceContext) : { resizable: false };
@@ -38,7 +39,7 @@ var DialogContainerBody = exports.DialogContainerBody = function DialogContainer
38
39
  } : {};
39
40
  var hasClose = closable;
40
41
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
41
- className: "fcr-dialog-container ".concat(!resizable && 'fcr-dialog-container_shadow'),
42
+ className: "fcr-dialog-container ".concat(!hasSystemShadow && 'fcr-dialog-container_shadow'),
42
43
  onClick: function onClick(e) {
43
44
  return e.stopPropagation();
44
45
  },
@@ -92,7 +92,7 @@
92
92
  cursor: pointer;
93
93
  -webkit-app-region: no-drag;
94
94
  text-align: center;
95
- line-height: 13px;
95
+ line-height: 14px;
96
96
  }
97
97
 
98
98
  .fcr-dialog-container-close span {
@@ -17,6 +17,7 @@ type DialogContainerProps = PropsWithChildren<{
17
17
  maxHeight?: number;
18
18
  minWidth?: number;
19
19
  minHeight?: number;
20
+ hasSystemShadow?: boolean;
20
21
  }>;
21
22
  export declare const DialogContainer: FC<DialogContainerProps>;
22
23
  export {};
@@ -52,13 +52,15 @@ var DialogContainer = exports.DialogContainer = (0, _mobxReact.observer)(functio
52
52
  maxWidth = _ref.maxWidth,
53
53
  maxHeight = _ref.maxHeight,
54
54
  minWidth = _ref.minWidth,
55
- minHeight = _ref.minHeight;
55
+ minHeight = _ref.minHeight,
56
+ hasSystemShadow = _ref.hasSystemShadow;
56
57
  var dialogBody = /*#__PURE__*/(0, _jsxRuntime.jsx)(_body.DialogContainerBody, {
57
58
  title: title,
58
59
  actions: actions,
59
60
  autoHeight: autoHeight !== null && autoHeight !== void 0 ? autoHeight : true,
60
61
  closable: closable !== null && closable !== void 0 ? closable : true,
61
62
  onClose: _onClose,
63
+ hasSystemShadow: hasSystemShadow,
62
64
  children: children
63
65
  });
64
66
  if ((0, _env.isElectron)()) return dialogBody;
@@ -107,6 +109,7 @@ var DialogContainer = exports.DialogContainer = (0, _mobxReact.observer)(functio
107
109
  };
108
110
  };
109
111
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRnd.Rnd, {
112
+ dragHandleClassName: 'fcr-dialog-container-header',
110
113
  style: _objectSpread({
111
114
  position: 'absolute',
112
115
  touchAction: 'none',
@@ -17,6 +17,7 @@ type FcrUIDialogProps = {
17
17
  minHeight?: number;
18
18
  maxWidth?: number;
19
19
  maxHeight?: number;
20
+ hasSystemShadow?: boolean;
20
21
  };
21
22
  export declare const NormalWindow: FC<FcrUIDialogProps>;
22
23
  export {};
@@ -26,7 +26,8 @@ var NormalWindow = exports.NormalWindow = (0, _mobxReact.observer)(function (_re
26
26
  minWidth = _ref.minWidth,
27
27
  minHeight = _ref.minHeight,
28
28
  maxWidth = _ref.maxWidth,
29
- maxHeight = _ref.maxHeight;
29
+ maxHeight = _ref.maxHeight,
30
+ hasSystemShadow = _ref.hasSystemShadow;
30
31
  var _useContext = (0, _react.useContext)(_store.StoreContext),
31
32
  getDialogRootNode = _useContext.getDialogRootNode,
32
33
  handleDialogClose = _useContext.handleDialogClose;
@@ -46,6 +47,7 @@ var NormalWindow = exports.NormalWindow = (0, _mobxReact.observer)(function (_re
46
47
  maxWidth: maxWidth,
47
48
  maxHeight: maxHeight,
48
49
  autoHeight: autoHeight,
50
+ hasSystemShadow: hasSystemShadow,
49
51
  children: body
50
52
  });
51
53
  if ((0, _env.isElectron)()) {
@@ -57,7 +57,8 @@ var ChatDialog = exports.ChatDialog = (0, _mobxReact.observer)(function (_ref) {
57
57
  zIndex: 11
58
58
  },
59
59
  width: width,
60
- height: height
60
+ height: height,
61
+ hasSystemShadow: true
61
62
  });
62
63
  });
63
64
  var windowConfig = exports.windowConfig = {
@@ -17,7 +17,6 @@ var ControlBarLeaveMeetingDialog = exports.ControlBarLeaveMeetingDialog = functi
17
17
  height: 172
18
18
  };
19
19
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_normalWindow.NormalWindow, {
20
- closable: false,
21
20
  dialogId: dialogId,
22
21
  dialogKey: dialogKey,
23
22
  width: config.width,
@@ -9,4 +9,5 @@ export declare const windowConfig: {
9
9
  fullscreen: false;
10
10
  maximizable: false;
11
11
  resizable: false;
12
+ alwaysOnTop: true;
12
13
  };
@@ -50,5 +50,6 @@ var windowConfig = exports.windowConfig = {
50
50
  height: 340,
51
51
  fullscreen: false,
52
52
  maximizable: false,
53
- resizable: false
53
+ resizable: false,
54
+ alwaysOnTop: true
54
55
  };
@@ -54,6 +54,7 @@ var ParticipantDialog = exports.ParticipantDialog = function ParticipantDialog(_
54
54
  minWidth: windowConfig.minWidth,
55
55
  minHeight: windowConfig.minHeight,
56
56
  maxWidth: windowConfig.maxWidth,
57
- maxHeight: windowConfig.maxHeight
57
+ maxHeight: windowConfig.maxHeight,
58
+ hasSystemShadow: true
58
59
  });
59
60
  };
@@ -98,7 +98,7 @@ var LayoutStoreElectron = exports["default"] = /*#__PURE__*/function (_LayoutSto
98
98
  if (sharingBySelf && isSharingScreen) {
99
99
  _this._dialogProvider.closeDialog(_constant.FcrUIDialogKey.VIDEO_WINDOW);
100
100
  _this._multiDisplayProvider.showMainWindowInIndexLeastDisplay({
101
- maximize: true
101
+ isMaximized: true
102
102
  });
103
103
  } else {
104
104
  _this._multiDisplayProvider.setMainWindowMaximize();
@@ -21,7 +21,6 @@ export declare class SecondaryWindowStore {
21
21
  private _diffScalcValue;
22
22
  private accessor _screenShareScalcValue;
23
23
  accessor isSharingWhiteboard: boolean;
24
- accessor iframeLoaded: boolean;
25
24
  accessor interceptedClose: boolean;
26
25
  get secondaryWindowContentType(): "speaker" | "gallery" | "hidden" | "local-camera" | "remote-camera" | "sharing-screen" | "sharing-screen-with-annotation" | "sharing-whiteboard";
27
26
  get videoWindowData(): VideoWindowDataReturn<typeof this.secondaryWindowContentType>;
@@ -65,7 +65,7 @@ var _type2 = require("../layout/type");
65
65
  var _objectManager = require("../../object-manager");
66
66
  var _type3 = require("../../providers/dialog/type");
67
67
  var _SecondaryWindowStore;
68
- var _initProto, _init__screenShareScalcValue, _init_isSharingWhiteboard, _init_iframeLoaded, _init_interceptedClose;
68
+ var _initProto, _init__screenShareScalcValue, _init_isSharingWhiteboard, _init_interceptedClose;
69
69
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
70
70
  function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
71
71
  function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
@@ -79,7 +79,6 @@ function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side
79
79
  var _A = /*#__PURE__*/new WeakMap();
80
80
  var _B = /*#__PURE__*/new WeakMap();
81
81
  var _C = /*#__PURE__*/new WeakMap();
82
- var _D = /*#__PURE__*/new WeakMap();
83
82
  var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function () {
84
83
  function SecondaryWindowStore(_ref) {
85
84
  var _this = this;
@@ -103,8 +102,7 @@ var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function
103
102
  (0, _defineProperty2["default"])(this, "_diffScalcValue", 0.5);
104
103
  _classPrivateFieldInitSpec(this, _A, _init__screenShareScalcValue(this, 1));
105
104
  _classPrivateFieldInitSpec(this, _B, _init_isSharingWhiteboard(this, false));
106
- _classPrivateFieldInitSpec(this, _C, _init_iframeLoaded(this, false));
107
- _classPrivateFieldInitSpec(this, _D, _init_interceptedClose(this, false));
105
+ _classPrivateFieldInitSpec(this, _C, _init_interceptedClose(this, false));
108
106
  (0, _defineProperty2["default"])(this, "_handleSecondaryWindowClosed", function (dialogKey) {
109
107
  if (dialogKey !== _constant.FcrUIDialogKey.SUB_WINDOW) {
110
108
  return false;
@@ -160,21 +158,13 @@ var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function
160
158
  _classPrivateFieldSet(_B, this, v);
161
159
  }
162
160
  }, {
163
- key: "iframeLoaded",
161
+ key: "interceptedClose",
164
162
  get: function get() {
165
163
  return _classPrivateFieldGet(_C, this);
166
164
  },
167
165
  set: function set(v) {
168
166
  _classPrivateFieldSet(_C, this, v);
169
167
  }
170
- }, {
171
- key: "interceptedClose",
172
- get: function get() {
173
- return _classPrivateFieldGet(_D, this);
174
- },
175
- set: function set(v) {
176
- _classPrivateFieldSet(_D, this, v);
177
- }
178
168
  }, {
179
169
  key: "secondaryWindowContentType",
180
170
  get: function get() {
@@ -272,17 +262,17 @@ var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function
272
262
  }, {
273
263
  key: "connectionState",
274
264
  get: function get() {
275
- return this._boardShareProvider.connectionState;
265
+ return this._boardShareProvider.boardBarControl.connectionState;
276
266
  }
277
267
  }, {
278
268
  key: "showLoading",
279
269
  get: function get() {
280
- return this._boardShareProvider.loading;
270
+ return this._boardShareProvider.boardBarControl.showLoading;
281
271
  }
282
272
  }, {
283
273
  key: "joinSuccess",
284
274
  get: function get() {
285
- return this._boardShareProvider.joined;
275
+ return this._boardShareProvider.boardBarControl.joinSuccess;
286
276
  }
287
277
  }, {
288
278
  key: "isMyBoard",
@@ -342,7 +332,6 @@ var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function
342
332
  iframe === null || iframe === void 0 || iframe.addEventListener('load', function () {
343
333
  iframe.style.width = '100%';
344
334
  iframe.style.height = '100%';
345
- _this2.iframeLoaded = true;
346
335
  if (!iframe.contentWindow) {
347
336
  _this2.logger.error('Iframe has no contentWindow');
348
337
  return;
@@ -499,16 +488,14 @@ var SecondaryWindowStore = exports.SecondaryWindowStore = /*#__PURE__*/function
499
488
  }, {
500
489
  key: "_closeSecondaryWindow",
501
490
  value: function _closeSecondaryWindow() {
502
- this.iframeLoaded = false;
503
491
  this._dialogProvider.closeDialog(_constant.FcrUIDialogKey.SUB_WINDOW);
504
492
  }
505
493
  }]);
506
494
  }();
507
495
  _SecondaryWindowStore = SecondaryWindowStore;
508
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_SecondaryWindowStore, [[_mobx.observable, 1, "_screenShareScalcValue"], [_mobx.observable, 1, "isSharingWhiteboard"], [_mobx.observable, 1, "iframeLoaded"], [_mobx.observable, 1, "interceptedClose"], [_mobx.computed, 3, "videoWindowData"], [_mobx.computed, 3, "isAspectRatioPreserved"], [_mobx.computed, 3, "scalValue"], [_decorator.bound, 2, "handleIframeLoad"], [_decorator.bound, 2, "zoomIn"], [_decorator.bound, 2, "zoomOut"], [_decorator.bound, 2, "fullContainer"], [_decorator.bound, 2, "setInterceptedClose"], [_decorator.bound, 2, "setScaleValue"], [_decorator.bound, 2, "setOriginScalc"], [_decorator.bound, 2, "setSpeakerViewSize"], [_decorator.bound, 2, "setWhiteboardTool"], [_decorator.bound, 2, "saveWhiteboardDraft"], [_decorator.bound, 2, "setProgress"], [_decorator.bound, 2, "setTheme"], [_decorator.bound, 2, "setControlEnable"], [_decorator.bound, 2, "setShowLoading"], [_decorator.bound, 2, "setCommonColors"], [_decorator.bound, 2, "log"]], []).e, 5);
496
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_SecondaryWindowStore, [[_mobx.observable, 1, "_screenShareScalcValue"], [_mobx.observable, 1, "isSharingWhiteboard"], [_mobx.observable, 1, "interceptedClose"], [_mobx.computed, 3, "videoWindowData"], [_mobx.computed, 3, "isAspectRatioPreserved"], [_mobx.computed, 3, "scalValue"], [_decorator.bound, 2, "handleIframeLoad"], [_decorator.bound, 2, "zoomIn"], [_decorator.bound, 2, "zoomOut"], [_decorator.bound, 2, "fullContainer"], [_decorator.bound, 2, "setInterceptedClose"], [_decorator.bound, 2, "setScaleValue"], [_decorator.bound, 2, "setOriginScalc"], [_decorator.bound, 2, "setSpeakerViewSize"], [_decorator.bound, 2, "setWhiteboardTool"], [_decorator.bound, 2, "saveWhiteboardDraft"], [_decorator.bound, 2, "setProgress"], [_decorator.bound, 2, "setTheme"], [_decorator.bound, 2, "setControlEnable"], [_decorator.bound, 2, "setShowLoading"], [_decorator.bound, 2, "setCommonColors"], [_decorator.bound, 2, "log"]], []).e, 4);
509
497
  _init__screenShareScalcValue = _applyDecs$e[0];
510
498
  _init_isSharingWhiteboard = _applyDecs$e[1];
511
- _init_iframeLoaded = _applyDecs$e[2];
512
- _init_interceptedClose = _applyDecs$e[3];
513
- _initProto = _applyDecs$e[4];
499
+ _init_interceptedClose = _applyDecs$e[2];
500
+ _initProto = _applyDecs$e[3];
514
501
  var SecondaryWindowStoreContext = exports.SecondaryWindowStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -48,7 +48,6 @@ var SubWindowView = exports.SubWindowView = (0, _mobxReact.observer)(function (p
48
48
  isShowToolbar = store.isShowToolbar,
49
49
  isActive = store.isActive,
50
50
  baseUrl = store.baseUrl,
51
- iframeLoaded = store.iframeLoaded,
52
51
  setOriginScalc = store.setOriginScalc,
53
52
  zoomIn = store.zoomIn,
54
53
  zoomOut = store.zoomOut,
@@ -105,7 +104,7 @@ var SubWindowView = exports.SubWindowView = (0, _mobxReact.observer)(function (p
105
104
  var content = null;
106
105
  if (isBoardShare) {
107
106
  content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
108
- children: [showLoading && !iframeLoaded && /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
107
+ children: [showLoading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
109
108
  joined: joinSuccess,
110
109
  connectionState: connectionState,
111
110
  canOperate: canWriteBoard,
@@ -115,7 +114,7 @@ var SubWindowView = exports.SubWindowView = (0, _mobxReact.observer)(function (p
115
114
  }), toolbarState.progress > 0 && toolbarState.progress < 100 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_progress["default"], {
116
115
  title: "".concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_downloading'), "..."),
117
116
  progress: toolbarState.progress
118
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_controlBar.WhiteboardControlbar, {
117
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_controlBar.WhiteboardControlbar, {
119
118
  onClose: function onClose() {},
120
119
  onEnable: function onEnable(enable) {
121
120
  setControlEnable(enable);
@@ -128,7 +127,9 @@ var SubWindowView = exports.SubWindowView = (0, _mobxReact.observer)(function (p
128
127
  sharingType: 'whiteboard',
129
128
  ownerUserName: videoWindowData.userName,
130
129
  isMyBoard: isActive && store.isMyBoard,
131
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("iframe", {
130
+ children: [!isShowToolbar && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
131
+ className: "whiteboard-action-prevent"
132
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("iframe", {
132
133
  ref: handleIframeLoad,
133
134
  allow: "webview",
134
135
  src: "".concat(baseUrl, "/whiteboard.html?type=whiteboard"),
@@ -136,7 +137,7 @@ var SubWindowView = exports.SubWindowView = (0, _mobxReact.observer)(function (p
136
137
  width: '100vw',
137
138
  height: 'calc(100vh - 28px)'
138
139
  }
139
- })
140
+ })]
140
141
  })]
141
142
  });
142
143
  } else {
@@ -34,7 +34,6 @@
34
34
  width: 100%;
35
35
  min-width: 580px;
36
36
  height: 100%;
37
- cursor: default;
38
37
  }
39
38
 
40
39
  .fcr-device-settings__nav {
@@ -1123,6 +1123,12 @@ var SettingStoreBase = exports.SettingStoreBase = /*#__PURE__*/function () {
1123
1123
  this._currentRoomControl = undefined;
1124
1124
  this._interpreterRoomControl = undefined;
1125
1125
  this._deviceProvider.removeObserver(this._deviceProviderObserver);
1126
+ this.localAudioStreamMap.clear();
1127
+ this.remoteAudioStreamMap.clear();
1128
+ this.localVideoStreamMap.clear();
1129
+ this.remoteVideoStreamMap.clear();
1130
+ this._streamVolumeMap.clear();
1131
+ this._streamInfoList.clear();
1126
1132
  }
1127
1133
  }, {
1128
1134
  key: "_onNetworkStatsUpdated",
@@ -111,9 +111,6 @@ var DeviceSettingsView = exports.DeviceSettingsView = (0, _mobxReact.observer)(f
111
111
  }];
112
112
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
113
113
  className: ns.b(),
114
- onMouseDown: function onMouseDown(e) {
115
- return e.stopPropagation();
116
- },
117
114
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
118
115
  className: ns.e('nav'),
119
116
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
@@ -182,7 +182,7 @@ var ElectronShareScreenStore = exports["default"] = /*#__PURE__*/function (_Shar
182
182
  }, {
183
183
  key: "_interceptDialogClose",
184
184
  value: function _interceptDialogClose(dialogKey) {
185
- if (dialogKey === _constant.FcrUIDialogKey.SHARE_SCREEN_CONTROL_BAR || dialogKey === _constant.FcrUIDialogKey.VIDEO_WINDOW) {
185
+ if (dialogKey === _constant.FcrUIDialogKey.SHARE_SCREEN_CONTROL_BAR) {
186
186
  return this._isSharing;
187
187
  }
188
188
  return false;
@@ -115,6 +115,12 @@ var LayoutConfig = exports.LayoutConfig = (0, _mobxReact.observer)(function (pro
115
115
  return _type.FcrIconType.FCR_TOPWINDOWS;
116
116
  }
117
117
  }, [layoutView]);
118
+ (0, _react.useEffect)(function () {
119
+ // 布局切换功能被禁用时,如果布局切换弹窗已经处于打开状态,则关闭弹窗
120
+ if (disable && isOpen) {
121
+ _setIsOpen(false);
122
+ }
123
+ }, [disable]);
118
124
  var handleSetLayoutView = function handleSetLayoutView(view) {
119
125
  _setIsOpen(false);
120
126
  toggleLayout(view);
@@ -9,7 +9,9 @@ export declare abstract class StateBarMainSceneStoreBase extends StateBarStoreBa
9
9
  private _sharedVideoWindowDataSource;
10
10
  private _sharedMemberDataSource;
11
11
  private _abilityProvider;
12
+ private _screenShareProvider;
12
13
  constructor(args: StateBarStoreArgs);
14
+ get isSharingScreen(): boolean;
13
15
  get localUser(): import("fcr-core/lib/type").FcrUserInfo;
14
16
  get isUserHost(): boolean;
15
17
  get isRoomDetailSupported(): boolean;
@@ -76,10 +76,16 @@ var StateBarMainSceneStoreBase = exports.StateBarMainSceneStoreBase = /*#__PURE_
76
76
  _this._sharedMemberDataSource = args.objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_MEMBER_DATA_SOURCE);
77
77
  _this._abilityProvider = args.objectManager.getObject(_objectManager.FcrUIObjectKeys.P_ABILITY_PROVIDER);
78
78
  _this._sharedVideoWindowDataSource = args.objectManager.getObject(_objectManager.FcrUIObjectKeys.S_SHARED_VIDEO_WINDOW_DATA_SOURCE);
79
+ _this._screenShareProvider = args.objectManager.getObject(_objectManager.FcrUIObjectKeys.P_SCREEN_SHARE_PROVIDER);
79
80
  return _this;
80
81
  }
81
82
  (0, _inherits2["default"])(StateBarMainSceneStoreBase, _StateBarStoreBase);
82
83
  return (0, _createClass2["default"])(StateBarMainSceneStoreBase, [{
84
+ key: "isSharingScreen",
85
+ get: function get() {
86
+ return this._screenShareProvider.isLocalUserScreenSharing || this._screenShareProvider.isRemoteUserScreenSharing;
87
+ }
88
+ }, {
83
89
  key: "localUser",
84
90
  get: function get() {
85
91
  return this._sharedMemberDataSource.localUser;
@@ -13,3 +13,9 @@
13
13
  border-radius: 0 !important;
14
14
  background: transparent !important;
15
15
  }
16
+
17
+ /* 供 popover-watcher 使用 */
18
+ #fcr-video-window-diaolog-wrapper_popover-align-right {
19
+ --video-window-popover-left: 0px;
20
+ left: var(--video-window-popover-left) !important;
21
+ }
@@ -4,6 +4,9 @@
4
4
  */
5
5
  export declare function usePopoverWatcher({ rootDom, setVideoWindowSize, resetVideoWindowSize, }: {
6
6
  rootDom: HTMLElement | null;
7
- setVideoWindowSize: (width: number, height: number) => void;
7
+ setVideoWindowSize: (width: number, height: number) => {
8
+ width: number;
9
+ height: number;
10
+ };
8
11
  resetVideoWindowSize: () => void;
9
12
  }): void;