fcr-ui-scene 1.0.20 → 3.1.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base.d.ts +13 -0
- package/lib/base.js +78 -0
- package/lib/common/device-store.d.ts +140 -0
- package/lib/common/device-store.js +1378 -0
- package/lib/common/device-stream-store.d.ts +36 -0
- package/lib/common/device-stream-store.js +372 -0
- package/lib/common/event-store.d.ts +118 -0
- package/lib/common/event-store.js +235 -0
- package/lib/common/security-store.d.ts +123 -0
- package/lib/common/security-store.js +978 -0
- package/lib/creator.d.ts +8 -0
- package/lib/creator.js +37 -0
- package/lib/electron/app.d.ts +1 -0
- package/lib/electron/app.js +140 -0
- package/lib/electron/default-options.d.ts +2 -0
- package/lib/electron/default-options.js +26 -0
- package/lib/electron/env.d.ts +5 -0
- package/lib/electron/env.js +13 -0
- package/lib/electron/index.d.ts +2 -0
- package/lib/electron/index.js +20 -0
- package/lib/electron/injections.d.ts +45 -0
- package/lib/electron/injections.js +689 -0
- package/lib/electron/main.d.ts +2 -0
- package/lib/electron/main.js +63 -0
- package/lib/electron/plugins/screenshot.d.ts +2 -0
- package/lib/electron/plugins/screenshot.js +49 -0
- package/lib/electron/preload.js +35 -0
- package/lib/electron/tools.d.ts +5 -0
- package/lib/electron/tools.js +57 -0
- package/lib/electron/window.d.ts +12 -0
- package/lib/electron/window.js +107 -0
- package/lib/fragments/base.d.ts +10 -0
- package/lib/fragments/base.js +44 -0
- package/lib/fragments/control-bar/cloud-recording-buttons.d.ts +1 -0
- package/lib/fragments/control-bar/cloud-recording-buttons.js +67 -0
- package/lib/fragments/control-bar/context.d.ts +3 -0
- package/lib/fragments/control-bar/context.js +9 -0
- package/lib/fragments/control-bar/control-bar-store.d.ts +152 -0
- package/lib/fragments/control-bar/control-bar-store.js +1275 -0
- package/lib/fragments/control-bar/device/index.d.ts +31 -0
- package/lib/fragments/control-bar/device/index.js +203 -0
- package/lib/fragments/control-bar/index.css +276 -0
- package/lib/fragments/control-bar/index.d.ts +26 -0
- package/lib/fragments/control-bar/index.js +223 -0
- package/lib/fragments/control-bar/more-actions/index.css +19 -0
- package/lib/fragments/control-bar/more-actions/index.d.ts +7 -0
- package/lib/fragments/control-bar/more-actions/index.js +259 -0
- package/lib/fragments/control-bar/security-content/index.css +24 -0
- package/lib/fragments/control-bar/security-content/index.d.ts +2 -0
- package/lib/fragments/control-bar/security-content/index.js +145 -0
- package/lib/fragments/control-bar/share-state-nav/index.css +70 -0
- package/lib/fragments/control-bar/share-state-nav/index.d.ts +10 -0
- package/lib/fragments/control-bar/share-state-nav/index.js +134 -0
- package/lib/fragments/control-bar/stop-live-streaming/index.d.ts +1 -0
- package/lib/fragments/control-bar/stop-live-streaming/index.js +82 -0
- package/lib/fragments/control-bar/transfer-position-icon/index.d.ts +11 -0
- package/lib/fragments/control-bar/transfer-position-icon/index.js +46 -0
- package/lib/fragments/control-bar/view.d.ts +1 -0
- package/lib/fragments/control-bar/view.js +321 -0
- package/lib/fragments/live-streaming/context.d.ts +3 -0
- package/lib/fragments/live-streaming/context.js +9 -0
- package/lib/fragments/live-streaming/index.css +11 -0
- package/lib/fragments/live-streaming/index.d.ts +11 -0
- package/lib/fragments/live-streaming/index.js +79 -0
- package/lib/fragments/live-streaming/store.d.ts +21 -0
- package/lib/fragments/live-streaming/store.js +228 -0
- package/lib/fragments/live-streaming/view.d.ts +2 -0
- package/lib/fragments/live-streaming/view.js +44 -0
- package/lib/fragments/share-screen-selection/context.d.ts +3 -0
- package/lib/fragments/share-screen-selection/context.js +9 -0
- package/lib/fragments/share-screen-selection/index.css +66 -0
- package/lib/fragments/share-screen-selection/index.d.ts +9 -0
- package/lib/fragments/share-screen-selection/index.js +94 -0
- package/lib/fragments/share-screen-selection/open-mic-tips.d.ts +9 -0
- package/lib/fragments/share-screen-selection/open-mic-tips.js +55 -0
- package/lib/fragments/share-screen-selection/selection-store.d.ts +36 -0
- package/lib/fragments/share-screen-selection/selection-store.js +351 -0
- package/lib/fragments/share-screen-selection/tips.css +33 -0
- package/lib/fragments/share-screen-selection/view.d.ts +9 -0
- package/lib/fragments/share-screen-selection/view.js +255 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.d.ts +5 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.js +54 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.d.ts +1 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.js +114 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.d.ts +1 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.js +75 -0
- package/lib/fragments/toolbar/components/color-picker/index.d.ts +2 -0
- package/lib/fragments/toolbar/components/color-picker/index.js +53 -0
- package/lib/fragments/toolbar/components/color-picker.d.ts +2 -0
- package/lib/fragments/toolbar/components/color-picker.js +127 -0
- package/lib/fragments/toolbar/components/eraser-picker.d.ts +4 -0
- package/lib/fragments/toolbar/components/eraser-picker.js +84 -0
- package/lib/fragments/toolbar/components/extension-toolbar-item.d.ts +1 -0
- package/lib/fragments/toolbar/components/extension-toolbar-item.js +78 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.d.ts +1 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.js +60 -0
- package/lib/fragments/toolbar/components/fold-icon.d.ts +2 -0
- package/lib/fragments/toolbar/components/fold-icon.js +41 -0
- package/lib/fragments/toolbar/components/history.d.ts +2 -0
- package/lib/fragments/toolbar/components/history.js +46 -0
- package/lib/fragments/toolbar/components/pen-picker.d.ts +4 -0
- package/lib/fragments/toolbar/components/pen-picker.js +132 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.d.ts +4 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.js +84 -0
- package/lib/fragments/toolbar/components/shape-picker.d.ts +4 -0
- package/lib/fragments/toolbar/components/shape-picker.js +146 -0
- package/lib/fragments/toolbar/components/toolbar-item.d.ts +1 -0
- package/lib/fragments/toolbar/components/toolbar-item.js +42 -0
- package/lib/fragments/toolbar/components/wrapper.d.ts +1 -0
- package/lib/fragments/toolbar/components/wrapper.js +138 -0
- package/lib/fragments/toolbar/hooks.d.ts +16 -0
- package/lib/fragments/toolbar/hooks.js +251 -0
- package/lib/fragments/toolbar/index.d.ts +12 -0
- package/lib/fragments/toolbar/index.js +80 -0
- package/lib/fragments/toolbar/store.d.ts +62 -0
- package/lib/fragments/toolbar/store.js +279 -0
- package/lib/fragments/toolbar/style.css +347 -0
- package/lib/fragments/toolbar/view.d.ts +1 -0
- package/lib/fragments/toolbar/view.js +34 -0
- package/lib/global.d.ts +8 -0
- package/lib/hooks/i18n.d.ts +4 -0
- package/lib/hooks/i18n.js +18 -0
- package/lib/hooks/meeting-time.d.ts +15 -0
- package/lib/hooks/meeting-time.js +92 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +52 -0
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +17 -0
- package/lib/modules/action-bar/action-bar-collapes-items.js +199 -0
- package/lib/modules/action-bar/board/index.d.ts +4 -0
- package/lib/modules/action-bar/board/index.js +34 -0
- package/lib/modules/action-bar/breakout-room/index.d.ts +4 -0
- package/lib/modules/action-bar/breakout-room/index.js +32 -0
- package/lib/modules/action-bar/chat/index.css +80 -0
- package/lib/modules/action-bar/chat/index.d.ts +5 -0
- package/lib/modules/action-bar/chat/index.js +152 -0
- package/lib/modules/action-bar/context.d.ts +3 -0
- package/lib/modules/action-bar/context.js +9 -0
- package/lib/modules/action-bar/device/index.css +157 -0
- package/lib/modules/action-bar/device/index.d.ts +8 -0
- package/lib/modules/action-bar/device/index.js +611 -0
- package/lib/modules/action-bar/index.css +212 -0
- package/lib/modules/action-bar/index.d.ts +25 -0
- package/lib/modules/action-bar/index.dev.d.ts +1 -0
- package/lib/modules/action-bar/index.dev.js +96 -0
- package/lib/modules/action-bar/index.js +89 -0
- package/lib/modules/action-bar/item-placement.d.ts +8 -0
- package/lib/modules/action-bar/item-placement.js +18 -0
- package/lib/modules/action-bar/item.d.ts +27 -0
- package/lib/modules/action-bar/item.js +154 -0
- package/lib/modules/action-bar/leave/assign-host.d.ts +8 -0
- package/lib/modules/action-bar/leave/assign-host.js +64 -0
- package/lib/modules/action-bar/leave/index.css +116 -0
- package/lib/modules/action-bar/leave/index.d.ts +3 -0
- package/lib/modules/action-bar/leave/index.js +110 -0
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +7 -0
- package/lib/modules/action-bar/leave/leave-meeting.js +135 -0
- package/lib/modules/action-bar/live-streaming/index.d.ts +4 -0
- package/lib/modules/action-bar/live-streaming/index.js +39 -0
- package/lib/modules/action-bar/more/index.css +114 -0
- package/lib/modules/action-bar/more/index.d.ts +5 -0
- package/lib/modules/action-bar/more/index.js +80 -0
- package/lib/modules/action-bar/more/poppover-content.d.ts +9 -0
- package/lib/modules/action-bar/more/poppover-content.js +369 -0
- package/lib/modules/action-bar/participants/index.css +9 -0
- package/lib/modules/action-bar/participants/index.d.ts +5 -0
- package/lib/modules/action-bar/participants/index.js +75 -0
- package/lib/modules/action-bar/record/index.css +39 -0
- package/lib/modules/action-bar/record/index.d.ts +5 -0
- package/lib/modules/action-bar/record/index.js +161 -0
- package/lib/modules/action-bar/record/stop-record-dialog.d.ts +5 -0
- package/lib/modules/action-bar/record/stop-record-dialog.js +48 -0
- package/lib/modules/action-bar/respond/index.d.ts +4 -0
- package/lib/modules/action-bar/respond/index.js +32 -0
- package/lib/modules/action-bar/screen-share/index.d.ts +4 -0
- package/lib/modules/action-bar/screen-share/index.js +97 -0
- package/lib/modules/action-bar/screen-share/submenu.d.ts +1 -0
- package/lib/modules/action-bar/screen-share/submenu.js +159 -0
- package/lib/modules/action-bar/security/drop-menu.d.ts +1 -0
- package/lib/modules/action-bar/security/drop-menu.js +164 -0
- package/lib/modules/action-bar/security/index.d.ts +4 -0
- package/lib/modules/action-bar/security/index.js +50 -0
- package/lib/modules/action-bar/settings/index.d.ts +4 -0
- package/lib/modules/action-bar/settings/index.js +41 -0
- package/lib/modules/action-bar/smaller.d.ts +1 -0
- package/lib/modules/action-bar/smaller.js +52 -0
- package/lib/modules/action-bar/store.d.ts +177 -0
- package/lib/modules/action-bar/store.js +1179 -0
- package/lib/modules/action-bar/type.d.ts +6 -0
- package/lib/modules/action-bar/type.js +13 -0
- package/lib/modules/action-bar/view.d.ts +5 -0
- package/lib/modules/action-bar/view.js +80 -0
- package/lib/modules/audio-stream/index.d.ts +21 -0
- package/lib/modules/audio-stream/index.js +119 -0
- package/lib/modules/chat/chat-bar/index.css +79 -0
- package/lib/modules/chat/chat-bar/index.d.ts +11 -0
- package/lib/modules/chat/chat-bar/index.js +125 -0
- package/lib/modules/chat/chat-select/index.css +156 -0
- package/lib/modules/chat/chat-select/index.d.ts +13 -0
- package/lib/modules/chat/chat-select/index.js +186 -0
- package/lib/modules/chat/chat.d.ts +12 -0
- package/lib/modules/chat/chat.js +295 -0
- package/lib/modules/chat/contex.d.ts +3 -0
- package/lib/modules/chat/contex.js +9 -0
- package/lib/modules/chat/demo-wrapper.d.ts +2 -0
- package/lib/modules/chat/demo-wrapper.js +42 -0
- package/lib/modules/chat/index.css +17 -0
- package/lib/modules/chat/index.d.ts +29 -0
- package/lib/modules/chat/index.dev.d.ts +1 -0
- package/lib/modules/chat/index.dev.js +58 -0
- package/lib/modules/chat/index.js +189 -0
- package/lib/modules/chat/message-list.d.ts +22 -0
- package/lib/modules/chat/message-list.js +595 -0
- package/lib/modules/chat/mock.d.ts +2 -0
- package/lib/modules/chat/mock.js +283 -0
- package/lib/modules/chat/store.d.ts +132 -0
- package/lib/modules/chat/store.js +923 -0
- package/lib/modules/chat/util.d.ts +6 -0
- package/lib/modules/chat/util.js +69 -0
- package/lib/modules/connection-gateway/components/computer/index.css +11 -0
- package/lib/modules/connection-gateway/components/computer/index.d.ts +3 -0
- package/lib/modules/connection-gateway/components/computer/index.js +66 -0
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.css +36 -0
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +10 -0
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +75 -0
- package/lib/modules/connection-gateway/components/phone/components/calling/index.css +72 -0
- package/lib/modules/connection-gateway/components/phone/components/calling/index.d.ts +7 -0
- package/lib/modules/connection-gateway/components/phone/components/calling/index.js +58 -0
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.css +10 -0
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.d.ts +5 -0
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.js +24 -0
- package/lib/modules/connection-gateway/components/phone/components/useing/index.css +46 -0
- package/lib/modules/connection-gateway/components/phone/components/useing/index.d.ts +3 -0
- package/lib/modules/connection-gateway/components/phone/components/useing/index.js +36 -0
- package/lib/modules/connection-gateway/components/phone/index.css +49 -0
- package/lib/modules/connection-gateway/components/phone/index.d.ts +3 -0
- package/lib/modules/connection-gateway/components/phone/index.js +181 -0
- package/lib/modules/connection-gateway/components/tabs/index.css +31 -0
- package/lib/modules/connection-gateway/components/tabs/index.d.ts +4 -0
- package/lib/modules/connection-gateway/components/tabs/index.js +43 -0
- package/lib/modules/connection-gateway/index.css +6 -0
- package/lib/modules/connection-gateway/index.d.ts +16 -0
- package/lib/modules/connection-gateway/index.js +67 -0
- package/lib/modules/connection-gateway/store.d.ts +80 -0
- package/lib/modules/connection-gateway/store.js +698 -0
- package/lib/modules/connection-gateway/view.d.ts +1 -0
- package/lib/modules/connection-gateway/view.js +22 -0
- package/lib/modules/device-pretest/assets/virtual-backdound-resources.d.ts +13 -0
- package/lib/modules/device-pretest/assets/virtual-backdound-resources.js +15 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +12 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +71 -0
- package/lib/modules/device-pretest/audio-preview/speaker-control.d.ts +2 -0
- package/lib/modules/device-pretest/audio-preview/speaker-control.js +63 -0
- package/lib/modules/device-pretest/audio-preview/speaker-detection.d.ts +12 -0
- package/lib/modules/device-pretest/audio-preview/speaker-detection.js +71 -0
- package/lib/modules/device-pretest/context.d.ts +3 -0
- package/lib/modules/device-pretest/context.js +9 -0
- package/lib/modules/device-pretest/index.css +127 -0
- package/lib/modules/device-pretest/index.d.ts +13 -0
- package/lib/modules/device-pretest/index.js +242 -0
- package/lib/modules/device-pretest/settings/beauty.d.ts +10 -0
- package/lib/modules/device-pretest/settings/beauty.js +103 -0
- package/lib/modules/device-pretest/settings/camera-select.d.ts +12 -0
- package/lib/modules/device-pretest/settings/camera-select.js +53 -0
- package/lib/modules/device-pretest/settings/index.css +15 -0
- package/lib/modules/device-pretest/settings/video-effect.d.ts +12 -0
- package/lib/modules/device-pretest/settings/video-effect.js +50 -0
- package/lib/modules/device-pretest/settings/video-settings-basic.d.ts +2 -0
- package/lib/modules/device-pretest/settings/video-settings-basic.js +143 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.d.ts +7 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +99 -0
- package/lib/modules/device-pretest/store.d.ts +69 -0
- package/lib/modules/device-pretest/store.js +413 -0
- package/lib/modules/dialog/components/chat/electron.d.ts +4 -0
- package/lib/modules/dialog/components/chat/electron.js +59 -0
- package/lib/modules/dialog/components/chat/index.d.ts +7 -0
- package/lib/modules/dialog/components/chat/index.js +66 -0
- package/lib/modules/dialog/components/confirm/electron.d.ts +10 -0
- package/lib/modules/dialog/components/confirm/electron.js +84 -0
- package/lib/modules/dialog/components/confirm/index.d.ts +10 -0
- package/lib/modules/dialog/components/confirm/index.js +75 -0
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +2 -0
- package/lib/modules/dialog/components/connection-gateway/electron.js +62 -0
- package/lib/modules/dialog/components/connection-gateway/index.css +27 -0
- package/lib/modules/dialog/components/connection-gateway/index.d.ts +3 -0
- package/lib/modules/dialog/components/connection-gateway/index.js +74 -0
- package/lib/modules/dialog/components/participant/electron.d.ts +2 -0
- package/lib/modules/dialog/components/participant/electron.js +85 -0
- package/lib/modules/dialog/components/participant/index.d.ts +3 -0
- package/lib/modules/dialog/components/participant/index.js +61 -0
- package/lib/modules/dialog/components/share-screen-selection/index.d.ts +4 -0
- package/lib/modules/dialog/components/share-screen-selection/index.js +42 -0
- package/lib/modules/dialog/components/whiteboard/index.d.ts +4 -0
- package/lib/modules/dialog/components/whiteboard/index.js +74 -0
- package/lib/modules/dialog/context.d.ts +3 -0
- package/lib/modules/dialog/context.js +9 -0
- package/lib/modules/dialog/dialogs.d.ts +11 -0
- package/lib/modules/dialog/dialogs.js +376 -0
- package/lib/modules/dialog/index.css +55 -0
- package/lib/modules/dialog/index.d.ts +29 -0
- package/lib/modules/dialog/index.js +80 -0
- package/lib/modules/dialog/store.d.ts +82 -0
- package/lib/modules/dialog/store.js +525 -0
- package/lib/modules/dialog/view.d.ts +5 -0
- package/lib/modules/dialog/view.js +30 -0
- package/lib/modules/event-toast/context.d.ts +3 -0
- package/lib/modules/event-toast/context.js +9 -0
- package/lib/modules/event-toast/index.d.ts +10 -0
- package/lib/modules/event-toast/index.js +41 -0
- package/lib/modules/event-toast/store.d.ts +9 -0
- package/lib/modules/event-toast/store.js +76 -0
- package/lib/modules/event-toast/view.d.ts +1 -0
- package/lib/modules/event-toast/view.js +14 -0
- package/lib/modules/invite/context.d.ts +3 -0
- package/lib/modules/invite/context.js +9 -0
- package/lib/modules/invite/index.css +318 -0
- package/lib/modules/invite/index.d.ts +13 -0
- package/lib/modules/invite/index.js +51 -0
- package/lib/modules/invite/pstn-invite.d.ts +2 -0
- package/lib/modules/invite/pstn-invite.js +271 -0
- package/lib/modules/invite/store.d.ts +71 -0
- package/lib/modules/invite/store.js +472 -0
- package/lib/modules/invite/view.d.ts +1 -0
- package/lib/modules/invite/view.js +47 -0
- package/lib/modules/invite/voip-invite.d.ts +2 -0
- package/lib/modules/invite/voip-invite.js +294 -0
- package/lib/modules/layout/components/Aside.d.ts +7 -0
- package/lib/modules/layout/components/Aside.js +144 -0
- package/lib/modules/layout/components/Carousel.d.ts +1 -0
- package/lib/modules/layout/components/Carousel.js +271 -0
- package/lib/modules/layout/components/Gallery.d.ts +1 -0
- package/lib/modules/layout/components/Gallery.js +360 -0
- package/lib/modules/layout/components/Layout.d.ts +2 -0
- package/lib/modules/layout/components/Layout.js +160 -0
- package/lib/modules/layout/components/index.css +608 -0
- package/lib/modules/layout/components/index.d.ts +5 -0
- package/lib/modules/layout/components/index.js +55 -0
- package/lib/modules/layout/components/utils.d.ts +1 -0
- package/lib/modules/layout/components/utils.js +10 -0
- package/lib/modules/layout/context.d.ts +3 -0
- package/lib/modules/layout/context.js +9 -0
- package/lib/modules/layout/index.css +27 -0
- package/lib/modules/layout/index.d.ts +10 -0
- package/lib/modules/layout/index.dev.d.ts +1 -0
- package/lib/modules/layout/index.dev.js +378 -0
- package/lib/modules/layout/index.js +72 -0
- package/lib/modules/layout/member-window/index.css +321 -0
- package/lib/modules/layout/member-window/index.d.ts +67 -0
- package/lib/modules/layout/member-window/index.js +730 -0
- package/lib/modules/layout/store.d.ts +177 -0
- package/lib/modules/layout/store.js +1278 -0
- package/lib/modules/layout/type.d.ts +64 -0
- package/lib/modules/layout/type.js +52 -0
- package/lib/modules/layout/video-window-datasource.d.ts +119 -0
- package/lib/modules/layout/video-window-datasource.js +1031 -0
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +10 -0
- package/lib/modules/live-streaming/context.d.ts +3 -0
- package/lib/modules/live-streaming/context.js +9 -0
- package/lib/modules/live-streaming/index.css +0 -0
- package/lib/modules/live-streaming/index.d.ts +13 -0
- package/lib/modules/live-streaming/index.dev.d.ts +1 -0
- package/lib/modules/live-streaming/index.dev.js +59 -0
- package/lib/modules/live-streaming/index.js +76 -0
- package/lib/modules/live-streaming/store.d.ts +38 -0
- package/lib/modules/live-streaming/store.js +360 -0
- package/lib/modules/live-streaming/view.d.ts +1 -0
- package/lib/modules/live-streaming/view.js +33 -0
- package/lib/modules/participant/attendee/index.css +14 -0
- package/lib/modules/participant/attendee/index.d.ts +19 -0
- package/lib/modules/participant/attendee/index.js +280 -0
- package/lib/modules/participant/attendee/participants-more-action.d.ts +18 -0
- package/lib/modules/participant/attendee/participants-more-action.js +275 -0
- package/lib/modules/participant/attendee/user-more-actions.d.ts +22 -0
- package/lib/modules/participant/attendee/user-more-actions.js +76 -0
- package/lib/modules/participant/can-moveable/index.d.ts +1 -0
- package/lib/modules/participant/can-moveable/index.js +68 -0
- package/lib/modules/participant/context.d.ts +3 -0
- package/lib/modules/participant/context.js +9 -0
- package/lib/modules/participant/index.css +58 -0
- package/lib/modules/participant/index.d.ts +25 -0
- package/lib/modules/participant/index.dev.d.ts +1 -0
- package/lib/modules/participant/index.dev.js +98 -0
- package/lib/modules/participant/index.js +93 -0
- package/lib/modules/participant/member-list-data-source.d.ts +28 -0
- package/lib/modules/participant/member-list-data-source.js +261 -0
- package/lib/modules/participant/room-control-drop-menu/index.css +19 -0
- package/lib/modules/participant/room-control-drop-menu/index.d.ts +2 -0
- package/lib/modules/participant/room-control-drop-menu/index.js +154 -0
- package/lib/modules/participant/store.d.ts +145 -0
- package/lib/modules/participant/store.js +1334 -0
- package/lib/modules/participant/type.d.ts +34 -0
- package/lib/modules/participant/type.js +22 -0
- package/lib/modules/participant/view.d.ts +11 -0
- package/lib/modules/participant/view.js +260 -0
- package/lib/modules/setting/audio-settings/audio-settings.d.ts +4 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +303 -0
- package/lib/modules/setting/audio-settings/index.css +144 -0
- package/lib/{fcr-ui-scene/src/containers/stream-window/index.d.ts → modules/setting/common/advance-link.d.ts} +1 -1
- package/lib/modules/setting/common/advance-link.js +27 -0
- package/lib/modules/setting/common/index.css +26 -0
- package/lib/modules/setting/common/useNamespace.d.ts +15 -0
- package/lib/modules/setting/common/useNamespace.js +66 -0
- package/lib/modules/setting/config.d.ts +16 -0
- package/lib/modules/setting/config.js +17 -0
- package/lib/modules/setting/context.d.ts +3 -0
- package/lib/modules/setting/context.js +9 -0
- package/lib/modules/setting/dialog-wrapper.d.ts +2 -0
- package/lib/modules/setting/dialog-wrapper.js +110 -0
- package/lib/modules/setting/general-settings/general-settings.d.ts +4 -0
- package/lib/modules/setting/general-settings/general-settings.js +66 -0
- package/lib/modules/setting/general-settings/index.css +26 -0
- package/lib/modules/setting/index.css +115 -0
- package/lib/modules/setting/index.d.ts +21 -0
- package/lib/modules/setting/index.dev.d.ts +1 -0
- package/lib/modules/setting/index.dev.js +71 -0
- package/lib/modules/setting/index.js +81 -0
- package/lib/modules/setting/state/index.css +211 -0
- package/lib/modules/setting/state/index.d.ts +4 -0
- package/lib/modules/setting/state/index.js +331 -0
- package/lib/modules/setting/storage-settings/index.css +91 -0
- package/lib/modules/setting/storage-settings/storage-settings.d.ts +3 -0
- package/lib/modules/setting/storage-settings/storage-settings.js +84 -0
- package/lib/modules/setting/store.d.ts +213 -0
- package/lib/modules/setting/store.js +1125 -0
- package/lib/modules/setting/video-settings/index.css +339 -0
- package/lib/modules/setting/video-settings/video-settings-basic.d.ts +9 -0
- package/lib/modules/setting/video-settings/video-settings-basic.js +160 -0
- package/lib/modules/setting/video-settings/video-settings.d.ts +10 -0
- package/lib/modules/setting/video-settings/video-settings.js +191 -0
- package/lib/modules/setting/view.d.ts +10 -0
- package/lib/modules/setting/view.js +139 -0
- package/lib/modules/share-screen/index.css +0 -0
- package/lib/modules/share-screen/index.d.ts +26 -0
- package/lib/modules/share-screen/index.dev.d.ts +1 -0
- package/lib/modules/share-screen/index.dev.js +96 -0
- package/lib/modules/share-screen/index.js +171 -0
- package/lib/modules/share-screen/selection/index.css +66 -0
- package/lib/modules/share-screen/selection/index.d.ts +9 -0
- package/lib/modules/share-screen/selection/index.js +224 -0
- package/lib/modules/share-screen/share-state-bar/index.css +38 -0
- package/lib/modules/share-screen/share-state-bar/index.d.ts +5 -0
- package/lib/modules/share-screen/share-state-bar/index.js +67 -0
- package/lib/modules/share-screen/store.d.ts +132 -0
- package/lib/modules/share-screen/store.js +1714 -0
- package/lib/modules/share-screen/view.d.ts +2 -0
- package/lib/modules/share-screen/view.js +45 -0
- package/lib/modules/state-bar/assets/fcr_grid_big.svg +3 -0
- package/lib/modules/state-bar/assets/fcr_listontop_big.svg +3 -0
- package/lib/modules/state-bar/assets/live-streaming.gif +0 -0
- package/lib/modules/state-bar/context.d.ts +3 -0
- package/lib/modules/state-bar/context.js +9 -0
- package/lib/modules/state-bar/index.css +630 -0
- package/lib/modules/state-bar/index.d.ts +18 -0
- package/lib/modules/state-bar/index.dev.d.ts +1 -0
- package/lib/modules/state-bar/index.dev.js +82 -0
- package/lib/modules/state-bar/index.js +69 -0
- package/lib/modules/state-bar/layout-config.d.ts +5 -0
- package/lib/modules/state-bar/layout-config.js +151 -0
- package/lib/modules/state-bar/live-streaming-state.d.ts +1 -0
- package/lib/modules/state-bar/live-streaming-state.js +199 -0
- package/lib/modules/state-bar/meeting-detail.css +107 -0
- package/lib/modules/state-bar/meeting-details.d.ts +2 -0
- package/lib/modules/state-bar/meeting-details.js +151 -0
- package/lib/modules/state-bar/meeting-network-state.css +131 -0
- package/lib/modules/state-bar/meeting-network-state.d.ts +2 -0
- package/lib/modules/state-bar/meeting-network-state.js +108 -0
- package/lib/modules/state-bar/meeting-time.d.ts +2 -0
- package/lib/modules/state-bar/meeting-time.js +49 -0
- package/lib/modules/state-bar/network-quality.d.ts +2 -0
- package/lib/modules/state-bar/network-quality.js +33 -0
- package/lib/modules/state-bar/recording.d.ts +1 -0
- package/lib/modules/state-bar/recording.js +110 -0
- package/lib/modules/state-bar/store.d.ts +70 -0
- package/lib/modules/state-bar/store.js +515 -0
- package/lib/modules/state-bar/view.d.ts +5 -0
- package/lib/modules/state-bar/view.js +182 -0
- package/lib/modules/video-window/context.d.ts +3 -0
- package/lib/modules/video-window/context.js +9 -0
- package/lib/modules/video-window/deviceState/index.d.ts +15 -0
- package/lib/modules/video-window/deviceState/index.js +77 -0
- package/lib/modules/video-window/index.css +17 -0
- package/lib/modules/video-window/index.d.ts +9 -0
- package/lib/modules/video-window/index.js +65 -0
- package/lib/modules/video-window/members/index.css +50 -0
- package/lib/modules/video-window/members/index.d.ts +2 -0
- package/lib/modules/video-window/members/index.js +134 -0
- package/lib/modules/video-window/speaking/index.css +69 -0
- package/lib/modules/video-window/speaking/index.d.ts +3 -0
- package/lib/modules/video-window/speaking/index.js +57 -0
- package/lib/modules/video-window/store.d.ts +88 -0
- package/lib/modules/video-window/store.js +598 -0
- package/lib/modules/video-window/topControl/index.css +35 -0
- package/lib/modules/video-window/topControl/index.d.ts +3 -0
- package/lib/modules/video-window/topControl/index.js +85 -0
- package/lib/modules/video-window/type.d.ts +23 -0
- package/lib/modules/video-window/type.js +32 -0
- package/lib/modules/video-window/view.d.ts +2 -0
- package/lib/modules/video-window/view.js +63 -0
- package/lib/modules/whiteboard/app.d.ts +2 -0
- package/lib/modules/whiteboard/app.js +55 -0
- package/lib/modules/whiteboard/components/control-bar/index.css +49 -0
- package/lib/modules/whiteboard/components/control-bar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/control-bar/index.js +163 -0
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +36 -0
- package/lib/modules/whiteboard/components/control-bar/store.js +288 -0
- package/lib/modules/whiteboard/components/loading/index.css +76 -0
- package/lib/modules/whiteboard/components/loading/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/loading/index.js +68 -0
- package/lib/modules/whiteboard/components/loading/loading.png +0 -0
- package/lib/modules/whiteboard/components/multi-window/index.css +63 -0
- package/lib/modules/whiteboard/components/multi-window/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +34 -0
- package/lib/modules/whiteboard/components/pagination/index.css +228 -0
- package/lib/modules/whiteboard/components/pagination/index.d.ts +15 -0
- package/lib/modules/whiteboard/components/pagination/index.js +163 -0
- package/lib/modules/whiteboard/components/pagination/store.d.ts +19 -0
- package/lib/modules/whiteboard/components/pagination/store.js +17 -0
- package/lib/modules/whiteboard/components/progress/electron.d.ts +1 -0
- package/lib/modules/whiteboard/components/progress/electron.js +32 -0
- package/lib/modules/whiteboard/components/progress/index.d.ts +5 -0
- package/lib/modules/whiteboard/components/progress/index.js +43 -0
- package/lib/modules/whiteboard/components/progress/style.css +50 -0
- package/lib/modules/whiteboard/components/scene-pagination.d.ts +1 -0
- package/lib/modules/whiteboard/components/scene-pagination.js +32 -0
- package/lib/modules/whiteboard/components/switch-theme/index.css +94 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/switch-theme/index.js +77 -0
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +8 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +44 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +3 -0
- package/lib/modules/whiteboard/components/switch-theme/libs.js +28 -0
- package/lib/modules/whiteboard/components/toolbar/ style.css +588 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/color.js +39 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +105 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/picker.js +63 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +44 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +98 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +59 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/history.js +46 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/fold-icon.js +41 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/components/icons/move-icon.js +66 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.d.ts +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +131 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +112 -0
- package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/screen-capture-picker.js +74 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.d.ts +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +163 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +14 -0
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +211 -0
- package/lib/modules/whiteboard/components/toolbar/index.d.ts +2 -0
- package/lib/modules/whiteboard/components/toolbar/index.js +175 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +50 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +224 -0
- package/lib/modules/whiteboard/context.d.ts +66 -0
- package/lib/modules/whiteboard/context.js +34 -0
- package/lib/modules/whiteboard/index.d.ts +115 -0
- package/lib/modules/whiteboard/index.js +1082 -0
- package/lib/modules/whiteboard/style.css +142 -0
- package/lib/modules/whiteboard/type.d.ts +96 -0
- package/lib/modules/whiteboard/type.js +94 -0
- package/lib/modules/whiteboard/utils.d.ts +11 -0
- package/lib/modules/whiteboard/utils.js +25 -0
- package/lib/plugins/browser-runtime-plugin.d.ts +0 -0
- package/lib/plugins/browser-runtime-plugin.js +67 -0
- package/lib/plugins/css-preset-plugin.d.ts +1 -0
- package/lib/plugins/css-preset-plugin.js +22 -0
- package/lib/plugins/electron-rtc-plugin.d.ts +1 -0
- package/lib/plugins/electron-rtc-plugin.js +5 -0
- package/lib/plugins/module-dev-plugin.d.ts +12 -0
- package/lib/plugins/module-dev-plugin.js +181 -0
- package/lib/plugins/multi-lang-plugin.d.ts +5 -0
- package/lib/plugins/multi-lang-plugin.js +17 -0
- package/lib/plugins/rtm-plugin.d.ts +1 -0
- package/lib/plugins/rtm-plugin.js +5 -0
- package/lib/plugins/web-rtc-plugin.d.ts +1 -0
- package/lib/plugins/web-rtc-plugin.js +5 -0
- package/lib/runtime.d.ts +86 -0
- package/lib/translations/enUS.d.ts +993 -0
- package/lib/translations/enUS.js +1016 -0
- package/lib/translations/zhCN.d.ts +993 -0
- package/lib/translations/zhCN.js +1016 -0
- package/lib/type.d.ts +107 -0
- package/lib/type.js +42 -0
- package/lib/ui-manager.d.ts +17 -0
- package/lib/ui-manager.js +555 -0
- package/lib/ui-scene.d.ts +13 -0
- package/lib/ui-scene.js +142 -0
- package/lib/utilities/board-context.d.ts +5 -0
- package/lib/utilities/board-context.js +12 -0
- package/lib/utilities/constant.d.ts +248 -0
- package/lib/utilities/constant.js +232 -0
- package/lib/utilities/copyText.d.ts +2 -0
- package/lib/utilities/copyText.js +43 -0
- package/lib/utilities/default-config.d.ts +32 -0
- package/lib/utilities/default-config.js +39 -0
- package/lib/utilities/extract.d.ts +5 -0
- package/lib/utilities/extract.js +97 -0
- package/lib/utilities/hooks.d.ts +14 -0
- package/lib/utilities/hooks.js +99 -0
- package/lib/utilities/mute-action.d.ts +4 -0
- package/lib/utilities/mute-action.js +48 -0
- package/lib/utilities/parameters.d.ts +7 -0
- package/lib/utilities/parameters.js +20 -0
- package/lib/utilities/platform.d.ts +1 -0
- package/lib/utilities/platform.js +11 -0
- package/lib/utilities/regex.d.ts +1 -0
- package/lib/utilities/regex.js +14 -0
- package/lib/utilities/renderer-event.d.ts +9 -0
- package/lib/utilities/renderer-event.js +76 -0
- package/lib/utilities/renderer.d.ts +23 -0
- package/lib/utilities/renderer.js +109 -0
- package/lib/utilities/screen.d.ts +3 -0
- package/lib/utilities/screen.js +41 -0
- package/lib/utilities/tools.d.ts +25 -0
- package/lib/utilities/tools.js +164 -0
- package/lib/utilities/ui-resources.d.ts +2 -0
- package/lib/utilities/ui-resources.js +9 -0
- package/lib/utilities/useNamespace.d.ts +15 -0
- package/lib/utilities/useNamespace.js +66 -0
- package/lib/utilities/video-track-render-context.d.ts +8 -0
- package/lib/utilities/video-track-render-context.js +9 -0
- package/package.json +61 -85
- package/public/assets/fcr_chat_reddot.svg +5 -0
- package/public/assets/fcr_defaultpage.png +0 -0
- package/public/assets/fcr_grid_big.svg +3 -0
- package/public/assets/fcr_listontop_big.svg +3 -0
- package/public/assets/pretest.mp3 +0 -0
- package/public/assets/state-bar-logo.png +0 -0
- package/public/assets/step-gradient.svg +10 -0
- package/public/extensions/agora-extension-virtual-background/agora-wasm.wasm +0 -0
- package/public/extensions/ai-denoiser/denoiser-wasm-simd.wasm +0 -0
- package/public/extensions/ai-denoiser/denoiser-wasm.js +1 -0
- package/public/extensions/ai-denoiser/denoiser-wasm.wasm +0 -0
- package/public/index.html +26 -0
- package/lib/fcr-ui-kit/src/components/avatar/helper.d.ts +0 -2
- package/lib/fcr-ui-kit/src/components/avatar/index.d.ts +0 -8
- package/lib/fcr-ui-kit/src/components/button/index.d.ts +0 -82
- package/lib/fcr-ui-kit/src/components/checkbox/index.d.ts +0 -12
- package/lib/fcr-ui-kit/src/components/dialog/class-dialog.d.ts +0 -51
- package/lib/fcr-ui-kit/src/components/dialog/confirm-dialog.d.ts +0 -70
- package/lib/fcr-ui-kit/src/components/dialog/global-dialog.d.ts +0 -11
- package/lib/fcr-ui-kit/src/components/dialog/index.d.ts +0 -68
- package/lib/fcr-ui-kit/src/components/dropdown/index.d.ts +0 -58
- package/lib/fcr-ui-kit/src/components/input/index.d.ts +0 -69
- package/lib/fcr-ui-kit/src/components/input-number/index.d.ts +0 -69
- package/lib/fcr-ui-kit/src/components/pagination/index.d.ts +0 -27
- package/lib/fcr-ui-kit/src/components/popover/index.d.ts +0 -47
- package/lib/fcr-ui-kit/src/components/progress/index.d.ts +0 -11
- package/lib/fcr-ui-kit/src/components/radio/index.d.ts +0 -21
- package/lib/fcr-ui-kit/src/components/slider/index.d.ts +0 -22
- package/lib/fcr-ui-kit/src/components/sound-player/index.d.ts +0 -6
- package/lib/fcr-ui-kit/src/components/svg-img/clickable-icon.d.ts +0 -25
- package/lib/fcr-ui-kit/src/components/svg-img/index.d.ts +0 -15
- package/lib/fcr-ui-kit/src/components/svg-img/mic.d.ts +0 -5
- package/lib/fcr-ui-kit/src/components/svg-img/svg-dict.d.ts +0 -12
- package/lib/fcr-ui-kit/src/components/svg-img/type.d.ts +0 -196
- package/lib/fcr-ui-kit/src/components/svga-player/index.d.ts +0 -15
- package/lib/fcr-ui-kit/src/components/svga-player/svga-types.d.ts +0 -1
- package/lib/fcr-ui-kit/src/components/table/index.d.ts +0 -9
- package/lib/fcr-ui-kit/src/components/tabs/index.d.ts +0 -14
- package/lib/fcr-ui-kit/src/components/textarea/helper.d.ts +0 -2
- package/lib/fcr-ui-kit/src/components/textarea/index.d.ts +0 -100
- package/lib/fcr-ui-kit/src/components/toast/index.d.ts +0 -122
- package/lib/fcr-ui-kit/src/components/tooltip/dialog.d.ts +0 -19
- package/lib/fcr-ui-kit/src/components/tooltip/index.d.ts +0 -89
- package/lib/fcr-ui-kit/src/components/tooltip/info.d.ts +0 -6
- package/lib/fcr-ui-kit/src/components/volume/index.d.ts +0 -8
- package/lib/fcr-ui-kit/src/utils/click-anywhere.d.ts +0 -1
- package/lib/fcr-ui-kit/src/utils/hooks/animations.d.ts +0 -14
- package/lib/fcr-ui-kit/src/utils/hooks/use-click-anywhere.d.ts +0 -2
- package/lib/fcr-ui-kit/src/utils/tailwindcss.d.ts +0 -3
- package/lib/fcr-ui-scene/src/app.d.ts +0 -5
- package/lib/fcr-ui-scene/src/configs/base-theme.d.ts +0 -391
- package/lib/fcr-ui-scene/src/configs/base-ui.d.ts +0 -12
- package/lib/fcr-ui-scene/src/configs/room-template.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/chat/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/cloud/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/device/index.d.ts +0 -9
- package/lib/fcr-ui-scene/src/containers/action-bar/index.d.ts +0 -24
- package/lib/fcr-ui-scene/src/containers/action-bar/leave/index.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/action-bar/participants/index.d.ts +0 -5
- package/lib/fcr-ui-scene/src/containers/action-bar/raise-hands/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/record/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/screen-share/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/setting/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/toolbox/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/action-bar/whiteboard/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/breakout-room/ask-help-list.d.ts +0 -10
- package/lib/fcr-ui-scene/src/containers/breakout-room/broadcast-panel.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/breakout-room/create-panel.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/breakout-room/group-info-panel.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/breakout-room/group-panel.d.ts +0 -5
- package/lib/fcr-ui-scene/src/containers/breakout-room/group-status-panel.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/breakout-room/grouping.d.ts +0 -15
- package/lib/fcr-ui-scene/src/containers/breakout-room/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/breakout-room/search-panel.d.ts +0 -5
- package/lib/fcr-ui-scene/src/containers/breakout-room/wizard.d.ts +0 -6
- package/lib/fcr-ui-scene/src/containers/cloud/dialog-header.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/cloud/index.d.ts +0 -6
- package/lib/fcr-ui-scene/src/containers/cloud/personal.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/cloud/public.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/common/interact-labels.d.ts +0 -6
- package/lib/fcr-ui-scene/src/containers/device-pretest/basic-settings.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/device-pretest/beauty-filter.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/device-pretest/beauty-slider.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/device-pretest/device-select.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/device-pretest/index.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/device-pretest/mirror-toggle.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/device-pretest/video-portal.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/device-pretest/virtual-background.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/device-settings/audio-settings.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/device-settings/dialog-wrapper.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/device-settings/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/device-settings/video-settings.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/dialog/class-info.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/dialog/confirm.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/dialog/index.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/layout/cover-view.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/layout/gallery-view.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/layout/presentation-view.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/loading/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/participants/dialog.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/participants/index.d.ts +0 -5
- package/lib/fcr-ui-scene/src/containers/status-bar/class-duration/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/status-bar/fullscreen/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/status-bar/index.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/status-bar/layout-switch/index.d.ts +0 -22
- package/lib/fcr-ui-scene/src/containers/status-bar/network/index.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/status-bar/record-status/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/status-bar/room-info/index.d.ts +0 -4
- package/lib/fcr-ui-scene/src/containers/status-bar/share/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/status-bar/widgets/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/stream-window/context.d.ts +0 -52
- package/lib/fcr-ui-scene/src/containers/video-player/index.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/video-player/players.d.ts +0 -3
- package/lib/fcr-ui-scene/src/containers/widget/break-out-room/index.d.ts +0 -2
- package/lib/fcr-ui-scene/src/containers/widget/draggable-wrapper/index.d.ts +0 -7
- package/lib/fcr-ui-scene/src/containers/widget/helpers.d.ts +0 -40
- package/lib/fcr-ui-scene/src/containers/widget/hooks.d.ts +0 -21
- package/lib/fcr-ui-scene/src/containers/widget/index.d.ts +0 -7
- package/lib/fcr-ui-scene/src/containers/widget/participants/index.d.ts +0 -2
- package/lib/fcr-ui-scene/src/extension/board.d.ts +0 -73
- package/lib/fcr-ui-scene/src/extension/edu-tool.d.ts +0 -57
- package/lib/fcr-ui-scene/src/extension/events.d.ts +0 -91
- package/lib/fcr-ui-scene/src/extension/type.d.ts +0 -94
- package/lib/fcr-ui-scene/src/index.d.ts +0 -39
- package/lib/fcr-ui-scene/src/lock.d.ts +0 -8
- package/lib/fcr-ui-scene/src/preset.d.ts +0 -1
- package/lib/fcr-ui-scene/src/resources/translations/enUs.d.ts +0 -400
- package/lib/fcr-ui-scene/src/resources/translations/zhCn.d.ts +0 -405
- package/lib/fcr-ui-scene/src/scenarios/classroom.d.ts +0 -2
- package/lib/fcr-ui-scene/src/scenarios/layout/index.d.ts +0 -2
- package/lib/fcr-ui-scene/src/type.d.ts +0 -361
- package/lib/fcr-ui-scene/src/uistores/action-bar.d.ts +0 -58
- package/lib/fcr-ui-scene/src/uistores/base.d.ts +0 -58
- package/lib/fcr-ui-scene/src/uistores/breakout.d.ts +0 -225
- package/lib/fcr-ui-scene/src/uistores/cloud/helper.d.ts +0 -26
- package/lib/fcr-ui-scene/src/uistores/cloud/index.d.ts +0 -51
- package/lib/fcr-ui-scene/src/uistores/cloud/struct.d.ts +0 -131
- package/lib/fcr-ui-scene/src/uistores/context.d.ts +0 -7
- package/lib/fcr-ui-scene/src/uistores/device-setting.d.ts +0 -214
- package/lib/fcr-ui-scene/src/uistores/gallery-view.d.ts +0 -16
- package/lib/fcr-ui-scene/src/uistores/getters.d.ts +0 -40
- package/lib/fcr-ui-scene/src/uistores/index.d.ts +0 -47
- package/lib/fcr-ui-scene/src/uistores/layout.d.ts +0 -64
- package/lib/fcr-ui-scene/src/uistores/notification.d.ts +0 -9
- package/lib/fcr-ui-scene/src/uistores/participants.d.ts +0 -48
- package/lib/fcr-ui-scene/src/uistores/presentation-view.d.ts +0 -24
- package/lib/fcr-ui-scene/src/uistores/status-bar.d.ts +0 -47
- package/lib/fcr-ui-scene/src/uistores/stream.d.ts +0 -48
- package/lib/fcr-ui-scene/src/uistores/subscription/abstract.d.ts +0 -45
- package/lib/fcr-ui-scene/src/uistores/subscription/index.d.ts +0 -13
- package/lib/fcr-ui-scene/src/uistores/subscription/main-room.d.ts +0 -14
- package/lib/fcr-ui-scene/src/uistores/subscription/type.d.ts +0 -10
- package/lib/fcr-ui-scene/src/uistores/type.d.ts +0 -86
- package/lib/fcr-ui-scene/src/uistores/widget.d.ts +0 -49
- package/lib/fcr-ui-scene/src/utils/asset.d.ts +0 -1
- package/lib/fcr-ui-scene/src/utils/check.d.ts +0 -7
- package/lib/fcr-ui-scene/src/utils/clamp-bounds.d.ts +0 -14
- package/lib/fcr-ui-scene/src/utils/config-loader.d.ts +0 -7
- package/lib/fcr-ui-scene/src/utils/grid/index.d.ts +0 -9
- package/lib/fcr-ui-scene/src/utils/hooks/use-authorization.d.ts +0 -5
- package/lib/fcr-ui-scene/src/utils/hooks/use-device-switch.d.ts +0 -29
- package/lib/fcr-ui-scene/src/utils/hooks/use-drag-position.d.ts +0 -21
- package/lib/fcr-ui-scene/src/utils/hooks/use-network.d.ts +0 -17
- package/lib/fcr-ui-scene/src/utils/hooks/use-pin-stream.d.ts +0 -4
- package/lib/fcr-ui-scene/src/utils/hooks/use-rnd-position.d.ts +0 -24
- package/lib/fcr-ui-scene/src/utils/hooks/use-store.d.ts +0 -1
- package/lib/fcr-ui-scene/src/utils/hooks/use-video-renderable.d.ts +0 -3
- package/lib/fcr-ui-scene/src/utils/hooks/use-z-index.d.ts +0 -8
- package/lib/fcr-ui-scene/src/utils/index.d.ts +0 -7
- package/lib/fcr-ui-scene/src/utils/launch-options-holder.d.ts +0 -10
- package/lib/fcr-ui-scene/src/utils/rtc-extensions.d.ts +0 -29
- package/lib/fcr-ui-scene/src/utils/short-name.d.ts +0 -1
- package/lib/fcr-ui-scene/src/utils/stream/index.d.ts +0 -3
- package/lib/fcr-ui-scene/src/utils/stream/state-keeper.d.ts +0 -18
- package/lib/fcr-ui-scene/src/utils/stream/struct.d.ts +0 -67
- package/lib/fcr-ui-scene/src/utils/vsd-pattern.d.ts +0 -1
- package/lib/fcr-ui-scene/src/utils/z-index-controller.d.ts +0 -9
- package/lib/fcr-ui-scene/tailwind.config.d.ts +0 -1
- package/lib/scene.bundle.js +0 -2
- /package/lib/{fcr-ui-scene/src/containers/video-player/tools-overlay.d.ts → electron/preload.d.ts} +0 -0
|
@@ -0,0 +1,1082 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
|
7
|
+
require("core-js/modules/es.error.to-string.js");
|
|
8
|
+
require("core-js/modules/es.array.filter.js");
|
|
9
|
+
require("core-js/modules/es.array.is-array.js");
|
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.name.js");
|
|
12
|
+
require("core-js/modules/es.map.js");
|
|
13
|
+
require("core-js/modules/es.number.constructor.js");
|
|
14
|
+
require("core-js/modules/es.object.create.js");
|
|
15
|
+
require("core-js/modules/es.object.define-properties.js");
|
|
16
|
+
require("core-js/modules/es.object.define-property.js");
|
|
17
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
18
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
19
|
+
require("core-js/modules/es.object.keys.js");
|
|
20
|
+
require("core-js/modules/es.reflect.construct.js");
|
|
21
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
22
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
23
|
+
Object.defineProperty(exports, "__esModule", {
|
|
24
|
+
value: true
|
|
25
|
+
});
|
|
26
|
+
exports.FcrWhiteboardUIModule = void 0;
|
|
27
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
28
|
+
require("core-js/modules/es.array.concat.js");
|
|
29
|
+
require("core-js/modules/es.array.find.js");
|
|
30
|
+
require("core-js/modules/es.array.for-each.js");
|
|
31
|
+
require("core-js/modules/es.array.includes.js");
|
|
32
|
+
require("core-js/modules/es.array.iterator.js");
|
|
33
|
+
require("core-js/modules/es.array.push.js");
|
|
34
|
+
require("core-js/modules/es.array.some.js");
|
|
35
|
+
require("core-js/modules/es.function.bind.js");
|
|
36
|
+
require("core-js/modules/es.object.assign.js");
|
|
37
|
+
require("core-js/modules/es.object.to-string.js");
|
|
38
|
+
require("core-js/modules/es.object.values.js");
|
|
39
|
+
require("core-js/modules/es.set.js");
|
|
40
|
+
require("core-js/modules/es.string.includes.js");
|
|
41
|
+
require("core-js/modules/es.string.iterator.js");
|
|
42
|
+
require("core-js/modules/es.weak-map.js");
|
|
43
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
44
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
45
|
+
require("core-js/modules/web.timers.js");
|
|
46
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
47
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
48
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
49
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
50
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
51
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
52
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
53
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
54
|
+
var _type = require("./type");
|
|
55
|
+
var _app = require("./app");
|
|
56
|
+
var _context3 = require("./context");
|
|
57
|
+
var _mobx = require("mobx");
|
|
58
|
+
var _utils = require("./utils");
|
|
59
|
+
var _decorator = require("agora-foundation/lib/decorator");
|
|
60
|
+
var _tinycolor = _interopRequireDefault(require("tinycolor2"));
|
|
61
|
+
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
62
|
+
var _multiWindow = require("./components/multi-window");
|
|
63
|
+
var _constant = require("../../utilities/constant");
|
|
64
|
+
var _store = require("./components/toolbar/store");
|
|
65
|
+
var _rendererEvent = require("../../utilities/renderer-event");
|
|
66
|
+
var _base = require("../../base");
|
|
67
|
+
var _store2 = require("./components/control-bar/store");
|
|
68
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
69
|
+
var _type2 = require("agora-edu-core/lib/type");
|
|
70
|
+
var _enums = require("agora-edu-core/lib/room-control/whiteboard-control/enums");
|
|
71
|
+
var _libs = _interopRequireDefault(require("./components/switch-theme/libs"));
|
|
72
|
+
var _type3 = require("../layout/type");
|
|
73
|
+
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
74
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
75
|
+
var _FcrWhiteboardUIModule;
|
|
76
|
+
var _initProto, _init__lonelyWindowState, _init__ownerUser, _init__isHost, _init__boardBackground, _init__localUser, _onPropertiesUpdateDecs, _mountDecs, _unmountDecs, _unloadDecs, _boardUIEventsDecs, _createToolbarUIContextDecs, _repositionToolbarDecs, _updateRedoDecs, _updateUndoDecs, _setConnectionStateDecs, _getSnapshotImageDecs, _openLonelyWindowDecs, _setJoinSuccessedDecs, _MainWindowEventsDecs, _ref;
|
|
77
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
78
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
79
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
80
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
81
|
+
function _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }
|
|
82
|
+
function _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError("Cannot initialize the same private elements twice on an object"); } }
|
|
83
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
84
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
85
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
86
|
+
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
87
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
88
|
+
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); }
|
|
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; }
|
|
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; }
|
|
91
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
92
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
93
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
94
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
95
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
96
|
+
_ref = (_onPropertiesUpdateDecs = [_mobx.action, _mobx.action.bound], _mountDecs = [_mobx.action, _mobx.action.bound], _unmountDecs = [_mobx.action, _mobx.action.bound], _unloadDecs = [_mobx.action, _mobx.action.bound], _boardUIEventsDecs = [_mobx.action, _mobx.action.bound], _createToolbarUIContextDecs = [_mobx.action, _mobx.action.bound], _repositionToolbarDecs = [_mobx.action, _mobx.action.bound], _updateRedoDecs = [_mobx.action, _mobx.action.bound], _updateUndoDecs = [_mobx.action, _mobx.action.bound], _setConnectionStateDecs = [_mobx.action, _mobx.action.bound], _getSnapshotImageDecs = [_mobx.action, _mobx.action.bound], _openLonelyWindowDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessedDecs = [_mobx.action, _mobx.action.bound], _MainWindowEventsDecs = [_mobx.action, _mobx.action.bound], "_disposers");
|
|
97
|
+
var FcrWhiteboardUIModule = exports.FcrWhiteboardUIModule = /*#__PURE__*/function (_UIModule) {
|
|
98
|
+
function FcrWhiteboardUIModule(_ref2) {
|
|
99
|
+
var _this;
|
|
100
|
+
var uiEventStore = _ref2.uiEventStore,
|
|
101
|
+
userControl = _ref2.userControl,
|
|
102
|
+
roomControl = _ref2.roomControl,
|
|
103
|
+
whiteboardControl = _ref2.whiteboardControl,
|
|
104
|
+
streamControl = _ref2.streamControl,
|
|
105
|
+
securityStore = _ref2.securityStore;
|
|
106
|
+
(0, _classCallCheck2["default"])(this, FcrWhiteboardUIModule);
|
|
107
|
+
_this = _callSuper(this, FcrWhiteboardUIModule);
|
|
108
|
+
//@ts-ignore
|
|
109
|
+
(0, _defineProperty2["default"])(_this, _ref, (_initProto(_this), []));
|
|
110
|
+
(0, _defineProperty2["default"])(_this, "_whiteboardControl", null);
|
|
111
|
+
(0, _defineProperty2["default"])(_this, "_connectionState", _enums.FcrBoardRoomConnectionState.DISCONNECTED);
|
|
112
|
+
(0, _defineProperty2["default"])(_this, "_defaultBoardState", {
|
|
113
|
+
tool: _type.FcrBoardTool.Clicker,
|
|
114
|
+
strokeColor: '#fed130',
|
|
115
|
+
strokeWidth: 2
|
|
116
|
+
});
|
|
117
|
+
(0, _defineProperty2["default"])(_this, "_initWidth", 1920);
|
|
118
|
+
(0, _defineProperty2["default"])(_this, "_initHeight", 1220);
|
|
119
|
+
(0, _defineProperty2["default"])(_this, "_joinSuccessed", false);
|
|
120
|
+
(0, _defineProperty2["default"])(_this, "_isActive", false);
|
|
121
|
+
(0, _defineProperty2["default"])(_this, "_timer", null);
|
|
122
|
+
(0, _defineProperty2["default"])(_this, "_isMyBoard", false);
|
|
123
|
+
(0, _defineProperty2["default"])(_this, "_t", function (t) {
|
|
124
|
+
return '';
|
|
125
|
+
});
|
|
126
|
+
(0, _defineProperty2["default"])(_this, "_mounted", false);
|
|
127
|
+
(0, _defineProperty2["default"])(_this, "_initialized", false);
|
|
128
|
+
(0, _defineProperty2["default"])(_this, "_joined", false);
|
|
129
|
+
(0, _defineProperty2["default"])(_this, "_grantedUsers", new Set());
|
|
130
|
+
_classPrivateFieldInitSpec(_this, _A, _init__lonelyWindowState(_this, _type.LonelyWindowState.DEFAULT));
|
|
131
|
+
_classPrivateFieldInitSpec(_this, _B, _init__ownerUser(_this, null));
|
|
132
|
+
_classPrivateFieldInitSpec(_this, _C, _init__isHost(_this, false));
|
|
133
|
+
_classPrivateFieldInitSpec(_this, _D, _init__boardBackground(_this, '#fff'));
|
|
134
|
+
_classPrivateFieldInitSpec(_this, _E, _init__localUser(_this));
|
|
135
|
+
_this._uiEventStore = uiEventStore;
|
|
136
|
+
_this._userControl = userControl;
|
|
137
|
+
_this._roomControl = roomControl;
|
|
138
|
+
_this._securityStore = securityStore;
|
|
139
|
+
_this._whiteboardControl = whiteboardControl;
|
|
140
|
+
_this._whiteboardControl.addObserver(_this._boardObservble());
|
|
141
|
+
_this._toolbarStore = new _store.ToolbarStore();
|
|
142
|
+
_this._controlbarStore = new _store2.WhiteboardControlBarStore({
|
|
143
|
+
uiEventStore: uiEventStore,
|
|
144
|
+
streamControl: streamControl,
|
|
145
|
+
userControl: userControl,
|
|
146
|
+
securityStore: securityStore
|
|
147
|
+
});
|
|
148
|
+
whiteboardControl.addObserver({
|
|
149
|
+
onBoardActiveInfoUpdated: function onBoardActiveInfoUpdated(isActive, operatorUser, reason) {
|
|
150
|
+
var _this$_ownerUser;
|
|
151
|
+
_this.logger.info('onBoardActiveInfoUpdated', isActive, operatorUser);
|
|
152
|
+
var currentUserId = _this._localUser.userId;
|
|
153
|
+
var userId = operatorUser.userId;
|
|
154
|
+
if (reason === _enums.FcrBoardActiveInfoReason.REPLACE && userId !== currentUserId && ((_this$_ownerUser = _this._ownerUser) === null || _this$_ownerUser === void 0 ? void 0 : _this$_ownerUser.userId) === currentUserId) {
|
|
155
|
+
_this._alertWhenReplace(operatorUser);
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
isActive ? _this.onPropertiesUpdate({
|
|
159
|
+
operatorUser: operatorUser
|
|
160
|
+
}) : _this.onDestroy({
|
|
161
|
+
operatorUser: operatorUser
|
|
162
|
+
});
|
|
163
|
+
},
|
|
164
|
+
onBoardBackgroundColorUpdated: function onBoardBackgroundColorUpdated(color) {
|
|
165
|
+
_this._setBackground(color);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
streamControl.addObserver({
|
|
169
|
+
onStreamsRemoved: function onStreamsRemoved(roomId, events) {
|
|
170
|
+
var isReplaced = events.find(function (event) {
|
|
171
|
+
var _event$cause;
|
|
172
|
+
return ((_event$cause = event.cause) === null || _event$cause === void 0 ? void 0 : _event$cause.data.reason) === _enums.FcrBoardActiveInfoReason.REPLACE;
|
|
173
|
+
});
|
|
174
|
+
var isMyStream = events.some(function (event) {
|
|
175
|
+
return event.modifiedStream.owner.userId === _this._localUser.userId;
|
|
176
|
+
});
|
|
177
|
+
if (isReplaced && isMyStream) {
|
|
178
|
+
_this._alertWhenReplace(isReplaced === null || isReplaced === void 0 ? void 0 : isReplaced.operatorUser);
|
|
179
|
+
}
|
|
180
|
+
if (isReplaced && !isMyStream) {
|
|
181
|
+
var _isReplaced$operatorU;
|
|
182
|
+
_this._uiEventStore.showToast({
|
|
183
|
+
type: 'info',
|
|
184
|
+
message: "".concat(isReplaced === null || isReplaced === void 0 || (_isReplaced$operatorU = isReplaced.operatorUser) === null || _isReplaced$operatorU === void 0 ? void 0 : _isReplaced$operatorU.userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare'))
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
if (isReplaced && isMyStream && !_this._isActive) {
|
|
188
|
+
_this._uiEventStore.sendEvent(_constant.UIAction.STOP_SCREEN_CAPTURE);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
userControl.addObserver({
|
|
193
|
+
onUserInfoUpdated: function onUserInfoUpdated(_, event) {
|
|
194
|
+
if (event.modifiedUser.userId === _this._localUser.userId) {
|
|
195
|
+
_this._localUser = event.modifiedUser;
|
|
196
|
+
_this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this._localUser.userRole);
|
|
197
|
+
(0, _rendererEvent.sendEvent)({
|
|
198
|
+
action: _constant.RendererEventAction.SET_LOCAL_USER,
|
|
199
|
+
payload: event.modifiedUser
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
_this._uiEventStore.addObserver({
|
|
205
|
+
onEvent: _this.onEvent.bind(_this)
|
|
206
|
+
});
|
|
207
|
+
_this._boardStore = _this._createBoardUIContext();
|
|
208
|
+
_this._localUser = _this._userControl.getLocalUser();
|
|
209
|
+
_this._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(_this._localUser.userRole);
|
|
210
|
+
window.addEventListener('resize', _this._resetCanvasPosition);
|
|
211
|
+
var activeInfo = whiteboardControl.getBoardActiveInfo();
|
|
212
|
+
_this._isActive = activeInfo.isActive;
|
|
213
|
+
if (_this._isActive) {
|
|
214
|
+
_this._checkBoard();
|
|
215
|
+
_this._ownerUser = _this._userControl.getUser(activeInfo.ownerUserId);
|
|
216
|
+
_this._boardBackground = whiteboardControl.getBoardBackgroundColor();
|
|
217
|
+
}
|
|
218
|
+
return _this;
|
|
219
|
+
}
|
|
220
|
+
(0, _inherits2["default"])(FcrWhiteboardUIModule, _UIModule);
|
|
221
|
+
return (0, _createClass2["default"])(FcrWhiteboardUIModule, [{
|
|
222
|
+
key: "_lonelyWindowState",
|
|
223
|
+
get: function get() {
|
|
224
|
+
return _classPrivateFieldGet(_A, this);
|
|
225
|
+
},
|
|
226
|
+
set: function set(v) {
|
|
227
|
+
_classPrivateFieldSet(_A, this, v);
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
key: "_ownerUser",
|
|
231
|
+
get: function get() {
|
|
232
|
+
return _classPrivateFieldGet(_B, this);
|
|
233
|
+
},
|
|
234
|
+
set: function set(v) {
|
|
235
|
+
_classPrivateFieldSet(_B, this, v);
|
|
236
|
+
}
|
|
237
|
+
}, {
|
|
238
|
+
key: "_isHost",
|
|
239
|
+
get: function get() {
|
|
240
|
+
return _classPrivateFieldGet(_C, this);
|
|
241
|
+
},
|
|
242
|
+
set: function set(v) {
|
|
243
|
+
_classPrivateFieldSet(_C, this, v);
|
|
244
|
+
}
|
|
245
|
+
}, {
|
|
246
|
+
key: "_boardBackground",
|
|
247
|
+
get: function get() {
|
|
248
|
+
return _classPrivateFieldGet(_D, this);
|
|
249
|
+
},
|
|
250
|
+
set: function set(v) {
|
|
251
|
+
_classPrivateFieldSet(_D, this, v);
|
|
252
|
+
}
|
|
253
|
+
}, {
|
|
254
|
+
key: "_localUser",
|
|
255
|
+
get: function get() {
|
|
256
|
+
return _classPrivateFieldGet(_E, this);
|
|
257
|
+
},
|
|
258
|
+
set: function set(v) {
|
|
259
|
+
_classPrivateFieldSet(_E, this, v);
|
|
260
|
+
}
|
|
261
|
+
}, {
|
|
262
|
+
key: "hasPrivilege",
|
|
263
|
+
get: function get() {
|
|
264
|
+
return this._securityStore.hasWriteBoardPermission();
|
|
265
|
+
}
|
|
266
|
+
}, {
|
|
267
|
+
key: "contentAreaSize",
|
|
268
|
+
get: function get() {
|
|
269
|
+
var layoutContentDom = document.querySelector(".".concat(_utils.layoutContentClassName));
|
|
270
|
+
var contentAreaSize = {
|
|
271
|
+
width: 0,
|
|
272
|
+
height: 0,
|
|
273
|
+
top: 0,
|
|
274
|
+
left: 0
|
|
275
|
+
};
|
|
276
|
+
if (layoutContentDom) {
|
|
277
|
+
var _layoutContentDom$get = layoutContentDom.getBoundingClientRect(),
|
|
278
|
+
width = _layoutContentDom$get.width,
|
|
279
|
+
height = _layoutContentDom$get.height,
|
|
280
|
+
left = _layoutContentDom$get.left,
|
|
281
|
+
top = _layoutContentDom$get.top;
|
|
282
|
+
contentAreaSize.width = width;
|
|
283
|
+
contentAreaSize.height = height;
|
|
284
|
+
contentAreaSize.left = left;
|
|
285
|
+
contentAreaSize.top = top;
|
|
286
|
+
}
|
|
287
|
+
return contentAreaSize;
|
|
288
|
+
}
|
|
289
|
+
}, {
|
|
290
|
+
key: "getComponent",
|
|
291
|
+
value: function getComponent(dom) {
|
|
292
|
+
var component = /*#__PURE__*/(0, _jsxRuntime.jsx)(_context3.BoardUIContext.Provider, {
|
|
293
|
+
value: this._boardStore,
|
|
294
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_store.ToolbarContext.Provider, {
|
|
295
|
+
value: this._createToolbarUIContext(),
|
|
296
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_store2.WhiteboardControlBarUIContext.Provider, {
|
|
297
|
+
value: this._controlbarStore,
|
|
298
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_multiWindow.MultiWindowWidgetDialog, {
|
|
299
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_app.Whiteboard, {})
|
|
300
|
+
})
|
|
301
|
+
})
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
if (dom) {
|
|
305
|
+
dom.classList.add(_utils.widgetContainerClassName);
|
|
306
|
+
this._outerDom = dom;
|
|
307
|
+
return _reactDom["default"].render(component, dom);
|
|
308
|
+
}
|
|
309
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
310
|
+
className: _utils.widgetContainerClassName,
|
|
311
|
+
children: component
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}, {
|
|
315
|
+
key: "onEvent",
|
|
316
|
+
value: function onEvent(event, payload) {
|
|
317
|
+
var _this$_whiteboardCont2;
|
|
318
|
+
switch (event) {
|
|
319
|
+
case _constant.UIAction.OPEN_WHITEBOARD:
|
|
320
|
+
if (!this._isActive) {
|
|
321
|
+
var _this$_whiteboardCont;
|
|
322
|
+
(_this$_whiteboardCont = this._whiteboardControl) === null || _this$_whiteboardCont === void 0 || _this$_whiteboardCont.active();
|
|
323
|
+
}
|
|
324
|
+
break;
|
|
325
|
+
case _constant.UIAction.CLOSE_WHITEBOARD:
|
|
326
|
+
(_this$_whiteboardCont2 = this._whiteboardControl) === null || _this$_whiteboardCont2 === void 0 || _this$_whiteboardCont2.inactive();
|
|
327
|
+
break;
|
|
328
|
+
case _constant.UIAction.WHITEBOARD_CHANGED:
|
|
329
|
+
this._setCanvasBound(payload.action);
|
|
330
|
+
if (payload.action === _type.WhiteboardControlbarEvents.LONEYWINDOW) {
|
|
331
|
+
this._lonelyWindowState = payload.payload ? _type.LonelyWindowState.OPEN : _type.LonelyWindowState.CLOSE;
|
|
332
|
+
this.onDestroy();
|
|
333
|
+
break;
|
|
334
|
+
}
|
|
335
|
+
if (payload.action === _type.WhiteboardControlbarEvents.ENABLE_CONTROL) {
|
|
336
|
+
var _this$_boardStore;
|
|
337
|
+
(_this$_boardStore = this._boardStore) === null || _this$_boardStore === void 0 || _this$_boardStore.setWriteEnable(payload.payload);
|
|
338
|
+
if (!payload.payload) this._resetToolIfNeed();
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
break;
|
|
342
|
+
case _constant.UIAction.TOGGLE_LAYOUT:
|
|
343
|
+
if (payload.layout === _type3.FcrUIVideoWindowLayoutType.Gallery) {
|
|
344
|
+
if (this._boardDom) {
|
|
345
|
+
var style = {
|
|
346
|
+
width: '100%',
|
|
347
|
+
height: '100%',
|
|
348
|
+
left: 0,
|
|
349
|
+
top: 0
|
|
350
|
+
};
|
|
351
|
+
Object.assign(this._boardDom.style, style);
|
|
352
|
+
}
|
|
353
|
+
} else {
|
|
354
|
+
this._resetCanvasPosition();
|
|
355
|
+
}
|
|
356
|
+
break;
|
|
357
|
+
case _constant.UIAction.CAROUSEL_COLLAPSED:
|
|
358
|
+
this._resetCanvasPosition();
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}, {
|
|
363
|
+
key: "onProcessEvent",
|
|
364
|
+
value: function onProcessEvent(event) {
|
|
365
|
+
var action = event.action,
|
|
366
|
+
payload = event.payload;
|
|
367
|
+
if (Object.values(_type.ToolbarEvents).includes(action)) {
|
|
368
|
+
this._caseToolbarEvents(action, payload);
|
|
369
|
+
}
|
|
370
|
+
if (Object.values(_type.WhiteboardRoomEvents).includes(action)) {
|
|
371
|
+
this._boardObservble()[action](payload);
|
|
372
|
+
}
|
|
373
|
+
if (Object.values(_type.WhiteboardUIEvents).includes(action)) {
|
|
374
|
+
this._boardUIEvents(payload)[action](payload);
|
|
375
|
+
}
|
|
376
|
+
if (action === _constant.RendererEventAction.GET_LOCAL_USER) {
|
|
377
|
+
(0, _rendererEvent.sendEvent)({
|
|
378
|
+
action: _constant.RendererEventAction.SET_LOCAL_USER,
|
|
379
|
+
payload: this._localUser
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
if (action === _constant.RendererEventAction.GET_OWNER_USER) {
|
|
383
|
+
(0, _rendererEvent.sendEvent)({
|
|
384
|
+
action: _constant.RendererEventAction.SET_OWNER_USER,
|
|
385
|
+
payload: this._ownerUser
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
}, {
|
|
390
|
+
key: "onPropertiesUpdate",
|
|
391
|
+
value: function onPropertiesUpdate(params) {
|
|
392
|
+
// this._checkPrivilege(props);
|
|
393
|
+
this._checkBoard();
|
|
394
|
+
}
|
|
395
|
+
}, {
|
|
396
|
+
key: "onDestroy",
|
|
397
|
+
value: function onDestroy(params) {
|
|
398
|
+
var _this$_ownerUser2;
|
|
399
|
+
var _ref3 = params || {},
|
|
400
|
+
operatorUser = _ref3.operatorUser;
|
|
401
|
+
if (this._securityStore.hasStartScreenSharePermission() && (operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userId) !== this._localUser.userId) {
|
|
402
|
+
this._uiEventStore.showToast({
|
|
403
|
+
message: this._isMyBoard ? (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard') : (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stopped'),
|
|
404
|
+
type: 'info'
|
|
405
|
+
});
|
|
406
|
+
} else if (operatorUser && [(_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST)].includes(operatorUser === null || operatorUser === void 0 ? void 0 : operatorUser.userRole) && operatorUser.userId !== ((_this$_ownerUser2 = this._ownerUser) === null || _this$_ownerUser2 === void 0 ? void 0 : _this$_ownerUser2.userId)) {
|
|
407
|
+
return;
|
|
408
|
+
}
|
|
409
|
+
if (!this._joined) return;
|
|
410
|
+
this._isActive = false;
|
|
411
|
+
// this._close();
|
|
412
|
+
this.unmount();
|
|
413
|
+
this.unload();
|
|
414
|
+
this._disposers.forEach(function (d) {
|
|
415
|
+
return d();
|
|
416
|
+
});
|
|
417
|
+
this._disposers = [];
|
|
418
|
+
window.removeEventListener('resize', this._resetCanvasPosition);
|
|
419
|
+
}
|
|
420
|
+
}, {
|
|
421
|
+
key: "mount",
|
|
422
|
+
value: function mount() {
|
|
423
|
+
var _this2 = this;
|
|
424
|
+
var _boardMainWindow = this._boardMainWindow,
|
|
425
|
+
_boardDom = this._boardDom;
|
|
426
|
+
if (_boardDom && _boardMainWindow && !this._mounted) {
|
|
427
|
+
var _this$_collectorDom;
|
|
428
|
+
this._mounted = true;
|
|
429
|
+
var aspectRatio = this._initHeight / this._initWidth;
|
|
430
|
+
// const aspectRatio = _boardDom.clientHeight / _boardDom.clientWidth;
|
|
431
|
+
_boardMainWindow.mount(_boardDom, {
|
|
432
|
+
containerSizeRatio: aspectRatio,
|
|
433
|
+
collectorContainer: (_this$_collectorDom = this._collectorDom) !== null && _this$_collectorDom !== void 0 ? _this$_collectorDom : undefined
|
|
434
|
+
}).then(function () {
|
|
435
|
+
_this2._addDisposers();
|
|
436
|
+
})["catch"](function () {
|
|
437
|
+
_this2._mounted = false;
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}, {
|
|
442
|
+
key: "unmount",
|
|
443
|
+
value: function unmount() {
|
|
444
|
+
if (this._mounted && this._boardMainWindow) {
|
|
445
|
+
this._boardMainWindow.destroy();
|
|
446
|
+
this._boardMainWindow = undefined;
|
|
447
|
+
}
|
|
448
|
+
this._mounted = false;
|
|
449
|
+
if (this._timer) clearTimeout(this._timer);
|
|
450
|
+
}
|
|
451
|
+
}, {
|
|
452
|
+
key: "unload",
|
|
453
|
+
value: function unload() {
|
|
454
|
+
if (this._outerDom) {
|
|
455
|
+
_reactDom["default"].unmountComponentAtNode(this._outerDom);
|
|
456
|
+
this._outerDom = undefined;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}, {
|
|
460
|
+
key: "_setBackground",
|
|
461
|
+
value: function _setBackground() {
|
|
462
|
+
var bgColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#fff';
|
|
463
|
+
if (this._boardMainWindow) {
|
|
464
|
+
var _this$_boardMainWindo;
|
|
465
|
+
var themes = _libs["default"];
|
|
466
|
+
var _ref4 = themes.find(function (theme) {
|
|
467
|
+
return theme.background === bgColor;
|
|
468
|
+
}) || {
|
|
469
|
+
colors: []
|
|
470
|
+
},
|
|
471
|
+
colors = _ref4.colors;
|
|
472
|
+
(_this$_boardMainWindo = this._boardMainWindow) === null || _this$_boardMainWindo === void 0 || _this$_boardMainWindo.setBackgroundColor(bgColor);
|
|
473
|
+
this._toolbarStore.observables.colors = colors;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}, {
|
|
477
|
+
key: "_resetToolIfNeed",
|
|
478
|
+
value: function _resetToolIfNeed() {
|
|
479
|
+
var _this$_boardMainWindo2;
|
|
480
|
+
if ((_this$_boardMainWindo2 = this._boardMainWindow) !== null && _this$_boardMainWindo2 !== void 0 && _this$_boardMainWindo2.mounted) {
|
|
481
|
+
var _this$_toolbarContext, _this$_toolbarContext2, _this$_toolbarContext3;
|
|
482
|
+
var _this$_defaultBoardSt = this._defaultBoardState,
|
|
483
|
+
strokeColor = _this$_defaultBoardSt.strokeColor,
|
|
484
|
+
strokeWidth = _this$_defaultBoardSt.strokeWidth,
|
|
485
|
+
tool = _this$_defaultBoardSt.tool;
|
|
486
|
+
(_this$_toolbarContext = this._toolbarContext) === null || _this$_toolbarContext === void 0 || _this$_toolbarContext.setStrokeColor(strokeColor);
|
|
487
|
+
(_this$_toolbarContext2 = this._toolbarContext) === null || _this$_toolbarContext2 === void 0 || _this$_toolbarContext2.setStrokeWidth(strokeWidth);
|
|
488
|
+
(_this$_toolbarContext3 = this._toolbarContext) === null || _this$_toolbarContext3 === void 0 || _this$_toolbarContext3.setTool(tool);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
key: "_checkBoard",
|
|
493
|
+
value: function _checkBoard() {
|
|
494
|
+
if (!this._initialized) {
|
|
495
|
+
this._open();
|
|
496
|
+
this._initialized = true;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, {
|
|
500
|
+
key: "_boardUIEvents",
|
|
501
|
+
value: function _boardUIEvents(observables) {
|
|
502
|
+
var _this3 = this;
|
|
503
|
+
return {
|
|
504
|
+
handleBoardDomLoad: function handleBoardDomLoad(ref) {
|
|
505
|
+
_this3._boardDom = ref;
|
|
506
|
+
if (_this3._boardDom) {
|
|
507
|
+
_this3.mount();
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
handleCollectorDomLoad: function handleCollectorDomLoad(ref) {
|
|
511
|
+
_this3._collectorDom = ref;
|
|
512
|
+
},
|
|
513
|
+
handleClose: function handleClose() {
|
|
514
|
+
_this3._close();
|
|
515
|
+
_this3._isActive = false;
|
|
516
|
+
_this3.unmount();
|
|
517
|
+
},
|
|
518
|
+
handleOpen: function handleOpen() {
|
|
519
|
+
_this3._open();
|
|
520
|
+
},
|
|
521
|
+
setPrivilege: function setPrivilege(canOperate) {
|
|
522
|
+
observables.canOperate = canOperate;
|
|
523
|
+
},
|
|
524
|
+
setWriteEnable: function setWriteEnable(enable) {
|
|
525
|
+
observables.writeEnabled = enable;
|
|
526
|
+
observables.canOperate = enable;
|
|
527
|
+
_this3._repositionToolbar();
|
|
528
|
+
}
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
}, {
|
|
532
|
+
key: "_caseToolbarEvents",
|
|
533
|
+
value: function _caseToolbarEvents(action, payload) {
|
|
534
|
+
var observables = this._toolbarStore.observables;
|
|
535
|
+
this._createToolbarUIContext()[action](payload);
|
|
536
|
+
(0, _rendererEvent.sendEvent)({
|
|
537
|
+
action: _constant.RendererEventAction.UPDATE_TOOLBAR,
|
|
538
|
+
payload: observables
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
}, {
|
|
542
|
+
key: "_setCanvasBound",
|
|
543
|
+
value: function _setCanvasBound(oprate) {
|
|
544
|
+
if (!Object.values(_type.WhiteboardControlbarEvents).includes(oprate) || oprate === _type.WhiteboardControlbarEvents.ENABLE_CONTROL) return;
|
|
545
|
+
if (this._boardDom && this._boardMainWindow) {
|
|
546
|
+
var contianHeight = this._boardDom.parentElement.clientHeight;
|
|
547
|
+
var ratio = contianHeight / this._initHeight;
|
|
548
|
+
var origin = this._initHeight / contianHeight;
|
|
549
|
+
var thatStyle = this._boardDom.style;
|
|
550
|
+
thatStyle.transition = 'transform ease .5s';
|
|
551
|
+
var scaleValue = this._controlbarStore.scaleValue;
|
|
552
|
+
if (_utils.ZOOM_IN_CANVAS) {
|
|
553
|
+
this._boardMainWindow.setViewMode(_enums.ViewMode.Freedom);
|
|
554
|
+
}
|
|
555
|
+
this._resetScaleState();
|
|
556
|
+
if (oprate === _type.WhiteboardControlbarEvents.ZOOMIN) {
|
|
557
|
+
if (scaleValue < this._initHeight / contianHeight) {
|
|
558
|
+
var calcValue = scaleValue + ratio;
|
|
559
|
+
this._controlbarStore.isMaxmum = false;
|
|
560
|
+
this._controlbarStore.scaleValue = calcValue > origin ? origin : calcValue;
|
|
561
|
+
} else {
|
|
562
|
+
this._controlbarStore.isMaxmum = true;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
if (oprate === _type.WhiteboardControlbarEvents.ZOOMOUT) {
|
|
566
|
+
if (scaleValue > 1) {
|
|
567
|
+
var _calcValue = scaleValue - ratio;
|
|
568
|
+
this._controlbarStore.isMinimum = false;
|
|
569
|
+
this._controlbarStore.scaleValue = _calcValue > 1 ? _calcValue : 1;
|
|
570
|
+
} else {
|
|
571
|
+
this._controlbarStore.isMinimum = true;
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
if (oprate === _type.WhiteboardControlbarEvents.ORIGIN) {
|
|
575
|
+
this._controlbarStore.isOriginal = true;
|
|
576
|
+
this._controlbarStore.scaleValue = origin;
|
|
577
|
+
}
|
|
578
|
+
if (oprate === _type.WhiteboardControlbarEvents.ADAPTIVE) {
|
|
579
|
+
this._controlbarStore.isAdaptived = true;
|
|
580
|
+
this._controlbarStore.scaleValue = 1;
|
|
581
|
+
}
|
|
582
|
+
var value = this._controlbarStore.scaleValue;
|
|
583
|
+
if (!_utils.ZOOM_IN_CANVAS) {
|
|
584
|
+
thatStyle.transform = "scale(".concat(value, ")");
|
|
585
|
+
} else {
|
|
586
|
+
this._boardMainWindow.zoom(value);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}, {
|
|
591
|
+
key: "_resetCanvasPosition",
|
|
592
|
+
value: function _resetCanvasPosition() {
|
|
593
|
+
var _this4 = this;
|
|
594
|
+
if (this._timer) clearTimeout(this._timer);
|
|
595
|
+
this._timer = setTimeout(function () {
|
|
596
|
+
if (!_this4._boardDom) return;
|
|
597
|
+
_this4._repositionToolbar();
|
|
598
|
+
var thatStyle = _this4._boardDom.style;
|
|
599
|
+
_this4._controlbarStore.scaleValue = 1;
|
|
600
|
+
thatStyle.transform = "scale(1)";
|
|
601
|
+
}, 300);
|
|
602
|
+
}
|
|
603
|
+
}, {
|
|
604
|
+
key: "_resetScaleState",
|
|
605
|
+
value: function _resetScaleState() {
|
|
606
|
+
this._controlbarStore.isAdaptived = false;
|
|
607
|
+
this._controlbarStore.isMaxmum = false;
|
|
608
|
+
this._controlbarStore.isMinimum = false;
|
|
609
|
+
this._controlbarStore.isOriginal = false;
|
|
610
|
+
}
|
|
611
|
+
}, {
|
|
612
|
+
key: "_createBoardUIContext",
|
|
613
|
+
value: function _createBoardUIContext() {
|
|
614
|
+
var observables = (0, _mobx.observable)({
|
|
615
|
+
canOperate: this._isHost,
|
|
616
|
+
minimized: false,
|
|
617
|
+
contentAreaSize: this.contentAreaSize,
|
|
618
|
+
connectionState: this._connectionState,
|
|
619
|
+
joinSuccessed: this._joinSuccessed,
|
|
620
|
+
progress: 0,
|
|
621
|
+
writeEnabled: this._isHost
|
|
622
|
+
});
|
|
623
|
+
return _objectSpread({
|
|
624
|
+
observables: observables
|
|
625
|
+
}, this._boardUIEvents(observables));
|
|
626
|
+
}
|
|
627
|
+
}, {
|
|
628
|
+
key: "_createToolbarUIContext",
|
|
629
|
+
value: function _createToolbarUIContext() {
|
|
630
|
+
var _this5 = this;
|
|
631
|
+
var observables = this._toolbarStore.observables;
|
|
632
|
+
this._toolbarContext = {
|
|
633
|
+
observables: observables,
|
|
634
|
+
redo: function redo() {
|
|
635
|
+
var _this5$_boardMainWind;
|
|
636
|
+
return (_this5$_boardMainWind = _this5._boardMainWindow) === null || _this5$_boardMainWind === void 0 ? void 0 : _this5$_boardMainWind.redo();
|
|
637
|
+
},
|
|
638
|
+
undo: function undo() {
|
|
639
|
+
var _this5$_boardMainWind2;
|
|
640
|
+
return (_this5$_boardMainWind2 = _this5._boardMainWindow) === null || _this5$_boardMainWind2 === void 0 ? void 0 : _this5$_boardMainWind2.undo();
|
|
641
|
+
},
|
|
642
|
+
clean: function clean() {
|
|
643
|
+
var _this5$_boardMainWind3;
|
|
644
|
+
return (_this5$_boardMainWind3 = _this5._boardMainWindow) === null || _this5$_boardMainWind3 === void 0 ? void 0 : _this5$_boardMainWind3.clean();
|
|
645
|
+
},
|
|
646
|
+
saveDraft: function saveDraft() {
|
|
647
|
+
return _this5._getSnapshotImage();
|
|
648
|
+
},
|
|
649
|
+
clickExpansionTool: function clickExpansionTool() {},
|
|
650
|
+
setToolbarPosition: function setToolbarPosition(pos) {
|
|
651
|
+
return observables.toolbarPosition = pos;
|
|
652
|
+
},
|
|
653
|
+
dragToolbar: function dragToolbar() {
|
|
654
|
+
return observables.toolbarReleased = false;
|
|
655
|
+
},
|
|
656
|
+
setTool: function setTool(tool) {
|
|
657
|
+
var _this5$_boardMainWind4;
|
|
658
|
+
observables.currentTool = tool;
|
|
659
|
+
observables.currentShape = undefined;
|
|
660
|
+
(_this5$_boardMainWind4 = _this5._boardMainWindow) === null || _this5$_boardMainWind4 === void 0 || _this5$_boardMainWind4.selectTool(tool);
|
|
661
|
+
},
|
|
662
|
+
setPen: function setPen(shape) {
|
|
663
|
+
var _this5$_boardMainWind5;
|
|
664
|
+
observables.currentShape = shape;
|
|
665
|
+
observables.lastPen = shape;
|
|
666
|
+
observables.currentTool = undefined;
|
|
667
|
+
(_this5$_boardMainWind5 = _this5._boardMainWindow) === null || _this5$_boardMainWind5 === void 0 || _this5$_boardMainWind5.drawShape(shape, observables.currentStrokeWidth, (0, _tinycolor["default"])(observables.currentColor).toRgb());
|
|
668
|
+
},
|
|
669
|
+
setShape: function setShape(shape) {
|
|
670
|
+
var _this5$_boardMainWind6;
|
|
671
|
+
observables.currentShape = shape;
|
|
672
|
+
observables.lastShape = shape;
|
|
673
|
+
observables.currentTool = undefined;
|
|
674
|
+
(_this5$_boardMainWind6 = _this5._boardMainWindow) === null || _this5$_boardMainWind6 === void 0 || _this5$_boardMainWind6.drawShape(shape, observables.currentStrokeWidth, (0, _tinycolor["default"])(observables.currentColor).toRgb());
|
|
675
|
+
},
|
|
676
|
+
setStrokeColor: function setStrokeColor(color) {
|
|
677
|
+
var _this5$_boardMainWind7;
|
|
678
|
+
observables.currentColor = color;
|
|
679
|
+
(_this5$_boardMainWind7 = _this5._boardMainWindow) === null || _this5$_boardMainWind7 === void 0 || _this5$_boardMainWind7.changeStrokeColor((0, _tinycolor["default"])(color).toRgb());
|
|
680
|
+
},
|
|
681
|
+
setStrokeWidth: function setStrokeWidth(strokeWidth) {
|
|
682
|
+
var _this5$_boardMainWind8;
|
|
683
|
+
observables.currentStrokeWidth = strokeWidth;
|
|
684
|
+
(_this5$_boardMainWind8 = _this5._boardMainWindow) === null || _this5$_boardMainWind8 === void 0 || _this5$_boardMainWind8.changeStrokeWidth(strokeWidth);
|
|
685
|
+
},
|
|
686
|
+
releaseToolbar: function releaseToolbar() {
|
|
687
|
+
observables.toolbarReleased = true;
|
|
688
|
+
_this5._updateDockPlacement();
|
|
689
|
+
_this5._repositionToolbar();
|
|
690
|
+
},
|
|
691
|
+
captureScreen: function captureScreen() {
|
|
692
|
+
var hideWindow = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
693
|
+
window.runtime.captureScreen({
|
|
694
|
+
hideWindow: hideWindow
|
|
695
|
+
});
|
|
696
|
+
},
|
|
697
|
+
setTheme: (0, _mobx.action)(function (theme) {
|
|
698
|
+
_this5._setBackgroundColor(theme.background);
|
|
699
|
+
observables.colors = theme.colors;
|
|
700
|
+
}),
|
|
701
|
+
setCommonColor: (0, _mobx.action)(function (color) {
|
|
702
|
+
if (observables.commonColors.length < 2) observables.commonColors.push(color);
|
|
703
|
+
if (observables.commonColors.length === 2) {
|
|
704
|
+
observables.commonColors = [color, observables.commonColors[0]];
|
|
705
|
+
}
|
|
706
|
+
})
|
|
707
|
+
};
|
|
708
|
+
return this._toolbarContext;
|
|
709
|
+
}
|
|
710
|
+
}, {
|
|
711
|
+
key: "_updateDockPosition",
|
|
712
|
+
value: function _updateDockPosition() {
|
|
713
|
+
if (this._toolbarContext) {
|
|
714
|
+
var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
|
|
715
|
+
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
716
|
+
if (containerDom && toolbarDom) {
|
|
717
|
+
var containerClientRect = containerDom.getBoundingClientRect();
|
|
718
|
+
var toolbarClientRect = toolbarDom.getBoundingClientRect();
|
|
719
|
+
/* scene page bar 42 px height */
|
|
720
|
+
var toolbarOffsetTop = 42; //(containerClientRect.height - toolbarDom.clientHeight - 42) / 2;
|
|
721
|
+
var toolbarContext = this._toolbarContext;
|
|
722
|
+
(0, _mobx.runInAction)(function () {
|
|
723
|
+
if (toolbarContext.observables.toolbarDockPosition.placement === 'right') {
|
|
724
|
+
// right
|
|
725
|
+
toolbarContext.observables.toolbarDockPosition = {
|
|
726
|
+
x: containerClientRect.width - toolbarClientRect.width,
|
|
727
|
+
y: toolbarOffsetTop + _utils.sceneNavHeight / 2,
|
|
728
|
+
placement: 'right'
|
|
729
|
+
};
|
|
730
|
+
} else {
|
|
731
|
+
// left
|
|
732
|
+
toolbarContext.observables.toolbarDockPosition = {
|
|
733
|
+
x: 0,
|
|
734
|
+
y: toolbarOffsetTop,
|
|
735
|
+
placement: 'left'
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}, {
|
|
743
|
+
key: "_updateDockPlacement",
|
|
744
|
+
value: function _updateDockPlacement() {
|
|
745
|
+
if (this._toolbarContext) {
|
|
746
|
+
var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
|
|
747
|
+
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
748
|
+
if (containerDom && toolbarDom) {
|
|
749
|
+
var containerClientRect = containerDom.getBoundingClientRect();
|
|
750
|
+
var toolbarClientRect = toolbarDom.getBoundingClientRect();
|
|
751
|
+
var toolbarCenterPos = toolbarClientRect.left - containerClientRect.left + toolbarClientRect.width / 2;
|
|
752
|
+
var toolbarContext = this._toolbarContext;
|
|
753
|
+
(0, _mobx.runInAction)(function () {
|
|
754
|
+
if (toolbarCenterPos > containerClientRect.width / 2) {
|
|
755
|
+
// right
|
|
756
|
+
toolbarContext.observables.toolbarDockPosition.placement = 'right';
|
|
757
|
+
} else {
|
|
758
|
+
// left
|
|
759
|
+
toolbarContext.observables.toolbarDockPosition.placement = 'left';
|
|
760
|
+
}
|
|
761
|
+
});
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}, {
|
|
766
|
+
key: "_repositionToolbar",
|
|
767
|
+
value: function _repositionToolbar() {
|
|
768
|
+
if (this._toolbarContext) {
|
|
769
|
+
var toolbarDom = document.querySelector(".".concat(_utils.toolbarClassName));
|
|
770
|
+
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
771
|
+
if (containerDom && toolbarDom) {
|
|
772
|
+
setTimeout(this._updateMaxVisibleTools);
|
|
773
|
+
// wait until the UI rerenders, then actual dimensions can be obtained
|
|
774
|
+
setTimeout(this._updateDockPosition);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}, {
|
|
779
|
+
key: "_updateMaxVisibleTools",
|
|
780
|
+
value: function _updateMaxVisibleTools() {
|
|
781
|
+
var containerDom = document.querySelector(".".concat(_utils.windowClassName));
|
|
782
|
+
if (this._toolbarContext && containerDom) {
|
|
783
|
+
var containerClientRect = containerDom.getBoundingClientRect();
|
|
784
|
+
var placement = this._toolbarContext.observables.toolbarDockPosition.placement;
|
|
785
|
+
var toolbarContext = this._toolbarContext;
|
|
786
|
+
(0, _mobx.runInAction)(function () {
|
|
787
|
+
if (placement === 'right') {
|
|
788
|
+
var availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain + _utils.sceneNavHeight;
|
|
789
|
+
toolbarContext.observables.maxCountVisibleTools = Math.floor(availableHeight / _utils.heightPerTool);
|
|
790
|
+
if (toolbarContext.observables.maxCountVisibleTools >= 9) {
|
|
791
|
+
var visibleTools = toolbarContext.observables.maxCountVisibleTools;
|
|
792
|
+
toolbarContext.observables.maxCountVisibleTools += Math.floor((availableHeight - visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
|
|
793
|
+
}
|
|
794
|
+
} else {
|
|
795
|
+
var _availableHeight = containerClientRect.height - _utils.verticalPadding - _utils.defaultToolsRetain - _utils.sceneNavHeight;
|
|
796
|
+
toolbarContext.observables.maxCountVisibleTools = Math.floor(_availableHeight / _utils.heightPerTool);
|
|
797
|
+
if (toolbarContext.observables.maxCountVisibleTools >= 9) {
|
|
798
|
+
var _visibleTools = toolbarContext.observables.maxCountVisibleTools;
|
|
799
|
+
toolbarContext.observables.maxCountVisibleTools += Math.floor((_availableHeight - _visibleTools * _utils.heightPerTool) / _utils.heightPerColor);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
});
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}, {
|
|
806
|
+
key: "_setBackgroundColor",
|
|
807
|
+
value: function _setBackgroundColor(bgColor) {
|
|
808
|
+
var _this$_whiteboardCont3;
|
|
809
|
+
var color = bgColor || 'white';
|
|
810
|
+
(_this$_whiteboardCont3 = this._whiteboardControl) === null || _this$_whiteboardCont3 === void 0 || _this$_whiteboardCont3.setBoardBackground(color);
|
|
811
|
+
}
|
|
812
|
+
}, {
|
|
813
|
+
key: "_updateRedo",
|
|
814
|
+
value: function _updateRedo(steps) {
|
|
815
|
+
if (this._toolbarContext) {
|
|
816
|
+
this._toolbarContext.observables.redoSteps = steps;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}, {
|
|
820
|
+
key: "_updateUndo",
|
|
821
|
+
value: function _updateUndo(steps) {
|
|
822
|
+
if (this._toolbarContext) {
|
|
823
|
+
this._toolbarContext.observables.undoSteps = steps;
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
}, {
|
|
827
|
+
key: "_setConnectionState",
|
|
828
|
+
value: function _setConnectionState(state) {
|
|
829
|
+
this._connectionState = state;
|
|
830
|
+
if (this._boardStore) {
|
|
831
|
+
this._boardStore.observables.connectionState = state;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}, {
|
|
835
|
+
key: "_open",
|
|
836
|
+
value: function _open() {
|
|
837
|
+
var _this$_whiteboardCont4;
|
|
838
|
+
this._joined = true;
|
|
839
|
+
(_this$_whiteboardCont4 = this._whiteboardControl) === null || _this$_whiteboardCont4 === void 0 || _this$_whiteboardCont4.open();
|
|
840
|
+
}
|
|
841
|
+
}, {
|
|
842
|
+
key: "_close",
|
|
843
|
+
value: function _close() {
|
|
844
|
+
this._joined = false;
|
|
845
|
+
this._setJoinSuccessed(false);
|
|
846
|
+
if (this._whiteboardControl) {
|
|
847
|
+
this._whiteboardControl.close();
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}, {
|
|
851
|
+
key: "_getSnapshotImage",
|
|
852
|
+
value: function _getSnapshotImage(background) {
|
|
853
|
+
var _this6 = this;
|
|
854
|
+
var mainWindow = this._boardMainWindow;
|
|
855
|
+
if (mainWindow) {
|
|
856
|
+
mainWindow.getSnapshotImage(background, function (progress) {
|
|
857
|
+
if (_this6._boardStore) {
|
|
858
|
+
_this6._boardStore.observables.progress = progress;
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
}, {
|
|
864
|
+
key: "_openLonelyWindow",
|
|
865
|
+
value: function _openLonelyWindow() {
|
|
866
|
+
this._uiEventStore.openDialog(_constant.DialogKey.WHITEBOARD);
|
|
867
|
+
this._uiEventStore.openDialog(_constant.DialogKey.TOOLBAR);
|
|
868
|
+
this._toolbarStore.observables.layoutReady = false;
|
|
869
|
+
this._open();
|
|
870
|
+
}
|
|
871
|
+
}, {
|
|
872
|
+
key: "_setJoinSuccessed",
|
|
873
|
+
value: function _setJoinSuccessed(joinSuccessed) {
|
|
874
|
+
if (this._boardStore) {
|
|
875
|
+
this._boardStore.observables.joinSuccessed = joinSuccessed;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}, {
|
|
879
|
+
key: "_boardObservble",
|
|
880
|
+
value: function _boardObservble() {
|
|
881
|
+
var _this7 = this;
|
|
882
|
+
return {
|
|
883
|
+
onJoinSuccess: function () {
|
|
884
|
+
var _onJoinSuccess = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(mainWindow) {
|
|
885
|
+
var _this7$_whiteboardCon2, _this7$_whiteboardCon, ownerUserId, ownerUser;
|
|
886
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
887
|
+
while (1) switch (_context.prev = _context.next) {
|
|
888
|
+
case 0:
|
|
889
|
+
_this7.logger.info('Fcr board join success');
|
|
890
|
+
if (_this7._whiteboardControl) {
|
|
891
|
+
_this7$_whiteboardCon = (_this7$_whiteboardCon2 = _this7._whiteboardControl) === null || _this7$_whiteboardCon2 === void 0 ? void 0 : _this7$_whiteboardCon2.getBoardActiveInfo(), ownerUserId = _this7$_whiteboardCon.ownerUserId;
|
|
892
|
+
ownerUser = _this7._userControl.getUser(ownerUserId);
|
|
893
|
+
_this7._controlbarStore.ownerUser = ownerUser;
|
|
894
|
+
}
|
|
895
|
+
_context.next = 4;
|
|
896
|
+
return mainWindow.updateOperationPrivilege(true);
|
|
897
|
+
case 4:
|
|
898
|
+
mainWindow.addObserver(_this7._MainWindowEvents(mainWindow));
|
|
899
|
+
_this7._boardMainWindow = mainWindow;
|
|
900
|
+
_this7.mount();
|
|
901
|
+
case 7:
|
|
902
|
+
case "end":
|
|
903
|
+
return _context.stop();
|
|
904
|
+
}
|
|
905
|
+
}, _callee);
|
|
906
|
+
}));
|
|
907
|
+
function onJoinSuccess(_x) {
|
|
908
|
+
return _onJoinSuccess.apply(this, arguments);
|
|
909
|
+
}
|
|
910
|
+
return onJoinSuccess;
|
|
911
|
+
}(),
|
|
912
|
+
onJoinFailure: function onJoinFailure(e) {
|
|
913
|
+
_this7.logger.error('Fcr board join failure', e);
|
|
914
|
+
_this7._uiEventStore.showToast({
|
|
915
|
+
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_cannotjoin'),
|
|
916
|
+
type: 'warn'
|
|
917
|
+
});
|
|
918
|
+
},
|
|
919
|
+
onConnectionStateUpdated: function onConnectionStateUpdated(state) {
|
|
920
|
+
_this7.logger.info('Fcr board connection state changed to', state);
|
|
921
|
+
_this7._setConnectionState(state);
|
|
922
|
+
if (state === _enums.FcrBoardRoomConnectionState.DISCONNECTED) {
|
|
923
|
+
if (_this7._joined) {
|
|
924
|
+
var _this7$_whiteboardCon3;
|
|
925
|
+
(_this7$_whiteboardCon3 = _this7._whiteboardControl) === null || _this7$_whiteboardCon3 === void 0 || _this7$_whiteboardCon3.open();
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
if (state === _enums.FcrBoardRoomConnectionState.CONNECTED) {
|
|
929
|
+
_this7._setJoinSuccessed(true);
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
onMemberStateChanged: function onMemberStateChanged(state) {
|
|
933
|
+
_this7.logger.info('Fcr board member state changed to', state);
|
|
934
|
+
},
|
|
935
|
+
onPermissionDeny: function onPermissionDeny() {}
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
}, {
|
|
939
|
+
key: "_MainWindowEvents",
|
|
940
|
+
value: function _MainWindowEvents(mainWindow) {
|
|
941
|
+
var _this8 = this;
|
|
942
|
+
return {
|
|
943
|
+
onRedoStepsUpdated: this._updateRedo,
|
|
944
|
+
onUndoStepsUpdated: this._updateUndo,
|
|
945
|
+
onMountSuccess: function () {
|
|
946
|
+
var _onMountSuccess = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
947
|
+
var _this8$_whiteboardCon, _this8$_ownerUser, _this8$_localUser, _this8$_boardStore, _this8$_boardStore2, activeInfo;
|
|
948
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
949
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
950
|
+
case 0:
|
|
951
|
+
_context2.next = 2;
|
|
952
|
+
return mainWindow.updateOperationPrivilege(true);
|
|
953
|
+
case 2:
|
|
954
|
+
_this8._resetToolIfNeed();
|
|
955
|
+
_this8._repositionToolbar();
|
|
956
|
+
if (_this8._boardMainWindow) {
|
|
957
|
+
_this8._setBackground(_this8._boardBackground);
|
|
958
|
+
_this8._toolbarStore.observables.layoutReady = [_type.LonelyWindowState.CLOSE, _type.LonelyWindowState.DEFAULT].includes(_this8._lonelyWindowState);
|
|
959
|
+
activeInfo = (_this8$_whiteboardCon = _this8._whiteboardControl) === null || _this8$_whiteboardCon === void 0 ? void 0 : _this8$_whiteboardCon.getBoardActiveInfo();
|
|
960
|
+
_this8._ownerUser = _this8._userControl.getUser(activeInfo === null || activeInfo === void 0 ? void 0 : activeInfo.ownerUserId);
|
|
961
|
+
_this8._isMyBoard = ((_this8$_ownerUser = _this8._ownerUser) === null || _this8$_ownerUser === void 0 ? void 0 : _this8$_ownerUser.userId) === ((_this8$_localUser = _this8._localUser) === null || _this8$_localUser === void 0 ? void 0 : _this8$_localUser.userId);
|
|
962
|
+
(_this8$_boardStore = _this8._boardStore) === null || _this8$_boardStore === void 0 || _this8$_boardStore.setPrivilege(_this8._isMyBoard || _this8._isHost);
|
|
963
|
+
(_this8$_boardStore2 = _this8._boardStore) === null || _this8$_boardStore2 === void 0 || _this8$_boardStore2.setWriteEnable(_this8._isMyBoard || _this8._isHost);
|
|
964
|
+
_this8._uiEventStore.sendEvent(_constant.UIAction.WHITEBOARD_CHANGED, {
|
|
965
|
+
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
966
|
+
payload: activeInfo.ownerUserId
|
|
967
|
+
});
|
|
968
|
+
(0, _rendererEvent.sendEvent)({
|
|
969
|
+
action: _constant.RendererEventAction.SET_OWNER_USER,
|
|
970
|
+
payload: _this8._userControl.getUser(activeInfo.ownerUserId)
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
case 5:
|
|
974
|
+
case "end":
|
|
975
|
+
return _context2.stop();
|
|
976
|
+
}
|
|
977
|
+
}, _callee2);
|
|
978
|
+
}));
|
|
979
|
+
function onMountSuccess() {
|
|
980
|
+
return _onMountSuccess.apply(this, arguments);
|
|
981
|
+
}
|
|
982
|
+
return onMountSuccess;
|
|
983
|
+
}(),
|
|
984
|
+
onUnmount: function onUnmount() {
|
|
985
|
+
if (_this8._lonelyWindowState === _type.LonelyWindowState.OPEN) {
|
|
986
|
+
_this8._openLonelyWindow();
|
|
987
|
+
}
|
|
988
|
+
if (_this8._lonelyWindowState === _type.LonelyWindowState.CLOSE) {
|
|
989
|
+
_this8._open();
|
|
990
|
+
}
|
|
991
|
+
_this8._uiEventStore.sendEvent(_constant.UIAction.WHITEBOARD_CHANGED, {
|
|
992
|
+
action: _type.WhiteboardBaseEvents.SET_OWNER_USER_ID,
|
|
993
|
+
payload: null
|
|
994
|
+
});
|
|
995
|
+
(0, _rendererEvent.sendEvent)({
|
|
996
|
+
action: _constant.RendererEventAction.SET_OWNER_USER,
|
|
997
|
+
payload: null
|
|
998
|
+
});
|
|
999
|
+
_this8._ownerUser = null;
|
|
1000
|
+
_this8._initialized = false;
|
|
1001
|
+
},
|
|
1002
|
+
onSnapshotSuccess: function onSnapshotSuccess(canvas) {
|
|
1003
|
+
var _this8$_roomControl$g;
|
|
1004
|
+
var fileName = "".concat((_this8$_roomControl$g = _this8._roomControl.getRoomInfo()) === null || _this8$_roomControl$g === void 0 ? void 0 : _this8$_roomControl$g.roomName, "_").concat((0, _dayjs["default"])().format('YYYYMMDD_HHmmSSS'), ".jpg");
|
|
1005
|
+
(0, _utils.downloadCanvasImage)(canvas, fileName);
|
|
1006
|
+
_this8._uiEventStore.showToast({
|
|
1007
|
+
type: 'info',
|
|
1008
|
+
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_savedsuccessfully')
|
|
1009
|
+
});
|
|
1010
|
+
},
|
|
1011
|
+
onFailure: function onFailure(reason) {
|
|
1012
|
+
_this8.logger.error('operation failure, reason: ', reason);
|
|
1013
|
+
if (reason === _type.FcrBoardMainWindowFailureReason.ResourceWindowAlreadyOpened) {
|
|
1014
|
+
_this8._uiEventStore.showToast({
|
|
1015
|
+
type: 'error',
|
|
1016
|
+
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_failed')
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
if (reason === _type.FcrBoardMainWindowFailureReason.SnapshotFailure) {
|
|
1020
|
+
_this8._uiEventStore.showToast({
|
|
1021
|
+
type: 'error',
|
|
1022
|
+
message: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_failed')
|
|
1023
|
+
});
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
}, {
|
|
1029
|
+
key: "_addDisposers",
|
|
1030
|
+
value: function _addDisposers() {
|
|
1031
|
+
var _this9 = this;
|
|
1032
|
+
this._disposers.push((0, _mobx.reaction)(function () {
|
|
1033
|
+
return _this9.hasPrivilege;
|
|
1034
|
+
}, function (privilege) {
|
|
1035
|
+
var _this9$_boardStore, _this9$_boardStore2;
|
|
1036
|
+
var p = privilege || _this9._isHost || _this9._isMyBoard;
|
|
1037
|
+
(_this9$_boardStore = _this9._boardStore) === null || _this9$_boardStore === void 0 || _this9$_boardStore.setWriteEnable(_this9._isHost || _this9._isMyBoard);
|
|
1038
|
+
(_this9$_boardStore2 = _this9._boardStore) === null || _this9$_boardStore2 === void 0 || _this9$_boardStore2.setPrivilege(p);
|
|
1039
|
+
}), (0, _mobx.reaction)(function () {
|
|
1040
|
+
return _this9._boardStore.observables.writeEnabled;
|
|
1041
|
+
}, function (writeEnabled) {
|
|
1042
|
+
if (writeEnabled) setTimeout(_this9._repositionToolbar, 0);
|
|
1043
|
+
}), (0, _mobx.reaction)(function () {
|
|
1044
|
+
return _this9._localUser;
|
|
1045
|
+
}, function (user) {
|
|
1046
|
+
var _this9$_boardStore3;
|
|
1047
|
+
_this9._isHost = [_type2.FcrUserRole.HOST, _type2.FcrUserRole.COHOST].includes(user.userRole);
|
|
1048
|
+
var hasPrivilege = _this9.hasPrivilege || _this9._isHost || _this9._isMyBoard;
|
|
1049
|
+
(_this9$_boardStore3 = _this9._boardStore) === null || _this9$_boardStore3 === void 0 || _this9$_boardStore3.setPrivilege(hasPrivilege);
|
|
1050
|
+
_this9._boardStore.setWriteEnable(_this9._isHost || _this9._isMyBoard);
|
|
1051
|
+
}));
|
|
1052
|
+
}
|
|
1053
|
+
}, {
|
|
1054
|
+
key: "_alertWhenReplace",
|
|
1055
|
+
value: function _alertWhenReplace(userInfo) {
|
|
1056
|
+
var _this10 = this;
|
|
1057
|
+
var userRole = userInfo.userRole,
|
|
1058
|
+
userName = userInfo.userName;
|
|
1059
|
+
var dialogId = this._uiEventStore.openConfirmDialog({
|
|
1060
|
+
title: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_tips_stoppedboard'),
|
|
1061
|
+
content: (_type2.FcrUserRole.HOST === userRole ? (0, _i18n.transI18n)('fmt_role_host') : _type2.FcrUserRole.COHOST === userRole ? (0, _i18n.transI18n)('fmt_role_cohost') : '') + "".concat(userName, " ").concat((0, _i18n.transI18n)('fmt_screenshare_whiteboard_lables_newshare')),
|
|
1062
|
+
okText: (0, _i18n.transI18n)('fmt_screenshare_whiteboard_button_gotit'),
|
|
1063
|
+
onOk: function onOk() {
|
|
1064
|
+
_this10._uiEventStore.closeDialog(dialogId);
|
|
1065
|
+
},
|
|
1066
|
+
onCancel: function onCancel() {
|
|
1067
|
+
_this10._uiEventStore.closeDialog(dialogId);
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
}
|
|
1071
|
+
}]);
|
|
1072
|
+
}(_base.UIModule);
|
|
1073
|
+
_FcrWhiteboardUIModule = FcrWhiteboardUIModule;
|
|
1074
|
+
var _applyDecs$e = _applyDecs(_FcrWhiteboardUIModule, [[_mobx.observable, 1, "_lonelyWindowState"], [_mobx.observable, 1, "_ownerUser"], [_mobx.observable, 1, "_isHost"], [_mobx.observable, 1, "_boardBackground"], [_mobx.observable, 1, "_localUser"], [_mobx.computed, 3, "hasPrivilege"], [_decorator.bound, 2, "onProcessEvent"], [_onPropertiesUpdateDecs, 18, "onPropertiesUpdate"], [_mountDecs, 18, "mount"], [_unmountDecs, 18, "unmount"], [_unloadDecs, 18, "unload"], [_boardUIEventsDecs, 18, "_boardUIEvents"], [_decorator.bound, 2, "_setCanvasBound"], [_decorator.bound, 2, "_resetCanvasPosition"], [_createToolbarUIContextDecs, 18, "_createToolbarUIContext"], [_decorator.bound, 2, "_updateDockPosition"], [_decorator.bound, 2, "_updateDockPlacement"], [_repositionToolbarDecs, 18, "_repositionToolbar"], [_decorator.bound, 2, "_updateMaxVisibleTools"], [_decorator.bound, 2, "_setBackgroundColor"], [_updateRedoDecs, 18, "_updateRedo"], [_updateUndoDecs, 18, "_updateUndo"], [_setConnectionStateDecs, 18, "_setConnectionState"], [_decorator.bound, 2, "_close"], [_getSnapshotImageDecs, 18, "_getSnapshotImage"], [_openLonelyWindowDecs, 18, "_openLonelyWindow"], [_setJoinSuccessedDecs, 18, "_setJoinSuccessed"], [_MainWindowEventsDecs, 18, "_MainWindowEvents"]], [], 0, void 0, _base.UIModule).e;
|
|
1075
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 6);
|
|
1076
|
+
_init__lonelyWindowState = _applyDecs$e2[0];
|
|
1077
|
+
_init__ownerUser = _applyDecs$e2[1];
|
|
1078
|
+
_init__isHost = _applyDecs$e2[2];
|
|
1079
|
+
_init__boardBackground = _applyDecs$e2[3];
|
|
1080
|
+
_init__localUser = _applyDecs$e2[4];
|
|
1081
|
+
_initProto = _applyDecs$e2[5];
|
|
1082
|
+
_applyDecs$e;
|