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
@@ -14,6 +14,8 @@ exports.getLanguage = void 0;
14
14
  exports.handleCheckMouseOver = handleCheckMouseOver;
15
15
  exports.waitUntil = exports.uint8ArrayToImageData = exports.storage = exports.setLanguage = exports.renderMeetingName = exports.renderMeetingId = exports.matchVirtualSoundCardPattern = exports.isZipUrl = exports.isPngOrJpg = exports.isMp4 = exports.isMp3OrWav = void 0;
16
16
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
17
+ require("core-js/modules/es.error.cause.js");
18
+ require("core-js/modules/es.error.to-string.js");
17
19
  require("core-js/modules/es.array.concat.js");
18
20
  require("core-js/modules/es.array.for-each.js");
19
21
  require("core-js/modules/es.array.is-array.js");
@@ -338,30 +340,46 @@ function getCurrentSharingWorkArea(params) {
338
340
  scaleFactor: scaleFactor
339
341
  };
340
342
  }
341
- function followCorrectDisplay(dailogKey) {
342
- var extraRefControlbarCondition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
343
+ function followCorrectDisplay(_ref6) {
344
+ var browserWindow = _ref6.browserWindow,
345
+ dialogKey = _ref6.dialogKey,
346
+ _ref6$extraRefControl = _ref6.extraRefControlbarCondition,
347
+ extraRefControlbarCondition = _ref6$extraRefControl === void 0 ? true : _ref6$extraRefControl,
348
+ _ref6$follow = _ref6.follow,
349
+ follow = _ref6$follow === void 0 ? 'screen' : _ref6$follow,
350
+ _ref6$alwaysFollowScr = _ref6.alwaysFollowScreen,
351
+ alwaysFollowScreen = _ref6$alwaysFollowScr === void 0 ? false : _ref6$alwaysFollowScr;
343
352
  if (!(0, _env.isElectron)()) return;
344
- var objectDialog = Array.isArray(dailogKey) ? dailogKey.map(function (dialog) {
353
+ if (!browserWindow && !dialogKey) throw new Error('browserWindow or dialogKey is required');
354
+ var objectDialog = dialogKey ? Array.isArray(dialogKey) ? dialogKey.map(function (dialog) {
345
355
  return _dialogs.dialogWindows.get(dialog);
346
- }) : _dialogs.dialogWindows.get(dailogKey);
356
+ }) : _dialogs.dialogWindows.get(dialogKey) : browserWindow;
347
357
  var controlbar = _dialogs.dialogWindows.get(_constant.FcrUIDialogKey.CONTROL_BAR);
358
+ var mainAppWindowBounds = window.runtime.browserWindow.getBounds();
348
359
  // 按当前的窗口管理方式,在关闭 controlbar 的时候,controlbar 实际上是隐藏了自己,所以,依然能够通过 controlbar 访问到,所以需要判断是否是 visible 状态
349
360
  var followControlbar = controlbar && (extraRefControlbarCondition || controlbar.isVisible());
350
- // 屏幕抢占时,需要判断是否是抢占屏幕,决定是取 controlbar 的位置计算热区,还是走原有逻辑,此类条件通过 extraRefControlbarCondition 传入
351
- var nearestPoint = followControlbar ? controlbar === null || controlbar === void 0 ? void 0 : controlbar.getBounds() : window.runtime.browserWindow.getBounds();
361
+ // 屏幕抢占时,需要判断是否是抢占屏幕,决定是取 controlbar 所在屏幕计算热区,还是以主窗口所在屏幕计算热区,此类条件通过 extraRefControlbarCondition 传入
362
+ var nearestPoint = followControlbar ? controlbar === null || controlbar === void 0 ? void 0 : controlbar.getBounds() : mainAppWindowBounds;
352
363
  var nearDisplay = window.runtime.screen.getDisplayNearestPoint(nearestPoint);
353
- var nearDisplayBounds = nearDisplay.bounds;
354
- var bounds = {
355
- x: Math.floor(nearDisplayBounds.x),
356
- y: Math.floor(nearDisplayBounds.y),
357
- width: Math.floor(nearDisplayBounds.width),
358
- height: Math.floor(nearDisplayBounds.height)
364
+ var nearBounds = nearDisplay.bounds;
365
+ var nearDisplayBounds = {
366
+ x: Math.floor(nearBounds.x),
367
+ y: Math.floor(nearBounds.y),
368
+ width: Math.floor(nearBounds.width),
369
+ height: Math.floor(nearBounds.height)
370
+ };
371
+ var followBounds = function followBounds(theWindowBounds) {
372
+ var targetBounds = follow === 'screen' || extraRefControlbarCondition ? nearBounds : mainAppWindowBounds;
373
+ return alwaysFollowScreen ? nearDisplayBounds : {
374
+ x: Math.floor(targetBounds.x + (targetBounds.width - theWindowBounds.width) / 2),
375
+ y: Math.floor(targetBounds.y + (targetBounds.height - theWindowBounds.height) / 2)
376
+ };
359
377
  };
360
378
  Array.isArray(objectDialog) ? objectDialog.forEach(function (dialog) {
361
- return dialog === null || dialog === void 0 ? void 0 : dialog.setBounds(bounds);
362
- }) : objectDialog === null || objectDialog === void 0 ? void 0 : objectDialog.setBounds(bounds);
379
+ return dialog === null || dialog === void 0 ? void 0 : dialog.setBounds(followBounds(dialog.getBounds()));
380
+ }) : objectDialog === null || objectDialog === void 0 ? void 0 : objectDialog.setBounds(followBounds(objectDialog.getBounds()));
363
381
  return {
364
- bounds: bounds,
382
+ nearDisplayBounds: nearDisplayBounds,
365
383
  nearDisplay: nearDisplay
366
384
  };
367
385
  }
