fcr-ui-scene 3.4.0 → 3.4.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.
- package/lib/ scenes/base.d.ts +10 -0
- package/lib/ scenes/base.js +75 -0
- package/lib/ scenes/main-scene.d.ts +43 -0
- package/lib/ scenes/main-scene.js +368 -0
- package/lib/ scenes/waiting-scene.d.ts +31 -0
- package/lib/ scenes/waiting-scene.js +119 -0
- package/lib/common/device-store.d.ts +1 -2
- package/lib/common/device-store.js +169 -153
- package/lib/common/device-stream-store.d.ts +5 -29
- package/lib/common/device-stream-store.js +47 -93
- package/lib/common/room-store.js +4 -4
- package/lib/common/security-store.d.ts +6 -16
- package/lib/common/security-store.js +16 -17
- package/lib/common/type.d.ts +8 -0
- package/lib/common/type.js +6 -0
- package/lib/creator.js +3 -3
- package/lib/electron/app.js +21 -5
- package/lib/electron/bootstrap-sdk.js +1 -2
- package/lib/electron/injections.d.ts +1 -1
- package/lib/error-fallback.css +62 -0
- package/lib/error-fallback.d.ts +2 -0
- package/lib/error-fallback.js +19 -0
- package/lib/modules/Interpreter/action/delete-btn/index.d.ts +1 -1
- package/lib/modules/Interpreter/action/edit-btn/index.d.ts +0 -1
- package/lib/modules/Interpreter/action/edit-btn/index.js +0 -2
- package/lib/modules/Interpreter/action/switch-btn/index.css +3 -0
- package/lib/modules/Interpreter/action/switch-btn/index.d.ts +2 -4
- package/lib/modules/Interpreter/action/switch-btn/index.js +3 -3
- package/lib/modules/Interpreter/footer/index.css +4 -3
- package/lib/modules/Interpreter/index.d.ts +2 -17
- package/lib/modules/Interpreter/index.js +2 -18
- package/lib/modules/Interpreter/interpreter-list/index.css +5 -1
- package/lib/modules/Interpreter/interpreter-list/index.d.ts +1 -0
- package/lib/modules/Interpreter/interpreter-list/index.js +3 -1
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +0 -6
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +1 -1
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +1 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +1 -6
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +55 -81
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +6 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +58 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +1 -1
- package/lib/modules/Interpreter/store.d.ts +36 -29
- package/lib/modules/Interpreter/store.js +575 -606
- package/lib/modules/Interpreter/type.d.ts +41 -0
- package/lib/modules/Interpreter/type.js +20 -0
- package/lib/modules/Interpreter/utils.d.ts +12 -0
- package/lib/modules/Interpreter/utils.js +139 -0
- package/lib/modules/Interpreter/view.d.ts +0 -1
- package/lib/modules/Interpreter/view.js +3 -5
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +11 -11
- package/lib/modules/action-bar/apps/useInterpreter.js +4 -2
- package/lib/modules/action-bar/components/apps/app-item/index.css +35 -0
- package/lib/modules/action-bar/components/apps/app-item/index.d.ts +12 -0
- package/lib/modules/action-bar/components/apps/app-item/index.js +61 -0
- package/lib/modules/action-bar/components/apps/appitems.d.ts +5 -0
- package/lib/modules/action-bar/components/apps/appitems.js +45 -0
- package/lib/modules/action-bar/components/apps/index.css +8 -0
- package/lib/modules/action-bar/components/apps/index.d.ts +4 -0
- package/lib/modules/action-bar/components/apps/index.js +57 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +9 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +29 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +10 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.js +36 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +14 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.js +37 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +16 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.js +41 -0
- package/lib/modules/action-bar/components/board/index.d.ts +4 -0
- package/lib/modules/action-bar/components/board/index.js +34 -0
- package/lib/modules/action-bar/components/breakout-room/index.d.ts +4 -0
- package/lib/modules/action-bar/components/breakout-room/index.js +32 -0
- package/lib/modules/action-bar/components/chat/index.css +80 -0
- package/lib/modules/action-bar/components/chat/index.d.ts +5 -0
- package/lib/modules/action-bar/components/chat/index.js +154 -0
- package/lib/modules/action-bar/components/device/index.css +162 -0
- package/lib/modules/action-bar/components/device/index.d.ts +8 -0
- package/lib/modules/action-bar/components/device/index.js +611 -0
- package/lib/modules/action-bar/components/interpreter/index.d.ts +6 -0
- package/lib/modules/action-bar/components/interpreter/index.js +41 -0
- package/lib/modules/action-bar/components/item.d.ts +27 -0
- package/lib/modules/action-bar/components/item.js +164 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +10 -0
- package/lib/modules/action-bar/components/leave/assign-host.js +64 -0
- package/lib/modules/action-bar/components/leave/index.css +126 -0
- package/lib/modules/action-bar/components/leave/index.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/index.js +159 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +18 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.js +153 -0
- package/lib/modules/action-bar/components/live-streaming/index.d.ts +4 -0
- package/lib/modules/action-bar/components/live-streaming/index.js +39 -0
- package/lib/modules/action-bar/components/more/index.css +114 -0
- package/lib/modules/action-bar/components/more/index.d.ts +5 -0
- package/lib/modules/action-bar/components/more/index.js +83 -0
- package/lib/modules/action-bar/components/more/poppover-content.d.ts +8 -0
- package/lib/modules/action-bar/components/more/poppover-content.js +400 -0
- package/lib/modules/action-bar/components/participants/index.css +21 -0
- package/lib/modules/action-bar/components/participants/index.d.ts +5 -0
- package/lib/modules/action-bar/components/participants/index.js +83 -0
- package/lib/modules/action-bar/components/record/index.css +39 -0
- package/lib/modules/action-bar/components/record/index.d.ts +5 -0
- package/lib/modules/action-bar/components/record/index.js +166 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +5 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.js +48 -0
- package/lib/modules/action-bar/components/respond/index.d.ts +4 -0
- package/lib/modules/action-bar/components/respond/index.js +32 -0
- package/lib/modules/action-bar/components/screen-share/index.d.ts +4 -0
- package/lib/modules/action-bar/components/screen-share/index.js +106 -0
- package/lib/modules/action-bar/components/screen-share/submenu.d.ts +1 -0
- package/lib/modules/action-bar/components/screen-share/submenu.js +154 -0
- package/lib/modules/action-bar/components/security/index.d.ts +4 -0
- package/lib/modules/action-bar/components/security/index.js +58 -0
- package/lib/modules/action-bar/components/settings/index.d.ts +4 -0
- package/lib/modules/action-bar/components/settings/index.js +42 -0
- package/lib/modules/action-bar/index.css +23 -1
- package/lib/modules/action-bar/index.d.ts +2 -22
- package/lib/modules/action-bar/index.dev.js +37 -16
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/notification-bar/dome.png +0 -0
- package/lib/modules/action-bar/notification-bar/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/screen-share/index.js +5 -0
- package/lib/modules/action-bar/security/index.js +1 -0
- package/lib/modules/action-bar/smaller.js +2 -2
- package/lib/modules/action-bar/store.d.ts +6 -7
- package/lib/modules/action-bar/store.js +114 -128
- package/lib/modules/action-bar/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +15 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.js +220 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +14 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +4 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +36 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/view.js +6 -6
- package/lib/modules/audio-stream/index.d.ts +2 -15
- package/lib/modules/audio-stream/index.js +1 -3
- package/lib/modules/chat/chat-bar/index.css +5 -0
- package/lib/modules/chat/chat-bar/index.js +16 -14
- package/lib/modules/chat/chat-select/index.css +6 -3
- package/lib/modules/chat/chat.js +7 -6
- package/lib/modules/chat/index.css +10 -0
- package/lib/modules/chat/index.d.ts +2 -12
- package/lib/modules/chat/index.dev.js +14 -3
- package/lib/modules/chat/index.js +7 -20
- package/lib/modules/chat/message-list.js +1 -0
- package/lib/modules/chat/store.js +1 -1
- package/lib/modules/components/device-control/components/audio-menu/index.js +4 -4
- package/lib/modules/components/device-control/index.css +3 -0
- package/lib/modules/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/components/dialog-container/component/body.js +46 -0
- package/lib/modules/components/dialog-container/index.css +78 -0
- package/lib/modules/components/dialog-container/index.d.ts +11 -0
- package/lib/modules/components/dialog-container/index.js +110 -0
- package/lib/modules/components/member-window/index.css +419 -0
- package/lib/modules/components/member-window/index.d.ts +76 -0
- package/lib/modules/components/member-window/index.js +888 -0
- package/lib/modules/components/security-menu/index.css +9 -0
- package/lib/modules/components/security-menu/index.js +74 -23
- package/lib/modules/components/tab-frame/index.css +40 -0
- package/lib/modules/components/tab-frame/index.d.ts +12 -0
- package/lib/modules/components/tab-frame/index.js +57 -0
- package/lib/modules/connection-gateway/components/computer/index.css +1 -0
- package/lib/modules/connection-gateway/components/phone/index.css +1 -1
- package/lib/modules/connection-gateway/index.d.ts +2 -9
- package/lib/modules/connection-gateway/store.d.ts +3 -11
- package/lib/modules/connection-gateway/store.js +1 -17
- package/lib/modules/connection-gateway/view.js +21 -4
- package/lib/modules/control-bar/components/cloud-recording-buttons.js +1 -1
- package/lib/modules/control-bar/index.d.ts +2 -16
- package/lib/modules/control-bar/index.js +10 -19
- package/lib/modules/control-bar/store.d.ts +3 -16
- package/lib/modules/control-bar/store.js +23 -5
- package/lib/modules/control-bar/view.js +17 -10
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
- package/lib/modules/dialog/components/Interpreter/electron.js +3 -25
- package/lib/modules/dialog/components/Interpreter/index.js +14 -43
- package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
- package/lib/modules/dialog/components/chat/electron.js +6 -13
- package/lib/modules/dialog/components/chat/index.d.ts +1 -4
- package/lib/modules/dialog/components/chat/index.js +35 -41
- package/lib/modules/dialog/components/confirm/index.js +6 -7
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
- package/lib/modules/dialog/components/connection-gateway/electron.js +9 -28
- package/lib/modules/dialog/components/connection-gateway/index.d.ts +0 -1
- package/lib/modules/dialog/components/connection-gateway/index.js +11 -56
- package/lib/modules/dialog/components/control-bar/index.js +6 -7
- package/lib/modules/dialog/components/device-setting/electron.js +4 -26
- package/lib/modules/dialog/components/device-setting/index.js +13 -41
- package/lib/modules/dialog/components/invite/index.js +16 -35
- package/lib/modules/dialog/components/live-streaming/index.js +18 -53
- package/lib/modules/dialog/components/participant/electron.js +4 -17
- package/lib/modules/dialog/components/participant/index.js +35 -26
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +3 -6
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +4 -14
- package/lib/modules/dialog/components/share-screen-selection/index.js +20 -5
- package/lib/modules/dialog/components/system-preference/electron.js +5 -8
- package/lib/modules/dialog/components/system-preference/index.js +4 -15
- package/lib/modules/dialog/components/toast/index.js +8 -12
- package/lib/modules/dialog/dialogs.js +2 -1
- package/lib/modules/dialog/hooks/useElectron.d.ts +6 -0
- package/lib/modules/dialog/hooks/useElectron.js +51 -9
- package/lib/modules/dialog/index.css +0 -2
- package/lib/modules/dialog/index.d.ts +2 -17
- package/lib/modules/dialog/store.d.ts +7 -39
- package/lib/modules/dialog/store.js +53 -152
- package/lib/modules/dialog/types/index.d.ts +59 -0
- package/lib/modules/event-confirm/view.js +4 -1
- package/lib/modules/invite/view.d.ts +4 -0
- package/lib/modules/invite/view.js +18 -22
- package/lib/modules/invite/voip-invite.js +3 -3
- package/lib/modules/layout/components/Aside.js +11 -1
- package/lib/modules/layout/components/Carousel.js +1 -1
- package/lib/modules/layout/components/Layout.js +7 -4
- package/lib/modules/layout/components/index.css +6 -1
- package/lib/modules/layout/index.js +8 -7
- package/lib/modules/layout/member-window/index.css +22 -9
- package/lib/modules/layout/member-window/index.js +16 -3
- package/lib/modules/layout/store.d.ts +1 -1
- package/lib/modules/layout/store.js +1 -7
- package/lib/modules/layout/video-window-datasource.js +11 -3
- package/lib/modules/notification/index.css +1 -0
- package/lib/modules/participant/attendee/index.css +1 -0
- package/lib/modules/participant/attendee/index.js +2 -1
- package/lib/modules/participant/components/drop-menu/index.css +1 -0
- package/lib/modules/participant/components/drop-menu/index.js +9 -9
- package/lib/modules/participant/index.css +5 -0
- package/lib/modules/participant/index.d.ts +2 -17
- package/lib/modules/participant/index.dev.js +38 -27
- package/lib/modules/participant/store.d.ts +4 -17
- package/lib/modules/participant/store.js +13 -13
- package/lib/modules/setting/audio-settings/audio-settings.js +13 -10
- package/lib/modules/setting/audio-settings/index.css +26 -1
- package/lib/modules/setting/general-settings/index.css +1 -1
- package/lib/modules/setting/index.css +2 -1
- package/lib/modules/setting/index.d.ts +2 -15
- package/lib/modules/setting/index.dev.js +19 -10
- package/lib/modules/setting/store.d.ts +5 -18
- package/lib/modules/setting/store.js +48 -20
- package/lib/modules/setting/translate-settings/index.css +3 -1
- package/lib/modules/setting/video-settings/index.css +5 -2
- package/lib/modules/share-screen/index.dev.js +20 -19
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/selection/index.js +83 -97
- package/lib/modules/share-screen/store.js +16 -36
- package/lib/modules/sound-effect/index.d.ts +2 -13
- package/lib/modules/sound-effect/index.js +1 -2
- package/lib/modules/state-bar/index.css +13 -2
- package/lib/modules/state-bar/index.d.ts +1 -5
- package/lib/modules/state-bar/index.dev.js +1 -1
- package/lib/modules/state-bar/index.js +0 -27
- package/lib/modules/state-bar/layout-config.js +1 -1
- package/lib/modules/state-bar/meeting-network-state.css +1 -1
- package/lib/modules/state-bar/recording.js +7 -4
- package/lib/modules/state-bar/view.js +1 -1
- package/lib/modules/video-window/index.d.ts +2 -2
- package/lib/modules/video-window/store.d.ts +2 -1
- package/lib/modules/video-window/store.js +2 -2
- package/lib/modules/waiting-room-layout/index.css +1 -3
- package/lib/modules/waiting-room-layout/index.d.ts +3 -1
- package/lib/modules/waiting-room-layout/index.js +10 -3
- package/lib/modules/whiteboard/index.d.ts +2 -13
- package/lib/modules/whiteboard/index.js +4 -5
- package/lib/providers/device-privilege-provider.d.ts +30 -0
- package/lib/providers/device-privilege-provider.js +386 -0
- package/lib/providers/device-provider.d.ts +246 -0
- package/lib/providers/device-provider.js +1741 -0
- package/lib/providers/device-stream-provider.d.ts +36 -0
- package/lib/providers/device-stream-provider.js +460 -0
- package/lib/providers/event-provider.d.ts +108 -0
- package/lib/providers/event-provider.js +288 -0
- package/lib/providers/interpreter-provider.d.ts +25 -0
- package/lib/providers/interpreter-provider.js +151 -0
- package/lib/providers/local-storage-provider.d.ts +8 -0
- package/lib/providers/local-storage-provider.js +31 -0
- package/lib/providers/monitor-provider.d.ts +15 -0
- package/lib/providers/monitor-provider.js +29 -0
- package/lib/providers/privilege-provider.d.ts +216 -0
- package/lib/providers/privilege-provider.js +966 -0
- package/lib/providers/renderer-provider.d.ts +43 -0
- package/lib/providers/renderer-provider.js +245 -0
- package/lib/providers/room-provider.d.ts +79 -0
- package/lib/providers/room-provider.js +439 -0
- package/lib/providers/session-provider.d.ts +26 -0
- package/lib/providers/session-provider.js +49 -0
- package/lib/runtime.d.ts +1 -1
- package/lib/scenes/base.d.ts +10 -0
- package/lib/scenes/base.js +75 -0
- package/lib/scenes/main-scene.d.ts +48 -0
- package/lib/scenes/main-scene.js +390 -0
- package/lib/scenes/waiting-scene.d.ts +31 -0
- package/lib/scenes/waiting-scene.js +129 -0
- package/lib/shared-data-source/config.d.ts +16 -0
- package/lib/shared-data-source/config.js +21 -0
- package/lib/type.d.ts +26 -1
- package/lib/ui-manager.d.ts +3 -0
- package/lib/ui-manager.js +154 -233
- package/lib/ui-node.d.ts +25 -0
- package/lib/ui-node.js +156 -0
- package/lib/utilities/constant.d.ts +15 -15
- package/lib/utilities/constant.js +15 -15
- package/lib/utilities/tools.d.ts +2 -0
- package/lib/utilities/tools.js +42 -10
- package/package.json +12 -11
- package/public/assets/fcr_leave2.svg +58 -0
- package/public/index.html +150 -13
|
@@ -20,9 +20,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
20
20
|
value: true
|
|
21
21
|
});
|
|
22
22
|
exports["default"] = exports.StoreContext = void 0;
|
|
23
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
24
23
|
require("core-js/modules/es.array.filter.js");
|
|
25
24
|
require("core-js/modules/es.array.find.js");
|
|
25
|
+
require("core-js/modules/es.array.for-each.js");
|
|
26
26
|
require("core-js/modules/es.array.includes.js");
|
|
27
27
|
require("core-js/modules/es.array.iterator.js");
|
|
28
28
|
require("core-js/modules/es.array.push.js");
|
|
@@ -34,9 +34,11 @@ require("core-js/modules/es.string.iterator.js");
|
|
|
34
34
|
require("core-js/modules/es.weak-map.js");
|
|
35
35
|
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
36
36
|
require("core-js/modules/esnext.async-iterator.find.js");
|
|
37
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
37
38
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
38
39
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
39
40
|
require("core-js/modules/esnext.iterator.find.js");
|
|
41
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
40
42
|
require("core-js/modules/esnext.map.delete-all.js");
|
|
41
43
|
require("core-js/modules/esnext.map.emplace.js");
|
|
42
44
|
require("core-js/modules/esnext.map.every.js");
|
|
@@ -53,9 +55,9 @@ require("core-js/modules/esnext.map.some.js");
|
|
|
53
55
|
require("core-js/modules/esnext.map.update.js");
|
|
54
56
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
55
57
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
58
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
56
59
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
57
60
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
58
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
59
61
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
60
62
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
61
63
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -66,14 +68,12 @@ var _env = require("agora-foundation/lib/utilities/env");
|
|
|
66
68
|
var _mobx = require("mobx");
|
|
67
69
|
var _constant = require("../../utilities/constant");
|
|
68
70
|
var _dialogs = require("./dialogs");
|
|
69
|
-
var _type2 = require("../whiteboard/type");
|
|
70
71
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
71
|
-
var
|
|
72
|
-
var _type3 = require("agora-rte-sdk/lib/core/rtc/type");
|
|
73
|
-
var _type4 = require("fcr-core/lib/room-control/chatroom-control/type");
|
|
72
|
+
var _type2 = require("fcr-core/lib/room-control/chatroom-control/type");
|
|
74
73
|
var _react = require("react");
|
|
74
|
+
var _platform = require("../../utilities/platform");
|
|
75
75
|
var _DialogStore;
|
|
76
|
-
var _initProto, _init_openedDialogs, _init_payloadDialogs, _init_confirmDialogs, _init_userCount, _init_participantElectronDialogContainer, _init_chatRoomState, _init_currentDialogBounds, _init_videoWindowBounds, _setVideoWindowBoundsDecs,
|
|
76
|
+
var _initProto, _init_openedDialogs, _init_payloadDialogs, _init_confirmDialogs, _init_userCount, _init_participantElectronDialogContainer, _init_chatRoomState, _init_currentDialogBounds, _init_videoWindowBounds, _setVideoWindowBoundsDecs, _handleDialogEventDecs, _handleConnectionUpdatedDecs, _hanleAllUserCountUpdatedDecs, _ref;
|
|
77
77
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
78
78
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
79
79
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -92,22 +92,19 @@ var _E = /*#__PURE__*/new WeakMap();
|
|
|
92
92
|
var _F = /*#__PURE__*/new WeakMap();
|
|
93
93
|
var _G = /*#__PURE__*/new WeakMap();
|
|
94
94
|
var _H = /*#__PURE__*/new WeakMap();
|
|
95
|
-
_ref = (_setVideoWindowBoundsDecs = [_mobx.action, _mobx.action.bound],
|
|
95
|
+
_ref = (_setVideoWindowBoundsDecs = [_mobx.action, _mobx.action.bound], _handleDialogEventDecs = [_mobx.action, _mobx.action.bound], _handleConnectionUpdatedDecs = [_mobx.action, _mobx.action.bound], _hanleAllUserCountUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
96
96
|
var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
97
97
|
function DialogStore(_ref2) {
|
|
98
98
|
var _this = this;
|
|
99
99
|
var uiEventStore = _ref2.uiEventStore,
|
|
100
|
-
userInfo = _ref2.userInfo,
|
|
101
100
|
userControl = _ref2.userControl,
|
|
102
101
|
chatRoomControl = _ref2.chatRoomControl,
|
|
103
102
|
deviceStore = _ref2.deviceStore,
|
|
104
103
|
streamControl = _ref2.streamControl,
|
|
105
|
-
remoteVideoRenderManager = _ref2.remoteVideoRenderManager
|
|
104
|
+
remoteVideoRenderManager = _ref2.remoteVideoRenderManager,
|
|
105
|
+
securityStore = _ref2.securityStore;
|
|
106
106
|
(0, _classCallCheck2["default"])(this, DialogStore);
|
|
107
107
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
108
|
-
(0, _defineProperty2["default"])(this, "_currentShareId", '');
|
|
109
|
-
(0, _defineProperty2["default"])(this, "_currentShareType", _type3.AgoraRtcScreenCaptureType.WINDOW);
|
|
110
|
-
(0, _defineProperty2["default"])(this, "_electronDialogs", {});
|
|
111
108
|
(0, _defineProperty2["default"])(this, "_connnectBeforeCloseDetect", true);
|
|
112
109
|
(0, _defineProperty2["default"])(this, "_userObserver", {
|
|
113
110
|
onAllUserCountUpdated: this._hanleAllUserCountUpdated.bind(this)
|
|
@@ -122,57 +119,22 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
122
119
|
_classPrivateFieldInitSpec(this, _C, _init_confirmDialogs(this, new Map()));
|
|
123
120
|
_classPrivateFieldInitSpec(this, _D, _init_userCount(this, 0));
|
|
124
121
|
_classPrivateFieldInitSpec(this, _E, _init_participantElectronDialogContainer(this, null));
|
|
125
|
-
_classPrivateFieldInitSpec(this, _F, _init_chatRoomState(this,
|
|
126
|
-
_classPrivateFieldInitSpec(this, _G, _init_currentDialogBounds(this,
|
|
127
|
-
x: 0,
|
|
128
|
-
y: 0,
|
|
129
|
-
width: 0,
|
|
130
|
-
height: 0
|
|
131
|
-
}));
|
|
122
|
+
_classPrivateFieldInitSpec(this, _F, _init_chatRoomState(this, _type2.FcrChatRoomConnectionState.Disconnected));
|
|
123
|
+
_classPrivateFieldInitSpec(this, _G, _init_currentDialogBounds(this, new Map()));
|
|
132
124
|
_classPrivateFieldInitSpec(this, _H, _init_videoWindowBounds(this, {}));
|
|
133
125
|
this._uiEventStore = uiEventStore;
|
|
134
|
-
this._userInfo =
|
|
126
|
+
this._userInfo = userControl.getLocalUser();
|
|
135
127
|
this._streamControl = streamControl;
|
|
136
128
|
this._userControl = userControl;
|
|
137
129
|
this._remoteVideoRenderManager = remoteVideoRenderManager;
|
|
138
130
|
this._deviceStore = deviceStore;
|
|
139
131
|
this._chatRoomControl = chatRoomControl;
|
|
132
|
+
this._securityStore = securityStore;
|
|
140
133
|
userControl.addObserver(this._userObserver);
|
|
141
134
|
uiEventStore.addObserver({
|
|
142
135
|
onEvent: this._handleDialogEvent.bind(this)
|
|
143
136
|
});
|
|
144
137
|
chatRoomControl.addObserver(this._chatRoomObserver);
|
|
145
|
-
uiEventStore.addObserver({
|
|
146
|
-
onEvent: function onEvent(action, payload) {
|
|
147
|
-
if (action === _constant.UIAction.WHITEBOARD_CHANGED) {
|
|
148
|
-
if (payload.action === _type2.WhiteboardControlbarEvents.LONEYWINDOW) {
|
|
149
|
-
if (!payload.payload) {
|
|
150
|
-
_this.closeWhiteboardDialog();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (action === _constant.UIAction.CLOSE_WHITEBOARD) {
|
|
155
|
-
_this.closeWhiteboardDialog();
|
|
156
|
-
}
|
|
157
|
-
// 因为窗口可能会移动,因此需要矫正 global toast 的 Bounds
|
|
158
|
-
if (action === _constant.UIAction.OPEN_DIALOG) {
|
|
159
|
-
if ([_constant.DialogKey.SHOW_TOAST, _constant.DialogKey.CONFIRM].includes(payload.dialogKey) && (0, _env.isElectron)()) {
|
|
160
|
-
var toastWindow = _dialogs.dialogWindows.get(_constant.DialogKey.SHOW_TOAST);
|
|
161
|
-
var confirmWindow = _dialogs.dialogWindows.get(_constant.DialogKey.CONFIRM);
|
|
162
|
-
var controlbar = _dialogs.dialogWindows.get(_constant.DialogKey.CONTROL_BAR);
|
|
163
|
-
var nearDispaly = window.runtime.screen.getDisplayNearestPoint((controlbar === null || controlbar === void 0 ? void 0 : controlbar.getBounds()) || window.runtime.browserWindow.getBounds()).bounds;
|
|
164
|
-
var bounds = {
|
|
165
|
-
x: Math.floor(nearDispaly.x),
|
|
166
|
-
y: Math.floor(nearDispaly.y),
|
|
167
|
-
width: Math.floor(nearDispaly.width),
|
|
168
|
-
height: Math.floor(nearDispaly.height)
|
|
169
|
-
};
|
|
170
|
-
toastWindow === null || toastWindow === void 0 || toastWindow.setBounds(bounds);
|
|
171
|
-
confirmWindow === null || confirmWindow === void 0 || confirmWindow.setBounds(bounds);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
138
|
(0, _mobx.runInAction)(function () {
|
|
177
139
|
_this.userCount = _this._userControl.getAllUserCount();
|
|
178
140
|
});
|
|
@@ -266,6 +228,11 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
266
228
|
get: function get() {
|
|
267
229
|
return this._remoteVideoRenderManager;
|
|
268
230
|
}
|
|
231
|
+
}, {
|
|
232
|
+
key: "waitingRoomState",
|
|
233
|
+
get: function get() {
|
|
234
|
+
return this._securityStore.isWaitingRoomEnabled();
|
|
235
|
+
}
|
|
269
236
|
}, {
|
|
270
237
|
key: "setParticipantElectronDialogContainer",
|
|
271
238
|
value: function setParticipantElectronDialogContainer(dom) {
|
|
@@ -285,51 +252,6 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
285
252
|
})) === null || _this$openedDialogs$f === void 0 ? void 0 : _this$openedDialogs$f.dialogId;
|
|
286
253
|
dialogId && this._uiEventStore.closeDialog(dialogId);
|
|
287
254
|
}
|
|
288
|
-
}, {
|
|
289
|
-
key: "closeInterpreterDialog",
|
|
290
|
-
value: function closeInterpreterDialog() {
|
|
291
|
-
// const dialogId = this.openedDialogs.find(
|
|
292
|
-
// (dialog) => dialog.dialogKey === DialogKey.INTERPRETER,
|
|
293
|
-
// )?.dialogId;
|
|
294
|
-
// dialogId && this._uiEventStore.closeDialog(dialogId);
|
|
295
|
-
this._uiEventStore.sendEvent(_constant.UIAction.CLOSE_INTERPRETER_DIALOG);
|
|
296
|
-
}
|
|
297
|
-
}, {
|
|
298
|
-
key: "setCurrentShareId",
|
|
299
|
-
value: function setCurrentShareId(id, type) {
|
|
300
|
-
this._currentShareId = id;
|
|
301
|
-
this._currentShareType = type;
|
|
302
|
-
}
|
|
303
|
-
}, {
|
|
304
|
-
key: "getSharingWorkArea",
|
|
305
|
-
value: function () {
|
|
306
|
-
var _getSharingWorkArea = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
307
|
-
var allWindows;
|
|
308
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
309
|
-
while (1) switch (_context.prev = _context.next) {
|
|
310
|
-
case 0:
|
|
311
|
-
if (this._currentShareId) {
|
|
312
|
-
_context.next = 2;
|
|
313
|
-
break;
|
|
314
|
-
}
|
|
315
|
-
return _context.abrupt("return");
|
|
316
|
-
case 2:
|
|
317
|
-
_context.next = 4;
|
|
318
|
-
return this._deviceStore.mediaControl.getWindowList();
|
|
319
|
-
case 4:
|
|
320
|
-
allWindows = _context.sent;
|
|
321
|
-
return _context.abrupt("return", (0, _renderer.getCurrentSharingWorkArea)(this._currentShareId, this._currentShareType, allWindows));
|
|
322
|
-
case 6:
|
|
323
|
-
case "end":
|
|
324
|
-
return _context.stop();
|
|
325
|
-
}
|
|
326
|
-
}, _callee, this);
|
|
327
|
-
}));
|
|
328
|
-
function getSharingWorkArea() {
|
|
329
|
-
return _getSharingWorkArea.apply(this, arguments);
|
|
330
|
-
}
|
|
331
|
-
return getSharingWorkArea;
|
|
332
|
-
}()
|
|
333
255
|
}, {
|
|
334
256
|
key: "closeSystemPreferenceDialog",
|
|
335
257
|
value: function closeSystemPreferenceDialog() {
|
|
@@ -340,17 +262,6 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
340
262
|
value: function closeChatFromDialog() {
|
|
341
263
|
this.closeDialogByKey(_constant.DialogKey.CHAT);
|
|
342
264
|
}
|
|
343
|
-
}, {
|
|
344
|
-
key: "closeWhiteboardDialog",
|
|
345
|
-
value: function closeWhiteboardDialog() {
|
|
346
|
-
this.closeDialogByKey(_constant.DialogKey.WHITEBOARD);
|
|
347
|
-
}
|
|
348
|
-
}, {
|
|
349
|
-
key: "closeDialogChat",
|
|
350
|
-
value: function closeDialogChat() {
|
|
351
|
-
this.closeChatFromDialog();
|
|
352
|
-
this._uiEventStore.notifyChatResetTarget();
|
|
353
|
-
}
|
|
354
265
|
}, {
|
|
355
266
|
key: "moveChatFromDialogToAside",
|
|
356
267
|
value: function moveChatFromDialogToAside() {
|
|
@@ -359,11 +270,6 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
359
270
|
chat: true
|
|
360
271
|
});
|
|
361
272
|
}
|
|
362
|
-
}, {
|
|
363
|
-
key: "closeLiveStreamingDialog",
|
|
364
|
-
value: function closeLiveStreamingDialog() {
|
|
365
|
-
this.closeDialogByKey(_constant.DialogKey.LIVE_STREAMING);
|
|
366
|
-
}
|
|
367
273
|
}, {
|
|
368
274
|
key: "closeConnectionDialog",
|
|
369
275
|
value: function closeConnectionDialog() {
|
|
@@ -404,11 +310,6 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
404
310
|
this.closeDialogByKey(_constant.DialogKey.CONNECTION_GATEWAY);
|
|
405
311
|
}
|
|
406
312
|
}
|
|
407
|
-
}, {
|
|
408
|
-
key: "closeInviteDialog",
|
|
409
|
-
value: function closeInviteDialog() {
|
|
410
|
-
this._uiEventStore.closeInviteDialog();
|
|
411
|
-
}
|
|
412
313
|
}, {
|
|
413
314
|
key: "moveParticipantFromDialogToAside",
|
|
414
315
|
value: function moveParticipantFromDialogToAside() {
|
|
@@ -417,21 +318,6 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
417
318
|
participant: true
|
|
418
319
|
});
|
|
419
320
|
}
|
|
420
|
-
}, {
|
|
421
|
-
key: "moveToMainRoomAllMember",
|
|
422
|
-
value: function moveToMainRoomAllMember(isOperate) {
|
|
423
|
-
this._uiEventStore.sendEvent(_constant.UIAction.MOVE_TO_MAIN_ROOM_ALL_MEMBER, isOperate);
|
|
424
|
-
}
|
|
425
|
-
}, {
|
|
426
|
-
key: "closeWaitingRoomDialog",
|
|
427
|
-
value: function closeWaitingRoomDialog() {
|
|
428
|
-
this._uiEventStore.closeWaitingRoomDialog();
|
|
429
|
-
}
|
|
430
|
-
}, {
|
|
431
|
-
key: "closeRemoveAdmitWaitingRoomDialog",
|
|
432
|
-
value: function closeRemoveAdmitWaitingRoomDialog(dialogKey) {
|
|
433
|
-
this._uiEventStore.closeRemoveAdmitWaitingRoomDialog(dialogKey);
|
|
434
|
-
}
|
|
435
321
|
}, {
|
|
436
322
|
key: "release",
|
|
437
323
|
value: function release() {
|
|
@@ -446,29 +332,46 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
446
332
|
height: height
|
|
447
333
|
});
|
|
448
334
|
}
|
|
449
|
-
}, {
|
|
450
|
-
key: "_setDialogBounds",
|
|
451
|
-
value: function _setDialogBounds(payload) {
|
|
452
|
-
this.currentDialogBounds = payload;
|
|
453
|
-
}
|
|
454
335
|
}, {
|
|
455
336
|
key: "_handleDialogEvent",
|
|
456
337
|
value: function _handleDialogEvent(action, payload) {
|
|
457
|
-
var _dialogWindows$
|
|
338
|
+
var _dialogWindows$get3;
|
|
458
339
|
var _ref3 = payload || {},
|
|
459
|
-
|
|
460
|
-
dialogKey = _ref3$dialogKey === void 0 ? '' : _ref3$dialogKey,
|
|
340
|
+
dialogKey = _ref3.dialogKey,
|
|
461
341
|
dialogId = _ref3.dialogId,
|
|
462
342
|
_ref3$params = _ref3.params,
|
|
463
343
|
params = _ref3$params === void 0 ? {} : _ref3$params;
|
|
464
|
-
if (dialogKey === _constant.DialogKey.SHOW_TOAST) return; // toast 有独立逻辑 src/event-dialog
|
|
465
|
-
if (dialogKey === _constant.DialogKey.CONFIRM) return; // confirm 有独立逻辑 src/evnet-confirm
|
|
466
|
-
var currentDialog = this.openedDialogs.find(function (dialog) {
|
|
467
|
-
return dialog.dialogId === dialogId;
|
|
468
|
-
});
|
|
469
344
|
switch (action) {
|
|
470
345
|
case _constant.UIAction.OPEN_DIALOG:
|
|
471
|
-
|
|
346
|
+
// 因为窗口可能会移动,因此需要矫正 global toast 和 confirm 的 Bounds
|
|
347
|
+
if ([_constant.DialogKey.SHOW_TOAST, _constant.DialogKey.CONFIRM].includes(dialogKey) && (0, _env.isElectron)()) {
|
|
348
|
+
var _dialogWindows$get, _dialogWindows$get2;
|
|
349
|
+
var toastWindow = _dialogs.dialogWindows.get(_constant.DialogKey.SHOW_TOAST);
|
|
350
|
+
var confirmWindow = _dialogs.dialogWindows.get(_constant.DialogKey.CONFIRM);
|
|
351
|
+
var controlbar = _dialogs.dialogWindows.get(_constant.DialogKey.CONTROL_BAR);
|
|
352
|
+
var nearDispaly = window.runtime.screen.getDisplayNearestPoint((controlbar === null || controlbar === void 0 ? void 0 : controlbar.getBounds()) || window.runtime.browserWindow.getBounds()).bounds;
|
|
353
|
+
var bounds = {
|
|
354
|
+
x: Math.floor(nearDispaly.x),
|
|
355
|
+
y: Math.floor(nearDispaly.y),
|
|
356
|
+
width: Math.floor(nearDispaly.width),
|
|
357
|
+
height: Math.floor(nearDispaly.height)
|
|
358
|
+
};
|
|
359
|
+
toastWindow === null || toastWindow === void 0 || toastWindow.setBounds(bounds);
|
|
360
|
+
confirmWindow === null || confirmWindow === void 0 || confirmWindow.setBounds(bounds);
|
|
361
|
+
!(0, _platform.isWindows)() && _dialogs.dialogWindows.forEach(function (window, key) {
|
|
362
|
+
if (key === dialogKey) return;
|
|
363
|
+
window.setAlwaysOnTop(true, 'floating');
|
|
364
|
+
});
|
|
365
|
+
(_dialogWindows$get = _dialogs.dialogWindows.get(dialogKey)) === null || _dialogWindows$get === void 0 || _dialogWindows$get.focus();
|
|
366
|
+
(_dialogWindows$get2 = _dialogs.dialogWindows.get(dialogKey)) === null || _dialogWindows$get2 === void 0 || _dialogWindows$get2.setAlwaysOnTop(true, 'screen-saver');
|
|
367
|
+
// toast 有独立逻辑 src/event-dialog
|
|
368
|
+
// confirm 有独立逻辑 src/evnet-confirm
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
var currentDialog = this.openedDialogs.find(function (dialog) {
|
|
372
|
+
return dialog.dialogId === dialogId;
|
|
373
|
+
});
|
|
374
|
+
if (currentDialog) return (_dialogWindows$get3 = _dialogs.dialogWindows.get(dialogKey)) === null || _dialogWindows$get3 === void 0 ? void 0 : _dialogWindows$get3.focus();
|
|
472
375
|
this.openedDialogs.push({
|
|
473
376
|
dialogKey: dialogKey,
|
|
474
377
|
dialogId: dialogId
|
|
@@ -483,12 +386,10 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
483
386
|
case _constant.UIAction.VIDEO_WINDOW_BOUNDS:
|
|
484
387
|
this.setVideoWindowBounds(payload);
|
|
485
388
|
break;
|
|
486
|
-
case _constant.UIAction.
|
|
389
|
+
case _constant.UIAction.SET_DIALOG_BOUNDS:
|
|
487
390
|
var _ref4 = payload,
|
|
488
391
|
height = _ref4.height;
|
|
489
|
-
this.
|
|
490
|
-
height: height
|
|
491
|
-
});
|
|
392
|
+
if (dialogKey) this.currentDialogBounds.set(dialogKey, height);
|
|
492
393
|
break;
|
|
493
394
|
}
|
|
494
395
|
}
|
|
@@ -505,7 +406,7 @@ var DialogStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
505
406
|
}]);
|
|
506
407
|
}();
|
|
507
408
|
_DialogStore = DialogStore;
|
|
508
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_DialogStore, [[_mobx.observable, 1, "openedDialogs"], [_mobx.observable, 1, "payloadDialogs"], [_mobx.observable, 1, "confirmDialogs"], [_mobx.observable, 1, "userCount"], [_mobx.observable, 1, "participantElectronDialogContainer"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "currentDialogBounds"], [_mobx.observable, 1, "videoWindowBounds"], [_mobx.action, 2, "setParticipantElectronDialogContainer"], [_setVideoWindowBoundsDecs, 18, "setVideoWindowBounds"], [_decorator.bound, 2, "closeDialogByKey"], [_decorator.bound, 2, "
|
|
409
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_DialogStore, [[_mobx.observable, 1, "openedDialogs"], [_mobx.observable, 1, "payloadDialogs"], [_mobx.observable, 1, "confirmDialogs"], [_mobx.observable, 1, "userCount"], [_mobx.observable, 1, "participantElectronDialogContainer"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "currentDialogBounds"], [_mobx.observable, 1, "videoWindowBounds"], [_mobx.action, 2, "setParticipantElectronDialogContainer"], [_setVideoWindowBoundsDecs, 18, "setVideoWindowBounds"], [_decorator.bound, 2, "closeDialogByKey"], [_decorator.bound, 2, "closeSystemPreferenceDialog"], [_decorator.bound, 2, "closeChatFromDialog"], [_decorator.bound, 2, "moveChatFromDialogToAside"], [_decorator.bound, 2, "closeConnectionDialog"], [_decorator.bound, 2, "moveParticipantFromDialogToAside"], [_decorator.bound, 2, "resizeVideoWindow"], [_handleDialogEventDecs, 18, "_handleDialogEvent"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"], [_hanleAllUserCountUpdatedDecs, 18, "_hanleAllUserCountUpdated"]], []).e, 9);
|
|
509
410
|
_init_openedDialogs = _applyDecs$e[0];
|
|
510
411
|
_init_payloadDialogs = _applyDecs$e[1];
|
|
511
412
|
_init_confirmDialogs = _applyDecs$e[2];
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
type FcrUIDialogHooksProps = {
|
|
2
|
+
/**
|
|
3
|
+
* @param dialogKey - dialog 窗口的 key,为 FcrUIDialogKey 的枚举之一
|
|
4
|
+
*/
|
|
5
|
+
dialogKey: FcrUIDialogKey;
|
|
6
|
+
/**
|
|
7
|
+
* @param config - electron 的 BrowserWindowConstructorOptions 配置,当自定义配置的 hasCustomShadow 开启时,其中的 width 和 height 会自动加上阴影的宽度
|
|
8
|
+
* @param height - The height value should be based on the maximum content height of the tab
|
|
9
|
+
*/
|
|
10
|
+
config: Electron.BrowserWindowConstructorOptions;
|
|
11
|
+
/**
|
|
12
|
+
* @param onClose - 当 dialog 关闭时的回调函数,函数签名为 dialog 的 store
|
|
13
|
+
* */
|
|
14
|
+
onClose?: (store: DialogStore) => void;
|
|
15
|
+
/**
|
|
16
|
+
* @param onOpened - 当 dialog 打开时的回调函数,函数签名为 dialog 的 store、browserwindow 对象和设置 bounds 的方法,此 bounds 不同于 browserwindow 的 setBounds 会为宽高自动加上阴影的设置
|
|
17
|
+
*/
|
|
18
|
+
onOpened?: (props: {
|
|
19
|
+
browserWindow: Electron.BrowserWindow;
|
|
20
|
+
store: DialogStore;
|
|
21
|
+
setBounds: (bounds: Partial<Electron.Rectangle>, animate?: boolean) => void;
|
|
22
|
+
}) => void;
|
|
23
|
+
/**
|
|
24
|
+
* * @param onUnmounted - 当 dialog 卸载时的回调函数,函数签名为 dialog 的 store
|
|
25
|
+
*/
|
|
26
|
+
onUnmounted?: (store: DialogStore) => void;
|
|
27
|
+
/**
|
|
28
|
+
* @param children - dialog 的内容
|
|
29
|
+
*/
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* @param scroll - 是否显示滚动栏,默认为 false
|
|
33
|
+
*/
|
|
34
|
+
scroll?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @param focus - 在 dialog 窗口打开之后,调用 browserWindow 的 focus 方法, 默认为 true
|
|
37
|
+
*/
|
|
38
|
+
focus?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @param ignoreMouseEvents - 在 dialog 窗口打开之后,设置是否忽略鼠标事件
|
|
41
|
+
*/
|
|
42
|
+
ignoreMouseEvents?: boolean | Electron.IgnoreMouseEventsOptions;
|
|
43
|
+
/**
|
|
44
|
+
* @param alwaysOnTop - 在 dialog 窗口打开之后,主动调用一次 browserWindow 的 setAlwaysOnTop(true, 'screen-saver') 方法,默认为true
|
|
45
|
+
*/
|
|
46
|
+
alwaysOnTop?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @param fullScreen - 自定义全屏设置,和 electron 的全屏设置不同,它会以主窗口的位置为基准,给新打开的窗口设置和屏幕一样的大小
|
|
49
|
+
*/
|
|
50
|
+
fullScreen?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* @param polyfills - 这个可以以一句话的形式描述 polyfills,比如:fix-toast-window-flash,并通过这个字段来判断进行特殊处理
|
|
53
|
+
*/
|
|
54
|
+
polyfills?: string[];
|
|
55
|
+
/**
|
|
56
|
+
* @param hasCustomShadow - 默认值 true, 目前窗口有两种,一种是作为 toast 和 confirm 容器的窗口,这种窗口没有阴影,另外一种是独立的窗口,这种窗口有阴影,配置为 true 时,窗口会给宽高加上阴影的偏移量,所以 toast 和 confirm 窗口需要设置为 false
|
|
57
|
+
* */
|
|
58
|
+
hasCustomShadow?: boolean;
|
|
59
|
+
};
|
|
@@ -49,6 +49,9 @@ var View = exports.View = (0, _mobxReact.observer)(function () {
|
|
|
49
49
|
if ((0, _toConsumableArray2["default"])(confirmList).length === 0) {
|
|
50
50
|
browserWindow === null || browserWindow === void 0 || browserWindow.setIgnoreMouseEvents(true);
|
|
51
51
|
browserWindow === null || browserWindow === void 0 || browserWindow.blur();
|
|
52
|
+
} else {
|
|
53
|
+
browserWindow === null || browserWindow === void 0 || browserWindow.focus();
|
|
54
|
+
browserWindow === null || browserWindow === void 0 || browserWindow.setAlwaysOnTop(true, 'screen-saver');
|
|
52
55
|
}
|
|
53
56
|
}, [confirmList]);
|
|
54
57
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
@@ -124,7 +127,7 @@ var ConfirmWindow = (0, _mobxReact.observer)(function (_ref2) {
|
|
|
124
127
|
return function () {
|
|
125
128
|
clearTimeout(windowFocusTimerRef.current);
|
|
126
129
|
};
|
|
127
|
-
}, []);
|
|
130
|
+
}, [rndRef.current /** hack 处理 windows 下,弹出窗口层级不对的问题 */]);
|
|
128
131
|
var handleMouseEnter = function handleMouseEnter() {
|
|
129
132
|
(0, _env.isElectron)() && (browserWindow === null || browserWindow === void 0 ? void 0 : browserWindow.setIgnoreMouseEvents(false, {
|
|
130
133
|
forward: true
|
|
@@ -5,43 +5,39 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.View = void 0;
|
|
8
|
+
exports.View = exports.InviteType = void 0;
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
-
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
11
|
-
var _tabs = require("agora-ui-foundation/lib/components/tabs");
|
|
12
10
|
var _mobxReact = require("mobx-react");
|
|
13
11
|
var _react = require("react");
|
|
14
|
-
var _store = require("./store");
|
|
15
12
|
var _pstnInvite = require("./pstn-invite");
|
|
16
13
|
var _voipInvite = require("./voip-invite");
|
|
17
14
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
15
|
+
var _tabFrame = _interopRequireDefault(require("../components/tab-frame"));
|
|
18
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
var InviteType = /*#__PURE__*/function (InviteType) {
|
|
17
|
+
var InviteType = exports.InviteType = /*#__PURE__*/function (InviteType) {
|
|
20
18
|
InviteType["PSTN"] = "PSTN";
|
|
21
19
|
InviteType["VOIP"] = "VOIP";
|
|
22
20
|
return InviteType;
|
|
23
|
-
}(
|
|
21
|
+
}({});
|
|
24
22
|
var View = exports.View = (0, _mobxReact.observer)(function () {
|
|
25
|
-
(0, _objectDestructuringEmpty2["default"])((0, _react.useContext)(_store.StoreContext));
|
|
26
23
|
var _useState = (0, _react.useState)(InviteType.PSTN),
|
|
27
24
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
28
25
|
currentInviteType = _useState2[0],
|
|
29
26
|
setCurrentInviteType = _useState2[1];
|
|
30
27
|
var transI18n = (0, _i18n.useI18n)();
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}), currentInviteType === InviteType.PSTN && /*#__PURE__*/(0, _jsxRuntime.jsx)(_pstnInvite.PSTNInvite, {}), currentInviteType === InviteType.VOIP && /*#__PURE__*/(0, _jsxRuntime.jsx)(_voipInvite.VoipInvite, {})]
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabFrame["default"], {
|
|
29
|
+
activeKey: currentInviteType,
|
|
30
|
+
onChange: function onChange(key) {
|
|
31
|
+
return setCurrentInviteType(key);
|
|
32
|
+
},
|
|
33
|
+
tabs: [{
|
|
34
|
+
label: "".concat(transI18n('fmt_pstn_label_phonecall')),
|
|
35
|
+
key: InviteType.PSTN,
|
|
36
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_pstnInvite.PSTNInvite, {})
|
|
37
|
+
}, {
|
|
38
|
+
label: "".concat(transI18n('fmt_sip_options_H323')),
|
|
39
|
+
key: InviteType.VOIP,
|
|
40
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_voipInvite.VoipInvite, {})
|
|
41
|
+
}]
|
|
46
42
|
});
|
|
47
43
|
});
|
|
@@ -183,7 +183,7 @@ var VoipInvite = exports.VoipInvite = (0, _mobxReact.observer)(function () {
|
|
|
183
183
|
onClick: function onClick() {
|
|
184
184
|
return setCurrentVoipType(VoipType.H323);
|
|
185
185
|
},
|
|
186
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
186
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
187
187
|
children: "H323"
|
|
188
188
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_radio.FcrRadio, {
|
|
189
189
|
styleType: "white",
|
|
@@ -197,8 +197,8 @@ var VoipInvite = exports.VoipInvite = (0, _mobxReact.observer)(function () {
|
|
|
197
197
|
onClick: function onClick() {
|
|
198
198
|
return setCurrentVoipType(VoipType.SIP);
|
|
199
199
|
},
|
|
200
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("
|
|
201
|
-
children: "
|
|
200
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
201
|
+
children: "SIP"
|
|
202
202
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_radio.FcrRadio, {
|
|
203
203
|
styleType: "white",
|
|
204
204
|
value: VoipType.SIP
|
|
@@ -23,6 +23,16 @@ var _type2 = require("fcr-core/lib/room-control/chatroom-control/type");
|
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
24
|
var minHeight = 350;
|
|
25
25
|
var DividerHeight = 16;
|
|
26
|
+
var ParticipantDialogHeader = (0, _mobxReact.observer)(function () {
|
|
27
|
+
var store = (0, _react.useContext)(_store.StoreContext);
|
|
28
|
+
var transI18n = (0, _i18n.useI18n)();
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
30
|
+
children: [transI18n('fmt_role_participant'), "(", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
31
|
+
className: "participant-dialog-header-count",
|
|
32
|
+
children: store.participantCount
|
|
33
|
+
}), ")"]
|
|
34
|
+
});
|
|
35
|
+
});
|
|
26
36
|
var Aside = exports.Aside = (0, _mobxReact.observer)(function (_ref) {
|
|
27
37
|
var width = _ref.width,
|
|
28
38
|
onDragHandler = _ref.onDragHandler,
|
|
@@ -88,7 +98,7 @@ var Aside = exports.Aside = (0, _mobxReact.observer)(function (_ref) {
|
|
|
88
98
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_windowHeader.FcrWindowHeader, {
|
|
89
99
|
showClose: false // 在 Aside 中有自定义的按钮样式,不用 header 中的关闭按钮
|
|
90
100
|
,
|
|
91
|
-
title:
|
|
101
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(ParticipantDialogHeader, {}),
|
|
92
102
|
type: _windowHeader.WindowType.MODAL,
|
|
93
103
|
onTypeChange: moveParticipantFromAsideToDialog,
|
|
94
104
|
onClose: closeParticipantFromAside,
|
|
@@ -221,7 +221,7 @@ var Carousel = exports.Carousel = (0, _mobxReact.observer)(function () {
|
|
|
221
221
|
}),
|
|
222
222
|
videoRenderMode: _type3.AgoraRtcRenderMode.FIT,
|
|
223
223
|
videoStreamType: _type3.AgoraRtcVideoStreamType.LOW_STREAM,
|
|
224
|
-
showAvatar:
|
|
224
|
+
showAvatar: true,
|
|
225
225
|
windowData: windowData,
|
|
226
226
|
onDoubleClick: function onDoubleClick() {
|
|
227
227
|
if (windowData.videoSourceType === _fcrCore.FcrVideoSourceType.SCREEN || windowData.isPin) {
|
|
@@ -54,7 +54,10 @@ var Layout = exports.Layout = (0, _mobxReact.observer)(function () {
|
|
|
54
54
|
getWaterMarkContent = layoutStore.getWaterMarkContent,
|
|
55
55
|
isMulti = layoutStore.isMulti,
|
|
56
56
|
isWaterMarkEnabled = layoutStore.isWaterMarkEnabled,
|
|
57
|
-
localUser = layoutStore.localUser
|
|
57
|
+
localUser = layoutStore.localUser,
|
|
58
|
+
setAsideWidth = layoutStore.setAsideWidth,
|
|
59
|
+
toggleAside = layoutStore.toggleAside,
|
|
60
|
+
asideWidthChanged = layoutStore.asideWidthChanged;
|
|
58
61
|
var _useDelayedMeasure = (0, _hooks.useDelayedMeasure)(),
|
|
59
62
|
_useDelayedMeasure2 = (0, _slicedToArray2["default"])(_useDelayedMeasure, 2),
|
|
60
63
|
_ref = _useDelayedMeasure2[0],
|
|
@@ -77,10 +80,10 @@ var Layout = exports.Layout = (0, _mobxReact.observer)(function () {
|
|
|
77
80
|
// !aside && toggleAside(true);
|
|
78
81
|
// return clamped;
|
|
79
82
|
// });
|
|
80
|
-
|
|
83
|
+
setAsideWidth(clamped);
|
|
81
84
|
} else {
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
aside && toggleAside(false);
|
|
86
|
+
asideWidthChanged(0);
|
|
84
87
|
}
|
|
85
88
|
};
|
|
86
89
|
var onPointerUp = function onPointerUp() {
|
|
@@ -318,7 +318,8 @@
|
|
|
318
318
|
.fcr-layout-content-gallery-arrow {
|
|
319
319
|
pointer-events: auto;
|
|
320
320
|
position: absolute;
|
|
321
|
-
top: calc(100% - 160px);
|
|
321
|
+
/* top: calc(100% - 160px); */
|
|
322
|
+
bottom: 155px;
|
|
322
323
|
background-color: var(--fcr_web_ui_scene_fill4_popup);
|
|
323
324
|
border-radius: 8px;
|
|
324
325
|
box-shadow: var(--fcr_web_light_dropup);
|
|
@@ -650,3 +651,7 @@
|
|
|
650
651
|
flex-flow: column nowrap;
|
|
651
652
|
justify-content: flex-end;
|
|
652
653
|
}
|
|
654
|
+
|
|
655
|
+
.participant-dialog-header-count {
|
|
656
|
+
font-weight: 400;
|
|
657
|
+
}
|
|
@@ -16,6 +16,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
16
16
|
value: true
|
|
17
17
|
});
|
|
18
18
|
exports.LayoutUIModule = void 0;
|
|
19
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
19
20
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
20
21
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
21
22
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -27,6 +28,7 @@ var _toast = _interopRequireDefault(require("../dialog/components/toast"));
|
|
|
27
28
|
var _store = _interopRequireWildcard(require("./store"));
|
|
28
29
|
var _view = require("./view");
|
|
29
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
|
+
var _excluded = ["globalToast", "confirm"];
|
|
30
32
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
31
33
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
32
34
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
@@ -44,17 +46,16 @@ var LayoutUIModule = exports.LayoutUIModule = /*#__PURE__*/function (_UIModule)
|
|
|
44
46
|
key: "getComponent",
|
|
45
47
|
value: function getComponent() {
|
|
46
48
|
var slots = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
47
|
-
var
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this._store.updateSlots(slots);
|
|
49
|
+
var globalToast = slots.globalToast,
|
|
50
|
+
confirm = slots.confirm,
|
|
51
|
+
restSlots = (0, _objectWithoutProperties2["default"])(slots, _excluded);
|
|
52
|
+
this._store.updateSlots(restSlots);
|
|
52
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_store.StoreContext.Provider, {
|
|
53
54
|
value: this._store,
|
|
54
55
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_view.View, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_toast["default"], {
|
|
55
|
-
children:
|
|
56
|
+
children: globalToast
|
|
56
57
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_confirm.ConfirmDialog, {
|
|
57
|
-
children:
|
|
58
|
+
children: confirm
|
|
58
59
|
})]
|
|
59
60
|
});
|
|
60
61
|
}
|