fcr-ui-scene 3.8.2 → 3.9.0-alpha
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 +2 -2
- package/lib/creator/index.js +25 -10
- package/lib/creator/provider-initializer.browser.js +28 -3
- package/lib/creator/provider-initializer.electron.js +28 -5
- package/lib/electron/app.js +26 -9
- package/lib/electron/asar-validation.js +5 -1
- package/lib/electron/env.d.ts +1 -0
- package/lib/electron/env.js +2 -2
- package/lib/electron/injections.d.ts +2 -1
- package/lib/electron/injections.js +23 -17
- package/lib/electron/ipc/type.d.ts +2 -1
- package/lib/electron/ipc/type.js +1 -0
- package/lib/electron/ipc-protocol.d.ts +2 -0
- package/lib/electron/main.js +6 -6
- package/lib/electron/plugins/main-window-display.d.ts +8 -0
- package/lib/electron/plugins/main-window-display.js +23 -0
- package/lib/electron/preload.js +2 -1
- package/lib/electron/process-manager/index.d.ts +1 -0
- package/lib/electron/process-manager/index.js +37 -0
- package/lib/electron/process-manager/state-manager.d.ts +10 -0
- package/lib/electron/process-manager/state-manager.js +46 -4
- package/lib/electron/sdk-helper.js +4 -0
- package/lib/electron/window-proxy/browser-window-proxy-factory.d.ts +7 -0
- package/lib/electron/window-proxy/browser-window-proxy-factory.js +46 -0
- package/lib/electron/window-proxy/{browser-window-proxy.d.ts → implementations/browser-window-proxy.d.ts} +3 -24
- package/lib/electron/window-proxy/implementations/browser-window-proxy.js +335 -0
- package/lib/electron/window-proxy/implementations/electron-event-broadcaster.d.ts +9 -0
- package/lib/electron/window-proxy/implementations/electron-event-broadcaster.js +32 -0
- package/lib/electron/window-proxy/implementations/electron-ipc-handler.d.ts +6 -0
- package/lib/electron/window-proxy/implementations/electron-ipc-handler.js +27 -0
- package/lib/electron/window-proxy/implementations/electron-logger.d.ts +7 -0
- package/lib/electron/window-proxy/implementations/electron-logger.js +34 -0
- package/lib/electron/window-proxy/{main-process-handler.d.ts → implementations/main-process-handler.d.ts} +16 -9
- package/lib/electron/window-proxy/{main-process-handler.js → implementations/main-process-handler.js} +111 -111
- package/lib/electron/window-proxy/interfaces.d.ts +52 -0
- package/lib/electron/window-proxy/interfaces.js +6 -0
- package/lib/fragments/annotation/cursor.css +77 -0
- package/lib/fragments/annotation/index.d.ts +2 -4
- package/lib/fragments/annotation/index.js +4 -82
- package/lib/fragments/annotation/libs.d.ts +15 -11
- package/lib/fragments/annotation/libs.js +75 -26
- package/lib/fragments/annotation/store.d.ts +23 -43
- package/lib/fragments/annotation/store.js +319 -709
- package/lib/fragments/annotation/style.css +5 -6
- package/lib/fragments/annotation/view.d.ts +1 -0
- package/lib/fragments/annotation/view.js +8 -48
- package/lib/fragments/base.js +1 -1
- package/lib/fragments/whiteboard/libs.d.ts +72 -0
- package/lib/fragments/whiteboard/libs.js +155 -0
- package/lib/fragments/whiteboard/store.d.ts +1 -4
- package/lib/fragments/whiteboard/store.js +64 -128
- package/lib/modules/action-bar/components/apps/index.js +2 -2
- package/lib/modules/action-bar/components/collapse/index.js +8 -3
- package/lib/modules/action-bar/components/{confirm-leave-meeting → confirm-end-meeting}/index.d.ts +1 -1
- package/lib/modules/action-bar/components/{confirm-leave-meeting → confirm-end-meeting}/index.js +14 -33
- package/lib/modules/action-bar/components/leave/index.js +1 -1
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +6 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.d.ts +3 -7
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +66 -42
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.d.ts +2 -2
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.js +11 -7
- package/lib/modules/action-bar/components/notification-bar/index.js +12 -70
- package/lib/modules/action-bar/components/screen-share/submenu.js +39 -2
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +1 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +10 -7
- package/lib/modules/action-bar/index.css +1 -1
- package/lib/modules/action-bar/main-scene/index.d.ts +1 -1
- package/lib/modules/action-bar/main-scene/index.js +4 -4
- package/lib/modules/action-bar/main-scene/store.base.d.ts +16 -9
- package/lib/modules/action-bar/main-scene/store.base.js +165 -94
- package/lib/modules/action-bar/type.d.ts +1 -15
- package/lib/modules/action-bar/type.js +14 -0
- package/lib/modules/action-bar/waiting-scene/view.js +1 -1
- package/lib/modules/annotation/board-cursor.css +77 -0
- package/lib/modules/annotation/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/annotation/components/color-picker/components/color.js +37 -0
- package/lib/modules/annotation/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/panel.js +108 -0
- package/lib/modules/annotation/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/picker.js +75 -0
- package/lib/modules/annotation/components/color-picker/index.d.ts +2 -0
- package/lib/modules/annotation/components/color-picker/index.js +45 -0
- package/lib/modules/annotation/components/eraser-picker.d.ts +4 -0
- package/lib/modules/annotation/components/eraser-picker.js +142 -0
- package/lib/modules/annotation/components/expansion/index.d.ts +1 -0
- package/lib/modules/annotation/components/expansion/index.js +100 -0
- package/lib/modules/annotation/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/annotation/components/extra-tool-picker.js +62 -0
- package/lib/modules/annotation/components/history.d.ts +2 -0
- package/lib/modules/annotation/components/history.js +76 -0
- package/lib/modules/annotation/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/annotation/components/icons/fold-icon.js +41 -0
- package/lib/modules/annotation/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/annotation/components/icons/move-icon.js +66 -0
- package/lib/modules/annotation/components/item/index.d.ts +1 -0
- package/lib/modules/annotation/components/item/index.js +43 -0
- package/lib/modules/annotation/components/move-handle.d.ts +5 -0
- package/lib/modules/annotation/components/move-handle.js +134 -0
- package/lib/modules/annotation/components/pen-picker.d.ts +4 -0
- package/lib/modules/annotation/components/pen-picker.js +150 -0
- package/lib/modules/annotation/components/screen-capture-picker.d.ts +4 -0
- package/lib/modules/annotation/components/screen-capture-picker.js +84 -0
- package/lib/modules/annotation/components/shape-picker.d.ts +4 -0
- package/lib/modules/annotation/components/shape-picker.js +201 -0
- package/lib/modules/annotation/hooks/index.d.ts +14 -0
- package/lib/modules/annotation/hooks/index.js +164 -0
- package/lib/modules/annotation/index.d.ts +31 -0
- package/lib/modules/annotation/index.js +152 -0
- package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/color-tool/color-panel/index.js +2 -2
- package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/color-tool/index.js +22 -9
- package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/graphic-panel/index.js +2 -3
- package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/index.js +22 -9
- package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/pen-tool/index.js +22 -9
- package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/pen-tool/pen-panel/index.js +1 -1
- package/lib/modules/annotation/standalone-toolbar/components/permission-tool/index.d.ts +1 -0
- package/lib/modules/annotation/standalone-toolbar/components/permission-tool/index.js +52 -0
- package/lib/modules/annotation/standalone-toolbar/store.d.ts +104 -0
- package/lib/modules/annotation/standalone-toolbar/store.js +618 -0
- package/{lib-es/fragments/annotation/toolbar → lib/modules/annotation/standalone-toolbar}/style.css +4 -1
- package/lib/modules/annotation/standalone-toolbar/view.js +193 -0
- package/lib/modules/annotation/store.base.d.ts +27 -0
- package/lib/modules/annotation/store.base.js +185 -0
- package/lib/modules/annotation/store.browser.d.ts +3 -0
- package/lib/modules/annotation/store.browser.js +25 -0
- package/lib/modules/annotation/store.electron.d.ts +8 -0
- package/lib/modules/annotation/store.electron.js +75 -0
- package/lib/modules/annotation/style.css +36 -0
- package/lib/modules/annotation/toolbar-store.d.ts +86 -0
- package/lib/modules/annotation/toolbar-store.js +473 -0
- package/lib/modules/annotation/type.d.ts +7 -0
- package/lib/modules/annotation/type.js +6 -0
- package/lib/modules/annotation/view.d.ts +5 -0
- package/lib/modules/annotation/view.js +107 -0
- package/lib/modules/chat/chat-room-store.d.ts +8 -1
- package/lib/modules/chat/chat-room-store.js +152 -72
- package/lib/modules/chat/components/message-list/index.js +123 -93
- package/lib/modules/chat/components/message-list/message-item/index.js +89 -67
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.js +6 -8
- package/lib/modules/chat/index.css +1 -9
- package/lib/modules/chat/store.js +7 -5
- package/lib/modules/chat/view.js +4 -9
- package/lib/modules/components/annotation-menu/index.d.ts +5 -3
- package/lib/modules/components/annotation-menu/index.js +29 -34
- package/lib/modules/components/apps/index.css +3 -2
- package/lib/modules/components/caption-menu/translation-setting-options.js +2 -2
- package/lib/modules/components/confirm-wrapper/index.css +48 -0
- package/lib/modules/components/confirm-wrapper/index.d.ts +25 -0
- package/lib/modules/components/confirm-wrapper/index.js +87 -0
- package/lib/modules/components/control-bar/index.d.ts +40 -8
- package/lib/modules/components/control-bar/index.js +350 -200
- package/lib/modules/components/device-control/components/audio-menu/index.js +3 -2
- package/lib/modules/components/device-control/components/video-menu/index.js +5 -3
- package/lib/modules/components/device-control/store.base.d.ts +5 -0
- package/lib/modules/components/device-control/store.base.js +17 -1
- package/lib/modules/components/leave-meeting/index.css +21 -0
- package/lib/modules/components/leave-meeting/index.d.ts +0 -2
- package/lib/modules/components/leave-meeting/index.js +63 -103
- package/lib/modules/components/leave-meeting/portal.d.ts +0 -1
- package/lib/modules/components/leave-meeting/portal.js +4 -6
- package/lib/modules/components/leave-meeting/store.base.d.ts +3 -4
- package/lib/modules/components/leave-meeting/store.base.js +49 -55
- package/lib/modules/components/leave-meeting/style.css +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -1
- package/lib/modules/components/member-window/components/member-actions/provider.js +1 -1
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +3 -3
- package/lib/modules/components/security-menu/store.js +7 -9
- package/lib/modules/components/tab-frame/index.css +2 -2
- package/lib/modules/connection-gateway/components/phone/index.js +1 -1
- package/lib/modules/connection-gateway/store.js +6 -8
- package/lib/modules/control-bar/components/annotation-button/index.d.ts +11 -0
- package/lib/modules/control-bar/components/annotation-button/index.js +51 -0
- package/lib/modules/control-bar/components/apps-popover/index.css +3 -0
- package/lib/modules/control-bar/components/apps-popover/index.d.ts +1 -0
- package/lib/modules/control-bar/components/apps-popover/index.js +2 -0
- package/lib/modules/control-bar/components/carmera/index.js +1 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +14 -20
- package/lib/modules/control-bar/components/microphone/index.js +2 -2
- package/lib/modules/control-bar/hooks.js +1 -1
- package/lib/modules/control-bar/index.css +11 -0
- package/lib/modules/control-bar/store.d.ts +20 -5
- package/lib/modules/control-bar/store.js +190 -59
- package/lib/modules/control-bar/view.js +72 -39
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -9
- package/lib/modules/device-pretest/audio-preview/speaker-detection.js +1 -1
- package/lib/modules/device-pretest/index.js +1 -1
- package/lib/modules/device-pretest/settings/beauty.js +1 -1
- package/lib/modules/device-pretest/settings/video-effect.d.ts +2 -0
- package/lib/modules/device-pretest/settings/video-effect.js +27 -12
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
- package/lib/modules/dialog/components/confirm/index.css +0 -18
- package/lib/modules/dialog/components/confirm/index.d.ts +1 -0
- package/lib/modules/dialog/components/confirm/index.js +2 -2
- package/lib/modules/dialog/components/dialog-container/index.css +3 -4
- package/lib/modules/dialog/components/dialog-container/index.d.ts +6 -21
- package/lib/modules/dialog/components/dialog-container/index.js +80 -132
- package/lib/modules/dialog/components/normal-window/index.d.ts +8 -20
- package/lib/modules/dialog/components/normal-window/index.js +14 -34
- package/lib/modules/dialog/dialogConfig/browser.d.ts +12 -0
- package/lib/modules/dialog/dialogConfig/browser.js +11 -0
- package/lib/modules/dialog/dialogConfig/electron.d.ts +4 -0
- package/lib/modules/dialog/dialogConfig/electron.js +15 -0
- package/lib/modules/dialog/dialogs/annotation-mask/index.d.ts +8 -0
- package/lib/modules/dialog/dialogs/annotation-mask/index.js +41 -0
- package/lib/modules/dialog/dialogs/annotation-tool/index.d.ts +5 -4
- package/lib/modules/dialog/dialogs/annotation-tool/index.js +19 -35
- package/lib/modules/dialog/dialogs/caption/index.d.ts +4 -16
- package/lib/modules/dialog/dialogs/caption/index.js +25 -19
- package/lib/modules/dialog/dialogs/chat/index.d.ts +4 -18
- package/lib/modules/dialog/dialogs/chat/index.js +33 -54
- package/lib/modules/dialog/dialogs/confirm/index.css +2 -13
- package/lib/modules/dialog/dialogs/confirm/index.d.ts +2 -17
- package/lib/modules/dialog/dialogs/confirm/index.js +5 -7
- package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +5 -16
- package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.js +4 -24
- package/lib/modules/dialog/dialogs/connection-gateway/index.d.ts +4 -20
- package/lib/modules/dialog/dialogs/connection-gateway/index.js +6 -29
- package/lib/modules/dialog/dialogs/control-bar/index.d.ts +2 -16
- package/lib/modules/dialog/dialogs/control-bar/index.js +4 -6
- package/lib/modules/dialog/dialogs/control-bar-leave-meeting/index.d.ts +4 -14
- package/lib/modules/dialog/dialogs/control-bar-leave-meeting/index.js +3 -21
- package/lib/modules/dialog/dialogs/device-setting/index.d.ts +4 -13
- package/lib/modules/dialog/dialogs/device-setting/index.js +4 -20
- package/lib/modules/dialog/dialogs/end-meeting-notice/index.d.ts +8 -0
- package/lib/modules/dialog/dialogs/{end-meeting → end-meeting-notice}/index.js +4 -14
- package/lib/modules/dialog/dialogs/interpreter/index.d.ts +4 -14
- package/lib/modules/dialog/dialogs/interpreter/index.js +33 -24
- package/lib/modules/dialog/dialogs/invite/index.d.ts +4 -18
- package/lib/modules/dialog/dialogs/invite/index.js +25 -24
- package/lib/modules/dialog/dialogs/live-streaming/index.d.ts +4 -8
- package/lib/modules/dialog/dialogs/live-streaming/index.js +7 -11
- package/lib/modules/dialog/dialogs/mute-all/index.d.ts +4 -15
- package/lib/modules/dialog/dialogs/mute-all/index.js +4 -20
- package/lib/modules/dialog/dialogs/participant/index.d.ts +4 -18
- package/lib/modules/dialog/dialogs/participant/index.js +31 -31
- package/lib/modules/dialog/dialogs/rename/index.d.ts +2 -14
- package/lib/modules/dialog/dialogs/rename/index.js +2 -13
- package/lib/modules/dialog/dialogs/sample-dialog/index.d.ts +2 -13
- package/lib/modules/dialog/dialogs/sample-dialog/index.js +2 -2
- package/lib/modules/dialog/dialogs/share-screen-selection/index.d.ts +2 -14
- package/lib/modules/dialog/dialogs/share-screen-selection/index.js +3 -12
- package/lib/modules/dialog/dialogs/sub-window/index.d.ts +2 -17
- package/lib/modules/dialog/dialogs/sub-window/index.js +4 -3
- package/lib/modules/dialog/dialogs/subtitles-history/index.d.ts +4 -19
- package/lib/modules/dialog/dialogs/subtitles-history/index.js +32 -25
- package/lib/modules/dialog/dialogs/system-preference/index.css +3 -2
- package/lib/modules/dialog/dialogs/system-preference/index.d.ts +5 -28
- package/lib/modules/dialog/dialogs/system-preference/index.js +13 -13
- package/lib/modules/dialog/dialogs/toast/index.d.ts +2 -16
- package/lib/modules/dialog/dialogs/toast/index.js +5 -5
- package/lib/modules/dialog/dialogs/video-window/index.d.ts +2 -18
- package/lib/modules/dialog/dialogs/video-window/index.js +4 -4
- package/lib/modules/dialog/dialogs/whiteboard/index.d.ts +2 -18
- package/lib/modules/dialog/dialogs/whiteboard/index.js +2 -2
- package/lib/modules/dialog/dialogs/widget/index.d.ts +4 -14
- package/lib/modules/dialog/dialogs/widget/index.js +22 -26
- package/lib/modules/dialog/index.css +4 -11
- package/lib/modules/dialog/level-config.d.ts +1 -0
- package/lib/modules/dialog/level-config.js +1 -0
- package/lib/modules/dialog/store.base.js +0 -3
- package/lib/modules/dialog/store.electron.d.ts +1 -0
- package/lib/modules/dialog/store.electron.js +16 -9
- package/lib/modules/dialog/type.d.ts +3 -1
- package/lib/modules/dialog/view.js +25 -1
- package/lib/modules/dialog/web-dialog-wrapper.d.ts +3 -0
- package/lib/modules/dialog/web-dialog-wrapper.js +154 -0
- package/lib/modules/event-toast/index.css +5 -2
- package/lib/modules/event-toast/store.browser.js +1 -1
- package/lib/modules/event-toast/store.electron.js +1 -1
- package/lib/modules/interpreter/index.css +1 -2
- package/lib/modules/interpreter/store.js +22 -19
- package/lib/modules/interpreter/utils.js +1 -1
- package/lib/modules/invite/components/pstn-invite.js +5 -5
- package/lib/modules/invite/store.d.ts +2 -2
- package/lib/modules/invite/store.js +1 -1
- package/lib/modules/layout/components/Aside.js +1 -1
- package/lib/modules/layout/components/Carousel.js +1 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +14 -4
- package/lib/modules/layout/components/Gallery.js +1 -1
- package/lib/modules/layout/index.css +0 -31
- package/lib/modules/layout/store.base.d.ts +9 -15
- package/lib/modules/layout/store.base.js +69 -198
- package/lib/modules/layout/store.browser.d.ts +2 -1
- package/lib/modules/layout/store.browser.js +62 -2
- package/lib/modules/layout/store.electron.d.ts +1 -3
- package/lib/modules/layout/store.electron.js +10 -28
- package/lib/modules/layout/view.js +1 -3
- package/lib/modules/live-streaming/index.dev.js +1 -1
- package/lib/modules/live-streaming/store.js +3 -4
- package/lib/modules/participant/components/confirm-input/index.css +15 -0
- package/lib/modules/participant/components/confirm-input/index.js +10 -13
- package/lib/modules/participant/components/mute-all/index.css +34 -0
- package/lib/modules/participant/components/mute-all/index.d.ts +1 -0
- package/lib/modules/participant/components/mute-all/index.js +21 -15
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +16 -2
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.d.ts +2 -1
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.js +3 -1
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +3 -2
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +1 -1
- package/lib/modules/participant/index.css +0 -16
- package/lib/modules/participant/store.base.d.ts +18 -5
- package/lib/modules/participant/store.base.js +219 -127
- package/lib/modules/participant/store.browser.d.ts +2 -1
- package/lib/modules/participant/store.browser.js +2 -2
- package/lib/modules/participant/store.electron.d.ts +2 -1
- package/lib/modules/participant/store.electron.js +2 -2
- package/lib/modules/pc-audio-connect/waiting-scene/index.js +6 -1
- package/lib/modules/phone-audio-connect/store.js +1 -1
- package/lib/modules/phone-audio-connect/view.js +1 -1
- package/lib/modules/secondary-window/index.d.ts +14 -7
- package/lib/modules/secondary-window/index.js +51 -25
- package/lib/modules/secondary-window/store.d.ts +4 -2
- package/lib/modules/secondary-window/store.js +39 -8
- package/lib/modules/secondary-window/type.d.ts +16 -25
- package/lib/modules/secondary-window/type.js +1 -0
- package/lib/modules/secondary-window/view.js +59 -58
- package/lib/modules/setting/audio-settings/audio-settings.js +2 -2
- package/lib/modules/setting/audio-whiteList/audio-device-adaptation.js +2 -2
- package/lib/modules/setting/audio-whiteList/audio-whiteList-manager.js +1 -1
- package/lib/modules/setting/caption_and_transcribing/index.js +1 -1
- package/lib/modules/setting/general-settings/general-settings.js +4 -4
- package/lib/modules/setting/index.css +2 -3
- package/lib/modules/setting/index.d.ts +1 -2
- package/lib/modules/setting/index.js +3 -10
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
- package/lib/modules/setting/state/index.js +1 -1
- package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib/modules/setting/store.base.d.ts +11 -9
- package/lib/modules/setting/store.base.js +103 -88
- package/lib/modules/setting/store.electron.d.ts +2 -1
- package/lib/modules/setting/store.electron.js +19 -1
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/type.d.ts +1 -9
- package/lib/modules/setting/video-settings/video-settings-basic.js +1 -1
- package/lib/modules/setting/video-settings/video-settings.js +11 -7
- package/lib/modules/setting/view.js +1 -1
- package/lib/modules/share-screen/components/control-bar/index.js +0 -86
- package/lib/modules/share-screen/components/selection/index.js +3 -1
- package/lib/modules/share-screen/store.base.d.ts +1 -1
- package/lib/modules/share-screen/store.base.js +10 -14
- package/lib/modules/share-screen/store.electron.d.ts +4 -0
- package/lib/modules/share-screen/store.electron.js +108 -34
- package/lib/modules/state-bar/layout-config.js +1 -1
- package/lib/modules/state-bar/live-streaming-state.js +6 -7
- package/lib/modules/state-bar/main-scene/store.browser.js +1 -1
- package/lib/modules/state-bar/main-scene/store.electron.js +1 -1
- package/lib/modules/state-bar/meeting-details.js +14 -21
- package/lib/modules/state-bar/meeting-network-state.css +5 -1
- package/lib/modules/state-bar/meeting-network-state.js +7 -1
- package/lib/modules/state-bar/meeting-time.js +1 -1
- package/lib/modules/state-bar/network-quality.js +1 -1
- package/lib/modules/state-bar/recording.js +1 -1
- package/lib/modules/state-bar/store.base.d.ts +3 -3
- package/lib/modules/state-bar/store.base.js +15 -24
- package/lib/modules/state-bar/view.js +6 -7
- package/lib/modules/subtitles-history/components/list-item.js +6 -1
- package/lib/modules/subtitles-history/index.css +2 -5
- package/lib/modules/subtitles-history/store.base.js +24 -12
- package/lib/modules/subtitles-history/store.electron.js +8 -2
- package/lib/modules/subtitles-history/view.js +7 -5
- package/lib/modules/toast-manager/index.d.ts +8 -0
- package/lib/modules/toast-manager/index.js +58 -0
- package/lib/modules/toast-manager/store.d.ts +28 -0
- package/lib/modules/toast-manager/store.js +391 -0
- package/lib/modules/toast-manager/toast-params.d.ts +7 -0
- package/lib/modules/toast-manager/toast-params.js +89 -0
- package/lib/modules/toast-manager/type.d.ts +112 -0
- package/lib/modules/toast-manager/type.js +337 -0
- package/lib/modules/video-window/store.d.ts +2 -2
- package/lib/modules/video-window/store.js +28 -50
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +0 -6
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +25 -14
- package/lib/modules/whiteboard/store.js +10 -9
- package/lib/modules/whiteboard/view.js +0 -1
- package/lib/modules/widget/store.electron.d.ts +0 -4
- package/lib/modules/widget/store.electron.js +3 -38
- package/lib/modules/widget/view.js +1 -1
- package/lib/modules/widget/web-widget.d.ts +1 -1
- package/lib/object-manager.d.ts +2 -0
- package/lib/object-manager.js +2 -0
- package/lib/plugins/multi-lang-plugin.js +1 -1
- package/lib/providers/ability-provider.d.ts +33 -1
- package/lib/providers/ability-provider.js +29 -1
- package/lib/providers/annotation/provider.base.d.ts +39 -0
- package/lib/providers/annotation/provider.base.js +270 -0
- package/lib/providers/annotation/provider.browser.d.ts +3 -0
- package/lib/providers/annotation/provider.browser.js +25 -0
- package/lib/providers/annotation/provider.electron.d.ts +34 -0
- package/lib/providers/annotation/provider.electron.js +231 -0
- package/lib/providers/annotation/standalone-toolbar-control/index.d.ts +26 -0
- package/lib/{fragments/annotation/toolbar/store.js → providers/annotation/standalone-toolbar-control/index.js} +103 -175
- package/lib/providers/annotation/toolbar-control/index.d.ts +31 -0
- package/lib/providers/annotation/toolbar-control/index.js +205 -0
- package/lib/providers/annotation/type.d.ts +64 -21
- package/lib/providers/app-list-provider.d.ts +4 -1
- package/lib/providers/app-list-provider.js +13 -7
- package/lib/providers/board-share/bar-control/base.d.ts +6 -8
- package/lib/providers/board-share/bar-control/base.js +7 -36
- package/lib/providers/board-share/bar-control/browser.d.ts +4 -1
- package/lib/providers/board-share/bar-control/browser.js +76 -3
- package/lib/providers/board-share/bar-control/electron.d.ts +4 -6
- package/lib/providers/board-share/bar-control/electron.js +36 -12
- package/lib/providers/board-share/provider.base.d.ts +11 -8
- package/lib/providers/board-share/provider.base.js +72 -13
- package/lib/providers/board-share/type.d.ts +11 -12
- package/lib/providers/device-privilege-provider.d.ts +5 -4
- package/lib/providers/device-privilege-provider.js +85 -62
- package/lib/providers/device-provider.d.ts +32 -1
- package/lib/providers/device-provider.js +412 -161
- package/lib/providers/device-stream-provider.d.ts +3 -3
- package/lib/providers/device-stream-provider.js +37 -111
- package/lib/providers/dialog/provider.electron.js +6 -1
- package/lib/providers/interpreter-provider.js +5 -5
- package/lib/providers/message/provider.d.ts +3 -1
- package/lib/providers/message/provider.js +12 -0
- package/lib/providers/message/type.d.ts +15 -0
- package/lib/providers/mouse-detect/provider.js +2 -2
- package/lib/providers/mouse-detect/struct.d.ts +2 -1
- package/lib/providers/mouse-detect/struct.js +1 -0
- package/lib/providers/multi-display-provider.d.ts +1 -0
- package/lib/providers/multi-display-provider.js +13 -0
- package/lib/providers/phone-audio-provider.d.ts +15 -0
- package/lib/providers/phone-audio-provider.js +17 -10
- package/lib/providers/privilege-provider.d.ts +15 -15
- package/lib/providers/room-provider/room-provider.d.ts +23 -11
- package/lib/providers/room-provider/room-provider.js +93 -199
- package/lib/providers/room-provider/waiting-room-control-manager.d.ts +2 -2
- package/lib/providers/room-provider/waiting-room-control-manager.js +2 -2
- package/lib/providers/screen-share/provider.base.d.ts +1 -0
- package/lib/providers/screen-share/provider.base.js +6 -1
- package/lib/providers/screen-share/provider.browser.js +13 -9
- package/lib/providers/screen-share/provider.electron.d.ts +1 -1
- package/lib/providers/screen-share/provider.electron.js +54 -44
- package/lib/providers/screen-share/strategy/electron.js +18 -3
- package/lib/providers/screen-share/stream-state-sync.d.ts +1 -1
- package/lib/providers/screen-share/stream-state-sync.js +4 -4
- package/lib/providers/screen-share/type.d.ts +9 -1
- package/lib/providers/session-provider.d.ts +1 -1
- package/lib/providers/stt-provider/stt-provider.d.ts +1 -1
- package/lib/providers/stt-provider/stt-provider.js +40 -77
- package/lib/providers/stt-provider/type.d.ts +5 -3
- package/lib/providers/stt-provider/type.js +4 -2
- package/lib/providers/user-audio-volume-provider.d.ts +47 -0
- package/lib/providers/user-audio-volume-provider.js +319 -0
- package/lib/providers/window/provider.d.ts +1 -1
- package/lib/providers/window/provider.js +23 -12
- package/lib/providers/window/renderer-window.d.ts +8 -2
- package/lib/providers/window/renderer-window.js +118 -33
- package/lib/providers/window/type.d.ts +1 -3
- package/lib/runtime.d.ts +12 -13
- package/lib/scenes/main-scene.js +98 -69
- package/lib/scenes/waiting-scene.js +4 -4
- package/lib/shared-data/member-data.d.ts +0 -9
- package/lib/shared-data/member-data.js +35 -61
- package/lib/shared-data/pin-data.d.ts +3 -2
- package/lib/shared-data/pin-data.js +8 -11
- package/lib/shared-data/setting.js +1 -1
- package/lib/shared-data/user-audio-volume.d.ts +19 -0
- package/lib/shared-data/user-audio-volume.js +104 -0
- package/lib/shared-data/video-window.js +49 -60
- package/lib/translations/enUS.d.ts +10 -0
- package/lib/translations/enUS.js +13 -3
- package/lib/translations/zhCN.d.ts +10 -0
- package/lib/translations/zhCN.js +12 -2
- package/lib/type.d.ts +27 -19
- package/lib/type.js +20 -2
- package/lib/ui-manager.js +1 -1
- package/lib/ui-scene-switch.d.ts +1 -0
- package/lib/ui-scene-switch.js +197 -87
- package/lib/utilities/browser-api.d.ts +0 -1
- package/lib/utilities/browser-api.js +0 -42
- package/lib/utilities/constant.d.ts +4 -4
- package/lib/utilities/constant.js +4 -5
- package/lib/utilities/default-config.d.ts +2 -8
- package/lib/utilities/default-config.js +8 -48
- package/lib/utilities/dialog-utils.js +1 -2
- package/lib/utilities/focus-helper.js +2 -2
- package/lib/utilities/logger.d.ts +1 -2
- package/lib/utilities/logger.js +12 -40
- package/lib/utilities/package-info.d.ts +1 -2
- package/lib/utilities/package-info.js +5 -6
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +7 -1
- package/lib/utilities/shared-storage.d.ts +2 -3
- package/lib/utilities/shared-storage.js +15 -11
- package/lib/utilities/tools.d.ts +1 -44
- package/lib/utilities/tools.js +28 -193
- package/lib/utilities/validate-params.js +3 -5
- package/lib-es/base.js +2 -2
- package/lib-es/creator/index.js +28 -12
- package/lib-es/creator/provider-initializer.browser.js +28 -3
- package/lib-es/creator/provider-initializer.electron.js +28 -5
- package/lib-es/electron/app.js +24 -7
- package/lib-es/electron/asar-validation.js +5 -1
- package/lib-es/electron/env.js +1 -1
- package/lib-es/electron/injections.js +22 -17
- package/lib-es/electron/ipc/type.js +1 -0
- package/lib-es/electron/main.js +3 -2
- package/lib-es/electron/plugins/main-window-display.js +16 -0
- package/lib-es/electron/preload.js +3 -2
- package/lib-es/electron/process-manager/index.js +37 -0
- package/lib-es/electron/process-manager/state-manager.js +46 -4
- package/lib-es/electron/sdk-helper.js +4 -0
- package/lib-es/electron/window-proxy/browser-window-proxy-factory.js +38 -0
- package/lib-es/electron/window-proxy/implementations/browser-window-proxy.js +328 -0
- package/lib-es/electron/window-proxy/implementations/electron-event-broadcaster.js +24 -0
- package/lib-es/electron/window-proxy/implementations/electron-ipc-handler.js +19 -0
- package/lib-es/electron/window-proxy/implementations/electron-logger.js +26 -0
- package/lib-es/electron/window-proxy/{main-process-handler.js → implementations/main-process-handler.js} +110 -113
- package/lib-es/electron/window-proxy/interfaces.js +1 -0
- package/lib-es/fragments/annotation/cursor.css +77 -0
- package/lib-es/fragments/annotation/index.js +5 -83
- package/lib-es/fragments/annotation/libs.js +63 -14
- package/lib-es/fragments/annotation/store.js +321 -711
- package/lib-es/fragments/annotation/style.css +5 -6
- package/lib-es/fragments/annotation/view.js +9 -48
- package/lib-es/fragments/base.js +1 -1
- package/lib-es/fragments/whiteboard/libs.js +147 -0
- package/lib-es/fragments/whiteboard/store.js +65 -129
- package/lib-es/modules/action-bar/components/apps/index.js +2 -2
- package/lib-es/modules/action-bar/components/collapse/index.js +8 -3
- package/lib-es/modules/action-bar/components/{confirm-leave-meeting → confirm-end-meeting}/index.js +14 -33
- package/lib-es/modules/action-bar/components/leave/index.js +1 -1
- package/lib-es/modules/action-bar/components/notification-bar/components/interpreter/index.css +6 -0
- package/lib-es/modules/action-bar/components/notification-bar/components/interpreter/index.js +66 -42
- package/lib-es/modules/action-bar/components/notification-bar/components/virtual-image/index.js +11 -7
- package/lib-es/modules/action-bar/components/notification-bar/index.js +13 -71
- package/lib-es/modules/action-bar/components/screen-share/submenu.js +39 -2
- package/lib-es/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +1 -0
- package/lib-es/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +11 -8
- package/lib-es/modules/action-bar/index.css +1 -1
- package/lib-es/modules/action-bar/main-scene/index.js +4 -4
- package/lib-es/modules/action-bar/main-scene/store.base.js +165 -94
- package/lib-es/modules/action-bar/type.js +15 -0
- package/lib-es/modules/action-bar/waiting-scene/view.js +1 -1
- package/lib-es/modules/annotation/board-cursor.css +77 -0
- package/lib-es/modules/annotation/components/color-picker/components/color.js +29 -0
- package/lib-es/modules/annotation/components/color-picker/components/panel.js +100 -0
- package/lib-es/modules/annotation/components/color-picker/components/picker.js +67 -0
- package/lib-es/modules/annotation/components/color-picker/index.js +38 -0
- package/lib-es/modules/annotation/components/eraser-picker.js +134 -0
- package/lib-es/modules/annotation/components/expansion/index.js +85 -0
- package/lib-es/modules/annotation/components/extra-tool-picker.js +46 -0
- package/lib-es/modules/annotation/components/history.js +68 -0
- package/lib-es/modules/annotation/components/icons/fold-icon.js +33 -0
- package/lib-es/modules/annotation/components/icons/move-icon.js +59 -0
- package/lib-es/modules/annotation/components/item/index.js +35 -0
- package/lib-es/modules/annotation/components/move-handle.js +127 -0
- package/lib-es/modules/annotation/components/pen-picker.js +142 -0
- package/lib-es/modules/annotation/components/screen-capture-picker.js +77 -0
- package/lib-es/modules/annotation/components/shape-picker.js +193 -0
- package/lib-es/modules/annotation/hooks/index.js +156 -0
- package/lib-es/modules/annotation/index.js +144 -0
- package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/color-tool/color-panel/index.js +2 -2
- package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/color-tool/index.js +23 -10
- package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/graphic-panel/index.js +2 -3
- package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/index.js +23 -10
- package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/pen-tool/index.js +23 -10
- package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/pen-tool/pen-panel/index.js +2 -2
- package/lib-es/modules/annotation/standalone-toolbar/components/permission-tool/index.js +44 -0
- package/lib-es/modules/annotation/standalone-toolbar/store.js +611 -0
- package/{lib/fragments/annotation/toolbar → lib-es/modules/annotation/standalone-toolbar}/style.css +4 -1
- package/lib-es/modules/annotation/standalone-toolbar/view.js +186 -0
- package/lib-es/modules/annotation/store.base.js +178 -0
- package/lib-es/modules/annotation/store.browser.js +17 -0
- package/lib-es/modules/annotation/store.electron.js +67 -0
- package/lib-es/modules/annotation/style.css +36 -0
- package/lib-es/modules/annotation/toolbar-store.js +466 -0
- package/lib-es/modules/annotation/type.js +1 -0
- package/lib-es/modules/annotation/view.js +99 -0
- package/lib-es/modules/chat/chat-room-store.js +152 -72
- package/lib-es/modules/chat/components/message-list/index.js +123 -89
- package/lib-es/modules/chat/components/message-list/message-item/index.js +89 -67
- package/lib-es/modules/chat/components/message-list/scroll-bottom-button/index.js +6 -8
- package/lib-es/modules/chat/index.css +1 -9
- package/lib-es/modules/chat/store.js +7 -5
- package/lib-es/modules/chat/view.js +2 -7
- package/lib-es/modules/components/annotation-menu/index.js +28 -33
- package/lib-es/modules/components/apps/index.css +3 -2
- package/lib-es/modules/components/caption-menu/translation-setting-options.js +2 -2
- package/lib-es/modules/components/confirm-wrapper/index.css +48 -0
- package/lib-es/modules/components/confirm-wrapper/index.js +80 -0
- package/lib-es/modules/components/control-bar/index.js +349 -199
- package/lib-es/modules/components/device-control/components/audio-menu/index.js +3 -2
- package/lib-es/modules/components/device-control/components/video-menu/index.js +5 -3
- package/lib-es/modules/components/device-control/store.base.js +17 -1
- package/lib-es/modules/components/leave-meeting/index.css +21 -0
- package/lib-es/modules/components/leave-meeting/index.js +63 -102
- package/lib-es/modules/components/leave-meeting/portal.js +3 -5
- package/lib-es/modules/components/leave-meeting/store.base.js +49 -55
- package/lib-es/modules/components/leave-meeting/style.css +0 -1
- package/lib-es/modules/components/member-window/components/member-actions/components/more-actions.js +2 -1
- package/lib-es/modules/components/member-window/components/member-actions/provider.js +1 -1
- package/lib-es/modules/components/member-window/index.js +3 -3
- package/lib-es/modules/components/security-menu/store.js +7 -9
- package/lib-es/modules/components/tab-frame/index.css +2 -2
- package/lib-es/modules/connection-gateway/components/phone/index.js +1 -1
- package/lib-es/modules/connection-gateway/store.js +6 -8
- package/lib-es/modules/control-bar/components/annotation-button/index.js +43 -0
- package/lib-es/modules/control-bar/components/apps-popover/index.css +3 -0
- package/lib-es/modules/control-bar/components/apps-popover/index.js +2 -0
- package/lib-es/modules/control-bar/components/carmera/index.js +1 -1
- package/lib-es/modules/control-bar/components/meeting-details/index.js +10 -16
- package/lib-es/modules/control-bar/components/microphone/index.js +2 -2
- package/lib-es/modules/control-bar/hooks.js +1 -1
- package/lib-es/modules/control-bar/index.css +11 -0
- package/lib-es/modules/control-bar/store.js +184 -53
- package/lib-es/modules/control-bar/view.js +72 -39
- package/lib-es/modules/device-pretest/audio-preview/microphone-detection.js +4 -10
- package/lib-es/modules/device-pretest/audio-preview/speaker-detection.js +1 -1
- package/lib-es/modules/device-pretest/index.js +1 -1
- package/lib-es/modules/device-pretest/settings/beauty.js +1 -1
- package/lib-es/modules/device-pretest/settings/video-effect.js +27 -12
- package/lib-es/modules/device-pretest/settings/video-settings-basic.js +1 -1
- package/lib-es/modules/device-pretest/settings/virtual-background-setting.js +1 -1
- package/lib-es/modules/dialog/components/confirm/index.css +0 -18
- package/lib-es/modules/dialog/components/confirm/index.js +2 -1
- package/lib-es/modules/dialog/components/dialog-container/index.css +3 -4
- package/lib-es/modules/dialog/components/dialog-container/index.js +80 -126
- package/lib-es/modules/dialog/components/normal-window/index.js +15 -35
- package/lib-es/modules/dialog/dialogConfig/browser.js +4 -0
- package/lib-es/modules/dialog/dialogConfig/electron.js +8 -0
- package/lib-es/modules/dialog/dialogs/annotation-mask/index.js +34 -0
- package/lib-es/modules/dialog/dialogs/annotation-tool/index.js +18 -34
- package/lib-es/modules/dialog/dialogs/caption/index.js +24 -18
- package/lib-es/modules/dialog/dialogs/chat/index.js +32 -53
- package/lib-es/modules/dialog/dialogs/confirm/index.css +2 -13
- package/lib-es/modules/dialog/dialogs/confirm/index.js +4 -6
- package/lib-es/modules/dialog/dialogs/confirm-leave-meeting/index.js +3 -23
- package/lib-es/modules/dialog/dialogs/connection-gateway/index.js +5 -28
- package/lib-es/modules/dialog/dialogs/control-bar/index.js +3 -5
- package/lib-es/modules/dialog/dialogs/control-bar-leave-meeting/index.js +2 -20
- package/lib-es/modules/dialog/dialogs/device-setting/index.js +3 -19
- package/lib-es/modules/dialog/dialogs/{end-meeting → end-meeting-notice}/index.js +3 -13
- package/lib-es/modules/dialog/dialogs/interpreter/index.js +32 -23
- package/lib-es/modules/dialog/dialogs/invite/index.js +24 -23
- package/lib-es/modules/dialog/dialogs/live-streaming/index.js +6 -10
- package/lib-es/modules/dialog/dialogs/mute-all/index.js +3 -19
- package/lib-es/modules/dialog/dialogs/participant/index.js +31 -30
- package/lib-es/modules/dialog/dialogs/rename/index.js +1 -12
- package/lib-es/modules/dialog/dialogs/sample-dialog/index.js +1 -1
- package/lib-es/modules/dialog/dialogs/share-screen-selection/index.js +2 -11
- package/lib-es/modules/dialog/dialogs/sub-window/index.js +3 -2
- package/lib-es/modules/dialog/dialogs/subtitles-history/index.js +31 -24
- package/lib-es/modules/dialog/dialogs/system-preference/index.css +3 -2
- package/lib-es/modules/dialog/dialogs/system-preference/index.js +12 -12
- package/lib-es/modules/dialog/dialogs/toast/index.js +4 -4
- package/lib-es/modules/dialog/dialogs/video-window/index.js +3 -3
- package/lib-es/modules/dialog/dialogs/whiteboard/index.js +1 -1
- package/lib-es/modules/dialog/dialogs/widget/index.js +21 -25
- package/lib-es/modules/dialog/index.css +4 -11
- package/lib-es/modules/dialog/level-config.js +1 -0
- package/lib-es/modules/dialog/store.base.js +0 -3
- package/lib-es/modules/dialog/store.electron.js +16 -9
- package/lib-es/modules/dialog/view.js +25 -1
- package/lib-es/modules/dialog/web-dialog-wrapper.js +147 -0
- package/lib-es/modules/event-toast/index.css +5 -2
- package/lib-es/modules/event-toast/store.browser.js +1 -1
- package/lib-es/modules/event-toast/store.electron.js +1 -1
- package/lib-es/modules/interpreter/index.css +1 -2
- package/lib-es/modules/interpreter/store.js +22 -19
- package/lib-es/modules/interpreter/utils.js +1 -1
- package/lib-es/modules/invite/components/pstn-invite.js +4 -4
- package/lib-es/modules/invite/store.js +1 -1
- package/lib-es/modules/layout/components/Aside.js +1 -1
- package/lib-es/modules/layout/components/Carousel.js +1 -1
- package/lib-es/modules/layout/components/CommonVideoRenderer.js +15 -5
- package/lib-es/modules/layout/components/Gallery.js +1 -1
- package/lib-es/modules/layout/index.css +0 -31
- package/lib-es/modules/layout/store.base.js +71 -200
- package/lib-es/modules/layout/store.browser.js +62 -1
- package/lib-es/modules/layout/store.electron.js +10 -28
- package/lib-es/modules/layout/view.js +1 -3
- package/lib-es/modules/live-streaming/index.dev.js +1 -1
- package/lib-es/modules/live-streaming/store.js +3 -4
- package/lib-es/modules/participant/components/confirm-input/index.css +15 -0
- package/lib-es/modules/participant/components/confirm-input/index.js +10 -13
- package/lib-es/modules/participant/components/mute-all/index.css +34 -0
- package/lib-es/modules/participant/components/mute-all/index.js +21 -15
- package/lib-es/modules/participant/components/participants/components/footer/components/drop-menu/index.js +17 -3
- package/lib-es/modules/participant/components/participants/components/footer/components/drop-menu/util.js +3 -1
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +3 -2
- package/lib-es/modules/participant/components/participants/components/render-user/components/user-action/index.js +1 -1
- package/lib-es/modules/participant/index.css +0 -16
- package/lib-es/modules/participant/store.base.js +219 -127
- package/lib-es/modules/participant/store.browser.js +2 -2
- package/lib-es/modules/participant/store.electron.js +2 -2
- package/lib-es/modules/pc-audio-connect/waiting-scene/index.js +6 -1
- package/lib-es/modules/phone-audio-connect/store.js +1 -1
- package/lib-es/modules/phone-audio-connect/view.js +1 -1
- package/lib-es/modules/secondary-window/index.js +51 -25
- package/lib-es/modules/secondary-window/store.js +40 -9
- package/lib-es/modules/secondary-window/type.js +1 -0
- package/lib-es/modules/secondary-window/view.js +60 -59
- package/lib-es/modules/setting/audio-settings/audio-settings.js +2 -2
- package/lib-es/modules/setting/audio-whiteList/audio-device-adaptation.js +2 -2
- package/lib-es/modules/setting/audio-whiteList/audio-whiteList-manager.js +1 -1
- package/lib-es/modules/setting/caption_and_transcribing/index.js +1 -1
- package/lib-es/modules/setting/general-settings/general-settings.js +5 -5
- package/lib-es/modules/setting/index.css +2 -3
- package/lib-es/modules/setting/index.js +3 -10
- package/lib-es/modules/setting/minutes-settings/minutes-settings.js +1 -1
- package/lib-es/modules/setting/state/index.js +1 -1
- package/lib-es/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib-es/modules/setting/store.base.js +103 -88
- package/lib-es/modules/setting/store.electron.js +19 -1
- package/lib-es/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib-es/modules/setting/video-settings/video-settings-basic.js +1 -1
- package/lib-es/modules/setting/video-settings/video-settings.js +11 -7
- package/lib-es/modules/setting/view.js +1 -1
- package/lib-es/modules/share-screen/components/control-bar/index.js +0 -86
- package/lib-es/modules/share-screen/components/selection/index.js +3 -1
- package/lib-es/modules/share-screen/store.base.js +10 -14
- package/lib-es/modules/share-screen/store.electron.js +109 -35
- package/lib-es/modules/state-bar/layout-config.js +1 -1
- package/lib-es/modules/state-bar/live-streaming-state.js +5 -6
- package/lib-es/modules/state-bar/main-scene/store.browser.js +1 -1
- package/lib-es/modules/state-bar/main-scene/store.electron.js +1 -1
- package/lib-es/modules/state-bar/meeting-details.js +10 -17
- package/lib-es/modules/state-bar/meeting-network-state.css +5 -1
- package/lib-es/modules/state-bar/meeting-network-state.js +7 -1
- package/lib-es/modules/state-bar/meeting-time.js +1 -1
- package/lib-es/modules/state-bar/network-quality.js +1 -1
- package/lib-es/modules/state-bar/recording.js +1 -1
- package/lib-es/modules/state-bar/store.base.js +15 -24
- package/lib-es/modules/state-bar/view.js +5 -6
- package/lib-es/modules/subtitles-history/components/list-item.js +6 -1
- package/lib-es/modules/subtitles-history/index.css +2 -5
- package/lib-es/modules/subtitles-history/store.base.js +24 -12
- package/lib-es/modules/subtitles-history/store.electron.js +8 -2
- package/lib-es/modules/subtitles-history/view.js +7 -5
- package/lib-es/modules/toast-manager/index.js +50 -0
- package/lib-es/modules/toast-manager/store.js +383 -0
- package/lib-es/modules/toast-manager/toast-params.js +82 -0
- package/lib-es/modules/toast-manager/type.js +329 -0
- package/lib-es/modules/video-window/store.js +28 -50
- package/lib-es/modules/whiteboard/components/control-bar/store.js +0 -6
- package/lib-es/modules/whiteboard/components/toolbar/store.js +25 -14
- package/lib-es/modules/whiteboard/store.js +10 -9
- package/lib-es/modules/whiteboard/view.js +0 -1
- package/lib-es/modules/widget/store.electron.js +12 -47
- package/lib-es/modules/widget/view.js +1 -1
- package/lib-es/object-manager.js +2 -0
- package/lib-es/plugins/multi-lang-plugin.js +1 -1
- package/lib-es/providers/ability-provider.js +29 -1
- package/lib-es/providers/annotation/provider.base.js +263 -0
- package/lib-es/providers/annotation/provider.browser.js +17 -0
- package/lib-es/providers/annotation/provider.electron.js +224 -0
- package/lib-es/{fragments/annotation/toolbar/store.js → providers/annotation/standalone-toolbar-control/index.js} +102 -174
- package/lib-es/providers/annotation/toolbar-control/index.js +198 -0
- package/lib-es/providers/app-list-provider.js +13 -7
- package/lib-es/providers/board-share/bar-control/base.js +7 -36
- package/lib-es/providers/board-share/bar-control/browser.js +78 -4
- package/lib-es/providers/board-share/bar-control/electron.js +36 -12
- package/lib-es/providers/board-share/provider.base.js +73 -14
- package/lib-es/providers/device-privilege-provider.js +85 -62
- package/lib-es/providers/device-provider.js +413 -162
- package/lib-es/providers/device-stream-provider.js +37 -111
- package/lib-es/providers/dialog/provider.electron.js +6 -1
- package/lib-es/providers/interpreter-provider.js +5 -5
- package/lib-es/providers/message/provider.js +12 -0
- package/lib-es/providers/mouse-detect/provider.js +1 -1
- package/lib-es/providers/mouse-detect/struct.js +1 -0
- package/lib-es/providers/multi-display-provider.js +15 -2
- package/lib-es/providers/phone-audio-provider.js +17 -10
- package/lib-es/providers/room-provider/room-provider.js +95 -201
- package/lib-es/providers/room-provider/waiting-room-control-manager.js +1 -1
- package/lib-es/providers/screen-share/provider.base.js +6 -1
- package/lib-es/providers/screen-share/provider.browser.js +13 -9
- package/lib-es/providers/screen-share/provider.electron.js +54 -44
- package/lib-es/providers/screen-share/strategy/electron.js +18 -3
- package/lib-es/providers/screen-share/stream-state-sync.js +4 -4
- package/lib-es/providers/stt-provider/stt-provider.js +65 -102
- package/lib-es/providers/stt-provider/type.js +4 -2
- package/lib-es/providers/user-audio-volume-provider.js +312 -0
- package/lib-es/providers/window/provider.js +23 -13
- package/lib-es/providers/window/renderer-window.js +118 -33
- package/lib-es/scenes/main-scene.js +113 -83
- package/lib-es/scenes/waiting-scene.js +5 -5
- package/lib-es/shared-data/member-data.js +35 -61
- package/lib-es/shared-data/pin-data.js +8 -11
- package/lib-es/shared-data/setting.js +1 -1
- package/lib-es/shared-data/user-audio-volume.js +97 -0
- package/lib-es/shared-data/video-window.js +49 -60
- package/lib-es/translations/enUS.js +13 -3
- package/lib-es/translations/zhCN.js +12 -2
- package/lib-es/type.js +19 -1
- package/lib-es/ui-manager.js +1 -1
- package/lib-es/ui-scene-switch.js +199 -88
- package/lib-es/utilities/browser-api.js +0 -40
- package/lib-es/utilities/constant.js +4 -5
- package/lib-es/utilities/default-config.js +8 -48
- package/lib-es/utilities/dialog-utils.js +1 -1
- package/lib-es/utilities/focus-helper.js +1 -1
- package/lib-es/utilities/logger.js +12 -40
- package/lib-es/utilities/package-info.js +5 -6
- package/lib-es/utilities/renderer.js +7 -1
- package/lib-es/utilities/shared-storage.js +16 -12
- package/lib-es/utilities/tools.js +2 -188
- package/lib-es/utilities/validate-params.js +3 -5
- package/package.json +7 -8
- package/public/js/meeting-manager.js +13 -11
- package/lib/electron/window-proxy/browser-window-proxy.js +0 -728
- package/lib/fragments/annotation/toolbar/store.d.ts +0 -64
- package/lib/fragments/annotation/toolbar/view.js +0 -148
- package/lib/fragments/annotation/utils.d.ts +0 -1
- package/lib/fragments/annotation/utils.js +0 -27
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +0 -20
- package/lib/modules/dialog/components/dialog-container/component/body.js +0 -111
- package/lib/modules/dialog/components/host-area-container/index.d.ts +0 -12
- package/lib/modules/dialog/components/host-area-container/index.js +0 -153
- package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +0 -13
- package/lib/modules/dialog/dialogs/interpreter/index.css +0 -30
- package/lib/modules/dialog/dialogs/mute-all/index.css +0 -20
- package/lib/modules/whiteboard/components/multi-window/index.css +0 -63
- package/lib/modules/whiteboard/components/multi-window/index.d.ts +0 -5
- package/lib/modules/whiteboard/components/multi-window/index.js +0 -39
- package/lib/providers/annotation/provider.d.ts +0 -15
- package/lib/providers/annotation/provider.js +0 -69
- package/lib/utilities/hooks.d.ts +0 -14
- package/lib/utilities/hooks.js +0 -100
- package/lib/utilities/mute-action.d.ts +0 -4
- package/lib/utilities/mute-action.js +0 -48
- package/lib/utilities/platform.d.ts +0 -2
- package/lib/utilities/platform.js +0 -14
- package/lib/utilities/regex.d.ts +0 -1
- package/lib/utilities/regex.js +0 -14
- package/lib/utilities/useNamespace.d.ts +0 -15
- package/lib/utilities/useNamespace.js +0 -66
- package/lib-es/electron/window-proxy/browser-window-proxy.js +0 -720
- package/lib-es/fragments/annotation/toolbar/view.js +0 -140
- package/lib-es/fragments/annotation/utils.js +0 -20
- package/lib-es/modules/dialog/components/dialog-container/component/body.js +0 -103
- package/lib-es/modules/dialog/components/host-area-container/index.js +0 -146
- package/lib-es/modules/dialog/dialogs/interpreter/index.css +0 -30
- package/lib-es/modules/dialog/dialogs/mute-all/index.css +0 -20
- package/lib-es/modules/whiteboard/components/multi-window/index.css +0 -63
- package/lib-es/modules/whiteboard/components/multi-window/index.js +0 -31
- package/lib-es/providers/annotation/provider.js +0 -61
- package/lib-es/utilities/hooks.js +0 -82
- package/lib-es/utilities/mute-action.js +0 -41
- package/lib-es/utilities/platform.js +0 -7
- package/lib-es/utilities/regex.js +0 -7
- package/lib-es/utilities/useNamespace.js +0 -59
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/color-tool/color-panel/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/color-tool/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/graphic-panel/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/graphic-panel/libs.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/graphic-panel/libs.js +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/item/item.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/item/item.js +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/item/style.css +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/panel/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/panel/index.js +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/panel/style.css +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/pen-tool/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/pen-tool/pen-panel/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/tips/index.d.ts +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/tips/index.js +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/tips/style.css +0 -0
- /package/lib/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/view.d.ts +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/graphic-tool/graphic-panel/libs.js +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/item/item.js +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/item/style.css +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/panel/index.js +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/panel/style.css +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/tips/index.js +0 -0
- /package/lib-es/{fragments/annotation/toolbar → modules/annotation/standalone-toolbar}/components/tips/style.css +0 -0
|
@@ -44,43 +44,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
44
44
|
value: true
|
|
45
45
|
});
|
|
46
46
|
exports.FragmentAnnotationStoreContext = exports.FragmentAnnotationStore = void 0;
|
|
47
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
48
47
|
require("core-js/modules/es.error.cause.js");
|
|
49
48
|
require("core-js/modules/es.error.to-string.js");
|
|
50
49
|
require("core-js/modules/es.array.concat.js");
|
|
51
50
|
require("core-js/modules/es.array.iterator.js");
|
|
52
|
-
require("core-js/modules/es.date.now.js");
|
|
53
51
|
require("core-js/modules/es.date.to-json.js");
|
|
54
52
|
require("core-js/modules/es.json.stringify.js");
|
|
55
53
|
require("core-js/modules/es.object.to-string.js");
|
|
56
|
-
require("core-js/modules/es.promise.js");
|
|
57
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
58
54
|
require("core-js/modules/es.string.iterator.js");
|
|
59
55
|
require("core-js/modules/es.weak-map.js");
|
|
60
56
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
61
57
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
62
58
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
63
|
-
require("
|
|
59
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
64
60
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
65
61
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
66
62
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
67
63
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
68
64
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
69
|
-
var
|
|
65
|
+
var _decorator = require("agora-foundation/lib/decorator");
|
|
66
|
+
var _fcrCore = require("fcr-core");
|
|
70
67
|
var _imports = require("fcr-core/lib/imports");
|
|
68
|
+
var _enum = require("fcr-core/lib/room-control/whiteboard-control-v2/enum");
|
|
71
69
|
var _mobx = require("mobx");
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
var _asyncRetry = require("agora-foundation/lib/utilities/async-retry");
|
|
70
|
+
var _react = require("react");
|
|
71
|
+
var _tinycolor = _interopRequireDefault(require("tinycolor2"));
|
|
72
|
+
var _type = require("../../modules/secondary-window/type");
|
|
73
|
+
require("../../plugins/rtm-plugin");
|
|
77
74
|
var _logger = require("../../utilities/logger");
|
|
78
|
-
var _utils = require("./utils");
|
|
79
|
-
var _electronRtcPlugin = require("fcr-core/lib/plugins/electron-rtc-plugin");
|
|
80
|
-
var _rtmPlugin = require("fcr-core/lib/plugins/rtm-plugin");
|
|
81
75
|
var _sharedStorage = require("../../utilities/shared-storage");
|
|
76
|
+
var _libs = require("./libs");
|
|
82
77
|
var _FragmentAnnotationStore;
|
|
83
|
-
var _initProto,
|
|
78
|
+
var _initProto, _init_currentTool;
|
|
84
79
|
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; }
|
|
85
80
|
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; }
|
|
86
81
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -94,47 +89,121 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
94
89
|
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
95
90
|
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; }
|
|
96
91
|
var _A = /*#__PURE__*/new WeakMap();
|
|
97
|
-
var _B = /*#__PURE__*/new WeakMap();
|
|
98
|
-
var _C = /*#__PURE__*/new WeakMap();
|
|
99
|
-
var _D = /*#__PURE__*/new WeakMap();
|
|
100
|
-
_ref = (_handleBoardDomLoadDecs = [_mobx.action, _mobx.action.bound], _closeDecs = [_mobx.action, _mobx.action.bound], _hideDecs = [_mobx.action, _mobx.action.bound], _showDecs = [_mobx.action, _mobx.action.bound], _handleSetToolDecs = [(0, _decorator.debounced)(300), _decorator.bound], "logger");
|
|
101
92
|
var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/function () {
|
|
102
93
|
function FragmentAnnotationStore() {
|
|
103
94
|
var _this = this;
|
|
104
95
|
(0, _classCallCheck2["default"])(this, FragmentAnnotationStore);
|
|
105
|
-
(0, _defineProperty2["default"])(this,
|
|
106
|
-
prefix: '
|
|
96
|
+
(0, _defineProperty2["default"])(this, "logger", (_initProto(this), (0, _logger.createFragmentLogger)({
|
|
97
|
+
prefix: 'FragmentWhiteboardStore'
|
|
107
98
|
})));
|
|
108
99
|
(0, _defineProperty2["default"])(this, "_engine", null);
|
|
109
|
-
(0, _defineProperty2["default"])(this, "
|
|
110
|
-
(0, _defineProperty2["default"])(this, "
|
|
111
|
-
(0, _defineProperty2["default"])(this, "
|
|
112
|
-
|
|
113
|
-
_classPrivateFieldInitSpec(this, _A, _init_joined(this, false));
|
|
114
|
-
_classPrivateFieldInitSpec(this, _B, _init_bounds(this, {
|
|
115
|
-
x: 0,
|
|
116
|
-
y: 0,
|
|
117
|
-
width: 800,
|
|
118
|
-
height: 600
|
|
119
|
-
}));
|
|
120
|
-
_classPrivateFieldInitSpec(this, _C, _init_currentTool(this, 'none'));
|
|
121
|
-
_classPrivateFieldInitSpec(this, _D, _init_drawing(this, false));
|
|
122
|
-
(0, _defineProperty2["default"])(this, "_hasWaitingOpen", false);
|
|
123
|
-
(0, _defineProperty2["default"])(this, "_lastViewPortSet", {
|
|
124
|
-
width: 0,
|
|
125
|
-
height: 0
|
|
100
|
+
(0, _defineProperty2["default"])(this, "_engineObserver", {});
|
|
101
|
+
(0, _defineProperty2["default"])(this, "_isMounted", false);
|
|
102
|
+
(0, _defineProperty2["default"])(this, "_boardObserver", {
|
|
103
|
+
onConnectionStateUpdated: this._handleConnectionStateUpdated
|
|
126
104
|
});
|
|
127
|
-
(0, _defineProperty2["default"])(this, "
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
105
|
+
(0, _defineProperty2["default"])(this, "_boardMainWindowObserver", {
|
|
106
|
+
onUndoStateUpdated: function onUndoStateUpdated(enable) {
|
|
107
|
+
_this.logger.info("[annotation-fragment]: undo state updated, enable ".concat(enable));
|
|
108
|
+
_this.mainWindowRenderer.notifyObservers('onUndoStateUpdated', enable);
|
|
109
|
+
},
|
|
110
|
+
onRedoStateUpdated: function onRedoStateUpdated(enable) {
|
|
111
|
+
_this.logger.info("[annotation-fragment]: redo state updated, enable ".concat(enable));
|
|
112
|
+
_this.mainWindowRenderer.notifyObservers('onRedoStateUpdated', enable);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
(0, _defineProperty2["default"])(this, "_mainWindowObserver", {
|
|
116
|
+
onPermissionUpdated: function onPermissionUpdated(hasWriteBoardPermission) {
|
|
117
|
+
_this.logger.info("[annotation-fragment]: onPermissionUpdated ".concat(hasWriteBoardPermission));
|
|
118
|
+
if (_this._annotationControl) {
|
|
119
|
+
_this._annotationControl.setOperationPrivilege(hasWriteBoardPermission);
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
onViewportSizeUpdated: function onViewportSizeUpdated(size) {
|
|
123
|
+
_this.setViewportSize(size);
|
|
124
|
+
},
|
|
125
|
+
onWhiteboardStrokeColorChanged: function onWhiteboardStrokeColorChanged(color) {
|
|
126
|
+
var _this$_boardInstance;
|
|
127
|
+
_this.logger.info("[annotation-fragment]: onWhiteboardStrokeColorChanged ".concat(color));
|
|
128
|
+
_this._lastStrokeColor = color;
|
|
129
|
+
(_this$_boardInstance = _this._boardInstance) === null || _this$_boardInstance === void 0 || _this$_boardInstance.setStrokeColor((0, _tinycolor["default"])(color).toRgb());
|
|
130
|
+
},
|
|
131
|
+
onWhiteboardStrokeWidthChanged: function onWhiteboardStrokeWidthChanged(width) {
|
|
132
|
+
var _this$_boardInstance2;
|
|
133
|
+
_this.logger.info("[annotation-fragment]: onWhiteboardStrokeWidthChanged ".concat(width));
|
|
134
|
+
_this._lastStrokeWidth = width;
|
|
135
|
+
(_this$_boardInstance2 = _this._boardInstance) === null || _this$_boardInstance2 === void 0 || _this$_boardInstance2.setStrokeWidth(width);
|
|
136
|
+
},
|
|
137
|
+
onWhiteboardToolSelected: function onWhiteboardToolSelected(_ref) {
|
|
138
|
+
var _this$_boardInstance5, _this$_boardInstance6, _this$_boardInstance7;
|
|
139
|
+
var tool = _ref.tool,
|
|
140
|
+
shape = _ref.shape,
|
|
141
|
+
action = _ref.action;
|
|
142
|
+
if (tool !== undefined || shape !== undefined) {
|
|
143
|
+
_this._lastToolPayload = {
|
|
144
|
+
tool: tool,
|
|
145
|
+
shape: shape
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
if (tool !== undefined) {
|
|
149
|
+
var _this$_boardInstance3;
|
|
150
|
+
_this.currentTool = tool;
|
|
151
|
+
(_this$_boardInstance3 = _this._boardInstance) === null || _this$_boardInstance3 === void 0 || _this$_boardInstance3.setToolType(tool);
|
|
152
|
+
}
|
|
153
|
+
if (shape !== undefined) {
|
|
154
|
+
var _this$_boardInstance4;
|
|
155
|
+
_this.currentTool = (0, _libs.convertShapeToBoardToolType)(shape);
|
|
156
|
+
(_this$_boardInstance4 = _this._boardInstance) === null || _this$_boardInstance4 === void 0 || _this$_boardInstance4.setToolType((0, _libs.convertShapeToBoardToolType)(shape));
|
|
157
|
+
}
|
|
158
|
+
if (action) {
|
|
159
|
+
switch (action) {
|
|
160
|
+
case _type.WhiteboardToolAction.UNDO:
|
|
161
|
+
(_this$_boardInstance5 = _this._boardInstance) === null || _this$_boardInstance5 === void 0 || _this$_boardInstance5.undo();
|
|
162
|
+
break;
|
|
163
|
+
case _type.WhiteboardToolAction.REDO:
|
|
164
|
+
(_this$_boardInstance6 = _this._boardInstance) === null || _this$_boardInstance6 === void 0 || _this$_boardInstance6.redo();
|
|
165
|
+
break;
|
|
166
|
+
case _type.WhiteboardToolAction.CLEAR:
|
|
167
|
+
(_this$_boardInstance7 = _this._boardInstance) === null || _this$_boardInstance7 === void 0 || _this$_boardInstance7.clean();
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
onSaveDraft: function () {
|
|
173
|
+
var _onSaveDraft = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
174
|
+
var _this$_boardInstance8;
|
|
175
|
+
var image;
|
|
176
|
+
return _regenerator["default"].wrap(function (_context) {
|
|
177
|
+
while (1) switch (_context.prev = _context.next) {
|
|
178
|
+
case 0:
|
|
179
|
+
_this.logger.info("[annotation-fragment]: onSaveDraft");
|
|
180
|
+
_context.next = 1;
|
|
181
|
+
return (_this$_boardInstance8 = _this._boardInstance) === null || _this$_boardInstance8 === void 0 ? void 0 : _this$_boardInstance8.getSnapshotImage();
|
|
182
|
+
case 1:
|
|
183
|
+
image = _context.sent;
|
|
184
|
+
_this.logger.info("[annotation-fragment]: save draft image: ".concat(image));
|
|
185
|
+
if (image) {
|
|
186
|
+
_this.mainWindowRenderer.notifyObservers('onDraftSaved', image);
|
|
187
|
+
}
|
|
188
|
+
case 2:
|
|
189
|
+
case "end":
|
|
190
|
+
return _context.stop();
|
|
191
|
+
}
|
|
192
|
+
}, _callee);
|
|
193
|
+
}));
|
|
194
|
+
function onSaveDraft() {
|
|
195
|
+
return _onSaveDraft.apply(this, arguments);
|
|
196
|
+
}
|
|
197
|
+
return onSaveDraft;
|
|
198
|
+
}()
|
|
199
|
+
});
|
|
200
|
+
_classPrivateFieldInitSpec(this, _A, _init_currentTool(this, _enum.FcrBoardToolType.NONE));
|
|
201
|
+
window.require = parent.window.require;
|
|
202
|
+
this._viewportSize = (0, _sharedStorage.getAnnotationViewportSize)();
|
|
203
|
+
this._init();
|
|
135
204
|
}
|
|
136
205
|
return (0, _createClass2["default"])(FragmentAnnotationStore, [{
|
|
137
|
-
key: "
|
|
206
|
+
key: "currentTool",
|
|
138
207
|
get: function get() {
|
|
139
208
|
return _classPrivateFieldGet(_A, this);
|
|
140
209
|
},
|
|
@@ -142,732 +211,273 @@ var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/fun
|
|
|
142
211
|
_classPrivateFieldSet(_A, this, v);
|
|
143
212
|
}
|
|
144
213
|
}, {
|
|
145
|
-
key: "
|
|
214
|
+
key: "boardDom",
|
|
146
215
|
get: function get() {
|
|
147
|
-
return
|
|
148
|
-
},
|
|
149
|
-
set: function set(v) {
|
|
150
|
-
_classPrivateFieldSet(_B, this, v);
|
|
216
|
+
return this._boardDom;
|
|
151
217
|
}
|
|
152
218
|
}, {
|
|
153
|
-
key: "
|
|
219
|
+
key: "mainWindowRenderer",
|
|
154
220
|
get: function get() {
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
221
|
+
// @ts-ignore
|
|
222
|
+
var mainWindowRenderer = window.parent.FcrUIMainWindowRenderer;
|
|
223
|
+
if (!mainWindowRenderer) {
|
|
224
|
+
console.log(window.parent);
|
|
225
|
+
throw new Error('main window renderer is not found');
|
|
226
|
+
}
|
|
227
|
+
return mainWindowRenderer;
|
|
159
228
|
}
|
|
160
229
|
}, {
|
|
161
|
-
key: "
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
_classPrivateFieldSet(_D, this, v);
|
|
230
|
+
key: "setViewportSize",
|
|
231
|
+
value: function setViewportSize(viewportSize) {
|
|
232
|
+
var _this$_boardInstance9;
|
|
233
|
+
this._viewportSize = viewportSize;
|
|
234
|
+
(_this$_boardInstance9 = this._boardInstance) === null || _this$_boardInstance9 === void 0 || _this$_boardInstance9.updateWindowSize(viewportSize);
|
|
167
235
|
}
|
|
168
|
-
}, {
|
|
169
|
-
key: "open",
|
|
170
|
-
value: function () {
|
|
171
|
-
var _open = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
172
|
-
var _this2 = this;
|
|
173
|
-
var visible, boardRoom, _this$_resizeToMax, boundsWidth, boundsHeight, width, height, whiteboard, _t;
|
|
174
|
-
return _regenerator["default"].wrap(function (_context) {
|
|
175
|
-
while (1) switch (_context.prev = _context.next) {
|
|
176
|
-
case 0:
|
|
177
|
-
if (!(this._openLock || this.joined)) {
|
|
178
|
-
_context.next = 1;
|
|
179
|
-
break;
|
|
180
|
-
}
|
|
181
|
-
return _context.abrupt("return");
|
|
182
|
-
case 1:
|
|
183
|
-
this._openLock = true;
|
|
184
|
-
_context.prev = 2;
|
|
185
|
-
// TODO: window
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
visible = window.runtime.browserWindow.isVisible();
|
|
188
|
-
this.logger.info("open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds), ", visible ").concat(visible));
|
|
189
|
-
if (!visible) {
|
|
190
|
-
_context.next = 3;
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
return _context.abrupt("return");
|
|
194
|
-
case 3:
|
|
195
|
-
this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
|
|
196
|
-
this.currentTool = 'curve';
|
|
197
|
-
// TODO: window
|
|
198
|
-
this.logger.info('windows_index setAlwaysOnTop in annotation');
|
|
199
|
-
// @ts-ignore
|
|
200
|
-
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
201
|
-
this.setIgnore(true);
|
|
202
|
-
this._hasWaitingOpen = !this._engine;
|
|
203
|
-
if (this._engine) {
|
|
204
|
-
_context.next = 4;
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
this.logger.info("this._engine is null, so open fail, cannot draw, we will reopen after engine connected");
|
|
208
|
-
return _context.abrupt("return");
|
|
209
|
-
case 4:
|
|
210
|
-
this.logger.info('this._engine is initialized, show annotation window');
|
|
211
|
-
// TODO: window
|
|
212
|
-
// @ts-ignore
|
|
213
|
-
window.runtime.browserWindow.show();
|
|
214
|
-
case 5:
|
|
215
|
-
if (!this._boardRoom) {
|
|
216
|
-
_context.next = 6;
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
throw new Error('state is not in sync, joined state is false, but boardRoom is not null');
|
|
220
|
-
case 6:
|
|
221
|
-
_context.next = 7;
|
|
222
|
-
return this._initBoardRoom();
|
|
223
|
-
case 7:
|
|
224
|
-
boardRoom = _context.sent;
|
|
225
|
-
this._boardRoom = boardRoom;
|
|
226
|
-
_this$_resizeToMax = this._resizeToMax(this.bounds.width, this.bounds.height, 1920), boundsWidth = _this$_resizeToMax.width, boundsHeight = _this$_resizeToMax.height;
|
|
227
|
-
width = boundsWidth;
|
|
228
|
-
height = boundsHeight;
|
|
229
|
-
if (!boundsWidth) {
|
|
230
|
-
this.logger.warn("boundsWidth is a invalid value: ".concat(boundsWidth, ", use default width 800"));
|
|
231
|
-
width = 800;
|
|
232
|
-
}
|
|
233
|
-
if (!boundsHeight) {
|
|
234
|
-
this.logger.warn("boundsHeight is a invalid value: ".concat(boundsHeight, ", use default height 600"));
|
|
235
|
-
height = 600;
|
|
236
|
-
}
|
|
237
|
-
_context.next = 8;
|
|
238
|
-
return boardRoom.applicationManager.launchApplication(_imports.FcrWhiteboardApplication, {
|
|
239
|
-
width: width,
|
|
240
|
-
height: height,
|
|
241
|
-
defaultToolbarStyle: {
|
|
242
|
-
tool: 'curve',
|
|
243
|
-
strokeColor: '#FFC908',
|
|
244
|
-
strokeWidth: 2
|
|
245
|
-
},
|
|
246
|
-
maxScaleRatio: 1
|
|
247
|
-
}, this._FORGE_WHITEBOARD_APP_ID);
|
|
248
|
-
case 8:
|
|
249
|
-
whiteboard = _context.sent;
|
|
250
|
-
this._boardInstance = whiteboard;
|
|
251
|
-
this.logger.info("whiteboard launch success");
|
|
252
|
-
this._boardView.classList.add('fcr-whiteboard-window-view');
|
|
253
|
-
this._boardView.appendChild(whiteboard.view);
|
|
254
|
-
if (this._boardDom) {
|
|
255
|
-
_context.next = 9;
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
throw new Error('cannot mount board view, boardDom is not set');
|
|
259
|
-
case 9:
|
|
260
|
-
this._boardDom.appendChild(this._boardView);
|
|
261
|
-
|
|
262
|
-
// @ts-ignore
|
|
263
|
-
window._boardInstance = this._boardInstance;
|
|
264
|
-
this._initBoardStyle(whiteboard);
|
|
265
|
-
|
|
266
|
-
// 共享发起端 开启标注时,重置30s轮询updateWindowSize
|
|
267
|
-
this._handlePollingUpdateWindowSize('sender-board-room-init');
|
|
268
|
-
this._syncScreenShareOwnerOpenDone();
|
|
269
|
-
boardRoom.applicationManager.on('launch', this._launchHandler);
|
|
270
|
-
boardRoom.applicationManager.on('terminal', this._terminalHandler);
|
|
271
|
-
// workaround
|
|
272
|
-
setTimeout(function () {
|
|
273
|
-
_this2.logger.info('clear page');
|
|
274
|
-
whiteboard.clearPage();
|
|
275
|
-
});
|
|
276
|
-
this.joined = true;
|
|
277
|
-
_context.next = 11;
|
|
278
|
-
break;
|
|
279
|
-
case 10:
|
|
280
|
-
_context.prev = 10;
|
|
281
|
-
_t = _context["catch"](2);
|
|
282
|
-
this._boardInstance = null;
|
|
283
|
-
this._boardRoom = null;
|
|
284
|
-
this.joined = false;
|
|
285
|
-
this.logger.error("open failed, error: ".concat(_t));
|
|
286
|
-
throw _t;
|
|
287
|
-
case 11:
|
|
288
|
-
_context.prev = 11;
|
|
289
|
-
this._openLock = false;
|
|
290
|
-
this.logger.info("open method is finished");
|
|
291
|
-
return _context.finish(11);
|
|
292
|
-
case 12:
|
|
293
|
-
case "end":
|
|
294
|
-
return _context.stop();
|
|
295
|
-
}
|
|
296
|
-
}, _callee, this, [[2, 10, 11, 12]]);
|
|
297
|
-
}));
|
|
298
|
-
function open() {
|
|
299
|
-
return _open.apply(this, arguments);
|
|
300
|
-
}
|
|
301
|
-
return open;
|
|
302
|
-
}()
|
|
303
236
|
}, {
|
|
304
237
|
key: "handleBoardDomLoad",
|
|
305
238
|
value: function handleBoardDomLoad(dom) {
|
|
306
239
|
this._boardDom = dom;
|
|
307
240
|
}
|
|
308
241
|
}, {
|
|
309
|
-
key: "
|
|
310
|
-
value: function () {
|
|
311
|
-
|
|
312
|
-
var boardInstance, boardRoom;
|
|
313
|
-
return _regenerator["default"].wrap(function (_context2) {
|
|
314
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
315
|
-
case 0:
|
|
316
|
-
try {
|
|
317
|
-
if (this._openAbortController) {
|
|
318
|
-
this._openAbortController.abort();
|
|
319
|
-
this._openAbortController = null;
|
|
320
|
-
}
|
|
321
|
-
this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
|
|
322
|
-
boardInstance = this._boardInstance;
|
|
323
|
-
boardRoom = this._boardRoom;
|
|
324
|
-
if (boardInstance) {
|
|
325
|
-
try {
|
|
326
|
-
this._boardView.removeChild(boardInstance.view);
|
|
327
|
-
} catch (domError) {
|
|
328
|
-
this.logger.warn('failed to remove board view', domError);
|
|
329
|
-
}
|
|
330
|
-
boardInstance.clearPage();
|
|
331
|
-
}
|
|
332
|
-
if (boardRoom) {
|
|
333
|
-
boardRoom.applicationManager.removeListener('launch', this._launchHandler);
|
|
334
|
-
boardRoom.applicationManager.removeListener('terminal', this._terminalHandler);
|
|
335
|
-
boardRoom.leaveRoom();
|
|
336
|
-
this.logger.info(// @ts-ignore
|
|
337
|
-
"leaveRoom, ".concat(boardRoom['traceId']));
|
|
338
|
-
}
|
|
339
|
-
this._boardInstance = null;
|
|
340
|
-
this._boardRoom = null;
|
|
341
|
-
this.joined = false;
|
|
342
|
-
this.currentTool = 'curve';
|
|
343
|
-
} catch (e) {
|
|
344
|
-
this.logger.error('catch error', e);
|
|
345
|
-
} finally {
|
|
346
|
-
// TODO: window
|
|
347
|
-
// @ts-ignore
|
|
348
|
-
window.runtime.browserWindow.hide();
|
|
349
|
-
this.logger.info('close annotation window');
|
|
350
|
-
}
|
|
351
|
-
case 1:
|
|
352
|
-
case "end":
|
|
353
|
-
return _context2.stop();
|
|
354
|
-
}
|
|
355
|
-
}, _callee2, this);
|
|
356
|
-
}));
|
|
357
|
-
function close() {
|
|
358
|
-
return _close.apply(this, arguments);
|
|
359
|
-
}
|
|
360
|
-
return close;
|
|
361
|
-
}()
|
|
362
|
-
}, {
|
|
363
|
-
key: "hide",
|
|
364
|
-
value: function hide() {
|
|
365
|
-
// TODO: window
|
|
366
|
-
// @ts-ignore
|
|
367
|
-
window.runtime.browserWindow.hide();
|
|
368
|
-
this.logger.info('hide annotation window');
|
|
242
|
+
key: "log",
|
|
243
|
+
value: function log(message) {
|
|
244
|
+
this.logger.info(message);
|
|
369
245
|
}
|
|
370
246
|
}, {
|
|
371
|
-
key: "
|
|
372
|
-
value: function
|
|
373
|
-
|
|
374
|
-
this.
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
// TODO: window
|
|
379
|
-
// @ts-ignore
|
|
380
|
-
window.runtime.browserWindow.show();
|
|
381
|
-
this.logger.info('show annotation window');
|
|
382
|
-
}
|
|
383
|
-
}, {
|
|
384
|
-
key: "focus",
|
|
385
|
-
value: function focus() {
|
|
386
|
-
this.logger.info('focus annotation window');
|
|
387
|
-
|
|
388
|
-
// TODO: window
|
|
389
|
-
// @ts-ignore
|
|
390
|
-
window.runtime.browserWindow.focus();
|
|
391
|
-
}
|
|
392
|
-
}, {
|
|
393
|
-
key: "setBounds",
|
|
394
|
-
value: function setBounds(bounds) {
|
|
395
|
-
this.bounds = bounds;
|
|
396
|
-
this.logger.info("bounds is changed =>, ".concat(JSON.stringify(bounds)));
|
|
397
|
-
|
|
398
|
-
// TODO: window
|
|
399
|
-
// @ts-ignore
|
|
400
|
-
window.runtime.browserWindow.setBounds(bounds);
|
|
401
|
-
this._updateBoardElBySize({
|
|
402
|
-
width: bounds.width,
|
|
403
|
-
height: bounds.height
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
}, {
|
|
407
|
-
key: "updateWindowSize",
|
|
408
|
-
value: function updateWindowSize(paramWidth, paramHeight) {
|
|
409
|
-
this._updateWindowSize(paramWidth, paramHeight);
|
|
410
|
-
}
|
|
411
|
-
}, {
|
|
412
|
-
key: "_updateWindowSizeWithCurrentBounds",
|
|
413
|
-
value: function _updateWindowSizeWithCurrentBounds() {
|
|
414
|
-
if (this.bounds && this.bounds.width > 0 && this.bounds.height > 0) {
|
|
415
|
-
this._updateWindowSize(this.bounds.width, this.bounds.height);
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}, {
|
|
419
|
-
key: "_updateWindowSize",
|
|
420
|
-
value: function _updateWindowSize(paramWidth, paramHeight) {
|
|
421
|
-
if (!paramWidth || !paramHeight) {
|
|
422
|
-
return;
|
|
423
|
-
}
|
|
424
|
-
this._lastViewPortSet.width = paramWidth;
|
|
425
|
-
this._lastViewPortSet.height = paramHeight;
|
|
426
|
-
if (this._boardInstance) {
|
|
427
|
-
this.logger.info("updateViewport width:".concat(paramWidth, " height:").concat(paramHeight));
|
|
428
|
-
this._boardInstance.updateViewport(paramWidth, paramHeight);
|
|
429
|
-
} else {
|
|
430
|
-
this.logger.error('cannot updateViewport, _boardInstance is null');
|
|
247
|
+
key: "_mount",
|
|
248
|
+
value: function _mount() {
|
|
249
|
+
this.logger.info("[annotation-fragment]: mounted board dom");
|
|
250
|
+
if (this._boardDom && this._boardInstance && !this._isMounted) {
|
|
251
|
+
this._boardDom.appendChild(this._boardInstance.getContentView());
|
|
252
|
+
this._isMounted = true;
|
|
431
253
|
}
|
|
432
254
|
}
|
|
433
255
|
}, {
|
|
434
|
-
key: "
|
|
435
|
-
value: function
|
|
436
|
-
|
|
437
|
-
var _this$_boardInstance;
|
|
438
|
-
this.logger.info('update board element size', size);
|
|
439
|
-
this._boardView.style.width = "".concat(size.width, "px");
|
|
440
|
-
this._boardView.style.height = "".concat(size.height, "px");
|
|
441
|
-
var currentBoardInstanceView = (_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 ? void 0 : _this$_boardInstance.view;
|
|
442
|
-
if (currentBoardInstanceView) {
|
|
443
|
-
currentBoardInstanceView.style.width = "".concat(size.width, "px");
|
|
444
|
-
currentBoardInstanceView.style.height = "".concat(size.height, "px");
|
|
445
|
-
}
|
|
446
|
-
this._updateWindowSize(size.width, size.height);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}, {
|
|
450
|
-
key: "setIgnore",
|
|
451
|
-
value: function setIgnore(ignore) {
|
|
452
|
-
this.logger.info("setIgnore method is called, the ignore is => ".concat(ignore));
|
|
453
|
-
|
|
454
|
-
// TODO: window
|
|
256
|
+
key: "_handleConnectionStateUpdated",
|
|
257
|
+
value: function _handleConnectionStateUpdated(state) {
|
|
258
|
+
this.logger.info("[whitebaord-fragment]: connection state updated: ".concat(_fcrCore.FcrConnectionState[state]));
|
|
455
259
|
// @ts-ignore
|
|
456
|
-
window.
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
break;
|
|
469
|
-
case _type.ToolbarEvents.SET_STROKE_COLOR:
|
|
470
|
-
board.strokeColor = payload;
|
|
471
|
-
break;
|
|
472
|
-
case _type.ToolbarEvents.SET_STROKE_WIDTH:
|
|
473
|
-
this._boardInstance.strokeWidth = payload;
|
|
474
|
-
break;
|
|
475
|
-
case _type.ToolbarEvents.CLEAN:
|
|
476
|
-
board.clearPage();
|
|
477
|
-
break;
|
|
478
|
-
case _type.ToolbarEvents.REDO:
|
|
479
|
-
board.redo();
|
|
480
|
-
break;
|
|
481
|
-
case _type.ToolbarEvents.UNDO:
|
|
482
|
-
board.undo();
|
|
483
|
-
break;
|
|
484
|
-
case _type.ToolbarEvents.SET_PEN:
|
|
485
|
-
board.setInputType('pen');
|
|
486
|
-
break;
|
|
487
|
-
case _type.ToolbarEvents.SET_SHAPE:
|
|
488
|
-
board.setCurrentTool((0, _libs.convertTool)(payload));
|
|
489
|
-
break;
|
|
490
|
-
// case ToolbarEvents.CAPTURE_SCREEN:
|
|
491
|
-
// window.runtime.captureScreen({ hideWindow: true });
|
|
492
|
-
// break;
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
}, {
|
|
496
|
-
key: "setDrawing",
|
|
497
|
-
value: function setDrawing(drawing) {
|
|
498
|
-
this.logger.info("setDrawing method is called, the drawing is => ".concat(drawing));
|
|
499
|
-
this.drawing = drawing;
|
|
500
|
-
}
|
|
501
|
-
}, {
|
|
502
|
-
key: "_initBoardStyle",
|
|
503
|
-
value: function _initBoardStyle(whiteboard) {
|
|
504
|
-
var frameWidth = this.bounds.width;
|
|
505
|
-
var frameHeight = this.bounds.height;
|
|
506
|
-
this.logger.info("mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
|
|
507
|
-
this._boardView.style.width = "".concat(frameWidth, "px");
|
|
508
|
-
this._boardView.style.height = "".concat(frameHeight, "px");
|
|
509
|
-
whiteboard.view.style.height = "".concat(frameHeight, "px");
|
|
510
|
-
whiteboard.view.style.width = "".concat(frameWidth, "px");
|
|
511
|
-
whiteboard.setCanvasBackgroundColor('rgba(0, 0, 0, 0)');
|
|
512
|
-
whiteboard.enableCameraByMouse = false;
|
|
513
|
-
whiteboard.enableCameraByTouch = false;
|
|
514
|
-
// whiteboard.cameraBoundaryColor = 'rgba(0, 0, 0, 0)';
|
|
515
|
-
whiteboard.enableCameraBoundaryHighlight = false;
|
|
516
|
-
whiteboard.strokeColor = '#FFC908';
|
|
517
|
-
whiteboard.setCurrentTool('curve');
|
|
518
|
-
this._updateWindowSize(frameWidth, frameHeight);
|
|
519
|
-
this.logger.info("mount success current tool, ".concat(whiteboard.getCurrentTool(), ", updateViewport width: ").concat(frameWidth, " height: ").concat(frameHeight));
|
|
520
|
-
whiteboard.on('undoStackLength', function (steps) {
|
|
521
|
-
// isWindows() && window.runtime.browserWindow.blur();
|
|
522
|
-
// renderer.sendEvent({
|
|
523
|
-
// action: FcrUIRendererEventAction.SET_ANNOTATION_UNDO,
|
|
524
|
-
// payload: steps > 0,
|
|
525
|
-
// });
|
|
526
|
-
});
|
|
527
|
-
whiteboard.on('redoStackLength', function (steps) {
|
|
528
|
-
// isWindows() && window.runtime.browserWindow.blur();
|
|
529
|
-
// renderer.sendEvent({
|
|
530
|
-
// action: FcrUIRendererEventAction.SET_ANNOTATION_REDO,
|
|
531
|
-
// payload: steps > 0,
|
|
532
|
-
// });
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
}, {
|
|
536
|
-
key: "_handleSetTool",
|
|
537
|
-
value: function _handleSetTool(payload) {
|
|
538
|
-
var _this3 = this;
|
|
539
|
-
var board = this._boardInstance;
|
|
540
|
-
this.currentTool = 'none';
|
|
541
|
-
var currentTool = (0, _libs.convertTool)(payload);
|
|
542
|
-
if (board) {
|
|
543
|
-
board.setCurrentTool(currentTool);
|
|
544
|
-
var timber = setTimeout(function () {
|
|
545
|
-
var _this3$_boardDom;
|
|
546
|
-
(_this3$_boardDom = _this3._boardDom) === null || _this3$_boardDom === void 0 || _this3$_boardDom.getBoundingClientRect();
|
|
547
|
-
_this3.currentTool = currentTool;
|
|
548
|
-
clearTimeout(timber);
|
|
549
|
-
}, 600);
|
|
260
|
+
window.parent.FcrUIMainWindowRenderer.notifyObservers('onConnectionStateUpdated', state);
|
|
261
|
+
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
262
|
+
var _this$_annotationCont, _this$_boardInstance0, _this$_boardInstance1;
|
|
263
|
+
this.logger.info(// @ts-ignore
|
|
264
|
+
"[annotation-fragment]: connection state updated: ".concat(_fcrCore.FcrConnectionState[state], ", background color: ").concat(window.parent.FcrUIMainWindowRenderer.backgroundColor));
|
|
265
|
+
this._boardInstance = (_this$_annotationCont = this._annotationControl) === null || _this$_annotationCont === void 0 ? void 0 : _this$_annotationCont.getMainWindow();
|
|
266
|
+
var backgroundColor = 'transparent';
|
|
267
|
+
(_this$_boardInstance0 = this._boardInstance) === null || _this$_boardInstance0 === void 0 || _this$_boardInstance0.setBackgroundColor(backgroundColor);
|
|
268
|
+
(_this$_boardInstance1 = this._boardInstance) === null || _this$_boardInstance1 === void 0 || _this$_boardInstance1.clean();
|
|
269
|
+
this._boardInstance && this._boardInstance.addObserver(this._boardMainWindowObserver);
|
|
270
|
+
this._applyCachedToolState();
|
|
271
|
+
this._mount();
|
|
550
272
|
}
|
|
551
273
|
}
|
|
552
274
|
}, {
|
|
553
275
|
key: "_init",
|
|
554
276
|
value: function () {
|
|
555
|
-
var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function
|
|
556
|
-
var
|
|
557
|
-
|
|
558
|
-
|
|
277
|
+
var _init2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
278
|
+
var _this2 = this;
|
|
279
|
+
var boardOptions, _ref2, nickName, token, userId, appId, boardAppId, boardId, boardRegion, boardToken, config, engineConfig, engine;
|
|
280
|
+
return _regenerator["default"].wrap(function (_context2) {
|
|
281
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
559
282
|
case 0:
|
|
560
|
-
|
|
283
|
+
boardOptions = (0, _sharedStorage.getBoardOptions)();
|
|
284
|
+
_ref2 = boardOptions || {}, nickName = _ref2.nickName, token = _ref2.boardUserToken, userId = _ref2.boardUserUuid, appId = _ref2.rtmAppId, boardAppId = _ref2.boardAppId, boardId = _ref2.boardId, boardRegion = _ref2.boardRegion, boardToken = _ref2.boardToken;
|
|
285
|
+
if (token) {
|
|
286
|
+
_context2.next = 1;
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
this.logger.error("[annotation-fragment]: room token is not found");
|
|
290
|
+
return _context2.abrupt("return");
|
|
291
|
+
case 1:
|
|
292
|
+
if (userId) {
|
|
293
|
+
_context2.next = 2;
|
|
294
|
+
break;
|
|
295
|
+
}
|
|
296
|
+
this.logger.error("[annotation-fragment]: user id is not found");
|
|
297
|
+
return _context2.abrupt("return");
|
|
298
|
+
case 2:
|
|
299
|
+
if (appId) {
|
|
300
|
+
_context2.next = 3;
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
this.logger.error("[annotation-fragment]: app id is not found");
|
|
304
|
+
return _context2.abrupt("return");
|
|
305
|
+
case 3:
|
|
306
|
+
config = {
|
|
307
|
+
userId: userId,
|
|
308
|
+
nickName: nickName,
|
|
309
|
+
boardConfig: {
|
|
310
|
+
boardAppId: boardAppId,
|
|
311
|
+
boardId: boardId,
|
|
312
|
+
boardRegion: boardRegion,
|
|
313
|
+
boardToken: boardToken
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
this.logger.info("[annotation-fragment][initEngine]: init engine with config => ".concat(JSON.stringify(config)));
|
|
317
|
+
engineConfig = new _fcrCore.FcrCoreEngineConfig(_objectSpread({
|
|
318
|
+
appId: appId,
|
|
319
|
+
token: token,
|
|
320
|
+
userId: userId,
|
|
321
|
+
region: _fcrCore.FcrRegion.CN
|
|
322
|
+
}, _libs.engineRestConfig));
|
|
323
|
+
engine = new _fcrCore.FcrCoreEngine(engineConfig);
|
|
324
|
+
this._engineObserver = {
|
|
561
325
|
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
562
|
-
(0, _sharedStorage.setAnnotationEngineState)(state);
|
|
563
|
-
// renderer.sendEvent({
|
|
564
|
-
// action: FcrUIRendererEventAction.FRAGMENT_ANNOTATION_ENGINE_STATE,
|
|
565
|
-
// payload: state,
|
|
566
|
-
// });
|
|
567
326
|
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
327
|
+
_this2._engine = engine;
|
|
328
|
+
|
|
329
|
+
// 只需要初始化一次, 网络断开重连时不需要重复初始化
|
|
330
|
+
if (!_this2._annotationControl) {
|
|
331
|
+
_this2._initAnnotationControl();
|
|
573
332
|
}
|
|
333
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTED}");
|
|
574
334
|
}
|
|
575
335
|
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
576
|
-
|
|
577
|
-
|
|
336
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => DISCONNECTED, the engine is ".concat(_this2._engine));
|
|
337
|
+
_this2._engine && engine.login();
|
|
578
338
|
}
|
|
579
339
|
if (state === _fcrCore.FcrConnectionState.CONNECTING) {
|
|
580
|
-
|
|
340
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTING");
|
|
581
341
|
}
|
|
582
342
|
if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
|
|
583
|
-
|
|
343
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => RECONNECTING");
|
|
584
344
|
}
|
|
585
345
|
if (state === _fcrCore.FcrConnectionState.ABORTED) {
|
|
586
|
-
|
|
587
|
-
|
|
346
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => ABORTED, the engine is ".concat(_this2._engine));
|
|
347
|
+
_this2._engine && engine.login();
|
|
588
348
|
}
|
|
589
349
|
}
|
|
590
|
-
}
|
|
350
|
+
};
|
|
351
|
+
engine.addObserver(this._engineObserver);
|
|
591
352
|
engine.login();
|
|
592
|
-
|
|
593
|
-
// TODO: window
|
|
594
|
-
// @ts-ignore
|
|
595
|
-
window.runtime.browserWindow.hide();
|
|
596
|
-
case 1:
|
|
353
|
+
case 4:
|
|
597
354
|
case "end":
|
|
598
|
-
return
|
|
355
|
+
return _context2.stop();
|
|
599
356
|
}
|
|
600
|
-
},
|
|
357
|
+
}, _callee2, this);
|
|
601
358
|
}));
|
|
602
|
-
function _init(
|
|
359
|
+
function _init() {
|
|
603
360
|
return _init2.apply(this, arguments);
|
|
604
361
|
}
|
|
605
362
|
return _init;
|
|
606
363
|
}()
|
|
607
364
|
}, {
|
|
608
|
-
key: "
|
|
365
|
+
key: "_initAnnotationControl",
|
|
609
366
|
value: function () {
|
|
610
|
-
var
|
|
611
|
-
var
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
while (1) switch (_context7.prev = _context7.next) {
|
|
367
|
+
var _initAnnotationControl2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
368
|
+
var boardOptions, nickName, boardAppId, userId, boardId, region, boardToken, config, hasPrivilege;
|
|
369
|
+
return _regenerator["default"].wrap(function (_context3) {
|
|
370
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
615
371
|
case 0:
|
|
616
|
-
|
|
617
|
-
|
|
372
|
+
boardOptions = (0, _sharedStorage.getBoardOptions)(); // 字段校验
|
|
373
|
+
if (boardOptions) {
|
|
374
|
+
_context3.next = 1;
|
|
618
375
|
break;
|
|
619
376
|
}
|
|
620
|
-
|
|
377
|
+
this.logger.error("[annotation-fragment]: board options is not found");
|
|
378
|
+
return _context3.abrupt("return");
|
|
621
379
|
case 1:
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
currentTimeStamp = Date.now(); // @ts-ignore
|
|
630
|
-
this._boardRoom['traceId'] = "".concat(boardToken, "-").concat(boardId, "-").concat(userId, "-").concat(currentTimeStamp);
|
|
631
|
-
wbRoom.applicationManager.registerApplication(_imports.FcrWhiteboardApplication);
|
|
632
|
-
this.logger.info("bordRoom instance is created, start join room");
|
|
633
|
-
abortController = new AbortController();
|
|
634
|
-
this._openAbortController = abortController;
|
|
635
|
-
return _context7.abrupt("return", new Promise(/*#__PURE__*/function () {
|
|
636
|
-
var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6(resolve, reject) {
|
|
637
|
-
var retriesMax, _t2;
|
|
638
|
-
return _regenerator["default"].wrap(function (_context6) {
|
|
639
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
640
|
-
case 0:
|
|
641
|
-
// 监听中止信号
|
|
642
|
-
abortController.signal.addEventListener('abort', function () {
|
|
643
|
-
reject(new Error('join board room aborted'));
|
|
644
|
-
});
|
|
645
|
-
_context6.prev = 1;
|
|
646
|
-
retriesMax = 10;
|
|
647
|
-
_context6.next = 2;
|
|
648
|
-
return (0, _asyncRetry.retryAttempt)(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
649
|
-
return _regenerator["default"].wrap(function (_context4) {
|
|
650
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
651
|
-
case 0:
|
|
652
|
-
_context4.next = 1;
|
|
653
|
-
return wbRoom.joinRoom({
|
|
654
|
-
userId: userId,
|
|
655
|
-
nickName: nickName,
|
|
656
|
-
roomToken: boardToken,
|
|
657
|
-
sdkConfig: {
|
|
658
|
-
// @ts-ignore
|
|
659
|
-
region: region,
|
|
660
|
-
appIdentifier: appIdentifier
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
case 1:
|
|
664
|
-
case "end":
|
|
665
|
-
return _context4.stop();
|
|
666
|
-
}
|
|
667
|
-
}, _callee4);
|
|
668
|
-
})), [], {
|
|
669
|
-
retriesMax: retriesMax
|
|
670
|
-
}).fail(/*#__PURE__*/function () {
|
|
671
|
-
var _ref5 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee5(_ref4) {
|
|
672
|
-
var error, timeFn, currentRetry;
|
|
673
|
-
return _regenerator["default"].wrap(function (_context5) {
|
|
674
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
675
|
-
case 0:
|
|
676
|
-
error = _ref4.error, timeFn = _ref4.timeFn, currentRetry = _ref4.currentRetry;
|
|
677
|
-
if (!abortController.signal.aborted) {
|
|
678
|
-
_context5.next = 1;
|
|
679
|
-
break;
|
|
680
|
-
}
|
|
681
|
-
throw new Error('join board room aborted');
|
|
682
|
-
case 1:
|
|
683
|
-
_this5.logger.info("retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
|
|
684
|
-
_context5.next = 2;
|
|
685
|
-
return timeFn();
|
|
686
|
-
case 2:
|
|
687
|
-
return _context5.abrupt("return", true);
|
|
688
|
-
case 3:
|
|
689
|
-
case "end":
|
|
690
|
-
return _context5.stop();
|
|
691
|
-
}
|
|
692
|
-
}, _callee5);
|
|
693
|
-
}));
|
|
694
|
-
return function (_x4) {
|
|
695
|
-
return _ref5.apply(this, arguments);
|
|
696
|
-
};
|
|
697
|
-
}()).exec();
|
|
698
|
-
case 2:
|
|
699
|
-
if (!abortController.signal.aborted) {
|
|
700
|
-
_context6.next = 3;
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
throw new Error('join board room aborted');
|
|
704
|
-
case 3:
|
|
705
|
-
_this5.logger.info(// @ts-ignore
|
|
706
|
-
"join room success, traceId ".concat(_this5._boardRoom['traceId']));
|
|
707
|
-
wbRoom.userManager.on('join', _this5._handleBoardRoomUserJoin);
|
|
708
|
-
resolve(wbRoom);
|
|
709
|
-
_context6.next = 5;
|
|
710
|
-
break;
|
|
711
|
-
case 4:
|
|
712
|
-
_context6.prev = 4;
|
|
713
|
-
_t2 = _context6["catch"](1);
|
|
714
|
-
_this5.logger.error("join room failed");
|
|
715
|
-
reject(_t2);
|
|
716
|
-
case 5:
|
|
717
|
-
_context6.prev = 5;
|
|
718
|
-
_this5._openAbortController = null;
|
|
719
|
-
return _context6.finish(5);
|
|
720
|
-
case 6:
|
|
721
|
-
return _context6.abrupt("return", wbRoom);
|
|
722
|
-
case 7:
|
|
723
|
-
case "end":
|
|
724
|
-
return _context6.stop();
|
|
725
|
-
}
|
|
726
|
-
}, _callee6, null, [[1, 4, 5, 6]]);
|
|
727
|
-
}));
|
|
728
|
-
return function (_x2, _x3) {
|
|
729
|
-
return _ref2.apply(this, arguments);
|
|
730
|
-
};
|
|
731
|
-
}()));
|
|
380
|
+
nickName = boardOptions.nickName, boardAppId = boardOptions.boardAppId, userId = boardOptions.boardUserUuid, boardId = boardOptions.boardId, region = boardOptions.boardRegion, boardToken = boardOptions.boardToken; // 校验必需字段
|
|
381
|
+
if (userId) {
|
|
382
|
+
_context3.next = 2;
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
this.logger.error("[annotation-fragment]: boardUserUuid is required");
|
|
386
|
+
return _context3.abrupt("return");
|
|
732
387
|
case 2:
|
|
388
|
+
if (boardAppId) {
|
|
389
|
+
_context3.next = 3;
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
this.logger.error("[annotation-fragment]: boardAppId is required");
|
|
393
|
+
return _context3.abrupt("return");
|
|
394
|
+
case 3:
|
|
395
|
+
if (boardId) {
|
|
396
|
+
_context3.next = 4;
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
this.logger.error("[annotation-fragment]: boardId is required");
|
|
400
|
+
return _context3.abrupt("return");
|
|
401
|
+
case 4:
|
|
402
|
+
if (region) {
|
|
403
|
+
_context3.next = 5;
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
this.logger.error("[annotation-fragment]: boardRegion is required");
|
|
407
|
+
return _context3.abrupt("return");
|
|
408
|
+
case 5:
|
|
409
|
+
if (boardToken) {
|
|
410
|
+
_context3.next = 6;
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
this.logger.error("[annotation-fragment]: boardToken is required");
|
|
414
|
+
return _context3.abrupt("return");
|
|
415
|
+
case 6:
|
|
416
|
+
// 可选字段校验和默认值处理
|
|
417
|
+
if (!nickName) {
|
|
418
|
+
this.logger.warn("[annotation-fragment]: nickName is not provided, using default value");
|
|
419
|
+
}
|
|
420
|
+
config = {
|
|
421
|
+
userId: userId,
|
|
422
|
+
userName: nickName,
|
|
423
|
+
size: this._viewportSize
|
|
424
|
+
};
|
|
425
|
+
this.logger.info("[annotation-fragment]: start create annotation sub process with config: ".concat(JSON.stringify(config)));
|
|
426
|
+
hasPrivilege = this.mainWindowRenderer.hasWriteBoardPermission;
|
|
427
|
+
this._annotationControl = new _imports.FcrAnnotationControlFactoryImpl().createForSubProcess(
|
|
428
|
+
// @ts-ignore
|
|
429
|
+
this._engine._rteEngine._rtmClient._client, hasPrivilege,
|
|
430
|
+
// @ts-ignore
|
|
431
|
+
config);
|
|
432
|
+
this.logger.info("[annotation-fragment]: annotation sub process created, the control is ".concat(this._annotationControl));
|
|
433
|
+
this.mainWindowRenderer.addObserver(this._mainWindowObserver);
|
|
434
|
+
this._annotationControl.addObserver(this._boardObserver);
|
|
435
|
+
this._lastToolPayload = this.mainWindowRenderer.toolPayload;
|
|
436
|
+
this._lastStrokeColor = this.mainWindowRenderer.strokeColor;
|
|
437
|
+
this._lastStrokeWidth = this.mainWindowRenderer.strokeWidth;
|
|
438
|
+
_context3.next = 7;
|
|
439
|
+
return this._annotationControl.open();
|
|
440
|
+
case 7:
|
|
441
|
+
this.logger.info("[annotation-fragment]: annotation opened, the instance");
|
|
442
|
+
case 8:
|
|
733
443
|
case "end":
|
|
734
|
-
return
|
|
444
|
+
return _context3.stop();
|
|
735
445
|
}
|
|
736
|
-
},
|
|
446
|
+
}, _callee3, this);
|
|
737
447
|
}));
|
|
738
|
-
function
|
|
739
|
-
return
|
|
448
|
+
function _initAnnotationControl() {
|
|
449
|
+
return _initAnnotationControl2.apply(this, arguments);
|
|
740
450
|
}
|
|
741
|
-
return
|
|
451
|
+
return _initAnnotationControl;
|
|
742
452
|
}()
|
|
743
453
|
}, {
|
|
744
|
-
key: "
|
|
745
|
-
value: function
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
(
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
}
|
|
759
|
-
this.logger.debug('after create engine');
|
|
760
|
-
return engine;
|
|
761
|
-
} catch (e) {
|
|
762
|
-
this.logger.error("create engine failed, error: ".concat(e));
|
|
763
|
-
throw e;
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
}, {
|
|
767
|
-
key: "_launchHandler",
|
|
768
|
-
value: function _launchHandler(appId, app) {
|
|
769
|
-
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
770
|
-
this.logger.info("launch event is triggered => ".concat(app.selfUserId));
|
|
771
|
-
this._boardView.appendChild(app.view);
|
|
772
|
-
this._initBoardStyle(app);
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
}, {
|
|
776
|
-
key: "_terminalHandler",
|
|
777
|
-
value: function _terminalHandler(appId, app) {
|
|
778
|
-
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
779
|
-
var _this$_boardView;
|
|
780
|
-
this.logger.info("terminal event is triggered => ".concat(app.selfUserId));
|
|
781
|
-
(app === null || app === void 0 ? void 0 : app.view) && this._boardView.hasChildNodes() && ((_this$_boardView = this._boardView) === null || _this$_boardView === void 0 ? void 0 : _this$_boardView.removeChild(app.view));
|
|
454
|
+
key: "_applyCachedToolState",
|
|
455
|
+
value: function _applyCachedToolState() {
|
|
456
|
+
if (!this._boardInstance) return;
|
|
457
|
+
if (this._lastToolPayload) {
|
|
458
|
+
var _this$_lastToolPayloa = this._lastToolPayload,
|
|
459
|
+
tool = _this$_lastToolPayloa.tool,
|
|
460
|
+
shape = _this$_lastToolPayloa.shape;
|
|
461
|
+
if (shape !== undefined) {
|
|
462
|
+
var convertedTool = (0, _libs.convertShapeToBoardToolType)(shape);
|
|
463
|
+
this.currentTool = convertedTool;
|
|
464
|
+
this._boardInstance.setToolType(convertedTool);
|
|
465
|
+
} else if (tool !== undefined) {
|
|
466
|
+
this.currentTool = tool;
|
|
467
|
+
this._boardInstance.setToolType(tool);
|
|
468
|
+
}
|
|
782
469
|
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
key: "_resizeToMax",
|
|
786
|
-
value: function _resizeToMax(w, h) {
|
|
787
|
-
var scaleBase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1920;
|
|
788
|
-
var scale = scaleBase / Math.max(w, h);
|
|
789
|
-
return {
|
|
790
|
-
width: Math.round(w * scale),
|
|
791
|
-
height: Math.round(h * scale)
|
|
792
|
-
};
|
|
793
|
-
}
|
|
794
|
-
}, {
|
|
795
|
-
key: "_cancelCurrentUpdateWindowSizeTimber",
|
|
796
|
-
value: function _cancelCurrentUpdateWindowSizeTimber(stage) {
|
|
797
|
-
if (this._pollingCancelHandler && typeof this._pollingCancelHandler === 'function') {
|
|
798
|
-
this._pollingCancelHandler();
|
|
799
|
-
this.logger.info("end a new 30s polling to updateWindowSize, when ".concat(stage));
|
|
470
|
+
if (this._lastStrokeColor) {
|
|
471
|
+
this._boardInstance.setStrokeColor((0, _tinycolor["default"])(this._lastStrokeColor).toRgb());
|
|
800
472
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
key: "_handlePollingUpdateWindowSize",
|
|
804
|
-
value: function _handlePollingUpdateWindowSize(stage) {
|
|
805
|
-
this._cancelCurrentUpdateWindowSizeTimber(stage);
|
|
806
|
-
this._pollingCancelHandler = (0, _utils.startPolling)(this._updateWindowSizeWithCurrentBounds);
|
|
807
|
-
this.logger.info("start a new 30s polling to updateWindowSize, after ".concat(stage));
|
|
808
|
-
}
|
|
809
|
-
}, {
|
|
810
|
-
key: "_handleBoardRoomUserJoin",
|
|
811
|
-
value: function _handleBoardRoomUserJoin(user) {
|
|
812
|
-
// 共享发起端 监听白板房间有用户加入时,重置30s轮询updateWindowSize
|
|
813
|
-
this._handlePollingUpdateWindowSize('send-board-room-user-join');
|
|
814
|
-
}
|
|
815
|
-
}, {
|
|
816
|
-
key: "_syncScreenShareOwnerOpenDone",
|
|
817
|
-
value: function _syncScreenShareOwnerOpenDone() {
|
|
818
|
-
this.logger.info('syncScreenShareOwnerOpenDone');
|
|
819
|
-
// renderer.sendEvent({
|
|
820
|
-
// action: FcrUIRendererEventAction.FRAGMENT_ANNOTATION_SYNC_OWNER_OPEN_DONE,
|
|
821
|
-
// payload: null,
|
|
822
|
-
// });
|
|
823
|
-
}
|
|
824
|
-
}, {
|
|
825
|
-
key: "_checkForConnect",
|
|
826
|
-
value: function _checkForConnect() {
|
|
827
|
-
var boardOptions = (0, _sharedStorage.getBoardOptions)();
|
|
828
|
-
var readyToConnect = !!boardOptions;
|
|
829
|
-
var isEngineInitialized = this._isEngineInitialized;
|
|
830
|
-
this.logger.info("check for connect, readyToConnect: ".concat(readyToConnect, ", isEngineInitialized: ").concat(isEngineInitialized));
|
|
831
|
-
if (!isEngineInitialized && readyToConnect) {
|
|
832
|
-
this._checkForConnectTask.stop();
|
|
833
|
-
var rtmAppId = boardOptions.rtmAppId,
|
|
834
|
-
boardAppId = boardOptions.boardAppId,
|
|
835
|
-
boardId = boardOptions.boardId,
|
|
836
|
-
boardRegion = boardOptions.boardRegion,
|
|
837
|
-
boardToken = boardOptions.boardToken,
|
|
838
|
-
boardUserToken = boardOptions.boardUserToken,
|
|
839
|
-
userId = boardOptions.boardUserUuid,
|
|
840
|
-
nickName = boardOptions.nickName;
|
|
841
|
-
this._config = {
|
|
842
|
-
appId: rtmAppId,
|
|
843
|
-
userId: userId,
|
|
844
|
-
region: boardRegion,
|
|
845
|
-
appIdentifier: boardAppId,
|
|
846
|
-
boardId: boardId,
|
|
847
|
-
boardToken: boardToken,
|
|
848
|
-
nickName: nickName
|
|
849
|
-
};
|
|
850
|
-
this.logger.info("boardinfo => ".concat((0, _imports.jsonstring)(this._config)));
|
|
851
|
-
var engine = this._createEngine({
|
|
852
|
-
userId: userId,
|
|
853
|
-
roomToken: boardUserToken,
|
|
854
|
-
appId: rtmAppId
|
|
855
|
-
});
|
|
856
|
-
|
|
857
|
-
// @ts-ignore
|
|
858
|
-
window._coreEngine = engine;
|
|
859
|
-
this.logger.info("login engine with the following config: annotationRtmAppId => ".concat(rtmAppId, ", boardOptions => ").concat((0, _imports.jsonstring)(boardOptions)));
|
|
860
|
-
this._init(engine);
|
|
861
|
-
this._isEngineInitialized = true;
|
|
473
|
+
if (this._lastStrokeWidth !== undefined) {
|
|
474
|
+
this._boardInstance.setStrokeWidth(this._lastStrokeWidth);
|
|
862
475
|
}
|
|
863
476
|
}
|
|
864
477
|
}]);
|
|
865
478
|
}();
|
|
866
479
|
_FragmentAnnotationStore = FragmentAnnotationStore;
|
|
867
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
_init_currentTool = _applyDecs$e[2];
|
|
871
|
-
_init_drawing = _applyDecs$e[3];
|
|
872
|
-
_initProto = _applyDecs$e[4];
|
|
480
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "currentTool"], [_decorator.bound, 2, "setViewportSize"], [_decorator.bound, 2, "handleBoardDomLoad"], [_decorator.bound, 2, "_mount"], [_decorator.bound, 2, "_handleConnectionStateUpdated"], [_decorator.bound, 2, "_init"], [_decorator.bound, 2, "_initAnnotationControl"]], []).e, 2);
|
|
481
|
+
_init_currentTool = _applyDecs$e[0];
|
|
482
|
+
_initProto = _applyDecs$e[1];
|
|
873
483
|
var FragmentAnnotationStoreContext = exports.FragmentAnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|