fcr-ui-scene 3.5.1 → 3.6.0
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/creator.d.ts +14 -0
- package/lib/creator.js +239 -14
- package/lib/electron/app.js +0 -21
- package/lib/electron/bootstrap-sdk.js +136 -7
- package/lib/electron/injections.d.ts +19 -7
- package/lib/electron/injections.js +206 -77
- package/lib/electron/ipc/ipc.d.ts +26 -0
- package/lib/electron/ipc/ipc.js +137 -0
- package/lib/electron/ipc/type.d.ts +11 -0
- package/lib/electron/ipc/type.js +19 -0
- package/lib/electron/logger.js +1 -1
- package/lib/electron/main.js +1 -1
- package/lib/electron/plugins/meeting-state.d.ts +1 -0
- package/lib/electron/plugins/meeting-state.js +3 -3
- package/lib/electron/plugins/screenshot.js +2 -2
- package/lib/electron/preload.js +67 -5
- package/lib/electron/window.js +0 -2
- package/lib/global.css +21 -0
- package/lib/modules/action-bar/components/apps/index.js +1 -0
- package/lib/modules/action-bar/components/apps/useWidgetList.js +1 -1
- package/lib/modules/action-bar/components/item/index.d.ts +2 -0
- package/lib/modules/action-bar/components/item/index.js +4 -2
- package/lib/modules/action-bar/components/leave/index.js +1 -0
- package/lib/modules/action-bar/components/more/index.js +1 -0
- package/lib/modules/action-bar/components/record/index.js +43 -106
- package/lib/modules/action-bar/components/record/popover.d.ts +4 -0
- package/lib/modules/action-bar/components/record/popover.js +57 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.js +1 -0
- package/lib/modules/action-bar/components/screen-share/index.js +15 -3
- package/lib/modules/action-bar/components/screen-share/submenu.js +2 -2
- package/lib/modules/action-bar/components/security/index.js +2 -1
- package/lib/modules/action-bar/components/smaller/index.js +1 -1
- package/lib/modules/action-bar/components/trigger-output-language/index.js +17 -22
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +2 -1
- package/lib/modules/action-bar/index.css +3 -2
- package/lib/modules/action-bar/index.js +2 -1
- package/lib/modules/action-bar/store.d.ts +5 -0
- package/lib/modules/action-bar/store.js +30 -12
- package/lib/modules/action-bar/types.d.ts +1 -0
- package/lib/modules/chat/chat-room-store.js +1 -1
- package/lib/modules/chat/components/chat-bar/index.d.ts +1 -1
- package/lib/modules/chat/components/chat-bar/index.js +5 -3
- package/lib/modules/chat/components/chat-select/select-item/index.js +1 -1
- package/lib/modules/chat/components/message-list/index.js +1 -2
- package/lib/modules/chat/components/message-list/message-item/index.d.ts +0 -1
- package/lib/modules/chat/components/message-list/message-item/index.js +9 -10
- package/lib/modules/chat/index.css +24 -0
- package/lib/modules/chat/view.js +13 -3
- package/lib/modules/components/device-control/components/carmera/index.js +4 -5
- package/lib/modules/components/device-control/components/microphone/index.js +4 -5
- package/lib/modules/components/device-control/index.css +6 -3
- package/lib/modules/components/leave-meeting/components/assign-host.js +26 -4
- package/lib/modules/components/leave-meeting/components/index.css +35 -0
- package/lib/modules/components/leave-meeting/index.js +1 -0
- package/lib/modules/components/leave-meeting/store.js +25 -67
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +3 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +1 -1
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +10 -9
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +1 -1
- package/lib/modules/components/member-window/components/member-actions/index.js +2 -2
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +3 -14
- package/lib/modules/components/member-window/index.css +18 -7
- package/lib/modules/components/member-window/types.d.ts +1 -1
- package/lib/modules/components/security-menu/index.css +2 -2
- package/lib/modules/components/security-menu/index.js +80 -28
- package/lib/modules/components/tab-frame/index.css +1 -1
- package/lib/modules/control-bar/components/meeting-details/index.css +1 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +15 -9
- package/lib/modules/control-bar/components/more-actions/index.js +3 -21
- package/lib/modules/control-bar/components/share-state-nav/index.js +4 -20
- package/lib/modules/control-bar/index.d.ts +2 -0
- package/lib/modules/control-bar/index.js +3 -1
- package/lib/modules/control-bar/store.d.ts +11 -2
- package/lib/modules/control-bar/store.js +103 -95
- package/lib/modules/control-bar/view.js +1 -6
- package/lib/modules/device-pretest/audio-preview/speaker-detection.js +1 -1
- package/lib/modules/dialog/components/chat/electron.d.ts +1 -3
- package/lib/modules/dialog/components/chat/index.js +24 -17
- package/lib/modules/dialog/components/confirm-leave-meeting/index.d.ts +6 -0
- package/lib/modules/dialog/components/confirm-leave-meeting/index.js +86 -0
- package/lib/modules/dialog/components/control-bar/index.d.ts +1 -2
- package/lib/modules/dialog/components/control-bar/index.js +5 -17
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -0
- package/lib/modules/dialog/components/dialog-container/component/body.js +4 -2
- package/lib/modules/dialog/components/dialog-container/index.css +2 -1
- package/lib/modules/dialog/components/dialog-container/index.d.ts +1 -0
- package/lib/modules/dialog/components/dialog-container/index.js +3 -1
- package/lib/modules/dialog/components/participant/index.d.ts +0 -1
- package/lib/modules/dialog/components/participant/index.js +15 -24
- package/lib/modules/dialog/components/pre-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/pre-setting/electron.js +51 -0
- package/lib/modules/dialog/components/pre-setting/index.css +26 -0
- package/lib/modules/dialog/components/pre-setting/index.d.ts +6 -0
- package/lib/modules/dialog/components/pre-setting/index.js +38 -0
- package/lib/modules/dialog/components/pre-setting-container/component/body.d.ts +8 -0
- package/lib/modules/dialog/components/pre-setting-container/component/body.js +80 -0
- package/lib/modules/dialog/components/pre-setting-container/index.css +82 -0
- package/lib/modules/dialog/components/pre-setting-container/index.d.ts +18 -0
- package/lib/modules/dialog/components/pre-setting-container/index.js +117 -0
- package/lib/modules/dialog/components/rename/index.d.ts +4 -0
- package/lib/modules/dialog/components/rename/index.js +72 -0
- package/lib/modules/dialog/components/video-window/index.js +18 -16
- package/lib/modules/dialog/components/widget/electron.d.ts +2 -1
- package/lib/modules/dialog/components/widget/electron.js +3 -2
- package/lib/modules/dialog/components/widget/index.d.ts +2 -1
- package/lib/modules/dialog/components/widget/index.js +4 -6
- package/lib/modules/dialog/dialogs.d.ts +1 -0
- package/lib/modules/dialog/dialogs.js +3 -2
- package/lib/modules/dialog/hooks/useElectron.d.ts +2 -0
- package/lib/modules/dialog/hooks/useElectron.js +11 -13
- package/lib/modules/dialog/index.d.ts +2 -0
- package/lib/modules/dialog/index.js +2 -1
- package/lib/modules/dialog/store.d.ts +8 -3
- package/lib/modules/dialog/store.js +38 -26
- package/lib/modules/dialog/type.d.ts +1 -0
- package/lib/modules/dialog/view.js +2 -1
- package/lib/modules/event-confirm/index.d.ts +2 -0
- package/lib/modules/event-confirm/index.js +2 -1
- package/lib/modules/event-confirm/store.d.ts +9 -1
- package/lib/modules/event-confirm/store.js +94 -8
- package/lib/modules/event-confirm/view.js +55 -46
- package/lib/modules/{sound-effect → event-sound}/index.d.ts +3 -2
- package/lib/modules/{sound-effect → event-sound}/index.js +9 -5
- package/lib/modules/event-toast/store.js +2 -0
- package/lib/modules/interpreter/dialog-content/index.js +4 -1
- package/lib/modules/interpreter/index.d.ts +2 -0
- package/lib/modules/interpreter/index.js +2 -1
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -0
- package/lib/modules/interpreter/store.d.ts +2 -2
- package/lib/modules/interpreter/store.js +30 -24
- package/lib/modules/interpreter/type.d.ts +2 -0
- package/lib/modules/invite/components/pstn-invite.js +3 -9
- package/lib/modules/invite/components/voip-invite.css +26 -0
- package/lib/modules/invite/components/voip-invite.d.ts +1 -0
- package/lib/modules/invite/components/voip-invite.js +8 -11
- package/lib/modules/invite/index.css +16 -3
- package/lib/modules/invite/index.d.ts +2 -1
- package/lib/modules/invite/index.js +2 -1
- package/lib/modules/invite/store.d.ts +5 -1
- package/lib/modules/invite/store.js +8 -1
- package/lib/modules/layout/components/Carousel.d.ts +1 -1
- package/lib/modules/layout/components/Carousel.js +16 -118
- package/lib/modules/layout/components/CommonVideoRenderer.d.ts +13 -0
- package/lib/modules/layout/components/CommonVideoRenderer.js +214 -0
- package/lib/modules/layout/components/Gallery.d.ts +1 -0
- package/lib/modules/layout/components/Gallery.js +62 -205
- package/lib/modules/layout/components/index.css +17 -34
- package/lib/modules/layout/index.d.ts +2 -0
- package/lib/modules/layout/index.js +2 -1
- package/lib/modules/layout/store.d.ts +5 -2
- package/lib/modules/layout/store.js +47 -39
- package/lib/modules/layout/type.d.ts +4 -0
- package/lib/modules/layout/type.js +6 -1
- package/lib/modules/live-streaming/store.d.ts +1 -0
- package/lib/modules/live-streaming/store.js +19 -8
- package/lib/modules/participant/components/confirm-input/index.d.ts +4 -4
- package/lib/modules/participant/components/confirm-input/index.js +74 -6
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +27 -3
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +4 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +3 -2
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +4 -3
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +1 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +9 -1
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +1 -1
- package/lib/modules/participant/components/participants/components/participants/index.css +1 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +18 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +12 -5
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +1 -8
- package/lib/modules/participant/index.css +6 -0
- package/lib/modules/participant/index.d.ts +1 -0
- package/lib/modules/participant/index.js +9 -0
- package/lib/modules/participant/store.d.ts +6 -0
- package/lib/modules/participant/store.js +130 -96
- package/lib/modules/pc-audio-connect/store.js +1 -1
- package/lib/modules/phone-audio-connect/index.d.ts +2 -0
- package/lib/modules/phone-audio-connect/index.js +2 -1
- package/lib/modules/phone-audio-connect/store.d.ts +4 -1
- package/lib/modules/phone-audio-connect/store.js +4 -2
- package/lib/modules/setting/audio-settings/audio-settings.js +70 -48
- package/lib/modules/setting/audio-settings/index.css +23 -6
- package/lib/modules/setting/general-settings/general-settings.d.ts +1 -2
- package/lib/modules/setting/general-settings/general-settings.js +111 -37
- package/lib/modules/setting/general-settings/index.css +15 -0
- package/lib/modules/setting/index.d.ts +4 -1
- package/lib/modules/setting/index.js +7 -4
- package/lib/modules/setting/state/index.js +1 -1
- package/lib/modules/setting/store.d.ts +24 -11
- package/lib/modules/setting/store.js +203 -142
- package/lib/modules/setting/video-settings/index.css +13 -2
- package/lib/modules/setting/video-settings/video-settings-basic.js +18 -27
- package/lib/modules/setting/video-settings/video-settings.d.ts +0 -2
- package/lib/modules/setting/video-settings/video-settings.js +3 -2
- package/lib/modules/setting/view.d.ts +11 -2
- package/lib/modules/setting/view.js +93 -71
- package/lib/modules/share-screen/components/selection/index.js +6 -2
- package/lib/modules/share-screen/index.d.ts +4 -1
- package/lib/modules/share-screen/index.js +3 -1
- package/lib/modules/share-screen/store.d.ts +15 -5
- package/lib/modules/share-screen/store.js +105 -59
- package/lib/modules/share-screen/view.js +1 -1
- package/lib/modules/state-bar/index.css +4 -2
- package/lib/modules/state-bar/index.d.ts +2 -0
- package/lib/modules/state-bar/index.js +2 -1
- package/lib/modules/state-bar/layout-config.js +1 -0
- package/lib/modules/state-bar/live-streaming-state.js +1 -0
- package/lib/modules/state-bar/meeting-detail.css +10 -1
- package/lib/modules/state-bar/meeting-details.js +42 -26
- package/lib/modules/state-bar/meeting-network-state.css +8 -0
- package/lib/modules/state-bar/meeting-time.js +9 -20
- package/lib/modules/state-bar/store.d.ts +5 -1
- package/lib/modules/state-bar/store.js +10 -3
- package/lib/modules/state-bar/view.js +17 -6
- package/lib/modules/video-window/components/members/index.js +0 -3
- package/lib/modules/waiting-room-layout/index.css +13 -0
- package/lib/modules/waiting-room-layout/index.d.ts +2 -1
- package/lib/modules/waiting-room-layout/index.js +2 -1
- package/lib/modules/waiting-room-layout/store.d.ts +12 -1
- package/lib/modules/waiting-room-layout/store.js +42 -6
- package/lib/modules/waiting-room-layout/view.js +22 -5
- package/lib/modules/whiteboard/components/control-bar/index.css +1 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +1 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.js +3 -1
- package/lib/modules/whiteboard/components/toolbar/ style.css +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +3 -14
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +83 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +2 -2
- package/lib/modules/whiteboard/components/toolbar/components/history.js +3 -3
- package/lib/modules/whiteboard/components/toolbar/components/item/index.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/item/index.js +42 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -2
- package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +2 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +3 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +6 -6
- package/lib/modules/whiteboard/components/toolbar/index.js +9 -113
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +18 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +276 -83
- package/lib/modules/whiteboard/context.d.ts +1 -2
- package/lib/modules/whiteboard/index.d.ts +1 -14
- package/lib/modules/whiteboard/index.js +131 -426
- package/lib/modules/whiteboard/view.js +12 -10
- package/lib/modules/widget/sdk.js +2 -1
- package/lib/object-manager.d.ts +8 -0
- package/lib/object-manager.js +75 -0
- package/lib/plugins/browser-runtime-plugin.js +19 -14
- package/lib/providers/ability-provider.d.ts +8 -0
- package/lib/providers/ability-provider.js +14 -0
- package/lib/providers/device-privilege-provider.d.ts +1 -0
- package/lib/providers/device-privilege-provider.js +53 -75
- package/lib/providers/device-provider.d.ts +18 -8
- package/lib/providers/device-provider.js +397 -209
- package/lib/providers/device-stream-provider.js +0 -4
- package/lib/providers/dialog-provider.d.ts +1 -0
- package/lib/providers/dialog-provider.js +4 -18
- package/lib/providers/event-provider.js +45 -2
- package/lib/providers/interpreter-provider.d.ts +4 -0
- package/lib/providers/interpreter-provider.js +166 -137
- package/lib/providers/message-provider.js +44 -2
- package/lib/providers/privilege-provider.d.ts +33 -0
- package/lib/providers/privilege-provider.js +120 -45
- package/lib/providers/room-provider.d.ts +12 -10
- package/lib/providers/room-provider.js +162 -262
- package/lib/providers/screen-share-provider.d.ts +4 -0
- package/lib/providers/screen-share-provider.js +3 -6
- package/lib/providers/widget-provider.js +6 -4
- package/lib/runtime.d.ts +20 -8
- package/lib/scenes/main-scene.d.ts +2 -0
- package/lib/scenes/main-scene.js +95 -37
- package/lib/scenes/waiting-scene.js +16 -13
- package/lib/schema.d.ts +55 -32
- package/lib/schema.js +23 -9
- package/lib/shared-data-source/config.d.ts +6 -2
- package/lib/shared-data-source/config.js +81 -10
- package/lib/shared-data-source/member-data.d.ts +16 -20
- package/lib/shared-data-source/member-data.js +121 -110
- package/lib/shared-data-source/screen-share-data-source.d.ts +37 -0
- package/lib/shared-data-source/screen-share-data-source.js +134 -0
- package/lib/shared-data-source/security-data.d.ts +1 -0
- package/lib/shared-data-source/security-data.js +3 -5
- package/lib/shared-data-source/setting.d.ts +1 -0
- package/lib/shared-data-source/setting.js +33 -17
- package/lib/shared-data-source/video-window.d.ts +3 -3
- package/lib/shared-data-source/video-window.js +55 -38
- package/lib/translations/enUS.d.ts +48 -1
- package/lib/translations/enUS.js +101 -17
- package/lib/translations/zhCN.d.ts +48 -1
- package/lib/translations/zhCN.js +88 -4
- package/lib/type.d.ts +40 -20
- package/lib/type.js +14 -1
- package/lib/ui-manager.d.ts +11 -9
- package/lib/ui-manager.js +118 -29
- package/lib/ui-scene.d.ts +7 -4
- package/lib/ui-scene.js +111 -128
- package/lib/utilities/constant.d.ts +3 -1
- package/lib/utilities/constant.js +2 -0
- package/lib/utilities/copyText.js +15 -11
- package/lib/utilities/default-config.d.ts +2 -0
- package/lib/utilities/default-config.js +11 -5
- package/lib/utilities/i18n-common-data.d.ts +2 -0
- package/lib/utilities/i18n-common-data.js +15 -0
- package/lib/utilities/logger.d.ts +0 -1
- package/lib/utilities/logger.js +3 -4
- package/lib/utilities/renderer.d.ts +0 -9
- package/lib/utilities/renderer.js +1 -70
- package/lib/utilities/screen.js +3 -1
- package/lib/utilities/setting-config-storage.d.ts +6 -1
- package/lib/utilities/setting-config-storage.js +21 -4
- package/lib/utilities/tools.d.ts +7 -6
- package/lib/utilities/tools.js +56 -44
- package/lib/utilities/ui-resources.d.ts +6 -0
- package/lib/utilities/ui-resources.js +47 -9
- package/lib/waiting-room-control-manager.d.ts +4 -4
- package/lib/waiting-room-control-manager.js +29 -9
- package/package.json +6 -6
- package/public/assets/browser/images/default1.jpg +0 -0
- package/public/assets/browser/images/default2.jpg +0 -0
- package/public/assets/browser/images/default3.jpg +0 -0
- package/public/assets/browser/images/default4.jpg +0 -0
- package/public/assets/browser/images/default5.jpg +0 -0
- package/public/assets/browser/images/default6.jpg +0 -0
- package/public/assets/browser/images/default7.jpg +0 -0
- package/public/assets/browser/sound_effects/pretest.mp3 +0 -0
- package/public/assets/browser/sound_effects/recording_started.mp3 +0 -0
- package/public/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
- package/public/assets/browser/sound_effects/speaker_test.mp3 +0 -0
- package/public/assets/browser/videos/default8.mp4 +0 -0
- package/public/assets/browser/videos/default9.mp4 +0 -0
- package/public/assets/electron/images/default1.jpg +0 -0
- package/public/assets/electron/images/default2.jpg +0 -0
- package/public/assets/electron/sound_effects/pretest.mp3 +0 -0
- package/public/assets/electron/videos/default8.mp4 +0 -0
- package/public/index.html +103 -82
- package/lib/hooks/meeting-time.d.ts +0 -15
- package/lib/hooks/meeting-time.js +0 -92
- package/lib/login-confirm-dialog.d.ts +0 -13
- package/lib/login-confirm-dialog.js +0 -85
- package/lib/modules/action-bar/components/apps/appitems.d.ts +0 -3
- package/lib/modules/action-bar/components/apps/appitems.js +0 -45
- package/lib/modules/components/member-window/components/member-board.d.ts +0 -2
- package/lib/modules/components/member-window/components/member-board.js +0 -63
- package/lib/modules/dialog/components/system-preference/bg1.png +0 -0
- package/lib/modules/dialog/components/system-preference/bg2.png +0 -0
- package/lib/modules/dialog/types/index.d.ts +0 -70
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +0 -6
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +0 -28
- package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +0 -7
- package/lib/modules/participant/components/attendee/components/user-avatar/index.js +0 -39
- package/lib/modules/participant/components/attendee/index.css +0 -69
- package/lib/modules/participant/components/attendee/index.d.ts +0 -4
- package/lib/modules/participant/components/attendee/index.js +0 -337
- package/lib/modules/participant/components/drop-menu/index.css +0 -60
- package/lib/modules/participant/components/drop-menu/index.d.ts +0 -2
- package/lib/modules/participant/components/drop-menu/index.js +0 -189
- package/lib/modules/participant/components/footer/buttons.d.ts +0 -6
- package/lib/modules/participant/components/footer/buttons.js +0 -52
- package/lib/modules/participant/components/footer/index.d.ts +0 -4
- package/lib/modules/participant/components/footer/index.js +0 -37
- package/lib/modules/participant/components/merge/index.d.ts +0 -11
- package/lib/modules/participant/components/merge/index.js +0 -49
- package/lib/modules/participant/components/rename/index.d.ts +0 -4
- package/lib/modules/participant/components/rename/index.js +0 -45
- package/lib/modules/participant/components/user-action/index.d.ts +0 -17
- package/lib/modules/participant/components/user-action/index.js +0 -169
- package/lib/modules/video-window/deviceState/index.d.ts +0 -16
- package/lib/modules/video-window/deviceState/index.js +0 -75
- package/lib/modules/video-window/members/index.css +0 -51
- package/lib/modules/video-window/members/index.d.ts +0 -2
- package/lib/modules/video-window/members/index.js +0 -157
- package/lib/modules/video-window/speaking/index.css +0 -69
- package/lib/modules/video-window/speaking/index.d.ts +0 -3
- package/lib/modules/video-window/speaking/index.js +0 -57
- package/lib/modules/video-window/topControl/index.css +0 -35
- package/lib/modules/video-window/topControl/index.d.ts +0 -3
- package/lib/modules/video-window/topControl/index.js +0 -92
- /package/lib/modules/{sound-effect → event-sound}/sound-effect-player.d.ts +0 -0
- /package/lib/modules/{sound-effect → event-sound}/sound-effect-player.js +0 -0
|
@@ -102,12 +102,10 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
102
102
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
103
103
|
var _type = require("./type");
|
|
104
104
|
var _view = require("./view");
|
|
105
|
-
var
|
|
105
|
+
var _context2 = require("./context");
|
|
106
106
|
var _mobx = require("mobx");
|
|
107
107
|
var _utils = require("./utils");
|
|
108
108
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
109
|
-
var _tinycolor = _interopRequireDefault(require("tinycolor2"));
|
|
110
|
-
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
111
109
|
var _multiWindow = require("./components/multi-window");
|
|
112
110
|
var _constant = require("../../utilities/constant");
|
|
113
111
|
var _store = require("./components/toolbar/store");
|
|
@@ -116,7 +114,6 @@ var _store2 = require("./components/control-bar/store");
|
|
|
116
114
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
117
115
|
var _type2 = require("fcr-core/lib/type");
|
|
118
116
|
var _fcrCore = require("fcr-core");
|
|
119
|
-
var _enums = require("fcr-core/lib/room-control/whiteboard-control/enums");
|
|
120
117
|
var _libs = _interopRequireDefault(require("./components/switch-theme/libs"));
|
|
121
118
|
var _types = require("fcr-core/lib/room-control/whiteboard-control/types");
|
|
122
119
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
@@ -124,7 +121,7 @@ var _type3 = require("agora-ui-foundation/lib/components/icon/type");
|
|
|
124
121
|
var _logger = require("../../utilities/logger");
|
|
125
122
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
126
123
|
var _FcrWhiteboardUIModule;
|
|
127
|
-
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs,
|
|
124
|
+
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _setBackgroundDecs, _boardUIEventsDecs, _repositionToolbarDecs, _setConnectionStateDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _ref;
|
|
128
125
|
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; }
|
|
129
126
|
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; }
|
|
130
127
|
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)); }
|
|
@@ -144,7 +141,7 @@ var _B = /*#__PURE__*/new WeakMap();
|
|
|
144
141
|
var _C = /*#__PURE__*/new WeakMap();
|
|
145
142
|
var _D = /*#__PURE__*/new WeakMap();
|
|
146
143
|
var _E = /*#__PURE__*/new WeakMap();
|
|
147
|
-
_ref = (_onPropertiesUpdateDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound],
|
|
144
|
+
_ref = (_onPropertiesUpdateDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _setBackgroundDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "_disposers");
|
|
148
145
|
var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/function (_UIModule) {
|
|
149
146
|
function FcrWhiteboardUIModule() {
|
|
150
147
|
var _this;
|
|
@@ -155,19 +152,72 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
155
152
|
_this = _callSuper(this, FcrWhiteboardUIModule, [].concat(args));
|
|
156
153
|
(0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), []));
|
|
157
154
|
(0, _defineProperty2["default"])(_this, "_connectionState", _fcrCore.FcrConnectionState.DISCONNECTED);
|
|
158
|
-
(0, _defineProperty2["default"])(_this, "_defaultBoardState", {
|
|
159
|
-
tool: _enums.FcrBoardToolType.LASER_POINTER,
|
|
160
|
-
strokeColor: '#fed130',
|
|
161
|
-
strokeWidth: 2
|
|
162
|
-
});
|
|
163
155
|
(0, _defineProperty2["default"])(_this, "_initWidth", 1920);
|
|
164
156
|
(0, _defineProperty2["default"])(_this, "_initHeight", 1220);
|
|
165
157
|
(0, _defineProperty2["default"])(_this, "_joinSuccessed", false);
|
|
166
158
|
(0, _defineProperty2["default"])(_this, "_isActive", false);
|
|
167
159
|
(0, _defineProperty2["default"])(_this, "_timer", null);
|
|
168
160
|
(0, _defineProperty2["default"])(_this, "_isMyBoard", false);
|
|
169
|
-
(0, _defineProperty2["default"])(_this, "
|
|
170
|
-
|
|
161
|
+
(0, _defineProperty2["default"])(_this, "_boardObserver", {
|
|
162
|
+
onActive: function onActive(_, operatorUser) {
|
|
163
|
+
return _this.onPropertiesUpdate({
|
|
164
|
+
operatorUser: operatorUser
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
onInactive: function onInactive(reason, operatorUser) {
|
|
168
|
+
var _this$_localUser, _this$_ownerUser, _this$_ownerUser2;
|
|
169
|
+
var currentUserId = (_this$_localUser = _this._localUser) === null || _this$_localUser === void 0 ? void 0 : _this$_localUser.userId;
|
|
170
|
+
var isSeize = reason === _types.FcrBoardInactiveReason.SEIZE;
|
|
171
|
+
var isMeOperated = (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) === currentUserId;
|
|
172
|
+
var isMeOwner = ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId;
|
|
173
|
+
_this.logger.info("Fcr board has inactive effect, the reason is ".concat(reason, ", the operator is ").concat(operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userName, ", the owner is ").concat((_this$_ownerUser2 = _this._ownerUser) === null || _this$_ownerUser2 === void 0 ? void 0 : _this$_ownerUser2.userName));
|
|
174
|
+
isSeize && !isMeOperated && isMeOwner && _this._alertWhenReplace(operatorUser);
|
|
175
|
+
_this.onDestroy({
|
|
176
|
+
operatorUser: operatorUser
|
|
177
|
+
});
|
|
178
|
+
},
|
|
179
|
+
onBackgroundColorUpdated: _this._setBackground,
|
|
180
|
+
onConnectionStateUpdated: function () {
|
|
181
|
+
var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
|
|
182
|
+
var _this$_whiteboardCont, _this$_whiteboardCont2, mainWindow, _this$_whiteboardCont3, ownerUserId, isActive, _this$_userControl, ownerUser;
|
|
183
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
184
|
+
while (1) switch (_context.prev = _context.next) {
|
|
185
|
+
case 0:
|
|
186
|
+
_this.logger.info('Fcr board connection state changed to', state);
|
|
187
|
+
_this._setConnectionState(state);
|
|
188
|
+
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
189
|
+
if (_this._joined) {
|
|
190
|
+
(_this$_whiteboardCont = _this._whiteboardControl) === null || _this$_whiteboardCont === void 0 || _this$_whiteboardCont.open();
|
|
191
|
+
} else {
|
|
192
|
+
_this.unmount();
|
|
193
|
+
_this.unload();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
197
|
+
_this._setJoinSuccessed(true);
|
|
198
|
+
mainWindow = (_this$_whiteboardCont2 = _this._whiteboardControl) === null || _this$_whiteboardCont2 === void 0 ? void 0 : _this$_whiteboardCont2.getMainWindow();
|
|
199
|
+
_this.logger.info('Fcr board join success');
|
|
200
|
+
if (_this._whiteboardControl) {
|
|
201
|
+
_this$_whiteboardCont3 = _this._whiteboardControl.getBoardActiveInfo(), ownerUserId = _this$_whiteboardCont3.ownerUserId, isActive = _this$_whiteboardCont3.isActive;
|
|
202
|
+
if (isActive) {
|
|
203
|
+
ownerUser = (_this$_userControl = _this._userControl) === null || _this$_userControl === void 0 ? void 0 : _this$_userControl.getUser(ownerUserId);
|
|
204
|
+
_this._controlbarStore.ownerUser = ownerUser;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
_this._boardMainWindow = mainWindow;
|
|
208
|
+
_this.mount();
|
|
209
|
+
}
|
|
210
|
+
case 4:
|
|
211
|
+
case "end":
|
|
212
|
+
return _context.stop();
|
|
213
|
+
}
|
|
214
|
+
}, _callee);
|
|
215
|
+
}));
|
|
216
|
+
function onConnectionStateUpdated(_x) {
|
|
217
|
+
return _onConnectionStateUpdated.apply(this, arguments);
|
|
218
|
+
}
|
|
219
|
+
return onConnectionStateUpdated;
|
|
220
|
+
}()
|
|
171
221
|
});
|
|
172
222
|
(0, _defineProperty2["default"])(_this, "logger", (0, _logger.createLogger)({
|
|
173
223
|
prefix: 'FcrWhiteboardUIModule'
|
|
@@ -263,8 +313,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
263
313
|
this._roomControl = (_this$currentRoomCont = this.currentRoomControlProvider) === null || _this$currentRoomCont === void 0 ? void 0 : _this$currentRoomCont.currentRoomControl;
|
|
264
314
|
this._securityStore = this.privilegeProvider;
|
|
265
315
|
this._whiteboardControl = this._roomControl.getBoardControl();
|
|
266
|
-
this.
|
|
267
|
-
this._toolbarStore = new _store.ToolbarStore();
|
|
316
|
+
this._toolbarStore = new _store.ToolbarStore(this._whiteboardControl, this._roomControl);
|
|
268
317
|
var streamControl = this._roomControl.getStreamControl();
|
|
269
318
|
var userControl = this._roomControl.getUserControl();
|
|
270
319
|
this._userControl = userControl;
|
|
@@ -274,26 +323,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
274
323
|
userControl: userControl,
|
|
275
324
|
securityStore: this.privilegeProvider
|
|
276
325
|
});
|
|
277
|
-
this._whiteboardControl.addObserver(
|
|
278
|
-
onActive: function onActive(ownerId, operatorUser) {
|
|
279
|
-
_this2.onPropertiesUpdate({
|
|
280
|
-
operatorUser: operatorUser
|
|
281
|
-
});
|
|
282
|
-
},
|
|
283
|
-
onInactive: function onInactive(reason, operatorUser) {
|
|
284
|
-
var _this2$_localUser, _this2$_ownerUser;
|
|
285
|
-
var currentUserId = (_this2$_localUser = _this2._localUser) === null || _this2$_localUser === void 0 ? void 0 : _this2$_localUser.userId;
|
|
286
|
-
if (reason === _types.FcrBoardInactiveReason.SEIZE && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== currentUserId && ((_this2$_ownerUser = _this2._ownerUser) === null || _this2$_ownerUser === void 0 ? void 0 : _this2$_ownerUser.userId) === currentUserId) {
|
|
287
|
-
_this2._alertWhenReplace(operatorUser);
|
|
288
|
-
}
|
|
289
|
-
_this2.onDestroy({
|
|
290
|
-
operatorUser: operatorUser
|
|
291
|
-
});
|
|
292
|
-
},
|
|
293
|
-
onBackgroundColorUpdated: function onBackgroundColorUpdated(color) {
|
|
294
|
-
_this2._setBackground(color);
|
|
295
|
-
}
|
|
296
|
-
});
|
|
326
|
+
this._whiteboardControl.addObserver(this._boardObserver);
|
|
297
327
|
streamControl.addObserver({
|
|
298
328
|
onStreamsRemoved: function onStreamsRemoved(roomId, events) {
|
|
299
329
|
var isReplaced = events.find(function (event) {
|
|
@@ -301,8 +331,8 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
301
331
|
return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _types.FcrBoardInactiveReason.SEIZE;
|
|
302
332
|
});
|
|
303
333
|
var isMyStream = events.some(function (event) {
|
|
304
|
-
var _this2$
|
|
305
|
-
return event.modifiedStream.owner.userId === ((_this2$
|
|
334
|
+
var _this2$_localUser;
|
|
335
|
+
return event.modifiedStream.owner.userId === ((_this2$_localUser = _this2._localUser) === null || _this2$_localUser === void 0 ? void 0 : _this2$_localUser.userId);
|
|
306
336
|
});
|
|
307
337
|
if (isReplaced && isMyStream) {
|
|
308
338
|
_this2._alertWhenReplace(isReplaced === null || isReplaced === void 0 ? void 0 : isReplaced.operatorUser);
|
|
@@ -322,8 +352,8 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
322
352
|
});
|
|
323
353
|
userControl.addObserver({
|
|
324
354
|
onUserInfoUpdated: function onUserInfoUpdated(_, event) {
|
|
325
|
-
var _this2$
|
|
326
|
-
if (event.modifiedUser.userId === ((_this2$
|
|
355
|
+
var _this2$_localUser2;
|
|
356
|
+
if (event.modifiedUser.userId === ((_this2$_localUser2 = _this2._localUser) === null || _this2$_localUser2 === void 0 ? void 0 : _this2$_localUser2.userId)) {
|
|
327
357
|
_this2._localUser = event.modifiedUser;
|
|
328
358
|
_this2._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this2._localUser.userRole);
|
|
329
359
|
}
|
|
@@ -336,11 +366,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
336
366
|
this._localUser = this._userControl.getLocalUser();
|
|
337
367
|
this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(this._localUser.userRole);
|
|
338
368
|
window.addEventListener('resize', this._resetCanvasPosition);
|
|
339
|
-
var
|
|
340
|
-
|
|
341
|
-
|
|
369
|
+
var _this$_whiteboardCont4 = this._whiteboardControl.getBoardActiveInfo(),
|
|
370
|
+
ownerUserId = _this$_whiteboardCont4.ownerUserId,
|
|
371
|
+
isActive = _this$_whiteboardCont4.isActive;
|
|
372
|
+
this._isActive = isActive;
|
|
373
|
+
if (isActive) {
|
|
342
374
|
this._checkBoard();
|
|
343
|
-
this._ownerUser = this._userControl.getUser(
|
|
375
|
+
this._ownerUser = this._userControl.getUser(ownerUserId);
|
|
344
376
|
this._boardBackground = this._whiteboardControl.getBackgroundColor();
|
|
345
377
|
}
|
|
346
378
|
}
|
|
@@ -352,10 +384,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
352
384
|
}, {
|
|
353
385
|
key: "getComponent",
|
|
354
386
|
value: function getComponent(dom) {
|
|
355
|
-
var component = /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
387
|
+
var component = /*#__PURE__*/(0, _jsxRuntime.jsx)(_context2.BoardUIContext.Provider, {
|
|
356
388
|
value: this._boardStore,
|
|
357
389
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_store.ToolbarContext.Provider, {
|
|
358
|
-
value: this.
|
|
390
|
+
value: this._toolbarStore,
|
|
359
391
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_store2.WhiteboardControlBarUIContext.Provider, {
|
|
360
392
|
value: this._controlbarStore,
|
|
361
393
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_multiWindow.MultiWindowWidgetDialog, {
|
|
@@ -377,16 +409,16 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
377
409
|
}, {
|
|
378
410
|
key: "onEvent",
|
|
379
411
|
value: function onEvent(event, payload) {
|
|
380
|
-
var _this$
|
|
412
|
+
var _this$_whiteboardCont6;
|
|
381
413
|
switch (event) {
|
|
382
414
|
case _constant.FcrUIAction.OPEN_WHITEBOARD:
|
|
383
415
|
if (!this._isActive) {
|
|
384
|
-
var _this$
|
|
385
|
-
(_this$
|
|
416
|
+
var _this$_whiteboardCont5;
|
|
417
|
+
(_this$_whiteboardCont5 = this._whiteboardControl) === null || _this$_whiteboardCont5 === void 0 || _this$_whiteboardCont5.active();
|
|
386
418
|
}
|
|
387
419
|
break;
|
|
388
420
|
case _constant.FcrUIAction.CLOSE_WHITEBOARD:
|
|
389
|
-
(_this$
|
|
421
|
+
(_this$_whiteboardCont6 = this._whiteboardControl) === null || _this$_whiteboardCont6 === void 0 || _this$_whiteboardCont6.inactive();
|
|
390
422
|
break;
|
|
391
423
|
case _constant.FcrUIAction.WHITEBOARD_CHANGED:
|
|
392
424
|
this._setCanvasBound(payload.action);
|
|
@@ -398,7 +430,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
398
430
|
if (payload.action === _type.WhiteboardControlbarEvents.ENABLE_CONTROL) {
|
|
399
431
|
var _this$_boardStore;
|
|
400
432
|
(_this$_boardStore = this._boardStore) === null || _this$_boardStore === void 0 || _this$_boardStore.setWriteEnable(payload.payload);
|
|
401
|
-
if (!payload.payload) this._resetToolIfNeed();
|
|
402
433
|
break;
|
|
403
434
|
}
|
|
404
435
|
break;
|
|
@@ -432,10 +463,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
432
463
|
}, {
|
|
433
464
|
key: "onDestroy",
|
|
434
465
|
value: function onDestroy(params) {
|
|
435
|
-
var _this$_securityStore2, _this$
|
|
466
|
+
var _this$_securityStore2, _this$_localUser2;
|
|
436
467
|
var _ref2 = params || {},
|
|
437
468
|
operatorUser = _ref2.operatorUser;
|
|
438
|
-
if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$
|
|
469
|
+
if ((_this$_securityStore2 = this._securityStore) !== null && _this$_securityStore2 !== void 0 && _this$_securityStore2.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== ((_this$_localUser2 = this._localUser) === null || _this$_localUser2 === void 0 ? void 0 : _this$_localUser2.userId) && this._isActive) {
|
|
439
470
|
var _this$_uiEventStore2;
|
|
440
471
|
(_this$_uiEventStore2 = this._uiEventStore) === null || _this$_uiEventStore2 === void 0 || _this$_uiEventStore2.showToast({
|
|
441
472
|
message: this._isMyBoard ? (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard') : (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped'),
|
|
@@ -465,21 +496,31 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
465
496
|
_boardDom.appendChild(view);
|
|
466
497
|
_boardMainWindow.setContainerSizeRatio(aspectRatio);
|
|
467
498
|
this._addDisposers();
|
|
468
|
-
this._resetToolIfNeed();
|
|
469
499
|
this._repositionToolbar();
|
|
470
500
|
if (this._boardMainWindow) {
|
|
471
|
-
var _this$
|
|
472
|
-
this._setBackground(((_this$
|
|
473
|
-
this._toolbarStore
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
501
|
+
var _this$_whiteboardCont7;
|
|
502
|
+
this._setBackground(((_this$_whiteboardCont7 = this._whiteboardControl) === null || _this$_whiteboardCont7 === void 0 ? void 0 : _this$_whiteboardCont7.getBackgroundColor()) || this._boardBackground);
|
|
503
|
+
// this._toolbarStore!.observables.layoutReady = [
|
|
504
|
+
// LonelyWindowState.CLOSE,
|
|
505
|
+
// LonelyWindowState.DEFAULT,
|
|
506
|
+
// ].includes(this._lonelyWindowState);
|
|
507
|
+
|
|
508
|
+
var _getBoardActiveInfo = this._whiteboardControl.getBoardActiveInfo(),
|
|
509
|
+
ownerUserId = _getBoardActiveInfo.ownerUserId,
|
|
510
|
+
isActive = _getBoardActiveInfo.isActive;
|
|
511
|
+
if (isActive) {
|
|
512
|
+
var _this$_userControl2, _this$_ownerUser3, _this$_localUser3, _this$_boardStore2, _this$_boardStore3, _this$_uiEventStore3;
|
|
513
|
+
this._ownerUser = (_this$_userControl2 = this._userControl) === null || _this$_userControl2 === void 0 ? void 0 : _this$_userControl2.getUser(ownerUserId);
|
|
514
|
+
this._isMyBoard = ((_this$_ownerUser3 = this._ownerUser) === null || _this$_ownerUser3 === void 0 ? void 0 : _this$_ownerUser3.userId) === ((_this$_localUser3 = this._localUser) === null || _this$_localUser3 === void 0 ? void 0 : _this$_localUser3.userId);
|
|
515
|
+
(_this$_boardStore2 = this._boardStore) === null || _this$_boardStore2 === void 0 || _this$_boardStore2.setPrivilege(this._isMyBoard || this._isHost);
|
|
516
|
+
(_this$_boardStore3 = this._boardStore) === null || _this$_boardStore3 === void 0 || _this$_boardStore3.setWriteEnable(this._isMyBoard || this._isHost);
|
|
517
|
+
(_this$_uiEventStore3 = this._uiEventStore) === null || _this$_uiEventStore3 === void 0 || _this$_uiEventStore3.sendEvent(_constant.FcrUIAction.WHITEBOARD_CHANGED, {
|
|
518
|
+
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
519
|
+
payload: ownerUserId
|
|
520
|
+
});
|
|
521
|
+
} else {
|
|
522
|
+
this.logger.warn('whiteboard mount, getBoardActiveInfo activeInfo isActive is false , ownerUserId is null');
|
|
523
|
+
}
|
|
483
524
|
}
|
|
484
525
|
}
|
|
485
526
|
}
|
|
@@ -521,7 +562,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
521
562
|
var bgColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#ffffff';
|
|
522
563
|
if (this._boardMainWindow) {
|
|
523
564
|
var _this$_boardMainWindo;
|
|
524
|
-
var themes = (0, _libs["default"])(
|
|
565
|
+
var themes = (0, _libs["default"])();
|
|
525
566
|
var _ref3 = themes.find(function (theme) {
|
|
526
567
|
return theme.background === bgColor;
|
|
527
568
|
}) || {
|
|
@@ -534,20 +575,6 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
534
575
|
}
|
|
535
576
|
}
|
|
536
577
|
}
|
|
537
|
-
}, {
|
|
538
|
-
key: "_resetToolIfNeed",
|
|
539
|
-
value: function _resetToolIfNeed() {
|
|
540
|
-
var _this$_toolbarContext, _this$_toolbarContext2, _this$_toolbarContext3;
|
|
541
|
-
// if (this._boardMainWindow?.mounted) {
|
|
542
|
-
var _this$_defaultBoardSt = this._defaultBoardState,
|
|
543
|
-
strokeColor = _this$_defaultBoardSt.strokeColor,
|
|
544
|
-
strokeWidth = _this$_defaultBoardSt.strokeWidth,
|
|
545
|
-
tool = _this$_defaultBoardSt.tool;
|
|
546
|
-
(_this$_toolbarContext = this._toolbarContext) === null || _this$_toolbarContext === void 0 || _this$_toolbarContext.setStrokeColor(strokeColor);
|
|
547
|
-
(_this$_toolbarContext2 = this._toolbarContext) === null || _this$_toolbarContext2 === void 0 || _this$_toolbarContext2.setStrokeWidth(strokeWidth);
|
|
548
|
-
(_this$_toolbarContext3 = this._toolbarContext) === null || _this$_toolbarContext3 === void 0 || _this$_toolbarContext3.setTool(tool);
|
|
549
|
-
// }
|
|
550
|
-
}
|
|
551
578
|
}, {
|
|
552
579
|
key: "_checkBoard",
|
|
553
580
|
value: function _checkBoard() {
|
|
@@ -693,208 +720,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
693
720
|
observables: observables
|
|
694
721
|
}, this._boardUIEvents(observables));
|
|
695
722
|
}
|
|
696
|
-
}, {
|
|
697
|
-
key: "_createToolbarUIContext",
|
|
698
|
-
value: function _createToolbarUIContext() {
|
|
699
|
-
var _this5 = this;
|
|
700
|
-
var observables = this._toolbarStore.observables;
|
|
701
|
-
this._toolbarContext = {
|
|
702
|
-
observables: observables,
|
|
703
|
-
redo: function redo() {
|
|
704
|
-
var _this5$_boardMainWind;
|
|
705
|
-
return (_this5$_boardMainWind = _this5._boardMainWindow) === null || _this5$_boardMainWind === void 0 ? void 0 : _this5$_boardMainWind.redo();
|
|
706
|
-
},
|
|
707
|
-
undo: function undo() {
|
|
708
|
-
var _this5$_boardMainWind2;
|
|
709
|
-
return (_this5$_boardMainWind2 = _this5._boardMainWindow) === null || _this5$_boardMainWind2 === void 0 ? void 0 : _this5$_boardMainWind2.undo();
|
|
710
|
-
},
|
|
711
|
-
clean: function clean() {
|
|
712
|
-
var _this5$_boardMainWind3;
|
|
713
|
-
return (_this5$_boardMainWind3 = _this5._boardMainWindow) === null || _this5$_boardMainWind3 === void 0 ? void 0 : _this5$_boardMainWind3.clean();
|
|
714
|
-
},
|
|
715
|
-
saveDraft: function saveDraft() {
|
|
716
|
-
return _this5._getSnapshotImage();
|
|
717
|
-
},
|
|
718
|
-
clickExpansionTool: function clickExpansionTool() {},
|
|
719
|
-
setToolbarPosition: function setToolbarPosition(pos) {
|
|
720
|
-
return observables.toolbarPosition = pos;
|
|
721
|
-
},
|
|
722
|
-
dragToolbar: function dragToolbar() {
|
|
723
|
-
return observables.toolbarReleased = false;
|
|
724
|
-
},
|
|
725
|
-
setTool: function setTool(tool) {
|
|
726
|
-
var _this5$_boardMainWind4;
|
|
727
|
-
observables.currentTool = tool;
|
|
728
|
-
observables.currentShape = undefined;
|
|
729
|
-
(_this5$_boardMainWind4 = _this5._boardMainWindow) === null || _this5$_boardMainWind4 === void 0 || _this5$_boardMainWind4.setToolType(tool);
|
|
730
|
-
},
|
|
731
|
-
setPen: function setPen(shape) {
|
|
732
|
-
var _this5$_boardMainWind5, _this5$_boardMainWind6, _this5$_boardMainWind7;
|
|
733
|
-
observables.currentShape = shape;
|
|
734
|
-
observables.lastPen = shape;
|
|
735
|
-
observables.currentTool = undefined;
|
|
736
|
-
(_this5$_boardMainWind5 = _this5._boardMainWindow) === null || _this5$_boardMainWind5 === void 0 || _this5$_boardMainWind5.setToolType(_this5._convertShapeToBoardToolType(shape));
|
|
737
|
-
(_this5$_boardMainWind6 = _this5._boardMainWindow) === null || _this5$_boardMainWind6 === void 0 || _this5$_boardMainWind6.setStrokeWidth(observables.currentStrokeWidth);
|
|
738
|
-
(_this5$_boardMainWind7 = _this5._boardMainWindow) === null || _this5$_boardMainWind7 === void 0 || _this5$_boardMainWind7.setStrokeColor((0, _tinycolor["default"])(observables.currentColor).toRgb());
|
|
739
|
-
},
|
|
740
|
-
setShape: function setShape(shape) {
|
|
741
|
-
var _this5$_boardMainWind8, _this5$_boardMainWind9, _this5$_boardMainWind10;
|
|
742
|
-
observables.currentShape = shape;
|
|
743
|
-
observables.lastShape = shape;
|
|
744
|
-
observables.currentTool = undefined;
|
|
745
|
-
(_this5$_boardMainWind8 = _this5._boardMainWindow) === null || _this5$_boardMainWind8 === void 0 || _this5$_boardMainWind8.setToolType(_this5._convertShapeToBoardToolType(shape));
|
|
746
|
-
(_this5$_boardMainWind9 = _this5._boardMainWindow) === null || _this5$_boardMainWind9 === void 0 || _this5$_boardMainWind9.setStrokeWidth(observables.currentStrokeWidth);
|
|
747
|
-
(_this5$_boardMainWind10 = _this5._boardMainWindow) === null || _this5$_boardMainWind10 === void 0 || _this5$_boardMainWind10.setStrokeColor((0, _tinycolor["default"])(observables.currentColor).toRgb());
|
|
748
|
-
},
|
|
749
|
-
setStrokeColor: function setStrokeColor(color) {
|
|
750
|
-
var _this5$_boardMainWind11;
|
|
751
|
-
observables.currentColor = color;
|
|
752
|
-
(_this5$_boardMainWind11 = _this5._boardMainWindow) === null || _this5$_boardMainWind11 === void 0 || _this5$_boardMainWind11.setStrokeColor((0, _tinycolor["default"])(color).toRgb());
|
|
753
|
-
},
|
|
754
|
-
setStrokeWidth: function setStrokeWidth(strokeWidth) {
|
|
755
|
-
var _this5$_boardMainWind12;
|
|
756
|
-
observables.currentStrokeWidth = strokeWidth;
|
|
757
|
-
(_this5$_boardMainWind12 = _this5._boardMainWindow) === null || _this5$_boardMainWind12 === void 0 || _this5$_boardMainWind12.setStrokeWidth(strokeWidth);
|
|
758
|
-
},
|
|
759
|
-
releaseToolbar: function releaseToolbar() {
|
|
760
|
-
observables.toolbarReleased = true;
|
|
761
|
-
_this5._updateDockPlacement();
|
|
762
|
-
_this5._repositionToolbar();
|
|
763
|
-
},
|
|
764
|
-
captureScreen: function captureScreen() {
|
|
765
|
-
var hideWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
766
|
-
window.runtime.captureScreen({
|
|
767
|
-
hideWindow: hideWindow
|
|
768
|
-
});
|
|
769
|
-
},
|
|
770
|
-
setTheme: (0, _mobx.action)(function (theme) {
|
|
771
|
-
_this5._setBackgroundColor(theme.background);
|
|
772
|
-
observables.colors = theme.colors;
|
|
773
|
-
observables.currentThemeType = theme;
|
|
774
|
-
}),
|
|
775
|
-
setCommonColor: (0, _mobx.action)(function (color) {
|
|
776
|
-
if (observables.commonColors.length < 2) observables.commonColors.push(color);
|
|
777
|
-
if (observables.commonColors.length === 2) {
|
|
778
|
-
observables.commonColors = [color, observables.commonColors[0]];
|
|
779
|
-
}
|
|
780
|
-
})
|
|
781
|
-
};
|
|
782
|
-
return this._toolbarContext;
|
|
783
|
-
}
|
|
784
|
-
}, {
|
|
785
|
-
key: "_updateDockPosition",
|
|
786
|
-
value: function _updateDockPosition() {
|
|
787
|
-
if (this._toolbarContext) {
|
|
788
|
-
var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
|
|
789
|
-
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
790
|
-
if (containerDom && toolbarDom) {
|
|
791
|
-
var containerClientRect = containerDom.getBoundingClientRect();
|
|
792
|
-
var toolbarClientRect = toolbarDom.getBoundingClientRect();
|
|
793
|
-
var toolbarOffsetTop = 4;
|
|
794
|
-
var toolbarContext = this._toolbarContext;
|
|
795
|
-
(0, _mobx.runInAction)(function () {
|
|
796
|
-
if (toolbarContext.observables.toolbarDockPosition.placement === 'right') {
|
|
797
|
-
// right
|
|
798
|
-
toolbarContext.observables.toolbarDockPosition = {
|
|
799
|
-
x: containerClientRect.width - toolbarClientRect.width,
|
|
800
|
-
y: toolbarOffsetTop,
|
|
801
|
-
placement: 'right'
|
|
802
|
-
};
|
|
803
|
-
} else {
|
|
804
|
-
// left
|
|
805
|
-
toolbarContext.observables.toolbarDockPosition = {
|
|
806
|
-
x: 0,
|
|
807
|
-
y: toolbarOffsetTop,
|
|
808
|
-
placement: 'left'
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
});
|
|
812
|
-
}
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
}, {
|
|
816
|
-
key: "_updateDockPlacement",
|
|
817
|
-
value: function _updateDockPlacement() {
|
|
818
|
-
if (this._toolbarContext) {
|
|
819
|
-
var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
|
|
820
|
-
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
821
|
-
if (containerDom && toolbarDom) {
|
|
822
|
-
var containerClientRect = containerDom.getBoundingClientRect();
|
|
823
|
-
var toolbarClientRect = toolbarDom.getBoundingClientRect();
|
|
824
|
-
var toolbarCenterPos = toolbarClientRect.left - containerClientRect.left + toolbarClientRect.width / 2;
|
|
825
|
-
var toolbarContext = this._toolbarContext;
|
|
826
|
-
(0, _mobx.runInAction)(function () {
|
|
827
|
-
if (toolbarCenterPos > containerClientRect.width / 2) {
|
|
828
|
-
// right
|
|
829
|
-
toolbarContext.observables.toolbarDockPosition.placement = 'right';
|
|
830
|
-
} else {
|
|
831
|
-
// left
|
|
832
|
-
toolbarContext.observables.toolbarDockPosition.placement = 'left';
|
|
833
|
-
}
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
723
|
}, {
|
|
839
724
|
key: "_repositionToolbar",
|
|
840
725
|
value: function _repositionToolbar() {
|
|
841
|
-
|
|
842
|
-
var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
|
|
843
|
-
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
844
|
-
if (containerDom && toolbarDom) {
|
|
845
|
-
setTimeout(this._updateMaxVisibleTools);
|
|
846
|
-
// wait until the UI rerenders, then actual dimensions can be obtained
|
|
847
|
-
setTimeout(this._updateDockPosition);
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
}, {
|
|
852
|
-
key: "_updateMaxVisibleTools",
|
|
853
|
-
value: function _updateMaxVisibleTools() {
|
|
854
|
-
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
855
|
-
if (this._toolbarContext && containerDom) {
|
|
856
|
-
var containerClientRect = containerDom.getBoundingClientRect();
|
|
857
|
-
var placement = this._toolbarContext.observables.toolbarDockPosition.placement;
|
|
858
|
-
var toolbarContext = this._toolbarContext;
|
|
859
|
-
(0, _mobx.runInAction)(function () {
|
|
860
|
-
if (placement === 'right') {
|
|
861
|
-
var availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
|
|
862
|
-
toolbarContext.observables.maxCountVisibleTools = Math.floor(availableHeight / _utils.heightPerTool);
|
|
863
|
-
if (toolbarContext.observables.maxCountVisibleTools >= 9) {
|
|
864
|
-
var visibleTools = toolbarContext.observables.maxCountVisibleTools;
|
|
865
|
-
toolbarContext.observables.maxCountVisibleTools += Math.floor((availableHeight - visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
|
|
866
|
-
}
|
|
867
|
-
} else {
|
|
868
|
-
var _availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
|
|
869
|
-
toolbarContext.observables.maxCountVisibleTools = Math.floor(_availableHeight / _utils.heightPerTool);
|
|
870
|
-
if (toolbarContext.observables.maxCountVisibleTools >= 9) {
|
|
871
|
-
var _visibleTools = toolbarContext.observables.maxCountVisibleTools;
|
|
872
|
-
toolbarContext.observables.maxCountVisibleTools += Math.floor((_availableHeight - _visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
|
|
873
|
-
}
|
|
874
|
-
}
|
|
875
|
-
});
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
}, {
|
|
879
|
-
key: "_setBackgroundColor",
|
|
880
|
-
value: function _setBackgroundColor(bgColor) {
|
|
881
|
-
var _this$_whiteboardCont4;
|
|
882
|
-
var color = bgColor || 'white';
|
|
883
|
-
(_this$_whiteboardCont4 = this._whiteboardControl) === null || _this$_whiteboardCont4 === void 0 || _this$_whiteboardCont4.setBackgroundColor(color);
|
|
884
|
-
}
|
|
885
|
-
}, {
|
|
886
|
-
key: "_updateRedo",
|
|
887
|
-
value: function _updateRedo(steps) {
|
|
888
|
-
if (this._toolbarContext) {
|
|
889
|
-
this._toolbarContext.observables.redoSteps = steps;
|
|
890
|
-
}
|
|
891
|
-
}
|
|
892
|
-
}, {
|
|
893
|
-
key: "_updateUndo",
|
|
894
|
-
value: function _updateUndo(steps) {
|
|
895
|
-
if (this._toolbarContext) {
|
|
896
|
-
this._toolbarContext.observables.undoSteps = steps;
|
|
897
|
-
}
|
|
726
|
+
this._toolbarStore.repositionToolbar();
|
|
898
727
|
}
|
|
899
728
|
}, {
|
|
900
729
|
key: "_setConnectionState",
|
|
@@ -907,10 +736,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
907
736
|
}, {
|
|
908
737
|
key: "_open",
|
|
909
738
|
value: function _open() {
|
|
910
|
-
var _this$
|
|
739
|
+
var _this$_whiteboardCont8;
|
|
911
740
|
this._joined = true;
|
|
912
741
|
this._initialized = true;
|
|
913
|
-
(_this$
|
|
742
|
+
(_this$_whiteboardCont8 = this._whiteboardControl) === null || _this$_whiteboardCont8 === void 0 || _this$_whiteboardCont8.open();
|
|
914
743
|
}
|
|
915
744
|
}, {
|
|
916
745
|
key: "_close",
|
|
@@ -921,63 +750,13 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
921
750
|
this._whiteboardControl.close();
|
|
922
751
|
}
|
|
923
752
|
}
|
|
924
|
-
}, {
|
|
925
|
-
key: "_getSnapshotImage",
|
|
926
|
-
value: function () {
|
|
927
|
-
var _getSnapshotImage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
928
|
-
var _this6 = this;
|
|
929
|
-
var mainWindow, progress, imageData;
|
|
930
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
931
|
-
while (1) switch (_context.prev = _context.next) {
|
|
932
|
-
case 0:
|
|
933
|
-
this._boardStore.observables.progress = 0;
|
|
934
|
-
mainWindow = this._boardMainWindow;
|
|
935
|
-
if (!mainWindow) {
|
|
936
|
-
_context.next = 8;
|
|
937
|
-
break;
|
|
938
|
-
}
|
|
939
|
-
progress = setInterval(function () {
|
|
940
|
-
if (_this6._boardStore && _this6._boardStore.observables.progress < 100) {
|
|
941
|
-
_this6._boardStore.observables.progress += 1;
|
|
942
|
-
} else {
|
|
943
|
-
clearInterval(progress);
|
|
944
|
-
}
|
|
945
|
-
}, 4);
|
|
946
|
-
_context.next = 6;
|
|
947
|
-
return mainWindow.getSnapshotImage();
|
|
948
|
-
case 6:
|
|
949
|
-
imageData = _context.sent;
|
|
950
|
-
(0, _mobx.runInAction)(function () {
|
|
951
|
-
setTimeout(function () {
|
|
952
|
-
var _getRoomInfo, _this6$_uiEventStore;
|
|
953
|
-
_this6._boardStore.observables.progress = 100;
|
|
954
|
-
clearInterval(progress);
|
|
955
|
-
var fileName = "".concat((_getRoomInfo = _this6._roomControl.getRoomInfo()) === null || _getRoomInfo === void 0 ? void 0 : _getRoomInfo.roomName, "_").concat((0, _dayjs["default"])().format('YYYYMMDD_HHmmSSS'), ".jpg");
|
|
956
|
-
(0, _utils.downloadImageData)(imageData, fileName);
|
|
957
|
-
(_this6$_uiEventStore = _this6._uiEventStore) === null || _this6$_uiEventStore === void 0 || _this6$_uiEventStore.showToast({
|
|
958
|
-
type: 'info',
|
|
959
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_savedsuccessfully')
|
|
960
|
-
});
|
|
961
|
-
}, 400);
|
|
962
|
-
});
|
|
963
|
-
case 8:
|
|
964
|
-
case "end":
|
|
965
|
-
return _context.stop();
|
|
966
|
-
}
|
|
967
|
-
}, _callee, this);
|
|
968
|
-
}));
|
|
969
|
-
function _getSnapshotImage() {
|
|
970
|
-
return _getSnapshotImage2.apply(this, arguments);
|
|
971
|
-
}
|
|
972
|
-
return _getSnapshotImage;
|
|
973
|
-
}()
|
|
974
753
|
}, {
|
|
975
754
|
key: "_openLonelyWindow",
|
|
976
755
|
value: function _openLonelyWindow() {
|
|
977
756
|
var _this$_uiEventStore5, _this$_uiEventStore6;
|
|
978
757
|
(_this$_uiEventStore5 = this._uiEventStore) === null || _this$_uiEventStore5 === void 0 || _this$_uiEventStore5.openDialog(_constant.FcrUIDialogKey.WHITEBOARD);
|
|
979
758
|
(_this$_uiEventStore6 = this._uiEventStore) === null || _this$_uiEventStore6 === void 0 || _this$_uiEventStore6.openDialog(_constant.FcrUIDialogKey.TOOLBAR);
|
|
980
|
-
this._toolbarStore
|
|
759
|
+
// this._toolbarStore!.observables.layoutReady = false;
|
|
981
760
|
this._open();
|
|
982
761
|
}
|
|
983
762
|
}, {
|
|
@@ -987,85 +766,35 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
987
766
|
this._boardStore.observables.joinSuccessed = joinSuccessed;
|
|
988
767
|
}
|
|
989
768
|
}
|
|
990
|
-
}, {
|
|
991
|
-
key: "_boardObservble",
|
|
992
|
-
value: function _boardObservble() {
|
|
993
|
-
var _this7 = this;
|
|
994
|
-
return {
|
|
995
|
-
onConnectionStateUpdated: function () {
|
|
996
|
-
var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state) {
|
|
997
|
-
var _this7$_whiteboardCon, _this7$_whiteboardCon2, mainWindow, _this7$_userControl, _this7$_whiteboardCon3, ownerUserId, ownerUser;
|
|
998
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
999
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
1000
|
-
case 0:
|
|
1001
|
-
_this7.logger.info('Fcr board connection state changed to', state);
|
|
1002
|
-
_this7._setConnectionState(state);
|
|
1003
|
-
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
1004
|
-
if (_this7._joined) {
|
|
1005
|
-
(_this7$_whiteboardCon = _this7._whiteboardControl) === null || _this7$_whiteboardCon === void 0 || _this7$_whiteboardCon.open();
|
|
1006
|
-
} else {
|
|
1007
|
-
_this7.unmount();
|
|
1008
|
-
_this7.unload();
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
1012
|
-
_this7._setJoinSuccessed(true);
|
|
1013
|
-
mainWindow = (_this7$_whiteboardCon2 = _this7._whiteboardControl) === null || _this7$_whiteboardCon2 === void 0 ? void 0 : _this7$_whiteboardCon2.getMainWindow();
|
|
1014
|
-
_this7.logger.info('Fcr board join success');
|
|
1015
|
-
if (_this7._whiteboardControl) {
|
|
1016
|
-
_this7$_whiteboardCon3 = _this7._whiteboardControl.getBoardActiveInfo(), ownerUserId = _this7$_whiteboardCon3.ownerUserId;
|
|
1017
|
-
ownerUser = (_this7$_userControl = _this7._userControl) === null || _this7$_userControl === void 0 ? void 0 : _this7$_userControl.getUser(ownerUserId);
|
|
1018
|
-
_this7._controlbarStore.ownerUser = ownerUser;
|
|
1019
|
-
}
|
|
1020
|
-
mainWindow.addObserver({
|
|
1021
|
-
onRedoStateUpdated: _this7._updateRedo,
|
|
1022
|
-
onUndoStateUpdated: _this7._updateUndo
|
|
1023
|
-
});
|
|
1024
|
-
_this7._boardMainWindow = mainWindow;
|
|
1025
|
-
_this7.mount();
|
|
1026
|
-
}
|
|
1027
|
-
case 4:
|
|
1028
|
-
case "end":
|
|
1029
|
-
return _context2.stop();
|
|
1030
|
-
}
|
|
1031
|
-
}, _callee2);
|
|
1032
|
-
}));
|
|
1033
|
-
function onConnectionStateUpdated(_x) {
|
|
1034
|
-
return _onConnectionStateUpdated.apply(this, arguments);
|
|
1035
|
-
}
|
|
1036
|
-
return onConnectionStateUpdated;
|
|
1037
|
-
}()
|
|
1038
|
-
};
|
|
1039
|
-
}
|
|
1040
769
|
}, {
|
|
1041
770
|
key: "_addDisposers",
|
|
1042
771
|
value: function _addDisposers() {
|
|
1043
|
-
var
|
|
772
|
+
var _this5 = this;
|
|
1044
773
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
1045
|
-
return
|
|
774
|
+
return _this5.hasPrivilege;
|
|
1046
775
|
}, function (privilege) {
|
|
1047
|
-
var
|
|
1048
|
-
var p = privilege ||
|
|
1049
|
-
(
|
|
1050
|
-
(
|
|
776
|
+
var _this5$_boardStore, _this5$_boardStore2;
|
|
777
|
+
var p = privilege || _this5._isHost || _this5._isMyBoard;
|
|
778
|
+
(_this5$_boardStore = _this5._boardStore) === null || _this5$_boardStore === void 0 || _this5$_boardStore.setWriteEnable(_this5._isHost || _this5._isMyBoard);
|
|
779
|
+
(_this5$_boardStore2 = _this5._boardStore) === null || _this5$_boardStore2 === void 0 || _this5$_boardStore2.setPrivilege(p);
|
|
1051
780
|
}), (0, _mobx.reaction)(function () {
|
|
1052
|
-
return
|
|
781
|
+
return _this5._boardStore.observables.writeEnabled;
|
|
1053
782
|
}, function (writeEnabled) {
|
|
1054
|
-
if (writeEnabled) setTimeout(
|
|
783
|
+
if (writeEnabled) setTimeout(_this5._repositionToolbar, 0);
|
|
1055
784
|
}), (0, _mobx.reaction)(function () {
|
|
1056
|
-
return
|
|
785
|
+
return _this5._localUser;
|
|
1057
786
|
}, function (user) {
|
|
1058
|
-
var
|
|
1059
|
-
|
|
1060
|
-
var hasPrivilege =
|
|
1061
|
-
(
|
|
1062
|
-
|
|
787
|
+
var _this5$_boardStore3;
|
|
788
|
+
_this5._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
|
|
789
|
+
var hasPrivilege = _this5.hasPrivilege || _this5._isHost || _this5._isMyBoard;
|
|
790
|
+
(_this5$_boardStore3 = _this5._boardStore) === null || _this5$_boardStore3 === void 0 || _this5$_boardStore3.setPrivilege(hasPrivilege);
|
|
791
|
+
_this5._boardStore.setWriteEnable(_this5._isHost || _this5._isMyBoard);
|
|
1063
792
|
}));
|
|
1064
793
|
}
|
|
1065
794
|
}, {
|
|
1066
795
|
key: "_alertWhenReplace",
|
|
1067
796
|
value: function _alertWhenReplace(userInfo) {
|
|
1068
|
-
var
|
|
797
|
+
var _this6 = this;
|
|
1069
798
|
var userRole = userInfo.userRole,
|
|
1070
799
|
userName = userInfo.userName;
|
|
1071
800
|
var dialogId = this._uiEventStore.openConfirmDialog({
|
|
@@ -1075,45 +804,21 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
1075
804
|
showCancel: false,
|
|
1076
805
|
icon: _type3.FcrIconType.FCR_SCREENSHARING,
|
|
1077
806
|
onOk: function onOk() {
|
|
1078
|
-
var
|
|
1079
|
-
(
|
|
807
|
+
var _this6$_uiEventStore;
|
|
808
|
+
(_this6$_uiEventStore = _this6._uiEventStore) === null || _this6$_uiEventStore === void 0 || _this6$_uiEventStore.closeConfirm(dialogId);
|
|
1080
809
|
},
|
|
1081
810
|
onCancel: function onCancel() {
|
|
1082
|
-
var
|
|
1083
|
-
(
|
|
811
|
+
var _this6$_uiEventStore2;
|
|
812
|
+
(_this6$_uiEventStore2 = _this6._uiEventStore) === null || _this6$_uiEventStore2 === void 0 || _this6$_uiEventStore2.closeConfirm(dialogId);
|
|
1084
813
|
},
|
|
1085
814
|
width: 400,
|
|
1086
815
|
height: 160
|
|
1087
816
|
});
|
|
1088
817
|
}
|
|
1089
|
-
}, {
|
|
1090
|
-
key: "_convertShapeToBoardToolType",
|
|
1091
|
-
value: function _convertShapeToBoardToolType(shape) {
|
|
1092
|
-
switch (shape) {
|
|
1093
|
-
case _enums.FcrBoardShape.Arrow:
|
|
1094
|
-
return _enums.FcrBoardToolType.ARROW;
|
|
1095
|
-
case _enums.FcrBoardShape.Curve:
|
|
1096
|
-
return _enums.FcrBoardToolType.CURVE;
|
|
1097
|
-
case _enums.FcrBoardShape.Ellipse:
|
|
1098
|
-
return _enums.FcrBoardToolType.ELLIPSE;
|
|
1099
|
-
case _enums.FcrBoardShape.Pentagram:
|
|
1100
|
-
return _enums.FcrBoardToolType.PENTAGRAM;
|
|
1101
|
-
case _enums.FcrBoardShape.Rectangle:
|
|
1102
|
-
return _enums.FcrBoardToolType.RECTANGLE;
|
|
1103
|
-
case _enums.FcrBoardShape.Rhombus:
|
|
1104
|
-
return _enums.FcrBoardToolType.RHOMBUS;
|
|
1105
|
-
case _enums.FcrBoardShape.Straight:
|
|
1106
|
-
return _enums.FcrBoardToolType.STRAIGHT;
|
|
1107
|
-
case _enums.FcrBoardShape.Triangle:
|
|
1108
|
-
return _enums.FcrBoardToolType.TRIANGLE;
|
|
1109
|
-
default:
|
|
1110
|
-
return _enums.FcrBoardToolType.NONE;
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
818
|
}]);
|
|
1114
819
|
}(_base.UIModule);
|
|
1115
820
|
_FcrWhiteboardUIModule = FcrWhiteboardUIModule;
|
|
1116
|
-
var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [
|
|
821
|
+
var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_setBackgroundDecs, 18, "_setBackground"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
|
|
1117
822
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 6);
|
|
1118
823
|
_init__lonelyWindowState = _applyDecs$e2[0];
|
|
1119
824
|
_init__ownerUser = _applyDecs$e2[1];
|