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
|
@@ -15,12 +15,14 @@ require("core-js/modules/es.object.define-property.js");
|
|
|
15
15
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
16
|
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
17
17
|
require("core-js/modules/es.object.keys.js");
|
|
18
|
+
require("core-js/modules/esnext.function.metadata.js");
|
|
19
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
18
20
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
19
21
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
20
22
|
Object.defineProperty(exports, "__esModule", {
|
|
21
23
|
value: true
|
|
22
24
|
});
|
|
23
|
-
exports["default"] = exports.allToUser = exports.USER_NONE = exports.USER_ALL = void 0;
|
|
25
|
+
exports["default"] = exports.allToUser = exports.USER_NONE = exports.USER_ALL = exports.ChatRoomStore = void 0;
|
|
24
26
|
exports.isManager = isManager;
|
|
25
27
|
exports.noUser = void 0;
|
|
26
28
|
exports.sortUsers = sortUsers;
|
|
@@ -42,30 +44,58 @@ require("core-js/modules/es.object.entries.js");
|
|
|
42
44
|
require("core-js/modules/es.object.to-string.js");
|
|
43
45
|
require("core-js/modules/es.string.iterator.js");
|
|
44
46
|
require("core-js/modules/es.weak-map.js");
|
|
47
|
+
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
48
|
+
require("core-js/modules/esnext.async-iterator.find.js");
|
|
49
|
+
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
50
|
+
require("core-js/modules/esnext.async-iterator.some.js");
|
|
51
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
52
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
53
|
+
require("core-js/modules/esnext.iterator.find.js");
|
|
54
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
55
|
+
require("core-js/modules/esnext.iterator.some.js");
|
|
56
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
57
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
58
|
+
require("core-js/modules/esnext.map.every.js");
|
|
59
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
60
|
+
require("core-js/modules/esnext.map.find.js");
|
|
61
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
62
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
63
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
64
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
65
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
66
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
67
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
68
|
+
require("core-js/modules/esnext.map.some.js");
|
|
69
|
+
require("core-js/modules/esnext.map.update.js");
|
|
70
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
71
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
45
72
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
46
73
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
47
74
|
require("core-js/modules/web.timers.js");
|
|
48
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
49
75
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
50
76
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
77
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
51
78
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
52
79
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
53
80
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
81
|
+
var _agoraEduCore = require("agora-edu-core");
|
|
54
82
|
var _logger = require("agora-foundation/lib/logger");
|
|
55
83
|
var _mobx = require("mobx");
|
|
56
84
|
var _type = require("agora-edu-core/lib/type");
|
|
57
85
|
var _helper = require("agora-ui-foundation/lib/components/avatar/helper");
|
|
58
86
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
59
87
|
var _reactVirtualized = require("react-virtualized");
|
|
60
|
-
var _mock = require("./mock");
|
|
61
88
|
var _constant = require("../../utilities/constant");
|
|
62
89
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
63
|
-
var
|
|
64
|
-
var
|
|
90
|
+
var _type2 = require("agora-edu-core/lib/room-control/chatroom-control/type");
|
|
91
|
+
var _type3 = require("agora-edu-core/lib/room-control/type");
|
|
92
|
+
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
93
|
+
var _ChatStore, _ChatRoomStore;
|
|
94
|
+
var _initProto, _init_chatRoomStores, _init_activeTabIndex, _handleReceiveMessageDecs, _handlerActiveTabDecs, _handleEventDecs, _ref, _initProto2, _init__userInfo, _init_messageList, _init_readMsgIndex, _init_readIdx, _init_viewIdx, _init_historyUnreadCount, _init_hasHistoryMsg, _init_newMsgsUnReadCnt, _init_privateTargetUser, _init_chatLevel, _init_currentUserMap, _init_textMsg, _init_privateTargetList, _init_chatRoomState, _init_hasNewMsg, _init_userCount, _init_unReadMsgCount, _setLastScrollTopDecs, _setMessageListDecs, _sendMessageDecs, _setUnReadMsgCountDecs, _setHasNewMsgDecs, _handleTextMessageReceivedDecs, _getUserCountDecs, _onRemoteUserUpdateDecs, _refreshUserListDecs, _handleNewMsgDecs, _updateReadMsgIndexDecs, _initReadInfoDecs, _updateHistoryUnreadCntDecs, _updateHasHistoryMsgDecs, _updateScrollInfoDecs, _updateViewIdxDecs, _updateReadIdxDecs, _updateFirstMsgIdDecs, _updateHistoryUnReadCountDecs, _updateListDecs, _updateMostRecentHeightDecs, _updateMostRecentWidthDecs, _patchHandleMsgDecs, _forceNotifyMsgsDecs, _resetComponentCacheDecs, _resetTargetUserDecs, _initChatLevelDecs, _setTargetUserDecs, _updateChatLevelDecs, _updateChatTextMsgDecs, _filterChatMemberDecs, _hasSendMessagePermissionDecs, _permitPrivateChatDecs, _handleToastDecs, _handleConnectionUpdatedDecs, _ref3;
|
|
65
95
|
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; }
|
|
66
96
|
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; }
|
|
67
|
-
function _classPrivateFieldInitSpec(
|
|
68
|
-
function _checkPrivateRedeclaration(
|
|
97
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
98
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
69
99
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
70
100
|
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
71
101
|
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"); }
|
|
@@ -81,7 +111,7 @@ var allToUser = exports.allToUser = {
|
|
|
81
111
|
userId: USER_ALL,
|
|
82
112
|
userName: USER_ALL,
|
|
83
113
|
userRole: _type.FcrUserRole.ROBOT,
|
|
84
|
-
connectorType:
|
|
114
|
+
connectorType: _agoraEduCore.FcrRoomConnectorType.NONE
|
|
85
115
|
};
|
|
86
116
|
|
|
87
117
|
// 没有可选的 User
|
|
@@ -89,10 +119,140 @@ var noUser = exports.noUser = {
|
|
|
89
119
|
userId: USER_NONE,
|
|
90
120
|
userName: (0, _i18n.transI18n)('fmt_chat_tips_selecthost'),
|
|
91
121
|
userRole: _type.FcrUserRole.ROBOT,
|
|
92
|
-
connectorType:
|
|
122
|
+
connectorType: _agoraEduCore.FcrRoomConnectorType.NONE
|
|
93
123
|
};
|
|
94
124
|
var _A = /*#__PURE__*/new WeakMap();
|
|
95
125
|
var _B = /*#__PURE__*/new WeakMap();
|
|
126
|
+
_ref = (_handleReceiveMessageDecs = [_mobx.action, _mobx.action.bound], _handlerActiveTabDecs = [_mobx.action, _mobx.action.bound], _handleEventDecs = [_mobx.action, _mobx.action.bound], "_observable");
|
|
127
|
+
var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
128
|
+
function ChatStore(_ref2) {
|
|
129
|
+
var _roomControl$getRoomI;
|
|
130
|
+
var chatRoomControl = _ref2.chatRoomControl,
|
|
131
|
+
userControl = _ref2.userControl,
|
|
132
|
+
uiEventStore = _ref2.uiEventStore,
|
|
133
|
+
securityStore = _ref2.securityStore,
|
|
134
|
+
roomControl = _ref2.roomControl;
|
|
135
|
+
(0, _classCallCheck2["default"])(this, ChatStore);
|
|
136
|
+
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), new _observable.AgoraObservable()));
|
|
137
|
+
(0, _defineProperty2["default"])(this, "_chatVisible", false);
|
|
138
|
+
(0, _defineProperty2["default"])(this, "_eventObserver", {
|
|
139
|
+
onEvent: this._handleEvent
|
|
140
|
+
});
|
|
141
|
+
(0, _defineProperty2["default"])(this, "_chatStoreObserver", {
|
|
142
|
+
onReceiveMessage: this._handleReceiveMessage.bind(this)
|
|
143
|
+
});
|
|
144
|
+
_classPrivateFieldInitSpec(this, _A, _init_chatRoomStores(this, {}));
|
|
145
|
+
_classPrivateFieldInitSpec(this, _B, _init_activeTabIndex(this, _constant.RoomType.MAIN_ROOM));
|
|
146
|
+
this._securityStore = securityStore;
|
|
147
|
+
this._uiEventStore = uiEventStore;
|
|
148
|
+
uiEventStore.addObserver(this._eventObserver);
|
|
149
|
+
this._observable.addObserver(this._chatStoreObserver);
|
|
150
|
+
var isMainroom = ((_roomControl$getRoomI = roomControl.getRoomInfo()) === null || _roomControl$getRoomI === void 0 ? void 0 : _roomControl$getRoomI.roomType) === _type3.FcrRoomType.Mainroom;
|
|
151
|
+
var type = isMainroom ? _constant.RoomType.MAIN_ROOM : _constant.RoomType.WAITING_ROOM;
|
|
152
|
+
this.activeTabIndex = isMainroom ? _constant.RoomType.MAIN_ROOM : _constant.RoomType.WAITING_ROOM;
|
|
153
|
+
this.chatRoomStores[type] = new ChatRoomStore({
|
|
154
|
+
chatRoomControl: chatRoomControl,
|
|
155
|
+
userControl: userControl,
|
|
156
|
+
uiEventStore: uiEventStore,
|
|
157
|
+
securityStore: securityStore,
|
|
158
|
+
type: type,
|
|
159
|
+
chatStoreObservable: this._observable
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return (0, _createClass2["default"])(ChatStore, [{
|
|
163
|
+
key: "chatRoomStores",
|
|
164
|
+
get: function get() {
|
|
165
|
+
return _classPrivateFieldGet(_A, this);
|
|
166
|
+
},
|
|
167
|
+
set: function set(v) {
|
|
168
|
+
_classPrivateFieldSet(_A, this, v);
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "activeTabIndex",
|
|
172
|
+
get: function get() {
|
|
173
|
+
return _classPrivateFieldGet(_B, this);
|
|
174
|
+
},
|
|
175
|
+
set: function set(v) {
|
|
176
|
+
_classPrivateFieldSet(_B, this, v);
|
|
177
|
+
}
|
|
178
|
+
}, {
|
|
179
|
+
key: "hasWaitingRoomPermission",
|
|
180
|
+
value: function hasWaitingRoomPermission() {
|
|
181
|
+
return this._securityStore.isWaitingRoomEnabled() && this._securityStore.hasWaitingRoomPermission();
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
key: "_handleReceiveMessage",
|
|
185
|
+
value: function _handleReceiveMessage(noitfyMsgs, type) {
|
|
186
|
+
if (this.activeTabIndex !== type || !this._chatVisible) {
|
|
187
|
+
var _this$chatRoomStores$, _this$chatRoomStores$2;
|
|
188
|
+
(_this$chatRoomStores$ = this.chatRoomStores[type]) === null || _this$chatRoomStores$ === void 0 || _this$chatRoomStores$.setUnReadMsgCount(noitfyMsgs.length + ((_this$chatRoomStores$2 = this.chatRoomStores[type]) === null || _this$chatRoomStores$2 === void 0 ? void 0 : _this$chatRoomStores$2.unReadMsgCount));
|
|
189
|
+
this._uiEventStore.receiveNewChatMessages({
|
|
190
|
+
latestMessage: noitfyMsgs[noitfyMsgs.length - 1],
|
|
191
|
+
count: noitfyMsgs.length,
|
|
192
|
+
type: type
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
key: "handlerActiveTab",
|
|
198
|
+
value: function handlerActiveTab(key) {
|
|
199
|
+
var _this$chatRoomStores$3, _this$chatRoomStores$4;
|
|
200
|
+
this.activeTabIndex = key;
|
|
201
|
+
(_this$chatRoomStores$3 = this.chatRoomStores[key]) === null || _this$chatRoomStores$3 === void 0 || _this$chatRoomStores$3.setUnReadMsgCount(0);
|
|
202
|
+
(_this$chatRoomStores$4 = this.chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _this$chatRoomStores$4 === void 0 || _this$chatRoomStores$4.setHasNewMsg(false);
|
|
203
|
+
this._uiEventStore.sendEvent(_constant.UIAction.CHAT_ROOM_TAB_CHANGE, key);
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "_handleEvent",
|
|
207
|
+
value: function _handleEvent(action, payload) {
|
|
208
|
+
if (action === _constant.UIAction.WAITING_ROOM_CREATED) {
|
|
209
|
+
var room = payload.room;
|
|
210
|
+
var userControl = room.getUserControl();
|
|
211
|
+
var chatRoomControl = room.getChatRoomControl();
|
|
212
|
+
this.chatRoomStores[_constant.RoomType.WAITING_ROOM] = new ChatRoomStore({
|
|
213
|
+
chatRoomControl: chatRoomControl,
|
|
214
|
+
userControl: userControl,
|
|
215
|
+
uiEventStore: this._uiEventStore,
|
|
216
|
+
securityStore: payload.securityStore,
|
|
217
|
+
type: _constant.RoomType.WAITING_ROOM,
|
|
218
|
+
chatStoreObservable: this._observable
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
if (action === _constant.UIAction.RECEIVE_NEW_CHAT_MESSAGES_FOR_RED) {
|
|
222
|
+
if (this.activeTabIndex !== payload) {
|
|
223
|
+
var _this$chatRoomStores;
|
|
224
|
+
(_this$chatRoomStores = this.chatRoomStores[payload]) === null || _this$chatRoomStores === void 0 || _this$chatRoomStores.setHasNewMsg(true);
|
|
225
|
+
} else {
|
|
226
|
+
var _this$chatRoomStores2;
|
|
227
|
+
(_this$chatRoomStores2 = this.chatRoomStores[payload]) === null || _this$chatRoomStores2 === void 0 || _this$chatRoomStores2.setHasNewMsg(false);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (action === _constant.UIAction.CHAT_ROOM_CLOSED) {
|
|
231
|
+
this.handlerActiveTab(_constant.RoomType.MAIN_ROOM);
|
|
232
|
+
}
|
|
233
|
+
if (action === _constant.UIAction.CHAT_VISIBLE) {
|
|
234
|
+
if (payload === true) {
|
|
235
|
+
var _this$chatRoomStores$5;
|
|
236
|
+
(_this$chatRoomStores$5 = this.chatRoomStores[this.activeTabIndex]) === null || _this$chatRoomStores$5 === void 0 || _this$chatRoomStores$5.setUnReadMsgCount(0);
|
|
237
|
+
}
|
|
238
|
+
this._chatVisible = payload;
|
|
239
|
+
}
|
|
240
|
+
if (action === _constant.UIAction.WAITING_ROOM_DESTROYED) {
|
|
241
|
+
var _this$chatRoomStores$6;
|
|
242
|
+
(_this$chatRoomStores$6 = this.chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _this$chatRoomStores$6 === void 0 || _this$chatRoomStores$6.release();
|
|
243
|
+
delete this.chatRoomStores[_constant.RoomType.WAITING_ROOM];
|
|
244
|
+
this.handlerActiveTab(_constant.RoomType.MAIN_ROOM);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}]);
|
|
248
|
+
}();
|
|
249
|
+
_ChatStore = ChatStore;
|
|
250
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ChatStore, [[_mobx.observable, 1, "chatRoomStores"], [_mobx.observable, 1, "activeTabIndex"], [_decorator.bound, 2, "hasWaitingRoomPermission"], [_handleReceiveMessageDecs, 18, "_handleReceiveMessage"], [_handlerActiveTabDecs, 18, "handlerActiveTab"], [_handleEventDecs, 18, "_handleEvent"]], []).e, 3);
|
|
251
|
+
_init_chatRoomStores = _applyDecs$e[0];
|
|
252
|
+
_init_activeTabIndex = _applyDecs$e[1];
|
|
253
|
+
_initProto = _applyDecs$e[2];
|
|
254
|
+
var _A2 = /*#__PURE__*/new WeakMap();
|
|
255
|
+
var _B2 = /*#__PURE__*/new WeakMap();
|
|
96
256
|
var _C = /*#__PURE__*/new WeakMap();
|
|
97
257
|
var _D = /*#__PURE__*/new WeakMap();
|
|
98
258
|
var _E = /*#__PURE__*/new WeakMap();
|
|
@@ -105,17 +265,22 @@ var _K = /*#__PURE__*/new WeakMap();
|
|
|
105
265
|
var _L = /*#__PURE__*/new WeakMap();
|
|
106
266
|
var _M = /*#__PURE__*/new WeakMap();
|
|
107
267
|
var _N = /*#__PURE__*/new WeakMap();
|
|
108
|
-
|
|
109
|
-
var
|
|
110
|
-
|
|
268
|
+
var _O = /*#__PURE__*/new WeakMap();
|
|
269
|
+
var _P = /*#__PURE__*/new WeakMap();
|
|
270
|
+
var _Q = /*#__PURE__*/new WeakMap();
|
|
271
|
+
_ref3 = (_setLastScrollTopDecs = [_mobx.action, _mobx.action.bound], _setMessageListDecs = [_mobx.action, _mobx.action.bound], _sendMessageDecs = [_mobx.action, _mobx.action.bound], _setUnReadMsgCountDecs = [_mobx.action, _mobx.action.bound], _setHasNewMsgDecs = [_mobx.action, _mobx.action.bound], _handleTextMessageReceivedDecs = [_mobx.action, _mobx.action.bound], _getUserCountDecs = [_mobx.action, _mobx.action.bound], _onRemoteUserUpdateDecs = [_mobx.action, _mobx.action.bound], _refreshUserListDecs = [_mobx.action, _mobx.action.bound], _handleNewMsgDecs = [_mobx.action, _mobx.action.bound], _updateReadMsgIndexDecs = [_mobx.action, _mobx.action.bound], _initReadInfoDecs = [_mobx.action, _mobx.action.bound], _updateHistoryUnreadCntDecs = [_mobx.action, _mobx.action.bound], _updateHasHistoryMsgDecs = [_mobx.action, _mobx.action.bound], _updateScrollInfoDecs = [_mobx.action, _mobx.action.bound], _updateViewIdxDecs = [_mobx.action, _mobx.action.bound], _updateReadIdxDecs = [_mobx.action, _mobx.action.bound], _updateFirstMsgIdDecs = [_mobx.action, _mobx.action.bound], _updateHistoryUnReadCountDecs = [_mobx.action, _mobx.action.bound], _updateListDecs = [_mobx.action, _mobx.action.bound], _updateMostRecentHeightDecs = [_mobx.action, _mobx.action.bound], _updateMostRecentWidthDecs = [_mobx.action, _mobx.action.bound], _patchHandleMsgDecs = [_mobx.action, _mobx.action.bound], _forceNotifyMsgsDecs = [_mobx.action, _mobx.action.bound], _resetComponentCacheDecs = [_mobx.action, _mobx.action.bound], _resetTargetUserDecs = [_mobx.action, _mobx.action.bound], _initChatLevelDecs = [_mobx.action, _mobx.action.bound], _setTargetUserDecs = [_mobx.action, _mobx.action.bound], _updateChatLevelDecs = [_mobx.action, _mobx.action.bound], _updateChatTextMsgDecs = [_mobx.action, _mobx.action.bound], _filterChatMemberDecs = [_mobx.action, _mobx.action.bound], _hasSendMessagePermissionDecs = [_mobx.action, _mobx.action.bound], _permitPrivateChatDecs = [_mobx.action, _mobx.action.bound], _handleToastDecs = [_mobx.action, _mobx.action.bound], _handleConnectionUpdatedDecs = [_mobx.action, _mobx.action.bound], "needCbBottomCount");
|
|
272
|
+
var ChatRoomStore = exports.ChatRoomStore = /*#__PURE__*/function () {
|
|
273
|
+
function ChatRoomStore(_ref4) {
|
|
111
274
|
var _this$_chatRoomContro,
|
|
112
275
|
_this = this;
|
|
113
|
-
var chatRoomControl =
|
|
114
|
-
userControl =
|
|
115
|
-
uiEventStore =
|
|
116
|
-
securityStore =
|
|
117
|
-
|
|
118
|
-
|
|
276
|
+
var chatRoomControl = _ref4.chatRoomControl,
|
|
277
|
+
userControl = _ref4.userControl,
|
|
278
|
+
uiEventStore = _ref4.uiEventStore,
|
|
279
|
+
securityStore = _ref4.securityStore,
|
|
280
|
+
type = _ref4.type,
|
|
281
|
+
chatStoreObservable = _ref4.chatStoreObservable;
|
|
282
|
+
(0, _classCallCheck2["default"])(this, ChatRoomStore);
|
|
283
|
+
(0, _defineProperty2["default"])(this, _ref3, (_initProto2(this), 40));
|
|
119
284
|
(0, _defineProperty2["default"])(this, "mostRecentHeight", 0);
|
|
120
285
|
(0, _defineProperty2["default"])(this, "mostRecentWidth", 0);
|
|
121
286
|
(0, _defineProperty2["default"])(this, "cache", new _reactVirtualized.CellMeasurerCache({}));
|
|
@@ -132,8 +297,8 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
132
297
|
(0, _defineProperty2["default"])(this, "_maxMsgCount", 500);
|
|
133
298
|
(0, _defineProperty2["default"])(this, "_originalMessages", []);
|
|
134
299
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
135
|
-
_classPrivateFieldInitSpec(this,
|
|
136
|
-
_classPrivateFieldInitSpec(this,
|
|
300
|
+
_classPrivateFieldInitSpec(this, _A2, _init__userInfo(this));
|
|
301
|
+
_classPrivateFieldInitSpec(this, _B2, _init_messageList(this, []));
|
|
137
302
|
_classPrivateFieldInitSpec(this, _C, _init_readMsgIndex(this, {
|
|
138
303
|
index: -1,
|
|
139
304
|
msgId: ''
|
|
@@ -150,10 +315,14 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
150
315
|
_classPrivateFieldInitSpec(this, _K, _init_currentUserMap(this, new Map()));
|
|
151
316
|
_classPrivateFieldInitSpec(this, _L, _init_textMsg(this, ''));
|
|
152
317
|
_classPrivateFieldInitSpec(this, _M, _init_privateTargetList(this, []));
|
|
153
|
-
_classPrivateFieldInitSpec(this, _N, _init_chatRoomState(this,
|
|
318
|
+
_classPrivateFieldInitSpec(this, _N, _init_chatRoomState(this, _type2.FcrChatRoomConnectionState.Disconnected));
|
|
319
|
+
_classPrivateFieldInitSpec(this, _O, _init_hasNewMsg(this, false));
|
|
320
|
+
_classPrivateFieldInitSpec(this, _P, _init_userCount(this, 0));
|
|
321
|
+
_classPrivateFieldInitSpec(this, _Q, _init_unReadMsgCount(this, 0));
|
|
154
322
|
(0, _defineProperty2["default"])(this, "_chatRoomObserver", {
|
|
155
323
|
onTextMessageReceived: this.messageReceived.bind(this),
|
|
156
|
-
onConnectionStateUpdated: this._handleConnectionUpdated.bind(this)
|
|
324
|
+
onConnectionStateUpdated: this._handleConnectionUpdated.bind(this),
|
|
325
|
+
onErrorOccurred: function onErrorOccurred() {}
|
|
157
326
|
});
|
|
158
327
|
(0, _defineProperty2["default"])(this, "_userObserver", {
|
|
159
328
|
onRemoteUsersJoined: this._onRemoteUserUpdate.bind(this),
|
|
@@ -162,14 +331,17 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
162
331
|
onUserPropertiesDeleted: function onUserPropertiesDeleted(roomId, event) {},
|
|
163
332
|
onUserInfoUpdated: this._onUserInfoUpdated.bind(this)
|
|
164
333
|
});
|
|
334
|
+
this._type = type;
|
|
165
335
|
this._uiEventStore = uiEventStore;
|
|
166
336
|
this._securityStore = securityStore;
|
|
337
|
+
this._chatStoreObservable = chatStoreObservable;
|
|
167
338
|
// TODO: 需要查询房间历史消息, 一期预留
|
|
168
339
|
this.messageList = [];
|
|
169
340
|
this._chatRoomControl = chatRoomControl;
|
|
170
341
|
this._userControl = userControl;
|
|
342
|
+
this.userCount = this.getUserCount();
|
|
171
343
|
this._userInfo = userControl.getLocalUser();
|
|
172
|
-
(_this$_chatRoomContro = this._chatRoomControl) === null || _this$_chatRoomContro === void 0 || _this$_chatRoomContro.
|
|
344
|
+
(_this$_chatRoomContro = this._chatRoomControl) === null || _this$_chatRoomContro === void 0 || _this$_chatRoomContro.addObserver(this._chatRoomObserver);
|
|
173
345
|
this._userControl.addObserver(this._userObserver);
|
|
174
346
|
this._refreshUserList();
|
|
175
347
|
intervalId = setInterval(this.patchHandleMsg, 500);
|
|
@@ -187,84 +359,22 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
187
359
|
this.privateTargetList = (0, _toConsumableArray2["default"])(this.remoteUsers);
|
|
188
360
|
this.initChatLevel();
|
|
189
361
|
this.resetTargetUser();
|
|
190
|
-
|
|
191
|
-
// TODO: mock data, 提测删除
|
|
192
|
-
var _this$_userInfo = this._userInfo,
|
|
193
|
-
userName = _this$_userInfo.userName,
|
|
194
|
-
userId = _this$_userInfo.userId;
|
|
195
|
-
var color = (0, _helper.getNameColor)(userName);
|
|
196
|
-
_mock.messages.push({
|
|
197
|
-
id: '34',
|
|
198
|
-
nickName: userName,
|
|
199
|
-
uid: userId,
|
|
200
|
-
color: color,
|
|
201
|
-
role: 'host',
|
|
202
|
-
time: Date.now(),
|
|
203
|
-
msg: '测试消息'
|
|
204
|
-
}, {
|
|
205
|
-
id: '35',
|
|
206
|
-
nickName: userName,
|
|
207
|
-
uid: userId,
|
|
208
|
-
color: color,
|
|
209
|
-
role: 'union-host',
|
|
210
|
-
time: Date.now(),
|
|
211
|
-
msg: '很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息很长的测试消息',
|
|
212
|
-
isPrivate: true,
|
|
213
|
-
target: 'Zxq'
|
|
214
|
-
}, {
|
|
215
|
-
id: '36',
|
|
216
|
-
nickName: userName,
|
|
217
|
-
uid: userId,
|
|
218
|
-
color: color,
|
|
219
|
-
role: 'participant',
|
|
220
|
-
time: Date.now(),
|
|
221
|
-
msg: '测试消息',
|
|
222
|
-
img: {
|
|
223
|
-
url: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png',
|
|
224
|
-
filename: 'test_filename',
|
|
225
|
-
filetype: 'test_filetype',
|
|
226
|
-
data: 'test_data' // TODO: any
|
|
227
|
-
}
|
|
228
|
-
}, {
|
|
229
|
-
id: '37',
|
|
230
|
-
nickName: 'Zxq',
|
|
231
|
-
uid: '037',
|
|
232
|
-
color: color,
|
|
233
|
-
role: 'union-host',
|
|
234
|
-
time: Date.now(),
|
|
235
|
-
msg: '测试图片消息',
|
|
236
|
-
img: {
|
|
237
|
-
url: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png',
|
|
238
|
-
filename: 'test_filename',
|
|
239
|
-
filetype: 'test_filetype',
|
|
240
|
-
data: 'test_data' // TODO: any
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
// zxq-TODO: 提测删除
|
|
244
|
-
// messages.forEach((msg) => {
|
|
245
|
-
// const { isPrivate, target } = msg;
|
|
246
|
-
// this.handleNewMsg({
|
|
247
|
-
// ...msg,
|
|
248
|
-
// color: getNameColor(msg.nickName),
|
|
249
|
-
// target: target || (isPrivate ? 'Me' : 'All'),
|
|
250
|
-
// });
|
|
251
|
-
// });
|
|
252
362
|
}
|
|
253
|
-
return (0, _createClass2["default"])(
|
|
363
|
+
return (0, _createClass2["default"])(ChatRoomStore, [{
|
|
254
364
|
key: "_userInfo",
|
|
255
365
|
get: function get() {
|
|
256
|
-
return _classPrivateFieldGet(
|
|
366
|
+
return _classPrivateFieldGet(_A2, this);
|
|
257
367
|
},
|
|
258
368
|
set: function set(v) {
|
|
259
|
-
_classPrivateFieldSet(
|
|
369
|
+
_classPrivateFieldSet(_A2, this, v);
|
|
260
370
|
}
|
|
261
371
|
}, {
|
|
262
372
|
key: "messageList",
|
|
263
373
|
get: function get() {
|
|
264
|
-
return _classPrivateFieldGet(
|
|
374
|
+
return _classPrivateFieldGet(_B2, this);
|
|
265
375
|
},
|
|
266
376
|
set: function set(v) {
|
|
267
|
-
_classPrivateFieldSet(
|
|
377
|
+
_classPrivateFieldSet(_B2, this, v);
|
|
268
378
|
}
|
|
269
379
|
}, {
|
|
270
380
|
key: "readMsgIndex",
|
|
@@ -362,6 +472,30 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
362
472
|
set: function set(v) {
|
|
363
473
|
_classPrivateFieldSet(_N, this, v);
|
|
364
474
|
}
|
|
475
|
+
}, {
|
|
476
|
+
key: "hasNewMsg",
|
|
477
|
+
get: function get() {
|
|
478
|
+
return _classPrivateFieldGet(_O, this);
|
|
479
|
+
},
|
|
480
|
+
set: function set(v) {
|
|
481
|
+
_classPrivateFieldSet(_O, this, v);
|
|
482
|
+
}
|
|
483
|
+
}, {
|
|
484
|
+
key: "userCount",
|
|
485
|
+
get: function get() {
|
|
486
|
+
return _classPrivateFieldGet(_P, this);
|
|
487
|
+
},
|
|
488
|
+
set: function set(v) {
|
|
489
|
+
_classPrivateFieldSet(_P, this, v);
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
key: "unReadMsgCount",
|
|
493
|
+
get: function get() {
|
|
494
|
+
return _classPrivateFieldGet(_Q, this);
|
|
495
|
+
},
|
|
496
|
+
set: function set(v) {
|
|
497
|
+
_classPrivateFieldSet(_Q, this, v);
|
|
498
|
+
}
|
|
365
499
|
}, {
|
|
366
500
|
key: "release",
|
|
367
501
|
value: function release() {
|
|
@@ -385,13 +519,13 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
385
519
|
}, {
|
|
386
520
|
key: "sendMessage",
|
|
387
521
|
value: function () {
|
|
388
|
-
var _sendMessage = (0, _asyncToGenerator2["default"])(
|
|
522
|
+
var _sendMessage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(msg, type) {
|
|
389
523
|
var _this$_chatRoomContro3;
|
|
390
524
|
var target, isPrivate, message, resp;
|
|
391
525
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
392
526
|
while (1) switch (_context.prev = _context.next) {
|
|
393
527
|
case 0:
|
|
394
|
-
if (!(type ===
|
|
528
|
+
if (!(type === _type2.FcrChatRoomMessageType.Image)) {
|
|
395
529
|
_context.next = 3;
|
|
396
530
|
break;
|
|
397
531
|
}
|
|
@@ -402,7 +536,7 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
402
536
|
case 3:
|
|
403
537
|
target = this.privateTargetUser;
|
|
404
538
|
isPrivate = target.userId !== USER_ALL;
|
|
405
|
-
message = _objectSpread(_objectSpread({}, type ===
|
|
539
|
+
message = _objectSpread(_objectSpread({}, type === _type2.FcrChatRoomMessageType.Text ? {
|
|
406
540
|
content: msg
|
|
407
541
|
} : {
|
|
408
542
|
file: msg
|
|
@@ -420,7 +554,7 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
420
554
|
resp: resp,
|
|
421
555
|
type: type
|
|
422
556
|
}, 'message sent');
|
|
423
|
-
this._handleTextMessageReceived(
|
|
557
|
+
this._handleTextMessageReceived(resp, isPrivate ? target.userName : undefined);
|
|
424
558
|
this.updateReadMsgIndex({
|
|
425
559
|
index: this.messageList.length - 1,
|
|
426
560
|
msgId: resp.id
|
|
@@ -440,10 +574,21 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
440
574
|
key: "messageReceived",
|
|
441
575
|
value: function messageReceived(_roomId, msg) {
|
|
442
576
|
this._originalMessages.push(msg);
|
|
577
|
+
this._uiEventStore.sendEvent(_constant.UIAction.RECEIVE_NEW_CHAT_MESSAGES_FOR_RED, this._type);
|
|
578
|
+
}
|
|
579
|
+
}, {
|
|
580
|
+
key: "setUnReadMsgCount",
|
|
581
|
+
value: function setUnReadMsgCount(count) {
|
|
582
|
+
this.unReadMsgCount = count;
|
|
583
|
+
}
|
|
584
|
+
}, {
|
|
585
|
+
key: "setHasNewMsg",
|
|
586
|
+
value: function setHasNewMsg(value) {
|
|
587
|
+
this.hasNewMsg = value;
|
|
443
588
|
}
|
|
444
589
|
}, {
|
|
445
590
|
key: "_handleTextMessageReceived",
|
|
446
|
-
value: function _handleTextMessageReceived(
|
|
591
|
+
value: function _handleTextMessageReceived(message, target) {
|
|
447
592
|
var id = message.id,
|
|
448
593
|
_message$from = message.from,
|
|
449
594
|
userId = _message$from.userId,
|
|
@@ -456,7 +601,7 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
456
601
|
message: message,
|
|
457
602
|
target: target
|
|
458
603
|
}, 'message received');
|
|
459
|
-
if (type !==
|
|
604
|
+
if (type !== _type2.FcrChatRoomMessageType.Text) {
|
|
460
605
|
return;
|
|
461
606
|
}
|
|
462
607
|
var color = (0, _helper.getNameColor)(userName);
|
|
@@ -481,18 +626,31 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
481
626
|
uid: userId,
|
|
482
627
|
isPrivate: isPrivate,
|
|
483
628
|
target: target || (isPrivate ? 'Me' : 'All')
|
|
484
|
-
}, type ===
|
|
629
|
+
}, type === _type2.FcrChatRoomMessageType.Text ? {
|
|
485
630
|
msg: message.content
|
|
486
631
|
} : {
|
|
487
632
|
img: message.file
|
|
488
633
|
}));
|
|
489
634
|
}
|
|
635
|
+
}, {
|
|
636
|
+
key: "getUserCount",
|
|
637
|
+
value: function getUserCount() {
|
|
638
|
+
return this._userControl.getUserList().filter(function (user) {
|
|
639
|
+
return user.userRole === _type.FcrUserRole.PARTICIPANT;
|
|
640
|
+
}).length;
|
|
641
|
+
}
|
|
490
642
|
}, {
|
|
491
643
|
key: "_onRemoteUserUpdate",
|
|
492
644
|
value: function _onRemoteUserUpdate(roomId, events) {
|
|
493
645
|
console.log({
|
|
494
646
|
events: events
|
|
495
647
|
}, 'remoteUser update');
|
|
648
|
+
if (this._type === _constant.RoomType.WAITING_ROOM) {
|
|
649
|
+
this.userCount = this.getUserCount();
|
|
650
|
+
if (this.userCount === 0) {
|
|
651
|
+
this._uiEventStore.sendEvent(_constant.UIAction.CHAT_ROOM_CLOSED, this._type);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
496
654
|
this._refreshUserList();
|
|
497
655
|
}
|
|
498
656
|
}, {
|
|
@@ -580,6 +738,11 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
580
738
|
get: function get() {
|
|
581
739
|
return this._securityStore.hasChatSendPublicPermission();
|
|
582
740
|
}
|
|
741
|
+
}, {
|
|
742
|
+
key: "hasChatSendPrivatePermission",
|
|
743
|
+
get: function get() {
|
|
744
|
+
return this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.HOST) || this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.COHOST);
|
|
745
|
+
}
|
|
583
746
|
}, {
|
|
584
747
|
key: "isHost",
|
|
585
748
|
get: function get() {
|
|
@@ -713,13 +876,9 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
713
876
|
var notifyMsgs = this._originalMessages.splice(0, this.newMsgsUnReadCnt || 10);
|
|
714
877
|
// 通知列表中前10条消息
|
|
715
878
|
notifyMsgs.forEach(function (msg) {
|
|
716
|
-
|
|
717
|
-
_this3._handleTextMessageReceived((_this3$_chatRoomContr = _this3._chatRoomControl) === null || _this3$_chatRoomContr === void 0 || (_this3$_chatRoomContr = _this3$_chatRoomContr.initConfig) === null || _this3$_chatRoomContr === void 0 ? void 0 : _this3$_chatRoomContr.chatRoomId, msg);
|
|
718
|
-
});
|
|
719
|
-
notifyMsgs.length > 0 && this._uiEventStore.receiveNewChatMessages({
|
|
720
|
-
latestMessage: notifyMsgs[notifyMsgs.length - 1],
|
|
721
|
-
count: notifyMsgs.length
|
|
879
|
+
_this3._handleTextMessageReceived(msg);
|
|
722
880
|
});
|
|
881
|
+
notifyMsgs.length > 0 && this._chatStoreObservable.notifyObservers('onReceiveMessage', notifyMsgs, this._type);
|
|
723
882
|
|
|
724
883
|
// TODO: 消息批量更新, 优化
|
|
725
884
|
}
|
|
@@ -799,10 +958,10 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
799
958
|
key: "handleChatPermissionUpdate",
|
|
800
959
|
value: function handleChatPermissionUpdate(chatLevel) {
|
|
801
960
|
var _this$privilegeOperat;
|
|
802
|
-
var
|
|
803
|
-
userId =
|
|
804
|
-
userName =
|
|
805
|
-
userRole =
|
|
961
|
+
var _ref5 = (_this$privilegeOperat = this.privilegeOperator) !== null && _this$privilegeOperat !== void 0 ? _this$privilegeOperat : {},
|
|
962
|
+
userId = _ref5.userId,
|
|
963
|
+
userName = _ref5.userName,
|
|
964
|
+
userRole = _ref5.userRole;
|
|
806
965
|
var msg = {
|
|
807
966
|
id: String(new Date().getTime()),
|
|
808
967
|
role: userRole === _type.FcrUserRole.PARTICIPANT ? 'participant' : userRole === _type.FcrUserRole.COHOST ? 'union-host' : 'host',
|
|
@@ -834,6 +993,23 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
834
993
|
value: function updateChatTextMsg(txt) {
|
|
835
994
|
this.textMsg = txt;
|
|
836
995
|
}
|
|
996
|
+
}, {
|
|
997
|
+
key: "filterChatMember",
|
|
998
|
+
value: function filterChatMember(list) {
|
|
999
|
+
var _this6 = this;
|
|
1000
|
+
var res = list.filter(function (user) {
|
|
1001
|
+
return _this6._securityStore.hasChatSendPublicPermissionByTargetRole(user.userRole) || _this6._securityStore.hasPermissionToSendPrivateMessage(user.userRole) || user.userId === USER_ALL;
|
|
1002
|
+
});
|
|
1003
|
+
if (res.length && _constant.RoomType.WAITING_ROOM === this._type && !this.localIsManager) {
|
|
1004
|
+
this.setTargetUser(res[0]);
|
|
1005
|
+
}
|
|
1006
|
+
return res;
|
|
1007
|
+
}
|
|
1008
|
+
}, {
|
|
1009
|
+
key: "hasSendMessagePermission",
|
|
1010
|
+
value: function hasSendMessagePermission() {
|
|
1011
|
+
return this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.HOST) || this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.COHOST) || this._securityStore.hasChatSendPublicPermissionByTargetRole(_type.FcrUserRole.PARTICIPANT) || this._securityStore.hasChatSendPublicPermissionByTargetRole(_type.FcrUserRole.HOST) || this._securityStore.hasChatSendPublicPermissionByTargetRole(_type.FcrUserRole.COHOST);
|
|
1012
|
+
}
|
|
837
1013
|
}, {
|
|
838
1014
|
key: "permitPrivateChat",
|
|
839
1015
|
value: function permitPrivateChat(userId) {
|
|
@@ -886,23 +1062,26 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
886
1062
|
}
|
|
887
1063
|
}]);
|
|
888
1064
|
}();
|
|
889
|
-
|
|
890
|
-
var _applyDecs$
|
|
891
|
-
_init__userInfo = _applyDecs$
|
|
892
|
-
_init_messageList = _applyDecs$
|
|
893
|
-
_init_readMsgIndex = _applyDecs$
|
|
894
|
-
_init_readIdx = _applyDecs$
|
|
895
|
-
_init_viewIdx = _applyDecs$
|
|
896
|
-
_init_historyUnreadCount = _applyDecs$
|
|
897
|
-
_init_hasHistoryMsg = _applyDecs$
|
|
898
|
-
_init_newMsgsUnReadCnt = _applyDecs$
|
|
899
|
-
_init_privateTargetUser = _applyDecs$
|
|
900
|
-
_init_chatLevel = _applyDecs$
|
|
901
|
-
_init_currentUserMap = _applyDecs$
|
|
902
|
-
_init_textMsg = _applyDecs$
|
|
903
|
-
_init_privateTargetList = _applyDecs$
|
|
904
|
-
_init_chatRoomState = _applyDecs$
|
|
905
|
-
|
|
1065
|
+
_ChatRoomStore = ChatRoomStore;
|
|
1066
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs(_ChatRoomStore, [[_mobx.observable, 1, "_userInfo"], [_mobx.observable, 1, "messageList"], [_mobx.observable, 1, "readMsgIndex"], [_mobx.observable, 1, "readIdx"], [_mobx.observable, 1, "viewIdx"], [_mobx.observable, 1, "historyUnreadCount"], [_mobx.observable, 1, "hasHistoryMsg"], [_mobx.observable, 1, "newMsgsUnReadCnt"], [_mobx.observable, 1, "privateTargetUser"], [_mobx.observable, 1, "chatLevel"], [_mobx.observable, 1, "currentUserMap"], [_mobx.observable, 1, "textMsg"], [_mobx.observable, 1, "privateTargetList"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "hasNewMsg"], [_mobx.observable, 1, "userCount"], [_mobx.observable, 1, "unReadMsgCount"], [_setLastScrollTopDecs, 18, "setLastScrollTop"], [_setMessageListDecs, 18, "setMessageList"], [_sendMessageDecs, 18, "sendMessage"], [_setUnReadMsgCountDecs, 18, "setUnReadMsgCount"], [_setHasNewMsgDecs, 18, "setHasNewMsg"], [_handleTextMessageReceivedDecs, 18, "_handleTextMessageReceived"], [_getUserCountDecs, 18, "getUserCount"], [_onRemoteUserUpdateDecs, 18, "_onRemoteUserUpdate"], [_refreshUserListDecs, 18, "_refreshUserList"], [_handleNewMsgDecs, 18, "handleNewMsg"], [_updateReadMsgIndexDecs, 18, "updateReadMsgIndex"], [_mobx.computed, 3, "isHost"], [_mobx.computed, 3, "isCohost"], [_mobx.computed, 3, "localIsManager"], [_initReadInfoDecs, 18, "initReadInfo"], [_updateHistoryUnreadCntDecs, 18, "updateHistoryUnreadCnt"], [_updateHasHistoryMsgDecs, 18, "updateHasHistoryMsg"], [_updateScrollInfoDecs, 18, "updateScrollInfo"], [_updateViewIdxDecs, 18, "updateViewIdx"], [_updateReadIdxDecs, 18, "updateReadIdx"], [_updateFirstMsgIdDecs, 18, "updateFirstMsgId"], [_updateHistoryUnReadCountDecs, 18, "updateHistoryUnReadCount"], [_updateListDecs, 18, "updateList"], [_updateMostRecentHeightDecs, 18, "updateMostRecentHeight"], [_updateMostRecentWidthDecs, 18, "updateMostRecentWidth"], [_patchHandleMsgDecs, 18, "patchHandleMsg"], [_forceNotifyMsgsDecs, 18, "forceNotifyMsgs"], [_resetComponentCacheDecs, 18, "resetComponentCache"], [_resetTargetUserDecs, 18, "resetTargetUser"], [_initChatLevelDecs, 18, "initChatLevel"], [_setTargetUserDecs, 18, "setTargetUser"], [_mobx.computed, 3, "targetUserIsOnline"], [_mobx.computed, 3, "remoteUsers"], [_decorator.bound, 2, "handleChatPermissionUpdate"], [_updateChatLevelDecs, 18, "updateChatLevel"], [_updateChatTextMsgDecs, 18, "updateChatTextMsg"], [_filterChatMemberDecs, 18, "filterChatMember"], [_hasSendMessagePermissionDecs, 18, "hasSendMessagePermission"], [_permitPrivateChatDecs, 18, "permitPrivateChat"], [_handleToastDecs, 18, "handleToast"], [_mobx.computed, 3, "isHostOrCoHost"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"]], []).e, 18);
|
|
1067
|
+
_init__userInfo = _applyDecs$e2[0];
|
|
1068
|
+
_init_messageList = _applyDecs$e2[1];
|
|
1069
|
+
_init_readMsgIndex = _applyDecs$e2[2];
|
|
1070
|
+
_init_readIdx = _applyDecs$e2[3];
|
|
1071
|
+
_init_viewIdx = _applyDecs$e2[4];
|
|
1072
|
+
_init_historyUnreadCount = _applyDecs$e2[5];
|
|
1073
|
+
_init_hasHistoryMsg = _applyDecs$e2[6];
|
|
1074
|
+
_init_newMsgsUnReadCnt = _applyDecs$e2[7];
|
|
1075
|
+
_init_privateTargetUser = _applyDecs$e2[8];
|
|
1076
|
+
_init_chatLevel = _applyDecs$e2[9];
|
|
1077
|
+
_init_currentUserMap = _applyDecs$e2[10];
|
|
1078
|
+
_init_textMsg = _applyDecs$e2[11];
|
|
1079
|
+
_init_privateTargetList = _applyDecs$e2[12];
|
|
1080
|
+
_init_chatRoomState = _applyDecs$e2[13];
|
|
1081
|
+
_init_hasNewMsg = _applyDecs$e2[14];
|
|
1082
|
+
_init_userCount = _applyDecs$e2[15];
|
|
1083
|
+
_init_unReadMsgCount = _applyDecs$e2[16];
|
|
1084
|
+
_initProto2 = _applyDecs$e2[17];
|
|
906
1085
|
function isManager(role) {
|
|
907
1086
|
return role === _type.FcrUserRole.HOST || role === _type.FcrUserRole.COHOST;
|
|
908
1087
|
}
|