fcr-ui-scene 3.6.0 → 3.6.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 (48) hide show
  1. package/lib/electron/bootstrap-sdk.js +15 -6
  2. package/lib/global.css +23 -5
  3. package/lib/modules/action-bar/components/board/index.js +0 -2
  4. package/lib/modules/action-bar/components/breakout-room/index.js +0 -2
  5. package/lib/modules/action-bar/components/leave/index.js +1 -12
  6. package/lib/modules/action-bar/components/more/poppover-content.js +6 -9
  7. package/lib/modules/action-bar/components/participants/index.js +1 -9
  8. package/lib/modules/action-bar/components/screen-share/index.js +0 -4
  9. package/lib/modules/action-bar/store.d.ts +0 -2
  10. package/lib/modules/action-bar/store.js +4 -10
  11. package/lib/modules/action-bar/view.js +1 -1
  12. package/lib/modules/audio-stream/index.js +4 -4
  13. package/lib/modules/chat/chat-room-store.js +3 -4
  14. package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +0 -1
  15. package/lib/modules/components/member-window/components/member-actions/index.js +0 -2
  16. package/lib/modules/components/member-window/components/member-actions/libs/index.js +0 -1
  17. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +1 -1
  18. package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +1 -2
  19. package/lib/modules/components/member-window/index.css +1 -0
  20. package/lib/modules/components/member-window/index.js +0 -1
  21. package/lib/modules/connection-gateway/components/phone/index.js +1 -1
  22. package/lib/modules/control-bar/store.d.ts +1 -1
  23. package/lib/modules/control-bar/store.js +4 -4
  24. package/lib/modules/dialog/components/dialog-container/index.css +16 -0
  25. package/lib/modules/dialog/components/share-screen-selection/index.js +1 -2
  26. package/lib/modules/dialog/hooks/useElectron.js +11 -88
  27. package/lib/modules/dialog/index.js +0 -1
  28. package/lib/modules/event-confirm/store.js +23 -17
  29. package/lib/modules/event-toast/store.js +5 -2
  30. package/lib/modules/invite/components/pstn-invite.js +0 -17
  31. package/lib/modules/layout/components/Aside.js +0 -1
  32. package/lib/modules/layout/store.js +7 -1
  33. package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +0 -2
  34. package/lib/modules/pc-audio-connect/store.js +2 -1
  35. package/lib/modules/state-bar/meeting-details.js +3 -9
  36. package/lib/modules/whiteboard/components/control-bar/index.js +0 -2
  37. package/lib/modules/whiteboard/components/scene-pagination.js +0 -2
  38. package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +1 -2
  39. package/lib/modules/widget/sdk.js +0 -1
  40. package/lib/providers/device-provider.js +4 -20
  41. package/lib/shared-data-source/meeting-time.js +2 -2
  42. package/lib/shared-data-source/video-window.d.ts +0 -1
  43. package/lib/shared-data-source/video-window.js +3 -10
  44. package/lib/ui-scene.js +2 -4
  45. package/lib/utilities/tools.d.ts +25 -2
  46. package/lib/utilities/tools.js +33 -15
  47. package/lib/waiting-room-control-manager.js +1 -1
  48. package/package.json +7 -7
@@ -33,7 +33,7 @@ var _store = require("../store");
33
33
  var _dialogs = require("../dialogs");
34
34
  var _renderer = require("../../../utilities/renderer");
35
35
  var _reactDom = require("react-dom");
36
- var _constant = require("../../../utilities/constant");
36
+ var _tools = require("../../../utilities/tools");
37
37
  var _jsxRuntime = require("react/jsx-runtime");
