fcr-ui-scene 3.7.7 → 3.7.8

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 (58) hide show
  1. package/installer/icons/icon.png +0 -0
  2. package/installer/mac/entitlements.mac.plist +5 -1
  3. package/lib/creator/provider-initializer.browser.js +2 -2
  4. package/lib/creator/provider-initializer.electron.js +2 -2
  5. package/lib/electron/bootstrap-sdk.js +70 -33
  6. package/lib/electron/hang-detection/index.d.ts +3 -0
  7. package/lib/electron/hang-detection/index.js +15 -0
  8. package/lib/electron/hang-detection/manager.d.ts +28 -0
  9. package/lib/electron/hang-detection/manager.js +231 -0
  10. package/lib/electron/hang-detection/types.d.ts +14 -0
  11. package/lib/electron/hang-detection/types.js +6 -0
  12. package/lib/electron/until.d.ts +1 -4
  13. package/lib/electron/until.js +9 -4
  14. package/lib/modules/action-bar/components/screen-share/index.electron.js +1 -1
  15. package/lib/modules/action-bar/index.d.ts +0 -2
  16. package/lib/modules/action-bar/index.js +1 -2
  17. package/lib/modules/action-bar/store.d.ts +3 -6
  18. package/lib/modules/action-bar/store.js +96 -53
  19. package/lib/modules/annotation/store.js +10 -9
  20. package/lib/modules/components/control-bar/components/switch-theme/index.js +4 -2
  21. package/lib/modules/components/control-bar/index.js +1 -3
  22. package/lib/modules/event-confirm/components/window/index.d.ts +2 -5
  23. package/lib/modules/event-confirm/components/window/index.js +14 -38
  24. package/lib/modules/event-confirm/store.d.ts +5 -10
  25. package/lib/modules/event-confirm/store.js +13 -62
  26. package/lib/modules/event-confirm/view.js +7 -9
  27. package/lib/modules/layout/store.js +22 -8
  28. package/lib/modules/participant/store.base.js +0 -1
  29. package/lib/modules/participant/store.js +12 -14
  30. package/lib/modules/share-screen/store.d.ts +1 -1
  31. package/lib/modules/share-screen/store.electron.js +9 -0
  32. package/lib/modules/share-screen/store.js +4 -14
  33. package/lib/modules/state-bar/store.base.electron.js +6 -2
  34. package/lib/providers/board-share/bar-control/base.d.ts +2 -0
  35. package/lib/providers/board-share/bar-control/base.js +13 -3
  36. package/lib/providers/board-share/bar-control/electron.d.ts +1 -0
  37. package/lib/providers/board-share/bar-control/electron.js +15 -4
  38. package/lib/providers/board-share/provider.base.d.ts +1 -0
  39. package/lib/providers/board-share/provider.base.js +3 -1
  40. package/lib/providers/board-share/provider.electron.d.ts +1 -0
  41. package/lib/providers/board-share/provider.electron.js +8 -2
  42. package/lib/providers/board-share/type.d.ts +2 -0
  43. package/lib/providers/dialog/provider.electron.js +10 -2
  44. package/lib/providers/screen-share/strategy/browser.js +50 -3
  45. package/lib/providers/screen-share/strategy/electron.js +77 -8
  46. package/lib/providers/screen-share/stream-state-sync.d.ts +3 -1
  47. package/lib/providers/screen-share/stream-state-sync.js +133 -40
  48. package/lib/providers/screen-share-provider.d.ts +7 -8
  49. package/lib/providers/screen-share-provider.js +70 -85
  50. package/lib/providers/sharing-provider.js +0 -7
  51. package/lib/providers/whiteboard-provider.js +0 -1
  52. package/lib/shared-data-source/confirm-data.d.ts +0 -19
  53. package/lib/shared-data-source/confirm-data.js +15 -119
  54. package/lib/shared-data-source/screen-share-data.d.ts +17 -10
  55. package/lib/shared-data-source/screen-share-data.js +16 -9
  56. package/lib/shared-data-source/whiteboard-data.d.ts +5 -7
  57. package/lib/shared-data-source/whiteboard-data.js +8 -9
  58. package/package.json +5 -5
@@ -29,7 +29,6 @@ import { FcrUIScreenShareSharedDataSource } from '../../shared-data-source/scree
29
29
  import { FcrUIAbilityProviderImpl } from '../../providers/ability-provider';
30
30
  import { FcrUISharedApplistSource } from '../../shared-data-source/app-list-data';
31
31
  import { FcrUIApplistProvider } from '../../providers/app-list-provider';
