fcr-ui-scene 3.1.0 → 3.2.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/dist/132.js +2 -0
- package/dist/132.js.LICENSE.txt +311 -0
- package/dist/651.js +2 -0
- package/dist/651.js.LICENSE.txt +1 -0
- package/dist/73.js +1 -0
- package/dist/index.html +13 -0
- package/dist/main.da7c203ab32d15742cfe.css +11760 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +254 -0
- package/dist/worker-entry.worker.js.LICENSE.txt +13 -0
- package/lib/base.js +16 -0
- package/lib/common/device-store.d.ts +3 -4
- package/lib/common/device-store.js +167 -83
- package/lib/common/device-stream-store.d.ts +3 -2
- package/lib/common/device-stream-store.js +94 -72
- package/lib/common/event-store.d.ts +3 -1
- package/lib/common/event-store.js +5 -0
- package/lib/common/security-store.d.ts +6 -16
- package/lib/common/security-store.js +136 -101
- package/lib/electron/app.d.ts +1 -0
- package/lib/electron/app.js +148 -0
- package/lib/electron/default-options.d.ts +2 -0
- package/lib/electron/default-options.js +25 -0
- package/lib/electron/env.d.ts +5 -0
- package/lib/electron/env.js +13 -0
- package/lib/electron/index.d.ts +2 -0
- package/lib/electron/index.js +20 -0
- package/lib/electron/injections.d.ts +44 -0
- package/lib/electron/injections.js +705 -0
- package/lib/electron/logger.d.ts +6 -0
- package/lib/electron/logger.js +66 -0
- package/lib/electron/main.d.ts +2 -0
- package/lib/electron/main.js +79 -0
- package/lib/electron/plugins/screenshot.d.ts +2 -0
- package/lib/electron/plugins/screenshot.js +49 -0
- package/lib/electron/preload.js +36 -0
- package/lib/electron/tools.d.ts +5 -0
- package/lib/electron/tools.js +66 -0
- package/lib/electron/window.d.ts +12 -0
- package/lib/electron/window.js +124 -0
- package/lib/fragments/control-bar/context.d.ts +0 -1
- package/lib/fragments/control-bar/control-bar-store.js +23 -2
- package/lib/fragments/control-bar/device/index.js +7 -0
- package/lib/fragments/control-bar/index.js +11 -1
- package/lib/fragments/control-bar/more-actions/index.js +5 -0
- package/lib/fragments/control-bar/security-content/index.js +3 -0
- package/lib/fragments/live-streaming/context.d.ts +0 -1
- package/lib/fragments/live-streaming/store.js +27 -17
- package/lib/fragments/share-screen-selection/context.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.js +34 -33
- package/lib/fragments/share-screen-selection/view.js +7 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.js +4 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/index.js +5 -1
- package/lib/fragments/toolbar/components/color-picker.js +3 -1
- package/lib/fragments/toolbar/components/eraser-picker.js +4 -13
- package/lib/fragments/toolbar/components/extension-toolbar-item.js +5 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/fragments/toolbar/components/pen-picker.js +2 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.js +2 -0
- package/lib/fragments/toolbar/components/shape-picker.js +2 -0
- package/lib/fragments/toolbar/hooks.d.ts +1 -1
- package/lib/fragments/toolbar/hooks.js +13 -8
- package/lib/fragments/toolbar/store.d.ts +4 -4
- package/lib/fragments/toolbar/store.js +20 -2
- package/lib/fragments/toolbar/view.js +2 -0
- package/lib/global.d.ts +1 -0
- package/lib/hooks/meeting-time.d.ts +2 -2
- package/lib/modules/action-bar/action-bar-collapes-items.js +9 -0
- package/lib/modules/action-bar/chat/index.js +1 -1
- package/lib/modules/action-bar/context.d.ts +0 -1
- package/lib/modules/action-bar/device/index.d.ts +2 -2
- package/lib/modules/action-bar/device/index.js +2 -0
- package/lib/modules/action-bar/index.css +4 -0
- package/lib/modules/action-bar/index.d.ts +2 -2
- package/lib/modules/action-bar/index.dev.js +7 -6
- package/lib/modules/action-bar/item-placement.d.ts +1 -2
- package/lib/modules/action-bar/item.js +5 -0
- package/lib/modules/action-bar/leave/assign-host.js +5 -3
- package/lib/modules/action-bar/leave/index.js +6 -1
- package/lib/modules/action-bar/more/poppover-content.js +10 -0
- package/lib/modules/action-bar/screen-share/submenu.js +1 -0
- package/lib/modules/action-bar/security/drop-menu.js +34 -1
- package/lib/modules/action-bar/security/index.js +1 -1
- package/lib/modules/action-bar/settings/index.js +1 -1
- package/lib/modules/action-bar/store.d.ts +9 -17
- package/lib/modules/action-bar/store.js +67 -49
- package/lib/modules/audio-stream/index.js +12 -6
- package/lib/modules/chat/chat-bar/index.js +7 -0
- package/lib/modules/chat/chat-select/index.css +5 -0
- package/lib/modules/chat/chat-select/index.js +29 -3
- package/lib/modules/chat/chat.d.ts +1 -1
- package/lib/modules/chat/chat.js +28 -4
- package/lib/modules/chat/contex.d.ts +0 -1
- package/lib/modules/chat/index.d.ts +3 -3
- package/lib/modules/chat/index.dev.js +3 -3
- package/lib/modules/chat/index.js +19 -3
- package/lib/modules/chat/message-list.js +24 -3
- package/lib/modules/chat/store.d.ts +3 -3
- package/lib/modules/chat/store.js +45 -79
- package/lib/modules/chat/util.js +1 -1
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -0
- package/lib/modules/connection-gateway/components/phone/index.js +2 -0
- package/lib/modules/connection-gateway/index.d.ts +2 -2
- package/lib/modules/connection-gateway/index.js +2 -0
- package/lib/modules/connection-gateway/store.d.ts +1 -2
- package/lib/modules/connection-gateway/store.js +41 -14
- package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +1 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -2
- package/lib/modules/device-pretest/context.d.ts +0 -1
- package/lib/modules/device-pretest/index.js +2 -1
- package/lib/modules/device-pretest/settings/beauty.js +2 -0
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -0
- package/lib/modules/device-pretest/store.js +28 -9
- package/lib/modules/dialog/components/chat/electron.js +1 -1
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +2 -2
- package/lib/modules/dialog/components/confirm/index.js +16 -2
- package/lib/modules/dialog/components/connection-gateway/electron.js +1 -1
- package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/device-setting/electron.js +72 -0
- package/lib/modules/dialog/components/device-setting/index.css +27 -0
- package/lib/modules/dialog/components/device-setting/index.d.ts +4 -0
- package/lib/modules/dialog/components/device-setting/index.js +60 -0
- package/lib/modules/dialog/components/participant/electron.js +6 -1
- package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/context.d.ts +0 -1
- package/lib/modules/dialog/dialogs.d.ts +0 -2
- package/lib/modules/dialog/dialogs.js +46 -91
- package/lib/modules/dialog/index.css +5 -6
- package/lib/modules/dialog/index.d.ts +1 -1
- package/lib/modules/dialog/index.js +17 -0
- package/lib/modules/dialog/store.d.ts +2 -2
- package/lib/modules/dialog/store.js +36 -7
- package/lib/modules/dialog/view.js +2 -0
- package/lib/modules/event-toast/context.d.ts +0 -1
- package/lib/modules/event-toast/store.js +16 -0
- package/lib/modules/invite/context.d.ts +0 -1
- package/lib/modules/invite/index.d.ts +2 -2
- package/lib/modules/invite/pstn-invite.js +3 -1
- package/lib/modules/invite/store.d.ts +2 -2
- package/lib/modules/invite/store.js +27 -7
- package/lib/modules/invite/voip-invite.js +1 -1
- package/lib/modules/layout/components/Aside.js +4 -1
- package/lib/modules/layout/components/Carousel.js +6 -5
- package/lib/modules/layout/components/Gallery.js +9 -8
- package/lib/modules/layout/components/index.css +11 -1
- package/lib/modules/layout/components/index.js +3 -0
- package/lib/modules/layout/context.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +11 -11
- package/lib/modules/layout/index.js +0 -6
- package/lib/modules/layout/member-window/index.css +5 -5
- package/lib/modules/layout/member-window/index.d.ts +7 -6
- package/lib/modules/layout/member-window/index.js +50 -10
- package/lib/modules/layout/store.d.ts +44 -49
- package/lib/modules/layout/store.js +406 -338
- package/lib/modules/layout/type.d.ts +2 -1
- package/lib/modules/layout/video-window-datasource.d.ts +14 -8
- package/lib/modules/layout/video-window-datasource.js +129 -78
- package/lib/modules/live-streaming/context.d.ts +0 -1
- package/lib/modules/live-streaming/index.d.ts +2 -2
- package/lib/modules/live-streaming/index.dev.js +4 -3
- package/lib/modules/live-streaming/store.d.ts +2 -2
- package/lib/modules/live-streaming/store.js +32 -11
- package/lib/modules/participant/attendee/index.js +10 -0
- package/lib/modules/participant/attendee/participants-more-action.js +5 -2
- package/lib/modules/participant/context.d.ts +0 -1
- package/lib/modules/participant/index.d.ts +3 -3
- package/lib/modules/participant/index.dev.js +13 -11
- package/lib/modules/participant/member-list-data-source.d.ts +3 -3
- package/lib/modules/participant/member-list-data-source.js +29 -3
- package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
- package/lib/modules/participant/store.d.ts +31 -31
- package/lib/modules/participant/store.js +203 -157
- package/lib/modules/participant/view.d.ts +6 -6
- package/lib/modules/participant/view.js +5 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +16 -12
- package/lib/modules/setting/audio-settings/index.css +2 -2
- package/lib/modules/setting/context.d.ts +0 -1
- package/lib/modules/setting/general-settings/general-settings.js +2 -1
- package/lib/modules/setting/general-settings/index.css +2 -2
- package/lib/modules/setting/index.d.ts +2 -2
- package/lib/modules/setting/index.dev.js +13 -11
- package/lib/modules/setting/index.js +16 -0
- package/lib/modules/setting/minutes-settings/index.css +65 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.d.ts +4 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.js +159 -0
- package/lib/modules/setting/state/index.css +0 -4
- package/lib/modules/setting/state/index.js +11 -1
- package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib/modules/setting/store.d.ts +6 -4
- package/lib/modules/setting/store.js +68 -40
- package/lib/modules/setting/translate-settings/index.css +45 -0
- package/lib/modules/setting/translate-settings/language-select.d.ts +12 -0
- package/lib/modules/{device-settings/video-settings/camera-select.js → setting/translate-settings/language-select.js} +16 -17
- package/lib/modules/setting/translate-settings/translate-settings.d.ts +4 -0
- package/lib/modules/setting/translate-settings/translate-settings.js +139 -0
- package/lib/modules/setting/video-settings/index.css +7 -1
- package/lib/modules/setting/video-settings/video-settings-basic.js +3 -2
- package/lib/modules/setting/video-settings/video-settings.js +5 -1
- package/lib/modules/setting/view.js +34 -2
- package/lib/modules/share-screen/index.d.ts +2 -2
- package/lib/modules/share-screen/index.dev.js +14 -12
- package/lib/modules/share-screen/index.js +2 -0
- package/lib/modules/share-screen/selection/index.js +44 -6
- package/lib/modules/share-screen/share-state-bar/index.css +49 -11
- package/lib/modules/share-screen/share-state-bar/index.d.ts +0 -1
- package/lib/modules/share-screen/share-state-bar/index.js +51 -20
- package/lib/modules/share-screen/store.d.ts +18 -11
- package/lib/modules/share-screen/store.js +656 -570
- package/lib/modules/state-bar/context.d.ts +0 -1
- package/lib/modules/state-bar/index.d.ts +1 -1
- package/lib/modules/state-bar/index.dev.js +11 -9
- package/lib/modules/state-bar/layout-config.js +2 -0
- package/lib/modules/state-bar/live-streaming-state.js +3 -0
- package/lib/modules/state-bar/recording.js +6 -6
- package/lib/modules/state-bar/store.d.ts +4 -4
- package/lib/modules/state-bar/store.js +50 -5
- package/lib/modules/state-bar/view.js +3 -2
- package/lib/modules/video-window/context.d.ts +0 -1
- package/lib/modules/video-window/deviceState/index.d.ts +3 -3
- package/lib/modules/video-window/members/index.js +7 -4
- package/lib/modules/video-window/store.d.ts +3 -2
- package/lib/modules/video-window/store.js +35 -6
- package/lib/modules/video-window/topControl/index.js +7 -0
- package/lib/modules/video-window/view.js +2 -0
- package/lib/modules/whiteboard/app.js +2 -2
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +29 -29
- package/lib/modules/whiteboard/components/loading/index.js +2 -2
- package/lib/modules/whiteboard/components/multi-window/index.js +2 -2
- package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +1 -1
- package/lib/modules/whiteboard/components/progress/style.css +4 -3
- package/lib/modules/whiteboard/components/switch-theme/index.js +9 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.js +21 -20
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +3 -1
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +11 -9
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +4 -2
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +3 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +16 -11
- package/lib/modules/whiteboard/components/toolbar/index.js +9 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -7
- package/lib/modules/whiteboard/components/toolbar/store.js +22 -4
- package/lib/modules/whiteboard/context.d.ts +3 -3
- package/lib/modules/whiteboard/context.js +2 -2
- package/lib/modules/whiteboard/index.d.ts +6 -7
- package/lib/modules/whiteboard/index.js +292 -253
- package/lib/modules/whiteboard/type.d.ts +4 -12
- package/lib/modules/whiteboard/type.js +6 -16
- package/lib/modules/whiteboard/utils.d.ts +1 -0
- package/lib/modules/whiteboard/utils.js +12 -1
- package/lib/plugins/browser-runtime-plugin.js +2 -4
- package/lib/plugins/module-dev-plugin.js +4 -4
- package/lib/plugins/multi-lang-plugin.d.ts +1 -5
- package/lib/plugins/multi-lang-plugin.js +2 -0
- package/lib/runtime.d.ts +84 -0
- package/lib/translations/enUS.d.ts +148 -1
- package/lib/translations/enUS.js +156 -7
- package/lib/translations/zhCN.d.ts +148 -1
- package/lib/translations/zhCN.js +152 -3
- package/lib/ui-manager.d.ts +2 -2
- package/lib/ui-manager.js +37 -20
- package/lib/ui-scene.js +6 -1
- package/lib/utilities/board-context.d.ts +0 -1
- package/lib/utilities/constant.d.ts +4 -1
- package/lib/utilities/constant.js +3 -0
- package/lib/utilities/copyText.js +1 -1
- package/lib/utilities/extract.js +26 -3
- package/lib/utilities/hooks.js +2 -0
- package/lib/utilities/renderer-event.js +28 -0
- package/lib/utilities/renderer.js +9 -4
- package/lib/utilities/tools.js +5 -2
- package/lib/utilities/ui-resources.d.ts +2 -2
- package/lib/utilities/ui-resources.js +20 -3
- package/lib/utilities/video-track-render-context.d.ts +0 -1
- package/package.json +10 -8
- package/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +0 -16
- package/lib/common/device-streams-store.d.ts +0 -34
- package/lib/common/device-streams-store.js +0 -403
- package/lib/fragments/participant/context.d.ts +0 -3
- package/lib/fragments/participant/context.js +0 -9
- package/lib/fragments/participant/index.css +0 -20
- package/lib/fragments/participant/index.d.ts +0 -9
- package/lib/fragments/participant/index.js +0 -90
- package/lib/fragments/participant/room-control-drop-menu/index.css +0 -19
- package/lib/fragments/participant/room-control-drop-menu/index.d.ts +0 -2
- package/lib/fragments/participant/room-control-drop-menu/index.js +0 -134
- package/lib/fragments/participant/store.d.ts +0 -34
- package/lib/fragments/participant/store.js +0 -326
- package/lib/fragments/participant/view.d.ts +0 -2
- package/lib/fragments/participant/view.js +0 -86
- package/lib/fragments/state-bar/index.d.ts +0 -9
- package/lib/fragments/state-bar/index.js +0 -68
- package/lib/fragments/type.d.ts +0 -2
- package/lib/fragments/type.js +0 -6
- package/lib/modules/connection-gateway/components/computer/menu.d.ts +0 -0
- package/lib/modules/connection-gateway/components/computer/menu.js +0 -1
- package/lib/modules/device-settings/audio-settings/audio-settings.d.ts +0 -4
- package/lib/modules/device-settings/audio-settings/audio-settings.js +0 -297
- package/lib/modules/device-settings/audio-settings/index.css +0 -139
- package/lib/modules/device-settings/audio-settings/microphone-detection.d.ts +0 -2
- package/lib/modules/device-settings/audio-settings/microphone-detection.js +0 -68
- package/lib/modules/device-settings/audio-settings/speaker-detection.d.ts +0 -2
- package/lib/modules/device-settings/audio-settings/speaker-detection.js +0 -72
- package/lib/modules/device-settings/common/advance-link.d.ts +0 -3
- package/lib/modules/device-settings/common/advance-link.js +0 -27
- package/lib/modules/device-settings/common/index.css +0 -26
- package/lib/modules/device-settings/common/useNamespace.d.ts +0 -15
- package/lib/modules/device-settings/common/useNamespace.js +0 -66
- package/lib/modules/device-settings/context.d.ts +0 -3
- package/lib/modules/device-settings/context.js +0 -9
- package/lib/modules/device-settings/dialog-wrapper.d.ts +0 -2
- package/lib/modules/device-settings/dialog-wrapper.js +0 -110
- package/lib/modules/device-settings/general-settings/general-settings.d.ts +0 -4
- package/lib/modules/device-settings/general-settings/general-settings.js +0 -66
- package/lib/modules/device-settings/general-settings/index.css +0 -26
- package/lib/modules/device-settings/index.css +0 -109
- package/lib/modules/device-settings/index.d.ts +0 -21
- package/lib/modules/device-settings/index.dev.js +0 -112
- package/lib/modules/device-settings/index.js +0 -84
- package/lib/modules/device-settings/state/index.css +0 -211
- package/lib/modules/device-settings/state/index.d.ts +0 -4
- package/lib/modules/device-settings/state/index.js +0 -330
- package/lib/modules/device-settings/storage-settings/index.css +0 -91
- package/lib/modules/device-settings/storage-settings/storage-settings.d.ts +0 -3
- package/lib/modules/device-settings/storage-settings/storage-settings.js +0 -84
- package/lib/modules/device-settings/store.d.ts +0 -205
- package/lib/modules/device-settings/store.js +0 -1035
- package/lib/modules/device-settings/video-settings/camera-select.d.ts +0 -2
- package/lib/modules/device-settings/video-settings/index.css +0 -327
- package/lib/modules/device-settings/video-settings/local-video-player.d.ts +0 -3
- package/lib/modules/device-settings/video-settings/local-video-player.js +0 -37
- package/lib/modules/device-settings/video-settings/mirror-toggle.d.ts +0 -2
- package/lib/modules/device-settings/video-settings/mirror-toggle.js +0 -62
- package/lib/modules/device-settings/video-settings/video-settings-basic.d.ts +0 -9
- package/lib/modules/device-settings/video-settings/video-settings-basic.js +0 -177
- package/lib/modules/device-settings/video-settings/video-settings.d.ts +0 -6
- package/lib/modules/device-settings/video-settings/video-settings.js +0 -185
- package/lib/modules/device-settings/view.d.ts +0 -10
- package/lib/modules/device-settings/view.js +0 -193
- package/lib/modules/layout/components/UserWindow.d.ts +0 -8
- package/lib/modules/layout/components/UserWindow.js +0 -513
- package/lib/modules/layout/hooks.d.ts +0 -14
- package/lib/modules/layout/hooks.js +0 -48
- package/lib/modules/share-screen/context.d.ts +0 -3
- package/lib/modules/share-screen/context.js +0 -9
- package/lib/modules/whiteboard/i18n/config.d.ts +0 -1
- package/lib/modules/whiteboard/i18n/config.js +0 -15
- package/lib/modules/whiteboard/i18n/en/index.d.ts +0 -32
- package/lib/modules/whiteboard/i18n/en/index.js +0 -38
- package/lib/modules/whiteboard/i18n/zh/index.d.ts +0 -32
- package/lib/modules/whiteboard/i18n/zh/index.js +0 -38
- /package/lib/{modules/device-settings/index.dev.d.ts → electron/preload.d.ts} +0 -0
|
@@ -18,6 +18,24 @@ require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
|
18
18
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
19
19
|
require("core-js/modules/es.object.keys.js");
|
|
20
20
|
require("core-js/modules/es.reflect.construct.js");
|
|
21
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
22
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
23
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
24
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
25
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
26
|
+
require("core-js/modules/esnext.map.every.js");
|
|
27
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
28
|
+
require("core-js/modules/esnext.map.find.js");
|
|
29
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
30
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
31
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
32
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
33
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
34
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
35
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
36
|
+
require("core-js/modules/esnext.map.some.js");
|
|
37
|
+
require("core-js/modules/esnext.map.update.js");
|
|
38
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
21
39
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
22
40
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
23
41
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -40,6 +58,38 @@ require("core-js/modules/es.set.js");
|
|
|
40
58
|
require("core-js/modules/es.string.includes.js");
|
|
41
59
|
require("core-js/modules/es.string.iterator.js");
|
|
42
60
|
require("core-js/modules/es.weak-map.js");
|
|
61
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
62
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
63
|
+
require("core-js/modules/esnext.async-iterator.some.js");
|
|
64
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
65
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
66
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
67
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
68
|
+
require("core-js/modules/esnext.set.add-all.js");
|
|
69
|
+
require("core-js/modules/esnext.set.delete-all.js");
|
|
70
|
+
require("core-js/modules/esnext.set.difference.v2.js");
|
|
71
|
+
require("core-js/modules/esnext.set.difference.js");
|
|
72
|
+
require("core-js/modules/esnext.set.every.js");
|
|
73
|
+
require("core-js/modules/esnext.set.filter.js");
|
|
74
|
+
require("core-js/modules/esnext.set.find.js");
|
|
75
|
+
require("core-js/modules/esnext.set.intersection.v2.js");
|
|
76
|
+
require("core-js/modules/esnext.set.intersection.js");
|
|
77
|
+
require("core-js/modules/esnext.set.is-disjoint-from.v2.js");
|
|
78
|
+
require("core-js/modules/esnext.set.is-disjoint-from.js");
|
|
79
|
+
require("core-js/modules/esnext.set.is-subset-of.v2.js");
|
|
80
|
+
require("core-js/modules/esnext.set.is-subset-of.js");
|
|
81
|
+
require("core-js/modules/esnext.set.is-superset-of.v2.js");
|
|
82
|
+
require("core-js/modules/esnext.set.is-superset-of.js");
|
|
83
|
+
require("core-js/modules/esnext.set.join.js");
|
|
84
|
+
require("core-js/modules/esnext.set.map.js");
|
|
85
|
+
require("core-js/modules/esnext.set.reduce.js");
|
|
86
|
+
require("core-js/modules/esnext.set.some.js");
|
|
87
|
+
require("core-js/modules/esnext.set.symmetric-difference.v2.js");
|
|
88
|
+
require("core-js/modules/esnext.set.symmetric-difference.js");
|
|
89
|
+
require("core-js/modules/esnext.set.union.v2.js");
|
|
90
|
+
require("core-js/modules/esnext.set.union.js");
|
|
91
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
92
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
43
93
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
44
94
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
45
95
|
require("core-js/modules/web.timers.js");
|
|
@@ -67,19 +117,21 @@ var _base = require("../../base");
|
|
|
67
117
|
var _store2 = require("./components/control-bar/store");
|
|
68
118
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
69
119
|
var _type2 = require("agora-edu-core/lib/type");
|
|
120
|
+
var _agoraEduCore = require("agora-edu-core");
|
|
70
121
|
var _enums = require("agora-edu-core/lib/room-control/whiteboard-control/enums");
|
|
71
122
|
var _libs = _interopRequireDefault(require("./components/switch-theme/libs"));
|
|
123
|
+
var _types = require("agora-edu-core/lib/room-control/whiteboard-control/types");
|
|
72
124
|
var _type3 = require("../layout/type");
|
|
73
125
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
74
126
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
75
127
|
var _FcrWhiteboardUIModule;
|
|
76
|
-
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _boardUIEventsDecs, _createToolbarUIContextDecs, _repositionToolbarDecs, _updateRedoDecs, _updateUndoDecs, _setConnectionStateDecs, _getSnapshotImageDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs,
|
|
128
|
+
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _boardUIEventsDecs, _createToolbarUIContextDecs, _repositionToolbarDecs, _updateRedoDecs, _updateUndoDecs, _setConnectionStateDecs, _getSnapshotImageDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _ref;
|
|
77
129
|
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; }
|
|
78
130
|
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; }
|
|
79
131
|
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)); }
|
|
80
132
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
81
|
-
function _classPrivateFieldInitSpec(
|
|
82
|
-
function _checkPrivateRedeclaration(
|
|
133
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
134
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
83
135
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
84
136
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
85
137
|
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
@@ -93,7 +145,7 @@ var _B = /*#__PURE__*/new WeakMap();
|
|
|
93
145
|
var _C = /*#__PURE__*/new WeakMap();
|
|
94
146
|
var _D = /*#__PURE__*/new WeakMap();
|
|
95
147
|
var _E = /*#__PURE__*/new WeakMap();
|
|
96
|
-
_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], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _createToolbarUIContextDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _updateRedoDecs = [_mobx.action, _mobx.action.bound], _updateUndoDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _getSnapshotImageDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound],
|
|
148
|
+
_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], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _createToolbarUIContextDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _updateRedoDecs = [_mobx.action, _mobx.action.bound], _updateUndoDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _getSnapshotImageDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], "_disposers");
|
|
97
149
|
var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/function (_UIModule) {
|
|
98
150
|
function FcrWhiteboardUIModule(_ref2) {
|
|
99
151
|
var _this;
|
|
@@ -107,10 +159,9 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
107
159
|
_this = _callSuper(this, FcrWhiteboardUIModule);
|
|
108
160
|
//@ts-ignore
|
|
109
161
|
(0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), []));
|
|
110
|
-
(0, _defineProperty2["default"])(_this, "
|
|
111
|
-
(0, _defineProperty2["default"])(_this, "_connectionState", _enums.FcrBoardRoomConnectionState.DISCONNECTED);
|
|
162
|
+
(0, _defineProperty2["default"])(_this, "_connectionState", _agoraEduCore.FcrConnectionState.DISCONNECTED);
|
|
112
163
|
(0, _defineProperty2["default"])(_this, "_defaultBoardState", {
|
|
113
|
-
tool:
|
|
164
|
+
tool: _enums.FcrBoardToolType.LASER_POINTER,
|
|
114
165
|
strokeColor: '#fed130',
|
|
115
166
|
strokeWidth: 2
|
|
116
167
|
});
|
|
@@ -128,9 +179,9 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
128
179
|
(0, _defineProperty2["default"])(_this, "_joined", false);
|
|
129
180
|
(0, _defineProperty2["default"])(_this, "_grantedUsers", new Set());
|
|
130
181
|
_classPrivateFieldInitSpec(_this, _A, _init__lonelyWindowState(_this, _type.LonelyWindowState.DEFAULT));
|
|
131
|
-
_classPrivateFieldInitSpec(_this, _B, _init__ownerUser(_this,
|
|
182
|
+
_classPrivateFieldInitSpec(_this, _B, _init__ownerUser(_this, undefined));
|
|
132
183
|
_classPrivateFieldInitSpec(_this, _C, _init__isHost(_this, false));
|
|
133
|
-
_classPrivateFieldInitSpec(_this, _D, _init__boardBackground(_this, '#
|
|
184
|
+
_classPrivateFieldInitSpec(_this, _D, _init__boardBackground(_this, '#ffffff'));
|
|
134
185
|
_classPrivateFieldInitSpec(_this, _E, _init__localUser(_this));
|
|
135
186
|
_this._uiEventStore = uiEventStore;
|
|
136
187
|
_this._userControl = userControl;
|
|
@@ -146,22 +197,23 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
146
197
|
securityStore: securityStore
|
|
147
198
|
});
|
|
148
199
|
whiteboardControl.addObserver({
|
|
149
|
-
|
|
200
|
+
onActive: function onActive(ownerId, operatorUser) {
|
|
201
|
+
_this.onPropertiesUpdate({
|
|
202
|
+
operatorUser: operatorUser
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
onInactive: function onInactive(reason, operatorUser) {
|
|
150
206
|
var _this$_ownerUser;
|
|
151
|
-
_this.logger.info('onBoardActiveInfoUpdated', isActive, operatorUser);
|
|
152
207
|
var currentUserId = _this._localUser.userId;
|
|
153
|
-
|
|
154
|
-
if (reason === _enums.FcrBoardActiveInfoReason.REPLACE && userId !== currentUserId && ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId) {
|
|
208
|
+
if (reason === _types.FcrBoardInactiveReason.SEIZE && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== currentUserId && ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId) {
|
|
155
209
|
_this._alertWhenReplace(operatorUser);
|
|
156
210
|
return;
|
|
157
211
|
}
|
|
158
|
-
|
|
159
|
-
operatorUser: operatorUser
|
|
160
|
-
}) : _this.onDestroy({
|
|
212
|
+
_this.onDestroy({
|
|
161
213
|
operatorUser: operatorUser
|
|
162
214
|
});
|
|
163
215
|
},
|
|
164
|
-
|
|
216
|
+
onBackgroundColorUpdated: function onBackgroundColorUpdated(color) {
|
|
165
217
|
_this._setBackground(color);
|
|
166
218
|
}
|
|
167
219
|
});
|
|
@@ -169,7 +221,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
169
221
|
onStreamsRemoved: function onStreamsRemoved(roomId, events) {
|
|
170
222
|
var isReplaced = events.find(function (event) {
|
|
171
223
|
var _event$cause;
|
|
172
|
-
return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) ===
|
|
224
|
+
return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _types.FcrBoardInactiveReason.SEIZE;
|
|
173
225
|
});
|
|
174
226
|
var isMyStream = events.some(function (event) {
|
|
175
227
|
return event.modifiedStream.owner.userId === _this._localUser.userId;
|
|
@@ -213,7 +265,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
213
265
|
if (_this._isActive) {
|
|
214
266
|
_this._checkBoard();
|
|
215
267
|
_this._ownerUser = _this._userControl.getUser(activeInfo.ownerUserId);
|
|
216
|
-
_this._boardBackground = whiteboardControl.
|
|
268
|
+
_this._boardBackground = whiteboardControl.getBackgroundColor();
|
|
217
269
|
}
|
|
218
270
|
return _this;
|
|
219
271
|
}
|
|
@@ -364,15 +416,15 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
364
416
|
value: function onProcessEvent(event) {
|
|
365
417
|
var action = event.action,
|
|
366
418
|
payload = event.payload;
|
|
367
|
-
if (Object.values(
|
|
368
|
-
|
|
369
|
-
}
|
|
370
|
-
if (Object.values(
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
if (Object.values(
|
|
374
|
-
|
|
375
|
-
}
|
|
419
|
+
// if (Object.values(ToolbarEvents).includes(action)) {
|
|
420
|
+
// this._caseToolbarEvents(action as ToolbarEvents, payload);
|
|
421
|
+
// }
|
|
422
|
+
// if (Object.values(WhiteboardEvents).includes(action)) {
|
|
423
|
+
// this._boardObservble()[action as WhiteboardEvents](payload);
|
|
424
|
+
// }
|
|
425
|
+
// if (Object.values(WhiteboardUIEvents).includes(action)) {
|
|
426
|
+
// this._boardUIEvents(payload)[action as WhiteboardUIEvents](payload);
|
|
427
|
+
// }
|
|
376
428
|
if (action === _constant.RendererEventAction.GET_LOCAL_USER) {
|
|
377
429
|
(0, _rendererEvent.sendEvent)({
|
|
378
430
|
action: _constant.RendererEventAction.SET_LOCAL_USER,
|
|
@@ -420,30 +472,60 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
420
472
|
}, {
|
|
421
473
|
key: "mount",
|
|
422
474
|
value: function mount() {
|
|
423
|
-
var _this2 = this;
|
|
424
475
|
var _boardMainWindow = this._boardMainWindow,
|
|
425
476
|
_boardDom = this._boardDom;
|
|
426
477
|
if (_boardDom && _boardMainWindow && !this._mounted) {
|
|
427
|
-
var _this$_collectorDom;
|
|
428
478
|
this._mounted = true;
|
|
429
479
|
var aspectRatio = this._initHeight / this._initWidth;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
480
|
+
var view = _boardMainWindow.getContentView();
|
|
481
|
+
_boardDom.appendChild(view);
|
|
482
|
+
_boardMainWindow.setContainerSizeRatio(aspectRatio);
|
|
483
|
+
this._addDisposers();
|
|
484
|
+
this._resetToolIfNeed();
|
|
485
|
+
this._repositionToolbar();
|
|
486
|
+
if (this._boardMainWindow) {
|
|
487
|
+
var _this$_ownerUser3, _this$_localUser, _this$_boardStore2, _this$_boardStore3;
|
|
488
|
+
this._setBackground(this._whiteboardControl.getBackgroundColor() || this._boardBackground);
|
|
489
|
+
this._toolbarStore.observables.layoutReady = [_type.LonelyWindowState.CLOSE, _type.LonelyWindowState.DEFAULT].includes(this._lonelyWindowState);
|
|
490
|
+
var activeInfo = this._whiteboardControl.getBoardActiveInfo();
|
|
491
|
+
this._ownerUser = this._userControl.getUser(activeInfo.ownerUserId);
|
|
492
|
+
this._isMyBoard = ((_this$_ownerUser3 = this._ownerUser) === null || _this$_ownerUser3 === void 0 ? void 0 : _this$_ownerUser3.userId) === ((_this$_localUser = this._localUser) === null || _this$_localUser === void 0 ? void 0 : _this$_localUser.userId);
|
|
493
|
+
(_this$_boardStore2 = this._boardStore) === null || _this$_boardStore2 === void 0 || _this$_boardStore2.setPrivilege(this._isMyBoard || this._isHost);
|
|
494
|
+
(_this$_boardStore3 = this._boardStore) === null || _this$_boardStore3 === void 0 || _this$_boardStore3.setWriteEnable(this._isMyBoard || this._isHost);
|
|
495
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WHITEBOARD_CHANGED, {
|
|
496
|
+
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
497
|
+
payload: activeInfo.ownerUserId
|
|
498
|
+
});
|
|
499
|
+
(0, _rendererEvent.sendEvent)({
|
|
500
|
+
action: _constant.RendererEventAction.SET_OWNER_USER,
|
|
501
|
+
payload: this._userControl.getUser(activeInfo.ownerUserId)
|
|
502
|
+
});
|
|
503
|
+
}
|
|
439
504
|
}
|
|
440
505
|
}
|
|
441
506
|
}, {
|
|
442
507
|
key: "unmount",
|
|
443
508
|
value: function unmount() {
|
|
444
509
|
if (this._mounted && this._boardMainWindow) {
|
|
445
|
-
|
|
510
|
+
var _this$_boardDom;
|
|
511
|
+
(_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.removeChild(this._boardMainWindow.getContentView());
|
|
446
512
|
this._boardMainWindow = undefined;
|
|
513
|
+
if (this._lonelyWindowState === _type.LonelyWindowState.OPEN) {
|
|
514
|
+
this._openLonelyWindow();
|
|
515
|
+
}
|
|
516
|
+
if (this._lonelyWindowState === _type.LonelyWindowState.CLOSE) {
|
|
517
|
+
this._open();
|
|
518
|
+
}
|
|
519
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WHITEBOARD_CHANGED, {
|
|
520
|
+
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
521
|
+
payload: null
|
|
522
|
+
});
|
|
523
|
+
(0, _rendererEvent.sendEvent)({
|
|
524
|
+
action: _constant.RendererEventAction.SET_OWNER_USER,
|
|
525
|
+
payload: null
|
|
526
|
+
});
|
|
527
|
+
this._ownerUser = undefined;
|
|
528
|
+
this._initialized = false;
|
|
447
529
|
}
|
|
448
530
|
this._mounted = false;
|
|
449
531
|
if (this._timer) clearTimeout(this._timer);
|
|
@@ -459,10 +541,10 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
459
541
|
}, {
|
|
460
542
|
key: "_setBackground",
|
|
461
543
|
value: function _setBackground() {
|
|
462
|
-
var bgColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#
|
|
544
|
+
var bgColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#ffffff';
|
|
463
545
|
if (this._boardMainWindow) {
|
|
464
546
|
var _this$_boardMainWindo;
|
|
465
|
-
var themes = _libs["default"];
|
|
547
|
+
var themes = (0, _libs["default"])(this._t);
|
|
466
548
|
var _ref4 = themes.find(function (theme) {
|
|
467
549
|
return theme.background === bgColor;
|
|
468
550
|
}) || {
|
|
@@ -470,23 +552,24 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
470
552
|
},
|
|
471
553
|
colors = _ref4.colors;
|
|
472
554
|
(_this$_boardMainWindo = this._boardMainWindow) === null || _this$_boardMainWindo === void 0 || _this$_boardMainWindo.setBackgroundColor(bgColor);
|
|
473
|
-
|
|
555
|
+
if (colors && colors.length > 0) {
|
|
556
|
+
this._toolbarStore.observables.colors = colors;
|
|
557
|
+
}
|
|
474
558
|
}
|
|
475
559
|
}
|
|
476
560
|
}, {
|
|
477
561
|
key: "_resetToolIfNeed",
|
|
478
562
|
value: function _resetToolIfNeed() {
|
|
479
|
-
var _this$
|
|
480
|
-
if (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
}
|
|
563
|
+
var _this$_toolbarContext, _this$_toolbarContext2, _this$_toolbarContext3;
|
|
564
|
+
// if (this._boardMainWindow?.mounted) {
|
|
565
|
+
var _this$_defaultBoardSt = this._defaultBoardState,
|
|
566
|
+
strokeColor = _this$_defaultBoardSt.strokeColor,
|
|
567
|
+
strokeWidth = _this$_defaultBoardSt.strokeWidth,
|
|
568
|
+
tool = _this$_defaultBoardSt.tool;
|
|
569
|
+
(_this$_toolbarContext = this._toolbarContext) === null || _this$_toolbarContext === void 0 || _this$_toolbarContext.setStrokeColor(strokeColor);
|
|
570
|
+
(_this$_toolbarContext2 = this._toolbarContext) === null || _this$_toolbarContext2 === void 0 || _this$_toolbarContext2.setStrokeWidth(strokeWidth);
|
|
571
|
+
(_this$_toolbarContext3 = this._toolbarContext) === null || _this$_toolbarContext3 === void 0 || _this$_toolbarContext3.setTool(tool);
|
|
572
|
+
// }
|
|
490
573
|
}
|
|
491
574
|
}, {
|
|
492
575
|
key: "_checkBoard",
|
|
@@ -499,24 +582,24 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
499
582
|
}, {
|
|
500
583
|
key: "_boardUIEvents",
|
|
501
584
|
value: function _boardUIEvents(observables) {
|
|
502
|
-
var
|
|
585
|
+
var _this2 = this;
|
|
503
586
|
return {
|
|
504
587
|
handleBoardDomLoad: function handleBoardDomLoad(ref) {
|
|
505
|
-
|
|
506
|
-
if (
|
|
507
|
-
|
|
588
|
+
_this2._boardDom = ref;
|
|
589
|
+
if (_this2._boardDom) {
|
|
590
|
+
_this2.mount();
|
|
508
591
|
}
|
|
509
592
|
},
|
|
510
593
|
handleCollectorDomLoad: function handleCollectorDomLoad(ref) {
|
|
511
|
-
|
|
594
|
+
_this2._collectorDom = ref;
|
|
512
595
|
},
|
|
513
596
|
handleClose: function handleClose() {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
597
|
+
_this2._close();
|
|
598
|
+
_this2._isActive = false;
|
|
599
|
+
_this2.unmount();
|
|
517
600
|
},
|
|
518
601
|
handleOpen: function handleOpen() {
|
|
519
|
-
|
|
602
|
+
_this2._open();
|
|
520
603
|
},
|
|
521
604
|
setPrivilege: function setPrivilege(canOperate) {
|
|
522
605
|
observables.canOperate = canOperate;
|
|
@@ -524,7 +607,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
524
607
|
setWriteEnable: function setWriteEnable(enable) {
|
|
525
608
|
observables.writeEnabled = enable;
|
|
526
609
|
observables.canOperate = enable;
|
|
527
|
-
|
|
610
|
+
_this2._repositionToolbar();
|
|
528
611
|
}
|
|
529
612
|
};
|
|
530
613
|
}
|
|
@@ -550,7 +633,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
550
633
|
thatStyle.transition = 'transform ease .5s';
|
|
551
634
|
var scaleValue = this._controlbarStore.scaleValue;
|
|
552
635
|
if (_utils.ZOOM_IN_CANVAS) {
|
|
553
|
-
this._boardMainWindow.setViewMode(
|
|
636
|
+
// this._boardMainWindow.setViewMode(ViewMode.Freedom);
|
|
554
637
|
}
|
|
555
638
|
this._resetScaleState();
|
|
556
639
|
if (oprate === _type.WhiteboardControlbarEvents.ZOOMIN) {
|
|
@@ -583,20 +666,20 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
583
666
|
if (!_utils.ZOOM_IN_CANVAS) {
|
|
584
667
|
thatStyle.transform = "scale(".concat(value, ")");
|
|
585
668
|
} else {
|
|
586
|
-
this._boardMainWindow.zoom(value);
|
|
669
|
+
// this._boardMainWindow.zoom(value);
|
|
587
670
|
}
|
|
588
671
|
}
|
|
589
672
|
}
|
|
590
673
|
}, {
|
|
591
674
|
key: "_resetCanvasPosition",
|
|
592
675
|
value: function _resetCanvasPosition() {
|
|
593
|
-
var
|
|
676
|
+
var _this3 = this;
|
|
594
677
|
if (this._timer) clearTimeout(this._timer);
|
|
595
678
|
this._timer = setTimeout(function () {
|
|
596
|
-
if (!
|
|
597
|
-
|
|
598
|
-
var thatStyle =
|
|
599
|
-
|
|
679
|
+
if (!_this3._boardDom) return;
|
|
680
|
+
_this3._repositionToolbar();
|
|
681
|
+
var thatStyle = _this3._boardDom.style;
|
|
682
|
+
_this3._controlbarStore.scaleValue = 1;
|
|
600
683
|
thatStyle.transform = "scale(1)";
|
|
601
684
|
}, 300);
|
|
602
685
|
}
|
|
@@ -627,24 +710,24 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
627
710
|
}, {
|
|
628
711
|
key: "_createToolbarUIContext",
|
|
629
712
|
value: function _createToolbarUIContext() {
|
|
630
|
-
var
|
|
713
|
+
var _this4 = this;
|
|
631
714
|
var observables = this._toolbarStore.observables;
|
|
632
715
|
this._toolbarContext = {
|
|
633
716
|
observables: observables,
|
|
634
717
|
redo: function redo() {
|
|
635
|
-
var
|
|
636
|
-
return (
|
|
718
|
+
var _this4$_boardMainWind;
|
|
719
|
+
return (_this4$_boardMainWind = _this4._boardMainWindow) === null || _this4$_boardMainWind === void 0 ? void 0 : _this4$_boardMainWind.redo();
|
|
637
720
|
},
|
|
638
721
|
undo: function undo() {
|
|
639
|
-
var
|
|
640
|
-
return (
|
|
722
|
+
var _this4$_boardMainWind2;
|
|
723
|
+
return (_this4$_boardMainWind2 = _this4._boardMainWindow) === null || _this4$_boardMainWind2 === void 0 ? void 0 : _this4$_boardMainWind2.undo();
|
|
641
724
|
},
|
|
642
725
|
clean: function clean() {
|
|
643
|
-
var
|
|
644
|
-
return (
|
|
726
|
+
var _this4$_boardMainWind3;
|
|
727
|
+
return (_this4$_boardMainWind3 = _this4._boardMainWindow) === null || _this4$_boardMainWind3 === void 0 ? void 0 : _this4$_boardMainWind3.clean();
|
|
645
728
|
},
|
|
646
729
|
saveDraft: function saveDraft() {
|
|
647
|
-
return
|
|
730
|
+
return _this4._getSnapshotImage();
|
|
648
731
|
},
|
|
649
732
|
clickExpansionTool: function clickExpansionTool() {},
|
|
650
733
|
setToolbarPosition: function setToolbarPosition(pos) {
|
|
@@ -654,39 +737,43 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
654
737
|
return observables.toolbarReleased = false;
|
|
655
738
|
},
|
|
656
739
|
setTool: function setTool(tool) {
|
|
657
|
-
var
|
|
740
|
+
var _this4$_boardMainWind4;
|
|
658
741
|
observables.currentTool = tool;
|
|
659
742
|
observables.currentShape = undefined;
|
|
660
|
-
(
|
|
743
|
+
(_this4$_boardMainWind4 = _this4._boardMainWindow) === null || _this4$_boardMainWind4 === void 0 || _this4$_boardMainWind4.setToolType(tool);
|
|
661
744
|
},
|
|
662
745
|
setPen: function setPen(shape) {
|
|
663
|
-
var
|
|
746
|
+
var _this4$_boardMainWind5, _this4$_boardMainWind6, _this4$_boardMainWind7;
|
|
664
747
|
observables.currentShape = shape;
|
|
665
748
|
observables.lastPen = shape;
|
|
666
749
|
observables.currentTool = undefined;
|
|
667
|
-
(
|
|
750
|
+
(_this4$_boardMainWind5 = _this4._boardMainWindow) === null || _this4$_boardMainWind5 === void 0 || _this4$_boardMainWind5.setToolType(_this4._convertShapeToBoardToolType(shape));
|
|
751
|
+
(_this4$_boardMainWind6 = _this4._boardMainWindow) === null || _this4$_boardMainWind6 === void 0 || _this4$_boardMainWind6.setStrokeWidth(observables.currentStrokeWidth);
|
|
752
|
+
(_this4$_boardMainWind7 = _this4._boardMainWindow) === null || _this4$_boardMainWind7 === void 0 || _this4$_boardMainWind7.setStrokeColor((0, _tinycolor["default"])(observables.currentColor).toRgb());
|
|
668
753
|
},
|
|
669
754
|
setShape: function setShape(shape) {
|
|
670
|
-
var
|
|
755
|
+
var _this4$_boardMainWind8, _this4$_boardMainWind9, _this4$_boardMainWind10;
|
|
671
756
|
observables.currentShape = shape;
|
|
672
757
|
observables.lastShape = shape;
|
|
673
758
|
observables.currentTool = undefined;
|
|
674
|
-
(
|
|
759
|
+
(_this4$_boardMainWind8 = _this4._boardMainWindow) === null || _this4$_boardMainWind8 === void 0 || _this4$_boardMainWind8.setToolType(_this4._convertShapeToBoardToolType(shape));
|
|
760
|
+
(_this4$_boardMainWind9 = _this4._boardMainWindow) === null || _this4$_boardMainWind9 === void 0 || _this4$_boardMainWind9.setStrokeWidth(observables.currentStrokeWidth);
|
|
761
|
+
(_this4$_boardMainWind10 = _this4._boardMainWindow) === null || _this4$_boardMainWind10 === void 0 || _this4$_boardMainWind10.setStrokeColor((0, _tinycolor["default"])(observables.currentColor).toRgb());
|
|
675
762
|
},
|
|
676
763
|
setStrokeColor: function setStrokeColor(color) {
|
|
677
|
-
var
|
|
764
|
+
var _this4$_boardMainWind11;
|
|
678
765
|
observables.currentColor = color;
|
|
679
|
-
(
|
|
766
|
+
(_this4$_boardMainWind11 = _this4._boardMainWindow) === null || _this4$_boardMainWind11 === void 0 || _this4$_boardMainWind11.setStrokeColor((0, _tinycolor["default"])(color).toRgb());
|
|
680
767
|
},
|
|
681
768
|
setStrokeWidth: function setStrokeWidth(strokeWidth) {
|
|
682
|
-
var
|
|
769
|
+
var _this4$_boardMainWind12;
|
|
683
770
|
observables.currentStrokeWidth = strokeWidth;
|
|
684
|
-
(
|
|
771
|
+
(_this4$_boardMainWind12 = _this4._boardMainWindow) === null || _this4$_boardMainWind12 === void 0 || _this4$_boardMainWind12.setStrokeWidth(strokeWidth);
|
|
685
772
|
},
|
|
686
773
|
releaseToolbar: function releaseToolbar() {
|
|
687
774
|
observables.toolbarReleased = true;
|
|
688
|
-
|
|
689
|
-
|
|
775
|
+
_this4._updateDockPlacement();
|
|
776
|
+
_this4._repositionToolbar();
|
|
690
777
|
},
|
|
691
778
|
captureScreen: function captureScreen() {
|
|
692
779
|
var hideWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -695,7 +782,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
695
782
|
});
|
|
696
783
|
},
|
|
697
784
|
setTheme: (0, _mobx.action)(function (theme) {
|
|
698
|
-
|
|
785
|
+
_this4._setBackgroundColor(theme.background);
|
|
699
786
|
observables.colors = theme.colors;
|
|
700
787
|
}),
|
|
701
788
|
setCommonColor: (0, _mobx.action)(function (color) {
|
|
@@ -807,7 +894,7 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
807
894
|
value: function _setBackgroundColor(bgColor) {
|
|
808
895
|
var _this$_whiteboardCont3;
|
|
809
896
|
var color = bgColor || 'white';
|
|
810
|
-
(_this$_whiteboardCont3 = this._whiteboardControl) === null || _this$_whiteboardCont3 === void 0 || _this$_whiteboardCont3.
|
|
897
|
+
(_this$_whiteboardCont3 = this._whiteboardControl) === null || _this$_whiteboardCont3 === void 0 || _this$_whiteboardCont3.setBackgroundColor(color);
|
|
811
898
|
}
|
|
812
899
|
}, {
|
|
813
900
|
key: "_updateRedo",
|
|
@@ -849,17 +936,48 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
849
936
|
}
|
|
850
937
|
}, {
|
|
851
938
|
key: "_getSnapshotImage",
|
|
852
|
-
value: function
|
|
853
|
-
var
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
939
|
+
value: function () {
|
|
940
|
+
var _getSnapshotImage2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
941
|
+
var _this5 = this;
|
|
942
|
+
var mainWindow, _this$_roomControl$ge, progress, imageData, fileName;
|
|
943
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
944
|
+
while (1) switch (_context.prev = _context.next) {
|
|
945
|
+
case 0:
|
|
946
|
+
mainWindow = this._boardMainWindow;
|
|
947
|
+
if (!mainWindow) {
|
|
948
|
+
_context.next = 11;
|
|
949
|
+
break;
|
|
950
|
+
}
|
|
951
|
+
progress = setInterval(function () {
|
|
952
|
+
if (_this5._boardStore && _this5._boardStore.observables.progress < 100) {
|
|
953
|
+
_this5._boardStore.observables.progress += 1;
|
|
954
|
+
} else {
|
|
955
|
+
clearInterval(progress);
|
|
956
|
+
}
|
|
957
|
+
}, 10);
|
|
958
|
+
_context.next = 5;
|
|
959
|
+
return mainWindow.getSnapshotImage();
|
|
960
|
+
case 5:
|
|
961
|
+
imageData = _context.sent;
|
|
962
|
+
this._boardStore.observables.progress = 100;
|
|
963
|
+
clearInterval(progress);
|
|
964
|
+
fileName = "".concat((_this$_roomControl$ge = this._roomControl.getRoomInfo()) === null || _this$_roomControl$ge === void 0 ? void 0 : _this$_roomControl$ge.roomName, "_").concat((0, _dayjs["default"])().format('YYYYMMDD_HHmmSSS'), ".jpg");
|
|
965
|
+
(0, _utils.downloadImageData)(imageData, fileName);
|
|
966
|
+
this._uiEventStore.showToast({
|
|
967
|
+
type: 'info',
|
|
968
|
+
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_savedsuccessfully')
|
|
969
|
+
});
|
|
970
|
+
case 11:
|
|
971
|
+
case "end":
|
|
972
|
+
return _context.stop();
|
|
859
973
|
}
|
|
860
|
-
});
|
|
974
|
+
}, _callee, this);
|
|
975
|
+
}));
|
|
976
|
+
function _getSnapshotImage() {
|
|
977
|
+
return _getSnapshotImage2.apply(this, arguments);
|
|
861
978
|
}
|
|
862
|
-
|
|
979
|
+
return _getSnapshotImage;
|
|
980
|
+
}()
|
|
863
981
|
}, {
|
|
864
982
|
key: "_openLonelyWindow",
|
|
865
983
|
value: function _openLonelyWindow() {
|
|
@@ -878,182 +996,79 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
878
996
|
}, {
|
|
879
997
|
key: "_boardObservble",
|
|
880
998
|
value: function _boardObservble() {
|
|
881
|
-
var
|
|
882
|
-
return {
|
|
883
|
-
onJoinSuccess: function () {
|
|
884
|
-
var _onJoinSuccess = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mainWindow) {
|
|
885
|
-
var _this7$_whiteboardCon2, _this7$_whiteboardCon, ownerUserId, ownerUser;
|
|
886
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
887
|
-
while (1) switch (_context.prev = _context.next) {
|
|
888
|
-
case 0:
|
|
889
|
-
_this7.logger.info('Fcr board join success');
|
|
890
|
-
if (_this7._whiteboardControl) {
|
|
891
|
-
_this7$_whiteboardCon = (_this7$_whiteboardCon2 = _this7._whiteboardControl) === null || _this7$_whiteboardCon2 === void 0 ? void 0 : _this7$_whiteboardCon2.getBoardActiveInfo(), ownerUserId = _this7$_whiteboardCon.ownerUserId;
|
|
892
|
-
ownerUser = _this7._userControl.getUser(ownerUserId);
|
|
893
|
-
_this7._controlbarStore.ownerUser = ownerUser;
|
|
894
|
-
}
|
|
895
|
-
_context.next = 4;
|
|
896
|
-
return mainWindow.updateOperationPrivilege(true);
|
|
897
|
-
case 4:
|
|
898
|
-
mainWindow.addObserver(_this7._MainWindowEvents(mainWindow));
|
|
899
|
-
_this7._boardMainWindow = mainWindow;
|
|
900
|
-
_this7.mount();
|
|
901
|
-
case 7:
|
|
902
|
-
case "end":
|
|
903
|
-
return _context.stop();
|
|
904
|
-
}
|
|
905
|
-
}, _callee);
|
|
906
|
-
}));
|
|
907
|
-
function onJoinSuccess(_x) {
|
|
908
|
-
return _onJoinSuccess.apply(this, arguments);
|
|
909
|
-
}
|
|
910
|
-
return onJoinSuccess;
|
|
911
|
-
}(),
|
|
912
|
-
onJoinFailure: function onJoinFailure(e) {
|
|
913
|
-
_this7.logger.error('Fcr board join failure', e);
|
|
914
|
-
_this7._uiEventStore.showToast({
|
|
915
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_cannotjoin'),
|
|
916
|
-
type: 'warn'
|
|
917
|
-
});
|
|
918
|
-
},
|
|
919
|
-
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
920
|
-
_this7.logger.info('Fcr board connection state changed to', state);
|
|
921
|
-
_this7._setConnectionState(state);
|
|
922
|
-
if (state === _enums.FcrBoardRoomConnectionState.DISCONNECTED) {
|
|
923
|
-
if (_this7._joined) {
|
|
924
|
-
var _this7$_whiteboardCon3;
|
|
925
|
-
(_this7$_whiteboardCon3 = _this7._whiteboardControl) === null || _this7$_whiteboardCon3 === void 0 || _this7$_whiteboardCon3.open();
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
if (state === _enums.FcrBoardRoomConnectionState.CONNECTED) {
|
|
929
|
-
_this7._setJoinSuccessed(true);
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
onMemberStateChanged: function onMemberStateChanged(state) {
|
|
933
|
-
_this7.logger.info('Fcr board member state changed to', state);
|
|
934
|
-
},
|
|
935
|
-
onPermissionDeny: function onPermissionDeny() {}
|
|
936
|
-
};
|
|
937
|
-
}
|
|
938
|
-
}, {
|
|
939
|
-
key: "_MainWindowEvents",
|
|
940
|
-
value: function _MainWindowEvents(mainWindow) {
|
|
941
|
-
var _this8 = this;
|
|
999
|
+
var _this6 = this;
|
|
942
1000
|
return {
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
var _onMountSuccess = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
947
|
-
var _this8$_whiteboardCon, _this8$_ownerUser, _this8$_localUser, _this8$_boardStore, _this8$_boardStore2, activeInfo;
|
|
1001
|
+
onConnectionStateUpdated: function () {
|
|
1002
|
+
var _onConnectionStateUpdated = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state) {
|
|
1003
|
+
var _this6$_whiteboardCon, mainWindow, _this6$_whiteboardCon2, ownerUserId, ownerUser;
|
|
948
1004
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
949
1005
|
while (1) switch (_context2.prev = _context2.next) {
|
|
950
1006
|
case 0:
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
(
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
payload: _this8._userControl.getUser(activeInfo.ownerUserId)
|
|
1007
|
+
_this6.logger.info('Fcr board connection state changed to', state);
|
|
1008
|
+
_this6._setConnectionState(state);
|
|
1009
|
+
if (state === _agoraEduCore.FcrConnectionState.DISCONNECTED) {
|
|
1010
|
+
if (_this6._joined) {
|
|
1011
|
+
(_this6$_whiteboardCon = _this6._whiteboardControl) === null || _this6$_whiteboardCon === void 0 || _this6$_whiteboardCon.open();
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
if (state === _agoraEduCore.FcrConnectionState.CONNECTED) {
|
|
1015
|
+
_this6._setJoinSuccessed(true);
|
|
1016
|
+
mainWindow = _this6._whiteboardControl.getMainWindow();
|
|
1017
|
+
_this6.logger.info('Fcr board join success');
|
|
1018
|
+
if (_this6._whiteboardControl) {
|
|
1019
|
+
_this6$_whiteboardCon2 = _this6._whiteboardControl.getBoardActiveInfo(), ownerUserId = _this6$_whiteboardCon2.ownerUserId;
|
|
1020
|
+
ownerUser = _this6._userControl.getUser(ownerUserId);
|
|
1021
|
+
_this6._controlbarStore.ownerUser = ownerUser;
|
|
1022
|
+
}
|
|
1023
|
+
mainWindow.addObserver({
|
|
1024
|
+
onRedoStateUpdated: _this6._updateRedo,
|
|
1025
|
+
onUndoStateUpdated: _this6._updateUndo
|
|
971
1026
|
});
|
|
1027
|
+
_this6._boardMainWindow = mainWindow;
|
|
1028
|
+
_this6.mount();
|
|
972
1029
|
}
|
|
973
|
-
case
|
|
1030
|
+
case 4:
|
|
974
1031
|
case "end":
|
|
975
1032
|
return _context2.stop();
|
|
976
1033
|
}
|
|
977
1034
|
}, _callee2);
|
|
978
1035
|
}));
|
|
979
|
-
function
|
|
980
|
-
return
|
|
1036
|
+
function onConnectionStateUpdated(_x) {
|
|
1037
|
+
return _onConnectionStateUpdated.apply(this, arguments);
|
|
981
1038
|
}
|
|
982
|
-
return
|
|
983
|
-
}()
|
|
984
|
-
onUnmount: function onUnmount() {
|
|
985
|
-
if (_this8._lonelyWindowState === _type.LonelyWindowState.OPEN) {
|
|
986
|
-
_this8._openLonelyWindow();
|
|
987
|
-
}
|
|
988
|
-
if (_this8._lonelyWindowState === _type.LonelyWindowState.CLOSE) {
|
|
989
|
-
_this8._open();
|
|
990
|
-
}
|
|
991
|
-
_this8._uiEventStore.sendEvent(_constant.UIAction.WHITEBOARD_CHANGED, {
|
|
992
|
-
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
993
|
-
payload: null
|
|
994
|
-
});
|
|
995
|
-
(0, _rendererEvent.sendEvent)({
|
|
996
|
-
action: _constant.RendererEventAction.SET_OWNER_USER,
|
|
997
|
-
payload: null
|
|
998
|
-
});
|
|
999
|
-
_this8._ownerUser = null;
|
|
1000
|
-
_this8._initialized = false;
|
|
1001
|
-
},
|
|
1002
|
-
onSnapshotSuccess: function onSnapshotSuccess(canvas) {
|
|
1003
|
-
var _this8$_roomControl$g;
|
|
1004
|
-
var fileName = "".concat((_this8$_roomControl$g = _this8._roomControl.getRoomInfo()) === null || _this8$_roomControl$g === void 0 ? void 0 : _this8$_roomControl$g.roomName, "_").concat((0, _dayjs["default"])().format('YYYYMMDD_HHmmSSS'), ".jpg");
|
|
1005
|
-
(0, _utils.downloadCanvasImage)(canvas, fileName);
|
|
1006
|
-
_this8._uiEventStore.showToast({
|
|
1007
|
-
type: 'info',
|
|
1008
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_savedsuccessfully')
|
|
1009
|
-
});
|
|
1010
|
-
},
|
|
1011
|
-
onFailure: function onFailure(reason) {
|
|
1012
|
-
_this8.logger.error('operation failure, reason: ', reason);
|
|
1013
|
-
if (reason === _type.FcrBoardMainWindowFailureReason.ResourceWindowAlreadyOpened) {
|
|
1014
|
-
_this8._uiEventStore.showToast({
|
|
1015
|
-
type: 'error',
|
|
1016
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_failed')
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
if (reason === _type.FcrBoardMainWindowFailureReason.SnapshotFailure) {
|
|
1020
|
-
_this8._uiEventStore.showToast({
|
|
1021
|
-
type: 'error',
|
|
1022
|
-
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_failed')
|
|
1023
|
-
});
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1039
|
+
return onConnectionStateUpdated;
|
|
1040
|
+
}()
|
|
1026
1041
|
};
|
|
1027
1042
|
}
|
|
1028
1043
|
}, {
|
|
1029
1044
|
key: "_addDisposers",
|
|
1030
1045
|
value: function _addDisposers() {
|
|
1031
|
-
var
|
|
1046
|
+
var _this7 = this;
|
|
1032
1047
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
1033
|
-
return
|
|
1048
|
+
return _this7.hasPrivilege;
|
|
1034
1049
|
}, function (privilege) {
|
|
1035
|
-
var
|
|
1036
|
-
var p = privilege ||
|
|
1037
|
-
(
|
|
1038
|
-
(
|
|
1050
|
+
var _this7$_boardStore, _this7$_boardStore2;
|
|
1051
|
+
var p = privilege || _this7._isHost || _this7._isMyBoard;
|
|
1052
|
+
(_this7$_boardStore = _this7._boardStore) === null || _this7$_boardStore === void 0 || _this7$_boardStore.setWriteEnable(_this7._isHost || _this7._isMyBoard);
|
|
1053
|
+
(_this7$_boardStore2 = _this7._boardStore) === null || _this7$_boardStore2 === void 0 || _this7$_boardStore2.setPrivilege(p);
|
|
1039
1054
|
}), (0, _mobx.reaction)(function () {
|
|
1040
|
-
return
|
|
1055
|
+
return _this7._boardStore.observables.writeEnabled;
|
|
1041
1056
|
}, function (writeEnabled) {
|
|
1042
|
-
if (writeEnabled) setTimeout(
|
|
1057
|
+
if (writeEnabled) setTimeout(_this7._repositionToolbar, 0);
|
|
1043
1058
|
}), (0, _mobx.reaction)(function () {
|
|
1044
|
-
return
|
|
1059
|
+
return _this7._localUser;
|
|
1045
1060
|
}, function (user) {
|
|
1046
|
-
var
|
|
1047
|
-
|
|
1048
|
-
var hasPrivilege =
|
|
1049
|
-
(
|
|
1050
|
-
|
|
1061
|
+
var _this7$_boardStore3;
|
|
1062
|
+
_this7._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
|
|
1063
|
+
var hasPrivilege = _this7.hasPrivilege || _this7._isHost || _this7._isMyBoard;
|
|
1064
|
+
(_this7$_boardStore3 = _this7._boardStore) === null || _this7$_boardStore3 === void 0 || _this7$_boardStore3.setPrivilege(hasPrivilege);
|
|
1065
|
+
_this7._boardStore.setWriteEnable(_this7._isHost || _this7._isMyBoard);
|
|
1051
1066
|
}));
|
|
1052
1067
|
}
|
|
1053
1068
|
}, {
|
|
1054
1069
|
key: "_alertWhenReplace",
|
|
1055
1070
|
value: function _alertWhenReplace(userInfo) {
|
|
1056
|
-
var
|
|
1071
|
+
var _this8 = this;
|
|
1057
1072
|
var userRole = userInfo.userRole,
|
|
1058
1073
|
userName = userInfo.userName;
|
|
1059
1074
|
var dialogId = this._uiEventStore.openConfirmDialog({
|
|
@@ -1061,17 +1076,41 @@ var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/functio
|
|
|
1061
1076
|
content: (_type2.FcrUserRole.HOST === userRole ? (0, _i18n.transI18n)('fmt_role_host') : _type2.FcrUserRole.COHOST === userRole ? (0, _i18n.transI18n)('fmt_role_cohost') : '') + "".concat(userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare')),
|
|
1062
1077
|
okText: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_button_gotit'),
|
|
1063
1078
|
onOk: function onOk() {
|
|
1064
|
-
|
|
1079
|
+
_this8._uiEventStore.closeDialog(dialogId);
|
|
1065
1080
|
},
|
|
1066
1081
|
onCancel: function onCancel() {
|
|
1067
|
-
|
|
1082
|
+
_this8._uiEventStore.closeDialog(dialogId);
|
|
1068
1083
|
}
|
|
1069
1084
|
});
|
|
1070
1085
|
}
|
|
1086
|
+
}, {
|
|
1087
|
+
key: "_convertShapeToBoardToolType",
|
|
1088
|
+
value: function _convertShapeToBoardToolType(shape) {
|
|
1089
|
+
switch (shape) {
|
|
1090
|
+
case _enums.FcrBoardShape.Arrow:
|
|
1091
|
+
return _enums.FcrBoardToolType.ARROW;
|
|
1092
|
+
case _enums.FcrBoardShape.Curve:
|
|
1093
|
+
return _enums.FcrBoardToolType.CURVE;
|
|
1094
|
+
case _enums.FcrBoardShape.Ellipse:
|
|
1095
|
+
return _enums.FcrBoardToolType.ELLIPSE;
|
|
1096
|
+
case _enums.FcrBoardShape.Pentagram:
|
|
1097
|
+
return _enums.FcrBoardToolType.PENTAGRAM;
|
|
1098
|
+
case _enums.FcrBoardShape.Rectangle:
|
|
1099
|
+
return _enums.FcrBoardToolType.RECTANGLE;
|
|
1100
|
+
case _enums.FcrBoardShape.Rhombus:
|
|
1101
|
+
return _enums.FcrBoardToolType.RHOMBUS;
|
|
1102
|
+
case _enums.FcrBoardShape.Straight:
|
|
1103
|
+
return _enums.FcrBoardToolType.STRAIGHT;
|
|
1104
|
+
case _enums.FcrBoardShape.Triangle:
|
|
1105
|
+
return _enums.FcrBoardToolType.TRIANGLE;
|
|
1106
|
+
default:
|
|
1107
|
+
return _enums.FcrBoardToolType.NONE;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1071
1110
|
}]);
|
|
1072
1111
|
}(_base.UIModule);
|
|
1073
1112
|
_FcrWhiteboardUIModule = FcrWhiteboardUIModule;
|
|
1074
|
-
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"], [_decorator.bound, 2, "onProcessEvent"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_createToolbarUIContextDecs, 18, "_createToolbarUIContext"], [_decorator.bound, 2, "_updateDockPosition"], [_decorator.bound, 2, "_updateDockPlacement"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_decorator.bound, 2, "_updateMaxVisibleTools"], [_decorator.bound, 2, "_setBackgroundColor"], [_updateRedoDecs, 18, "_updateRedo"], [_updateUndoDecs, 18, "_updateUndo"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_getSnapshotImageDecs, 18, "_getSnapshotImage"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]
|
|
1113
|
+
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"], [_decorator.bound, 2, "onProcessEvent"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_createToolbarUIContextDecs, 18, "_createToolbarUIContext"], [_decorator.bound, 2, "_updateDockPosition"], [_decorator.bound, 2, "_updateDockPlacement"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_decorator.bound, 2, "_updateMaxVisibleTools"], [_decorator.bound, 2, "_setBackgroundColor"], [_updateRedoDecs, 18, "_updateRedo"], [_updateUndoDecs, 18, "_updateUndo"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_getSnapshotImageDecs, 18, "_getSnapshotImage"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"]], [], 0, void 0, _base.UIModule).e;
|
|
1075
1114
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 6);
|
|
1076
1115
|
_init__lonelyWindowState = _applyDecs$e2[0];
|
|
1077
1116
|
_init__ownerUser = _applyDecs$e2[1];
|