38
38
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
39
39
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -67,7 +67,6 @@ function useElectronDialog(props) {
67
67
  fullScreen = props.fullScreen,
68
68
  onOpened = props.onOpened,
69
69
  onUnmounted = props.onUnmounted,
70
- polyfills = props.polyfills,
71
70
  _props$hasCustomShado = props.hasCustomShadow,
72
71
  hasCustomShadow = _props$hasCustomShado === void 0 ? true : _props$hasCustomShado,
73
72
  _props$disableShortcu = props.disableShortcutClose,
@@ -92,53 +91,15 @@ function useElectronDialog(props) {
92
91
  (0, _react.useEffect)(function () {
93
92
  var node;
94
93
  window.runtime.openRendererWindow(dialogKey, function (dom, browserWindow, newRendererWindow) {
95
- var _controlbar$isVisible;
96
94
  node = dom;
97
95
  windowRef.current = browserWindow;
98
96
  newRendernerWindowRef.current = newRendererWindow;
99
97
  _dialogs.dialogWindows.set(dialogKey, browserWindow);
100
- var thisWindowBounds = browserWindow.getBounds();
101
- var mainAppWindowBounds = window.runtime.browserWindow.getBounds();
102
- var nearDisplayBounds = window.runtime.screen.getDisplayNearestPoint(mainAppWindowBounds).bounds;
103
- var controlbar = _dialogs.dialogWindows.get(_constant.FcrUIDialogKey.CONTROL_BAR);
104
- if (controlbar && controlbar !== null && controlbar !== void 0 && (_controlbar$isVisible = controlbar.isVisible) !== null && _controlbar$isVisible !== void 0 && _controlbar$isVisible.call(controlbar)) {
105
- // 因为打开过的窗口在关闭时是用的 hide 方法,因此只判断 controlbar 是否存在会在关闭 controlbar 时失效,导致窗口依然跟随 controlbar 最后所在屏幕打开,所以要再判断一下 isVisible 状态
106
- // 当屏幕共享时会打开 control bar,此时弹窗相对于 control bar 展示
107
- var nearDisplay = window.runtime.screen.getDisplayNearestPoint(controlbar.getBounds());
108
- var _nearDisplayBounds = nearDisplay.bounds;
109
- var _thisWindowBounds = browserWindow.getBounds();
110
- var centerBounds = {
111
- x: Math.floor(_nearDisplayBounds.x + (_nearDisplayBounds.width - _thisWindowBounds.width) / 2),
112
- y: Math.floor(_nearDisplayBounds.y + (_nearDisplayBounds.height - _thisWindowBounds.height) / 2)
113
- };
114
- // resizeble 为 true 的窗口在切换不同分辨率属性的显示器时,会有打开尺寸失真的情况出现,所以暂存一下其原始值,在更改坐标之后还原
115
- var resizeble = browserWindow.isResizable();
116
- browserWindow.setResizable(false);
117
- browserWindow.setBounds(centerBounds);
118
- browserWindow.setResizable(resizeble);
119
- } else if (fullScreen) {
120
- var _browserWindow$setBou;
121
- // 当窗口的自定义设置为全屏时,让弹窗追随主窗口所在的屏幕展示
122
- // 目前 fullScreen 的配置主要用于 toast 和 confirm,在应用启动时会直接初始化这两个 dialog,如果未设置 fullScreen,它们因为没有宽高将无法展示
123
- var x = nearDisplayBounds.x,
124
- y = nearDisplayBounds.y,
125
- width = nearDisplayBounds.width,
126
- height = nearDisplayBounds.height;
127
- browserWindow === null || browserWindow === void 0 || (_browserWindow$setBou = browserWindow.setBounds) === null || _browserWindow$setBou === void 0 || _browserWindow$setBou.call(browserWindow, {
128
- x: x,
129
- y: y,
130
- width: width,
131
- height: height
132
- });
133
- } else {
134
- var _browserWindow$setBou2;
135
- // 如果窗口未设置全屏模式,那么新打开的弹窗相对于主窗口弹窗的水平垂直居中显示
136
- var bounds = {
137
- x: Math.floor(mainAppWindowBounds.x + (mainAppWindowBounds.width - thisWindowBounds.width) / 2),
138
- y: Math.floor(mainAppWindowBounds.y + (mainAppWindowBounds.height - thisWindowBounds.height) / 2)
139
- };
140
- browserWindow === null || browserWindow === void 0 || (_browserWindow$setBou2 = browserWindow.setBounds) === null || _browserWindow$setBou2 === void 0 || _browserWindow$setBou2.call(browserWindow, bounds);
141
- }
98
+ var _ref = (0, _tools.followCorrectDisplay)({
99
+ browserWindow: browserWindow,
100
+ alwaysFollowScreen: fullScreen
101
+ }),
102
+ nearDisplayBounds = _ref.nearDisplayBounds;
142
103
 
143
104
  // 设置所有窗口为所有工作区可见
144
105
  browserWindow.setVisibleOnAllWorkspaces(true, {
@@ -248,7 +209,6 @@ function useElectronDialogByDialogId(props) {
248
209
  fullScreen = props.fullScreen,
249
210
  onOpened = props.onOpened,
250
211
  onUnmounted = props.onUnmounted,
251
- polyfills = props.polyfills,
252
212
  _props$hasCustomShado2 = props.hasCustomShadow,
253
213
  hasCustomShadow = _props$hasCustomShado2 === void 0 ? true : _props$hasCustomShado2,
254
214
  _props$disableShortcu2 = props.disableShortcutClose,
@@ -274,52 +234,15 @@ function useElectronDialogByDialogId(props) {
274
234
  (0, _react.useEffect)(function () {
275
235
  var node;
276
236
  window.runtime.openRendererWindow(winUniqueId, function (dom, browserWindow, newRendererWindow) {
277
- var _controlbar$isVisible2;
278
237
  node = dom;
279
238
  windowRef.current = browserWindow;
280
239
  newRendernerWindowRef.current = newRendererWindow;
281
240
  _dialogs.dialogIdWindows.set(winUniqueId, browserWindow);
282
- var thisWindowBounds = browserWindow.getBounds();
283
- var mainAppWindowBounds = window.runtime.browserWindow.getBounds();
284
- var nearDisplayBounds = window.runtime.screen.getDisplayNearestPoint(mainAppWindowBounds).bounds;
285
- var controlbar = _dialogs.dialogWindows.get(_constant.FcrUIDialogKey.CONTROL_BAR);
286
- if (controlbar && controlbar !== null && controlbar !== void 0 && (_controlbar$isVisible2 = controlbar.isVisible) !== null && _controlbar$isVisible2 !== void 0 && _controlbar$isVisible2.call(controlbar)) {
287
- // 因为打开过的窗口在关闭时是用的 hide 方法,因此只判断 controlbar 是否存在会在关闭 controlbar 时失效,导致窗口依然跟随 controlbar 最后所在屏幕打开,所以要再判断一下 isVisible 状态
288
- // 当屏幕共享时会打开 control bar,此时弹窗相对于 control bar 展示
289
- var nearDisplay = window.runtime.screen.getDisplayNearestPoint(controlbar.getBounds());
290
- var _nearDisplayBounds2 = nearDisplay.bounds;
291
- var _thisWindowBounds2 = browserWindow.getBounds();
292
- var centerBounds = {
293
- x: Math.floor(_nearDisplayBounds2.x + (_nearDisplayBounds2.width - _thisWindowBounds2.width) / 2),
294
- y: Math.floor(_nearDisplayBounds2.y + (_nearDisplayBounds2.height - _thisWindowBounds2.height) / 2)
295
- };
296
- // resizeble 为 true 的窗口在切换不同分辨率属性的显示器时,会有打开尺寸失真的情况出现,所以暂存一下其原始值,在更改坐标之后还原
297
- var resizeble = browserWindow.isResizable();
298
- browserWindow.setResizable(false);
299
- browserWindow.setBounds(centerBounds);
300
- browserWindow.setResizable(resizeble);
301
- } else if (fullScreen) {
302
- var _browserWindow$setBou3;
303
- // 当窗口的自定义设置为全屏时,让弹窗追随主窗口所在的屏幕展示
304
- var x = nearDisplayBounds.x,
305
- y = nearDisplayBounds.y,
306
- width = nearDisplayBounds.width,
307
- height = nearDisplayBounds.height;
308
- browserWindow === null || browserWindow === void 0 || (_browserWindow$setBou3 = browserWindow.setBounds) === null || _browserWindow$setBou3 === void 0 || _browserWindow$setBou3.call(browserWindow, {
309
- x: x,
310
- y: y,
311
- width: width,
312
- height: height
313
- });
314
- } else {
315
- var _browserWindow$setBou4;
316
- // 如果主窗口不是全屏模式,那么新打开的弹窗相对于主窗口弹窗的水平垂直居中显示
317
- var bounds = {
318
- x: Math.floor(mainAppWindowBounds.x + (mainAppWindowBounds.width - thisWindowBounds.width) / 2),
319
- y: Math.floor(mainAppWindowBounds.y + (mainAppWindowBounds.height - thisWindowBounds.height) / 2)
320
- };
321
- browserWindow === null || browserWindow === void 0 || (_browserWindow$setBou4 = browserWindow.setBounds) === null || _browserWindow$setBou4 === void 0 || _browserWindow$setBou4.call(browserWindow, bounds);
322
- }
241
+ var _ref2 = (0, _tools.followCorrectDisplay)({
242
+ browserWindow: browserWindow,
243
+ alwaysFollowScreen: fullScreen
244
+ }),
245
+ nearDisplayBounds = _ref2.nearDisplayBounds;
323
246
 
324
247
  // 设置所有窗口为所有工作区可见
325
248
  browserWindow.setVisibleOnAllWorkspaces(true, {
@@ -52,7 +52,6 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
52
52
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
53
53
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
54
54
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
55
- var _react = _interopRequireDefault(require("react"));
56
55
  var _base = require("../../base");
57
56
  var _store = _interopRequireWildcard(require("./store"));
58
57
  var _view = require("./view");
@@ -74,7 +74,6 @@ var _react = require("react");
74
74
  var _logger = require("../../utilities/logger");
75
75
  var _decorator = require("agora-foundation/lib/decorator");
76
76
  var _tools = require("../../utilities/tools");
77
- var _dialogs = require("../dialog/dialogs");
78
77
  var _env = require("agora-foundation/lib/utilities/env");
79
78
  var _ConfirmStore;
80
79
  var _initProto, _init_isReplaceShare, _init_calculateMethods, _init_reposition, _init_confirms, _init_screenBounds, _addConfirmDecs, _resetIsReplaceDecs, _handleConfirmEventDecs, _ref;
@@ -134,13 +133,16 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
134
133
  return (_this$_screenShareDat = _this._screenShareDataSource) === null || _this$_screenShareDat === void 0 ? void 0 : _this$_screenShareDat.currentShareBounds;
135
134
  }, function (bounds) {
136
135
  if (bounds) {
137
- var _dialogWindows$get;
138
- (_dialogWindows$get = _dialogs.dialogWindows.get(_constant.FcrUIDialogKey.CONFIRM)) === null || _dialogWindows$get === void 0 || _dialogWindows$get.setBounds(bounds);
136
+ var _ref3 = (0, _tools.followCorrectDisplay)({
137
+ dialogKey: _constant.FcrUIDialogKey.CONFIRM,
138
+ alwaysFollowScreen: true
139
+ }),
140
+ nearDisplayBounds = _ref3.nearDisplayBounds;
139
141
  _this.calculateMethods.forEach(function (method) {
140
- return method(bounds);
142
+ return method(nearDisplayBounds);
141
143
  });
142
- _this.logger.info("new sharing bounds is ".concat(JSON.stringify(bounds)));
143
- _this.screenBounds = bounds;
144
+ _this.logger.info("new sharing bounds is ".concat(JSON.stringify(nearDisplayBounds)));
145
+ _this.screenBounds = nearDisplayBounds;
144
146
  } else {
145
147
  _this.logger.error("there is have no bounds ".concat(JSON.stringify(bounds)));
146
148
  }
@@ -148,10 +150,14 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
148
150
  return _this.isSeizeScreen;
149
151
  }, function (isSeize) {
150
152
  if (isSeize && (0, _env.isElectron)()) {
151
- var _ref3 = (0, _tools.followCorrectDisplay)(_constant.FcrUIDialogKey.CONFIRM, isSeize),
152
- _bounds = _ref3.bounds;
153
- _this.screenBounds = _bounds;
154
- _this.logger.info("new sharing bounds is ".concat(JSON.stringify(_bounds), ", when seize screen emit"));
153
+ var _ref4 = (0, _tools.followCorrectDisplay)({
154
+ dialogKey: _constant.FcrUIDialogKey.CONFIRM,
155
+ alwaysFollowScreen: true,
156
+ extraRefControlbarCondition: isSeize
157
+ }),
158
+ nearDisplayBounds = _ref4.nearDisplayBounds;
159
+ _this.screenBounds = nearDisplayBounds;
160
+ _this.logger.info("new sharing bounds is ".concat(JSON.stringify(nearDisplayBounds), ", when seize screen emit"));
155
161
  }
156
162
  }), (0, _mobx.reaction)(function () {
157
163
  return _this.screenBounds;
@@ -298,13 +304,13 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
298
304
  if ((payload === null || payload === void 0 ? void 0 : payload.dialogKey) === _constant.FcrUIDialogKey.CONFIRM) {
299
305
  switch (action) {
300
306
  case _constant.FcrUIAction.OPEN_DIALOG:
301
- if (this.screenBounds) {
302
- var _dialogWindows$get2;
303
- (_dialogWindows$get2 = _dialogs.dialogWindows.get(_constant.FcrUIDialogKey.CONFIRM)) === null || _dialogWindows$get2 === void 0 || _dialogWindows$get2.setBounds(this.screenBounds);
304
- this.logger.info("open confirm dialog with bounds ".concat(JSON.stringify(this.screenBounds)));
305
- } else {
306
- this.logger.error("the screen bounds is ".concat(JSON.stringify(this.screenBounds)));
307
- }
307
+ var _ref6 = (0, _tools.followCorrectDisplay)({
308
+ dialogKey: _constant.FcrUIDialogKey.CONFIRM,
309
+ alwaysFollowScreen: true
310
+ }),
311
+ nearDisplayBounds = _ref6.nearDisplayBounds;
312
+ this.screenBounds = nearDisplayBounds;
313
+ this.logger.info("open confirm dialog with bounds ".concat(JSON.stringify(nearDisplayBounds)));
308
314
  this.addConfirm(payload);
309
315
  break;
310
316
  case _constant.FcrUIAction.CLOSE_DIALOG:
@@ -104,7 +104,7 @@ var ToastStore = exports["default"] = /*#__PURE__*/function () {
104
104
  this._disposers.push((0, _mobx.reaction)(function () {
105
105
  return _this.toastsList;
106
106
  }, function () {
107
- _this.toasts.forEach(function (value, key) {
107
+ _this.toasts.forEach(function (value) {
108
108
  value();
109
109
  });
110
110
  }));
@@ -167,7 +167,10 @@ var ToastStore = exports["default"] = /*#__PURE__*/function () {
167
167
  });
168
168
  }
169
169
  if (action === _constant.FcrUIAction.OPEN_DIALOG && params.dialogKey === _constant.FcrUIDialogKey.SHOW_TOAST) {
170
- (0, _tools.followCorrectDisplay)(_constant.FcrUIDialogKey.SHOW_TOAST);
170
+ (0, _tools.followCorrectDisplay)({
171
+ dialogKey: _constant.FcrUIDialogKey.SHOW_TOAST,
172
+ alwaysFollowScreen: true
173
+ });
171
174
  var _params$params = params.params,
172
175
  _params$params$type = _params$params.type,
173
176
  type = _params$params$type === void 0 ? 'info' : _params$params$type,
@@ -71,14 +71,6 @@ var PSTNInvite = exports.PSTNInvite = (0, _mobxReact.observer)(function () {
71
71
  pstnCountryCodeList = _useContext.pstnCountryCodeList,
72
72
  stopSession = _useContext.stopSession,
73
73
  showToast = _useContext.showToast,
74
- _useContext$roomInfo = _useContext.roomInfo,
75
- inviteLink = _useContext$roomInfo.inviteLink,
76
- password = _useContext$roomInfo.password,
77
- roomId = _useContext$roomInfo.roomId,
78
- roomName = _useContext$roomInfo.roomName,
79
- userName = _useContext.localUser.userName,
80
- meetingId = _useContext.meetingId,
81
- roomSchedule = _useContext.roomSchedule,
82
74
  roomDetailCopyText = _useContext.roomDetailCopyText;
83
75
  var _useState13 = (0, _react.useState)(pstnCountryCodeList.length ? pstnCountryCodeList[0].text : ''),
84
76
  _useState14 = (0, _slicedToArray2["default"])(_useState13, 2),
@@ -94,15 +86,6 @@ var PSTNInvite = exports.PSTNInvite = (0, _mobxReact.observer)(function () {
94
86
  var checkInput = (0, _react.useCallback)(function (input, setError) {
95
87
  setError(input.trim().length === 0);
96
88
  }, []);
97
- var getShareLink = function getShareLink() {
98
- var info = {
99
- roomId: roomId,
100
- roomName: roomName,
101
- userName: userName
102
- };
103
- var baseLink = "".concat(inviteLink);
104
- return baseLink;
105
- };
106
89
  var handleCopyMeetingDetail = (0, _react.useCallback)(function () {
107
90
  (0, _copyText.copyText)(roomDetailCopyText).then(function () {
108
91
  showToast({
@@ -46,7 +46,6 @@ var Aside = exports.Aside = (0, _mobxReact.observer)(function (_ref) {
46
46
  moveChatFromAsideToDialog = _useContext.moveChatFromAsideToDialog,
47
47
  closeParticipantFromAside = _useContext.closeParticipantFromAside,
48
48
  moveParticipantFromAsideToDialog = _useContext.moveParticipantFromAsideToDialog,
49
- participantCount = _useContext.participantCount,
50
49
  chatRoomState = _useContext.chatRoomState,
51
50
  participantsRenderAt = _useContext.participantsRenderAt,
52
51
  chatRenderAt = _useContext.chatRenderAt;
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "__esModule", {
20
20
  value: true
21
21
  });
22
22
  exports["default"] = exports.StoreContext = void 0;
23
+ require("core-js/modules/es.array.every.js");
23
24
  require("core-js/modules/es.array.filter.js");
24
25
  require("core-js/modules/es.array.find.js");
25
26
  require("core-js/modules/es.array.for-each.js");
@@ -34,11 +35,13 @@ require("core-js/modules/es.object.values.js");
34
35
  require("core-js/modules/es.set.js");
35
36
  require("core-js/modules/es.string.iterator.js");
36
37
  require("core-js/modules/es.weak-map.js");
38
+ require("core-js/modules/esnext.async-iterator.every.js");
37
39
  require("core-js/modules/esnext.async-iterator.filter.js");
38
40
  require("core-js/modules/esnext.async-iterator.find.js");
39
41
  require("core-js/modules/esnext.async-iterator.for-each.js");
40
42
  require("core-js/modules/esnext.async-iterator.some.js");
41
43
  require("core-js/modules/esnext.iterator.constructor.js");
44
+ require("core-js/modules/esnext.iterator.every.js");
42
45
  require("core-js/modules/esnext.iterator.filter.js");
43
46
  require("core-js/modules/esnext.iterator.find.js");
44
47
  require("core-js/modules/esnext.iterator.for-each.js");
@@ -415,8 +418,11 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
415
418
  return _this2._isVideoParticipantVisible(i);
416
419
  });
417
420
  var list = this.shouldHideNonVideoParticipants ? nonVideoStreamParticipantList : this.sourceList;
421
+ var isOnlyOne = list.every(function (i) {
422
+ return i.isMySelf && i.type === _type2.FcrUIWindowType.VIDEO;
423
+ });
418
424
  return list.filter(function (i) {
419
- if (_this2.shouldHideMyVideo && i.isMySelf) {
425
+ if (_this2.shouldHideMyVideo && !isOnlyOne && i.isMySelf && i.type === _type2.FcrUIWindowType.VIDEO) {
420
426
  return false;
421
427
  }
422
428
  return true;
@@ -1,13 +1,11 @@
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");
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.FcrParticipantsFooterWithRevokeHost = exports.FcrParticipantsFooterRename = exports.FcrParticipantsFooter = void 0;
9
8
  require("core-js/modules/es.array.unshift.js");
10
- var _react = _interopRequireDefault(require("react"));
11
9
  var _i18n = require("agora-ui-foundation/lib/i18n");
12
10
  var _checkbox = require("agora-ui-foundation/lib/components/checkbox");
13
11
  var _dropMenu = require("agora-ui-foundation/lib/components/drop-menu");
@@ -251,7 +251,8 @@ var ConnectionGatewayStore = exports["default"] = /*#__PURE__*/function () {
251
251
  return _onOk.apply(this, arguments);
252
252
  }
253
253
  return onOk;
254
- }()
254
+ }(),
255
+ reverseButton: true
255
256
  });
256
257
  return true;
257
258
  }
@@ -21,7 +21,6 @@ var _react = require("react");
21
21
  var _store = require("./store");
22
22
  require("./meeting-detail.css");
23
23
  var _classnames = _interopRequireDefault(require("classnames"));
24
- var _tooltip = require("agora-ui-foundation/lib/components/tooltip");
25
24
  var _jsxRuntime = require("react/jsx-runtime");
26
25
  var CopyState = /*#__PURE__*/function (CopyState) {
27
26
  CopyState[CopyState["COPYINIT"] = 1] = "COPYINIT";
@@ -44,7 +43,6 @@ var MeetingDetails = exports.MeetingDetails = (0, _mobxReact.observer)(function
44
43
  var _useContext = (0, _react.useContext)(_store.StoreContext),
45
44
  localUser = _useContext.localUser,
46
45
  roomInfo = _useContext.roomInfo,
47
- scheduleInfo = _useContext.scheduleInfo,
48
46
  getShareLink = _useContext.getShareLink,
49
47
  password = _useContext.password,
50
48
  meetingId = _useContext.meetingId,
@@ -151,13 +149,9 @@ var MeetingDetails = exports.MeetingDetails = (0, _mobxReact.observer)(function
151
149
  className: "meeting-details",
152
150
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
153
151
  className: "meeting-details__content",
154
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
155
- content: roomInfo.roomName,
156
- placement: "bottom",
157
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
158
- className: "meeting-details__content-meeting-subject",
159
- children: renderMeetingRoomName
160
- })
152
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
153
+ className: "meeting-details__content-meeting-subject",
154
+ children: renderMeetingRoomName
161
155
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
162
156
  className: "meeting-details__content-meeting-id",
163
157
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
@@ -26,7 +26,6 @@ var WhiteboardControlbar = exports.WhiteboardControlbar = (0, _mobxReact.observe
26
26
  setLoading = _useState2[1];
27
27
  var transI18n = (0, _i18n.useI18n)();
28
28
  var _useContext = (0, _react.useContext)(_store.WhiteboardControlBarUIContext),
29
- onLonelyWindow = _useContext.onLonelyWindow,
30
29
  onZoomin = _useContext.onZoomin,
31
30
  onZoomout = _useContext.onZoomout,
32
31
  onOrigin = _useContext.onOrigin,
@@ -35,7 +34,6 @@ var WhiteboardControlbar = exports.WhiteboardControlbar = (0, _mobxReact.observe
35
34
  onEnable = _useContext.onEnable,
36
35
  ownerUser = _useContext.ownerUser,
37
36
  currentUser = _useContext.currentUser,
38
- lonelywindowOpened = _useContext.lonelywindowOpened,
39
37
  canWriteBoard = _useContext.canWriteBoard,
40
38
  isAdaptived = _useContext.isAdaptived,
41
39
  isMaxmum = _useContext.isMaxmum,
@@ -8,7 +8,6 @@ exports.ScenePagination = void 0;
8
8
  var _mobxReact = require("mobx-react");
9
9
  var _react = require("react");
10
10
  var _pagination = require("./pagination");
11
- var _i18n = require("agora-ui-foundation/lib/i18n");
12
11
  var _store = require("./pagination/store");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  var ScenePagination = exports.ScenePagination = (0, _mobxReact.observer)(function () {
@@ -16,7 +15,6 @@ var ScenePagination = exports.ScenePagination = (0, _mobxReact.observer)(functio
16
15
  observables = _useContext.observables,
17
16
  addPage = _useContext.addPage,
18
17
  changePage = _useContext.changePage;
19
- var transI18n = (0, _i18n.useI18n)();
20
18
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
21
19
  className: "fcr-board-pagination",
22
20
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pagination.HalfRoundedPagination, {
@@ -12,8 +12,7 @@ var _react = require("react");
12
12
  var _classnames = _interopRequireDefault(require("classnames"));
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  var Color = exports.Color = (0, _mobxReact.observer)(function (_ref) {
15
- var value = _ref.value,
16
- showCurrentColor = _ref.showCurrentColor;
15
+ var value = _ref.value;
17
16
  var _useContext = (0, _react.useContext)(_store.ToolbarContext),
18
17
  _useContext$observabl = _useContext.observables,
19
18
  currentColor = _useContext$observabl.currentColor,
@@ -195,7 +195,6 @@ var FcrUIWidgetSDKImpl = exports.FcrUIWidgetSDKImpl = /*#__PURE__*/function () {
195
195
  if (action === 'apiResponse') {
196
196
  this.logger.debug('handlePostMessage apiResponse: ', event.data);
197
197
  var _event$data = event.data,
198
- _action = _event$data.action,
199
198
  callId = _event$data.callId,
200
199
  returnValue = _event$data.returnValue;
201
200
  var controllerPromiseGroup = this._requestPromises.get(callId);
@@ -248,22 +248,9 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
248
248
  onSpeakerTestVolumeIndicationUpdated: this._handleSpeakerTestVolumeIndicationUpdated,
249
249
  onSelectedSpeakerVolumeUpdated: this._handleSpeakerVolumeUpdated
250
250
  });
251
-
252
- // runInAction(() => {
253
- // this.speakerVolume = this._mediaControl.getSelectedSpeakerVolume();
254
-
255
- // const value = this._localStorageProvider.read(SETTING_KEY);
256
- // if (value) {
257
- // const speakerVolume = value.speakerVolume ?? this.speakerVolume;
258
- // const microphoneVolume = value.microphoneVolume ?? this.microphoneVolume;
259
- // const isLocalMirrorEnabled = value.isLocalMirrorEnabled ?? this.isLocalMirrorEnabled;
260
- // const editBeautyKey = value.editBeautyKey ?? this.beautyKey;
261
- // this.setEditBeautyKey(editBeautyKey);
262
- // this.setSpeakerVolume(speakerVolume);
263
- // this.toggleLocalMirror(isLocalMirrorEnabled);
264
- // this.setMicrophoneVolume(microphoneVolume);
265
- // }
266
- // });
251
+ (0, _mobx.runInAction)(function () {
252
+ _this.speakerVolume = _this._mediaControl.getSelectedSpeakerVolume();
253
+ });
267
254
  }
268
255
  return (0, _createClass2["default"])(FcrUIDeviceProviderImpl, [{
269
256
  key: "_microphoneDeviceId",
@@ -694,16 +681,13 @@ var FcrUIDeviceProviderImpl = exports.FcrUIDeviceProviderImpl = /*#__PURE__*/fun
694
681
  }, {
695
682
  key: "_initLocalSetting",
696
683
  value: function _initLocalSetting() {
697
- this.speakerVolume = this._mediaControl.getSelectedSpeakerVolume();
698
684
  var value = this._localStorageProvider.read(_store.SETTING_KEY);
699
685
  if (value) {
700
- var _value$speakerVolume, _value$microphoneVolu, _value$isLocalMirrorE, _value$editBeautyKey;
701
- var _speakerVolume = (_value$speakerVolume = value.speakerVolume) !== null && _value$speakerVolume !== void 0 ? _value$speakerVolume : this.speakerVolume;
686
+ var _value$microphoneVolu, _value$isLocalMirrorE, _value$editBeautyKey;
702
687
  var _microphoneVolume = (_value$microphoneVolu = value.microphoneVolume) !== null && _value$microphoneVolu !== void 0 ? _value$microphoneVolu : this.microphoneVolume;
703
688
  var _isLocalMirrorEnabled = (_value$isLocalMirrorE = value.isLocalMirrorEnabled) !== null && _value$isLocalMirrorE !== void 0 ? _value$isLocalMirrorE : this.isLocalMirrorEnabled;
704
689
  var editBeautyKey = (_value$editBeautyKey = value.editBeautyKey) !== null && _value$editBeautyKey !== void 0 ? _value$editBeautyKey : this.beautyKey;
705
690
  this.setEditBeautyKey(editBeautyKey);
706
- this.setSpeakerVolume(_speakerVolume);
707
691
  this.toggleLocalMirror(_isLocalMirrorEnabled);
708
692
  this.setMicrophoneVolume(_microphoneVolume);
709
693
  }
@@ -57,9 +57,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
57
57
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
58
58
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
59
59
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
60
- var _i18n = require("agora-ui-foundation/lib/i18n");
61
60
  var _dayjs = _interopRequireDefault(require("dayjs"));
62
61
  var _duration = _interopRequireDefault(require("dayjs/plugin/duration"));
62
+ var _i18n = require("agora-ui-foundation/lib/i18n");
63
63
  var _base = require("../base");
64
64
  var _mobx = require("mobx");
65
65
  var _FcrUIMeetingTimeSharedDataSourceImpl;
@@ -131,7 +131,7 @@ var FcrUIMeetingTimeSharedDataSourceImpl = exports.FcrUIMeetingTimeSharedDataSou
131
131
  var remainTime = scheduleDuration - meetingDuration;
132
132
  var currentStatus = remainTime > 600 ? MeetingStatus.NORMAL : remainTime > 0 ? MeetingStatus.SOON_TO_END : MeetingStatus.OVERTIME;
133
133
  _this._setStatues(currentStatus);
134
- var showHour = meetingDuration / 60 > 120;
134
+ var showHour = meetingDuration / 60 > 60;
135
135
  var h = meetingDuration / 3600;
136
136
  var m = showHour ? meetingDuration % 3600 / 60 : meetingDuration / 60;
137
137
  var s = meetingDuration % 60;
@@ -135,7 +135,6 @@ export declare class FcrUIVideoWindowDataSourceImpl implements FcrUIVideoWindowD
135
135
  private _findInsertEndIndex;
136
136
  private _findCurrentSpeakerSpotlight;
137
137
  private _findItemIndexWithWindowId;
138
- private _findItemIndexWithUserId;
139
138
  private _findItemIndexWithAudioStreamId;
140
139
  private _insertBoard;
141
140
  private _insertNewData;
@@ -655,7 +655,7 @@ var FcrUIVideoWindowDataSourceImpl = exports.FcrUIVideoWindowDataSourceImpl = /*
655
655
  key: "onSpotlightRemoved",
656
656
  value: function onSpotlightRemoved(streamId) {
657
657
  var _this3 = this;
658
- var removeSpotlight = function removeSpotlight(streamId, list, limitCount) {
658
+ var removeSpotlight = function removeSpotlight(streamId, list) {
659
659
  var index = _this3._findItemIndexWithWindowId(streamId, list);
660
660
  if (index !== -1) {
661
661
  var item = list[index];
@@ -667,8 +667,8 @@ var FcrUIVideoWindowDataSourceImpl = exports.FcrUIVideoWindowDataSourceImpl = /*
667
667
  }
668
668
  }
669
669
  };
670
- removeSpotlight(streamId, this.mainList, this.mainListLimitedCount);
671
- removeSpotlight(streamId, this.foldList, this.foldListLimitedCount);
670
+ removeSpotlight(streamId, this.mainList);
671
+ removeSpotlight(streamId, this.foldList);
672
672
  this.spotlightStreamId = '';
673
673
  this._observer.notifyObservers('onSpotlightRemoved', streamId);
674
674
  }
@@ -1092,13 +1092,6 @@ var FcrUIVideoWindowDataSourceImpl = exports.FcrUIVideoWindowDataSourceImpl = /*
1092
1092
  return item.windowId === windowId;
1093
1093
  });
1094
1094
  }
1095
- }, {
1096
- key: "_findItemIndexWithUserId",
1097
- value: function _findItemIndexWithUserId(userId, list) {
1098
- return list.findIndex(function (item) {
1099
- return item.userId === userId;
1100
- });
1101
- }
1102
1095
  }, {
1103
1096
  key: "_findItemIndexWithAudioStreamId",
1104
1097
  value: function _findItemIndexWithAudioStreamId(audioStreamId, list) {
package/lib/ui-scene.js CHANGED
@@ -260,7 +260,6 @@ var FcrUIDefaultScene = exports.FcrUIDefaultScene = /*#__PURE__*/function () {
260
260
  key: "_addObservers",
261
261
  value: function _addObservers(roomProvider, eventProvider, deviceProvider, engine, uiManager, sharedConfigDataSource, sharedSettingDataSource, sharedLayoutDataSource, sharedSpeakerSpotlightDataSource, sharedPinDataSource, dialogProvider, messageProvider, sharedVideoWindowDataSource, sharedDevicePrivilegeDataSource, widgetProvider) {
262
262
  var _this3 = this;
263
- var dom = this._dom;
264
263
  var observable = this._observable;
265
264
  var sceneConfig = this._config;
266
265
  roomProvider.addObserver({
@@ -432,11 +431,10 @@ var FcrUIDefaultScene = exports.FcrUIDefaultScene = /*#__PURE__*/function () {
432
431
  value: function () {
433
432
  var _renderSceneUI2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(roomControl, uiManager, eventProvider, deviceProvider, roomProvider, sharedConfigDataSource, sharedSettingDataSource, sharedLayoutDataSource, sharedSpeakerSpotlightDataSource, sharedPinDataSource, messageProvider, dialogProvider, sharedVideoWindowDataSource, sharedDevicePrivilegeDataSource, widgetProvider) {
434
433
  var _roomControl$getRoomI;
435
- var dom, type;
434
+ var type;
436
435
  return _regenerator["default"].wrap(function _callee3$(_context3) {
437
436
  while (1) switch (_context3.prev = _context3.next) {
438
437
  case 0:
439
- dom = this._dom;
440
438
  type = (_roomControl$getRoomI = roomControl.getRoomInfo()) === null || _roomControl$getRoomI === void 0 ? void 0 : _roomControl$getRoomI.roomType;
441
439
  if (type === _type2.FcrRoomType.Mainroom) {
442
440
  if ((0, _parameters.isRobotPullingMode)(this._creatorConfig.parameters)) {
@@ -449,7 +447,7 @@ var FcrUIDefaultScene = exports.FcrUIDefaultScene = /*#__PURE__*/function () {
449
447
  } else {
450
448
  this._disposers.push(uiManager.renderWaitingSceneUI(eventProvider, deviceProvider, roomProvider, sharedConfigDataSource, dialogProvider, messageProvider, sharedLayoutDataSource, sharedSettingDataSource, sharedDevicePrivilegeDataSource, widgetProvider));
451
449
  }
452
- case 3:
450
+ case 2:
453
451
  case "end":
454
452
  return _context3.stop();
455
453
  }
@@ -62,8 +62,31 @@ export type CurrentShareScreenWorkArea = {
62
62
  export declare function getCurrentSharingWorkArea(params: {
63
63
  currentShareBounds: CurrentShareBounds;
64
64
  }): CurrentShareScreenWorkArea;
65
- export declare function followCorrectDisplay(dailogKey: FcrUIDialogKey | FcrUIDialogKey[], extraRefControlbarCondition?: boolean): {
66
- bounds: CurrentShareBounds;
65
+ export declare function followCorrectDisplay({ browserWindow, dialogKey, extraRefControlbarCondition, follow, alwaysFollowScreen, }: {
66
+ /**
67
+ * browserWindow 是 Electron 的窗口对象,如果传入,则直接设置 bounds,否则会根据 dialogKey 设置 bounds
68
+ */
69
+ browserWindow?: Electron.BrowserWindow;
70
+ /**
71
+ * 如果不使用 browserWindow ,则需要传入 dialogKey 设置 bounds,如果 browserWindow 和 dialogKey 都未传入,则抛出错误
72
+ */
73
+ dialogKey?: FcrUIDialogKey | FcrUIDialogKey[];
74
+ /**
75
+ * 始终 follow control bar 的位置,默认是 true
76
+ */
77
+ extraRefControlbarCondition?: boolean;
78
+ /**
79
+ * 根据屏幕或者应用主窗口居中显示,默认是 screen,如果需要跟随主窗口,则设置为 main-window,
80
+ * 在屏幕共享时,普通 dialog 窗口会以 controlbar 所在的屏幕为基准水平居中对齐
81
+ * 在非屏幕共享状态下,则会以主窗口为基准水平居中对齐
82
+ */
83
+ follow?: 'screen' | 'main-window';
84
+ /**
85
+ * 是否是全屏幕覆盖的透明窗口, 此设置主要针对 toast 和 confirm 弹窗
86
+ */
87
+ alwaysFollowScreen?: boolean;
88
+ }): {
89
+ nearDisplayBounds: CurrentShareBounds;
67
90
  nearDisplay: Electron.Display;
68
91
  } | undefined;
69
92
  export declare const getBrowserLanguage: () => "zh" | "en";