@@ -46,7 +46,7 @@ var FcrUIWaitingRoomControlManager = exports["default"] = /*#__PURE__*/function
46
46
  (0, _defineProperty2["default"])(this, "_waitingRoomControl", null);
47
47
  (0, _defineProperty2["default"])(this, "_isJoining", false);
48
48
  (0, _defineProperty2["default"])(this, "_mainRoomUserObserver", {
49
- onUserInfoUpdated: function onUserInfoUpdated(roomId, event) {
49
+ onUserInfoUpdated: function onUserInfoUpdated(_roomId, event) {
50
50
  var isLocalUserInfoUpdated = event.modifiedUser.userId === _this._mainRoomControl.getUserControl().getLocalUser().userId;
51
51
 
52
52
  // 权限变更的时候
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fcr-ui-scene",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "main": "lib/index.js",
5
5
  "repository": "ssh://git@git.agoralab.co/aduc/fcr-ui-scene-desktop.git",
6
6
  "author": "agora.io",
@@ -21,14 +21,14 @@
21
21
  "@electron/remote": "2.0.1",
22
22
  "@react-spring/web": "^9.7.3",
23
23
  "@use-gesture/react": "^10.3.1",
24
- "agora-electron-sdk": "4.3.2-build.11-rc.1",
25
- "agora-foundation": "^3.6.0",
26
- "agora-ui-foundation": "^3.6.0",
24
+ "agora-electron-sdk": "4.3.2-build.145-rc.3",
25
+ "agora-foundation": "~3.6.1",
26
+ "agora-ui-foundation": "~3.6.1",
27
27
  "classnames": "^2.5.1",
28
28
  "core-js": "^3.33.3",
29
29
  "dayjs": "^1.10.4",
30
30
  "electron-screenshots": "^0.5.26",
31
- "fcr-core": "^3.6.0",
31
+ "fcr-core": "~3.6.1",
32
32
  "js-md5": "^0.8.3",
33
33
  "jszip": "^3.10.1",
34
34
  "lodash": "^4.17.21",
@@ -59,7 +59,7 @@
59
59
  "@types/react-dom": "^17.0.11",
60
60
  "@types/react-virtualized": "^9.21.30",
61
61
  "@types/tinycolor2": "^1.4.6",
62
- "agora-toolchain": "^3.6.0",
62
+ "agora-toolchain": "~3.6.1",
63
63
  "core-js": "^3.33.3",
64
64
  "electron": "22.3.27",
65
65
  "husky": "^9.0.11",
@@ -71,4 +71,4 @@
71
71
  "lint-staged": {
72
72
  "*.{ts,tsx,html,css}": "prettier --write"
73
73
  }
74
- }
74
+ }