fcr-ui-scene 3.4.0 → 3.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ scenes/base.d.ts +10 -0
- package/lib/ scenes/base.js +75 -0
- package/lib/ scenes/main-scene.d.ts +43 -0
- package/lib/ scenes/main-scene.js +368 -0
- package/lib/ scenes/waiting-scene.d.ts +31 -0
- package/lib/ scenes/waiting-scene.js +119 -0
- package/lib/base.d.ts +40 -5
- package/lib/base.js +237 -22
- package/lib/common/device-store.d.ts +12 -22
- package/lib/common/device-store.js +154 -247
- package/lib/common/device-stream-store.d.ts +4 -22
- package/lib/common/device-stream-store.js +113 -297
- package/lib/common/event-store.d.ts +10 -35
- package/lib/common/event-store.js +13 -64
- package/lib/common/room-store.js +4 -4
- package/lib/common/security-store.d.ts +26 -44
- package/lib/common/security-store.js +372 -329
- package/lib/common/type.d.ts +8 -0
- package/lib/common/type.js +6 -0
- package/lib/creator.d.ts +1 -1
- package/lib/creator.js +4 -9
- package/lib/electron/app.js +25 -7
- package/lib/electron/bootstrap-dev.js +0 -7
- package/lib/electron/bootstrap-sdk.js +11 -2
- package/lib/electron/injections.d.ts +3 -1
- package/lib/electron/injections.js +17 -2
- package/lib/electron/logger.d.ts +0 -4
- package/lib/electron/logger.js +2 -5
- package/lib/electron/main.js +1 -1
- package/lib/electron/plugins/devtool-shortcut.js +10 -1
- package/lib/electron/plugins/meeting-state.js +1 -1
- package/lib/electron/preload.js +3 -1
- package/lib/error-fallback.css +62 -0
- package/lib/error-fallback.d.ts +2 -0
- package/lib/error-fallback.js +19 -0
- package/lib/fragments/control-bar/cloud-recording-buttons.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +1 -44
- package/lib/fragments/control-bar/control-bar-store.js +80 -457
- package/lib/fragments/control-bar/device/index.js +3 -5
- package/lib/fragments/control-bar/index.css +10 -15
- package/lib/fragments/control-bar/index.js +0 -24
- package/lib/fragments/control-bar/more-actions/index.css +0 -53
- package/lib/fragments/control-bar/more-actions/index.js +38 -73
- package/lib/fragments/control-bar/security-content/index.css +0 -75
- package/lib/fragments/control-bar/security-content/index.js +19 -105
- package/lib/fragments/control-bar/share-state-nav/index.js +1 -1
- package/lib/fragments/control-bar/view.js +8 -23
- package/lib/fragments/live-streaming/store.d.ts +1 -1
- package/lib/fragments/live-streaming/store.js +1 -1
- package/lib/fragments/live-streaming/view.js +2 -4
- package/lib/fragments/share-screen-selection/selection-store.d.ts +1 -1
- package/lib/fragments/share-screen-selection/selection-store.js +1 -1
- package/lib/fragments/share-screen-selection/view.js +20 -20
- package/lib/fragments/toolbar/components/eraser-picker.js +1 -1
- package/lib/fragments/toolbar/components/pen-picker.js +1 -1
- package/lib/fragments/toolbar/components/shape-picker.js +1 -1
- package/lib/fragments/toolbar/components/wrapper.js +1 -1
- package/lib/fragments/toolbar/hooks.js +1 -1
- package/lib/fragments/toolbar/store.d.ts +1 -1
- package/lib/global.css +5 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -4
- package/lib/login-confirm-dialog.d.ts +1 -0
- package/lib/login-confirm-dialog.js +7 -2
- package/lib/modules/Interpreter/action/delete-btn/index.d.ts +2 -2
- package/lib/modules/Interpreter/action/edit-btn/index.d.ts +0 -1
- package/lib/modules/Interpreter/action/edit-btn/index.js +2 -4
- package/lib/modules/Interpreter/action/switch-btn/index.css +3 -0
- package/lib/modules/Interpreter/action/switch-btn/index.d.ts +2 -4
- package/lib/modules/Interpreter/action/switch-btn/index.js +8 -8
- package/lib/modules/Interpreter/dialog-content/index.d.ts +2 -2
- package/lib/modules/Interpreter/dialog-content/index.js +4 -4
- package/lib/modules/Interpreter/footer/index.css +4 -3
- package/lib/modules/Interpreter/index.d.ts +11 -19
- package/lib/modules/Interpreter/index.js +23 -24
- package/lib/modules/Interpreter/interpreter-list/index.css +5 -1
- package/lib/modules/Interpreter/interpreter-list/index.d.ts +1 -0
- package/lib/modules/Interpreter/interpreter-list/index.js +3 -1
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.css +0 -6
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-language/index.js +3 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.css +1 -3
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.d.ts +2 -7
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/index.js +66 -92
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +6 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/components/pick-user/option-Item.js +58 -0
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.d.ts +2 -2
- package/lib/modules/Interpreter/interpreter-list/interpreter-item/index.js +2 -2
- package/lib/modules/Interpreter/store.d.ts +24 -78
- package/lib/modules/Interpreter/store.js +212 -1255
- package/lib/modules/Interpreter/type.d.ts +24 -0
- package/lib/modules/Interpreter/type.js +12 -0
- package/lib/modules/Interpreter/utils.d.ts +8 -0
- package/lib/modules/Interpreter/utils.js +81 -0
- package/lib/modules/Interpreter/view.d.ts +0 -1
- package/lib/modules/Interpreter/view.js +20 -6
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +1 -4
- package/lib/modules/action-bar/action-bar-collapes-items.js +14 -31
- package/lib/modules/action-bar/apps/useInterpreter.js +4 -2
- package/lib/modules/action-bar/chat/index.js +8 -8
- package/lib/modules/action-bar/components/apps/app-item/index.css +34 -0
- package/lib/modules/action-bar/components/apps/app-item/index.d.ts +3 -0
- package/lib/modules/action-bar/components/apps/app-item/index.js +61 -0
- package/lib/modules/action-bar/components/apps/appitems.d.ts +3 -0
- package/lib/modules/action-bar/components/apps/appitems.js +45 -0
- package/lib/modules/action-bar/components/apps/index.css +8 -0
- package/lib/modules/action-bar/components/apps/index.d.ts +4 -0
- package/lib/modules/action-bar/components/apps/index.js +56 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.d.ts +9 -0
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +29 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.d.ts +10 -0
- package/lib/modules/action-bar/components/apps/useBeautyBackground.js +36 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.d.ts +14 -0
- package/lib/modules/action-bar/components/apps/useInterpreter.js +37 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.d.ts +16 -0
- package/lib/modules/action-bar/components/apps/useLiveStreaming.js +41 -0
- package/lib/modules/action-bar/components/board/index.d.ts +4 -0
- package/lib/modules/action-bar/components/board/index.js +34 -0
- package/lib/modules/action-bar/components/breakout-room/index.d.ts +4 -0
- package/lib/modules/action-bar/components/breakout-room/index.js +32 -0
- package/lib/modules/action-bar/components/chat/index.css +80 -0
- package/lib/modules/action-bar/components/chat/index.d.ts +5 -0
- package/lib/modules/action-bar/components/chat/index.js +154 -0
- package/lib/modules/action-bar/components/collapse/index.d.ts +8 -0
- package/lib/modules/action-bar/components/collapse/index.js +222 -0
- package/lib/modules/action-bar/components/device/index.css +162 -0
- package/lib/modules/action-bar/components/device/index.d.ts +8 -0
- package/lib/modules/action-bar/components/device/index.js +611 -0
- package/lib/modules/action-bar/components/interpreter/index.d.ts +2 -0
- package/lib/modules/action-bar/components/interpreter/index.js +41 -0
- package/lib/modules/action-bar/components/item/index.d.ts +9 -0
- package/lib/modules/action-bar/components/item/index.js +164 -0
- package/lib/modules/action-bar/components/item.d.ts +27 -0
- package/lib/modules/action-bar/components/item.js +164 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/assign-host.js +64 -0
- package/lib/modules/action-bar/components/leave/index.css +126 -0
- package/lib/modules/action-bar/components/leave/index.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/index.js +144 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +3 -0
- package/lib/modules/action-bar/components/leave/leave-meeting.js +153 -0
- package/lib/modules/action-bar/components/live-streaming/index.d.ts +4 -0
- package/lib/modules/action-bar/components/live-streaming/index.js +39 -0
- package/lib/modules/action-bar/components/more/index.css +114 -0
- package/lib/modules/action-bar/components/more/index.d.ts +5 -0
- package/lib/modules/action-bar/components/more/index.js +87 -0
- package/lib/modules/action-bar/components/more/poppover-content.d.ts +5 -0
- package/lib/modules/action-bar/components/more/poppover-content.js +423 -0
- package/lib/modules/action-bar/components/notification-bar/assets/dome.png +0 -0
- package/lib/modules/action-bar/components/notification-bar/assets/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/components/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/components/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/components/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/components/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/components/participants/index.css +21 -0
- package/lib/modules/action-bar/components/participants/index.d.ts +5 -0
- package/lib/modules/action-bar/components/participants/index.js +83 -0
- package/lib/modules/action-bar/components/placement/index.d.ts +4 -0
- package/lib/modules/action-bar/components/placement/index.js +18 -0
- package/lib/modules/action-bar/components/record/index.css +39 -0
- package/lib/modules/action-bar/components/record/index.d.ts +5 -0
- package/lib/modules/action-bar/components/record/index.js +166 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.d.ts +3 -0
- package/lib/modules/action-bar/components/record/stop-record-dialog.js +48 -0
- package/lib/modules/action-bar/components/respond/index.d.ts +4 -0
- package/lib/modules/action-bar/components/respond/index.js +32 -0
- package/lib/modules/action-bar/components/screen-share/index.d.ts +4 -0
- package/lib/modules/action-bar/components/screen-share/index.js +106 -0
- package/lib/modules/action-bar/components/screen-share/submenu.d.ts +1 -0
- package/lib/modules/action-bar/components/screen-share/submenu.js +177 -0
- package/lib/modules/action-bar/components/security/index.d.ts +4 -0
- package/lib/modules/action-bar/components/security/index.js +60 -0
- package/lib/modules/action-bar/components/settings/index.d.ts +4 -0
- package/lib/modules/action-bar/components/settings/index.js +42 -0
- package/lib/modules/action-bar/components/smaller/index.d.ts +1 -0
- package/lib/modules/action-bar/components/smaller/index.js +52 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.js +215 -0
- package/lib/modules/action-bar/components/trigger-output-language/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.css +86 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.d.ts +2 -0
- package/lib/modules/action-bar/components/trigger-output-language/index.js +230 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/index.d.ts +8 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.js +37 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.d.ts +3 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/guide-tooltip/index.js +70 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.d.ts +5 -0
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +209 -0
- package/lib/modules/action-bar/device/index.css +2 -7
- package/lib/modules/action-bar/device/index.js +24 -22
- package/lib/modules/action-bar/enums.d.ts +23 -0
- package/lib/modules/action-bar/enums.js +35 -0
- package/lib/modules/action-bar/index.css +23 -1
- package/lib/modules/action-bar/index.d.ts +36 -26
- package/lib/modules/action-bar/index.dev.d.ts +0 -1
- package/lib/modules/action-bar/index.dev.js +94 -100
- package/lib/modules/action-bar/index.js +46 -18
- package/lib/modules/action-bar/leave/assign-host.d.ts +0 -3
- package/lib/modules/action-bar/leave/assign-host.js +4 -2
- package/lib/modules/action-bar/leave/index.css +0 -10
- package/lib/modules/action-bar/leave/index.js +34 -84
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +1 -13
- package/lib/modules/action-bar/leave/leave-meeting.js +19 -37
- package/lib/modules/action-bar/live-streaming/index.js +3 -3
- package/lib/modules/action-bar/more/index.js +6 -9
- package/lib/modules/action-bar/more/poppover-content.js +16 -37
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.css +58 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.d.ts +8 -0
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.js +100 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.css +56 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.d.ts +5 -0
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.js +33 -0
- package/lib/modules/action-bar/notification-bar/dome.png +0 -0
- package/lib/modules/action-bar/notification-bar/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/notification-bar/index.css +74 -0
- package/lib/modules/action-bar/notification-bar/index.d.ts +2 -0
- package/lib/modules/action-bar/notification-bar/index.js +99 -0
- package/lib/modules/action-bar/participants/index.css +0 -12
- package/lib/modules/action-bar/participants/index.js +16 -23
- package/lib/modules/action-bar/record/index.js +4 -4
- package/lib/modules/action-bar/screen-share/index.js +5 -9
- package/lib/modules/action-bar/screen-share/submenu.js +26 -20
- package/lib/modules/action-bar/security/drop-menu.js +22 -137
- package/lib/modules/action-bar/security/index.js +6 -11
- package/lib/modules/action-bar/settings/index.js +4 -4
- package/lib/modules/action-bar/smaller.js +4 -4
- package/lib/modules/action-bar/store.d.ts +84 -99
- package/lib/modules/action-bar/store.js +545 -699
- package/lib/modules/action-bar/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.css +86 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +15 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.js +220 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +10 -0
- package/lib/modules/action-bar/trigger-output-language-room/constant.js +8 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.css +22 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +14 -0
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.js +75 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +4 -0
- package/lib/modules/action-bar/trigger-output-language-room/index.js +98 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +66 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +5 -0
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +36 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +12 -0
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +138 -0
- package/lib/modules/action-bar/types.d.ts +94 -0
- package/lib/modules/action-bar/types.js +6 -0
- package/lib/modules/action-bar/view.d.ts +1 -2
- package/lib/modules/action-bar/view.js +14 -14
- package/lib/modules/audio-stream/index.d.ts +22 -23
- package/lib/modules/audio-stream/index.js +79 -85
- package/lib/modules/chat/chat-bar/index.css +0 -1
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +37 -47
- package/lib/modules/chat/chat-room-store.d.ts +135 -0
- package/lib/modules/chat/chat-room-store.js +954 -0
- package/lib/modules/chat/chat-select/index.css +4 -21
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +4 -18
- package/lib/modules/chat/chat.d.ts +2 -1
- package/lib/modules/chat/chat.js +127 -194
- package/lib/modules/chat/components/chat-action/index.d.ts +1 -0
- package/lib/modules/chat/components/chat-action/index.js +28 -0
- package/lib/modules/chat/components/chat-bar/index.css +85 -0
- package/lib/modules/chat/components/chat-bar/index.d.ts +3 -0
- package/lib/modules/chat/components/chat-bar/index.js +145 -0
- package/lib/modules/chat/components/chat-select/index.css +185 -0
- package/lib/modules/chat/components/chat-select/index.d.ts +3 -0
- package/lib/modules/chat/components/chat-select/index.js +237 -0
- package/lib/modules/chat/components/message-list/index.d.ts +4 -0
- package/lib/modules/chat/components/message-list/index.js +650 -0
- package/lib/modules/chat/index.css +10 -0
- package/lib/modules/chat/index.d.ts +13 -15
- package/lib/modules/chat/index.dev.d.ts +0 -1
- package/lib/modules/chat/index.dev.js +72 -62
- package/lib/modules/chat/index.js +48 -38
- package/lib/modules/chat/message-list.js +51 -67
- package/lib/modules/chat/mock.d.ts +1 -1
- package/lib/modules/chat/store.d.ts +17 -162
- package/lib/modules/chat/store.js +95 -963
- package/lib/modules/chat/types.d.ts +70 -0
- package/lib/modules/chat/types.js +17 -0
- package/lib/modules/chat/view.d.ts +10 -0
- package/lib/modules/chat/view.js +372 -0
- package/lib/modules/components/device-control/components/audio-menu/index.js +6 -6
- package/lib/modules/components/device-control/components/microphone/index.js +7 -7
- package/lib/modules/components/device-control/index.css +3 -0
- package/lib/modules/components/device-control/store.d.ts +11 -12
- package/lib/modules/components/device-control/store.js +46 -49
- package/lib/modules/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/components/dialog-container/component/body.js +47 -0
- package/lib/modules/components/dialog-container/index.css +78 -0
- package/lib/modules/components/dialog-container/index.d.ts +11 -0
- package/lib/modules/components/dialog-container/index.js +110 -0
- package/lib/modules/components/leave-meeting/components/assign-host.d.ts +3 -0
- package/lib/modules/components/leave-meeting/components/assign-host.js +70 -0
- package/lib/modules/components/leave-meeting/components/index.css +125 -0
- package/lib/modules/components/leave-meeting/index.d.ts +4 -0
- package/lib/modules/components/leave-meeting/index.js +147 -0
- package/lib/modules/components/leave-meeting/store.d.ts +31 -0
- package/lib/modules/components/leave-meeting/store.js +292 -0
- package/lib/modules/components/member-window/index.css +419 -0
- package/lib/modules/components/member-window/index.d.ts +76 -0
- package/lib/modules/components/member-window/index.js +894 -0
- package/lib/modules/components/security-menu/index.css +9 -0
- package/lib/modules/components/security-menu/index.d.ts +2 -0
- package/lib/modules/components/security-menu/index.js +108 -58
- package/lib/modules/components/tab-frame/index.css +40 -0
- package/lib/modules/components/tab-frame/index.d.ts +12 -0
- package/lib/modules/components/tab-frame/index.js +78 -0
- package/lib/modules/connection-gateway/components/computer/index.css +1 -0
- package/lib/modules/connection-gateway/components/computer/index.js +4 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +1 -1
- package/lib/modules/connection-gateway/components/phone/index.css +1 -1
- package/lib/modules/connection-gateway/components/phone/index.js +2 -2
- package/lib/modules/connection-gateway/components/tabs/index.js +1 -2
- package/lib/modules/connection-gateway/enums.d.ts +4 -0
- package/lib/modules/connection-gateway/enums.js +12 -0
- package/lib/modules/connection-gateway/index.d.ts +13 -11
- package/lib/modules/connection-gateway/index.js +25 -15
- package/lib/modules/connection-gateway/store.d.ts +19 -23
- package/lib/modules/connection-gateway/store.js +61 -53
- package/lib/modules/connection-gateway/types.d.ts +4 -0
- package/lib/modules/connection-gateway/types.js +6 -0
- package/lib/modules/connection-gateway/view.js +21 -4
- package/lib/modules/control-bar/components/cloud-recording-buttons.js +1 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +30 -25
- package/lib/modules/control-bar/components/more-actions/index.css +18 -0
- package/lib/modules/control-bar/components/more-actions/index.d.ts +1 -5
- package/lib/modules/control-bar/components/more-actions/index.js +58 -9
- package/lib/modules/control-bar/components/share-state-nav/index.d.ts +1 -7
- package/lib/modules/control-bar/components/share-state-nav/index.js +2 -1
- package/lib/modules/control-bar/components/stop-live-streaming/stop-button.d.ts +1 -1
- package/lib/modules/control-bar/components/stop-live-streaming/stop-button.js +2 -2
- package/lib/modules/control-bar/components/transfer-position-icon/index.d.ts +1 -10
- package/lib/modules/control-bar/components/transfer-position-icon/index.js +7 -12
- package/lib/modules/control-bar/enums.d.ts +21 -0
- package/lib/modules/control-bar/enums.js +31 -0
- package/lib/modules/control-bar/index.d.ts +30 -21
- package/lib/modules/control-bar/index.js +46 -36
- package/lib/modules/control-bar/store.d.ts +36 -37
- package/lib/modules/control-bar/store.js +188 -280
- package/lib/modules/control-bar/types.d.ts +20 -0
- package/lib/modules/control-bar/types.js +6 -0
- package/lib/modules/control-bar/view.js +83 -42
- package/lib/modules/device-pretest/index.js +4 -4
- package/lib/modules/device-pretest/settings/video-settings-basic.js +1 -1
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +1 -1
- package/lib/modules/device-pretest/store.d.ts +8 -9
- package/lib/modules/device-pretest/store.js +52 -36
- package/lib/modules/dialog/components/Interpreter/electron.js +22 -38
- package/lib/modules/dialog/components/Interpreter/index.js +14 -43
- package/lib/modules/dialog/components/chat/electron.d.ts +1 -1
- package/lib/modules/dialog/components/chat/electron.js +21 -19
- package/lib/modules/dialog/components/chat/index.d.ts +1 -4
- package/lib/modules/dialog/components/chat/index.js +35 -41
- package/lib/modules/dialog/components/confirm/electron.d.ts +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +68 -38
- package/lib/modules/dialog/components/confirm/index.js +7 -8
- package/lib/modules/dialog/components/connection-gateway/electron.d.ts +1 -1
- package/lib/modules/dialog/components/connection-gateway/electron.js +13 -34
- package/lib/modules/dialog/components/connection-gateway/index.css +2 -0
- package/lib/modules/dialog/components/connection-gateway/index.d.ts +3 -2
- package/lib/modules/dialog/components/connection-gateway/index.js +26 -58
- package/lib/modules/dialog/components/connection-gateway/tabs.d.ts +6 -0
- package/lib/modules/dialog/components/connection-gateway/tabs.js +44 -0
- package/lib/modules/dialog/components/control-bar/index.d.ts +5 -1
- package/lib/modules/dialog/components/control-bar/index.js +123 -11
- package/lib/modules/dialog/components/device-setting/electron.js +7 -25
- package/lib/modules/dialog/components/device-setting/index.js +13 -41
- package/lib/modules/dialog/components/dialog-container/component/body.d.ts +7 -0
- package/lib/modules/dialog/components/dialog-container/component/body.js +77 -0
- package/lib/modules/dialog/components/dialog-container/index.css +81 -0
- package/lib/modules/dialog/components/dialog-container/index.d.ts +16 -0
- package/lib/modules/dialog/components/dialog-container/index.js +112 -0
- package/lib/modules/dialog/components/invite/index.js +44 -38
- package/lib/modules/dialog/components/live-streaming/index.js +23 -54
- package/lib/modules/dialog/components/participant/electron.js +12 -19
- package/lib/modules/dialog/components/participant/index.js +37 -27
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +3 -6
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +4 -14
- package/lib/modules/dialog/components/share-screen-selection/index.js +26 -7
- package/lib/modules/dialog/components/system-preference/electron.js +6 -9
- package/lib/modules/dialog/components/system-preference/index.js +4 -15
- package/lib/modules/dialog/components/toast/index.js +9 -13
- package/lib/modules/dialog/components/video-window/index.d.ts +2 -0
- package/lib/modules/dialog/components/video-window/index.js +148 -0
- package/lib/modules/dialog/components/whiteboard/index.js +2 -2
- package/lib/modules/dialog/dialogs.d.ts +2 -5
- package/lib/modules/dialog/dialogs.js +2 -156
- package/lib/modules/dialog/hooks/useElectron.d.ts +4 -20
- package/lib/modules/dialog/hooks/useElectron.js +127 -29
- package/lib/modules/dialog/index.css +0 -2
- package/lib/modules/dialog/index.d.ts +28 -17
- package/lib/modules/dialog/index.js +62 -6
- package/lib/modules/dialog/store.d.ts +43 -41
- package/lib/modules/dialog/store.js +158 -201
- package/lib/modules/dialog/types/index.d.ts +70 -0
- package/lib/modules/event-confirm/index.css +1 -1
- package/lib/modules/event-confirm/index.d.ts +13 -6
- package/lib/modules/event-confirm/index.js +28 -11
- package/lib/modules/event-confirm/store.d.ts +9 -3
- package/lib/modules/event-confirm/store.js +16 -7
- package/lib/modules/event-confirm/view.js +9 -2
- package/lib/modules/event-toast/index.d.ts +7 -6
- package/lib/modules/event-toast/index.js +19 -8
- package/lib/modules/event-toast/store.d.ts +8 -3
- package/lib/modules/event-toast/store.js +15 -6
- package/lib/modules/invite/components/error-tips.d.ts +4 -0
- package/lib/modules/invite/components/error-tips.js +18 -0
- package/lib/modules/invite/components/pstn-invite.d.ts +2 -0
- package/lib/modules/invite/components/pstn-invite.js +297 -0
- package/lib/modules/invite/components/voip-invite.d.ts +1 -0
- package/lib/modules/invite/components/voip-invite.js +276 -0
- package/lib/modules/invite/enums.d.ts +22 -0
- package/lib/modules/invite/enums.js +33 -0
- package/lib/modules/invite/index.d.ts +7 -8
- package/lib/modules/invite/index.js +17 -15
- package/lib/modules/invite/pstn-invite.js +9 -7
- package/lib/modules/invite/store.d.ts +11 -26
- package/lib/modules/invite/store.js +55 -25
- package/lib/modules/invite/types.d.ts +14 -0
- package/lib/modules/invite/types.js +6 -0
- package/lib/modules/invite/view.js +19 -27
- package/lib/modules/invite/voip-invite.js +3 -2
- package/lib/modules/layout/components/Aside.js +45 -18
- package/lib/modules/layout/components/Carousel.js +2 -2
- package/lib/modules/layout/components/Gallery.js +1 -1
- package/lib/modules/layout/components/Layout.js +7 -4
- package/lib/modules/layout/components/index.css +6 -1
- package/lib/modules/layout/components/index.d.ts +1 -1
- package/lib/modules/layout/components/index.js +4 -4
- package/lib/modules/layout/components/who-is-speaking.d.ts +2 -0
- package/lib/modules/layout/components/who-is-speaking.js +60 -0
- package/lib/modules/layout/index.d.ts +26 -4
- package/lib/modules/layout/index.dev.d.ts +0 -1
- package/lib/modules/layout/index.dev.js +312 -386
- package/lib/modules/layout/index.js +33 -17
- package/lib/modules/layout/member-window/index.css +10 -95
- package/lib/modules/layout/member-window/index.d.ts +3 -10
- package/lib/modules/layout/member-window/index.js +115 -214
- package/lib/modules/layout/store.d.ts +61 -71
- package/lib/modules/layout/store.js +311 -579
- package/lib/modules/layout/video-window-datasource.js +11 -3
- package/lib/modules/layout/view.d.ts +2 -0
- package/lib/modules/layout/view.js +127 -2
- package/lib/modules/live-streaming/index.d.ts +15 -7
- package/lib/modules/live-streaming/index.dev.js +13 -13
- package/lib/modules/live-streaming/index.js +20 -15
- package/lib/modules/live-streaming/store.d.ts +21 -14
- package/lib/modules/live-streaming/store.js +84 -144
- package/lib/modules/live-streaming/view.js +2 -2
- package/lib/modules/notification/index.css +1 -0
- package/lib/modules/notification/index.d.ts +9 -11
- package/lib/modules/notification/index.js +21 -14
- package/lib/modules/notification/interpreter-status/index.js +1 -2
- package/lib/modules/notification/store.d.ts +5 -11
- package/lib/modules/notification/store.js +12 -62
- package/lib/modules/notification/view.d.ts +5 -3
- package/lib/modules/notification/view.js +8 -5
- package/lib/modules/offscreen-pulling/index.js +1 -1
- package/lib/modules/participant/attendee/index.css +52 -0
- package/lib/modules/participant/attendee/index.d.ts +5 -8
- package/lib/modules/participant/attendee/index.js +17 -62
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.d.ts +6 -0
- package/lib/modules/participant/components/attendee/components/microphone-indicator/index.js +28 -0
- package/lib/modules/participant/components/attendee/components/user-avatar/index.d.ts +7 -0
- package/lib/modules/participant/components/attendee/components/user-avatar/index.js +39 -0
- package/lib/modules/participant/components/attendee/index.css +69 -0
- package/lib/modules/participant/components/attendee/index.d.ts +4 -0
- package/lib/modules/participant/components/attendee/index.js +337 -0
- package/lib/modules/participant/components/can-moveable/index.d.ts +1 -0
- package/lib/modules/participant/components/can-moveable/index.js +68 -0
- package/lib/modules/participant/components/drop-menu/index.css +1 -0
- package/lib/modules/participant/components/drop-menu/index.js +17 -17
- package/lib/modules/participant/components/footer/buttons.d.ts +2 -3
- package/lib/modules/participant/components/footer/buttons.js +2 -3
- package/lib/modules/participant/components/footer/index.js +2 -2
- package/lib/modules/participant/components/mute-all/index.d.ts +3 -4
- package/lib/modules/participant/components/mute-all/index.js +31 -44
- package/lib/modules/participant/components/operate-waitingroom-member/index.d.ts +2 -0
- package/lib/modules/participant/components/operate-waitingroom-member/index.js +48 -0
- package/lib/modules/participant/components/participants/index.js +27 -50
- package/lib/modules/participant/components/user-action/index.d.ts +17 -0
- package/lib/modules/participant/components/user-action/index.js +169 -0
- package/lib/modules/participant/index.css +5 -0
- package/lib/modules/participant/index.d.ts +34 -22
- package/lib/modules/participant/index.dev.d.ts +0 -1
- package/lib/modules/participant/index.dev.js +87 -105
- package/lib/modules/participant/index.js +39 -13
- package/lib/modules/participant/member-list-data-source.d.ts +4 -1
- package/lib/modules/participant/member-list-data-source.js +58 -31
- package/lib/modules/participant/room-control-drop-menu/index.css +0 -37
- package/lib/modules/participant/store.d.ts +59 -39
- package/lib/modules/participant/store.js +330 -307
- package/lib/modules/participant/type.d.ts +45 -1
- package/lib/modules/participant/type.js +15 -1
- package/lib/modules/pc-audio-connect/index.css +12 -0
- package/lib/modules/pc-audio-connect/index.d.ts +22 -0
- package/lib/modules/pc-audio-connect/index.js +68 -0
- package/lib/modules/pc-audio-connect/store.d.ts +46 -0
- package/lib/modules/pc-audio-connect/store.js +301 -0
- package/lib/modules/pc-audio-connect/types.d.ts +0 -0
- package/lib/modules/pc-audio-connect/types.js +1 -0
- package/lib/modules/pc-audio-connect/view.d.ts +3 -0
- package/lib/modules/pc-audio-connect/view.js +66 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.css +36 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.d.ts +10 -0
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +77 -0
- package/lib/modules/phone-audio-connect/components/calling/index.css +72 -0
- package/lib/modules/phone-audio-connect/components/calling/index.d.ts +7 -0
- package/lib/modules/phone-audio-connect/components/calling/index.js +58 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.css +10 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.d.ts +5 -0
- package/lib/modules/phone-audio-connect/components/remeber/index.js +24 -0
- package/lib/modules/phone-audio-connect/components/useing/index.css +46 -0
- package/lib/modules/phone-audio-connect/components/useing/index.d.ts +3 -0
- package/lib/modules/phone-audio-connect/components/useing/index.js +36 -0
- package/lib/modules/phone-audio-connect/enums.d.ts +4 -0
- package/lib/modules/phone-audio-connect/enums.js +12 -0
- package/lib/modules/phone-audio-connect/index.css +56 -0
- package/lib/modules/phone-audio-connect/index.d.ts +16 -0
- package/lib/modules/phone-audio-connect/index.js +63 -0
- package/lib/modules/phone-audio-connect/store.d.ts +46 -0
- package/lib/modules/phone-audio-connect/store.js +320 -0
- package/lib/modules/phone-audio-connect/types.d.ts +4 -0
- package/lib/modules/phone-audio-connect/types.js +6 -0
- package/lib/modules/phone-audio-connect/view.d.ts +3 -0
- package/lib/modules/phone-audio-connect/view.js +184 -0
- package/lib/modules/setting/audio-settings/audio-settings.js +18 -15
- package/lib/modules/setting/audio-settings/index.css +26 -1
- package/lib/modules/setting/general-settings/index.css +1 -1
- package/lib/modules/setting/index.css +2 -1
- package/lib/modules/setting/index.d.ts +25 -18
- package/lib/modules/setting/index.dev.d.ts +0 -1
- package/lib/modules/setting/index.dev.js +120 -72
- package/lib/modules/setting/index.js +35 -9
- package/lib/modules/setting/minutes-settings/minutes-settings.js +1 -1
- package/lib/modules/setting/state/index.js +3 -3
- package/lib/modules/setting/store.d.ts +45 -24
- package/lib/modules/setting/store.js +143 -124
- package/lib/modules/setting/translate-settings/index.css +3 -1
- package/lib/modules/setting/translate-settings/translate-settings.js +3 -3
- package/lib/modules/setting/video-settings/index.css +5 -2
- package/lib/modules/setting/video-settings/video-settings-basic.js +19 -22
- package/lib/modules/setting/view.js +6 -35
- package/lib/modules/share-screen/components/selection/index.css +70 -0
- package/lib/modules/share-screen/components/selection/index.d.ts +2 -0
- package/lib/modules/share-screen/components/selection/index.js +267 -0
- package/lib/modules/share-screen/components/share-state-bar/index.css +76 -0
- package/lib/modules/share-screen/components/share-state-bar/index.d.ts +4 -0
- package/lib/modules/share-screen/components/share-state-bar/index.js +98 -0
- package/lib/modules/share-screen/index.d.ts +15 -18
- package/lib/modules/share-screen/index.dev.d.ts +0 -1
- package/lib/modules/share-screen/index.dev.js +90 -90
- package/lib/modules/share-screen/index.js +22 -22
- package/lib/modules/share-screen/selection/index.css +0 -2
- package/lib/modules/share-screen/selection/index.js +40 -51
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/share-screen/store.d.ts +36 -32
- package/lib/modules/share-screen/store.js +264 -253
- package/lib/modules/share-screen/types.d.ts +27 -0
- package/lib/modules/share-screen/types.js +6 -0
- package/lib/modules/share-screen/view.js +1 -1
- package/lib/modules/sound-effect/index.d.ts +9 -15
- package/lib/modules/sound-effect/index.js +72 -41
- package/lib/modules/sound-effect/sound-effect-player.js +1 -1
- package/lib/modules/state-bar/index.css +13 -2
- package/lib/modules/state-bar/index.d.ts +16 -17
- package/lib/modules/state-bar/index.dev.d.ts +0 -1
- package/lib/modules/state-bar/index.dev.js +78 -83
- package/lib/modules/state-bar/index.js +23 -34
- package/lib/modules/state-bar/layout-config.js +1 -1
- package/lib/modules/state-bar/meeting-details.js +24 -12
- package/lib/modules/state-bar/meeting-network-state.css +1 -1
- package/lib/modules/state-bar/meeting-network-state.js +1 -1
- package/lib/modules/state-bar/recording.js +7 -4
- package/lib/modules/state-bar/store.d.ts +20 -10
- package/lib/modules/state-bar/store.js +84 -87
- package/lib/modules/state-bar/view.js +3 -3
- package/lib/modules/video-window/deviceState/index.d.ts +2 -2
- package/lib/modules/video-window/deviceState/index.js +4 -6
- package/lib/modules/video-window/index.css +1 -4
- package/lib/modules/video-window/index.d.ts +33 -6
- package/lib/modules/video-window/index.js +63 -15
- package/lib/modules/video-window/members/index.css +1 -0
- package/lib/modules/video-window/members/index.js +25 -11
- package/lib/modules/video-window/store.d.ts +58 -26
- package/lib/modules/video-window/store.js +166 -161
- package/lib/modules/waiting-room-layout/index.css +1 -3
- package/lib/modules/waiting-room-layout/index.d.ts +14 -5
- package/lib/modules/waiting-room-layout/index.js +34 -14
- package/lib/modules/waiting-room-layout/store.d.ts +6 -3
- package/lib/modules/waiting-room-layout/store.js +17 -15
- package/lib/modules/whiteboard/components/control-bar/store.d.ts +4 -4
- package/lib/modules/whiteboard/components/control-bar/store.js +8 -8
- package/lib/modules/whiteboard/index.d.ts +20 -25
- package/lib/modules/whiteboard/index.js +250 -224
- package/lib/modules/whiteboard/view.d.ts +2 -0
- package/lib/modules/whiteboard/view.js +49 -0
- package/lib/plugins/browser-runtime-plugin.js +5 -1
- package/lib/providers/chat-provider.d.ts +71 -0
- package/lib/providers/chat-provider.js +91 -0
- package/lib/providers/device-privilege-provider.d.ts +76 -0
- package/lib/providers/device-privilege-provider.js +415 -0
- package/lib/providers/device-provider.d.ts +404 -0
- package/lib/providers/device-provider.js +1829 -0
- package/lib/providers/device-stream-provider.d.ts +35 -0
- package/lib/providers/device-stream-provider.js +353 -0
- package/lib/providers/dialog-provider.d.ts +135 -0
- package/lib/providers/dialog-provider.js +204 -0
- package/lib/providers/event-provider.d.ts +88 -0
- package/lib/providers/event-provider.js +250 -0
- package/lib/providers/interpreter-provider.d.ts +236 -0
- package/lib/providers/interpreter-provider.js +1143 -0
- package/lib/providers/local-storage-provider.d.ts +17 -0
- package/lib/providers/local-storage-provider.js +31 -0
- package/lib/providers/message-provider.d.ts +69 -0
- package/lib/providers/message-provider.js +98 -0
- package/lib/providers/monitor-provider.d.ts +20 -0
- package/lib/providers/monitor-provider.js +29 -0
- package/lib/providers/phone-audio-provider.d.ts +131 -0
- package/lib/providers/phone-audio-provider.js +515 -0
- package/lib/providers/privilege-provider.d.ts +529 -0
- package/lib/providers/privilege-provider.js +782 -0
- package/lib/providers/renderer-provider.d.ts +85 -0
- package/lib/providers/renderer-provider.js +242 -0
- package/lib/providers/room-provider.d.ts +186 -0
- package/lib/providers/room-provider.js +1019 -0
- package/lib/providers/screen-share-provider.d.ts +65 -0
- package/lib/providers/screen-share-provider.js +238 -0
- package/lib/providers/session-provider.d.ts +56 -0
- package/lib/providers/session-provider.js +49 -0
- package/lib/runtime.d.ts +3 -1
- package/lib/scenes/base.d.ts +10 -0
- package/lib/scenes/base.js +75 -0
- package/lib/scenes/main-scene.d.ts +86 -0
- package/lib/scenes/main-scene.js +551 -0
- package/lib/scenes/waiting-scene.d.ts +61 -0
- package/lib/scenes/waiting-scene.js +236 -0
- package/lib/shared-data-source/chat-data.d.ts +14 -0
- package/lib/shared-data-source/chat-data.js +130 -0
- package/lib/shared-data-source/config.d.ts +16 -0
- package/lib/shared-data-source/config.js +21 -0
- package/lib/shared-data-source/device-privilege-data.d.ts +8 -0
- package/lib/shared-data-source/device-privilege-data.js +25 -0
- package/lib/shared-data-source/interpreter.d.ts +63 -0
- package/lib/shared-data-source/interpreter.js +248 -0
- package/lib/shared-data-source/layout-data.d.ts +29 -0
- package/lib/shared-data-source/layout-data.js +181 -0
- package/lib/shared-data-source/pin-data.d.ts +9 -0
- package/lib/shared-data-source/pin-data.js +24 -0
- package/lib/shared-data-source/setting.d.ts +32 -0
- package/lib/shared-data-source/setting.js +153 -0
- package/lib/shared-data-source/speaker-spotlight.d.ts +5 -0
- package/lib/shared-data-source/speaker-spotlight.js +15 -0
- package/lib/shared-data-source/video-window.d.ts +161 -0
- package/lib/shared-data-source/video-window.js +1202 -0
- package/lib/shared-data-source/waiting-room.d.ts +19 -0
- package/lib/shared-data-source/waiting-room.js +158 -0
- package/lib/translations/enUS.d.ts +43 -17
- package/lib/translations/enUS.js +59 -33
- package/lib/translations/zhCN.d.ts +43 -17
- package/lib/translations/zhCN.js +57 -31
- package/lib/type.d.ts +271 -1
- package/lib/type.js +67 -2
- package/lib/ui-manager.d.ts +20 -13
- package/lib/ui-manager.js +59 -874
- package/lib/ui-node.d.ts +25 -0
- package/lib/ui-node.js +156 -0
- package/lib/ui-scene.d.ts +6 -1
- package/lib/ui-scene.js +372 -42
- package/lib/utilities/constant.d.ts +63 -86
- package/lib/utilities/constant.js +151 -175
- package/lib/utilities/copyText.js +8 -7
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/privilege.d.ts +4 -0
- package/lib/utilities/privilege.js +31 -0
- package/lib/utilities/setting-config-storage.d.ts +12 -0
- package/lib/utilities/setting-config-storage.js +102 -0
- package/lib/utilities/tools.d.ts +37 -3
- package/lib/utilities/tools.js +144 -10
- package/lib/utilities/video-track-render-context.d.ts +3 -4
- package/lib/utilities/video-track-render-context.js +1 -1
- package/package.json +12 -11
- package/public/assets/fcr_leave2.svg +58 -0
- package/public/assets/full-screen-error-boundary-img.png +0 -0
- package/public/assets/leave-meeting.png +0 -0
- package/public/index.html +160 -13
|
@@ -7,94 +7,67 @@ require("core-js/modules/es.error.cause.js");
|
|
|
7
7
|
require("core-js/modules/es.error.to-string.js");
|
|
8
8
|
require("core-js/modules/es.array.is-array.js");
|
|
9
9
|
require("core-js/modules/es.date.to-primitive.js");
|
|
10
|
+
require("core-js/modules/es.function.bind.js");
|
|
10
11
|
require("core-js/modules/es.function.name.js");
|
|
12
|
+
require("core-js/modules/es.map.js");
|
|
11
13
|
require("core-js/modules/es.number.constructor.js");
|
|
12
14
|
require("core-js/modules/es.object.create.js");
|
|
13
|
-
require("core-js/modules/es.object.define-properties.js");
|
|
14
15
|
require("core-js/modules/es.object.define-property.js");
|
|
15
16
|
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
16
|
-
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
17
|
-
require("core-js/modules/es.object.keys.js");
|
|
18
17
|
require("core-js/modules/esnext.function.metadata.js");
|
|
18
|
+
require("core-js/modules/esnext.map.delete-all.js");
|
|
19
|
+
require("core-js/modules/esnext.map.emplace.js");
|
|
20
|
+
require("core-js/modules/esnext.map.every.js");
|
|
21
|
+
require("core-js/modules/esnext.map.filter.js");
|
|
22
|
+
require("core-js/modules/esnext.map.find.js");
|
|
23
|
+
require("core-js/modules/esnext.map.find-key.js");
|
|
24
|
+
require("core-js/modules/esnext.map.includes.js");
|
|
25
|
+
require("core-js/modules/esnext.map.key-of.js");
|
|
26
|
+
require("core-js/modules/esnext.map.map-keys.js");
|
|
27
|
+
require("core-js/modules/esnext.map.map-values.js");
|
|
28
|
+
require("core-js/modules/esnext.map.merge.js");
|
|
29
|
+
require("core-js/modules/esnext.map.reduce.js");
|
|
30
|
+
require("core-js/modules/esnext.map.some.js");
|
|
31
|
+
require("core-js/modules/esnext.map.update.js");
|
|
19
32
|
require("core-js/modules/esnext.symbol.metadata.js");
|
|
20
33
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
21
34
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
22
35
|
Object.defineProperty(exports, "__esModule", {
|
|
23
36
|
value: true
|
|
24
37
|
});
|
|
25
|
-
exports["default"] = exports.
|
|
38
|
+
exports["default"] = exports.StoreContext = void 0;
|
|
26
39
|
exports.isManager = isManager;
|
|
27
40
|
exports.sortUsers = sortUsers;
|
|
28
|
-
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
29
|
-
require("core-js/modules/es.array.filter.js");
|
|
30
|
-
require("core-js/modules/es.array.find.js");
|
|
31
41
|
require("core-js/modules/es.array.for-each.js");
|
|
32
|
-
require("core-js/modules/es.array.from.js");
|
|
33
42
|
require("core-js/modules/es.array.iterator.js");
|
|
34
43
|
require("core-js/modules/es.array.push.js");
|
|
35
|
-
require("core-js/modules/es.array.some.js");
|
|
36
44
|
require("core-js/modules/es.array.sort.js");
|
|
37
|
-
require("core-js/modules/es.array.splice.js");
|
|
38
|
-
require("core-js/modules/es.date.now.js");
|
|
39
|
-
require("core-js/modules/es.date.to-string.js");
|
|
40
|
-
require("core-js/modules/es.function.bind.js");
|
|
41
|
-
require("core-js/modules/es.map.js");
|
|
42
|
-
require("core-js/modules/es.object.entries.js");
|
|
43
45
|
require("core-js/modules/es.object.to-string.js");
|
|
46
|
+
require("core-js/modules/es.object.values.js");
|
|
44
47
|
require("core-js/modules/es.string.iterator.js");
|
|
45
48
|
require("core-js/modules/es.weak-map.js");
|
|
46
|
-
require("core-js/modules/esnext.async-iterator.filter.js");
|
|
47
|
-
require("core-js/modules/esnext.async-iterator.find.js");
|
|
48
49
|
require("core-js/modules/esnext.async-iterator.for-each.js");
|
|
49
|
-
require("core-js/modules/esnext.async-iterator.some.js");
|
|
50
50
|
require("core-js/modules/esnext.iterator.constructor.js");
|
|
51
|
-
require("core-js/modules/esnext.iterator.filter.js");
|
|
52
|
-
require("core-js/modules/esnext.iterator.find.js");
|
|
53
51
|
require("core-js/modules/esnext.iterator.for-each.js");
|
|
54
|
-
require("core-js/modules/esnext.iterator.some.js");
|
|
55
|
-
require("core-js/modules/esnext.map.delete-all.js");
|
|
56
|
-
require("core-js/modules/esnext.map.emplace.js");
|
|
57
|
-
require("core-js/modules/esnext.map.every.js");
|
|
58
|
-
require("core-js/modules/esnext.map.filter.js");
|
|
59
|
-
require("core-js/modules/esnext.map.find.js");
|
|
60
|
-
require("core-js/modules/esnext.map.find-key.js");
|
|
61
|
-
require("core-js/modules/esnext.map.includes.js");
|
|
62
|
-
require("core-js/modules/esnext.map.key-of.js");
|
|
63
|
-
require("core-js/modules/esnext.map.map-keys.js");
|
|
64
|
-
require("core-js/modules/esnext.map.map-values.js");
|
|
65
|
-
require("core-js/modules/esnext.map.merge.js");
|
|
66
|
-
require("core-js/modules/esnext.map.reduce.js");
|
|
67
|
-
require("core-js/modules/esnext.map.some.js");
|
|
68
|
-
require("core-js/modules/esnext.map.update.js");
|
|
69
52
|
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
70
53
|
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
71
54
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
72
55
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
73
|
-
require("core-js/modules/web.timers.js");
|
|
74
|
-
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
75
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
76
56
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
77
57
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
78
58
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
79
59
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
80
|
-
var _fcrCore = require("fcr-core");
|
|
81
|
-
var _logger = require("agora-foundation/lib/logger");
|
|
82
60
|
var _mobx = require("mobx");
|
|
83
61
|
var _type = require("fcr-core/lib/type");
|
|
84
|
-
var _helper = require("agora-ui-foundation/lib/components/avatar/helper");
|
|
85
62
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
86
|
-
var _securityStore = require("../../common/security-store");
|
|
87
|
-
var _reactVirtualized = require("react-virtualized");
|
|
88
63
|
var _constant = require("../../utilities/constant");
|
|
89
|
-
var
|
|
90
|
-
var _type2 = require("fcr-core/lib/room-control/chatroom-control/type");
|
|
91
|
-
var _type3 = require("fcr-core/lib/room-control/type");
|
|
64
|
+
var _type2 = require("fcr-core/lib/room-control/type");
|
|
92
65
|
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
93
66
|
var _react = require("react");
|
|
94
|
-
var
|
|
95
|
-
var
|
|
96
|
-
|
|
97
|
-
|
|
67
|
+
var _types = require("./types");
|
|
68
|
+
var _chatRoomStore = require("./chat-room-store");
|
|
69
|
+
var _ChatStore;
|
|
70
|
+
var _initProto, _init_chatRoomStores, _init_activeTabIndex, _init_roomType, _handleReceiveMessageDecs, _handlerActiveTabDecs, _handleEventDecs, _releaseDecs, _ref;
|
|
98
71
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
99
72
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
100
73
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -105,74 +78,78 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
105
78
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
106
79
|
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
107
80
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
108
|
-
var intervalId;
|
|
109
|
-
var USER_ALL = exports.USER_ALL = 'All';
|
|
110
|
-
var USER_NONE = exports.USER_NONE = 'NONE';
|
|
111
|
-
var allToUser = exports.allToUser = {
|
|
112
|
-
userId: USER_ALL,
|
|
113
|
-
userName: USER_ALL,
|
|
114
|
-
userRole: _type.FcrUserRole.ROBOT,
|
|
115
|
-
connectorType: _fcrCore.FcrRoomConnectorType.NONE
|
|
116
|
-
};
|
|
117
81
|
var _A = /*#__PURE__*/new WeakMap();
|
|
118
82
|
var _B = /*#__PURE__*/new WeakMap();
|
|
119
83
|
var _C = /*#__PURE__*/new WeakMap();
|
|
120
|
-
_ref = (_handleReceiveMessageDecs = [_mobx.action, _mobx.action.bound], _handlerActiveTabDecs = [_mobx.action, _mobx.action.bound], _handleEventDecs = [_mobx.action, _mobx.action.bound], "
|
|
84
|
+
_ref = (_handleReceiveMessageDecs = [_mobx.action, _mobx.action.bound], _handlerActiveTabDecs = [_mobx.action, _mobx.action.bound], _handleEventDecs = [_mobx.action, _mobx.action.bound], _releaseDecs = [_mobx.action, _mobx.action.bound], "_disposers");
|
|
121
85
|
var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
122
86
|
function ChatStore(_ref2) {
|
|
123
87
|
var _this = this,
|
|
124
88
|
_roomControl$getRoomI,
|
|
125
|
-
_roomControl$getRoomI2
|
|
89
|
+
_roomControl$getRoomI2,
|
|
90
|
+
_roomControl$getRoomI3;
|
|
126
91
|
var chatRoomControl = _ref2.chatRoomControl,
|
|
127
92
|
userControl = _ref2.userControl,
|
|
128
93
|
uiEventStore = _ref2.uiEventStore,
|
|
129
94
|
securityStore = _ref2.securityStore,
|
|
130
95
|
roomControl = _ref2.roomControl,
|
|
131
|
-
|
|
96
|
+
waitingRoomControlProvider = _ref2.waitingRoomControlProvider,
|
|
97
|
+
roomProvider = _ref2.roomProvider,
|
|
98
|
+
chatProvider = _ref2.chatProvider;
|
|
132
99
|
(0, _classCallCheck2["default"])(this, ChatStore);
|
|
133
|
-
(0, _defineProperty2["default"])(this, _ref, (_initProto(this),
|
|
100
|
+
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), []));
|
|
101
|
+
(0, _defineProperty2["default"])(this, "_observable", new _observable.AgoraObservable());
|
|
134
102
|
(0, _defineProperty2["default"])(this, "_chatVisible", false);
|
|
135
|
-
(0, _defineProperty2["default"])(this, "_eventObserver", {
|
|
136
|
-
onEvent: this._handleEvent
|
|
137
|
-
});
|
|
138
|
-
(0, _defineProperty2["default"])(this, "_chatStoreObserver", {
|
|
139
|
-
onReceiveMessage: this._handleReceiveMessage.bind(this)
|
|
140
|
-
});
|
|
141
103
|
_classPrivateFieldInitSpec(this, _A, _init_chatRoomStores(this, {}));
|
|
142
|
-
_classPrivateFieldInitSpec(this, _B, _init_activeTabIndex(this,
|
|
143
|
-
_classPrivateFieldInitSpec(this, _C, _init_roomType(this,
|
|
104
|
+
_classPrivateFieldInitSpec(this, _B, _init_activeTabIndex(this, _type2.FcrRoomType.Mainroom));
|
|
105
|
+
_classPrivateFieldInitSpec(this, _C, _init_roomType(this, _type2.FcrRoomType.Mainroom));
|
|
144
106
|
this._securityStore = securityStore;
|
|
145
107
|
this._uiEventStore = uiEventStore;
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
var securityStore = new _securityStore.FcrSecurityStore(room.getPrivilegeControl(), room.getUserControl(), room.getStreamControl(), room.getRoomSessionControl(), _this._uiEventStore);
|
|
108
|
+
this._chatProvider = chatProvider;
|
|
109
|
+
var roomObserver = {
|
|
110
|
+
onJoinWaitingRoom: function onJoinWaitingRoom(room) {
|
|
150
111
|
var userControl = room.getUserControl();
|
|
151
112
|
var chatRoomControl = room.getChatRoomControl();
|
|
152
|
-
_this.chatRoomStores[
|
|
113
|
+
_this.chatRoomStores[_type2.FcrRoomType.Waitingroom] = new _chatRoomStore.ChatRoomStore({
|
|
153
114
|
chatRoomControl: chatRoomControl,
|
|
154
115
|
userControl: userControl,
|
|
155
116
|
uiEventStore: _this._uiEventStore,
|
|
156
|
-
securityStore:
|
|
157
|
-
type:
|
|
158
|
-
chatStoreObservable: _this._observable
|
|
117
|
+
securityStore: waitingRoomControlProvider.privilegeProvider,
|
|
118
|
+
type: _type2.FcrRoomType.Waitingroom,
|
|
119
|
+
chatStoreObservable: _this._observable,
|
|
120
|
+
chatProvider: _this._chatProvider
|
|
159
121
|
});
|
|
160
122
|
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
|
|
123
|
+
};
|
|
124
|
+
var eventObserver = {
|
|
125
|
+
onEvent: this._handleEvent
|
|
126
|
+
};
|
|
127
|
+
var chatStoreObserver = {
|
|
128
|
+
onReceiveMessage: this._handleReceiveMessage
|
|
129
|
+
};
|
|
130
|
+
if (((_roomControl$getRoomI = roomControl.getRoomInfo()) === null || _roomControl$getRoomI === void 0 ? void 0 : _roomControl$getRoomI.roomType) === _type2.FcrRoomType.Mainroom) {
|
|
131
|
+
roomProvider.addObserver(roomObserver);
|
|
132
|
+
}
|
|
133
|
+
uiEventStore.addObserver(eventObserver);
|
|
134
|
+
this._observable.addObserver(chatStoreObserver);
|
|
135
|
+
var isMainroom = ((_roomControl$getRoomI2 = roomControl.getRoomInfo()) === null || _roomControl$getRoomI2 === void 0 ? void 0 : _roomControl$getRoomI2.roomType) === _type2.FcrRoomType.Mainroom;
|
|
136
|
+
var type = isMainroom ? _type2.FcrRoomType.Mainroom : _type2.FcrRoomType.Waitingroom;
|
|
137
|
+
this.activeTabIndex = isMainroom ? _type2.FcrRoomType.Mainroom : _type2.FcrRoomType.Waitingroom;
|
|
138
|
+
this.chatRoomStores[type] = new _chatRoomStore.ChatRoomStore({
|
|
168
139
|
chatRoomControl: chatRoomControl,
|
|
169
140
|
userControl: userControl,
|
|
170
141
|
uiEventStore: uiEventStore,
|
|
171
142
|
securityStore: securityStore,
|
|
172
143
|
type: type,
|
|
173
|
-
chatStoreObservable: this._observable
|
|
144
|
+
chatStoreObservable: this._observable,
|
|
145
|
+
chatProvider: this._chatProvider
|
|
146
|
+
});
|
|
147
|
+
this.roomType = (_roomControl$getRoomI3 = roomControl.getRoomInfo()) === null || _roomControl$getRoomI3 === void 0 ? void 0 : _roomControl$getRoomI3.roomType;
|
|
148
|
+
this._disposers.push(function () {
|
|
149
|
+
roomProvider.removeObserver(roomObserver);
|
|
150
|
+
uiEventStore.removeObserver(eventObserver);
|
|
151
|
+
_this._observable.removeObserver(chatStoreObserver);
|
|
174
152
|
});
|
|
175
|
-
this.roomType = (_roomControl$getRoomI2 = roomControl.getRoomInfo()) === null || _roomControl$getRoomI2 === void 0 ? void 0 : _roomControl$getRoomI2.roomType;
|
|
176
153
|
}
|
|
177
154
|
return (0, _createClass2["default"])(ChatStore, [{
|
|
178
155
|
key: "chatRoomStores",
|
|
@@ -205,15 +182,14 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
205
182
|
}
|
|
206
183
|
}, {
|
|
207
184
|
key: "_handleReceiveMessage",
|
|
208
|
-
value: function _handleReceiveMessage(
|
|
185
|
+
value: function _handleReceiveMessage(notifyMsgs, type) {
|
|
209
186
|
if (this.activeTabIndex !== type || !this._chatVisible) {
|
|
210
187
|
var _this$chatRoomStores$, _this$chatRoomStores$2;
|
|
211
|
-
(_this$chatRoomStores$ = this.chatRoomStores[type]) === null || _this$chatRoomStores$ === void 0 || _this$chatRoomStores$.setUnReadMsgCount(
|
|
212
|
-
this.
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
});
|
|
188
|
+
(_this$chatRoomStores$ = this.chatRoomStores[type]) === null || _this$chatRoomStores$ === void 0 || _this$chatRoomStores$.setUnReadMsgCount(notifyMsgs.length + ((_this$chatRoomStores$2 = this.chatRoomStores[type]) === null || _this$chatRoomStores$2 === void 0 ? void 0 : _this$chatRoomStores$2.unReadMsgCount));
|
|
189
|
+
this._chatProvider.latestsMessageInfo = {
|
|
190
|
+
notifyMsgs: notifyMsgs,
|
|
191
|
+
currentRoomType: type
|
|
192
|
+
};
|
|
217
193
|
}
|
|
218
194
|
}
|
|
219
195
|
}, {
|
|
@@ -222,13 +198,13 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
222
198
|
var _this$chatRoomStores$3, _this$chatRoomStores$4;
|
|
223
199
|
this.activeTabIndex = key;
|
|
224
200
|
(_this$chatRoomStores$3 = this.chatRoomStores[key]) === null || _this$chatRoomStores$3 === void 0 || _this$chatRoomStores$3.setUnReadMsgCount(0);
|
|
225
|
-
(_this$chatRoomStores$4 = this.chatRoomStores[
|
|
226
|
-
this._uiEventStore.sendEvent(_constant.
|
|
201
|
+
(_this$chatRoomStores$4 = this.chatRoomStores[_type2.FcrRoomType.Waitingroom]) === null || _this$chatRoomStores$4 === void 0 || _this$chatRoomStores$4.setHasNewMsg(false);
|
|
202
|
+
this._uiEventStore.sendEvent(_constant.FcrUIAction.CHAT_ROOM_TAB_CHANGE, key);
|
|
227
203
|
}
|
|
228
204
|
}, {
|
|
229
205
|
key: "_handleEvent",
|
|
230
206
|
value: function _handleEvent(action, payload) {
|
|
231
|
-
if (action === _constant.
|
|
207
|
+
if (action === _constant.FcrUIAction.RECEIVE_NEW_CHAT_MESSAGES_FOR_RED) {
|
|
232
208
|
if (this.activeTabIndex !== payload) {
|
|
233
209
|
var _this$chatRoomStores;
|
|
234
210
|
(_this$chatRoomStores = this.chatRoomStores[payload]) === null || _this$chatRoomStores === void 0 || _this$chatRoomStores.setHasNewMsg(true);
|
|
@@ -237,897 +213,53 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
237
213
|
(_this$chatRoomStores2 = this.chatRoomStores[payload]) === null || _this$chatRoomStores2 === void 0 || _this$chatRoomStores2.setHasNewMsg(false);
|
|
238
214
|
}
|
|
239
215
|
}
|
|
240
|
-
if (action === _constant.
|
|
241
|
-
this.handlerActiveTab(
|
|
216
|
+
if (action === _constant.FcrUIAction.CHAT_ROOM_CLOSED) {
|
|
217
|
+
this.handlerActiveTab(_type2.FcrRoomType.Mainroom);
|
|
242
218
|
}
|
|
243
|
-
if (action === _constant.
|
|
219
|
+
if (action === _constant.FcrUIAction.CHAT_VISIBLE) {
|
|
244
220
|
if (payload === true) {
|
|
245
221
|
var _this$chatRoomStores$5;
|
|
246
222
|
(_this$chatRoomStores$5 = this.chatRoomStores[this.activeTabIndex]) === null || _this$chatRoomStores$5 === void 0 || _this$chatRoomStores$5.setUnReadMsgCount(0);
|
|
247
223
|
}
|
|
248
224
|
this._chatVisible = payload;
|
|
249
225
|
}
|
|
250
|
-
if (action === _constant.
|
|
226
|
+
if (action === _constant.FcrUIAction.WAITING_ROOM_DESTROYED) {
|
|
251
227
|
var _this$chatRoomStores$6;
|
|
252
|
-
(_this$chatRoomStores$6 = this.chatRoomStores[
|
|
253
|
-
delete this.chatRoomStores[
|
|
254
|
-
this.handlerActiveTab(
|
|
228
|
+
(_this$chatRoomStores$6 = this.chatRoomStores[_type2.FcrRoomType.Waitingroom]) === null || _this$chatRoomStores$6 === void 0 || _this$chatRoomStores$6.release();
|
|
229
|
+
delete this.chatRoomStores[_type2.FcrRoomType.Waitingroom];
|
|
230
|
+
this.handlerActiveTab(_type2.FcrRoomType.Mainroom);
|
|
255
231
|
}
|
|
256
|
-
if (action === _constant.
|
|
232
|
+
if (action === _constant.FcrUIAction.TOGGLE_CHAT_ROOM_TAB) {
|
|
257
233
|
this.handlerActiveTab(payload);
|
|
258
234
|
}
|
|
259
235
|
}
|
|
260
|
-
}]);
|
|
261
|
-
}();
|
|
262
|
-
_ChatStore = ChatStore;
|
|
263
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ChatStore, [[_mobx.observable, 1, "chatRoomStores"], [_mobx.observable, 1, "activeTabIndex"], [_mobx.observable, 1, "roomType"], [_decorator.bound, 2, "hasWaitingRoomPermission"], [_handleReceiveMessageDecs, 18, "_handleReceiveMessage"], [_handlerActiveTabDecs, 18, "handlerActiveTab"], [_handleEventDecs, 18, "_handleEvent"]], []).e, 4);
|
|
264
|
-
_init_chatRoomStores = _applyDecs$e[0];
|
|
265
|
-
_init_activeTabIndex = _applyDecs$e[1];
|
|
266
|
-
_init_roomType = _applyDecs$e[2];
|
|
267
|
-
_initProto = _applyDecs$e[3];
|
|
268
|
-
var _A2 = /*#__PURE__*/new WeakMap();
|
|
269
|
-
var _B2 = /*#__PURE__*/new WeakMap();
|
|
270
|
-
var _C2 = /*#__PURE__*/new WeakMap();
|
|
271
|
-
var _D = /*#__PURE__*/new WeakMap();
|
|
272
|
-
var _E = /*#__PURE__*/new WeakMap();
|
|
273
|
-
var _F = /*#__PURE__*/new WeakMap();
|
|
274
|
-
var _G = /*#__PURE__*/new WeakMap();
|
|
275
|
-
var _H = /*#__PURE__*/new WeakMap();
|
|
276
|
-
var _I = /*#__PURE__*/new WeakMap();
|
|
277
|
-
var _J = /*#__PURE__*/new WeakMap();
|
|
278
|
-
var _K = /*#__PURE__*/new WeakMap();
|
|
279
|
-
var _L = /*#__PURE__*/new WeakMap();
|
|
280
|
-
var _M = /*#__PURE__*/new WeakMap();
|
|
281
|
-
var _N = /*#__PURE__*/new WeakMap();
|
|
282
|
-
var _O = /*#__PURE__*/new WeakMap();
|
|
283
|
-
var _P = /*#__PURE__*/new WeakMap();
|
|
284
|
-
var _Q = /*#__PURE__*/new WeakMap();
|
|
285
|
-
_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], _initChatRoomConnectionStateDecs = [_mobx.action, _mobx.action.bound], "needCbBottomCount");
|
|
286
|
-
var ChatRoomStore = exports.ChatRoomStore = /*#__PURE__*/function () {
|
|
287
|
-
function ChatRoomStore(_ref4) {
|
|
288
|
-
var _this$_chatRoomContro,
|
|
289
|
-
_this2 = this;
|
|
290
|
-
var chatRoomControl = _ref4.chatRoomControl,
|
|
291
|
-
userControl = _ref4.userControl,
|
|
292
|
-
uiEventStore = _ref4.uiEventStore,
|
|
293
|
-
securityStore = _ref4.securityStore,
|
|
294
|
-
type = _ref4.type,
|
|
295
|
-
chatStoreObservable = _ref4.chatStoreObservable;
|
|
296
|
-
(0, _classCallCheck2["default"])(this, ChatRoomStore);
|
|
297
|
-
(0, _defineProperty2["default"])(this, _ref3, (_initProto2(this), 40));
|
|
298
|
-
(0, _defineProperty2["default"])(this, "mostRecentHeight", 0);
|
|
299
|
-
(0, _defineProperty2["default"])(this, "mostRecentWidth", 0);
|
|
300
|
-
(0, _defineProperty2["default"])(this, "cache", new _reactVirtualized.CellMeasurerCache({}));
|
|
301
|
-
(0, _defineProperty2["default"])(this, "scrollHeight", 0);
|
|
302
|
-
(0, _defineProperty2["default"])(this, "scrollTop", 0);
|
|
303
|
-
(0, _defineProperty2["default"])(this, "clientHeight", 0);
|
|
304
|
-
(0, _defineProperty2["default"])(this, "firstMsgId", '');
|
|
305
|
-
(0, _defineProperty2["default"])(this, "lastReadInfo", {
|
|
306
|
-
index: -1,
|
|
307
|
-
msgId: ''
|
|
308
|
-
});
|
|
309
|
-
(0, _defineProperty2["default"])(this, "lastScrollTop", undefined);
|
|
310
|
-
(0, _defineProperty2["default"])(this, "logger", (0, _logger.getLogger)());
|
|
311
|
-
(0, _defineProperty2["default"])(this, "_maxMsgCount", 500);
|
|
312
|
-
(0, _defineProperty2["default"])(this, "_originalMessages", []);
|
|
313
|
-
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
314
|
-
(0, _defineProperty2["default"])(this, "_noUser", {
|
|
315
|
-
userId: USER_NONE,
|
|
316
|
-
userName: (0, _i18n.transI18n)('fmt_chat_tips_selecthost'),
|
|
317
|
-
userRole: _type.FcrUserRole.ROBOT,
|
|
318
|
-
connectorType: _fcrCore.FcrRoomConnectorType.NONE
|
|
319
|
-
});
|
|
320
|
-
_classPrivateFieldInitSpec(this, _A2, _init__userInfo(this));
|
|
321
|
-
_classPrivateFieldInitSpec(this, _B2, _init_messageList(this, []));
|
|
322
|
-
_classPrivateFieldInitSpec(this, _C2, _init_readMsgIndex(this, {
|
|
323
|
-
index: -1,
|
|
324
|
-
msgId: ''
|
|
325
|
-
}));
|
|
326
|
-
// 读过的最后一条消息
|
|
327
|
-
_classPrivateFieldInitSpec(this, _D, _init_readIdx(this, 0));
|
|
328
|
-
_classPrivateFieldInitSpec(this, _E, _init_viewIdx(this, 0));
|
|
329
|
-
// 历史未读消息条数
|
|
330
|
-
_classPrivateFieldInitSpec(this, _F, _init_historyUnreadCount(this, 0));
|
|
331
|
-
_classPrivateFieldInitSpec(this, _G, _init_hasHistoryMsg(this, false));
|
|
332
|
-
_classPrivateFieldInitSpec(this, _H, _init_newMsgsUnReadCnt(this, 0));
|
|
333
|
-
_classPrivateFieldInitSpec(this, _I, _init_privateTargetUser(this, allToUser));
|
|
334
|
-
_classPrivateFieldInitSpec(this, _J, _init_chatLevel(this, 'everyone'));
|
|
335
|
-
_classPrivateFieldInitSpec(this, _K, _init_currentUserMap(this, new Map()));
|
|
336
|
-
_classPrivateFieldInitSpec(this, _L, _init_textMsg(this, ''));
|
|
337
|
-
_classPrivateFieldInitSpec(this, _M, _init_privateTargetList(this, []));
|
|
338
|
-
_classPrivateFieldInitSpec(this, _N, _init_chatRoomState(this, _type2.FcrChatRoomConnectionState.Disconnected));
|
|
339
|
-
_classPrivateFieldInitSpec(this, _O, _init_hasNewMsg(this, false));
|
|
340
|
-
_classPrivateFieldInitSpec(this, _P, _init_userCount(this, 0));
|
|
341
|
-
_classPrivateFieldInitSpec(this, _Q, _init_unReadMsgCount(this, 0));
|
|
342
|
-
(0, _defineProperty2["default"])(this, "_chatRoomObserver", {
|
|
343
|
-
onTextMessageReceived: this.messageReceived.bind(this),
|
|
344
|
-
onConnectionStateUpdated: this._handleConnectionUpdated.bind(this),
|
|
345
|
-
onErrorOccurred: function onErrorOccurred() {}
|
|
346
|
-
});
|
|
347
|
-
(0, _defineProperty2["default"])(this, "_userObserver", {
|
|
348
|
-
onRemoteUsersJoined: this._onRemoteUserUpdate.bind(this),
|
|
349
|
-
onRemoteUsersLeft: this._onRemoteUserUpdate.bind(this),
|
|
350
|
-
onUserPropertiesUpdated: this._onUserPropertiesUpdated.bind(this),
|
|
351
|
-
onUserPropertiesDeleted: function onUserPropertiesDeleted(roomId, event) {},
|
|
352
|
-
onUserInfoUpdated: this._onUserInfoUpdated.bind(this)
|
|
353
|
-
});
|
|
354
|
-
this._type = type;
|
|
355
|
-
this._uiEventStore = uiEventStore;
|
|
356
|
-
this._securityStore = securityStore;
|
|
357
|
-
this._chatStoreObservable = chatStoreObservable;
|
|
358
|
-
// TODO: 需要查询房间历史消息, 一期预留
|
|
359
|
-
this.messageList = [];
|
|
360
|
-
this._chatRoomControl = chatRoomControl;
|
|
361
|
-
this._initChatRoomConnectionState(chatRoomControl.getConnectionState());
|
|
362
|
-
this._userControl = userControl;
|
|
363
|
-
this.userCount = this.getUserCount();
|
|
364
|
-
this._userInfo = userControl.getLocalUser();
|
|
365
|
-
(_this$_chatRoomContro = this._chatRoomControl) === null || _this$_chatRoomContro === void 0 || _this$_chatRoomContro.addObserver(this._chatRoomObserver);
|
|
366
|
-
this._userControl.addObserver(this._userObserver);
|
|
367
|
-
this._refreshUserList();
|
|
368
|
-
intervalId = setInterval(this.patchHandleMsg, 500);
|
|
369
|
-
this._addReactions();
|
|
370
|
-
this._uiEventStore.addObserver({
|
|
371
|
-
onEvent: function onEvent(action, payload) {
|
|
372
|
-
if (action === _constant.UIAction.CHAT_UPDATE_TARGET) {
|
|
373
|
-
if (payload.roomType === _this2._type) {
|
|
374
|
-
_this2.setTargetUser(payload.user);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
if (action === _constant.UIAction.CHAT_RESET_TARGET) {
|
|
378
|
-
// this.resetTargetUser();
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
this.privateTargetList = (0, _toConsumableArray2["default"])(this.remoteUsers);
|
|
383
|
-
this.initChatLevel();
|
|
384
|
-
this.resetTargetUser();
|
|
385
|
-
}
|
|
386
|
-
return (0, _createClass2["default"])(ChatRoomStore, [{
|
|
387
|
-
key: "_userInfo",
|
|
388
|
-
get: function get() {
|
|
389
|
-
return _classPrivateFieldGet(_A2, this);
|
|
390
|
-
},
|
|
391
|
-
set: function set(v) {
|
|
392
|
-
_classPrivateFieldSet(_A2, this, v);
|
|
393
|
-
}
|
|
394
|
-
}, {
|
|
395
|
-
key: "messageList",
|
|
396
|
-
get: function get() {
|
|
397
|
-
return _classPrivateFieldGet(_B2, this);
|
|
398
|
-
},
|
|
399
|
-
set: function set(v) {
|
|
400
|
-
_classPrivateFieldSet(_B2, this, v);
|
|
401
|
-
}
|
|
402
|
-
}, {
|
|
403
|
-
key: "readMsgIndex",
|
|
404
|
-
get: function get() {
|
|
405
|
-
return _classPrivateFieldGet(_C2, this);
|
|
406
|
-
},
|
|
407
|
-
set: function set(v) {
|
|
408
|
-
_classPrivateFieldSet(_C2, this, v);
|
|
409
|
-
}
|
|
410
|
-
}, {
|
|
411
|
-
key: "readIdx",
|
|
412
|
-
get: function get() {
|
|
413
|
-
return _classPrivateFieldGet(_D, this);
|
|
414
|
-
},
|
|
415
|
-
set: function set(v) {
|
|
416
|
-
_classPrivateFieldSet(_D, this, v);
|
|
417
|
-
}
|
|
418
|
-
}, {
|
|
419
|
-
key: "viewIdx",
|
|
420
|
-
get: function get() {
|
|
421
|
-
return _classPrivateFieldGet(_E, this);
|
|
422
|
-
},
|
|
423
|
-
set: function set(v) {
|
|
424
|
-
_classPrivateFieldSet(_E, this, v);
|
|
425
|
-
}
|
|
426
|
-
}, {
|
|
427
|
-
key: "historyUnreadCount",
|
|
428
|
-
get: function get() {
|
|
429
|
-
return _classPrivateFieldGet(_F, this);
|
|
430
|
-
},
|
|
431
|
-
set: function set(v) {
|
|
432
|
-
_classPrivateFieldSet(_F, this, v);
|
|
433
|
-
}
|
|
434
|
-
}, {
|
|
435
|
-
key: "hasHistoryMsg",
|
|
436
|
-
get: function get() {
|
|
437
|
-
return _classPrivateFieldGet(_G, this);
|
|
438
|
-
},
|
|
439
|
-
set: function set(v) {
|
|
440
|
-
_classPrivateFieldSet(_G, this, v);
|
|
441
|
-
}
|
|
442
|
-
}, {
|
|
443
|
-
key: "newMsgsUnReadCnt",
|
|
444
|
-
get: function get() {
|
|
445
|
-
return _classPrivateFieldGet(_H, this);
|
|
446
|
-
},
|
|
447
|
-
set: function set(v) {
|
|
448
|
-
_classPrivateFieldSet(_H, this, v);
|
|
449
|
-
}
|
|
450
|
-
}, {
|
|
451
|
-
key: "privateTargetUser",
|
|
452
|
-
get: function get() {
|
|
453
|
-
return _classPrivateFieldGet(_I, this);
|
|
454
|
-
},
|
|
455
|
-
set: function set(v) {
|
|
456
|
-
_classPrivateFieldSet(_I, this, v);
|
|
457
|
-
}
|
|
458
|
-
}, {
|
|
459
|
-
key: "chatLevel",
|
|
460
|
-
get: function get() {
|
|
461
|
-
return _classPrivateFieldGet(_J, this);
|
|
462
|
-
},
|
|
463
|
-
set: function set(v) {
|
|
464
|
-
_classPrivateFieldSet(_J, this, v);
|
|
465
|
-
}
|
|
466
|
-
}, {
|
|
467
|
-
key: "currentUserMap",
|
|
468
|
-
get: function get() {
|
|
469
|
-
return _classPrivateFieldGet(_K, this);
|
|
470
|
-
},
|
|
471
|
-
set: function set(v) {
|
|
472
|
-
_classPrivateFieldSet(_K, this, v);
|
|
473
|
-
}
|
|
474
|
-
}, {
|
|
475
|
-
key: "textMsg",
|
|
476
|
-
get: function get() {
|
|
477
|
-
return _classPrivateFieldGet(_L, this);
|
|
478
|
-
},
|
|
479
|
-
set: function set(v) {
|
|
480
|
-
_classPrivateFieldSet(_L, this, v);
|
|
481
|
-
}
|
|
482
|
-
}, {
|
|
483
|
-
key: "privateTargetList",
|
|
484
|
-
get: function get() {
|
|
485
|
-
return _classPrivateFieldGet(_M, this);
|
|
486
|
-
},
|
|
487
|
-
set: function set(v) {
|
|
488
|
-
_classPrivateFieldSet(_M, this, v);
|
|
489
|
-
}
|
|
490
|
-
}, {
|
|
491
|
-
key: "chatRoomState",
|
|
492
|
-
get: function get() {
|
|
493
|
-
return _classPrivateFieldGet(_N, this);
|
|
494
|
-
},
|
|
495
|
-
set: function set(v) {
|
|
496
|
-
_classPrivateFieldSet(_N, this, v);
|
|
497
|
-
}
|
|
498
|
-
}, {
|
|
499
|
-
key: "hasNewMsg",
|
|
500
|
-
get: function get() {
|
|
501
|
-
return _classPrivateFieldGet(_O, this);
|
|
502
|
-
},
|
|
503
|
-
set: function set(v) {
|
|
504
|
-
_classPrivateFieldSet(_O, this, v);
|
|
505
|
-
}
|
|
506
|
-
}, {
|
|
507
|
-
key: "userCount",
|
|
508
|
-
get: function get() {
|
|
509
|
-
return _classPrivateFieldGet(_P, this);
|
|
510
|
-
},
|
|
511
|
-
set: function set(v) {
|
|
512
|
-
_classPrivateFieldSet(_P, this, v);
|
|
513
|
-
}
|
|
514
|
-
}, {
|
|
515
|
-
key: "unReadMsgCount",
|
|
516
|
-
get: function get() {
|
|
517
|
-
return _classPrivateFieldGet(_Q, this);
|
|
518
|
-
},
|
|
519
|
-
set: function set(v) {
|
|
520
|
-
_classPrivateFieldSet(_Q, this, v);
|
|
521
|
-
}
|
|
522
236
|
}, {
|
|
523
237
|
key: "release",
|
|
524
238
|
value: function release() {
|
|
525
|
-
var
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
clearInterval(intervalId);
|
|
529
|
-
}
|
|
530
|
-
}, {
|
|
531
|
-
key: "setLastScrollTop",
|
|
532
|
-
value: function setLastScrollTop(value) {
|
|
533
|
-
this.lastScrollTop = value;
|
|
534
|
-
}
|
|
535
|
-
}, {
|
|
536
|
-
key: "setMessageList",
|
|
537
|
-
value: function setMessageList(messages) {
|
|
538
|
-
this.messageList = (0, _toConsumableArray2["default"])(messages).sort(function (a, b) {
|
|
539
|
-
return typeof a.time === 'number' && typeof b.time === 'number' ? a.time - b.time : 0;
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
}, {
|
|
543
|
-
key: "sendMessage",
|
|
544
|
-
value: function () {
|
|
545
|
-
var _sendMessage = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(msg, type) {
|
|
546
|
-
var _this$_chatRoomContro3;
|
|
547
|
-
var target, isPrivate, message, resp;
|
|
548
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
549
|
-
while (1) switch (_context.prev = _context.next) {
|
|
550
|
-
case 0:
|
|
551
|
-
if (!(type === _type2.FcrChatRoomMessageType.Image)) {
|
|
552
|
-
_context.next = 3;
|
|
553
|
-
break;
|
|
554
|
-
}
|
|
555
|
-
console.warn({
|
|
556
|
-
msg: msg
|
|
557
|
-
}, '图片消息发送未实现');
|
|
558
|
-
return _context.abrupt("return");
|
|
559
|
-
case 3:
|
|
560
|
-
target = this.privateTargetUser;
|
|
561
|
-
isPrivate = target.userId !== USER_ALL;
|
|
562
|
-
message = _objectSpread(_objectSpread({}, type === _type2.FcrChatRoomMessageType.Text ? {
|
|
563
|
-
content: msg
|
|
564
|
-
} : {
|
|
565
|
-
file: msg
|
|
566
|
-
}), {}, {
|
|
567
|
-
type: type,
|
|
568
|
-
properties: {}
|
|
569
|
-
}, isPrivate ? {
|
|
570
|
-
to: [target.userId]
|
|
571
|
-
} : {});
|
|
572
|
-
_context.next = 8;
|
|
573
|
-
return (_this$_chatRoomContro3 = this._chatRoomControl) === null || _this$_chatRoomContro3 === void 0 ? void 0 : _this$_chatRoomContro3.sendMessage(message);
|
|
574
|
-
case 8:
|
|
575
|
-
resp = _context.sent;
|
|
576
|
-
console.log({
|
|
577
|
-
resp: resp,
|
|
578
|
-
type: type
|
|
579
|
-
}, 'message sent');
|
|
580
|
-
this._handleTextMessageReceived(resp, isPrivate ? target.userName : undefined);
|
|
581
|
-
this.updateReadMsgIndex({
|
|
582
|
-
index: this.messageList.length - 1,
|
|
583
|
-
msgId: resp.id
|
|
584
|
-
});
|
|
585
|
-
case 12:
|
|
586
|
-
case "end":
|
|
587
|
-
return _context.stop();
|
|
588
|
-
}
|
|
589
|
-
}, _callee, this);
|
|
590
|
-
}));
|
|
591
|
-
function sendMessage(_x, _x2) {
|
|
592
|
-
return _sendMessage.apply(this, arguments);
|
|
239
|
+
for (var _i = 0, _Object$values = Object.values(this.chatRoomStores); _i < _Object$values.length; _i++) {
|
|
240
|
+
var store = _Object$values[_i];
|
|
241
|
+
store.release();
|
|
593
242
|
}
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}, {
|
|
597
|
-
key: "messageReceived",
|
|
598
|
-
value: function messageReceived(_roomId, msg) {
|
|
599
|
-
this._originalMessages.push(msg);
|
|
600
|
-
this._uiEventStore.sendEvent(_constant.UIAction.RECEIVE_NEW_CHAT_MESSAGES_FOR_RED, this._type);
|
|
601
|
-
}
|
|
602
|
-
}, {
|
|
603
|
-
key: "setUnReadMsgCount",
|
|
604
|
-
value: function setUnReadMsgCount(count) {
|
|
605
|
-
this.unReadMsgCount = count;
|
|
606
|
-
}
|
|
607
|
-
}, {
|
|
608
|
-
key: "setHasNewMsg",
|
|
609
|
-
value: function setHasNewMsg(value) {
|
|
610
|
-
this.hasNewMsg = value;
|
|
611
|
-
}
|
|
612
|
-
}, {
|
|
613
|
-
key: "_handleTextMessageReceived",
|
|
614
|
-
value: function _handleTextMessageReceived(message, target) {
|
|
615
|
-
var id = message.id,
|
|
616
|
-
_message$from = message.from,
|
|
617
|
-
userId = _message$from.userId,
|
|
618
|
-
userName = _message$from.userName,
|
|
619
|
-
userRole = _message$from.userRole,
|
|
620
|
-
type = message.type,
|
|
621
|
-
timestamp = message.timestamp,
|
|
622
|
-
isPrivate = message.isPrivate;
|
|
623
|
-
console.log({
|
|
624
|
-
message: message,
|
|
625
|
-
target: target
|
|
626
|
-
}, 'message received');
|
|
627
|
-
if (type !== _type2.FcrChatRoomMessageType.Text) {
|
|
628
|
-
return;
|
|
629
|
-
}
|
|
630
|
-
var color = (0, _helper.getNameColor)(userName);
|
|
631
|
-
var msgPublisherRole = 'participant';
|
|
632
|
-
switch (userRole) {
|
|
633
|
-
case _type.FcrUserRole.HOST:
|
|
634
|
-
msgPublisherRole = 'host';
|
|
635
|
-
break;
|
|
636
|
-
case _type.FcrUserRole.COHOST:
|
|
637
|
-
msgPublisherRole = 'union-host';
|
|
638
|
-
break;
|
|
639
|
-
case _type.FcrUserRole.PARTICIPANT:
|
|
640
|
-
msgPublisherRole = 'participant';
|
|
641
|
-
break;
|
|
642
|
-
}
|
|
643
|
-
this.handleNewMsg(_objectSpread({
|
|
644
|
-
id: id,
|
|
645
|
-
role: msgPublisherRole,
|
|
646
|
-
time: timestamp,
|
|
647
|
-
color: color,
|
|
648
|
-
nickName: userName,
|
|
649
|
-
uid: userId,
|
|
650
|
-
isPrivate: isPrivate,
|
|
651
|
-
target: target || (isPrivate ? 'Me' : 'All')
|
|
652
|
-
}, type === _type2.FcrChatRoomMessageType.Text ? {
|
|
653
|
-
msg: message.content
|
|
654
|
-
} : {
|
|
655
|
-
img: message.file
|
|
656
|
-
}));
|
|
657
|
-
}
|
|
658
|
-
}, {
|
|
659
|
-
key: "getUserCount",
|
|
660
|
-
value: function getUserCount() {
|
|
661
|
-
return this._userControl.getUserList().filter(function (user) {
|
|
662
|
-
return user.userRole === _type.FcrUserRole.PARTICIPANT;
|
|
663
|
-
}).length;
|
|
664
|
-
}
|
|
665
|
-
}, {
|
|
666
|
-
key: "_onRemoteUserUpdate",
|
|
667
|
-
value: function _onRemoteUserUpdate(roomId, events) {
|
|
668
|
-
console.log({
|
|
669
|
-
events: events
|
|
670
|
-
}, 'remoteUser update');
|
|
671
|
-
if (this._type === _constant.RoomType.WAITING_ROOM) {
|
|
672
|
-
this.userCount = this.getUserCount();
|
|
673
|
-
if (this.userCount === 0) {
|
|
674
|
-
this._uiEventStore.sendEvent(_constant.UIAction.CHAT_ROOM_CLOSED, this._type);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
this._refreshUserList();
|
|
678
|
-
}
|
|
679
|
-
}, {
|
|
680
|
-
key: "_onUserPropertiesUpdated",
|
|
681
|
-
value: function _onUserPropertiesUpdated(roomId, event) {
|
|
682
|
-
console.log('FcrParticipant _onUserPropertiesUpdated', event);
|
|
683
|
-
this._refreshUserList();
|
|
684
|
-
}
|
|
685
|
-
}, {
|
|
686
|
-
key: "_onUserInfoUpdated",
|
|
687
|
-
value: function _onUserInfoUpdated(roomId, event) {
|
|
688
|
-
console.log(event, 'FcrParticipant _onUserInfoUpdated');
|
|
689
|
-
var targetUser = event.modifiedUser;
|
|
690
|
-
this.currentUserMap.set(targetUser.userId, targetUser);
|
|
691
|
-
this._refreshUserList();
|
|
692
|
-
}
|
|
693
|
-
}, {
|
|
694
|
-
key: "_refreshUserList",
|
|
695
|
-
value: function _refreshUserList() {
|
|
696
|
-
this._userInfo = this._userControl.getLocalUser();
|
|
697
|
-
var users = this._userControl.getUsers();
|
|
698
|
-
this.currentUserMap = new Map();
|
|
699
|
-
for (var _i = 0, _Object$entries = Object.entries(users); _i < _Object$entries.length; _i++) {
|
|
700
|
-
var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
|
|
701
|
-
userId = _Object$entries$_i[0],
|
|
702
|
-
user = _Object$entries$_i[1];
|
|
703
|
-
this.currentUserMap.set(userId, user);
|
|
704
|
-
}
|
|
705
|
-
}
|
|
706
|
-
}, {
|
|
707
|
-
key: "handleNewMsg",
|
|
708
|
-
value: function handleNewMsg(msg) {
|
|
709
|
-
if (this.messageList.length >= this._maxMsgCount) {
|
|
710
|
-
this.messageList.shift();
|
|
711
|
-
}
|
|
712
|
-
this.messageList.push(msg);
|
|
713
|
-
this.setMessageList(this.messageList);
|
|
714
|
-
}
|
|
715
|
-
}, {
|
|
716
|
-
key: "updateReadMsgIndex",
|
|
717
|
-
value: function updateReadMsgIndex(info) {
|
|
718
|
-
if (!info) {
|
|
719
|
-
var _this$messageList;
|
|
720
|
-
this.readMsgIndex = {
|
|
721
|
-
index: this.messageList.length - 1,
|
|
722
|
-
msgId: (_this$messageList = this.messageList[this.messageList.length - 1]) === null || _this$messageList === void 0 ? void 0 : _this$messageList.id
|
|
723
|
-
};
|
|
724
|
-
this.resetComponentCache();
|
|
725
|
-
return;
|
|
726
|
-
}
|
|
727
|
-
var index = info.index,
|
|
728
|
-
msgId = info.msgId;
|
|
729
|
-
this.readMsgIndex = {
|
|
730
|
-
index: index,
|
|
731
|
-
msgId: msgId
|
|
732
|
-
};
|
|
733
|
-
}
|
|
734
|
-
}, {
|
|
735
|
-
key: "allowChat",
|
|
736
|
-
get: function get() {
|
|
737
|
-
return this._securityStore.allowChat();
|
|
738
|
-
}
|
|
739
|
-
}, {
|
|
740
|
-
key: "allowedAllChat",
|
|
741
|
-
get: function get() {
|
|
742
|
-
return this._securityStore.allowedAllChat();
|
|
743
|
-
}
|
|
744
|
-
}, {
|
|
745
|
-
key: "allowedPublicChatAndDisallowedPrivateChat",
|
|
746
|
-
get: function get() {
|
|
747
|
-
return this._securityStore.allowedPublicChatAndDisallowedPrivateChat();
|
|
748
|
-
}
|
|
749
|
-
}, {
|
|
750
|
-
key: "disallowedPublicChatAndDisallowedPrivateChatToParticipant",
|
|
751
|
-
get: function get() {
|
|
752
|
-
return this._securityStore.disallowedPublicChatAndDisallowedPrivateChatToParticipant();
|
|
753
|
-
}
|
|
754
|
-
}, {
|
|
755
|
-
key: "disallowedAllChat",
|
|
756
|
-
get: function get() {
|
|
757
|
-
return this._securityStore.disallowedAllChat();
|
|
758
|
-
}
|
|
759
|
-
}, {
|
|
760
|
-
key: "hasChatPermission",
|
|
761
|
-
get: function get() {
|
|
762
|
-
return this._securityStore.hasChatSendPublicPermission();
|
|
763
|
-
}
|
|
764
|
-
}, {
|
|
765
|
-
key: "hasChatSendPrivatePermission",
|
|
766
|
-
get: function get() {
|
|
767
|
-
return this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.HOST) || this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.COHOST);
|
|
768
|
-
}
|
|
769
|
-
}, {
|
|
770
|
-
key: "hasSendAllPermission",
|
|
771
|
-
get: function get() {
|
|
772
|
-
return this._securityStore.hasSendAllChatPermission();
|
|
773
|
-
}
|
|
774
|
-
}, {
|
|
775
|
-
key: "isHost",
|
|
776
|
-
get: function get() {
|
|
777
|
-
return this._userInfo.userRole === _type.FcrUserRole.HOST;
|
|
778
|
-
}
|
|
779
|
-
}, {
|
|
780
|
-
key: "isCohost",
|
|
781
|
-
get: function get() {
|
|
782
|
-
return this._userInfo.userRole === _type.FcrUserRole.COHOST;
|
|
783
|
-
}
|
|
784
|
-
}, {
|
|
785
|
-
key: "localIsManager",
|
|
786
|
-
get: function get() {
|
|
787
|
-
return this._userInfo.userRole === _type.FcrUserRole.HOST || this._userInfo.userRole === _type.FcrUserRole.COHOST;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
// 本地添加系统消息
|
|
791
|
-
}, {
|
|
792
|
-
key: "_addReactions",
|
|
793
|
-
value: function _addReactions() {
|
|
794
|
-
var _this3 = this;
|
|
795
|
-
this._disposers.push((0, _mobx.reaction)(function () {
|
|
796
|
-
return _this3.chatLevel;
|
|
797
|
-
}, function (state) {
|
|
798
|
-
if (!_this3.localIsManager && _this3.privateTargetUser.userId === USER_ALL && (state === 'no_one' || state === 'private_to_manager')) {
|
|
799
|
-
_this3.setTargetUser(_this3._noUser);
|
|
800
|
-
}
|
|
801
|
-
if (!_this3.localIsManager && _this3.privateTargetUser.userId === USER_NONE && (state === 'everyone' || state === 'public')) {
|
|
802
|
-
_this3.setTargetUser(allToUser);
|
|
803
|
-
}
|
|
804
|
-
}), (0, _mobx.reaction)(function () {
|
|
805
|
-
return _this3.disallowedAllChat;
|
|
806
|
-
}, function (state) {
|
|
807
|
-
if (state) {
|
|
808
|
-
_this3.handleChatPermissionUpdate('no_one');
|
|
809
|
-
_this3.updateChatLevel('no_one');
|
|
810
|
-
}
|
|
811
|
-
}), (0, _mobx.reaction)(function () {
|
|
812
|
-
return _this3.disallowedPublicChatAndDisallowedPrivateChatToParticipant;
|
|
813
|
-
}, function (state) {
|
|
814
|
-
if (state) {
|
|
815
|
-
_this3.handleChatPermissionUpdate('private_to_manager');
|
|
816
|
-
_this3.updateChatLevel('private_to_manager');
|
|
817
|
-
}
|
|
818
|
-
}), (0, _mobx.reaction)(function () {
|
|
819
|
-
return _this3.allowedPublicChatAndDisallowedPrivateChat;
|
|
820
|
-
}, function (state) {
|
|
821
|
-
if (state) {
|
|
822
|
-
_this3.handleChatPermissionUpdate('public');
|
|
823
|
-
_this3.updateChatLevel('public');
|
|
824
|
-
}
|
|
825
|
-
}), (0, _mobx.reaction)(function () {
|
|
826
|
-
return _this3.allowedAllChat;
|
|
827
|
-
}, function (state) {
|
|
828
|
-
if (state) {
|
|
829
|
-
_this3.handleChatPermissionUpdate('everyone');
|
|
830
|
-
_this3.updateChatLevel('everyone');
|
|
831
|
-
}
|
|
832
|
-
}), (0, _mobx.reaction)(function () {
|
|
833
|
-
return _this3.hasChatPermission;
|
|
834
|
-
}, function (state) {
|
|
835
|
-
if (state) {
|
|
836
|
-
_this3.setTargetUser(allToUser);
|
|
837
|
-
}
|
|
838
|
-
}));
|
|
839
|
-
}
|
|
840
|
-
}, {
|
|
841
|
-
key: "initReadInfo",
|
|
842
|
-
value: function initReadInfo() {
|
|
843
|
-
this.resetComponentCache();
|
|
844
|
-
this.lastReadInfo = _objectSpread({}, this.readMsgIndex);
|
|
845
|
-
if (this.lastReadInfo.index < this.messageList.length - 1) {
|
|
846
|
-
this.hasHistoryMsg = true;
|
|
847
|
-
}
|
|
848
|
-
}
|
|
849
|
-
}, {
|
|
850
|
-
key: "updateHistoryUnreadCnt",
|
|
851
|
-
value: function updateHistoryUnreadCnt(historyUnreadCount) {
|
|
852
|
-
this.historyUnreadCount = historyUnreadCount;
|
|
853
|
-
}
|
|
854
|
-
}, {
|
|
855
|
-
key: "updateHasHistoryMsg",
|
|
856
|
-
value: function updateHasHistoryMsg(hasHistoryMsg) {
|
|
857
|
-
this.hasHistoryMsg = hasHistoryMsg;
|
|
858
|
-
}
|
|
859
|
-
}, {
|
|
860
|
-
key: "updateScrollInfo",
|
|
861
|
-
value: function updateScrollInfo(listScrollHeight, listScrollTop, listClientHeight) {
|
|
862
|
-
this.scrollHeight = listScrollHeight;
|
|
863
|
-
this.scrollTop = listScrollTop;
|
|
864
|
-
this.clientHeight = listClientHeight;
|
|
865
|
-
}
|
|
866
|
-
}, {
|
|
867
|
-
key: "updateViewIdx",
|
|
868
|
-
value: function updateViewIdx(viewIdx) {
|
|
869
|
-
this.viewIdx = viewIdx;
|
|
870
|
-
}
|
|
871
|
-
}, {
|
|
872
|
-
key: "updateReadIdx",
|
|
873
|
-
value: function updateReadIdx(readIdx) {
|
|
874
|
-
this.readIdx = readIdx;
|
|
875
|
-
}
|
|
876
|
-
}, {
|
|
877
|
-
key: "updateFirstMsgId",
|
|
878
|
-
value: function updateFirstMsgId(firstMsgId) {
|
|
879
|
-
this.firstMsgId = firstMsgId;
|
|
880
|
-
}
|
|
881
|
-
}, {
|
|
882
|
-
key: "updateHistoryUnReadCount",
|
|
883
|
-
value: function updateHistoryUnReadCount(historyUnReadCount) {
|
|
884
|
-
this.historyUnreadCount = historyUnReadCount;
|
|
885
|
-
}
|
|
886
|
-
}, {
|
|
887
|
-
key: "updateList",
|
|
888
|
-
value: function updateList(list) {
|
|
889
|
-
this.list = list;
|
|
890
|
-
}
|
|
891
|
-
}, {
|
|
892
|
-
key: "updateMostRecentHeight",
|
|
893
|
-
value: function updateMostRecentHeight(mostRecentHeight) {
|
|
894
|
-
this.mostRecentHeight = mostRecentHeight;
|
|
895
|
-
}
|
|
896
|
-
}, {
|
|
897
|
-
key: "updateMostRecentWidth",
|
|
898
|
-
value: function updateMostRecentWidth(mostRecentWidth) {
|
|
899
|
-
this.mostRecentWidth = mostRecentWidth;
|
|
900
|
-
}
|
|
901
|
-
}, {
|
|
902
|
-
key: "patchHandleMsg",
|
|
903
|
-
value: function patchHandleMsg() {
|
|
904
|
-
var _this4 = this;
|
|
905
|
-
var isBottom = this.clientHeight === 0 || this.clientHeight >= this.scrollHeight || Math.abs(this.scrollHeight - this.clientHeight - this.scrollTop) < 1;
|
|
906
|
-
if (!isBottom) {
|
|
907
|
-
this.newMsgsUnReadCnt = this._originalMessages.length;
|
|
908
|
-
return;
|
|
909
|
-
}
|
|
910
|
-
var notifyMsgs = this._originalMessages.splice(0, this.newMsgsUnReadCnt || 10);
|
|
911
|
-
// 通知列表中前10条消息
|
|
912
|
-
notifyMsgs.forEach(function (msg) {
|
|
913
|
-
_this4._handleTextMessageReceived(msg);
|
|
243
|
+
this._disposers.forEach(function (disposer) {
|
|
244
|
+
return disposer();
|
|
914
245
|
});
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
// TODO: 消息批量更新, 优化
|
|
918
|
-
}
|
|
919
|
-
}, {
|
|
920
|
-
key: "forceNotifyMsgs",
|
|
921
|
-
value: function forceNotifyMsgs() {
|
|
922
|
-
this.patchHandleMsg();
|
|
923
|
-
}
|
|
924
|
-
}, {
|
|
925
|
-
key: "resetComponentCache",
|
|
926
|
-
value: function resetComponentCache() {
|
|
927
|
-
this.newMsgsUnReadCnt = 0;
|
|
928
|
-
this.clientHeight = 0;
|
|
929
|
-
this.scrollTop = 0;
|
|
930
|
-
this.scrollHeight = 0;
|
|
931
|
-
this.mostRecentHeight = 0;
|
|
932
|
-
this.cache.clearAll();
|
|
933
|
-
this.list = undefined;
|
|
934
|
-
this.readIdx = 0;
|
|
935
|
-
this.viewIdx = 0;
|
|
936
|
-
this.firstMsgId = '';
|
|
937
|
-
this.historyUnreadCount = 0;
|
|
938
|
-
this.hasHistoryMsg = false;
|
|
939
|
-
this.lastReadInfo = {
|
|
940
|
-
index: -1,
|
|
941
|
-
msgId: ''
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
}, {
|
|
945
|
-
key: "resetTargetUser",
|
|
946
|
-
value: function resetTargetUser() {
|
|
947
|
-
if (this.chatLevel === 'public' || this.chatLevel === 'everyone') {
|
|
948
|
-
this.privateTargetUser = allToUser;
|
|
949
|
-
} else if (this.chatLevel === 'private_to_manager' && !this.localIsManager) {
|
|
950
|
-
this.privateTargetUser = this._noUser;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
}, {
|
|
954
|
-
key: "initChatLevel",
|
|
955
|
-
value: function initChatLevel() {
|
|
956
|
-
if (this.allowedAllChat) {
|
|
957
|
-
this.updateChatLevel('everyone');
|
|
958
|
-
} else if (this.allowedPublicChatAndDisallowedPrivateChat) {
|
|
959
|
-
this.updateChatLevel('public');
|
|
960
|
-
} else if (this.disallowedPublicChatAndDisallowedPrivateChatToParticipant) {
|
|
961
|
-
this.updateChatLevel('private_to_manager');
|
|
962
|
-
} else if (this.disallowedAllChat) {
|
|
963
|
-
this.updateChatLevel('no_one');
|
|
964
|
-
}
|
|
965
|
-
}
|
|
966
|
-
}, {
|
|
967
|
-
key: "setTargetUser",
|
|
968
|
-
value: function setTargetUser(user) {
|
|
969
|
-
this.privateTargetUser = user;
|
|
970
|
-
}
|
|
971
|
-
}, {
|
|
972
|
-
key: "targetUserIsOnline",
|
|
973
|
-
get: function get() {
|
|
974
|
-
var _this5 = this;
|
|
975
|
-
if (this.privateTargetUser.userId === USER_ALL || this.privateTargetUser.userId === USER_NONE) {
|
|
976
|
-
return true;
|
|
977
|
-
}
|
|
978
|
-
return this.remoteUsers.some(function (remoteUser) {
|
|
979
|
-
return remoteUser.userId === _this5.privateTargetUser.userId;
|
|
980
|
-
});
|
|
981
|
-
}
|
|
982
|
-
}, {
|
|
983
|
-
key: "remoteUsers",
|
|
984
|
-
get: function get() {
|
|
985
|
-
var _this6 = this;
|
|
986
|
-
var list = Array.from(this.currentUserMap.values());
|
|
987
|
-
return list.filter(function (user) {
|
|
988
|
-
return user.userId !== _this6._userInfo.userId;
|
|
989
|
-
});
|
|
990
|
-
}
|
|
991
|
-
}, {
|
|
992
|
-
key: "handleChatPermissionUpdate",
|
|
993
|
-
value: function handleChatPermissionUpdate(chatLevel) {
|
|
994
|
-
var _this$privilegeOperat;
|
|
995
|
-
var _ref5 = (_this$privilegeOperat = this.privilegeOperator) !== null && _this$privilegeOperat !== void 0 ? _this$privilegeOperat : {},
|
|
996
|
-
userId = _ref5.userId,
|
|
997
|
-
userName = _ref5.userName,
|
|
998
|
-
userRole = _ref5.userRole;
|
|
999
|
-
var msg = {
|
|
1000
|
-
id: String(new Date().getTime()),
|
|
1001
|
-
role: userRole === _type.FcrUserRole.PARTICIPANT ? 'participant' : userRole === _type.FcrUserRole.COHOST ? 'union-host' : 'host',
|
|
1002
|
-
time: Date.now(),
|
|
1003
|
-
msg: '',
|
|
1004
|
-
color: '',
|
|
1005
|
-
nickName: userName !== null && userName !== void 0 ? userName : '',
|
|
1006
|
-
uid: userId !== null && userId !== void 0 ? userId : '',
|
|
1007
|
-
systemMsg: true,
|
|
1008
|
-
chatLevel: chatLevel,
|
|
1009
|
-
isPrivate: false
|
|
1010
|
-
};
|
|
1011
|
-
|
|
1012
|
-
// 处理聊天权限变更时的系统消息
|
|
1013
|
-
this.handleNewMsg(msg);
|
|
1014
|
-
}
|
|
1015
|
-
}, {
|
|
1016
|
-
key: "updateChatLevel",
|
|
1017
|
-
value: function updateChatLevel(chatLevel) {
|
|
1018
|
-
this.chatLevel = chatLevel;
|
|
1019
|
-
}
|
|
1020
|
-
}, {
|
|
1021
|
-
key: "privilegeOperator",
|
|
1022
|
-
get: function get() {
|
|
1023
|
-
return this._securityStore.privilegeOperator;
|
|
1024
|
-
}
|
|
1025
|
-
}, {
|
|
1026
|
-
key: "updateChatTextMsg",
|
|
1027
|
-
value: function updateChatTextMsg(txt) {
|
|
1028
|
-
this.textMsg = txt;
|
|
1029
|
-
}
|
|
1030
|
-
}, {
|
|
1031
|
-
key: "filterChatMember",
|
|
1032
|
-
value: function filterChatMember(list) {
|
|
1033
|
-
var _this7 = this;
|
|
1034
|
-
var res = list.filter(function (user) {
|
|
1035
|
-
return _this7._securityStore.hasPermissionToSendPrivateMessage(user.userRole) || user.userId === USER_ALL;
|
|
1036
|
-
});
|
|
1037
|
-
if (res.length && _constant.RoomType.WAITING_ROOM === this._type && !this.localIsManager) {
|
|
1038
|
-
this.setTargetUser(res[0]);
|
|
1039
|
-
}
|
|
1040
|
-
return res;
|
|
1041
|
-
}
|
|
1042
|
-
}, {
|
|
1043
|
-
key: "hasSendMessagePermission",
|
|
1044
|
-
value: function hasSendMessagePermission() {
|
|
1045
|
-
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);
|
|
1046
|
-
}
|
|
1047
|
-
}, {
|
|
1048
|
-
key: "permitPrivateChat",
|
|
1049
|
-
value: function permitPrivateChat(userId) {
|
|
1050
|
-
var targetUser = this.remoteUsers.find(function (user) {
|
|
1051
|
-
return user.userId === userId;
|
|
1052
|
-
});
|
|
1053
|
-
if (!targetUser) {
|
|
1054
|
-
return;
|
|
1055
|
-
}
|
|
1056
|
-
if (!this._securityStore.permitPrivateChat(userId)) {
|
|
1057
|
-
return;
|
|
1058
|
-
}
|
|
1059
|
-
this.setTargetUser(targetUser);
|
|
1060
|
-
}
|
|
1061
|
-
}, {
|
|
1062
|
-
key: "handleToast",
|
|
1063
|
-
value: function handleToast(params) {
|
|
1064
|
-
this._uiEventStore.showChatToast(_objectSpread(_objectSpread({
|
|
1065
|
-
id: params.id
|
|
1066
|
-
}, params.toastProps), {}, {
|
|
1067
|
-
message: params.toastProps.content
|
|
1068
|
-
}));
|
|
1069
|
-
}
|
|
1070
|
-
}, {
|
|
1071
|
-
key: "isHostOrCoHost",
|
|
1072
|
-
get: function get() {
|
|
1073
|
-
return this._userInfo.userRole === _type.FcrUserRole.HOST || this._userInfo.userRole === _type.FcrUserRole.COHOST;
|
|
1074
|
-
}
|
|
1075
|
-
}, {
|
|
1076
|
-
key: "setAllowChat",
|
|
1077
|
-
value: function setAllowChat(allowChat) {
|
|
1078
|
-
this._securityStore.setAllowChat(allowChat);
|
|
1079
|
-
}
|
|
1080
|
-
}, {
|
|
1081
|
-
key: "setAllowChatWithPayload",
|
|
1082
|
-
value: function setAllowChatWithPayload(type) {
|
|
1083
|
-
switch (type) {
|
|
1084
|
-
case 'public':
|
|
1085
|
-
this._securityStore.setAllowedPublicChatAndDisallowedPrivateChat();
|
|
1086
|
-
break;
|
|
1087
|
-
case 'private_to_manager':
|
|
1088
|
-
this._securityStore.setDisallowedPublicChatAndDisallowedPrivateChatToParticipant();
|
|
1089
|
-
break;
|
|
1090
|
-
}
|
|
1091
|
-
}
|
|
1092
|
-
}, {
|
|
1093
|
-
key: "_handleConnectionUpdated",
|
|
1094
|
-
value: function _handleConnectionUpdated(_, state) {
|
|
1095
|
-
this.chatRoomState = state;
|
|
1096
|
-
}
|
|
1097
|
-
}, {
|
|
1098
|
-
key: "_initChatRoomConnectionState",
|
|
1099
|
-
value: function _initChatRoomConnectionState(state) {
|
|
1100
|
-
this.chatRoomState = state;
|
|
246
|
+
this._disposers = [];
|
|
1101
247
|
}
|
|
1102
248
|
}]);
|
|
1103
249
|
}();
|
|
1104
|
-
|
|
1105
|
-
var _applyDecs$
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
_init_viewIdx = _applyDecs$e2[4];
|
|
1111
|
-
_init_historyUnreadCount = _applyDecs$e2[5];
|
|
1112
|
-
_init_hasHistoryMsg = _applyDecs$e2[6];
|
|
1113
|
-
_init_newMsgsUnReadCnt = _applyDecs$e2[7];
|
|
1114
|
-
_init_privateTargetUser = _applyDecs$e2[8];
|
|
1115
|
-
_init_chatLevel = _applyDecs$e2[9];
|
|
1116
|
-
_init_currentUserMap = _applyDecs$e2[10];
|
|
1117
|
-
_init_textMsg = _applyDecs$e2[11];
|
|
1118
|
-
_init_privateTargetList = _applyDecs$e2[12];
|
|
1119
|
-
_init_chatRoomState = _applyDecs$e2[13];
|
|
1120
|
-
_init_hasNewMsg = _applyDecs$e2[14];
|
|
1121
|
-
_init_userCount = _applyDecs$e2[15];
|
|
1122
|
-
_init_unReadMsgCount = _applyDecs$e2[16];
|
|
1123
|
-
_initProto2 = _applyDecs$e2[17];
|
|
250
|
+
_ChatStore = ChatStore;
|
|
251
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ChatStore, [[_mobx.observable, 1, "chatRoomStores"], [_mobx.observable, 1, "activeTabIndex"], [_mobx.observable, 1, "roomType"], [_decorator.bound, 2, "hasWaitingRoomPermission"], [_handleReceiveMessageDecs, 18, "_handleReceiveMessage"], [_handlerActiveTabDecs, 18, "handlerActiveTab"], [_handleEventDecs, 18, "_handleEvent"], [_releaseDecs, 18, "release"]], []).e, 4);
|
|
252
|
+
_init_chatRoomStores = _applyDecs$e[0];
|
|
253
|
+
_init_activeTabIndex = _applyDecs$e[1];
|
|
254
|
+
_init_roomType = _applyDecs$e[2];
|
|
255
|
+
_initProto = _applyDecs$e[3];
|
|
1124
256
|
function isManager(role) {
|
|
1125
257
|
return role === _type.FcrUserRole.HOST || role === _type.FcrUserRole.COHOST;
|
|
1126
258
|
}
|
|
1127
259
|
var rolePriority = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _type.FcrUserRole.HOST, 1), _type.FcrUserRole.COHOST, 2), _type.FcrUserRole.PARTICIPANT, 3);
|
|
1128
260
|
function sortUsers(users) {
|
|
1129
261
|
return users.sort(function (a, b) {
|
|
1130
|
-
var userAll =
|
|
262
|
+
var userAll = _types.ALL_TO_USER.userId;
|
|
1131
263
|
if (a.userId === userAll && b.userId !== userAll) {
|
|
1132
264
|
return -1;
|
|
1133
265
|
} else if (a.userId !== userAll && b.userId === userAll) {
|