32
- import { FcrUISharedWhiteboardDataSource } from '../../shared-data-source/whiteboard-data';
33
32
  export declare enum AudioConnectType {
34
33
  NONE = 0,
35
34
  COMPUTER = 1,
@@ -63,7 +62,6 @@ export default class ActionBarStore {
63
62
  private _abilityProvider;
64
63
  private _applistProvider;
65
64
  private _sharedApplistDataSource;
66
- private _sharedWhiteboardDataSource;
67
65
  private _userObserver;
68
66
  private _roomObserver;
69
67
  private _mainRoomObserver;
@@ -80,6 +78,7 @@ export default class ActionBarStore {
80
78
  accessor cloudRecordingState: FcrRecordingState;
81
79
  accessor connectionSettingVisible: boolean;
82
80
  accessor folded: boolean;
81
+ accessor boardOwnerUser: FcrUserInfo | null;
83
82
  accessor showArrow: boolean;
84
83
  accessor phoneMicEnabled: boolean;
85
84
  accessor chatTabIndex: FcrUIRoomType;
@@ -111,7 +110,6 @@ export default class ActionBarStore {
111
110
  abilityProvider: FcrUIAbilityProviderImpl;
112
111
  applistProvider: FcrUIApplistProvider;
113
112
  sharedApplistDataSource: FcrUISharedApplistSource;
114
- sharedWhiteboardDataSource: FcrUISharedWhiteboardDataSource;
115
113
  });
116
114
  private _handleApplistItemClick;
117
115
  get checkedStateMap(): FcrSecurityCheckedStateType;
@@ -154,6 +152,7 @@ export default class ActionBarStore {
154
152
  get hasWatermarkDisablePermission(): boolean;
155
153
  get hasEnableStartSharePermission(): boolean;
156
154
  get hasAllowWriteBoardPermission(): boolean;
155
+ get hasCloseWriteBoardPermission(): boolean;
157
156
  get hasScreenShare(): boolean;
158
157
  get hasAllowScreenShareAndBoardPermission(): boolean;
159
158
  get hasAllowChatPermission(): boolean;
@@ -175,10 +174,8 @@ export default class ActionBarStore {
175
174
  get endMeetingPopoverOpened(): boolean;
176
175
  set newMessageCount(value: import("./types").ChatRoomStoreMap);
177
176
  get latestMessage(): import("../../providers/chat-provider").FcrChatRoomReceiveMessage | undefined;
177
+ get isRecordingSupported(): boolean;
178
178
  get hasSecurityPermissions(): boolean;
179
- get isMeSharingScreen(): boolean;
180
- get isMeSharingBoard(): boolean;
181
- get boardOwnerUser(): FcrUserInfo | undefined;
182
179
  pauseCloudRecording(): void;
183
180
  resumeCloudRecording(): void;
184
181
  stopCloudRecording(): void;
@@ -75,15 +75,16 @@ var _type = require("fcr-core/lib/type");
75
75
  var _decorator = require("agora-foundation/lib/decorator");
76
76
  var _type2 = require("../../type");
77
77
  var _env = require("agora-foundation/lib/utilities/env");
78
- var _type3 = require("agora-ui-foundation/lib/components/icon/type");
78
+ var _type3 = require("../whiteboard/type");
79
+ var _type4 = require("agora-ui-foundation/lib/components/icon/type");
79
80
  var _i18n = require("agora-ui-foundation/lib/i18n");
80
- var _type4 = require("fcr-core/lib/room-control/type");
81
+ var _type5 = require("fcr-core/lib/room-control/type");
81
82
  var _react = require("react");
82
83
  var _constant = require("../../utilities/constant");
83
84
  var _enums = require("./enums");
84
85
  var _logger = require("../../utilities/logger");
85
86
  var _ActionBarStore;
86
- var _initProto, _init_newMessageTooltipVisible, _init_totalWaitingRoomUser, _init_liveStreamingState, _init_currentMenuIs, _init_cloudRecordingState, _init_connectionSettingVisible, _init_folded, _init_showArrow, _init_phoneMicEnabled, _init_chatTabIndex, _init_stateBarLeaveMeeting, _init_hasOfflineUserExistence, _init_connectionState, _init_appActionbarPopoverVisible, _setCheckedStateMapDecs, _pauseCloudRecordingDecs, _resumeCloudRecordingDecs, _stopCloudRecordingDecs, _showLockedRoomToastDecs, _toggleLayoutBarLockDecs, _showNewMessageTooltipDecs, _hideNewMessageTooltipDecs, _switchMenuDecs, _setPopoverOpenedDecs, _setStateBarLeaveMeetingDecs, _handleJoinWaitingRoomDecs, _toggleFoldDecs, _setShowArrowDecs, _setEnableWaitingRoomDecs, _kickOutWaitingRoomAllMemberDecs, _moveToMainRoomAllMemberDecs, _handleRemoteUsersJoinedDecs, _handleRemoteUsersLeftDecs, _handleLiveStreamingStateUpdatedDecs, _handleChatVisibleDecs, _setAppActionbarPopoverVisibleDecs, _operateWaitingRoomDecs, _handleCloudRecordingStateUpdatedDecs, _setOutputLanguageDecs, _subscribeLanguageDecs, _subscribeExtraOriginLanguageDecs, _getOfflineUserExistenceStateDecs, _clickWidgetDecs, _closeWidgetDecs, _ref;
87
+ var _initProto, _init_newMessageTooltipVisible, _init_totalWaitingRoomUser, _init_liveStreamingState, _init_currentMenuIs, _init_cloudRecordingState, _init_connectionSettingVisible, _init_folded, _init_boardOwnerUser, _init_showArrow, _init_phoneMicEnabled, _init_chatTabIndex, _init_stateBarLeaveMeeting, _init_hasOfflineUserExistence, _init_connectionState, _init_appActionbarPopoverVisible, _setCheckedStateMapDecs, _pauseCloudRecordingDecs, _resumeCloudRecordingDecs, _stopCloudRecordingDecs, _showLockedRoomToastDecs, _toggleLayoutBarLockDecs, _showNewMessageTooltipDecs, _hideNewMessageTooltipDecs, _switchMenuDecs, _setPopoverOpenedDecs, _setStateBarLeaveMeetingDecs, _handleJoinWaitingRoomDecs, _toggleFoldDecs, _setShowArrowDecs, _setEnableWaitingRoomDecs, _kickOutWaitingRoomAllMemberDecs, _moveToMainRoomAllMemberDecs, _handleRemoteUsersJoinedDecs, _handleRemoteUsersLeftDecs, _handleLiveStreamingStateUpdatedDecs, _handleChatVisibleDecs, _setAppActionbarPopoverVisibleDecs, _operateWaitingRoomDecs, _handleCloudRecordingStateUpdatedDecs, _setOutputLanguageDecs, _subscribeLanguageDecs, _subscribeExtraOriginLanguageDecs, _getOfflineUserExistenceStateDecs, _clickWidgetDecs, _closeWidgetDecs, _ref;
87
88
  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; }
88
89
  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; }
89
90
  function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
@@ -116,6 +117,7 @@ var _K = /*#__PURE__*/new WeakMap();
116
117
  var _L = /*#__PURE__*/new WeakMap();
117
118
  var _M = /*#__PURE__*/new WeakMap();
118
119
  var _N = /*#__PURE__*/new WeakMap();
120
+ var _O = /*#__PURE__*/new WeakMap();
119
121
  _ref = (_setCheckedStateMapDecs = [_mobx.action, _mobx.action.bound], _pauseCloudRecordingDecs = [_decorator.bound, (0, _decorator.debounced)(500, {
120
122
  leading: true
121
123
  })], _resumeCloudRecordingDecs = [_decorator.bound, (0, _decorator.debounced)(500, {
@@ -168,13 +170,14 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
168
170
  _classPrivateFieldInitSpec(this, _E, _init_cloudRecordingState(this));
169
171
  _classPrivateFieldInitSpec(this, _F, _init_connectionSettingVisible(this, false));
170
172
  _classPrivateFieldInitSpec(this, _G, _init_folded(this, false));
171
- _classPrivateFieldInitSpec(this, _H, _init_showArrow(this, false));
172
- _classPrivateFieldInitSpec(this, _I, _init_phoneMicEnabled(this, false));
173
- _classPrivateFieldInitSpec(this, _J, _init_chatTabIndex(this, _type2.FcrUIRoomType.MAIN_ROOM));
174
- _classPrivateFieldInitSpec(this, _K, _init_stateBarLeaveMeeting(this, false));
175
- _classPrivateFieldInitSpec(this, _L, _init_hasOfflineUserExistence(this, true));
176
- _classPrivateFieldInitSpec(this, _M, _init_connectionState(this, _fcrCore.FcrConnectionState.CONNECTED));
177
- _classPrivateFieldInitSpec(this, _N, _init_appActionbarPopoverVisible(this, false));
173
+ _classPrivateFieldInitSpec(this, _H, _init_boardOwnerUser(this, null));
174
+ _classPrivateFieldInitSpec(this, _I, _init_showArrow(this, false));
175
+ _classPrivateFieldInitSpec(this, _J, _init_phoneMicEnabled(this, false));
176
+ _classPrivateFieldInitSpec(this, _K, _init_chatTabIndex(this, _type2.FcrUIRoomType.MAIN_ROOM));
177
+ _classPrivateFieldInitSpec(this, _L, _init_stateBarLeaveMeeting(this, false));
178
+ _classPrivateFieldInitSpec(this, _M, _init_hasOfflineUserExistence(this, true));
179
+ _classPrivateFieldInitSpec(this, _N, _init_connectionState(this, _fcrCore.FcrConnectionState.CONNECTED));
180
+ _classPrivateFieldInitSpec(this, _O, _init_appActionbarPopoverVisible(this, false));
178
181
  this._roomProvider = args.roomProvider;
179
182
  this._roomControl = args.roomControl;
180
183
  this._deviceProvider = args.deviceProvider;
@@ -196,7 +199,6 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
196
199
  this._abilityProvider = args.abilityProvider;
197
200
  this._applistProvider = args.applistProvider;
198
201
  this._sharedApplistDataSource = args.sharedApplistDataSource;
199
- this._sharedWhiteboardDataSource = args.sharedWhiteboardDataSource;
200
202
  this._applistProvider.addObserver(this._applistObserver);
201
203
  this._userControl = this._roomControl.getUserControl();
202
204
  this._roomType = (_this$_roomControl$ge = this._roomControl.getRoomInfo()) === null || _this$_roomControl$ge === void 0 ? void 0 : _this$_roomControl$ge.roomType;
@@ -204,7 +206,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
204
206
  this.cloudRecordingState = this._roomControl.getCloudRecordingState();
205
207
  if (args.interpreterProvider) {
206
208
  this._interpreterProvider = args.interpreterProvider;
207
- if (this._roomType === _type4.FcrRoomType.Mainroom) {
209
+ if (this._roomType === _type5.FcrRoomType.Mainroom) {
208
210
  this._roomProvider.addObserver(this._roomObserver);
209
211
  this._interpreterProvider.addObserver(this._interpreterProviderObserver);
210
212
  }
@@ -315,7 +317,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
315
317
  _classPrivateFieldSet(_G, this, v);
316
318
  }
317
319
  }, {
318
- key: "showArrow",
320
+ key: "boardOwnerUser",
319
321
  get: function get() {
320
322
  return _classPrivateFieldGet(_H, this);
321
323
  },
@@ -323,7 +325,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
323
325
  _classPrivateFieldSet(_H, this, v);
324
326
  }
325
327
  }, {
326
- key: "phoneMicEnabled",
328
+ key: "showArrow",
327
329
  get: function get() {
328
330
  return _classPrivateFieldGet(_I, this);
329
331
  },
@@ -331,7 +333,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
331
333
  _classPrivateFieldSet(_I, this, v);
332
334
  }
333
335
  }, {
334
- key: "chatTabIndex",
336
+ key: "phoneMicEnabled",
335
337
  get: function get() {
336
338
  return _classPrivateFieldGet(_J, this);
337
339
  },
@@ -339,7 +341,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
339
341
  _classPrivateFieldSet(_J, this, v);
340
342
  }
341
343
  }, {
342
- key: "stateBarLeaveMeeting",
344
+ key: "chatTabIndex",
343
345
  get: function get() {
344
346
  return _classPrivateFieldGet(_K, this);
345
347
  },
@@ -347,7 +349,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
347
349
  _classPrivateFieldSet(_K, this, v);
348
350
  }
349
351
  }, {
350
- key: "hasOfflineUserExistence",
352
+ key: "stateBarLeaveMeeting",
351
353
  get: function get() {
352
354
  return _classPrivateFieldGet(_L, this);
353
355
  },
@@ -355,7 +357,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
355
357
  _classPrivateFieldSet(_L, this, v);
356
358
  }
357
359
  }, {
358
- key: "connectionState",
360
+ key: "hasOfflineUserExistence",
359
361
  get: function get() {
360
362
  return _classPrivateFieldGet(_M, this);
361
363
  },
@@ -363,13 +365,21 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
363
365
  _classPrivateFieldSet(_M, this, v);
364
366
  }
365
367
  }, {
366
- key: "appActionbarPopoverVisible",
368
+ key: "connectionState",
367
369
  get: function get() {
368
370
  return _classPrivateFieldGet(_N, this);
369
371
  },
370
372
  set: function set(v) {
371
373
  _classPrivateFieldSet(_N, this, v);
372
374
  }
375
+ }, {
376
+ key: "appActionbarPopoverVisible",
377
+ get: function get() {
378
+ return _classPrivateFieldGet(_O, this);
379
+ },
380
+ set: function set(v) {
381
+ _classPrivateFieldSet(_O, this, v);
382
+ }
373
383
  }, {
374
384
  key: "_handleApplistItemClick",
375
385
  value: function _handleApplistItemClick() {
@@ -516,7 +526,8 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
516
526
  }, {
517
527
  key: "hasStopScreenSharePermission",
518
528
  get: function get() {
519
- return this.hasScreenShare && this.hasEnableStartScreenSharePermission && this.sharingOwnerUser && !this.isMeSharingScreen;
529
+ var _this$sharingOwnerUse;
530
+ return this.hasScreenShare && this.hasEnableStartScreenSharePermission && this.sharingOwnerUser && this.localUserId !== ((_this$sharingOwnerUse = this.sharingOwnerUser) === null || _this$sharingOwnerUse === void 0 ? void 0 : _this$sharingOwnerUse.userId);
520
531
  }
521
532
  }, {
522
533
  key: "sharingOwnerUser",
@@ -526,7 +537,8 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
526
537
  }, {
527
538
  key: "hasEnableStartScreenSharePermission",
528
539
  get: function get() {
529
- return this._privilegeProvider.hasStopScreenSharePermission();
540
+ var _this$sharingOwnerUse2;
541
+ return this._privilegeProvider.hasStopScreenSharePermission((_this$sharingOwnerUse2 = this.sharingOwnerUser) === null || _this$sharingOwnerUse2 === void 0 ? void 0 : _this$sharingOwnerUse2.userRole);
530
542
  }
531
543
  }, {
532
544
  key: "hasStartLiveStreamingPermission",
@@ -583,6 +595,12 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
583
595
  get: function get() {
584
596
  return this._privilegeProvider.hasAllowWriteBoardPermission();
585
597
  }
598
+ }, {
599
+ key: "hasCloseWriteBoardPermission",
600
+ get: function get() {
601
+ var _this$boardOwnerUser;
602
+ return this._privilegeProvider.hasCloseBoardPermission((_this$boardOwnerUser = this.boardOwnerUser) === null || _this$boardOwnerUser === void 0 ? void 0 : _this$boardOwnerUser.userRole);
603
+ }
586
604
  }, {
587
605
  key: "hasScreenShare",
588
606
  get: function get() {
@@ -658,7 +676,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
658
676
  }, {
659
677
  key: "isMainRoom",
660
678
  get: function get() {
661
- return this._roomType === _type4.FcrRoomType.Mainroom;
679
+ return this._roomType === _type5.FcrRoomType.Mainroom;
662
680
  }
663
681
  }, {
664
682
  key: "hasAllowChangeNamePromission",
@@ -689,26 +707,14 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
689
707
  return this._sharedChatDataSource.latestMessage;
690
708
  }
691
709
  }, {
692
- key: "hasSecurityPermissions",
693
- get: function get() {
694
- return this.hasEnableStartSharePermission || this.hasAllowChatPermission || this.hasEnableStartAudioPermission || this.hasEnableChangeNamePermission || this.hasEnableStartVideoPermission || this.hasLockRoomPermission;
695
- }
696
- }, {
697
- key: "isMeSharingScreen",
710
+ key: "isRecordingSupported",
698
711
  get: function get() {
699
- var _this$_sharedScreenSh;
700
- return ((_this$_sharedScreenSh = this._sharedScreenShareSharedDataSource.screenSharingOwner) === null || _this$_sharedScreenSh === void 0 ? void 0 : _this$_sharedScreenSh.userId) === this.localUserId;
712
+ return this._abilityProvider.isRecordingSupported();
701
713
  }
702
714
  }, {
703
- key: "isMeSharingBoard",
704
- get: function get() {
705
- var _this$_sharedWhiteboa;
706
- return ((_this$_sharedWhiteboa = this._sharedWhiteboardDataSource) === null || _this$_sharedWhiteboa === void 0 || (_this$_sharedWhiteboa = _this$_sharedWhiteboa.sharingUserInfo) === null || _this$_sharedWhiteboa === void 0 ? void 0 : _this$_sharedWhiteboa.userId) === this.localUserId;
707
- }
708
- }, {
709
- key: "boardOwnerUser",
715
+ key: "hasSecurityPermissions",
710
716
  get: function get() {
711
- return this._sharedWhiteboardDataSource.sharingUserInfo;
717
+ return this.hasEnableStartSharePermission || this.hasAllowChatPermission || this.hasEnableStartAudioPermission || this.hasEnableChangeNamePermission || this.hasEnableStartVideoPermission || this.hasLockRoomPermission;
712
718
  }
713
719
  }, {
714
720
  key: "pauseCloudRecording",
@@ -831,7 +837,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
831
837
  this._roomControl.removeObserver(this._mainRoomObserver);
832
838
  this._eventProvider.removeObserver(this._uiEventObserver);
833
839
  this._applistProvider.removeObserver(this._applistObserver);
834
- if (this._roomType === _type4.FcrRoomType.Mainroom) {
840
+ if (this._roomType === _type5.FcrRoomType.Mainroom) {
835
841
  var _this$_interpreterPro;
836
842
  this._roomProvider.removeObserver(this._roomObserver);
837
843
  (_this$_interpreterPro = this._interpreterProvider) === null || _this$_interpreterPro === void 0 || _this$_interpreterPro.removeObserver(this._interpreterProviderObserver);
@@ -1198,12 +1204,12 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
1198
1204
  key: "_interceptShareScreen",
1199
1205
  value: function _interceptShareScreen() {
1200
1206
  var _this5 = this;
1201
- if (this.sharingOwnerUser && !this.isMeSharingScreen || this.boardOwnerUser && !this.isMeSharingBoard) {
1202
- var _this$sharingOwnerUse;
1207
+ if (this.hasScreenShare || this.boardOwnerUser && this.boardOwnerUser.userId !== this.localUserId) {
1208
+ var _this$sharingOwnerUse3;
1203
1209
  var confirmKey = this._dialogProvider.openConfirmDialog({
1204
1210
  title: (0, _i18n.transI18n)('fmt_share_tips_otherssharing'),
1205
1211
  content: (0, _i18n.transI18n)("fmt_share_tips_stopothersharing", {
1206
- reason1: ((_this$sharingOwnerUse = this.sharingOwnerUser) === null || _this$sharingOwnerUse === void 0 ? void 0 : _this$sharingOwnerUse.userName) || (0, _i18n.transI18n)('fmt_actionbar_screenshare_labels_others')
1212
+ reason1: ((_this$sharingOwnerUse3 = this.sharingOwnerUser) === null || _this$sharingOwnerUse3 === void 0 ? void 0 : _this$sharingOwnerUse3.userName) || (0, _i18n.transI18n)('fmt_actionbar_screenshare_labels_others')
1207
1213
  }),
1208
1214
  okText: (0, _i18n.transI18n)('fmt_screenshare_continue_share'),
1209
1215
  okButtonProps: {
@@ -1228,9 +1234,9 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
1228
1234
  key: "_interceptShareBoard",
1229
1235
  value: function _interceptShareBoard() {
1230
1236
  var _this6 = this;
1231
- if (this.boardOwnerUser && !this.isMeSharingBoard) {
1237
+ if (this.boardOwnerUser && this.boardOwnerUser.userId !== this.localUserId) {
1232
1238
  var confirmKey = this._dialogProvider.openConfirmDialog({
1233
- icon: _type3.FcrIconType.FCR_SCREENSHARING,
1239
+ icon: _type4.FcrIconType.FCR_SCREENSHARING,
1234
1240
  title: (0, _i18n.transI18n)('fmt_share_tips_othersharingboard'),
1235
1241
  content: (0, _i18n.transI18n)("fmt_share_tips_boardonly"),
1236
1242
  okText: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_button_gotit'),
@@ -1297,6 +1303,26 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
1297
1303
  }, {
1298
1304
  key: "_onEvent",
1299
1305
  value: function _onEvent(action, payload) {
1306
+ // if (action === FcrUIAction.UPDATE_ASIDE) {
1307
+ // const { chat, participant } = payload as FcrUIUpdateAsideParams;
1308
+ // if (chat) {
1309
+ // this._chatRenderAt = 'aside';
1310
+ // this._handleChatVisible(true);
1311
+ // }
1312
+ // if (chat === false) {
1313
+ // this._handleChatVisible(false);
1314
+ // }
1315
+ // if (participant) {
1316
+ // this._participantsRenderAt = 'aside';
1317
+ // this._participantVisible = true;
1318
+ // }
1319
+ // if (participant === false) {
1320
+ // this._participantVisible = false;
1321
+ // }
1322
+ // }
1323
+ // if (action === FcrUIAction.RECEIVE_NEW_CHAT_MESSAGES) {
1324
+ // this._handleNewMessageEvent(payload as FcrUINewChatMessagesParams);
1325
+ // }
1300
1326
  if (action === _constant.FcrUIAction.CLOSE_DIALOG) {
1301
1327
  var _ref2 = payload,
1302
1328
  dialogId = _ref2.dialogId;
@@ -1336,11 +1362,27 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
1336
1362
  if (action === _constant.FcrUIAction.CLOSE_CONNECTION_DIALOG) {
1337
1363
  this.closeConnection();
1338
1364
  }
1365
+ if (action === _constant.FcrUIAction.WHITEBOARD_CHANGED) {
1366
+ var _ref4 = payload,
1367
+ _action = _ref4.action,
1368
+ value = _ref4.payload;
1369
+ if (_action === _type3.WhiteboardBaseEvents.SET_OWNER_USER_ID) {
1370
+ this.boardOwnerUser = value ? this.users.find(function (u) {
1371
+ return u.userId === value;
1372
+ }) : null;
1373
+ }
1374
+ }
1339
1375
  if (action === _constant.FcrUIAction.TOGGLE_PARTICIPANT_TAB) {
1340
1376
  if (!this.participantVisible) {
1341
1377
  this.toggleParticipants();
1342
1378
  }
1343
1379
  }
1380
+ // if (action === FcrUIAction.CURRENT_PARTITIPANT_TAB) {
1381
+ // if (payload === FcrRoomType.Waitingroom) {
1382
+ // this.isNewWaitingRoomUserEnter = false;
1383
+ // }
1384
+ // this._participantTab = payload as FcrRoomType;
1385
+ // }
1344
1386
  if (action === _constant.FcrUIAction.CHAT_ROOM_TAB_CHANGE) {
1345
1387
  this.chatTabIndex = payload;
1346
1388
  this.newMessageCount[this.chatTabIndex] = 0;
@@ -1510,7 +1552,7 @@ var ActionBarStore = exports["default"] = /*#__PURE__*/function () {
1510
1552
  }]);
1511
1553
  }();
1512
1554
  _ActionBarStore = ActionBarStore;
1513
- var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ActionBarStore, [[_mobx.observable, 1, "newMessageTooltipVisible"], [_mobx.observable, 1, "totalWaitingRoomUser"], [_mobx.observable, 1, "liveStreamingState"], [_mobx.observable, 1, "currentMenuIs"], [_mobx.observable, 1, "cloudRecordingState"], [_mobx.observable, 1, "connectionSettingVisible"], [_mobx.observable, 1, "folded"], [_mobx.observable, 1, "showArrow"], [_mobx.observable, 1, "phoneMicEnabled"], [_mobx.observable, 1, "chatTabIndex"], [_mobx.observable, 1, "stateBarLeaveMeeting"], [_mobx.observable, 1, "hasOfflineUserExistence"], [_mobx.observable, 1, "connectionState"], [_mobx.observable, 1, "appActionbarPopoverVisible"], [_mobx.computed, 3, "checkedStateMap"], [_setCheckedStateMapDecs, 18, "setCheckedStateMap"], [_mobx.computed, 3, "registeredWidgetConfigs"], [_mobx.computed, 3, "asideLayout"], [_mobx.computed, 3, "chatRenderAt"], [_mobx.computed, 3, "participantsRenderAt"], [_mobx.computed, 3, "participantVisible"], [_mobx.computed, 3, "chatVisible"], [_mobx.computed, 3, "hasStartScreenSharePermission"], [_mobx.computed, 3, "hasStopScreenSharePermission"], [_mobx.computed, 3, "sharingOwnerUser"], [_mobx.computed, 3, "hasEnableStartScreenSharePermission"], [_mobx.computed, 3, "hasStartLiveStreamingPermission"], [_mobx.computed, 3, "hasEnableStartAudioPermission"], [_mobx.computed, 3, "hasEnableChangeNamePermission"], [_mobx.computed, 3, "hasEnableStartVideoPermission"], [_mobx.computed, 3, "hasLockRoomPermission"], [_mobx.computed, 3, "hasEnableJoinWithAudioPermission"], [_mobx.computed, 3, "hasWaitingRoomPermission"], [_mobx.computed, 3, "hasWatermarkDisablePermission"], [_mobx.computed, 3, "hasEnableStartSharePermission"], [_mobx.computed, 3, "hasAllowWriteBoardPermission"], [_mobx.computed, 3, "hasAllowScreenShareAndBoardPermission"], [_mobx.computed, 3, "hasAllowChatPermission"], [_mobx.computed, 3, "hasStartCloudRecordingPermission"], [_mobx.computed, 3, "hasAssignHostBeforeLeavingPermission"], [_mobx.computed, 3, "hasEndRoomPermission"], [_mobx.computed, 3, "isScreenShareAndBoardEnabled"], [_mobx.computed, 3, "isBoardWriteEnabled"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "hasEnableInterpreterPermission"], [_mobx.computed, 3, "hasDisableInterpreterPermission"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "allNewMessage"], [_mobx.computed, 3, "isMainRoom"], [_mobx.computed, 3, "hasAllowChangeNamePromission"], [_mobx.computed, 3, "hasDisallowChangeNamePromission"], [_mobx.computed, 3, "newMessageCount"], [_mobx.computed, 3, "endMeetingPopoverOpened"], [_pauseCloudRecordingDecs, 2, "pauseCloudRecording"], [_resumeCloudRecordingDecs, 2, "resumeCloudRecording"], [_stopCloudRecordingDecs, 2, "stopCloudRecording"], [_decorator.bound, 2, "startCloudRecording"], [_showLockedRoomToastDecs, 18, "showLockedRoomToast"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_showNewMessageTooltipDecs, 18, "showNewMessageTooltip"], [_hideNewMessageTooltipDecs, 18, "hideNewMessageTooltip"], [_switchMenuDecs, 18, "switchMenu"], [_mobx.computed, 3, "isLocked"], [_decorator.bound, 2, "isWaitingRoomEnabled"], [_decorator.bound, 2, "isAllowJoinWithAudioEnabled"], [_decorator.bound, 2, "enableMicrophone"], [_decorator.bound, 2, "setAllowWriteBoard"], [_decorator.bound, 2, "setAllowAnnotation"], [_decorator.bound, 2, "setAllowScreenShare"], [_setPopoverOpenedDecs, 18, "setPopoverOpened"], [_setStateBarLeaveMeetingDecs, 18, "setStateBarLeaveMeeting"], [_decorator.bound, 2, "allowJoinWithMuteAudio"], [_decorator.bound, 2, "setAllowJoinWithMuteAudio"], [_decorator.bound, 2, "isLockRoomEnabled"], [_decorator.bound, 2, "setLockRoomEnabled"], [_decorator.bound, 2, "setAllowShareScreen"], [_decorator.bound, 2, "allowShareScreen"], [_decorator.bound, 2, "allowWriteBoard"], [_decorator.bound, 2, "allowChat"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "allowUnmuteSelfAudio"], [_decorator.bound, 2, "setAllowUnmuteSelfAudio"], [_decorator.bound, 2, "allowUnmuteSelfVideo"], [_decorator.bound, 2, "setAllowUnmuteSelfVideo"], [_decorator.bound, 2, "allowChangeName"], [_decorator.bound, 2, "toggleChat"], [_decorator.bound, 2, "openChat"], [_decorator.bound, 2, "closeChat"], [_decorator.bound, 2, "toggleParticipants"], [_decorator.bound, 2, "openParticipants"], [_decorator.bound, 2, "closeParticipants"], [_decorator.bound, 2, "openDeviceSettingDialog"], [_decorator.bound, 2, "startScreenShare"], [_decorator.bound, 2, "openInterpreterDialog"], [_decorator.bound, 2, "openWhiteboard"], [_decorator.bound, 2, "closeWhiteboard"], [_decorator.bound, 2, "closeShareScreen"], [_decorator.bound, 2, "openLiveStreamingDialog"], [_decorator.bound, 2, "toggleConnection"], [_decorator.bound, 2, "openConnection"], [_decorator.bound, 2, "closeConnection"], [_handleJoinWaitingRoomDecs, 18, "_handleJoinWaitingRoom"], [_toggleFoldDecs, 18, "toggleFold"], [_setShowArrowDecs, 18, "setShowArrow"], [_setEnableWaitingRoomDecs, 18, "setEnableWaitingRoom"], [_kickOutWaitingRoomAllMemberDecs, 18, "kickOutWaitingRoomAllMember"], [_moveToMainRoomAllMemberDecs, 18, "moveToMainRoomAllMember"], [_decorator.bound, 2, "_interceptShareScreen"], [_decorator.bound, 2, "_interceptShareBoard"], [_handleRemoteUsersJoinedDecs, 18, "_handleRemoteUsersJoined"], [_handleRemoteUsersLeftDecs, 18, "_handleRemoteUsersLeft"], [_handleLiveStreamingStateUpdatedDecs, 18, "_handleLiveStreamingStateUpdated"], [_handleChatVisibleDecs, 18, "_handleChatVisible"], [_setAppActionbarPopoverVisibleDecs, 18, "setAppActionbarPopoverVisible"], [_decorator.bound, 2, "setAllowWaterMark"], [_decorator.bound, 2, "setWaterMarkLineType"], [_decorator.bound, 2, "setAlllowChangeName"], [_decorator.bound, 2, "_onEvent"], [_operateWaitingRoomDecs, 18, "_operateWaitingRoom"], [_handleCloudRecordingStateUpdatedDecs, 18, "_handleCloudRecordingStateUpdated"], [_setOutputLanguageDecs, 18, "setOutputLanguage"], [_subscribeLanguageDecs, 18, "subscribeLanguage"], [_subscribeExtraOriginLanguageDecs, 18, "subscribeExtraOriginLanguage"], [_getOfflineUserExistenceStateDecs, 18, "getOfflineUserExistenceState"], [_clickWidgetDecs, 18, "clickWidget"], [_closeWidgetDecs, 18, "closeWidget"]], []).e, 15);
1555
+ var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ActionBarStore, [[_mobx.observable, 1, "newMessageTooltipVisible"], [_mobx.observable, 1, "totalWaitingRoomUser"], [_mobx.observable, 1, "liveStreamingState"], [_mobx.observable, 1, "currentMenuIs"], [_mobx.observable, 1, "cloudRecordingState"], [_mobx.observable, 1, "connectionSettingVisible"], [_mobx.observable, 1, "folded"], [_mobx.observable, 1, "boardOwnerUser"], [_mobx.observable, 1, "showArrow"], [_mobx.observable, 1, "phoneMicEnabled"], [_mobx.observable, 1, "chatTabIndex"], [_mobx.observable, 1, "stateBarLeaveMeeting"], [_mobx.observable, 1, "hasOfflineUserExistence"], [_mobx.observable, 1, "connectionState"], [_mobx.observable, 1, "appActionbarPopoverVisible"], [_mobx.computed, 3, "checkedStateMap"], [_setCheckedStateMapDecs, 18, "setCheckedStateMap"], [_mobx.computed, 3, "registeredWidgetConfigs"], [_mobx.computed, 3, "asideLayout"], [_mobx.computed, 3, "chatRenderAt"], [_mobx.computed, 3, "participantsRenderAt"], [_mobx.computed, 3, "participantVisible"], [_mobx.computed, 3, "chatVisible"], [_mobx.computed, 3, "hasStartScreenSharePermission"], [_mobx.computed, 3, "hasStopScreenSharePermission"], [_mobx.computed, 3, "sharingOwnerUser"], [_mobx.computed, 3, "hasEnableStartScreenSharePermission"], [_mobx.computed, 3, "hasStartLiveStreamingPermission"], [_mobx.computed, 3, "hasEnableStartAudioPermission"], [_mobx.computed, 3, "hasEnableChangeNamePermission"], [_mobx.computed, 3, "hasEnableStartVideoPermission"], [_mobx.computed, 3, "hasLockRoomPermission"], [_mobx.computed, 3, "hasEnableJoinWithAudioPermission"], [_mobx.computed, 3, "hasWaitingRoomPermission"], [_mobx.computed, 3, "hasWatermarkDisablePermission"], [_mobx.computed, 3, "hasEnableStartSharePermission"], [_mobx.computed, 3, "hasAllowWriteBoardPermission"], [_mobx.computed, 3, "hasCloseWriteBoardPermission"], [_mobx.computed, 3, "hasAllowScreenShareAndBoardPermission"], [_mobx.computed, 3, "hasAllowChatPermission"], [_mobx.computed, 3, "hasStartCloudRecordingPermission"], [_mobx.computed, 3, "hasAssignHostBeforeLeavingPermission"], [_mobx.computed, 3, "hasEndRoomPermission"], [_mobx.computed, 3, "isScreenShareAndBoardEnabled"], [_mobx.computed, 3, "isBoardWriteEnabled"], [_mobx.computed, 3, "isWaterMarkEnabled"], [_mobx.computed, 3, "isMulti"], [_mobx.computed, 3, "hasEnableInterpreterPermission"], [_mobx.computed, 3, "hasDisableInterpreterPermission"], [_mobx.computed, 3, "microphoneEnabled"], [_mobx.computed, 3, "allNewMessage"], [_mobx.computed, 3, "isMainRoom"], [_mobx.computed, 3, "hasAllowChangeNamePromission"], [_mobx.computed, 3, "hasDisallowChangeNamePromission"], [_mobx.computed, 3, "newMessageCount"], [_mobx.computed, 3, "endMeetingPopoverOpened"], [_pauseCloudRecordingDecs, 2, "pauseCloudRecording"], [_resumeCloudRecordingDecs, 2, "resumeCloudRecording"], [_stopCloudRecordingDecs, 2, "stopCloudRecording"], [_decorator.bound, 2, "startCloudRecording"], [_showLockedRoomToastDecs, 18, "showLockedRoomToast"], [_toggleLayoutBarLockDecs, 18, "toggleLayoutBarLock"], [_showNewMessageTooltipDecs, 18, "showNewMessageTooltip"], [_hideNewMessageTooltipDecs, 18, "hideNewMessageTooltip"], [_switchMenuDecs, 18, "switchMenu"], [_mobx.computed, 3, "isLocked"], [_decorator.bound, 2, "isWaitingRoomEnabled"], [_decorator.bound, 2, "isAllowJoinWithAudioEnabled"], [_decorator.bound, 2, "enableMicrophone"], [_decorator.bound, 2, "setAllowWriteBoard"], [_decorator.bound, 2, "setAllowAnnotation"], [_decorator.bound, 2, "setAllowScreenShare"], [_setPopoverOpenedDecs, 18, "setPopoverOpened"], [_setStateBarLeaveMeetingDecs, 18, "setStateBarLeaveMeeting"], [_decorator.bound, 2, "allowJoinWithMuteAudio"], [_decorator.bound, 2, "setAllowJoinWithMuteAudio"], [_decorator.bound, 2, "isLockRoomEnabled"], [_decorator.bound, 2, "setLockRoomEnabled"], [_decorator.bound, 2, "setAllowShareScreen"], [_decorator.bound, 2, "allowShareScreen"], [_decorator.bound, 2, "allowWriteBoard"], [_decorator.bound, 2, "allowChat"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "allowUnmuteSelfAudio"], [_decorator.bound, 2, "setAllowUnmuteSelfAudio"], [_decorator.bound, 2, "allowUnmuteSelfVideo"], [_decorator.bound, 2, "setAllowUnmuteSelfVideo"], [_decorator.bound, 2, "allowChangeName"], [_decorator.bound, 2, "toggleChat"], [_decorator.bound, 2, "openChat"], [_decorator.bound, 2, "closeChat"], [_decorator.bound, 2, "toggleParticipants"], [_decorator.bound, 2, "openParticipants"], [_decorator.bound, 2, "closeParticipants"], [_decorator.bound, 2, "openDeviceSettingDialog"], [_decorator.bound, 2, "startScreenShare"], [_decorator.bound, 2, "openInterpreterDialog"], [_decorator.bound, 2, "openWhiteboard"], [_decorator.bound, 2, "closeWhiteboard"], [_decorator.bound, 2, "closeShareScreen"], [_decorator.bound, 2, "openLiveStreamingDialog"], [_decorator.bound, 2, "toggleConnection"], [_decorator.bound, 2, "openConnection"], [_decorator.bound, 2, "closeConnection"], [_handleJoinWaitingRoomDecs, 18, "_handleJoinWaitingRoom"], [_toggleFoldDecs, 18, "toggleFold"], [_setShowArrowDecs, 18, "setShowArrow"], [_setEnableWaitingRoomDecs, 18, "setEnableWaitingRoom"], [_kickOutWaitingRoomAllMemberDecs, 18, "kickOutWaitingRoomAllMember"], [_moveToMainRoomAllMemberDecs, 18, "moveToMainRoomAllMember"], [_decorator.bound, 2, "_interceptShareScreen"], [_decorator.bound, 2, "_interceptShareBoard"], [_handleRemoteUsersJoinedDecs, 18, "_handleRemoteUsersJoined"], [_handleRemoteUsersLeftDecs, 18, "_handleRemoteUsersLeft"], [_handleLiveStreamingStateUpdatedDecs, 18, "_handleLiveStreamingStateUpdated"], [_handleChatVisibleDecs, 18, "_handleChatVisible"], [_setAppActionbarPopoverVisibleDecs, 18, "setAppActionbarPopoverVisible"], [_decorator.bound, 2, "setAllowWaterMark"], [_decorator.bound, 2, "setWaterMarkLineType"], [_decorator.bound, 2, "setAlllowChangeName"], [_decorator.bound, 2, "_onEvent"], [_operateWaitingRoomDecs, 18, "_operateWaitingRoom"], [_handleCloudRecordingStateUpdatedDecs, 18, "_handleCloudRecordingStateUpdated"], [_setOutputLanguageDecs, 18, "setOutputLanguage"], [_subscribeLanguageDecs, 18, "subscribeLanguage"], [_subscribeExtraOriginLanguageDecs, 18, "subscribeExtraOriginLanguage"], [_getOfflineUserExistenceStateDecs, 18, "getOfflineUserExistenceState"], [_clickWidgetDecs, 18, "clickWidget"], [_closeWidgetDecs, 18, "closeWidget"]], []).e, 16);
1514
1556
  _init_newMessageTooltipVisible = _applyDecs$e[0];
1515
1557
  _init_totalWaitingRoomUser = _applyDecs$e[1];
1516
1558
  _init_liveStreamingState = _applyDecs$e[2];
@@ -1518,12 +1560,13 @@ _init_currentMenuIs = _applyDecs$e[3];
1518
1560
  _init_cloudRecordingState = _applyDecs$e[4];
1519
1561
  _init_connectionSettingVisible = _applyDecs$e[5];
1520
1562
  _init_folded = _applyDecs$e[6];
1521
- _init_showArrow = _applyDecs$e[7];
1522
- _init_phoneMicEnabled = _applyDecs$e[8];
1523
- _init_chatTabIndex = _applyDecs$e[9];
1524
- _init_stateBarLeaveMeeting = _applyDecs$e[10];
1525
- _init_hasOfflineUserExistence = _applyDecs$e[11];
1526
- _init_connectionState = _applyDecs$e[12];
1527
- _init_appActionbarPopoverVisible = _applyDecs$e[13];
1528
- _initProto = _applyDecs$e[14];
1563
+ _init_boardOwnerUser = _applyDecs$e[7];
1564
+ _init_showArrow = _applyDecs$e[8];
1565
+ _init_phoneMicEnabled = _applyDecs$e[9];
1566
+ _init_chatTabIndex = _applyDecs$e[10];
1567
+ _init_stateBarLeaveMeeting = _applyDecs$e[11];
1568
+ _init_hasOfflineUserExistence = _applyDecs$e[12];
1569
+ _init_connectionState = _applyDecs$e[13];
1570
+ _init_appActionbarPopoverVisible = _applyDecs$e[14];
1571
+ _initProto = _applyDecs$e[15];
1529
1572
  var ActionBarContext = exports.ActionBarContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -512,19 +512,20 @@ var AnnotationStore = exports.AnnotationStore = /*#__PURE__*/function () {
512
512
  }, {
513
513
  key: "_addWindowResizeListener",
514
514
  value: function _addWindowResizeListener() {
515
- // if (!this._resizeWatcherTimer && isElectron()) {
516
- // this._resizeWatcherTimer = setInterval(() => {
517
- // this._updateBoundsByActiveWindow();
518
- // }, 2000);
519
- // }
515
+ var _this3 = this;
516
+ if (!this._resizeWatcherTimer && (0, _env.isElectron)()) {
517
+ this._resizeWatcherTimer = setInterval(function () {
518
+ _this3._updateBoundsByActiveWindow();
519
+ }, 2000);
520
+ }
520
521
  }
521
522
  }, {
522
523
  key: "_removeWindowResizeListenner",
523
524
  value: function _removeWindowResizeListenner() {
524
- // if (this._resizeWatcherTimer && isElectron()) {
525
- // clearInterval(this._resizeWatcherTimer);
526
- // this._resizeWatcherTimer = null;
527
- // }
525
+ if (this._resizeWatcherTimer && (0, _env.isElectron)()) {
526
+ clearInterval(this._resizeWatcherTimer);
527
+ this._resizeWatcherTimer = null;
528
+ }
528
529
  }
529
530
  }, {
530
531
  key: "_checkIfAnnotationCanStart",
@@ -39,7 +39,9 @@ var WhiteboardSwitchTheme = function WhiteboardSwitchTheme(props) {
39
39
  },
40
40
  overlayOffset: 4,
41
41
  showArrow: false,
42
- getTooltipContainer: function getTooltipContainer() {
42
+ getTooltipContainer: function getTooltipContainer(_target) {
43
+ // window.document 是主窗口内的, 为了在子窗口中获取主窗口的 DOM 节点, 所以使用 _target.ownerDocument
44
+ var document = _target.ownerDocument || window.document;
43
45
  var target = document.getElementById('fcr-whiteboard-controlbar');
44
46
  return target;
45
47
  },
@@ -57,7 +59,7 @@ var WhiteboardSwitchTheme = function WhiteboardSwitchTheme(props) {
57
59
  return item.theme === theme.theme;
58
60
  });
59
61
  setTheme(result);
60
- setWhiteboardVisible(false);
62
+ setWhiteboardVisible(!whiteboardVisible);
61
63
  }
62
64
  }, theme.theme);
63
65
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
@@ -291,9 +291,7 @@ var WhiteboardControlbar = exports.WhiteboardControlbar = function WhiteboardCon
291
291
  className: "fcr-whiteboard-controlbar-item",
292
292
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_switchTheme["default"], {
293
293
  whiteboardVisible: showSwitchTheme,
294
- setWhiteboardVisible: function setWhiteboardVisible() {
295
- return setShowSwitchTheme(!showSwitchTheme);
296
- },
294
+ setWhiteboardVisible: setShowSwitchTheme,
297
295
  currentThemeType: currentTheme,
298
296
  setTheme: setTheme
299
297
  })
@@ -1,7 +1,4 @@
1
1
  import { ConfirmContentProps } from 'agora-ui-foundation/lib/components/confirm-content';
2
- type ConfirmWindowProps = {
3
- id: string;
2
+ export declare const ConfirmWindow: ({ confirm }: {
4
3
  confirm: ConfirmContentProps;
5
- };
6
- export declare const ConfirmWindow: ({ id, confirm }: ConfirmWindowProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -39,14 +39,12 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
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; }
40
40
  var ConfirmWindow = exports.ConfirmWindow = (0, _mobxReact.observer)(function (_ref) {
41
41
  var _rndRef$current;
42
- var id = _ref.id,
43
- confirm = _ref.confirm;
42
+ var confirm = _ref.confirm;
44
43
  var _useContext = (0, _react.useContext)(_store.StoreContext),
45
44
  screenBounds = _useContext.screenBounds,
46
45
  calculateMethods = _useContext.calculateMethods,
47
- removeObserverWindow = _useContext.removeObserverWindow,
48
46
  log = _useContext.log,
49
- setObserverWindow = _useContext.setObserverWindow;
47
+ mousePosition = _useContext.mousePosition;
50
48
  var _ref2 = (0, _env.isElectron)() ? (0, _react.useContext)(_useElectron.DialogInstanceContext) : {},
51
49
  browserWindow = _ref2.browserWindow;
52
50
  var rndRef = (0, _react.useRef)(null);
@@ -88,10 +86,6 @@ var ConfirmWindow = exports.ConfirmWindow = (0, _mobxReact.observer)(function (_
88
86
  x: Math.max(0, Math.min(maxX, x)),
89
87
  y: Math.max(0, Math.min(maxY, y))
90
88
  };
91
- setObserverWindow(id, _objectSpread({
92
- width: defaultSize.width,
93
- height: rndRef.current.getBoundingClientRect().height
94
- }, coord));
95
89
  setBounds(coord);
96
90
  });
97
91
  function recalculate(bounds) {
@@ -115,44 +109,26 @@ var ConfirmWindow = exports.ConfirmWindow = (0, _mobxReact.observer)(function (_
115
109
  var handleRecalculate = function handleRecalculate() {
116
110
  return recalculate();
117
111
  };
118
- (0, _react.useEffect)(function () {
112
+ var initMouseEvents = function initMouseEvents(position) {
113
+ // 旧版本 mac 系统,ignore 会失效,所以作此处理
119
114
  if ((0, _env.isElectron)() && (0, _renderer.isMac)()) {
120
- if (confirm.className === 'confirm-mouseover') {
115
+ var x = position.x,
116
+ y = position.y;
117
+ var isInConfirm = x > bounds.x && y > bounds.y && x < bounds.x + defaultSize.width && y < bounds.y + defaultSize.height;
118
+ if (isInConfirm) {
119
+ log("[event-confirm][initMouseEvents]: is in confirm ".concat(isInConfirm));
121
120
  browserWindow === null || browserWindow === void 0 || browserWindow.setIgnoreMouseEvents(false);
122
121
  } else {
123
122
  browserWindow === null || browserWindow === void 0 || browserWindow.setIgnoreMouseEvents(true, {
124
123
  forward: true
125
124
  });
125
+ log('[event-confirm][initMouseEvents]: out of confirm window');
126
126
  }
127
127
  }
128
- return function () {
129
- removeObserverWindow(id);
130
- };
131
- }, [confirm.className]);
132
-
133
- // const initMouseEvents = (position: { x: number; y: number }) => {
134
- // // 旧版本 mac 系统,ignore 会失效,所以作此处理
135
- // if (isElectron() && isMac()) {
136
- // const { x, y } = position;
137
- // const isInConfirm =
138
- // x > bounds.x &&
139
- // y > bounds.y &&
140
- // x < bounds.x + defaultSize.width &&
141
- // y < bounds.y + defaultSize.height;
142
- // if (isInConfirm) {
143
- // log(`[event-confirm][initMouseEvents]: is in confirm ${isInConfirm}`);
144
- // browserWindow?.setIgnoreMouseEvents(false);
145
- // } else {
146
- // browserWindow?.setIgnoreMouseEvents(true, { forward: true });
147
- // log('[event-confirm][initMouseEvents]: out of confirm window');
148
- // }
149
- // }
150
- // };
151
-
152
- // useEffect(() => {
153
- // initMouseEvents(mousePosition);
154
- // }, [mousePosition]);
155
-
128
+ };
129
+ (0, _react.useEffect)(function () {
130
+ initMouseEvents(mousePosition);
131
+ }, [mousePosition]);
156
132
  (0, _react.useEffect)(function () {
157
133
  recalculate();
158
134
  !calculateMethods.has(confirm) && calculateMethods.set(confirm, recalculate);
@@ -14,20 +14,19 @@ export default class ConfirmStore {
14
14
  private _sharedScreenShareSharedDataSource;
15
15
  private _sharedConfirmDataSource;
16
16
  private _handleConfirmEventObserver;
17
- private _handleMousePositionObserver;
18
17
  accessor isReplaceShare: boolean;
19
18
  accessor calculateMethods: Map<ConfirmContentProps, (bounds?: CurrentShareBounds | null) => void>;
20
19
  accessor reposition: number;
21
20
  accessor confirms: Map<string, {
22
- id: string;
23
21
  params: ConfirmContentProps;
24
22
  timer?: () => void;
25
23
  }>;
26
24
  accessor screenBounds: CurrentShareBounds | Electron.Rectangle | null;
27
- get confirmList(): {
28
- id: string;
29
- params: ConfirmContentProps;
30
- }[];
25
+ get mousePosition(): {
26
+ x: number;
27
+ y: number;
28
+ };
29
+ get confirmList(): ConfirmContentProps[];
31
30
  get isSeizeScreen(): boolean;
32
31
  constructor({ uiEventStore, dialogProvider, screenShareProvider, sharedScreenShareSharedDataSource, sharedConfirmDataSource, }: {
33
32
  uiEventStore: FcrUIEventProvider;
@@ -37,14 +36,10 @@ export default class ConfirmStore {
37
36
  sharedConfirmDataSource: FcrUISharedConfirmDataSource;
38
37
  });
39
38
  addConfirm(payload: FcrUIDialogParams<ConfirmContentProps>): void;
40
- removeObserverWindow(key: string): void;
41
- setObserverWindow(key: string, window: CurrentShareBounds): void;
42
39
  resetIsReplace(): void;
43
40
  setMousePosition(e: MouseEvent): void;
44
41
  release(): void;
45
42
  log(log: string): void;
46
43
  private _handleConfirmEvent;
47
- private _handleMousePositionObserverMouseOver;
48
- private _handleMousePositionObserverMouseOut;
49
44
  }
50
45
  export declare const StoreContext: import("react").Context<ConfirmStore>;