fcr-ui-scene 3.6.4 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/creator.d.ts +4 -3
- package/lib/creator.js +146 -111
- package/lib/electron/app.js +1 -1
- package/lib/electron/bootstrap-sdk.js +49 -4
- package/lib/electron/injections.d.ts +5 -1
- package/lib/electron/injections.js +14 -2
- package/lib/electron/ipc/type.d.ts +8 -4
- package/lib/electron/ipc/type.js +10 -4
- package/lib/electron/logger.js +1 -1
- package/lib/electron/main.js +5 -2
- package/lib/electron/preload.js +34 -5
- package/lib/fragments/annotation/index.d.ts +2 -2
- package/lib/fragments/annotation/index.js +38 -28
- package/lib/fragments/annotation/libs.d.ts +2 -2
- package/lib/fragments/annotation/store.d.ts +21 -4
- package/lib/fragments/annotation/store.js +281 -84
- package/lib/fragments/annotation/style.css +9 -0
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.js +1 -1
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.js +1 -1
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.d.ts +26 -2
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/store.js +57 -8
- package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.js +36 -3
- package/lib/fragments/annotation/view.d.ts +1 -0
- package/lib/fragments/annotation/view.js +52 -10
- package/lib/modules/action-bar/components/apps/index.js +54 -38
- package/lib/modules/action-bar/components/chat/index.js +13 -34
- package/lib/modules/action-bar/components/collapse/index.js +1 -1
- package/lib/modules/action-bar/components/leave/index.js +9 -9
- package/lib/modules/action-bar/components/more/index.js +26 -27
- package/lib/modules/action-bar/components/participants/index.js +23 -39
- package/lib/modules/action-bar/components/record/index.js +7 -13
- package/lib/modules/action-bar/components/screen-share/index.js +4 -24
- package/lib/modules/action-bar/components/security/index.js +29 -34
- package/lib/modules/action-bar/components/settings/index.js +13 -19
- package/lib/modules/action-bar/index.d.ts +4 -0
- package/lib/modules/action-bar/index.js +3 -1
- package/lib/modules/action-bar/store.d.ts +16 -6
- package/lib/modules/action-bar/store.js +63 -25
- package/lib/modules/action-bar/types.d.ts +3 -3
- package/lib/modules/action-bar/view.js +2 -3
- package/lib/modules/annotation/annotation-index.d.ts +2 -0
- package/lib/modules/annotation/annotation-index.js +80 -0
- package/lib/modules/annotation/annotation-toolbar-store.d.ts +82 -0
- package/lib/modules/annotation/annotation-toolbar-store.js +501 -0
- package/lib/modules/annotation/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/annotation/components/color-picker/components/color.js +38 -0
- package/lib/modules/annotation/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/panel.js +109 -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 +47 -0
- package/lib/modules/annotation/components/eraser-picker.d.ts +4 -0
- package/lib/modules/annotation/components/eraser-picker.js +144 -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 +78 -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 +155 -0
- package/lib/modules/annotation/components/screen-capture-picker.d.ts +4 -0
- package/lib/modules/annotation/components/screen-capture-picker.js +85 -0
- package/lib/modules/annotation/components/shape-picker.d.ts +4 -0
- package/lib/modules/annotation/components/shape-picker.js +210 -0
- package/lib/modules/annotation/hooks/index.d.ts +14 -0
- package/lib/modules/annotation/hooks/index.js +292 -0
- package/lib/modules/annotation/index.d.ts +4 -1
- package/lib/modules/annotation/index.js +20 -22
- package/lib/modules/annotation/store.d.ts +59 -18
- package/lib/modules/annotation/store.js +503 -263
- package/lib/modules/annotation/style.css +10 -0
- package/lib/modules/annotation/view.js +9 -11
- package/lib/modules/chat/chat-room-store.js +5 -2
- package/lib/modules/chat/components/chat-select/index.js +1 -1
- package/lib/modules/chat/components/chat-select/select-item/index.js +10 -3
- package/lib/modules/chat/components/message-list/message-item/index.js +4 -2
- package/lib/modules/chat/index.d.ts +2 -0
- package/lib/modules/chat/index.js +13 -3
- package/lib/modules/chat/store.d.ts +3 -0
- package/lib/modules/chat/store.js +12 -6
- package/lib/modules/chat/types.d.ts +1 -0
- package/lib/modules/chat/types.js +2 -1
- package/lib/modules/chat/util.js +2 -1
- package/lib/modules/chat/view.js +6 -3
- package/lib/modules/{action-bar/components → components}/apps/app-item/index.d.ts +1 -1
- package/lib/modules/components/apps/app-list.d.ts +3 -0
- package/lib/modules/{action-bar/components → components}/apps/app-list.js +2 -4
- package/lib/modules/components/apps/types.d.ts +14 -0
- package/lib/modules/components/apps/types.js +6 -0
- package/lib/modules/components/device-control/components/carmera/index.js +71 -68
- package/lib/modules/components/device-control/components/microphone/index.js +99 -97
- package/lib/modules/components/device-control/store.d.ts +1 -1
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +7 -7
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +0 -2
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +4 -7
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +0 -1
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +19 -36
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +1 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +9 -2
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +0 -3
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +15 -11
- package/lib/modules/components/member-window/components/member-actions/index.js +10 -2
- package/lib/modules/components/member-window/components/member-actions/libs/index.js +2 -2
- package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.d.ts +12 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player-with-zoom.js +75 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +1 -7
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +7 -47
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.d.ts +12 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player-with-zoom.js +68 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +1 -9
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +7 -49
- package/lib/modules/components/member-window/components/video-player/components/zoomable-container.d.ts +15 -0
- package/lib/modules/components/member-window/components/video-player/components/zoomable-container.js +255 -0
- package/lib/modules/components/member-window/components/video-player/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/video-player/index.js +8 -2
- package/lib/modules/components/member-window/index.css +16 -6
- package/lib/modules/components/member-window/index.d.ts +1 -1
- package/lib/modules/components/member-window/index.js +12 -4
- package/lib/modules/components/member-window/types.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +6 -5
- package/lib/modules/control-bar/components/annotation-button/index.js +21 -8
- package/lib/modules/control-bar/components/more-actions/index.css +13 -0
- package/lib/modules/control-bar/components/more-actions/index.js +1 -1
- package/lib/modules/control-bar/components/share-audio/index.css +90 -0
- package/lib/modules/control-bar/components/share-audio/index.d.ts +15 -0
- package/lib/modules/control-bar/components/share-audio/index.js +173 -0
- package/lib/modules/control-bar/components/share-state-nav/index.css +5 -0
- package/lib/modules/control-bar/components/share-state-nav/index.js +14 -2
- package/lib/modules/control-bar/index.d.ts +2 -0
- package/lib/modules/control-bar/index.js +9 -1
- package/lib/modules/control-bar/store.d.ts +16 -7
- package/lib/modules/control-bar/store.js +36 -12
- package/lib/modules/control-bar/view.d.ts +4 -0
- package/lib/modules/control-bar/view.js +180 -90
- package/lib/modules/device-pretest/store.d.ts +1 -1
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +1 -1
- package/lib/modules/dialog/components/dialog-container/index.css +1 -0
- package/lib/modules/dialog/components/dialog-container/index.d.ts +2 -1
- package/lib/modules/dialog/components/dialog-container/index.js +27 -10
- package/lib/modules/dialog/components/host-area-container/index.js +4 -4
- package/lib/modules/dialog/components/normal-window/index.d.ts +19 -0
- package/lib/modules/dialog/components/normal-window/index.js +69 -0
- package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.js +17 -15
- package/lib/modules/dialog/dialogs/chat/components/actions.d.ts +1 -0
- package/lib/modules/dialog/dialogs/chat/components/actions.js +33 -0
- package/lib/modules/dialog/{components → dialogs}/chat/index.d.ts +1 -1
- package/lib/modules/dialog/dialogs/chat/index.js +59 -0
- package/lib/modules/dialog/dialogs/confirm-leave-meeting/index.d.ts +6 -0
- package/lib/modules/dialog/{components → dialogs}/confirm-leave-meeting/index.js +13 -37
- package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.js +19 -12
- package/lib/modules/dialog/{components → dialogs}/control-bar/index.js +2 -2
- package/lib/modules/dialog/{components → dialogs}/device-setting/index.js +20 -13
- package/lib/modules/dialog/dialogs/end-meeting/index.d.ts +12 -0
- package/lib/modules/dialog/dialogs/end-meeting/index.js +45 -0
- package/lib/modules/dialog/{components/interpreter/electron.js → dialogs/interpreter/index.js} +17 -11
- package/lib/modules/dialog/dialogs/invite/index.d.ts +3 -0
- package/lib/modules/dialog/{components → dialogs}/invite/index.js +9 -25
- package/lib/modules/dialog/dialogs/live-streaming/index.d.ts +2 -0
- package/lib/modules/dialog/{components → dialogs}/live-streaming/index.js +11 -34
- package/lib/modules/dialog/dialogs/participant/components/actions.d.ts +1 -0
- package/lib/modules/dialog/dialogs/participant/components/actions.js +32 -0
- package/lib/modules/dialog/dialogs/participant/components/title.d.ts +1 -0
- package/lib/modules/dialog/dialogs/participant/components/title.js +19 -0
- package/lib/modules/dialog/dialogs/participant/index.d.ts +2 -0
- package/lib/modules/dialog/dialogs/participant/index.js +53 -0
- package/lib/modules/dialog/dialogs/pre-setting/index.js +62 -0
- package/lib/modules/dialog/dialogs/rename/index.js +35 -0
- package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/{components → dialogs}/video-window/index.js +11 -8
- package/lib/modules/dialog/{components → dialogs}/whiteboard/index.js +2 -3
- package/lib/modules/dialog/{components → dialogs}/widget/electron.js +1 -1
- package/lib/modules/dialog/{components → dialogs}/widget/index.js +1 -1
- package/lib/modules/dialog/hooks/use-web-drag.d.ts +8 -0
- package/lib/modules/dialog/hooks/use-web-drag.js +73 -0
- package/lib/modules/dialog/hooks/useElectron.d.ts +2 -7
- package/lib/modules/dialog/hooks/useElectron.js +46 -156
- package/lib/modules/dialog/index.d.ts +4 -0
- package/lib/modules/dialog/index.js +4 -2
- package/lib/modules/dialog/level-config.d.ts +11 -0
- package/lib/modules/dialog/level-config.js +21 -0
- package/lib/modules/dialog/store.d.ts +15 -6
- package/lib/modules/dialog/store.js +40 -54
- package/lib/modules/dialog/type.d.ts +15 -12
- package/lib/modules/event-confirm/components/window/index.d.ts +1 -4
- package/lib/modules/event-confirm/components/window/index.js +34 -23
- package/lib/modules/event-confirm/index.d.ts +2 -0
- package/lib/modules/event-confirm/index.js +3 -2
- package/lib/modules/event-confirm/store.d.ts +9 -1
- package/lib/modules/event-confirm/store.js +24 -16
- package/lib/modules/event-confirm/view.js +11 -22
- package/lib/modules/event-sound/index.d.ts +2 -0
- package/lib/modules/event-sound/index.js +8 -1
- package/lib/modules/event-toast/index.css +10 -0
- package/lib/modules/event-toast/store.d.ts +1 -1
- package/lib/modules/event-toast/store.js +17 -15
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +4 -2
- package/lib/modules/interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +2 -1
- package/lib/modules/interpreter/store.d.ts +1 -0
- package/lib/modules/interpreter/store.js +12 -5
- package/lib/modules/interpreter/view.js +7 -1
- package/lib/modules/layout/components/Aside.js +4 -0
- package/lib/modules/layout/components/Carousel.js +3 -1
- package/lib/modules/layout/components/CommonVideoRenderer.d.ts +3 -1
- package/lib/modules/layout/components/CommonVideoRenderer.js +13 -9
- package/lib/modules/layout/components/Gallery.js +11 -3
- package/lib/modules/layout/index.css +1 -0
- package/lib/modules/layout/index.d.ts +2 -0
- package/lib/modules/layout/index.js +4 -3
- package/lib/modules/layout/store.d.ts +9 -5
- package/lib/modules/layout/store.js +38 -46
- package/lib/modules/participant/components/confirm-input/index.css +4 -0
- package/lib/modules/participant/components/confirm-input/index.d.ts +1 -0
- package/lib/modules/participant/components/confirm-input/index.js +2 -1
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +2 -1
- package/lib/modules/participant/components/participants/components/participants/index.js +11 -3
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +7 -3
- package/lib/modules/participant/components/participants/types.d.ts +1 -0
- package/lib/modules/participant/store.d.ts +2 -1
- package/lib/modules/participant/store.js +23 -9
- package/lib/modules/phone-audio-connect/store.d.ts +4 -4
- package/lib/modules/setting/audio-settings/audio-settings.js +6 -17
- package/lib/modules/setting/config.d.ts +16 -0
- package/lib/modules/setting/config.js +17 -1
- package/lib/modules/setting/index.d.ts +2 -4
- package/lib/modules/setting/index.js +7 -16
- package/lib/modules/setting/minutes-settings/minutes-settings.js +0 -4
- package/lib/modules/setting/state/index.js +5 -5
- package/lib/modules/setting/store.d.ts +37 -33
- package/lib/modules/setting/store.js +275 -261
- package/lib/modules/setting/translate-settings/language-select.js +0 -2
- package/lib/modules/setting/video-settings/video-settings-basic.js +6 -6
- package/lib/modules/setting/video-settings/video-settings.js +2 -2
- package/lib/modules/setting/view.js +1 -1
- package/lib/modules/share-screen/components/control-bar/index.css +75 -0
- package/lib/modules/share-screen/components/control-bar/index.d.ts +3 -0
- package/lib/modules/share-screen/components/control-bar/index.js +88 -0
- package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.d.ts +8 -0
- package/lib/modules/share-screen/components/control-bar/items/annotation-edit-btn/index.js +46 -0
- package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/full-container-btn/index.js +32 -0
- package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/original-size-btn/index.js +32 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-in-btn/index.js +32 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.d.ts +6 -0
- package/lib/modules/share-screen/components/control-bar/items/zoom-out-btn/index.js +32 -0
- package/lib/modules/share-screen/components/selection/index.js +28 -14
- package/lib/modules/share-screen/components/share-scenario/index.d.ts +5 -0
- package/lib/modules/share-screen/components/share-scenario/index.js +47 -0
- package/lib/modules/share-screen/index.d.ts +4 -2
- package/lib/modules/share-screen/index.js +11 -2
- package/lib/modules/share-screen/store.d.ts +32 -11
- package/lib/modules/share-screen/store.js +273 -192
- package/lib/modules/share-screen/view.js +2 -2
- package/lib/modules/state-bar/index.js +2 -3
- package/lib/modules/state-bar/layout-config.d.ts +2 -4
- package/lib/modules/state-bar/layout-config.js +10 -5
- package/lib/modules/state-bar/live-streaming-state.js +0 -1
- package/lib/modules/state-bar/store.d.ts +7 -7
- package/lib/modules/state-bar/store.js +17 -15
- package/lib/modules/state-bar/view.js +19 -23
- package/lib/modules/video-window/components/members/index.js +3 -2
- package/lib/modules/video-window/index.js +0 -3
- package/lib/modules/waiting-room-layout/index.css +3 -3
- package/lib/modules/waiting-room-layout/index.js +2 -2
- package/lib/modules/waiting-room-layout/view.js +1 -0
- package/lib/modules/whiteboard/components/control-bar/index.js +2 -2
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +4 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +4 -4
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +0 -14
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +4 -155
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +4 -2
- package/lib/modules/whiteboard/components/toolbar/store.js +37 -25
- package/lib/modules/whiteboard/components/toolbar/style.css +1 -0
- package/lib/modules/whiteboard/index.d.ts +3 -1
- package/lib/modules/whiteboard/index.js +26 -23
- package/lib/modules/widget/view.js +4 -0
- package/lib/providers/ability-provider.d.ts +2 -0
- package/lib/providers/annotation-provider.d.ts +43 -47
- package/lib/providers/annotation-provider.js +94 -142
- package/lib/providers/app-list-provider.d.ts +98 -0
- package/lib/providers/app-list-provider.js +251 -0
- package/lib/providers/device-provider.d.ts +31 -23
- package/lib/providers/device-provider.js +495 -444
- package/lib/providers/device-stream-provider.js +2 -2
- package/lib/providers/event-provider.d.ts +0 -4
- package/lib/providers/event-provider.js +0 -10
- package/lib/providers/interpreter-provider.js +10 -7
- package/lib/providers/privilege-provider.d.ts +1 -1
- package/lib/providers/privilege-provider.js +3 -2
- package/lib/providers/renderer-provider.d.ts +1 -0
- package/lib/providers/renderer-provider.js +7 -2
- package/lib/providers/room-provider.d.ts +5 -1
- package/lib/providers/room-provider.js +44 -16
- package/lib/providers/screen-share-provider.d.ts +73 -17
- package/lib/providers/screen-share-provider.js +222 -100
- package/lib/providers/sharing-provider.d.ts +0 -1
- package/lib/providers/sharing-provider.js +3 -9
- package/lib/providers/user-setting-storage-provider.d.ts +1 -0
- package/lib/providers/user-setting-storage-provider.js +5 -12
- package/lib/providers/widget-provider.d.ts +19 -0
- package/lib/providers/widget-provider.js +28 -2
- package/lib/runtime.d.ts +10 -1
- package/lib/scenes/main-scene.d.ts +12 -2
- package/lib/scenes/main-scene.js +54 -28
- package/lib/scenes/waiting-scene.d.ts +11 -0
- package/lib/scenes/waiting-scene.js +34 -8
- package/lib/schema.d.ts +6 -0
- package/lib/schema.js +5 -1
- package/lib/shared-data-source/annotation-data.d.ts +17 -0
- package/lib/shared-data-source/annotation-data.js +110 -0
- package/lib/shared-data-source/app-list-data.d.ts +34 -0
- package/lib/shared-data-source/app-list-data.js +133 -0
- package/lib/shared-data-source/config.d.ts +26 -7
- package/lib/shared-data-source/config.js +29 -11
- package/lib/shared-data-source/confirm-data.d.ts +25 -0
- package/lib/shared-data-source/confirm-data.js +97 -0
- package/lib/shared-data-source/interpreter.d.ts +1 -0
- package/lib/shared-data-source/layout-data.d.ts +2 -0
- package/lib/shared-data-source/layout-data.js +14 -3
- package/lib/shared-data-source/meeting-time.d.ts +23 -1
- package/lib/shared-data-source/meeting-time.js +160 -43
- package/lib/shared-data-source/member-data.d.ts +10 -9
- package/lib/shared-data-source/member-data.js +55 -48
- package/lib/shared-data-source/screen-share-data.d.ts +100 -17
- package/lib/shared-data-source/screen-share-data.js +142 -22
- package/lib/shared-data-source/setting.d.ts +36 -4
- package/lib/shared-data-source/setting.js +92 -57
- package/lib/shared-data-source/video-window.d.ts +3 -0
- package/lib/shared-data-source/video-window.js +52 -30
- package/lib/shared-data-source/waiting-room.js +4 -2
- package/lib/translations/enUS.d.ts +62 -7
- package/lib/translations/enUS.js +71 -14
- package/lib/translations/zhCN.d.ts +62 -7
- package/lib/translations/zhCN.js +73 -16
- package/lib/type.d.ts +23 -5
- package/lib/type.js +6 -2
- package/lib/ui-manager.d.ts +5 -16
- package/lib/ui-manager.js +15 -57
- package/lib/ui-scene.d.ts +31 -6
- package/lib/ui-scene.js +180 -169
- package/lib/utilities/constant.d.ts +67 -63
- package/lib/utilities/constant.js +65 -61
- package/lib/utilities/dialog-utils.d.ts +66 -0
- package/lib/utilities/dialog-utils.js +188 -0
- package/lib/utilities/logger.js +3 -3
- package/lib/utilities/meeting-detail.js +1 -1
- package/lib/utilities/parameters.d.ts +1 -0
- package/lib/utilities/parameters.js +5 -1
- package/lib/utilities/renderer-event.d.ts +1 -1
- package/lib/utilities/screen-capture-permission.d.ts +1 -0
- package/lib/utilities/screen-capture-permission.js +9 -1
- package/lib/utilities/tools.d.ts +0 -66
- package/lib/utilities/tools.js +9 -186
- package/package.json +5 -6
- package/public/index.html +11 -1
- package/lib/modules/action-bar/components/apps/app-list.d.ts +0 -3
- package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +0 -17
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -30
- package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +0 -10
- package/lib/modules/action-bar/components/apps/useBeautyBackground.js +0 -36
- package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +0 -14
- package/lib/modules/action-bar/components/apps/useInterpreter.js +0 -37
- package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +0 -16
- package/lib/modules/action-bar/components/apps/useLiveStreaming.js +0 -41
- package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +0 -10
- package/lib/modules/action-bar/components/apps/useWidgetList.js +0 -39
- package/lib/modules/annotation/components/control-bar/index.css +0 -48
- package/lib/modules/annotation/components/control-bar/index.d.ts +0 -3
- package/lib/modules/annotation/components/control-bar/index.js +0 -142
- package/lib/modules/annotation/components/toolbar/index.d.ts +0 -0
- package/lib/modules/annotation/components/toolbar/index.js +0 -1
- package/lib/modules/dialog/components/chat/electron.d.ts +0 -2
- package/lib/modules/dialog/components/chat/electron.js +0 -35
- package/lib/modules/dialog/components/chat/index.js +0 -67
- package/lib/modules/dialog/components/confirm-leave-meeting/index.d.ts +0 -6
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +0 -5
- package/lib/modules/dialog/components/connection-gateway/electron.js +0 -33
- package/lib/modules/dialog/components/device-setting/electron.d.ts +0 -2
- package/lib/modules/dialog/components/device-setting/electron.js +0 -37
- package/lib/modules/dialog/components/interpreter/electron.d.ts +0 -2
- package/lib/modules/dialog/components/interpreter/index.js +0 -33
- package/lib/modules/dialog/components/invite/index.d.ts +0 -3
- package/lib/modules/dialog/components/live-streaming/index.d.ts +0 -4
- package/lib/modules/dialog/components/participant/electron.d.ts +0 -2
- package/lib/modules/dialog/components/participant/electron.js +0 -35
- package/lib/modules/dialog/components/participant/index.d.ts +0 -2
- package/lib/modules/dialog/components/participant/index.js +0 -65
- package/lib/modules/dialog/components/pre-setting/electron.d.ts +0 -2
- package/lib/modules/dialog/components/pre-setting/electron.js +0 -51
- package/lib/modules/dialog/components/pre-setting/index.js +0 -38
- package/lib/modules/dialog/components/pre-setting-container/component/body.d.ts +0 -8
- package/lib/modules/dialog/components/pre-setting-container/component/body.js +0 -78
- package/lib/modules/dialog/components/pre-setting-container/index.css +0 -82
- package/lib/modules/dialog/components/pre-setting-container/index.d.ts +0 -18
- package/lib/modules/dialog/components/pre-setting-container/index.js +0 -116
- package/lib/modules/dialog/components/rename/index.js +0 -72
- package/lib/modules/dialog/dialogs.d.ts +0 -3
- package/lib/modules/dialog/dialogs.js +0 -28
- package/lib/utilities/setting-config-storage.d.ts +0 -18
- package/lib/utilities/setting-config-storage.js +0 -133
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/color-panel/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/color-tool/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/graphic-panel/libs.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/graphic-tool/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/panel/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/pen-tool/pen-panel/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.d.ts +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/index.js +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/tips/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/style.css +0 -0
- /package/lib/{modules/annotation/components → fragments/annotation}/toolbar/view.d.ts +0 -0
- /package/lib/modules/{action-bar/components → components}/apps/app-item/index.css +0 -0
- /package/lib/modules/{action-bar/components → components}/apps/app-item/index.js +0 -0
- /package/lib/modules/{action-bar/components → components}/apps/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/annotation-tool/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/confirm/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/confirm/index.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/connection-gateway/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/connection-gateway/tabs.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/control-bar/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/device-setting/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/device-setting/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/interpreter/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/interpreter/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/pre-setting/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/rename/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/share-screen-selection/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg1.png +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/bg2.png +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/assets/fcr_png_host.png +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/electron.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/index.css +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/system-preference/index.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/toast/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/toast/index.js +0 -0
- /package/lib/modules/dialog/{components → dialogs}/video-window/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/whiteboard/index.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/widget/electron.d.ts +0 -0
- /package/lib/modules/dialog/{components → dialogs}/widget/index.d.ts +0 -0
|
@@ -44,10 +44,16 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
44
44
|
Object.defineProperty(exports, "__esModule", {
|
|
45
45
|
value: true
|
|
46
46
|
});
|
|
47
|
-
exports
|
|
47
|
+
exports.FragmentAnnotationStoreContext = exports.FragmentAnnotationStore = void 0;
|
|
48
48
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
49
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
50
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
51
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
52
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
53
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
49
54
|
require("core-js/modules/es.array.concat.js");
|
|
50
55
|
require("core-js/modules/es.array.iterator.js");
|
|
56
|
+
require("core-js/modules/es.date.now.js");
|
|
51
57
|
require("core-js/modules/es.date.to-json.js");
|
|
52
58
|
require("core-js/modules/es.json.stringify.js");
|
|
53
59
|
require("core-js/modules/es.object.keys.js");
|
|
@@ -60,15 +66,8 @@ require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
|
60
66
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
61
67
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
62
68
|
require("core-js/modules/web.timers.js");
|
|
63
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
64
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
65
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
66
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
67
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
68
69
|
var _react = require("react");
|
|
69
|
-
var
|
|
70
|
-
var _forgeWhiteboard = require("@netless/forge-whiteboard");
|
|
71
|
-
var _forgeRtm = require("@netless/forge-rtm");
|
|
70
|
+
var _imports = require("fcr-core/lib/imports");
|
|
72
71
|
var _mobx = require("mobx");
|
|
73
72
|
var _type = require("../../modules/whiteboard/type");
|
|
74
73
|
var _fcrCore = require("fcr-core");
|
|
@@ -78,9 +77,8 @@ var _rendererEvent = require("../../utilities/renderer-event");
|
|
|
78
77
|
var _constant = require("../../utilities/constant");
|
|
79
78
|
var _asyncRetry = require("agora-foundation/lib/utilities/async-retry");
|
|
80
79
|
var _logger = require("../../utilities/logger");
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var _initProto, _init_joined, _init_bounds, _init_currentTool, _handleBoardDomLoadDecs, _closeDecs, _handleSetToolDecs, _ref;
|
|
80
|
+
var _FragmentAnnotationStore;
|
|
81
|
+
var _initProto, _init_joined, _init_bounds, _init_currentTool, _init_isIgnore, _init_drawing, _handleBoardDomLoadDecs, _closeDecs, _hideDecs, _showDecs, _handleSetToolDecs, _ref;
|
|
84
82
|
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
83
|
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
84
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -93,13 +91,32 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
93
91
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
94
92
|
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
93
|
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; }
|
|
94
|
+
var startPolling = function startPolling(pollingMethod) {
|
|
95
|
+
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30000;
|
|
96
|
+
var interval = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;
|
|
97
|
+
pollingMethod();
|
|
98
|
+
var startTime = Date.now();
|
|
99
|
+
var timer = setInterval(function () {
|
|
100
|
+
var elapsed = Date.now() - startTime;
|
|
101
|
+
if (elapsed >= duration) {
|
|
102
|
+
clearInterval(timer);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
pollingMethod();
|
|
106
|
+
}, interval);
|
|
107
|
+
return function () {
|
|
108
|
+
clearInterval(timer);
|
|
109
|
+
};
|
|
110
|
+
};
|
|
96
111
|
var _A = /*#__PURE__*/new WeakMap();
|
|
97
112
|
var _B = /*#__PURE__*/new WeakMap();
|
|
98
113
|
var _C = /*#__PURE__*/new WeakMap();
|
|
99
|
-
|
|
100
|
-
var
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
115
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
116
|
+
_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");
|
|
117
|
+
var FragmentAnnotationStore = exports.FragmentAnnotationStore = /*#__PURE__*/function () {
|
|
118
|
+
function FragmentAnnotationStore() {
|
|
119
|
+
(0, _classCallCheck2["default"])(this, FragmentAnnotationStore);
|
|
103
120
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.createFragmentLogger)({
|
|
104
121
|
prefix: 'AnnotationFragmentStore'
|
|
105
122
|
})));
|
|
@@ -116,7 +133,15 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
116
133
|
height: 600
|
|
117
134
|
}));
|
|
118
135
|
_classPrivateFieldInitSpec(this, _C, _init_currentTool(this, 'none'));
|
|
119
|
-
(
|
|
136
|
+
_classPrivateFieldInitSpec(this, _D, _init_isIgnore(this, false));
|
|
137
|
+
_classPrivateFieldInitSpec(this, _E, _init_drawing(this, false));
|
|
138
|
+
(0, _defineProperty2["default"])(this, "_hasWaitingOpen", false);
|
|
139
|
+
(0, _defineProperty2["default"])(this, "_lastViewPortSet", {
|
|
140
|
+
width: 0,
|
|
141
|
+
height: 0
|
|
142
|
+
});
|
|
143
|
+
(0, _defineProperty2["default"])(this, "_currentAnntationView", null);
|
|
144
|
+
(0, _defineProperty2["default"])(this, "_pollingCancelHandler", function () {});
|
|
120
145
|
var annotationRtmAppId = localStorage.getItem('annotation_rtm_app_id') || '';
|
|
121
146
|
var boardOptions = localStorage.getItem('board_options');
|
|
122
147
|
var appId = JSON.parse(annotationRtmAppId);
|
|
@@ -143,7 +168,7 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
143
168
|
appId: appId
|
|
144
169
|
}));
|
|
145
170
|
}
|
|
146
|
-
return (0, _createClass2["default"])(
|
|
171
|
+
return (0, _createClass2["default"])(FragmentAnnotationStore, [{
|
|
147
172
|
key: "joined",
|
|
148
173
|
get: function get() {
|
|
149
174
|
return _classPrivateFieldGet(_A, this);
|
|
@@ -167,38 +192,54 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
167
192
|
set: function set(v) {
|
|
168
193
|
_classPrivateFieldSet(_C, this, v);
|
|
169
194
|
}
|
|
195
|
+
}, {
|
|
196
|
+
key: "isIgnore",
|
|
197
|
+
get: function get() {
|
|
198
|
+
return _classPrivateFieldGet(_D, this);
|
|
199
|
+
},
|
|
200
|
+
set: function set(v) {
|
|
201
|
+
_classPrivateFieldSet(_D, this, v);
|
|
202
|
+
}
|
|
203
|
+
}, {
|
|
204
|
+
key: "drawing",
|
|
205
|
+
get: function get() {
|
|
206
|
+
return _classPrivateFieldGet(_E, this);
|
|
207
|
+
},
|
|
208
|
+
set: function set(v) {
|
|
209
|
+
_classPrivateFieldSet(_E, this, v);
|
|
210
|
+
}
|
|
170
211
|
}, {
|
|
171
212
|
key: "open",
|
|
172
213
|
value: function () {
|
|
173
214
|
var _open = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
174
|
-
var visible, whiteboard, _this$_boardDom;
|
|
215
|
+
var visible, _this$_resizeToMax, boundsWidth, boundsHeight, whiteboard, _this$_boardDom;
|
|
175
216
|
return _regenerator["default"].wrap(function (_context) {
|
|
176
217
|
while (1) switch (_context.prev = _context.next) {
|
|
177
218
|
case 0:
|
|
178
|
-
this.logger.info("[annotation][open]: open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds)));
|
|
179
|
-
this.currentTool = 'curve';
|
|
180
|
-
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
181
|
-
(0, _platform.isWindows)() && window.runtime.browserWindow.blur();
|
|
182
|
-
this.setIgnore(true);
|
|
183
219
|
visible = window.runtime.browserWindow.isVisible();
|
|
184
|
-
this.logger.info("[annotation][open]: the
|
|
185
|
-
if (!
|
|
220
|
+
this.logger.info("[annotation-fragment][open]: open method is called, the init bounds is =>, ".concat(JSON.stringify(this.bounds), ", visible ").concat(visible));
|
|
221
|
+
if (!visible) {
|
|
186
222
|
_context.next = 1;
|
|
187
223
|
break;
|
|
188
224
|
}
|
|
189
225
|
return _context.abrupt("return");
|
|
190
226
|
case 1:
|
|
227
|
+
this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
|
|
228
|
+
this.currentTool = 'curve';
|
|
229
|
+
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
230
|
+
this.setIgnore(true);
|
|
231
|
+
this._hasWaitingOpen = !this._engine;
|
|
191
232
|
if (this._engine) {
|
|
192
233
|
_context.next = 2;
|
|
193
234
|
break;
|
|
194
235
|
}
|
|
195
|
-
this.logger.info(
|
|
236
|
+
this.logger.info("[annotation-fragment][open]: this._engine is null, so open fail,\n cannot draw, we will reopen after engine connected");
|
|
196
237
|
return _context.abrupt("return");
|
|
197
238
|
case 2:
|
|
198
|
-
this.logger.info('[annotation][open]: this._engine is initialized, show annotation window');
|
|
239
|
+
this.logger.info('[annotation-fragment][open]: this._engine is initialized, show annotation window');
|
|
199
240
|
window.runtime.browserWindow.show();
|
|
200
241
|
case 3:
|
|
201
|
-
this.logger.info("[annotation][open]: this._joined ".concat(this.joined));
|
|
242
|
+
this.logger.info("[annotation-fragment][open]: this._joined ".concat(this.joined));
|
|
202
243
|
if (!this.joined) {
|
|
203
244
|
_context.next = 4;
|
|
204
245
|
break;
|
|
@@ -216,12 +257,13 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
216
257
|
_context.next = 6;
|
|
217
258
|
break;
|
|
218
259
|
}
|
|
219
|
-
return _context.abrupt("return", this.logger.error("[annotation][open]: this._boardRoom is not initialized, ".concat(this._boardRoom)));
|
|
260
|
+
return _context.abrupt("return", this.logger.error("[annotation-fragment][open]: this._boardRoom is not initialized, ".concat(this._boardRoom)));
|
|
220
261
|
case 6:
|
|
262
|
+
_this$_resizeToMax = this._resizeToMax(this.bounds.width, this.bounds.height, 1920), boundsWidth = _this$_resizeToMax.width, boundsHeight = _this$_resizeToMax.height;
|
|
221
263
|
_context.next = 7;
|
|
222
|
-
return this._boardRoom.applicationManager.launchApplication(
|
|
223
|
-
width:
|
|
224
|
-
height:
|
|
264
|
+
return this._boardRoom.applicationManager.launchApplication(_imports.FcrWhiteboardApplication, {
|
|
265
|
+
width: boundsWidth,
|
|
266
|
+
height: boundsHeight,
|
|
225
267
|
defaultToolbarStyle: {
|
|
226
268
|
tool: 'curve',
|
|
227
269
|
strokeColor: '#FFC908',
|
|
@@ -230,15 +272,21 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
230
272
|
}, this._FORGE_WHITEBOARD_APP_ID);
|
|
231
273
|
case 7:
|
|
232
274
|
whiteboard = _context.sent;
|
|
233
|
-
this.logger.info("[annotation][open]: whiteboard launch success");
|
|
275
|
+
this.logger.info("[annotation-fragment][open]: whiteboard launch success");
|
|
234
276
|
if (whiteboard) {
|
|
235
277
|
this._boardView.classList.add('fcr-whiteboard-window-view');
|
|
236
|
-
this.
|
|
278
|
+
this._currentAnntationView = whiteboard.view;
|
|
279
|
+
this._boardView.appendChild(this._currentAnntationView);
|
|
237
280
|
(_this$_boardDom = this._boardDom) === null || _this$_boardDom === void 0 || _this$_boardDom.appendChild(this._boardView);
|
|
238
281
|
this._boardInstance = whiteboard;
|
|
282
|
+
// @ts-ignore
|
|
283
|
+
window._boardInstance = this._boardInstance;
|
|
239
284
|
this._initBoardStyle(whiteboard);
|
|
240
285
|
this.joined = true;
|
|
241
|
-
this.logger.info("[annotation][open]: mount success, the joined is ".concat(this.joined));
|
|
286
|
+
this.logger.info("[annotation-fragment][open]: mount success, the joined is ".concat(this.joined));
|
|
287
|
+
// 共享发起端 开启标注时,重置30s轮询updateWindowSize
|
|
288
|
+
this._handlePollingUpdateWindowSize('sender-board-room-init');
|
|
289
|
+
this._syncScreenShareOwnerOpenDone();
|
|
242
290
|
}
|
|
243
291
|
this._boardRoom.applicationManager.on('launch', this._launchHandler);
|
|
244
292
|
this._boardRoom.applicationManager.on('terminal', this._terminalHandler);
|
|
@@ -262,53 +310,138 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
262
310
|
key: "close",
|
|
263
311
|
value: function () {
|
|
264
312
|
var _close = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
265
|
-
var _this$
|
|
313
|
+
var _this$_boardRoom, _this$_boardRoom2, _this$_boardRoom3, _t;
|
|
266
314
|
return _regenerator["default"].wrap(function (_context2) {
|
|
267
315
|
while (1) switch (_context2.prev = _context2.next) {
|
|
268
316
|
case 0:
|
|
317
|
+
_context2.prev = 0;
|
|
318
|
+
this._cancelCurrentUpdateWindowSizeTimber('send-fragment-close');
|
|
319
|
+
if (this._boardInstance) {
|
|
320
|
+
this._boardInstance.clearPage();
|
|
321
|
+
this.logger.info('[annotation-fragment][close]: clearPage');
|
|
322
|
+
}
|
|
269
323
|
this.joined = false;
|
|
270
324
|
this.currentTool = 'curve';
|
|
271
|
-
|
|
272
|
-
(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
(_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.terminateApplication(this._FORGE_WHITEBOARD_APP_ID);
|
|
325
|
+
// this._boardRoom?.applicationManager.terminateApplication(this._FORGE_WHITEBOARD_APP_ID);
|
|
326
|
+
if (this._currentAnntationView && this._boardView.hasChildNodes()) {
|
|
327
|
+
this._boardView.removeChild(this._currentAnntationView);
|
|
328
|
+
}
|
|
276
329
|
_context2.next = 1;
|
|
277
|
-
return (_this$
|
|
330
|
+
return (_this$_boardRoom = this._boardRoom) === null || _this$_boardRoom === void 0 ? void 0 : _this$_boardRoom.leaveRoom();
|
|
278
331
|
case 1:
|
|
279
|
-
this.
|
|
332
|
+
this.logger.info(// @ts-ignore
|
|
333
|
+
"[annotation-fragment][close] leaveRoom , ".concat(this._boardRoom['traceId']));
|
|
334
|
+
(_this$_boardRoom2 = this._boardRoom) === null || _this$_boardRoom2 === void 0 || _this$_boardRoom2.applicationManager.removeListener('launch', this._launchHandler);
|
|
335
|
+
(_this$_boardRoom3 = this._boardRoom) === null || _this$_boardRoom3 === void 0 || _this$_boardRoom3.applicationManager.removeListener('terminal', this._terminalHandler);
|
|
280
336
|
this._boardInstance = null;
|
|
281
|
-
|
|
282
|
-
|
|
337
|
+
this._boardRoom = null;
|
|
338
|
+
_context2.next = 3;
|
|
339
|
+
break;
|
|
283
340
|
case 2:
|
|
341
|
+
_context2.prev = 2;
|
|
342
|
+
_t = _context2["catch"](0);
|
|
343
|
+
this.logger.info('[annotation-fragment][close]: catch error', _t);
|
|
344
|
+
case 3:
|
|
345
|
+
_context2.prev = 3;
|
|
346
|
+
window.runtime.browserWindow.hide();
|
|
347
|
+
this.logger.info('[annotation-fragment][close]: close annotation window');
|
|
348
|
+
return _context2.finish(3);
|
|
349
|
+
case 4:
|
|
284
350
|
case "end":
|
|
285
351
|
return _context2.stop();
|
|
286
352
|
}
|
|
287
|
-
}, _callee2, this);
|
|
353
|
+
}, _callee2, this, [[0, 2, 3, 4]]);
|
|
288
354
|
}));
|
|
289
355
|
function close() {
|
|
290
356
|
return _close.apply(this, arguments);
|
|
291
357
|
}
|
|
292
358
|
return close;
|
|
293
359
|
}()
|
|
360
|
+
}, {
|
|
361
|
+
key: "hide",
|
|
362
|
+
value: function hide() {
|
|
363
|
+
window.runtime.browserWindow.hide();
|
|
364
|
+
this.logger.info('[annotation-fragment][open]: hide annotation window');
|
|
365
|
+
}
|
|
366
|
+
}, {
|
|
367
|
+
key: "show",
|
|
368
|
+
value: function show() {
|
|
369
|
+
window.runtime.browserWindow.setAlwaysOnTop(true, 'pop-up-menu');
|
|
370
|
+
window.runtime.browserWindow.show();
|
|
371
|
+
this.logger.info('[annotation-fragment][open]: show annotation window');
|
|
372
|
+
}
|
|
373
|
+
}, {
|
|
374
|
+
key: "focus",
|
|
375
|
+
value: function focus() {
|
|
376
|
+
window.runtime.browserWindow.focus();
|
|
377
|
+
}
|
|
294
378
|
}, {
|
|
295
379
|
key: "setBounds",
|
|
296
380
|
value: function setBounds(bounds) {
|
|
297
381
|
this.bounds = bounds;
|
|
298
|
-
this.logger.info("[annotation][setBounds]: bounds is changed =>, ".concat(JSON.stringify(bounds)));
|
|
382
|
+
this.logger.info("[annotation-fragment][setBounds]: bounds is changed =>, ".concat(JSON.stringify(bounds)));
|
|
299
383
|
window.runtime.browserWindow.setBounds(bounds);
|
|
384
|
+
this._updateBoardElBySize({
|
|
385
|
+
width: bounds.width,
|
|
386
|
+
height: bounds.height
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
}, {
|
|
390
|
+
key: "updateWindowSize",
|
|
391
|
+
value: function updateWindowSize(paramWidth, paramHeight) {
|
|
392
|
+
this._updateWindowSize(paramWidth, paramHeight);
|
|
393
|
+
}
|
|
394
|
+
}, {
|
|
395
|
+
key: "_updateWindowSizeWithCurrentBounds",
|
|
396
|
+
value: function _updateWindowSizeWithCurrentBounds() {
|
|
397
|
+
if (this.bounds && this.bounds.width > 0 && this.bounds.height > 0) {
|
|
398
|
+
this._updateWindowSize(this.bounds.width, this.bounds.height);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}, {
|
|
402
|
+
key: "_updateWindowSize",
|
|
403
|
+
value: function _updateWindowSize(paramWidth, paramHeight) {
|
|
404
|
+
var _this$_boardInstance;
|
|
405
|
+
if (!paramWidth || !paramHeight) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
// if (
|
|
409
|
+
// paramWidth !== this._lastViewPortSet.width ||
|
|
410
|
+
// paramHeight !== this._lastViewPortSet.height
|
|
411
|
+
// ) {
|
|
412
|
+
this._lastViewPortSet.width = paramWidth;
|
|
413
|
+
this._lastViewPortSet.height = paramHeight;
|
|
414
|
+
this.logger.info("[annotation-fragment][_updateWindowSize]: updateViewport width:".concat(paramWidth, " height:").concat(paramHeight));
|
|
415
|
+
(_this$_boardInstance = this._boardInstance) === null || _this$_boardInstance === void 0 || _this$_boardInstance.updateViewport(paramWidth, paramHeight);
|
|
416
|
+
// }
|
|
417
|
+
}
|
|
418
|
+
}, {
|
|
419
|
+
key: "_updateBoardElBySize",
|
|
420
|
+
value: function _updateBoardElBySize(size) {
|
|
421
|
+
if (size) {
|
|
422
|
+
var _this$_boardInstance2;
|
|
423
|
+
this._boardView.style.width = "".concat(size.width, "px");
|
|
424
|
+
this._boardView.style.height = "".concat(size.height, "px");
|
|
425
|
+
var currentBoardInstanceView = (_this$_boardInstance2 = this._boardInstance) === null || _this$_boardInstance2 === void 0 ? void 0 : _this$_boardInstance2.view;
|
|
426
|
+
if (currentBoardInstanceView) {
|
|
427
|
+
currentBoardInstanceView.style.width = "".concat(size.width, "px");
|
|
428
|
+
currentBoardInstanceView.style.height = "".concat(size.height, "px");
|
|
429
|
+
}
|
|
430
|
+
this._updateWindowSize(size.width, size.height);
|
|
431
|
+
}
|
|
300
432
|
}
|
|
301
433
|
}, {
|
|
302
434
|
key: "setIgnore",
|
|
303
435
|
value: function setIgnore(ignore) {
|
|
304
|
-
this.logger.info("[annotation][setIgnore]: setIgnore method is called, the ignore is => ".concat(ignore));
|
|
436
|
+
this.logger.info("[annotation-fragment][setIgnore]: setIgnore method is called, the ignore is => ".concat(ignore));
|
|
437
|
+
this.isIgnore = ignore;
|
|
305
438
|
window.runtime.browserWindow.setIgnoreMouseEvents(ignore);
|
|
306
439
|
}
|
|
307
440
|
}, {
|
|
308
441
|
key: "toolChanged",
|
|
309
442
|
value: function toolChanged(event) {
|
|
310
443
|
if (!this._boardInstance) return;
|
|
311
|
-
this.logger.info("[annotation][toolChanged]: toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
|
|
444
|
+
this.logger.info("[annotation-fragment][toolChanged]: toolChanged method is called, the event is => ".concat(JSON.stringify(event)));
|
|
312
445
|
var board = this._boardInstance;
|
|
313
446
|
var payload = event.payload;
|
|
314
447
|
switch (event.action) {
|
|
@@ -341,12 +474,18 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
341
474
|
// break;
|
|
342
475
|
}
|
|
343
476
|
}
|
|
477
|
+
}, {
|
|
478
|
+
key: "setDrawing",
|
|
479
|
+
value: function setDrawing(drawing) {
|
|
480
|
+
this.logger.info("[annotation-fragment][setDrawing]: setDrawing method is called, the drawing is => ".concat(drawing));
|
|
481
|
+
this.drawing = drawing;
|
|
482
|
+
}
|
|
344
483
|
}, {
|
|
345
484
|
key: "_initBoardStyle",
|
|
346
485
|
value: function _initBoardStyle(whiteboard) {
|
|
347
486
|
var frameWidth = this.bounds.width;
|
|
348
487
|
var frameHeight = this.bounds.height;
|
|
349
|
-
this.logger.info("[annotation][initBoardStyle] mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
|
|
488
|
+
this.logger.info("[annotation-fragment][initBoardStyle] mount success, width: ".concat(frameWidth, " , height: ").concat(frameHeight));
|
|
350
489
|
this._boardView.style.width = "".concat(frameWidth, "px");
|
|
351
490
|
this._boardView.style.height = "".concat(frameHeight, "px");
|
|
352
491
|
whiteboard.view.style.height = "".concat(frameHeight, "px");
|
|
@@ -358,16 +497,17 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
358
497
|
whiteboard.enableCameraBoundaryHighlight = false;
|
|
359
498
|
whiteboard.strokeColor = '#FFC908';
|
|
360
499
|
whiteboard.setCurrentTool('curve');
|
|
361
|
-
this.
|
|
500
|
+
this._updateWindowSize(frameWidth, frameHeight);
|
|
501
|
+
this.logger.info("[annotation-fragment][initBoardStyle] mount success current tool, ".concat(whiteboard.getCurrentTool(), ", updateViewport width: ").concat(frameWidth, " height: ").concat(frameHeight));
|
|
362
502
|
whiteboard.on('undoStackLength', function (steps) {
|
|
363
|
-
|
|
503
|
+
// isWindows() && window.runtime.browserWindow.blur();
|
|
364
504
|
(0, _rendererEvent.sendEvent)({
|
|
365
505
|
action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_UNDO,
|
|
366
506
|
payload: steps > 0
|
|
367
507
|
});
|
|
368
508
|
});
|
|
369
509
|
whiteboard.on('redoStackLength', function (steps) {
|
|
370
|
-
|
|
510
|
+
// isWindows() && window.runtime.browserWindow.blur();
|
|
371
511
|
(0, _rendererEvent.sendEvent)({
|
|
372
512
|
action: _constant.FcrUIRendererEventAction.SET_ANNOTATION_REDO,
|
|
373
513
|
payload: steps > 0
|
|
@@ -399,29 +539,38 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
399
539
|
return _regenerator["default"].wrap(function (_context3) {
|
|
400
540
|
while (1) switch (_context3.prev = _context3.next) {
|
|
401
541
|
case 0:
|
|
402
|
-
engine.login();
|
|
403
542
|
engine.addObserver({
|
|
404
543
|
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
544
|
+
(0, _rendererEvent.sendEvent)({
|
|
545
|
+
action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_ENGINE_STATE,
|
|
546
|
+
payload: state
|
|
547
|
+
});
|
|
405
548
|
if (state === _fcrCore.FcrConnectionState.CONNECTED) {
|
|
406
549
|
_this2._engine = engine;
|
|
407
|
-
_this2.logger.info("[annotation][initEngine]: engine connection state updated => CONNECTED");
|
|
550
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTED, hasWaitingOpen ".concat(_this2._hasWaitingOpen));
|
|
551
|
+
if (_this2._hasWaitingOpen) {
|
|
552
|
+
_this2._hasWaitingOpen = false;
|
|
553
|
+
_this2.open();
|
|
554
|
+
}
|
|
408
555
|
}
|
|
409
556
|
if (state === _fcrCore.FcrConnectionState.DISCONNECTED) {
|
|
410
|
-
_this2.logger.info("[annotation][initEngine]: engine connection state updated => DISCONNECTED, the engine is ".concat(_this2._engine));
|
|
411
|
-
|
|
557
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => DISCONNECTED, the engine is ".concat(_this2._engine));
|
|
558
|
+
_this2._engine && engine.login();
|
|
412
559
|
}
|
|
413
560
|
if (state === _fcrCore.FcrConnectionState.CONNECTING) {
|
|
414
|
-
_this2.logger.info("[annotation][initEngine]: engine connection state updated => CONNECTING");
|
|
561
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => CONNECTING");
|
|
415
562
|
}
|
|
416
563
|
if (state === _fcrCore.FcrConnectionState.RECONNECTING) {
|
|
417
|
-
_this2.logger.info("[annotation][initEngine]: engine connection state updated => RECONNECTING");
|
|
564
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => RECONNECTING");
|
|
418
565
|
}
|
|
419
566
|
if (state === _fcrCore.FcrConnectionState.ABORTED) {
|
|
420
|
-
_this2.logger.info("[annotation][initEngine]: engine connection state updated => ABORTED, the engine is ".concat(_this2._engine));
|
|
421
|
-
|
|
567
|
+
_this2.logger.info("[annotation-fragment][initEngine]: engine connection state updated => ABORTED, the engine is ".concat(_this2._engine));
|
|
568
|
+
_this2._engine && engine.login();
|
|
422
569
|
}
|
|
423
570
|
}
|
|
424
571
|
});
|
|
572
|
+
engine.login();
|
|
573
|
+
window.runtime.browserWindow.hide();
|
|
425
574
|
case 1:
|
|
426
575
|
case "end":
|
|
427
576
|
return _context3.stop();
|
|
@@ -438,20 +587,22 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
438
587
|
value: function () {
|
|
439
588
|
var _initBoardRoom2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
440
589
|
var _this3 = this;
|
|
441
|
-
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, retriesMax,
|
|
590
|
+
var _this$_config, userId, boardToken, region, appIdentifier, boardId, nickName, rtmClient, rtmProvider, wbRoom, currentTimeStamp, retriesMax, _t2;
|
|
442
591
|
return _regenerator["default"].wrap(function (_context6) {
|
|
443
592
|
while (1) switch (_context6.prev = _context6.next) {
|
|
444
593
|
case 0:
|
|
445
594
|
_this$_config = this._config, userId = _this$_config.userId, boardToken = _this$_config.boardToken, region = _this$_config.region, appIdentifier = _this$_config.appIdentifier, boardId = _this$_config.boardId;
|
|
446
595
|
nickName = localStorage.getItem('annotation_nickname') || '';
|
|
447
|
-
this.logger.info("[annotation][initBoardRoom]: start init board room with config => ".concat(JSON.stringify(this._config), " - ").concat(nickName));
|
|
596
|
+
this.logger.info("[annotation-fragment][initBoardRoom]: start init board room with config => ".concat(JSON.stringify(this._config), " - ").concat(nickName));
|
|
448
597
|
// @ts-ignore
|
|
449
598
|
rtmClient = this._engine._rteEngine._rtmClient._client;
|
|
450
|
-
rtmProvider = new
|
|
451
|
-
wbRoom = new
|
|
599
|
+
rtmProvider = new _imports.FcrRTMProvider_2_2(rtmClient);
|
|
600
|
+
wbRoom = new _imports.FcrRoom(boardId, rtmProvider);
|
|
452
601
|
this._boardRoom = wbRoom;
|
|
453
|
-
|
|
454
|
-
this.
|
|
602
|
+
currentTimeStamp = Date.now(); // @ts-ignore
|
|
603
|
+
this._boardRoom['traceId'] = "".concat(boardToken, "-").concat(boardId, "-").concat(userId, "-").concat(currentTimeStamp);
|
|
604
|
+
wbRoom.applicationManager.registerApplication(_imports.FcrWhiteboardApplication);
|
|
605
|
+
this.logger.info("[annotation-fragment][initBoardRoom]: bordRoom instance is created, start join room");
|
|
455
606
|
_context6.prev = 1;
|
|
456
607
|
retriesMax = 10;
|
|
457
608
|
_context6.next = 2;
|
|
@@ -471,7 +622,12 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
471
622
|
}
|
|
472
623
|
});
|
|
473
624
|
case 1:
|
|
474
|
-
|
|
625
|
+
// @ts-ignore
|
|
626
|
+
_this3.logger.info(// @ts-ignore
|
|
627
|
+
"[annotation-fragment][initBoardRoom]: join room success, traceId ".concat(_this3._boardRoom['traceId']));
|
|
628
|
+
// room.userManager.on("join") 和 room.userManager.on("leave")
|
|
629
|
+
wbRoom.userManager.on('join', _this3._handleBoardRoomUserJoin);
|
|
630
|
+
// wbRoom.userManager.on('leave',this._handleBoardRoomUserLeave);
|
|
475
631
|
case 2:
|
|
476
632
|
case "end":
|
|
477
633
|
return _context4.stop();
|
|
@@ -486,7 +642,7 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
486
642
|
while (1) switch (_context5.prev = _context5.next) {
|
|
487
643
|
case 0:
|
|
488
644
|
error = _ref3.error, timeFn = _ref3.timeFn, currentRetry = _ref3.currentRetry;
|
|
489
|
-
_this3.logger.info("[annotation][initBoardRoom]: retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
|
|
645
|
+
_this3.logger.info("[annotation-fragment][initBoardRoom]: retry to join board room, ".concat(error.message, ", retry ").concat(currentRetry, " times"));
|
|
490
646
|
_context5.next = 1;
|
|
491
647
|
return timeFn();
|
|
492
648
|
case 1:
|
|
@@ -506,8 +662,8 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
506
662
|
break;
|
|
507
663
|
case 3:
|
|
508
664
|
_context6.prev = 3;
|
|
509
|
-
|
|
510
|
-
this.logger.error("[annotation][initBoardRoom]: join room failed");
|
|
665
|
+
_t2 = _context6["catch"](1);
|
|
666
|
+
this.logger.error("[annotation-fragment][initBoardRoom]: join room failed");
|
|
511
667
|
case 4:
|
|
512
668
|
case "end":
|
|
513
669
|
return _context6.stop();
|
|
@@ -525,7 +681,7 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
525
681
|
var userId = config.userId,
|
|
526
682
|
token = config.roomToken,
|
|
527
683
|
appId = config.appId;
|
|
528
|
-
this.logger.info("[annotation][initEngine]: init engine with config => ".concat(JSON.stringify(config)));
|
|
684
|
+
this.logger.info("[annotation-fragment][initEngine]: init engine with config => ".concat(JSON.stringify(config)));
|
|
529
685
|
return new _fcrCore.FcrCoreEngine(_objectSpread({
|
|
530
686
|
appId: appId,
|
|
531
687
|
token: token,
|
|
@@ -537,9 +693,9 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
537
693
|
key: "_launchHandler",
|
|
538
694
|
value: function _launchHandler(appId, app) {
|
|
539
695
|
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
540
|
-
|
|
541
|
-
this.
|
|
542
|
-
|
|
696
|
+
this.logger.info("[annotation-fragment][event]: launch event is triggered => ".concat(app.selfUserId));
|
|
697
|
+
this._currentAnntationView = app.view;
|
|
698
|
+
this._currentAnntationView && this._boardView.appendChild(this._currentAnntationView);
|
|
543
699
|
this._initBoardStyle(app);
|
|
544
700
|
}
|
|
545
701
|
}
|
|
@@ -547,18 +703,59 @@ var AnnotationStore = /*#__PURE__*/function () {
|
|
|
547
703
|
key: "_terminalHandler",
|
|
548
704
|
value: function _terminalHandler(appId, app) {
|
|
549
705
|
if (appId === this._FORGE_WHITEBOARD_APP_ID) {
|
|
550
|
-
var _this$
|
|
551
|
-
this.logger.info("[annotation][event]: terminal event is triggered => ".concat(app.selfUserId));
|
|
552
|
-
app.view && this._boardView.hasChildNodes() && ((_this$
|
|
706
|
+
var _this$_boardView;
|
|
707
|
+
this.logger.info("[annotation-fragment][event]: terminal event is triggered => ".concat(app.selfUserId));
|
|
708
|
+
(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));
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}, {
|
|
712
|
+
key: "_resizeToMax",
|
|
713
|
+
value: function _resizeToMax(w, h) {
|
|
714
|
+
var scaleBase = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1920;
|
|
715
|
+
var scale = scaleBase / Math.max(w, h);
|
|
716
|
+
return {
|
|
717
|
+
width: Math.round(w * scale),
|
|
718
|
+
height: Math.round(h * scale)
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
}, {
|
|
722
|
+
key: "_cancelCurrentUpdateWindowSizeTimber",
|
|
723
|
+
value: function _cancelCurrentUpdateWindowSizeTimber(stage) {
|
|
724
|
+
if (this._pollingCancelHandler && typeof this._pollingCancelHandler === 'function') {
|
|
725
|
+
this._pollingCancelHandler();
|
|
726
|
+
this.logger.info("[annotation-fragment]: end a new 30s polling to updateWindowSize, when ".concat(stage));
|
|
553
727
|
}
|
|
554
728
|
}
|
|
729
|
+
}, {
|
|
730
|
+
key: "_handlePollingUpdateWindowSize",
|
|
731
|
+
value: function _handlePollingUpdateWindowSize(stage) {
|
|
732
|
+
this._cancelCurrentUpdateWindowSizeTimber(stage);
|
|
733
|
+
this._pollingCancelHandler = startPolling(this._updateWindowSizeWithCurrentBounds);
|
|
734
|
+
this.logger.info("[annotation-fragment]: start a new 30s polling to updateWindowSize, after ".concat(stage));
|
|
735
|
+
}
|
|
736
|
+
}, {
|
|
737
|
+
key: "_handleBoardRoomUserJoin",
|
|
738
|
+
value: function _handleBoardRoomUserJoin(user) {
|
|
739
|
+
// 共享发起端 监听白板房间有用户加入时,重置30s轮询updateWindowSize
|
|
740
|
+
this._handlePollingUpdateWindowSize('send-board-room-user-join');
|
|
741
|
+
}
|
|
742
|
+
}, {
|
|
743
|
+
key: "_syncScreenShareOwnerOpenDone",
|
|
744
|
+
value: function _syncScreenShareOwnerOpenDone() {
|
|
745
|
+
this.logger.info('[annotation-fragment]: _syncScreenShareOwnerOpenDone');
|
|
746
|
+
(0, _rendererEvent.sendEvent)({
|
|
747
|
+
action: _constant.FcrUIRendererEventAction.FRAGMENT_ANNOTATION_SYNC_OWNER_OPEN_DONE,
|
|
748
|
+
payload: null
|
|
749
|
+
});
|
|
750
|
+
}
|
|
555
751
|
}]);
|
|
556
752
|
}();
|
|
557
|
-
|
|
558
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(
|
|
753
|
+
_FragmentAnnotationStore = FragmentAnnotationStore;
|
|
754
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FragmentAnnotationStore, [[_mobx.observable, 1, "joined"], [_mobx.observable, 1, "bounds"], [_mobx.observable, 1, "currentTool"], [_mobx.observable, 1, "isIgnore"], [_mobx.observable, 1, "drawing"], [_decorator.bound, 2, "open"], [_handleBoardDomLoadDecs, 18, "handleBoardDomLoad"], [_closeDecs, 18, "close"], [_hideDecs, 18, "hide"], [_showDecs, 18, "show"], [_decorator.bound, 2, "focus"], [_decorator.bound, 2, "updateWindowSize"], [_decorator.bound, 2, "_updateWindowSizeWithCurrentBounds"], [_decorator.bound, 2, "_updateWindowSize"], [_decorator.bound, 2, "_updateBoardElBySize"], [_decorator.bound, 2, "setIgnore"], [_decorator.bound, 2, "toolChanged"], [_decorator.bound, 2, "setDrawing"], [_decorator.bound, 2, "_initBoardStyle"], [_handleSetToolDecs, 2, "_handleSetTool"], [_decorator.bound, 2, "_init"], [_decorator.bound, 2, "_initBoardRoom"], [_decorator.bound, 2, "_launchHandler"], [_decorator.bound, 2, "_terminalHandler"], [_decorator.bound, 2, "_resizeToMax"], [_decorator.bound, 2, "_cancelCurrentUpdateWindowSizeTimber"], [_decorator.bound, 2, "_handlePollingUpdateWindowSize"], [_decorator.bound, 2, "_handleBoardRoomUserJoin"], [_decorator.bound, 2, "_syncScreenShareOwnerOpenDone"]], []).e, 6);
|
|
559
755
|
_init_joined = _applyDecs$e[0];
|
|
560
756
|
_init_bounds = _applyDecs$e[1];
|
|
561
757
|
_init_currentTool = _applyDecs$e[2];
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
758
|
+
_init_isIgnore = _applyDecs$e[3];
|
|
759
|
+
_init_drawing = _applyDecs$e[4];
|
|
760
|
+
_initProto = _applyDecs$e[5];
|
|
761
|
+
var FragmentAnnotationStoreContext = exports.FragmentAnnotationStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|
package/lib/{modules/annotation/components → fragments/annotation}/toolbar/components/item/item.js
RENAMED
|
@@ -13,8 +13,8 @@ var _type = require("agora-ui-foundation/lib/components/icon/type");
|
|
|
13
13
|
var _tooltip = require("agora-ui-foundation/lib/components/tooltip");
|
|
14
14
|
var _popover = require("agora-ui-foundation/lib/components/popover");
|
|
15
15
|
var _react = require("react");
|
|
16
|
-
var _hostAreaContainer = require("../../../../../dialog/components/host-area-container");
|
|
17
16
|
require("./style.css");
|
|
17
|
+
var _hostAreaContainer = require("../../../../../modules/dialog/components/host-area-container");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
var AnnotationToolItem = exports.AnnotationToolItem = function AnnotationToolItem(props) {
|
|
20
20
|
var _props$iconType = props.iconType,
|
|
@@ -20,7 +20,7 @@ var AnnotationPenPanel = exports.AnnotationPenPanel = (0, _mobxReact.observer)(f
|
|
|
20
20
|
setStrokeWidth = _useContext.setStrokeWidth;
|
|
21
21
|
var _onClick = props.onClick;
|
|
22
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_panel.AnnotationToolPanel, {
|
|
23
|
-
header: [
|
|
23
|
+
header: [3, 5, 7, 10].map(function (width, index) {
|
|
24
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.AnnotationToolItem, {
|
|
25
25
|
active: currentStrokeWidth === width,
|
|
26
26
|
iconType: _type.FcrIconType.FCR_PENSIZE_STRAIGHT,
|