fcr-ui-scene 3.1.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +16 -0
- package/lib/base.d.ts +0 -1
- package/lib/base.js +16 -0
- package/lib/common/device-store.d.ts +4 -5
- package/lib/common/device-store.js +178 -86
- package/lib/common/device-stream-store.d.ts +3 -2
- package/lib/common/device-stream-store.js +94 -72
- package/lib/common/event-store.d.ts +20 -3
- package/lib/common/event-store.js +43 -5
- package/lib/common/security-store.d.ts +16 -16
- package/lib/common/security-store.js +278 -124
- package/lib/electron/app.js +13 -5
- package/lib/electron/bootstrap-dev.d.ts +1 -0
- package/lib/electron/bootstrap-dev.js +51 -0
- package/lib/electron/bootstrap-sdk.d.ts +1 -0
- package/lib/electron/bootstrap-sdk.js +56 -0
- package/lib/electron/bootstrap.d.ts +1 -0
- package/lib/electron/bootstrap.js +56 -0
- package/lib/electron/default-options.js +1 -1
- package/lib/electron/dev.d.ts +1 -0
- package/lib/electron/dev.js +51 -0
- package/lib/electron/injections.d.ts +3 -4
- package/lib/electron/injections.js +46 -33
- package/lib/electron/logger.d.ts +6 -0
- package/lib/electron/logger.js +66 -0
- package/lib/electron/main.js +15 -11
- package/lib/electron/plugins/meeting-state.d.ts +2 -0
- package/lib/electron/plugins/meeting-state.js +39 -0
- package/lib/electron/preload.js +2 -1
- package/lib/electron/tools.js +9 -0
- package/lib/electron/window.d.ts +1 -1
- package/lib/electron/window.js +14 -2
- package/lib/fragments/control-bar/context.d.ts +0 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +34 -1
- package/lib/fragments/control-bar/control-bar-store.js +394 -81
- package/lib/fragments/control-bar/device/index.js +12 -3
- package/lib/fragments/control-bar/index.css +15 -10
- package/lib/fragments/control-bar/index.js +19 -1
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +109 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.d.ts +3 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.js +60 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.d.ts +2 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +179 -0
- package/lib/fragments/control-bar/more-actions/index.css +53 -0
- package/lib/fragments/control-bar/more-actions/index.js +77 -37
- package/lib/fragments/control-bar/security-content/index.css +10 -0
- package/lib/fragments/control-bar/security-content/index.js +43 -18
- package/lib/fragments/control-bar/view.js +8 -2
- package/lib/fragments/live-streaming/context.d.ts +0 -1
- package/lib/fragments/live-streaming/store.js +27 -17
- package/lib/fragments/share-screen-selection/context.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.d.ts +0 -1
- package/lib/fragments/share-screen-selection/selection-store.js +34 -33
- package/lib/fragments/share-screen-selection/view.js +7 -0
- package/lib/fragments/toolbar/components/color-picker/components/color.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/components/panel.js +4 -0
- package/lib/fragments/toolbar/components/color-picker/components/picker.js +2 -0
- package/lib/fragments/toolbar/components/color-picker/index.js +5 -1
- package/lib/fragments/toolbar/components/color-picker.js +3 -1
- package/lib/fragments/toolbar/components/eraser-picker.js +4 -13
- package/lib/fragments/toolbar/components/extension-toolbar-item.js +5 -0
- package/lib/fragments/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/fragments/toolbar/components/pen-picker.js +2 -0
- package/lib/fragments/toolbar/components/screen-capture-picker.js +2 -0
- package/lib/fragments/toolbar/components/shape-picker.js +2 -0
- package/lib/fragments/toolbar/hooks.d.ts +1 -1
- package/lib/fragments/toolbar/hooks.js +13 -8
- package/lib/fragments/toolbar/store.d.ts +4 -4
- package/lib/fragments/toolbar/store.js +20 -2
- package/lib/fragments/toolbar/view.js +2 -0
- package/lib/global.d.ts +1 -0
- package/lib/hooks/meeting-time.d.ts +2 -2
- package/lib/login-confirm-dialog.d.ts +12 -0
- package/lib/login-confirm-dialog.js +80 -0
- package/lib/modules/action-bar/action-bar-collapes-items.js +14 -5
- package/lib/modules/action-bar/chat/index.js +6 -6
- package/lib/modules/action-bar/context.d.ts +0 -1
- package/lib/modules/action-bar/device/index.css +7 -2
- package/lib/modules/action-bar/device/index.d.ts +2 -2
- package/lib/modules/action-bar/device/index.js +6 -4
- package/lib/modules/action-bar/index.css +63 -12
- package/lib/modules/action-bar/index.d.ts +3 -2
- package/lib/modules/action-bar/index.dev.js +8 -7
- package/lib/modules/action-bar/index.js +21 -0
- package/lib/modules/action-bar/item-placement.d.ts +1 -2
- package/lib/modules/action-bar/item.js +5 -0
- package/lib/modules/action-bar/leave/assign-host.d.ts +3 -1
- package/lib/modules/action-bar/leave/assign-host.js +7 -7
- package/lib/modules/action-bar/leave/index.js +35 -7
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +11 -1
- package/lib/modules/action-bar/leave/leave-meeting.js +25 -16
- package/lib/modules/action-bar/more/poppover-content.d.ts +0 -1
- package/lib/modules/action-bar/more/poppover-content.js +14 -4
- package/lib/modules/action-bar/participants/index.css +12 -0
- package/lib/modules/action-bar/participants/index.js +21 -14
- package/lib/modules/action-bar/screen-share/index.js +5 -1
- package/lib/modules/action-bar/screen-share/submenu.js +17 -22
- package/lib/modules/action-bar/security/drop-menu.js +124 -14
- package/lib/modules/action-bar/security/index.js +1 -1
- package/lib/modules/action-bar/settings/index.js +1 -1
- package/lib/modules/action-bar/store.d.ts +45 -21
- package/lib/modules/action-bar/store.js +544 -134
- package/lib/modules/action-bar/view.js +65 -42
- package/lib/modules/audio-stream/index.js +12 -6
- package/lib/modules/chat/chat-bar/index.js +46 -27
- package/lib/modules/chat/chat-select/index.css +19 -4
- package/lib/modules/chat/chat-select/index.d.ts +0 -1
- package/lib/modules/chat/chat-select/index.js +29 -3
- package/lib/modules/chat/chat.d.ts +2 -3
- package/lib/modules/chat/chat.js +210 -107
- package/lib/modules/chat/contex.d.ts +0 -1
- package/lib/modules/chat/demo-wrapper.d.ts +0 -1
- package/lib/modules/chat/index.css +49 -0
- package/lib/modules/chat/index.d.ts +3 -3
- package/lib/modules/chat/index.dev.js +4 -4
- package/lib/modules/chat/index.js +32 -11
- package/lib/modules/chat/message-list.js +81 -49
- package/lib/modules/chat/store.d.ts +50 -4
- package/lib/modules/chat/store.js +303 -124
- package/lib/modules/chat/util.js +1 -1
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -0
- package/lib/modules/connection-gateway/components/phone/index.js +2 -0
- package/lib/modules/connection-gateway/index.d.ts +3 -2
- package/lib/modules/connection-gateway/index.js +2 -0
- package/lib/modules/connection-gateway/store.d.ts +6 -4
- package/lib/modules/connection-gateway/store.js +46 -15
- package/lib/modules/device-pretest/audio-preview/microphone-detection.d.ts +1 -0
- package/lib/modules/device-pretest/audio-preview/microphone-detection.js +3 -2
- package/lib/modules/device-pretest/audio-preview/speaker-control.d.ts +0 -1
- package/lib/modules/device-pretest/audio-preview/speaker-control.js +1 -1
- package/lib/modules/device-pretest/context.d.ts +0 -1
- package/lib/modules/device-pretest/index.css +0 -4
- package/lib/modules/device-pretest/index.d.ts +0 -1
- package/lib/modules/device-pretest/index.js +2 -1
- package/lib/modules/device-pretest/settings/beauty.js +19 -6
- package/lib/modules/device-pretest/settings/video-effect.d.ts +0 -1
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -0
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -0
- package/lib/modules/device-pretest/store.js +34 -19
- package/lib/modules/dialog/components/chat/electron.js +3 -2
- package/lib/modules/dialog/components/chat/index.js +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +7 -5
- package/lib/modules/dialog/components/confirm/index.js +16 -2
- package/lib/modules/dialog/components/connection-gateway/electron.js +4 -2
- package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
- package/lib/modules/dialog/components/device-setting/electron.d.ts +2 -0
- package/lib/modules/dialog/components/device-setting/electron.js +74 -0
- package/lib/modules/dialog/components/device-setting/index.css +26 -0
- package/lib/modules/dialog/components/device-setting/index.d.ts +4 -0
- package/lib/modules/dialog/components/device-setting/index.js +60 -0
- package/lib/modules/dialog/components/operation-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.css +44 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.js +156 -0
- package/lib/modules/dialog/components/participant/electron.js +8 -2
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.css +50 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +90 -0
- package/lib/modules/dialog/components/share-screen-selection/index.js +1 -1
- package/lib/modules/dialog/components/whiteboard/index.js +2 -1
- package/lib/modules/dialog/context.d.ts +0 -1
- package/lib/modules/dialog/dialogs.d.ts +0 -2
- package/lib/modules/dialog/dialogs.js +62 -103
- package/lib/modules/dialog/index.css +7 -6
- package/lib/modules/dialog/index.d.ts +1 -1
- package/lib/modules/dialog/index.js +17 -0
- package/lib/modules/dialog/store.d.ts +6 -2
- package/lib/modules/dialog/store.js +52 -9
- package/lib/modules/dialog/view.js +2 -0
- package/lib/modules/event-notification/context.d.ts +2 -0
- package/lib/modules/event-notification/context.js +9 -0
- package/lib/modules/event-notification/index.css +58 -0
- package/lib/modules/event-notification/index.d.ts +13 -0
- package/lib/modules/event-notification/index.js +48 -0
- package/lib/modules/event-notification/store.d.ts +17 -0
- package/lib/modules/event-notification/store.js +133 -0
- package/lib/modules/event-notification/view.d.ts +5 -0
- package/lib/modules/event-notification/view.js +114 -0
- package/lib/modules/event-toast/context.d.ts +0 -1
- package/lib/modules/event-toast/store.js +16 -0
- package/lib/modules/invite/context.d.ts +0 -1
- package/lib/modules/invite/index.css +4 -4
- package/lib/modules/invite/index.d.ts +2 -2
- package/lib/modules/invite/pstn-invite.js +4 -1
- package/lib/modules/invite/store.d.ts +2 -2
- package/lib/modules/invite/store.js +27 -7
- package/lib/modules/invite/voip-invite.d.ts +0 -1
- package/lib/modules/invite/voip-invite.js +1 -1
- package/lib/modules/layout/components/Aside.d.ts +0 -1
- package/lib/modules/layout/components/Aside.js +4 -1
- package/lib/modules/layout/components/Carousel.js +6 -5
- package/lib/modules/layout/components/Gallery.js +16 -9
- package/lib/modules/layout/components/Layout.js +82 -57
- package/lib/modules/layout/components/index.css +42 -5
- package/lib/modules/layout/components/index.js +3 -0
- package/lib/modules/layout/context.d.ts +0 -1
- package/lib/modules/layout/index.css +30 -0
- package/lib/modules/layout/index.dev.js +11 -11
- package/lib/modules/layout/index.js +0 -6
- package/lib/modules/layout/member-window/index.css +5 -5
- package/lib/modules/layout/member-window/index.d.ts +7 -7
- package/lib/modules/layout/member-window/index.js +59 -13
- package/lib/modules/layout/store.d.ts +61 -50
- package/lib/modules/layout/store.js +517 -342
- package/lib/modules/layout/type.d.ts +2 -1
- package/lib/modules/layout/video-window-datasource.d.ts +14 -8
- package/lib/modules/layout/video-window-datasource.js +129 -78
- package/lib/modules/live-streaming/context.d.ts +0 -1
- package/lib/modules/live-streaming/index.d.ts +2 -2
- package/lib/modules/live-streaming/index.dev.js +5 -4
- package/lib/modules/live-streaming/store.d.ts +2 -2
- package/lib/modules/live-streaming/store.js +32 -11
- package/lib/modules/participant/attendee/index.d.ts +12 -3
- package/lib/modules/participant/attendee/index.js +142 -30
- package/lib/modules/participant/context.d.ts +0 -1
- package/lib/modules/participant/index.css +20 -0
- package/lib/modules/participant/index.d.ts +5 -2
- package/lib/modules/participant/index.dev.js +14 -12
- package/lib/modules/participant/index.js +27 -0
- package/lib/modules/participant/member-list-data-source.d.ts +3 -3
- package/lib/modules/participant/member-list-data-source.js +29 -3
- package/lib/modules/participant/room-control-drop-menu/index.css +37 -0
- package/lib/modules/participant/room-control-drop-menu/index.js +35 -1
- package/lib/modules/participant/store.d.ts +59 -34
- package/lib/modules/participant/store.js +541 -222
- package/lib/modules/participant/view.d.ts +6 -6
- package/lib/modules/participant/view.js +138 -34
- package/lib/modules/setting/audio-settings/audio-settings.js +16 -12
- package/lib/modules/setting/audio-settings/index.css +2 -2
- package/lib/modules/setting/context.d.ts +0 -1
- package/lib/modules/setting/general-settings/general-settings.js +2 -1
- package/lib/modules/setting/general-settings/index.css +2 -2
- package/lib/modules/setting/index.css +1 -5
- package/lib/modules/setting/index.d.ts +2 -2
- package/lib/modules/setting/index.dev.js +14 -12
- package/lib/modules/setting/index.js +16 -0
- package/lib/modules/setting/minutes-settings/index.css +65 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.d.ts +4 -0
- package/lib/modules/setting/minutes-settings/minutes-settings.js +159 -0
- package/lib/modules/setting/state/index.css +0 -4
- package/lib/modules/setting/state/index.js +11 -1
- package/lib/modules/setting/storage-settings/storage-settings.js +1 -1
- package/lib/modules/setting/store.d.ts +7 -5
- package/lib/modules/setting/store.js +69 -46
- package/lib/modules/setting/translate-settings/index.css +45 -0
- package/lib/modules/setting/translate-settings/language-select.d.ts +12 -0
- package/lib/modules/setting/translate-settings/language-select.js +50 -0
- package/lib/modules/setting/translate-settings/translate-settings.d.ts +4 -0
- package/lib/modules/setting/translate-settings/translate-settings.js +139 -0
- package/lib/modules/setting/video-settings/index.css +15 -6
- package/lib/modules/setting/video-settings/video-settings-basic.js +3 -2
- package/lib/modules/setting/video-settings/video-settings.js +5 -1
- package/lib/modules/setting/view.js +34 -2
- package/lib/modules/share-screen/index.d.ts +4 -2
- package/lib/modules/share-screen/index.dev.js +17 -14
- package/lib/modules/share-screen/index.js +2 -0
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/selection/index.js +44 -6
- package/lib/modules/share-screen/share-state-bar/index.css +49 -11
- package/lib/modules/share-screen/share-state-bar/index.d.ts +0 -1
- package/lib/modules/share-screen/share-state-bar/index.js +51 -20
- package/lib/modules/share-screen/store.d.ts +23 -13
- package/lib/modules/share-screen/store.js +733 -606
- package/lib/modules/state-bar/context.d.ts +0 -1
- package/lib/modules/state-bar/index.css +2 -2
- package/lib/modules/state-bar/index.d.ts +2 -2
- package/lib/modules/state-bar/index.dev.js +12 -10
- package/lib/modules/state-bar/layout-config.js +2 -0
- package/lib/modules/state-bar/live-streaming-state.js +3 -0
- package/lib/modules/state-bar/meeting-detail.css +6 -4
- package/lib/modules/state-bar/meeting-details.js +29 -3
- package/lib/modules/state-bar/meeting-network-state.css +14 -3
- package/lib/modules/state-bar/meeting-network-state.js +10 -4
- package/lib/modules/state-bar/recording.js +9 -11
- package/lib/modules/state-bar/store.d.ts +7 -5
- package/lib/modules/state-bar/store.js +68 -8
- package/lib/modules/state-bar/view.js +4 -8
- package/lib/modules/video-window/context.d.ts +0 -1
- package/lib/modules/video-window/deviceState/index.d.ts +3 -3
- package/lib/modules/video-window/index.css +1 -0
- package/lib/modules/video-window/members/index.js +7 -4
- package/lib/modules/video-window/store.d.ts +5 -4
- package/lib/modules/video-window/store.js +49 -17
- package/lib/modules/video-window/topControl/index.js +7 -0
- package/lib/modules/video-window/view.js +2 -0
- package/lib/modules/waiting-room-layout/context.d.ts +2 -0
- package/lib/modules/waiting-room-layout/context.js +9 -0
- package/lib/modules/waiting-room-layout/index.css +71 -0
- package/lib/modules/waiting-room-layout/index.d.ts +8 -0
- package/lib/modules/waiting-room-layout/index.js +47 -0
- package/lib/modules/waiting-room-layout/store.d.ts +30 -0
- package/lib/modules/waiting-room-layout/store.js +189 -0
- package/lib/modules/waiting-room-layout/type.d.ts +0 -0
- package/lib/modules/waiting-room-layout/type.js +1 -0
- package/lib/modules/waiting-room-layout/view.d.ts +3 -0
- package/lib/modules/waiting-room-layout/view.js +67 -0
- package/lib/modules/whiteboard/app.js +2 -8
- package/lib/modules/whiteboard/components/control-bar/index.css +3 -0
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/control-bar/store.js +29 -29
- package/lib/modules/whiteboard/components/loading/index.js +2 -2
- package/lib/modules/whiteboard/components/multi-window/index.js +8 -3
- package/lib/modules/whiteboard/components/pagination/store.d.ts +0 -1
- package/lib/modules/whiteboard/components/progress/electron.js +3 -2
- package/lib/modules/whiteboard/components/progress/style.css +4 -3
- package/lib/modules/whiteboard/components/switch-theme/index.css +4 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +29 -17
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +1 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +11 -2
- package/lib/modules/whiteboard/components/switch-theme/libs.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/libs.js +21 -20
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +3 -1
- package/lib/modules/whiteboard/components/toolbar/components/eraser-picker.js +11 -9
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +4 -0
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +5 -0
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -0
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +18 -12
- package/lib/modules/whiteboard/components/toolbar/hooks/index.d.ts +3 -3
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +16 -11
- package/lib/modules/whiteboard/components/toolbar/index.js +9 -0
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +8 -7
- package/lib/modules/whiteboard/components/toolbar/store.js +25 -4
- package/lib/modules/whiteboard/context.d.ts +7 -3
- package/lib/modules/whiteboard/context.js +6 -4
- package/lib/modules/whiteboard/index.d.ts +6 -8
- package/lib/modules/whiteboard/index.js +310 -255
- package/lib/modules/whiteboard/type.d.ts +4 -12
- package/lib/modules/whiteboard/type.js +6 -16
- package/lib/modules/whiteboard/utils.d.ts +1 -0
- package/lib/modules/whiteboard/utils.js +12 -1
- package/lib/plugins/browser-runtime-plugin.js +2 -1
- package/lib/plugins/module-dev-plugin.js +12 -10
- package/lib/plugins/multi-lang-plugin.d.ts +1 -5
- package/lib/plugins/multi-lang-plugin.js +2 -0
- package/lib/runtime.d.ts +3 -5
- package/lib/translations/enUS.d.ts +590 -0
- package/lib/translations/enUS.js +608 -6
- package/lib/translations/zhCN.d.ts +588 -0
- package/lib/translations/zhCN.js +604 -4
- package/lib/type.d.ts +6 -2
- package/lib/ui-manager.d.ts +7 -3
- package/lib/ui-manager.js +597 -143
- package/lib/ui-scene.d.ts +1 -0
- package/lib/ui-scene.js +32 -22
- package/lib/utilities/board-context.d.ts +0 -1
- package/lib/utilities/constant.d.ts +47 -5
- package/lib/utilities/constant.js +44 -1
- package/lib/utilities/copyText.js +1 -1
- package/lib/utilities/extract.js +26 -3
- package/lib/utilities/hooks.js +2 -0
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/renderer-event.js +28 -0
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +15 -6
- package/lib/utilities/tools.js +5 -2
- package/lib/utilities/ui-resources.d.ts +2 -2
- package/lib/utilities/ui-resources.js +20 -3
- package/lib/utilities/video-track-render-context.d.ts +0 -1
- package/package.json +17 -16
- package/public/assets/fcr_defaultpage.png +0 -0
- package/public/assets/login_confirm.png +0 -0
- package/public/index.html +29 -11
- package/lib/modules/device-pretest/settings/index.css +0 -15
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -275
package/lib/modules/chat/chat.js
CHANGED
|
@@ -20,6 +20,29 @@ require("core-js/modules/es.array.unshift.js");
|
|
|
20
20
|
require("core-js/modules/es.map.js");
|
|
21
21
|
require("core-js/modules/es.object.to-string.js");
|
|
22
22
|
require("core-js/modules/es.string.iterator.js");
|
|
23
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
24
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
25
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
26
|
+
require("core-js/modules/esnext.async-iterator.map.js");
|
|
27
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
28
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
29
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
30
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
31
|
+
require("core-js/modules/esnext.iterator.map.js");
|
|
32
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
33
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
34
|
+
require("core-js/modules/esnext.map.every.js");
|
|
35
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
36
|
+
require("core-js/modules/esnext.map.find.js");
|
|
37
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
38
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
39
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
40
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
41
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
42
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
43
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
44
|
+
require("core-js/modules/esnext.map.some.js");
|
|
45
|
+
require("core-js/modules/esnext.map.update.js");
|
|
23
46
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
24
47
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
25
48
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
@@ -34,16 +57,20 @@ var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
|
34
57
|
var _react = require("react");
|
|
35
58
|
var _chatBar = require("./chat-bar");
|
|
36
59
|
var _type = require("../../type");
|
|
37
|
-
var _type2 = require("agora-edu-core/lib/type");
|
|
38
60
|
var _util = require("./util");
|
|
39
61
|
var _copyText = require("../../utilities/copyText");
|
|
40
62
|
var _chatManager = require("agora-ui-foundation/lib/components/chat-manager");
|
|
63
|
+
var _type2 = require("agora-edu-core/lib/room-control/chatroom-control/type");
|
|
64
|
+
var _agoraEduCore = require("agora-edu-core");
|
|
65
|
+
var _tabs = require("agora-ui-foundation/lib/components/tabs");
|
|
66
|
+
var _constant = require("../../utilities/constant");
|
|
67
|
+
var _fcr_chat_reddot = _interopRequireDefault(require("../../../public/assets/fcr_chat_reddot.svg"));
|
|
41
68
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
42
69
|
var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
70
|
+
var _chatRoomStores$RoomT, _chatRoomStores$RoomT2, _chatRoomStores$RoomT3, _chatRoomStores$RoomT4, _chatRoomStores$RoomT5, _chatRoomStores$RoomT6;
|
|
43
71
|
var updateReadIndex = _ref.updateReadIndex,
|
|
44
72
|
sendMsg = _ref.sendMsg,
|
|
45
73
|
localUserId = _ref.userId,
|
|
46
|
-
isHost = _ref.isHost,
|
|
47
74
|
singling = _ref.singling,
|
|
48
75
|
handleClickUploadImage = _ref.handleClickUploadImage;
|
|
49
76
|
var t = (0, _i18n.useI18n)();
|
|
@@ -58,20 +85,29 @@ var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
|
58
85
|
forbiddenTxt = defaultProps.forbiddenTxt,
|
|
59
86
|
errorMsg = defaultProps.errorMsg;
|
|
60
87
|
var _useContext = (0, _react.useContext)(_contex.StoreContext),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
88
|
+
chatRoomStores = _useContext.chatRoomStores,
|
|
89
|
+
hasWaitingRoomPermission = _useContext.hasWaitingRoomPermission,
|
|
90
|
+
activeTabIndex = _useContext.activeTabIndex,
|
|
91
|
+
handlerActiveTab = _useContext.handlerActiveTab;
|
|
92
|
+
var _ref2 = chatRoomStores[activeTabIndex],
|
|
93
|
+
setTargetUser = _ref2.setTargetUser,
|
|
94
|
+
privateTargetUser = _ref2.privateTargetUser,
|
|
95
|
+
remoteUsers = _ref2.remoteUsers,
|
|
96
|
+
targetUserIsOnline = _ref2.targetUserIsOnline,
|
|
97
|
+
localIsManager = _ref2.localIsManager,
|
|
98
|
+
chatLevel = _ref2.chatLevel,
|
|
99
|
+
messageList = _ref2.messageList,
|
|
100
|
+
textMsg = _ref2.textMsg,
|
|
101
|
+
updateChatTextMsg = _ref2.updateChatTextMsg,
|
|
102
|
+
privateTargetList = _ref2.privateTargetList,
|
|
103
|
+
resetTargetUser = _ref2.resetTargetUser,
|
|
104
|
+
handleToast = _ref2.handleToast,
|
|
105
|
+
chatRoomState = _ref2.chatRoomState,
|
|
106
|
+
isHost = _ref2.isHost,
|
|
107
|
+
hasChatPermission = _ref2.hasChatPermission,
|
|
108
|
+
hasChatSendPrivatePermission = _ref2.hasChatSendPrivatePermission,
|
|
109
|
+
filterChatMember = _ref2.filterChatMember,
|
|
110
|
+
hasSendMessagePermission = _ref2.hasSendMessagePermission;
|
|
75
111
|
var handleTargetChange = function handleTargetChange(user) {
|
|
76
112
|
setTargetUser(user);
|
|
77
113
|
};
|
|
@@ -93,7 +129,7 @@ var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
|
93
129
|
setTargetList = _useState8[1];
|
|
94
130
|
(0, _react.useEffect)(function () {
|
|
95
131
|
var _users$;
|
|
96
|
-
var users = (0, _toConsumableArray2["default"])(
|
|
132
|
+
var users = (0, _toConsumableArray2["default"])(remoteUsers);
|
|
97
133
|
if (((_users$ = users[0]) === null || _users$ === void 0 ? void 0 : _users$.userId) === _store.USER_ALL) {
|
|
98
134
|
if (chatLevel !== 'everyone' && chatLevel !== 'public' && !localIsManager) {
|
|
99
135
|
users.shift();
|
|
@@ -103,7 +139,7 @@ var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
|
103
139
|
userId: _store.USER_ALL,
|
|
104
140
|
userName: t('fmt_chat_option_all'),
|
|
105
141
|
userRole: _type.FcrUserRole.ROBOT,
|
|
106
|
-
connectorType:
|
|
142
|
+
connectorType: _agoraEduCore.FcrRoomConnectorType.NONE
|
|
107
143
|
});
|
|
108
144
|
}
|
|
109
145
|
remoteUsers.forEach(function (user) {
|
|
@@ -124,10 +160,11 @@ var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
|
124
160
|
return u.userId === user.userId;
|
|
125
161
|
})) !== null && _remoteUsers$find !== void 0 ? _remoteUsers$find : user;
|
|
126
162
|
});
|
|
163
|
+
users = filterChatMember((0, _toConsumableArray2["default"])(users));
|
|
127
164
|
setTargetList((0, _toConsumableArray2["default"])(users));
|
|
128
|
-
}, [
|
|
165
|
+
}, [chatLevel, remoteUsers]);
|
|
129
166
|
var handleMultiCopyMsg = /*#__PURE__*/function () {
|
|
130
|
-
var
|
|
167
|
+
var _ref3 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
131
168
|
var msgHandled, msgIndex;
|
|
132
169
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
133
170
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -162,7 +199,7 @@ var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
|
162
199
|
}, _callee);
|
|
163
200
|
}));
|
|
164
201
|
return function handleMultiCopyMsg() {
|
|
165
|
-
return
|
|
202
|
+
return _ref3.apply(this, arguments);
|
|
166
203
|
};
|
|
167
204
|
}();
|
|
168
205
|
(0, _react.useEffect)(function () {
|
|
@@ -185,107 +222,173 @@ var Chat = exports.Chat = (0, _mobxReact.observer)(function (_ref) {
|
|
|
185
222
|
}
|
|
186
223
|
});
|
|
187
224
|
};
|
|
188
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
}
|
|
216
|
-
})
|
|
217
|
-
|
|
225
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
226
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
227
|
+
className: "chat-tabs-container",
|
|
228
|
+
children: chatRoomStores[_constant.RoomType.WAITING_ROOM] && chatRoomStores[_constant.RoomType.MAIN_ROOM] && chatRoomStores[_constant.RoomType.WAITING_ROOM].userCount > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_tabs.FcrTabs, {
|
|
229
|
+
items: [{
|
|
230
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
231
|
+
className: "chat-container-icon",
|
|
232
|
+
children: [((_chatRoomStores$RoomT = chatRoomStores[_constant.RoomType.MAIN_ROOM]) === null || _chatRoomStores$RoomT === void 0 ? void 0 : _chatRoomStores$RoomT.unReadMsgCount) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
233
|
+
className: "fcr-action-bar-chat-unread-count",
|
|
234
|
+
children: ((_chatRoomStores$RoomT2 = chatRoomStores[_constant.RoomType.MAIN_ROOM]) === null || _chatRoomStores$RoomT2 === void 0 ? void 0 : _chatRoomStores$RoomT2.unReadMsgCount) > 99 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
235
|
+
src: _fcr_chat_reddot["default"]
|
|
236
|
+
}) : (_chatRoomStores$RoomT3 = chatRoomStores[_constant.RoomType.MAIN_ROOM]) === null || _chatRoomStores$RoomT3 === void 0 ? void 0 : _chatRoomStores$RoomT3.unReadMsgCount
|
|
237
|
+
}), t('fmt_waitingroom_sidebar_chat_label_meeting', {
|
|
238
|
+
reason1: chatRoomStores[_constant.RoomType.MAIN_ROOM].userCount
|
|
239
|
+
})]
|
|
240
|
+
}),
|
|
241
|
+
key: _constant.RoomType.MAIN_ROOM
|
|
242
|
+
}, {
|
|
243
|
+
label: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
244
|
+
className: "chat-container-icon",
|
|
245
|
+
children: [((_chatRoomStores$RoomT4 = chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _chatRoomStores$RoomT4 === void 0 ? void 0 : _chatRoomStores$RoomT4.unReadMsgCount) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
246
|
+
className: "fcr-action-bar-chat-unread-count",
|
|
247
|
+
children: ((_chatRoomStores$RoomT5 = chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _chatRoomStores$RoomT5 === void 0 ? void 0 : _chatRoomStores$RoomT5.unReadMsgCount) > 99 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
248
|
+
src: _fcr_chat_reddot["default"]
|
|
249
|
+
}) : (_chatRoomStores$RoomT6 = chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _chatRoomStores$RoomT6 === void 0 ? void 0 : _chatRoomStores$RoomT6.unReadMsgCount
|
|
250
|
+
}), t('fmt_waitingroom_sidebar_label_waiting', {
|
|
251
|
+
reason1: chatRoomStores[_constant.RoomType.WAITING_ROOM].userCount
|
|
252
|
+
})]
|
|
253
|
+
}),
|
|
254
|
+
key: _constant.RoomType.WAITING_ROOM
|
|
255
|
+
}],
|
|
256
|
+
activeKey: activeTabIndex,
|
|
257
|
+
onChange: function onChange(key) {
|
|
258
|
+
handlerActiveTab(key);
|
|
218
259
|
}
|
|
219
|
-
|
|
260
|
+
}) : null
|
|
261
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_chatWrapper.ChatWrapper, {
|
|
262
|
+
styles: styles,
|
|
263
|
+
errorMsg: errorMsg,
|
|
264
|
+
forbiddenTxt: forbiddenTxt,
|
|
265
|
+
singling: singling,
|
|
266
|
+
forbidden: !localIsManager && !hasChatPermission && !hasChatSendPrivatePermission,
|
|
267
|
+
isHost: isHost,
|
|
268
|
+
handMsg: function handMsg(msg) {
|
|
269
|
+
if (chatRoomState !== _type2.FcrChatRoomConnectionState.Connected) {
|
|
220
270
|
handleToast({
|
|
221
|
-
id: 'send-msg-
|
|
271
|
+
id: 'send-msg-offline',
|
|
222
272
|
toastProps: {
|
|
223
|
-
type: '
|
|
224
|
-
content: t('
|
|
273
|
+
type: 'error',
|
|
274
|
+
content: t('fmt_chat_tips_Networkconnect'),
|
|
225
275
|
size: 'small'
|
|
226
276
|
}
|
|
227
277
|
});
|
|
228
|
-
resetTargetUser();
|
|
229
278
|
return;
|
|
230
279
|
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
280
|
+
if (!localIsManager) {
|
|
281
|
+
if (privateTargetUser.userId === _store.USER_NONE) {
|
|
282
|
+
handleToast({
|
|
283
|
+
id: 'send-msg-to-none',
|
|
284
|
+
toastProps: {
|
|
285
|
+
type: 'normal',
|
|
286
|
+
content: t('fmt_chat_tips_selectchat'),
|
|
287
|
+
size: 'small'
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
return;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// if (
|
|
294
|
+
// chatLevel === 'no_one' ||
|
|
295
|
+
// (chatLevel !== 'everyone' &&
|
|
296
|
+
// privateTargetUser.userId !== USER_ALL &&
|
|
297
|
+
// !isManager(privateTargetUser.userRole))
|
|
298
|
+
// ) {
|
|
299
|
+
// handleToast({
|
|
300
|
+
// id: 'send-msg-to-none',
|
|
301
|
+
// toastProps: {
|
|
302
|
+
// type: 'normal',
|
|
303
|
+
// content: t('fmt_chat_tips_permissionchange'),
|
|
304
|
+
// size: 'small',
|
|
305
|
+
// },
|
|
306
|
+
// });
|
|
307
|
+
// resetTargetUser();
|
|
308
|
+
// return;
|
|
309
|
+
// }
|
|
310
|
+
|
|
311
|
+
if (privateTargetUser.userId === _store.USER_ALL && !hasSendMessagePermission()) {
|
|
312
|
+
handleToast({
|
|
313
|
+
id: 'send-msg-to-none',
|
|
314
|
+
toastProps: {
|
|
315
|
+
type: 'normal',
|
|
316
|
+
content: t('fmt_chat_tips_permissionchange'),
|
|
317
|
+
size: 'small'
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
return;
|
|
321
|
+
} else if (privateTargetUser.userId !== _store.USER_ALL && !hasChatSendPrivatePermission) {
|
|
322
|
+
handleToast({
|
|
323
|
+
id: 'send-msg-to-none',
|
|
324
|
+
toastProps: {
|
|
325
|
+
type: 'normal',
|
|
326
|
+
content: t('fmt_chat_tips_permissionchange'),
|
|
327
|
+
size: 'small'
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
resetTargetUser();
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
266
333
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
334
|
+
sendMsg(msg);
|
|
335
|
+
},
|
|
336
|
+
handleClickUploadImage: handleClickUploadImage,
|
|
337
|
+
msgBarElement: /*#__PURE__*/(0, _jsxRuntime.jsx)(_chatBar.MessageBar, {
|
|
338
|
+
selectedUserId: privateTargetUser.userId,
|
|
339
|
+
users: targetList,
|
|
340
|
+
onTargetChange: handleTargetChange,
|
|
341
|
+
title: chatSelectNoTitle ? undefined : /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
342
|
+
className: "assign-host-title",
|
|
343
|
+
children: chatLevel === 'public' ? t('fmt_chat_option_onlypublic') : t('fmt_chat_option_onlyprivate')
|
|
344
|
+
})
|
|
345
|
+
}),
|
|
346
|
+
targetUserIsOnline: targetUserIsOnline,
|
|
347
|
+
privateTarget: privateTargetUser.userId,
|
|
348
|
+
selectTargetNickname: privateTargetUser.userName,
|
|
275
349
|
multiSelectActive: multiSelectActive,
|
|
276
|
-
copyMap: copyMap,
|
|
277
|
-
setCopyMap: setCopyMap,
|
|
278
350
|
selectCnt: selectCnt,
|
|
279
|
-
|
|
280
|
-
|
|
351
|
+
onSelectCancel: function onSelectCancel() {
|
|
352
|
+
resetMultiSelectStates();
|
|
353
|
+
},
|
|
354
|
+
onSelectConfirm: /*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
355
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
356
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
357
|
+
case 0:
|
|
358
|
+
_context2.next = 2;
|
|
359
|
+
return handleMultiCopyMsg();
|
|
360
|
+
case 2:
|
|
361
|
+
resetMultiSelectStates();
|
|
362
|
+
copyTips();
|
|
363
|
+
case 4:
|
|
364
|
+
case "end":
|
|
365
|
+
return _context2.stop();
|
|
366
|
+
}
|
|
367
|
+
}, _callee2);
|
|
368
|
+
})),
|
|
369
|
+
defaultMsg: textMsg,
|
|
370
|
+
updateChatTextMsg: updateChatTextMsg,
|
|
371
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_messageList.MessageList, {
|
|
372
|
+
updateReadMsgIndex: updateReadIndex,
|
|
373
|
+
userId: localUserId,
|
|
374
|
+
setMultiSelectActive: setMultiSelectActive,
|
|
375
|
+
multiSelectActive: multiSelectActive,
|
|
376
|
+
copyMap: copyMap,
|
|
377
|
+
setCopyMap: setCopyMap,
|
|
378
|
+
selectCnt: selectCnt,
|
|
379
|
+
copyTips: copyTips
|
|
380
|
+
})
|
|
381
|
+
})]
|
|
281
382
|
});
|
|
282
383
|
});
|
|
283
384
|
var ChatAction = exports.ChatAction = (0, _mobxReact.observer)(function () {
|
|
284
385
|
var _useContext2 = (0, _react.useContext)(_contex.StoreContext),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
386
|
+
chatRoomStores = _useContext2.chatRoomStores;
|
|
387
|
+
var _ref5 = chatRoomStores[_constant.RoomType.MAIN_ROOM],
|
|
388
|
+
isHostOrCoHost = _ref5.isHostOrCoHost,
|
|
389
|
+
setAllowChat = _ref5.setAllowChat,
|
|
390
|
+
setAllowChatWithPayload = _ref5.setAllowChatWithPayload,
|
|
391
|
+
chatLevel = _ref5.chatLevel;
|
|
289
392
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_chatManager.ChatManager, {
|
|
290
393
|
isManager: isHostOrCoHost,
|
|
291
394
|
setAllowChat: setAllowChat,
|
|
@@ -15,3 +15,52 @@
|
|
|
15
15
|
.fcr-message-label .fcr-avatar {
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
.chat-tabs-container {
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.fcr-no-data-chat {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: 100%;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.fcr-no-data-chat span {
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
font-size: 13px;
|
|
37
|
+
line-height: 14px;
|
|
38
|
+
font-family: PingFang HK;
|
|
39
|
+
color: var(--fcr_ui_scene_icontext2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.fcr-no-data-chat img {
|
|
43
|
+
width: 50%;
|
|
44
|
+
object-fit: contain;
|
|
45
|
+
margin-bottom: 20px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.chat-container-icon {
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.chat-container-red {
|
|
53
|
+
width: 8px;
|
|
54
|
+
height: 8px;
|
|
55
|
+
border-radius: 50%;
|
|
56
|
+
background: var(--fcr_ui_scene_ramp_red6);
|
|
57
|
+
position: absolute;
|
|
58
|
+
right: -5px;
|
|
59
|
+
top: -5px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.chat-tabs-container .fcr-action-bar-chat-unread-count {
|
|
63
|
+
top: -16px;
|
|
64
|
+
right: -16px;
|
|
65
|
+
left: auto;
|
|
66
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { UIModule } from '../../base';
|
|
2
2
|
import './index.css';
|
|
3
|
-
import { FcrMainRoomControl } from 'agora-edu-core';
|
|
4
3
|
import { FcrUIEventStore } from '../../common/event-store';
|
|
5
4
|
import { FcrSecurityStore } from '../../common/security-store';
|
|
6
|
-
import { FcrChatRoomFile, FcrChatRoomMessageType } from 'agora-edu-core/lib/type';
|
|
7
5
|
import { CHAT_WRAPPER_CLASS } from 'agora-ui-foundation/lib/components/chat-wrapper';
|
|
6
|
+
import { FcrChatRoomFile, FcrChatRoomMessageType } from 'agora-edu-core/lib/room-control/chatroom-control/type';
|
|
7
|
+
import { FcrMainRoomControl, FcrWaitingRoomControl } from 'agora-edu-core/lib/room-control/type';
|
|
8
8
|
export { CHAT_WRAPPER_CLASS };
|
|
9
9
|
export declare class ChatUIModule extends UIModule {
|
|
10
10
|
private _store;
|
|
@@ -12,7 +12,7 @@ export declare class ChatUIModule extends UIModule {
|
|
|
12
12
|
private _uiEventStore;
|
|
13
13
|
private _uid;
|
|
14
14
|
constructor({ roomControl, uiEventStore, securityStore, }: {
|
|
15
|
-
roomControl: FcrMainRoomControl;
|
|
15
|
+
roomControl: FcrMainRoomControl | FcrWaitingRoomControl;
|
|
16
16
|
uiEventStore: FcrUIEventStore;
|
|
17
17
|
securityStore: FcrSecurityStore;
|
|
18
18
|
});
|
|
@@ -14,8 +14,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
var App = (0, _root.hot)(function () {
|
|
15
15
|
return null;
|
|
16
16
|
});
|
|
17
|
-
_reactDom["default"].render(
|
|
18
|
-
window.__DEV_ENGINE_IS_READY__.then(
|
|
17
|
+
_reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(App, {}), document.querySelector('#root'));
|
|
18
|
+
window.__DEV_ENGINE_IS_READY__.then(/*#__PURE__*/(0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
19
19
|
var engine, roomId, roomControl, uiEventStore, securityStore, uiModule, App;
|
|
20
20
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
21
21
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -23,7 +23,7 @@ window.__DEV_ENGINE_IS_READY__.then( /*#__PURE__*/(0, _asyncToGenerator2["defaul
|
|
|
23
23
|
engine = window.__DEV_ENGINE__;
|
|
24
24
|
roomId = window.__DEV_ROOM_ID__; // TODO: dev 环境需要 login
|
|
25
25
|
// await engine.login();
|
|
26
|
-
roomControl = engine.
|
|
26
|
+
roomControl = engine.createMainRoomControl(roomId);
|
|
27
27
|
uiEventStore = new _eventStore.FcrUIEventStore();
|
|
28
28
|
securityStore = new _securityStore.FcrSecurityStore(roomControl.getPrivilegeControl(), roomControl.getUserControl(), roomControl.getStreamControl(), roomControl.getRoomSessionControl(), uiEventStore); // TODO: dev 环境需要 join
|
|
29
29
|
// await roomControl.join({
|
|
@@ -49,7 +49,7 @@ window.__DEV_ENGINE_IS_READY__.then( /*#__PURE__*/(0, _asyncToGenerator2["defaul
|
|
|
49
49
|
children: uiModule.getComponent()
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
|
-
_reactDom["default"].render(
|
|
52
|
+
_reactDom["default"].render(/*#__PURE__*/(0, _jsxRuntime.jsx)(App, {}), document.querySelector('#root'));
|
|
53
53
|
case 8:
|
|
54
54
|
case "end":
|
|
55
55
|
return _context.stop();
|
|
@@ -16,6 +16,22 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
16
16
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
17
17
|
require("core-js/modules/es.reflect.construct.js");
|
|
18
18
|
require("core-js/modules/es.string.iterator.js");
|
|
19
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
20
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
21
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
22
|
+
require("core-js/modules/esnext.map.every.js");
|
|
23
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
24
|
+
require("core-js/modules/esnext.map.find.js");
|
|
25
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
26
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
27
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
28
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
29
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
30
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
31
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
32
|
+
require("core-js/modules/esnext.map.some.js");
|
|
33
|
+
require("core-js/modules/esnext.map.update.js");
|
|
34
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
19
35
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
20
36
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
21
37
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
@@ -46,13 +62,13 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
|
|
|
46
62
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
47
63
|
var _base = require("../../base");
|
|
48
64
|
require("./index.css");
|
|
49
|
-
var _store = _interopRequireDefault(require("./store"));
|
|
50
65
|
var _chat = require("./chat");
|
|
51
66
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
52
67
|
var _contex = require("./contex");
|
|
53
|
-
var _type = require("agora-edu-core/lib/type");
|
|
54
68
|
var _messageTextarea = require("agora-ui-foundation/lib/components/message-textarea");
|
|
55
69
|
var _chatWrapper = require("agora-ui-foundation/lib/components/chat-wrapper");
|
|
70
|
+
var _type = require("agora-edu-core/lib/room-control/chatroom-control/type");
|
|
71
|
+
var _store = _interopRequireDefault(require("./store"));
|
|
56
72
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
57
73
|
var _ChatUIModule;
|
|
58
74
|
var _initProto;
|
|
@@ -79,7 +95,8 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
79
95
|
chatRoomControl: _this._chatRoomControl,
|
|
80
96
|
userControl: roomControl.getUserControl(),
|
|
81
97
|
uiEventStore: uiEventStore,
|
|
82
|
-
securityStore: securityStore
|
|
98
|
+
securityStore: securityStore,
|
|
99
|
+
roomControl: roomControl
|
|
83
100
|
});
|
|
84
101
|
_this.sendMessage = _this.sendMessage.bind(_this);
|
|
85
102
|
_this.updateReadMsgIndex = _this.updateReadMsgIndex.bind(_this);
|
|
@@ -107,8 +124,9 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
107
124
|
_this2.sendMessage(imgData, _type.FcrChatRoomMessageType.Image);
|
|
108
125
|
});
|
|
109
126
|
},
|
|
110
|
-
userId: this._uid
|
|
111
|
-
isHost
|
|
127
|
+
userId: this._uid
|
|
128
|
+
// isHost={this._store.isHost}
|
|
129
|
+
,
|
|
112
130
|
singling: singling
|
|
113
131
|
})
|
|
114
132
|
});
|
|
@@ -124,20 +142,21 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
124
142
|
}, {
|
|
125
143
|
key: "sendMessage",
|
|
126
144
|
value: function () {
|
|
127
|
-
var _sendMessage = (0, _asyncToGenerator2["default"])(
|
|
145
|
+
var _sendMessage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(msg, type) {
|
|
146
|
+
var _this$_store$chatRoom, _this$_store$chatRoom2;
|
|
128
147
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
129
148
|
while (1) switch (_context.prev = _context.next) {
|
|
130
149
|
case 0:
|
|
131
150
|
_context.prev = 0;
|
|
132
151
|
_context.next = 3;
|
|
133
|
-
return this._store.sendMessage(msg, type);
|
|
152
|
+
return (_this$_store$chatRoom = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom === void 0 ? void 0 : _this$_store$chatRoom.sendMessage(msg, type);
|
|
134
153
|
case 3:
|
|
135
154
|
_context.next = 8;
|
|
136
155
|
break;
|
|
137
156
|
case 5:
|
|
138
157
|
_context.prev = 5;
|
|
139
158
|
_context.t0 = _context["catch"](0);
|
|
140
|
-
this._store.handleToast({
|
|
159
|
+
(_this$_store$chatRoom2 = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom2 === void 0 || _this$_store$chatRoom2.handleToast({
|
|
141
160
|
id: 'send-msg',
|
|
142
161
|
toastProps: {
|
|
143
162
|
content: _context.t0.reason,
|
|
@@ -159,11 +178,12 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
159
178
|
}, {
|
|
160
179
|
key: "updateReadMsgIndex",
|
|
161
180
|
value: function () {
|
|
162
|
-
var _updateReadMsgIndex = (0, _asyncToGenerator2["default"])(
|
|
181
|
+
var _updateReadMsgIndex = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(data) {
|
|
182
|
+
var _this$_store$chatRoom3;
|
|
163
183
|
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
164
184
|
while (1) switch (_context2.prev = _context2.next) {
|
|
165
185
|
case 0:
|
|
166
|
-
this._store.updateReadMsgIndex(data);
|
|
186
|
+
(_this$_store$chatRoom3 = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom3 === void 0 || _this$_store$chatRoom3.updateReadMsgIndex(data);
|
|
167
187
|
case 1:
|
|
168
188
|
case "end":
|
|
169
189
|
return _context2.stop();
|
|
@@ -178,7 +198,8 @@ var ChatUIModule = exports.ChatUIModule = /*#__PURE__*/function (_UIModule) {
|
|
|
178
198
|
}, {
|
|
179
199
|
key: "onUnload",
|
|
180
200
|
value: function onUnload() {
|
|
181
|
-
|
|
201
|
+
var _this$_store$chatRoom4;
|
|
202
|
+
(_this$_store$chatRoom4 = this._store.chatRoomStores[this._store.activeTabIndex]) === null || _this$_store$chatRoom4 === void 0 || _this$_store$chatRoom4.release();
|
|
182
203
|
}
|
|
183
204
|
}]);
|
|
184
205
|
}(_base.UIModule);
|