fcr-ui-scene 3.6.2 → 3.6.4-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base.js +0 -3
- package/lib/creator.d.ts +1 -0
- package/lib/creator.js +63 -52
- package/lib/electron/app.js +33 -14
- package/lib/electron/bootstrap-dev.js +5 -3
- package/lib/electron/bootstrap-sdk.js +4 -10
- package/lib/electron/exit-codes.d.ts +14 -0
- package/lib/electron/exit-codes.js +22 -0
- package/lib/electron/injections.d.ts +3 -2
- package/lib/electron/injections.js +122 -124
- package/lib/electron/ipc/ipc.js +0 -1
- package/lib/electron/main.js +57 -12
- package/lib/electron/tools.js +0 -4
- package/lib/electron/window.js +1 -7
- package/lib/fragments/annotation/index.d.ts +1 -0
- package/lib/fragments/annotation/index.js +54 -40
- package/lib/fragments/annotation/store.d.ts +7 -2
- package/lib/fragments/annotation/store.js +181 -102
- package/lib/fragments/annotation/view.d.ts +1 -0
- package/lib/fragments/annotation/view.js +10 -2
- package/lib/modules/action-bar/components/apps/app-item/index.js +0 -2
- package/lib/modules/action-bar/components/apps/app-list.js +2 -5
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -3
- package/lib/modules/action-bar/components/apps/useWidgetList.js +2 -1
- package/lib/modules/action-bar/components/collapse/index.js +0 -4
- package/lib/modules/action-bar/components/item/index.js +0 -2
- package/lib/modules/action-bar/components/leave/index.js +0 -2
- package/lib/modules/action-bar/components/more/poppover-content.js +0 -4
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +2 -1
- package/lib/modules/action-bar/components/notification-bar/index.js +0 -2
- package/lib/modules/action-bar/components/screen-share/index.js +0 -1
- package/lib/modules/action-bar/components/screen-share/submenu.js +0 -3
- package/lib/modules/action-bar/components/trigger-output-language/index.js +11 -14
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +8 -11
- package/lib/modules/action-bar/index.css +4 -0
- package/lib/modules/action-bar/index.js +1 -2
- package/lib/modules/action-bar/store.d.ts +1 -7
- package/lib/modules/action-bar/store.js +67 -118
- package/lib/modules/annotation/board-cursor.css +76 -0
- package/lib/modules/annotation/components/control-bar/index.js +43 -2
- package/lib/modules/annotation/components/toolbar/components/color-tool/color-panel/index.js +2 -1
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/index.js +5 -2
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/graphic-panel/libs.js +11 -5
- package/lib/modules/annotation/components/toolbar/components/graphic-tool/index.js +0 -2
- package/lib/modules/annotation/components/toolbar/components/item/item.d.ts +1 -0
- package/lib/modules/annotation/components/toolbar/components/item/item.js +3 -2
- package/lib/modules/annotation/components/toolbar/components/pen-tool/pen-panel/index.js +1 -0
- package/lib/modules/annotation/components/toolbar/store.js +0 -1
- package/lib/modules/annotation/index.d.ts +4 -0
- package/lib/modules/annotation/index.js +3 -1
- package/lib/modules/annotation/store.d.ts +15 -5
- package/lib/modules/annotation/store.js +222 -205
- package/lib/modules/annotation/style.css +3 -3
- package/lib/modules/annotation/view.d.ts +1 -0
- package/lib/modules/annotation/view.js +26 -9
- package/lib/modules/audio-stream/index.js +0 -4
- package/lib/modules/chat/chat-room-store.js +6 -10
- package/lib/modules/chat/components/chat-bar/index.js +0 -2
- package/lib/modules/chat/components/chat-select/index.js +0 -1
- package/lib/modules/chat/components/chat-select/select-item/index.js +2 -5
- package/lib/modules/chat/components/message-list/index.js +1 -3
- package/lib/modules/chat/components/message-list/message-item/index.js +11 -13
- package/lib/modules/chat/index.js +13 -14
- package/lib/modules/chat/store.js +0 -1
- package/lib/modules/chat/view.js +11 -15
- package/lib/modules/components/annotation-menu/index.js +0 -3
- package/lib/modules/components/device-control/components/audio-menu/index.js +2 -1
- package/lib/modules/components/device-control/components/video-menu/index.js +2 -1
- package/lib/modules/components/device-control/store.js +0 -1
- package/lib/modules/components/leave-meeting/components/assign-host.js +4 -5
- package/lib/modules/components/leave-meeting/store.js +11 -12
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +10 -4
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +2 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -4
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +3 -4
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +0 -3
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +7 -34
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +11 -3
- package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +8 -13
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +0 -2
- package/lib/modules/components/member-window/components/member-actions/index.js +1 -33
- package/lib/modules/components/member-window/components/member-actions/provider.js +1 -2
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +38 -1
- package/lib/modules/components/member-window/components/member-actions/store.js +120 -13
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +3 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +16 -3
- package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/video-player/index.js +3 -3
- package/lib/modules/components/member-window/index.css +37 -0
- package/lib/modules/components/member-window/index.js +1 -0
- package/lib/modules/components/security-menu/index.js +1 -4
- package/lib/modules/components/tab-frame/index.js +0 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -1
- package/lib/modules/connection-gateway/components/phone/index.js +5 -4
- package/lib/modules/connection-gateway/index.js +1 -2
- package/lib/modules/connection-gateway/store.js +23 -26
- package/lib/modules/control-bar/components/more-actions/index.js +0 -3
- package/lib/modules/control-bar/index.d.ts +0 -4
- package/lib/modules/control-bar/index.js +1 -34
- package/lib/modules/control-bar/store.d.ts +5 -6
- package/lib/modules/control-bar/store.js +70 -104
- package/lib/modules/control-bar/view.js +53 -13
- package/lib/modules/device-pretest/settings/beauty.js +1 -2
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -1
- package/lib/modules/device-pretest/store.js +2 -4
- package/lib/modules/dialog/components/control-bar/index.d.ts +0 -2
- package/lib/modules/dialog/components/control-bar/index.js +4 -6
- package/lib/modules/dialog/components/dialog-container/component/body.js +0 -2
- package/lib/modules/dialog/components/dialog-container/index.js +1 -2
- package/lib/modules/dialog/components/host-area-container/index.js +0 -3
- package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -2
- package/lib/modules/dialog/components/pre-setting-container/index.js +1 -2
- package/lib/modules/dialog/components/system-preference/index.js +2 -5
- package/lib/modules/dialog/components/video-window/index.js +0 -2
- package/lib/modules/dialog/hooks/use-popover-watcher.js +0 -1
- package/lib/modules/dialog/hooks/useElectron.js +3 -4
- package/lib/modules/dialog/index.d.ts +0 -3
- package/lib/modules/dialog/index.js +2 -28
- package/lib/modules/dialog/store.d.ts +6 -8
- package/lib/modules/dialog/store.js +22 -60
- package/lib/modules/dialog/view.js +2 -1
- package/lib/modules/event-confirm/components/window/index.js +0 -2
- package/lib/modules/event-confirm/index.js +1 -2
- package/lib/modules/event-confirm/store.js +4 -7
- package/lib/modules/event-confirm/view.js +2 -1
- package/lib/modules/event-sound/index.js +1 -2
- package/lib/modules/event-sound/sound-effect-player.js +2 -2
- package/lib/modules/event-toast/index.js +1 -2
- package/lib/modules/event-toast/store.js +0 -2
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/interpreter/index.js +1 -2
- package/lib/modules/interpreter/interpreter-list/index.js +3 -4
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +2 -5
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +0 -2
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +0 -4
- package/lib/modules/interpreter/store.js +5 -10
- package/lib/modules/interpreter/utils.js +15 -14
- package/lib/modules/invite/components/pstn-invite.js +22 -23
- package/lib/modules/invite/components/voip-invite.js +7 -7
- package/lib/modules/invite/enums.js +1 -0
- package/lib/modules/invite/index.js +1 -2
- package/lib/modules/invite/store.js +46 -45
- package/lib/modules/layout/components/CommonVideoRenderer.js +7 -3
- package/lib/modules/layout/components/Gallery.js +5 -3
- package/lib/modules/layout/components/index.js +0 -1
- package/lib/modules/layout/index.js +1 -2
- package/lib/modules/layout/store.d.ts +3 -0
- package/lib/modules/layout/store.js +38 -14
- package/lib/modules/layout/type.d.ts +7 -0
- package/lib/modules/layout/type.js +9 -0
- package/lib/modules/live-streaming/index.dev.js +6 -6
- package/lib/modules/live-streaming/index.js +1 -2
- package/lib/modules/live-streaming/store.js +19 -19
- package/lib/modules/notification/index.js +1 -2
- package/lib/modules/notification/interpreter-status/index.js +2 -1
- package/lib/modules/notification/view.js +1 -2
- package/lib/modules/offscreen-pulling/index.js +0 -1
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +1 -4
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +0 -2
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +0 -2
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +1 -4
- package/lib/modules/participant/components/participants/components/participants/index.js +0 -2
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +0 -1
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +0 -2
- package/lib/modules/participant/index.js +1 -4
- package/lib/modules/participant/member-list-data-source.js +0 -3
- package/lib/modules/participant/store.js +140 -114
- package/lib/modules/pc-audio-connect/index.js +1 -2
- package/lib/modules/pc-audio-connect/store.js +9 -10
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +2 -1
- package/lib/modules/phone-audio-connect/index.js +1 -2
- package/lib/modules/phone-audio-connect/store.js +0 -3
- package/lib/modules/phone-audio-connect/view.js +5 -4
- package/lib/modules/setting/audio-settings/audio-settings.js +1 -4
- package/lib/modules/setting/general-settings/general-settings.js +1 -2
- package/lib/modules/setting/index.d.ts +2 -0
- package/lib/modules/setting/index.js +4 -5
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -2
- package/lib/modules/setting/state/index.js +0 -4
- package/lib/modules/setting/storage-settings/storage-settings.js +4 -4
- package/lib/modules/setting/store.d.ts +8 -10
- package/lib/modules/setting/store.js +33 -35
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/video-settings/video-settings.js +1 -2
- package/lib/modules/setting/view.js +1 -2
- package/lib/modules/share-screen/components/selection/index.js +16 -9
- package/lib/modules/share-screen/index.d.ts +2 -0
- package/lib/modules/share-screen/index.js +3 -3
- package/lib/modules/share-screen/store.d.ts +12 -2
- package/lib/modules/share-screen/store.js +149 -136
- package/lib/modules/state-bar/index.css +8 -6
- package/lib/modules/state-bar/index.d.ts +2 -0
- package/lib/modules/state-bar/index.js +3 -3
- package/lib/modules/state-bar/layout-config.d.ts +1 -0
- package/lib/modules/state-bar/layout-config.js +17 -6
- package/lib/modules/state-bar/live-streaming-state.js +0 -3
- package/lib/modules/state-bar/store.d.ts +5 -1
- package/lib/modules/state-bar/store.js +8 -2
- package/lib/modules/state-bar/view.js +9 -5
- package/lib/modules/video-window/components/members/index.js +2 -1
- package/lib/modules/video-window/components/topControl/index.js +0 -3
- package/lib/modules/video-window/index.js +1 -2
- package/lib/modules/video-window/store.js +0 -4
- package/lib/modules/waiting-room-layout/index.js +1 -2
- package/lib/modules/whiteboard/components/control-bar/store.js +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +0 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/expansion/index.js +1 -4
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +2 -3
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +1 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +1 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +2 -4
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +7 -3
- package/lib/modules/whiteboard/components/toolbar/store.js +64 -37
- package/lib/modules/whiteboard/index.js +5 -8
- package/lib/modules/whiteboard/style.css +12 -4
- package/lib/modules/whiteboard/view.js +10 -2
- package/lib/modules/widget/index.js +1 -2
- package/lib/modules/widget/web-widget.js +1 -1
- package/lib/plugins/browser-runtime-plugin.js +1 -1
- package/lib/plugins/module-dev-plugin.js +13 -13
- package/lib/providers/ability-provider.d.ts +12 -1
- package/lib/providers/ability-provider.js +8 -1
- package/lib/providers/annotation-provider.d.ts +63 -12
- package/lib/providers/annotation-provider.js +52 -46
- package/lib/providers/device-privilege-provider.js +81 -83
- package/lib/providers/device-provider.d.ts +3 -3
- package/lib/providers/device-provider.js +201 -204
- package/lib/providers/device-stream-provider.js +24 -27
- package/lib/providers/event-provider.d.ts +3 -3
- package/lib/providers/event-provider.js +0 -2
- package/lib/providers/interpreter-provider.js +195 -197
- package/lib/providers/message-provider.js +0 -2
- package/lib/providers/phone-audio-provider.js +17 -19
- package/lib/providers/privilege-provider.js +53 -58
- package/lib/providers/renderer-provider.d.ts +3 -1
- package/lib/providers/renderer-provider.js +18 -4
- package/lib/providers/room-provider.js +31 -33
- package/lib/providers/screen-share-provider.d.ts +1 -0
- package/lib/providers/screen-share-provider.js +97 -103
- package/lib/providers/sharing-provider.d.ts +5 -1
- package/lib/providers/sharing-provider.js +17 -1
- package/lib/providers/user-setting-storage-provider.d.ts +20 -0
- package/lib/providers/user-setting-storage-provider.js +72 -0
- package/lib/providers/widget-provider.js +0 -1
- package/lib/scenes/main-scene.js +13 -16
- package/lib/scenes/waiting-scene.js +4 -4
- package/lib/shared-data-source/chat-data.js +0 -2
- package/lib/shared-data-source/config.d.ts +1 -5
- package/lib/shared-data-source/config.js +11 -81
- package/lib/shared-data-source/interpreter.js +0 -2
- package/lib/shared-data-source/layout-data.js +1 -4
- package/lib/shared-data-source/member-data.js +0 -4
- package/lib/shared-data-source/pin-data.js +0 -1
- package/lib/shared-data-source/screen-share-data.d.ts +6 -2
- package/lib/shared-data-source/screen-share-data.js +2 -2
- package/lib/shared-data-source/security-data.js +0 -1
- package/lib/shared-data-source/setting.d.ts +13 -13
- package/lib/shared-data-source/setting.js +10 -8
- package/lib/shared-data-source/video-window.d.ts +2 -1
- package/lib/shared-data-source/video-window.js +82 -66
- package/lib/shared-data-source/waiting-room.js +0 -2
- package/lib/translations/enUS.d.ts +8 -0
- package/lib/translations/enUS.js +9 -1
- package/lib/translations/zhCN.d.ts +8 -0
- package/lib/translations/zhCN.js +11 -3
- package/lib/type.d.ts +2 -1
- package/lib/type.js +14 -0
- package/lib/ui-scene.js +18 -14
- package/lib/utilities/constant.d.ts +2 -1
- package/lib/utilities/constant.js +8 -0
- package/lib/utilities/copyText.js +12 -12
- package/lib/utilities/hooks.js +1 -2
- package/lib/utilities/logger.js +0 -1
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/privilege.js +0 -3
- package/lib/utilities/renderer-event.js +0 -2
- package/lib/utilities/setting-config-storage.d.ts +7 -6
- package/lib/utilities/setting-config-storage.js +55 -41
- package/lib/utilities/tools.d.ts +1 -0
- package/lib/utilities/tools.js +9 -12
- package/lib/waiting-room-control-manager.js +26 -28
- package/package.json +8 -6
- package/dist/132.js +0 -2
- package/dist/132.js.LICENSE.txt +0 -311
- package/dist/317.js +0 -2
- package/dist/317.js.LICENSE.txt +0 -20
- package/dist/651.js +0 -2
- package/dist/651.js.LICENSE.txt +0 -1
- package/dist/689343b64b60bfb7ffff.png +0 -0
- package/dist/73.js +0 -1
- package/dist/885f9369ea05a8ac0e56.png +0 -0
- package/dist/90f383876a6e93e7c7ca.png +0 -0
- package/dist/9b37584780995fc5df8c.gif +0 -0
- package/dist/annotation.e5cbd3a70b6d42361872.css +0 -1274
- package/dist/annotation.html +0 -1
- package/dist/annotation.js +0 -2
- package/dist/annotation.js.LICENSE.txt +0 -252
- package/dist/assets/browser/images/default1.jpg +0 -0
- package/dist/assets/browser/images/default2.jpg +0 -0
- package/dist/assets/browser/images/default3.jpg +0 -0
- package/dist/assets/browser/images/default4.jpg +0 -0
- package/dist/assets/browser/images/default5.jpg +0 -0
- package/dist/assets/browser/images/default6.jpg +0 -0
- package/dist/assets/browser/images/default7.jpg +0 -0
- package/dist/assets/browser/sound_effects/pretest.mp3 +0 -0
- package/dist/assets/browser/sound_effects/recording_started.mp3 +0 -0
- package/dist/assets/browser/sound_effects/remote_user_joined.mp3 +0 -0
- package/dist/assets/browser/sound_effects/speaker_test.mp3 +0 -0
- package/dist/assets/browser/videos/default8.mp4 +0 -0
- package/dist/assets/browser/videos/default9.mp4 +0 -0
- package/dist/assets/cursors/fcr_whiteboard_input.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_pen.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_-straightline.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_arrow.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_circle.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_rectangle.ico +0 -0
- package/dist/assets/cursors/fcr_whiteboard_shape_triangle.ico +0 -0
- package/dist/assets/electron/images/default1.jpg +0 -0
- package/dist/assets/electron/images/default2.jpg +0 -0
- package/dist/assets/electron/sound_effects/pretest.mp3 +0 -0
- package/dist/assets/electron/videos/default8.mp4 +0 -0
- package/dist/assets/fcr_chat_reddot.svg +0 -5
- package/dist/assets/fcr_defaultpage.png +0 -0
- package/dist/assets/fcr_grid_big.svg +0 -3
- package/dist/assets/fcr_leave2.svg +0 -58
- package/dist/assets/fcr_listontop_big.svg +0 -3
- package/dist/assets/full-screen-error-boundary-img.png +0 -0
- package/dist/assets/leave-meeting.png +0 -0
- package/dist/assets/loading.gif +0 -0
- package/dist/assets/login_confirm.png +0 -0
- package/dist/assets/pretest.mp3 +0 -0
- package/dist/assets/state-bar-logo.png +0 -0
- package/dist/assets/step-gradient.svg +0 -10
- package/dist/b74b002687a3a3346bec.png +0 -0
- package/dist/b94869094481702f949b.png +0 -0
- package/dist/ebeace75fd46b90d890e.png +0 -0
- package/dist/electron/app.js +0 -194
- package/dist/electron/bootstrap-dev.js +0 -46
- package/dist/electron/bootstrap-sdk.js +0 -211
- package/dist/electron/default-options.js +0 -25
- package/dist/electron/env.js +0 -13
- package/dist/electron/index.js +0 -20
- package/dist/electron/injections.js +0 -903
- package/dist/electron/ipc/ipc.js +0 -141
- package/dist/electron/ipc/type.js +0 -19
- package/dist/electron/logger.js +0 -65
- package/dist/electron/main.js +0 -94
- package/dist/electron/plugins/devtool-shortcut.js +0 -33
- package/dist/electron/plugins/meeting-state.js +0 -39
- package/dist/electron/plugins/screenshot.js +0 -54
- package/dist/electron/preload.js +0 -108
- package/dist/electron/tools.js +0 -66
- package/dist/electron/window.js +0 -123
- package/dist/extensions/agora-extension-virtual-background/agora-wasm.wasm +0 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm-simd.wasm +0 -0
- package/dist/extensions/ai-denoiser/denoiser-wasm.js +0 -1
- package/dist/extensions/ai-denoiser/denoiser-wasm.wasm +0 -0
- package/dist/fad688b9135b15d6c405.png +0 -0
- package/dist/index.html +0 -224
- package/dist/main.393a2a91ab7fc05ffce6.css +0 -15403
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -272
- package/dist/worker-entry.worker.js.LICENSE.txt +0 -13
|
@@ -19,8 +19,6 @@ require("core-js/modules/es.object.define-properties.js");
|
|
|
19
19
|
require("core-js/modules/es.object.define-property.js");
|
|
20
20
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
21
21
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
22
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
23
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
24
22
|
require("core-js/modules/esnext.function.metadata.js");
|
|
25
23
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
26
24
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
@@ -61,6 +59,7 @@ require("core-js/modules/esnext.json.parse.js");
|
|
|
61
59
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
62
60
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
63
61
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
62
|
+
require("core-js/modules/web.timers.js");
|
|
64
63
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
65
64
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
66
65
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -81,7 +80,7 @@ var _asyncRetry = require("agora-foundation/lib/utilities/async-retry");
|
|
|
81
80
|
var _logger = require("../../utilities/logger");
|
|
82
81
|
var _platform = require("../../utilities/platform");
|
|
83
82
|
var _AnnotationStore;
|
|
84
|
-
var _initProto, _init_joined, _init_bounds, _handleBoardDomLoadDecs, _closeDecs, _ref;
|
|
83
|
+
var _initProto, _init_joined, _init_bounds, _init_currentTool, _handleBoardDomLoadDecs, _closeDecs, _handleSetToolDecs, _ref;
|
|
85
84
|
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; }
|
|
86
85
|
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; }
|
|
87
86
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -96,7 +95,8 @@ function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.descr
|
|
|
96
95
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
97
96
|
var _A = /*#__PURE__*/new WeakMap();
|
|
98
97
|
var _B = /*#__PURE__*/new WeakMap();
|
|
99
|
-
|
|
98
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
99
|
+
_ref = (_handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _closeDecs = [_mobx.action, _mobx.action.bound], _handleSetToolDecs = [(0, _decorator.debounced)(300), _decorator.bound], "logger");
|
|
100
100
|
var AnnotationStore = /*#__PURE__*/function () {
|
|
101
101
|
function AnnotationStore() {
|
|
102
102
|
(0, _classCallCheck2["default"])(this, AnnotationStore);
|
|
@@ -115,10 +115,12 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
115
115
|
width: 800,
|
|
116
116
|
height: 600
|
|
117
117
|
}));
|
|
118
|
+
_classPrivateFieldInitSpec(this, _C, _init_currentTool(this, 'none'));
|
|
119
|
+
(0, _defineProperty2["default"])(this, "timer", null);
|
|
118
120
|
var annotationRtmAppId = localStorage.getItem('annotation_rtm_app_id') || '';
|
|
119
121
|
var boardOptions = localStorage.getItem('board_options');
|
|
120
122
|
var appId = JSON.parse(annotationRtmAppId);
|
|
121
|
-
this.logger.info("
|
|
123
|
+
this.logger.info("annotationRtmAppId => ".concat(appId));
|
|
122
124
|
var _JSON$parse = JSON.parse(boardOptions || '{}'),
|
|
123
125
|
boardAppId = _JSON$parse.boardAppId,
|
|
124
126
|
boardId = _JSON$parse.boardId,
|
|
@@ -134,7 +136,7 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
134
136
|
boardId: boardId,
|
|
135
137
|
boardToken: boardToken
|
|
136
138
|
};
|
|
137
|
-
this.logger.info("
|
|
139
|
+
this.logger.info("boardinfo => ".concat(JSON.stringify(this._config)));
|
|
138
140
|
this._init(this._initEngine({
|
|
139
141
|
userId: userId,
|
|
140
142
|
roomToken: boardUserToken,
|
|
@@ -157,57 +159,66 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
157
159
|
set: function set(v) {
|
|
158
160
|
_classPrivateFieldSet(_B, this, v);
|
|
159
161
|
}
|
|
162
|
+
}, {
|
|
163
|
+
key: "currentTool",
|
|
164
|
+
get: function get() {
|
|
165
|
+
return _classPrivateFieldGet(_C, this);
|
|
166
|
+
},
|
|
167
|
+
set: function set(v) {
|
|
168
|
+
_classPrivateFieldSet(_C, this, v);
|
|
169
|
+
}
|
|
160
170
|
}, {
|
|
161
171
|
key: "open",
|
|
162
172
|
value: function () {
|
|
163
173
|
var _open = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
164
|
-
var
|
|
165
|
-
|
|
166
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
174
|
+
var visible, whiteboard, _this$_boardDom;
|
|
175
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
167
176
|
while (1) switch (_context.prev = _context.next) {
|
|
168
177
|
case 0:
|
|
169
|
-
this.logger.info("
|
|
178
|
+
this.logger.info("[annotation][open]: open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds)));
|
|
179
|
+
this.currentTool = 'curve';
|
|
170
180
|
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
171
181
|
(0, _platform.isWindows)() && window.runtime.browserWindow.blur();
|
|
172
182
|
this.setIgnore(true);
|
|
173
|
-
|
|
183
|
+
visible = window.runtime.browserWindow.isVisible();
|
|
184
|
+
this.logger.info("[annotation][open]: the annotation window visible is =>\n ".concat(visible, ", open process is ").concat(visible ? 'return' : 'continue...'));
|
|
174
185
|
if (!window.runtime.browserWindow.isVisible()) {
|
|
175
|
-
_context.next =
|
|
186
|
+
_context.next = 1;
|
|
176
187
|
break;
|
|
177
188
|
}
|
|
178
189
|
return _context.abrupt("return");
|
|
179
|
-
case
|
|
190
|
+
case 1:
|
|
180
191
|
if (this._engine) {
|
|
181
|
-
_context.next =
|
|
192
|
+
_context.next = 2;
|
|
182
193
|
break;
|
|
183
194
|
}
|
|
184
|
-
this.logger.info('this._engine is null');
|
|
195
|
+
this.logger.info('[annotation][open]: this._engine is null');
|
|
185
196
|
return _context.abrupt("return");
|
|
186
|
-
case
|
|
187
|
-
this.logger.info('this._engine is
|
|
197
|
+
case 2:
|
|
198
|
+
this.logger.info('[annotation][open]: this._engine is initialized, show annotation window');
|
|
188
199
|
window.runtime.browserWindow.show();
|
|
189
|
-
case
|
|
190
|
-
this.logger.info("
|
|
200
|
+
case 3:
|
|
201
|
+
this.logger.info("[annotation][open]: this._joined ".concat(this.joined));
|
|
191
202
|
if (!this.joined) {
|
|
192
|
-
_context.next =
|
|
203
|
+
_context.next = 4;
|
|
193
204
|
break;
|
|
194
205
|
}
|
|
195
206
|
return _context.abrupt("return");
|
|
196
|
-
case
|
|
207
|
+
case 4:
|
|
197
208
|
if (this._boardRoom) {
|
|
198
|
-
_context.next =
|
|
209
|
+
_context.next = 5;
|
|
199
210
|
break;
|
|
200
211
|
}
|
|
201
|
-
_context.next =
|
|
212
|
+
_context.next = 5;
|
|
202
213
|
return this._initBoardRoom();
|
|
203
|
-
case
|
|
214
|
+
case 5:
|
|
204
215
|
if (this._boardRoom) {
|
|
205
|
-
_context.next =
|
|
216
|
+
_context.next = 6;
|
|
206
217
|
break;
|
|
207
218
|
}
|
|
208
|
-
return _context.abrupt("return", this.logger.error("
|
|
209
|
-
case
|
|
210
|
-
_context.next =
|
|
219
|
+
return _context.abrupt("return", this.logger.error("[annotation][open]: this._boardRoom is not initialized, ".concat(this._boardRoom)));
|
|
220
|
+
case 6:
|
|
221
|
+
_context.next = 7;
|
|
211
222
|
return this._boardRoom.applicationManager.launchApplication(_forgeWhiteboard.WhiteboardApplication, {
|
|
212
223
|
width: this.bounds.width,
|
|
213
224
|
height: this.bounds.height,
|
|
@@ -217,31 +228,21 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
217
228
|
strokeWidth: 2
|
|
218
229
|
}
|
|
219
230
|
}, this._FORGE_WHITEBOARD_APP_ID);
|
|
220
|
-
case
|
|
231
|
+
case 7:
|
|
221
232
|
whiteboard = _context.sent;
|
|
233
|
+
this.logger.info("[annotation][open]: whiteboard launch success");
|
|
222
234
|
if (whiteboard) {
|
|
223
235
|
this._boardView.classList.add('fcr-whiteboard-window-view');
|
|
224
236
|
this._boardView.appendChild(whiteboard.view);
|
|
225
237
|
(_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.appendChild(this._boardView);
|
|
226
|
-
this.
|
|
238
|
+
this._boardInstance = whiteboard;
|
|
239
|
+
this._initBoardStyle(whiteboard);
|
|
227
240
|
this.joined = true;
|
|
241
|
+
this.logger.info("[annotation][open]: mount success, the joined is ".concat(this.joined));
|
|
228
242
|
}
|
|
229
|
-
this._boardRoom.applicationManager.on('launch',
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
_this.logger.info('launch event is triggered');
|
|
233
|
-
app.view && ((_this$_boardView = _this._boardView) === null || _this$_boardView === void 0 ? void 0 : _this$_boardView.appendChild(app.view));
|
|
234
|
-
_this._setBoardInstance(app);
|
|
235
|
-
}
|
|
236
|
-
});
|
|
237
|
-
this._boardRoom.applicationManager.on('terminal', function (appId, app) {
|
|
238
|
-
if (appId === _this._FORGE_WHITEBOARD_APP_ID) {
|
|
239
|
-
var _this$_boardView2;
|
|
240
|
-
_this.logger.info('terminal event is triggered');
|
|
241
|
-
app.view && _this._boardView.hasChildNodes() && ((_this$_boardView2 = _this._boardView) === null || _this$_boardView2 === void 0 ? void 0 : _this$_boardView2.removeChild(app.view));
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
case 28:
|
|
243
|
+
this._boardRoom.applicationManager.on('launch', this._launchHandler);
|
|
244
|
+
this._boardRoom.applicationManager.on('terminal', this._terminalHandler);
|
|
245
|
+
case 8:
|
|
245
246
|
case "end":
|
|
246
247
|
return _context.stop();
|
|
247
248
|
}
|
|
@@ -259,35 +260,60 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
259
260
|
}
|
|
260
261
|
}, {
|
|
261
262
|
key: "close",
|
|
262
|
-
value: function
|
|
263
|
-
var
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
263
|
+
value: function () {
|
|
264
|
+
var _close = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
265
|
+
var _this$_boardInstance, _this$_boardInstance2, _this$_boardInstance3, _this$_boardRoom, _this$_boardRoom2, _this$_boardRoom3, _this$_boardRoom4;
|
|
266
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
267
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
268
|
+
case 0:
|
|
269
|
+
this.joined = false;
|
|
270
|
+
this.currentTool = 'curve';
|
|
271
|
+
(_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 || _this$_boardInstance.clearPage();
|
|
272
|
+
((_this$_boardInstance2 = this._boardInstance) === null || _this$_boardInstance2 === void 0 ? void 0 : _this$_boardInstance2.view) && this._boardView.removeChild((_this$_boardInstance3 = this._boardInstance) === null || _this$_boardInstance3 === void 0 ? void 0 : _this$_boardInstance3.view);
|
|
273
|
+
(_this$_boardRoom = this._boardRoom) === null || _this$_boardRoom === void 0 || _this$_boardRoom.applicationManager.removeListener('launch', this._launchHandler);
|
|
274
|
+
(_this$_boardRoom2 = this._boardRoom) === null || _this$_boardRoom2 === void 0 || _this$_boardRoom2.applicationManager.removeListener('terminal', this._terminalHandler);
|
|
275
|
+
(_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.terminateApplication(this._FORGE_WHITEBOARD_APP_ID);
|
|
276
|
+
_context2.next = 1;
|
|
277
|
+
return (_this$_boardRoom4 = this._boardRoom) === null || _this$_boardRoom4 === void 0 ? void 0 : _this$_boardRoom4.leaveRoom();
|
|
278
|
+
case 1:
|
|
279
|
+
this._boardRoom = null;
|
|
280
|
+
this._boardInstance = null;
|
|
281
|
+
window.runtime.browserWindow.hide();
|
|
282
|
+
this.logger.info('[annotation][open]: close annotation window');
|
|
283
|
+
case 2:
|
|
284
|
+
case "end":
|
|
285
|
+
return _context2.stop();
|
|
286
|
+
}
|
|
287
|
+
}, _callee2, this);
|
|
288
|
+
}));
|
|
289
|
+
function close() {
|
|
290
|
+
return _close.apply(this, arguments);
|
|
291
|
+
}
|
|
292
|
+
return close;
|
|
293
|
+
}()
|
|
270
294
|
}, {
|
|
271
295
|
key: "setBounds",
|
|
272
296
|
value: function setBounds(bounds) {
|
|
273
297
|
this.bounds = bounds;
|
|
274
|
-
this.logger.info("
|
|
298
|
+
this.logger.info("[annotation][setBounds]: bounds is changed =>, ".concat(JSON.stringify(bounds)));
|
|
275
299
|
window.runtime.browserWindow.setBounds(bounds);
|
|
276
300
|
}
|
|
277
301
|
}, {
|
|
278
302
|
key: "setIgnore",
|
|
279
303
|
value: function setIgnore(ignore) {
|
|
304
|
+
this.logger.info("[annotation][setIgnore]: setIgnore method is called, the ignore is => ".concat(ignore));
|
|
280
305
|
window.runtime.browserWindow.setIgnoreMouseEvents(ignore);
|
|
281
306
|
}
|
|
282
307
|
}, {
|
|
283
308
|
key: "toolChanged",
|
|
284
309
|
value: function toolChanged(event) {
|
|
285
310
|
if (!this._boardInstance) return;
|
|
311
|
+
this.logger.info("[annotation][toolChanged]: toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
|
|
286
312
|
var board = this._boardInstance;
|
|
287
313
|
var payload = event.payload;
|
|
288
314
|
switch (event.action) {
|
|
289
315
|
case _type.ToolbarEvents.SET_TOOL:
|
|
290
|
-
|
|
316
|
+
this._handleSetTool(payload);
|
|
291
317
|
break;
|
|
292
318
|
case _type.ToolbarEvents.SET_STROKE_COLOR:
|
|
293
319
|
board.strokeColor = payload;
|
|
@@ -316,16 +342,15 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
316
342
|
}
|
|
317
343
|
}
|
|
318
344
|
}, {
|
|
319
|
-
key: "
|
|
320
|
-
value: function
|
|
321
|
-
var
|
|
322
|
-
var
|
|
323
|
-
|
|
345
|
+
key: "_initBoardStyle",
|
|
346
|
+
value: function _initBoardStyle(whiteboard) {
|
|
347
|
+
var frameWidth = this.bounds.width;
|
|
348
|
+
var frameHeight = this.bounds.height;
|
|
349
|
+
this.logger.info("[annotation][initBoardStyle] mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
|
|
324
350
|
this._boardView.style.width = "".concat(frameWidth, "px");
|
|
325
351
|
this._boardView.style.height = "".concat(frameHeight, "px");
|
|
326
352
|
whiteboard.view.style.height = "".concat(frameHeight, "px");
|
|
327
353
|
whiteboard.view.style.width = "".concat(frameWidth, "px");
|
|
328
|
-
this._boardInstance = whiteboard;
|
|
329
354
|
whiteboard.setCanvasBackgroundColor('rgba(0, 0, 0, 0)');
|
|
330
355
|
whiteboard.enableCameraByMouse = false;
|
|
331
356
|
whiteboard.enableCameraByTouch = false;
|
|
@@ -333,6 +358,7 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
333
358
|
whiteboard.enableCameraBoundaryHighlight = false;
|
|
334
359
|
whiteboard.strokeColor = '#FFC908';
|
|
335
360
|
whiteboard.setCurrentTool('curve');
|
|
361
|
+
this.logger.info("[annotation][initBoardStyle] mount success current tool, ".concat(whiteboard.getCurrentTool()));
|
|
336
362
|
whiteboard.on('undoStackLength', function (steps) {
|
|
337
363
|
(0, _platform.isWindows)() && window.runtime.browserWindow.blur();
|
|
338
364
|
(0, _rendererEvent.sendEvent)({
|
|
@@ -348,30 +374,59 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
348
374
|
});
|
|
349
375
|
});
|
|
350
376
|
}
|
|
377
|
+
}, {
|
|
378
|
+
key: "_handleSetTool",
|
|
379
|
+
value: function _handleSetTool(payload) {
|
|
380
|
+
var _this = this;
|
|
381
|
+
var board = this._boardInstance;
|
|
382
|
+
this.currentTool = 'none';
|
|
383
|
+
var currentTool = (0, _libs.convertTool)(payload);
|
|
384
|
+
if (board) {
|
|
385
|
+
board.setCurrentTool(currentTool);
|
|
386
|
+
var timber = setTimeout(function () {
|
|
387
|
+
var _this$_boardDom2;
|
|
388
|
+
(_this$_boardDom2 = _this._boardDom) === null || _this$_boardDom2 === void 0 || _this$_boardDom2.getBoundingClientRect();
|
|
389
|
+
_this.currentTool = currentTool;
|
|
390
|
+
clearTimeout(timber);
|
|
391
|
+
}, 600);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
351
394
|
}, {
|
|
352
395
|
key: "_init",
|
|
353
396
|
value: function () {
|
|
354
|
-
var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
397
|
+
var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(engine) {
|
|
355
398
|
var _this2 = this;
|
|
356
|
-
return _regenerator["default"].wrap(function
|
|
357
|
-
while (1) switch (
|
|
399
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
400
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
358
401
|
case 0:
|
|
359
402
|
engine.login();
|
|
360
403
|
engine.addObserver({
|
|
361
404
|
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
362
405
|
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
363
406
|
_this2._engine = engine;
|
|
407
|
+
_this2.logger.info("[annotation][initEngine]: engine connection state updated => CONNECTED");
|
|
364
408
|
}
|
|
365
409
|
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
410
|
+
_this2.logger.info("[annotation][initEngine]: engine connection state updated => DISCONNECTED, the engine is ".concat(_this2._engine));
|
|
411
|
+
!_this2._engine && engine.login();
|
|
412
|
+
}
|
|
413
|
+
if (state === _fcrCore.FcrConnectionState.CONNECTING) {
|
|
414
|
+
_this2.logger.info("[annotation][initEngine]: engine connection state updated => CONNECTING");
|
|
415
|
+
}
|
|
416
|
+
if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
|
|
417
|
+
_this2.logger.info("[annotation][initEngine]: engine connection state updated => RECONNECTING");
|
|
418
|
+
}
|
|
419
|
+
if (state === _fcrCore.FcrConnectionState.ABORTED) {
|
|
420
|
+
_this2.logger.info("[annotation][initEngine]: engine connection state updated => ABORTED, the engine is ".concat(_this2._engine));
|
|
366
421
|
!_this2._engine && engine.login();
|
|
367
422
|
}
|
|
368
423
|
}
|
|
369
424
|
});
|
|
370
|
-
case
|
|
425
|
+
case 1:
|
|
371
426
|
case "end":
|
|
372
|
-
return
|
|
427
|
+
return _context3.stop();
|
|
373
428
|
}
|
|
374
|
-
},
|
|
429
|
+
}, _callee3);
|
|
375
430
|
}));
|
|
376
431
|
function _init(_x) {
|
|
377
432
|
return _init2.apply(this, arguments);
|
|
@@ -381,30 +436,30 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
381
436
|
}, {
|
|
382
437
|
key: "_initBoardRoom",
|
|
383
438
|
value: function () {
|
|
384
|
-
var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
439
|
+
var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
385
440
|
var _this3 = this;
|
|
386
|
-
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, retriesMax;
|
|
387
|
-
return _regenerator["default"].wrap(function
|
|
388
|
-
while (1) switch (
|
|
441
|
+
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, retriesMax, _t;
|
|
442
|
+
return _regenerator["default"].wrap(function (_context6) {
|
|
443
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
389
444
|
case 0:
|
|
390
445
|
_this$_config = this._config, userId = _this$_config.userId, boardToken = _this$_config.boardToken, region = _this$_config.region, appIdentifier = _this$_config.appIdentifier, boardId = _this$_config.boardId;
|
|
391
446
|
nickName = localStorage.getItem('annotation_nickname') || '';
|
|
392
|
-
this.logger.info("
|
|
447
|
+
this.logger.info("[annotation][initBoardRoom]: start init board room with config => ".concat(JSON.stringify(this._config), " - ").concat(nickName));
|
|
393
448
|
// @ts-ignore
|
|
394
449
|
rtmClient = this._engine._rteEngine._rtmClient._client;
|
|
395
450
|
rtmProvider = new _forgeRtm.RTMProvider_2_2(rtmClient);
|
|
396
451
|
wbRoom = new _forgeRoom.Room(boardId, rtmProvider);
|
|
397
452
|
this._boardRoom = wbRoom;
|
|
398
453
|
wbRoom.applicationManager.registerApplication(_forgeWhiteboard.WhiteboardApplication);
|
|
399
|
-
this.logger.info("
|
|
400
|
-
|
|
454
|
+
this.logger.info("[annotation][initBoardRoom]: bordRoom instance is created, start join room");
|
|
455
|
+
_context6.prev = 1;
|
|
401
456
|
retriesMax = 10;
|
|
402
|
-
|
|
403
|
-
return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
404
|
-
return _regenerator["default"].wrap(function
|
|
405
|
-
while (1) switch (
|
|
457
|
+
_context6.next = 2;
|
|
458
|
+
return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
459
|
+
return _regenerator["default"].wrap(function (_context4) {
|
|
460
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
406
461
|
case 0:
|
|
407
|
-
|
|
462
|
+
_context4.next = 1;
|
|
408
463
|
return wbRoom.joinRoom({
|
|
409
464
|
userId: userId,
|
|
410
465
|
nickName: nickName,
|
|
@@ -415,46 +470,49 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
415
470
|
appIdentifier: appIdentifier
|
|
416
471
|
}
|
|
417
472
|
});
|
|
473
|
+
case 1:
|
|
474
|
+
_this3.logger.info("[annotation][initBoardRoom]: join room success");
|
|
418
475
|
case 2:
|
|
419
476
|
case "end":
|
|
420
|
-
return
|
|
477
|
+
return _context4.stop();
|
|
421
478
|
}
|
|
422
|
-
},
|
|
479
|
+
}, _callee4);
|
|
423
480
|
})), [], {
|
|
424
481
|
retriesMax: retriesMax
|
|
425
482
|
}).fail(/*#__PURE__*/function () {
|
|
426
|
-
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
483
|
+
var _ref4 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref3) {
|
|
427
484
|
var error, timeFn, currentRetry;
|
|
428
|
-
return _regenerator["default"].wrap(function
|
|
429
|
-
while (1) switch (
|
|
485
|
+
return _regenerator["default"].wrap(function (_context5) {
|
|
486
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
430
487
|
case 0:
|
|
431
488
|
error = _ref3.error, timeFn = _ref3.timeFn, currentRetry = _ref3.currentRetry;
|
|
432
|
-
_this3.logger.info("retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
|
|
433
|
-
|
|
489
|
+
_this3.logger.info("[annotation][initBoardRoom]: retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
|
|
490
|
+
_context5.next = 1;
|
|
434
491
|
return timeFn();
|
|
435
|
-
case
|
|
436
|
-
return
|
|
437
|
-
case
|
|
492
|
+
case 1:
|
|
493
|
+
return _context5.abrupt("return", true);
|
|
494
|
+
case 2:
|
|
438
495
|
case "end":
|
|
439
|
-
return
|
|
496
|
+
return _context5.stop();
|
|
440
497
|
}
|
|
441
|
-
},
|
|
498
|
+
}, _callee5);
|
|
442
499
|
}));
|
|
443
500
|
return function (_x2) {
|
|
444
501
|
return _ref4.apply(this, arguments);
|
|
445
502
|
};
|
|
446
503
|
}()).exec();
|
|
447
|
-
case
|
|
448
|
-
|
|
504
|
+
case 2:
|
|
505
|
+
_context6.next = 4;
|
|
449
506
|
break;
|
|
450
|
-
case
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
507
|
+
case 3:
|
|
508
|
+
_context6.prev = 3;
|
|
509
|
+
_t = _context6["catch"](1);
|
|
510
|
+
this.logger.error("[annotation][initBoardRoom]: join room failed");
|
|
511
|
+
case 4:
|
|
454
512
|
case "end":
|
|
455
|
-
return
|
|
513
|
+
return _context6.stop();
|
|
456
514
|
}
|
|
457
|
-
},
|
|
515
|
+
}, _callee6, this, [[1, 3]]);
|
|
458
516
|
}));
|
|
459
517
|
function _initBoardRoom() {
|
|
460
518
|
return _initBoardRoom2.apply(this, arguments);
|
|
@@ -467,6 +525,7 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
467
525
|
var userId = config.userId,
|
|
468
526
|
token = config.roomToken,
|
|
469
527
|
appId = config.appId;
|
|
528
|
+
this.logger.info("[annotation][initEngine]: init engine with config => ".concat(JSON.stringify(config)));
|
|
470
529
|
return new _fcrCore.FcrCoreEngine(_objectSpread({
|
|
471
530
|
appId: appId,
|
|
472
531
|
token: token,
|
|
@@ -474,12 +533,32 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
474
533
|
region: _fcrCore.FcrRegion.CN
|
|
475
534
|
}, _libs.engineRestConfig));
|
|
476
535
|
}
|
|
536
|
+
}, {
|
|
537
|
+
key: "_launchHandler",
|
|
538
|
+
value: function _launchHandler(appId, app) {
|
|
539
|
+
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
540
|
+
var _this$_boardView;
|
|
541
|
+
this.logger.info("[annotation][event]: launch event is triggered => ".concat(app.selfUserId));
|
|
542
|
+
app.view && ((_this$_boardView = this._boardView) === null || _this$_boardView === void 0 ? void 0 : _this$_boardView.appendChild(app.view));
|
|
543
|
+
this._initBoardStyle(app);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}, {
|
|
547
|
+
key: "_terminalHandler",
|
|
548
|
+
value: function _terminalHandler(appId, app) {
|
|
549
|
+
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
550
|
+
var _this$_boardView2;
|
|
551
|
+
this.logger.info("[annotation][event]: terminal event is triggered => ".concat(app.selfUserId));
|
|
552
|
+
app.view && this._boardView.hasChildNodes() && ((_this$_boardView2 = this._boardView) === null || _this$_boardView2 === void 0 ? void 0 : _this$_boardView2.removeChild(app.view));
|
|
553
|
+
}
|
|
554
|
+
}
|
|
477
555
|
}]);
|
|
478
556
|
}();
|
|
479
557
|
_AnnotationStore = AnnotationStore;
|
|
480
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_decorator.bound, 2, "open"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_closeDecs, 18, "close"], [_decorator.bound, 2, "setIgnore"], [_decorator.bound, 2, "toolChanged"], [_decorator.bound, 2, "
|
|
558
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_AnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_mobx.observable, 1, "currentTool"], [_decorator.bound, 2, "open"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_closeDecs, 18, "close"], [_decorator.bound, 2, "setIgnore"], [_decorator.bound, 2, "toolChanged"], [_decorator.bound, 2, "_initBoardStyle"], [_handleSetToolDecs, 2, "_handleSetTool"], [_decorator.bound, 2, "_init"], [_decorator.bound, 2, "_initBoardRoom"], [_decorator.bound, 2, "_launchHandler"], [_decorator.bound, 2, "_terminalHandler"]], []).e, 4);
|
|
481
559
|
_init_joined = _applyDecs$e[0];
|
|
482
560
|
_init_bounds = _applyDecs$e[1];
|
|
483
|
-
|
|
561
|
+
_init_currentTool = _applyDecs$e[2];
|
|
562
|
+
_initProto = _applyDecs$e[3];
|
|
484
563
|
var _default = exports["default"] = AnnotationStore;
|
|
485
564
|
var AnnotationStoreContext = exports.AnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("core-js/modules/es.object.define-property.js");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -8,16 +9,23 @@ exports["default"] = void 0;
|
|
|
8
9
|
var _mobxReact = require("mobx-react");
|
|
9
10
|
var _react = require("react");
|
|
10
11
|
var _store = require("./store");
|
|
12
|
+
require("../../modules/annotation/board-cursor.css");
|
|
13
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
15
|
var View = (0, _mobxReact.observer)(function () {
|
|
13
|
-
var
|
|
16
|
+
var _useContext = (0, _react.useContext)(_store.AnnotationStoreContext),
|
|
17
|
+
handleBoardDomLoad = _useContext.handleBoardDomLoad,
|
|
18
|
+
currentTool = _useContext.currentTool;
|
|
19
|
+
var cursorClassname = "board-widget-cursor-".concat(currentTool);
|
|
20
|
+
var boardWidgetAppCls = (0, _classnames["default"])('board-widget-app', cursorClassname.toLowerCase());
|
|
14
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22
|
+
className: boardWidgetAppCls,
|
|
15
23
|
style: {
|
|
16
24
|
width: '100vw',
|
|
17
25
|
height: '100vh',
|
|
18
26
|
overflow: 'hidden'
|
|
19
27
|
},
|
|
20
|
-
ref:
|
|
28
|
+
ref: handleBoardDomLoad
|
|
21
29
|
});
|
|
22
30
|
});
|
|
23
31
|
var _default = exports["default"] = View;
|
|
@@ -10,8 +10,6 @@ require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
|
10
10
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
11
|
require("core-js/modules/es.object.keys.js");
|
|
12
12
|
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
15
13
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
16
14
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
17
15
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
@@ -9,10 +9,6 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
9
9
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
10
10
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
11
|
require("core-js/modules/es.object.keys.js");
|
|
12
|
-
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
15
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
16
12
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
17
13
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
18
14
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
@@ -24,7 +20,8 @@ exports.AppList = void 0;
|
|
|
24
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
21
|
require("core-js/modules/es.array.map.js");
|
|
26
22
|
require("core-js/modules/es.function.name.js");
|
|
27
|
-
require("core-js/modules/
|
|
23
|
+
require("core-js/modules/es.object.to-string.js");
|
|
24
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
28
25
|
require("core-js/modules/esnext.iterator.map.js");
|
|
29
26
|
var _mobxReact = require("mobx-react");
|
|
30
27
|
var _appItem = require("./app-item");
|
|
@@ -10,9 +10,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
require("core-js/modules/es.array.concat.js");
|
|
11
11
|
require("core-js/modules/es.array.filter.js");
|
|
12
12
|
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
-
require("core-js/modules/esnext.iterator.constructor.js");
|
|
15
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
16
13
|
var _react = require("react");
|
|
17
14
|
var _useInterpreter = _interopRequireDefault(require("./useInterpreter"));
|
|
18
15
|
var _useLiveStreaming = _interopRequireDefault(require("./useLiveStreaming"));
|
|
@@ -7,7 +7,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
require("core-js/modules/es.array.map.js");
|
|
9
9
|
require("core-js/modules/es.function.name.js");
|
|
10
|
-
require("core-js/modules/
|
|
10
|
+
require("core-js/modules/es.object.to-string.js");
|
|
11
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
11
12
|
require("core-js/modules/esnext.iterator.map.js");
|
|
12
13
|
var _react = require("react");
|
|
13
14
|
var _store = require("../../store");
|
|
@@ -18,10 +18,6 @@ require("core-js/modules/es.function.name.js");
|
|
|
18
18
|
require("core-js/modules/es.object.to-string.js");
|
|
19
19
|
require("core-js/modules/es.string.includes.js");
|
|
20
20
|
require("core-js/modules/es.string.iterator.js");
|
|
21
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
22
|
-
require("core-js/modules/esnext.async-iterator.find.js");
|
|
23
|
-
require("core-js/modules/esnext.async-iterator.map.js");
|
|
24
|
-
require("core-js/modules/esnext.async-iterator.reduce.js");
|
|
25
21
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
26
22
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
27
23
|
require("core-js/modules/esnext.iterator.find.js");
|
|
@@ -10,8 +10,6 @@ require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
|
10
10
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
11
|
require("core-js/modules/es.object.keys.js");
|
|
12
12
|
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
15
13
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
16
14
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
17
15
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
@@ -10,8 +10,6 @@ require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
|
10
10
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
11
11
|
require("core-js/modules/es.object.keys.js");
|
|
12
12
|
require("core-js/modules/es.object.to-string.js");
|
|
13
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
14
|
-
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
15
13
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
16
14
|
require("core-js/modules/esnext.iterator.filter.js");
|
|
17
15
|
require("core-js/modules/esnext.iterator.for-each.js");
|