fcr-ui-scene 3.4.2 → 3.4.4
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/common/device-store.d.ts +23 -14
- package/lib/common/device-store.js +361 -252
- package/lib/common/device-stream-store.d.ts +8 -14
- package/lib/common/device-stream-store.js +254 -116
- package/lib/common/event-store.d.ts +35 -10
- package/lib/common/event-store.js +64 -13
- package/lib/common/security-store.d.ts +47 -39
- package/lib/common/security-store.js +335 -379
- package/lib/electron/app.js +1 -0
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +4 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +38 -21
- package/lib/modules/action-bar/components/apps/useWidgetList.d.ts +7 -0
- package/lib/modules/action-bar/components/apps/useWidgetList.js +43 -0
- package/lib/modules/action-bar/components/leave/assign-host.d.ts +8 -1
- package/lib/modules/action-bar/components/leave/assign-host.js +1 -1
- package/lib/modules/action-bar/components/leave/leave-meeting.d.ts +16 -1
- package/lib/modules/action-bar/smaller.js +5 -5
- package/lib/modules/chat/chat-bar/index.css +6 -0
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +51 -39
- package/lib/modules/chat/chat-select/index.css +27 -7
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +18 -4
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +196 -128
- package/lib/modules/chat/components/chat-select/select-input/index.d.ts +7 -0
- package/lib/modules/chat/components/chat-select/select-input/index.js +35 -0
- package/lib/modules/chat/components/chat-select/select-item/index.d.ts +12 -0
- package/lib/modules/chat/components/chat-select/select-item/index.js +153 -0
- package/lib/modules/chat/components/chat-tabs/index.d.ts +2 -0
- package/lib/modules/chat/components/chat-tabs/index.js +61 -0
- package/lib/modules/chat/components/message-list/chat-empty/index.d.ts +2 -0
- package/lib/modules/chat/components/message-list/chat-empty/index.js +26 -0
- package/lib/modules/chat/components/message-list/history-unread-message-button/index.d.ts +7 -0
- package/lib/modules/chat/components/message-list/history-unread-message-button/index.js +55 -0
- package/lib/modules/chat/components/message-list/message-item/index.d.ts +15 -0
- package/lib/modules/chat/components/message-list/message-item/index.js +279 -0
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.d.ts +9 -0
- package/lib/modules/chat/components/message-list/scroll-bottom-button/index.js +67 -0
- package/lib/modules/chat/message-list.js +68 -51
- package/lib/modules/components/dialog-container/component/body.js +1 -2
- package/lib/modules/components/dialog-container/index.d.ts +2 -2
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.d.ts +6 -0
- package/lib/modules/components/member-window/components/member-actions/components/audio-control.js +36 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.d.ts +40 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-buttons/index.js +170 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.d.ts +11 -0
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +105 -0
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.d.ts +9 -0
- package/lib/modules/components/member-window/components/member-actions/components/layout/index.js +42 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.d.ts +11 -0
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +159 -0
- package/lib/modules/components/member-window/components/member-actions/components/share-status.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/components/share-status.js +32 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-info.d.ts +16 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-info.js +130 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.d.ts +12 -0
- package/lib/modules/components/member-window/components/member-actions/components/user-tag.js +57 -0
- package/lib/modules/components/member-window/components/member-actions/index.d.ts +3 -0
- package/lib/modules/components/member-window/components/member-actions/index.js +122 -0
- package/lib/modules/components/member-window/components/member-actions/libs/index.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-actions/libs/index.js +24 -0
- package/lib/modules/components/member-window/components/member-actions/provider.d.ts +21 -0
- package/lib/modules/components/member-window/components/member-actions/provider.js +77 -0
- package/lib/modules/components/member-window/components/member-actions/store.d.ts +48 -0
- package/lib/modules/components/member-window/components/member-actions/store.js +306 -0
- package/lib/modules/components/member-window/components/member-board.d.ts +2 -0
- package/lib/modules/components/member-window/components/member-board.js +63 -0
- package/lib/modules/components/member-window/components/mic-volume.d.ts +2 -0
- package/lib/modules/components/member-window/components/mic-volume.js +23 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.d.ts +4 -0
- package/lib/modules/components/member-window/components/video-player/components/local-video-player.js +40 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.d.ts +8 -0
- package/lib/modules/components/member-window/components/video-player/components/remote-video-player.js +62 -0
- package/lib/modules/components/member-window/components/video-player/index.d.ts +9 -0
- package/lib/modules/components/member-window/components/video-player/index.js +38 -0
- package/lib/modules/components/member-window/types.d.ts +78 -0
- package/lib/modules/components/member-window/types.js +6 -0
- package/lib/modules/connection-gateway/components/tabs/index.js +2 -1
- package/lib/modules/control-bar/components/meeting-details/index.js +7 -15
- package/lib/modules/control-bar/components/more-actions/index.js +5 -15
- package/lib/modules/dialog/components/system-preference/assets/bg1.png +0 -0
- package/lib/modules/dialog/components/system-preference/assets/bg2.png +0 -0
- package/lib/modules/dialog/components/system-preference/assets/fcr_png_host.png +0 -0
- package/lib/modules/dialog/components/widget/electron.d.ts +5 -0
- package/lib/modules/dialog/components/widget/electron.js +41 -0
- package/lib/modules/dialog/components/widget/index.d.ts +6 -0
- package/lib/modules/dialog/components/widget/index.js +41 -0
- package/lib/modules/dialog/type.d.ts +84 -0
- package/lib/modules/dialog/type.js +6 -0
- package/lib/modules/invite/components/pstn-invite.js +4 -13
- package/lib/modules/invite/pstn-invite.js +7 -9
- package/lib/modules/invite/store.d.ts +2 -0
- package/lib/modules/invite/store.js +6 -0
- package/lib/modules/invite/voip-invite.js +5 -6
- package/lib/modules/layout/member-window/index.css +116 -18
- package/lib/modules/layout/member-window/index.d.ts +10 -3
- package/lib/modules/layout/member-window/index.js +227 -115
- package/lib/modules/participant/attendee/index.css +0 -51
- package/lib/modules/participant/attendee/index.d.ts +8 -5
- package/lib/modules/participant/attendee/index.js +61 -15
- package/lib/modules/participant/components/attendee/components/interpreter-tag/index.d.ts +3 -0
- package/lib/modules/participant/components/attendee/components/interpreter-tag/index.js +48 -0
- package/lib/modules/participant/components/confirm-input/index.d.ts +6 -0
- package/lib/modules/participant/components/confirm-input/index.js +49 -0
- package/lib/modules/participant/components/drop-menu/util.d.ts +5 -0
- package/lib/modules/participant/components/drop-menu/util.js +28 -0
- package/lib/modules/participant/components/participants/components/footer/components/buttons.d.ts +6 -0
- package/lib/modules/participant/components/participants/components/footer/components/buttons.js +52 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.css +60 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/index.js +166 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/components/drop-menu/util.js +28 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.css +13 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/components/footer/index.js +242 -0
- package/lib/modules/participant/components/participants/components/footer/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/footer/index.js +47 -0
- package/lib/modules/participant/components/participants/components/merge/index.d.ts +11 -0
- package/lib/modules/participant/components/participants/components/merge/index.js +49 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.css +191 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.d.ts +4 -0
- package/lib/modules/participant/components/participants/components/participants/components/attendee/index.js +204 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.css +49 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/participants/components/participants-more/index.js +219 -0
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/participants/components/user-row/index.js +70 -0
- package/lib/modules/participant/components/participants/components/participants/index.css +104 -0
- package/lib/modules/participant/components/participants/components/participants/index.d.ts +3 -0
- package/lib/modules/participant/components/participants/components/participants/index.js +110 -0
- package/lib/modules/participant/components/participants/components/render-tab/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/render-tab/index.js +49 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.d.ts +3 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/interpreter-tag/index.js +48 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.d.ts +6 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/microphone-indicator/index.js +28 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.d.ts +7 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/components/user-avatar/index.js +39 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +69 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.js +135 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.d.ts +7 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/audio-button/index.js +31 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.d.ts +12 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-actions-popover/index.js +82 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.d.ts +4 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/components/move-to-mainroom-button/index.js +26 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/components/render-user/components/user-action/index.js +75 -0
- package/lib/modules/participant/components/participants/components/render-user/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/components/render-user/index.js +21 -0
- package/lib/modules/participant/components/participants/render-tab/index.d.ts +2 -0
- package/lib/modules/participant/components/participants/render-tab/index.js +49 -0
- package/lib/modules/participant/components/participants/render-user/index.d.ts +5 -0
- package/lib/modules/participant/components/participants/render-user/index.js +21 -0
- package/lib/modules/participant/components/participants/types.d.ts +96 -0
- package/lib/modules/participant/components/participants/types.js +37 -0
- package/lib/modules/participant/components/user-action/audio-button/index.d.ts +7 -0
- package/lib/modules/participant/components/user-action/audio-button/index.js +31 -0
- package/lib/modules/participant/components/user-action/move-actions-popover/index.d.ts +12 -0
- package/lib/modules/participant/components/user-action/move-actions-popover/index.js +82 -0
- package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.d.ts +4 -0
- package/lib/modules/participant/components/user-action/move-to-mainroom-button/index.js +26 -0
- package/lib/modules/share-screen/selection/index.css +4 -0
- package/lib/modules/share-screen/selection/index.js +126 -129
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/state-bar/meeting-details.js +29 -34
- package/lib/modules/video-window/components/deviceState/index.d.ts +7 -0
- package/lib/modules/video-window/components/deviceState/index.js +75 -0
- package/lib/modules/video-window/components/members/index.css +51 -0
- package/lib/modules/video-window/components/members/index.d.ts +2 -0
- package/lib/modules/video-window/components/members/index.js +130 -0
- package/lib/modules/video-window/components/speaking/index.css +86 -0
- package/lib/modules/video-window/components/speaking/index.d.ts +3 -0
- package/lib/modules/video-window/components/speaking/index.js +48 -0
- package/lib/modules/video-window/components/topControl/index.css +35 -0
- package/lib/modules/video-window/components/topControl/index.d.ts +3 -0
- package/lib/modules/video-window/components/topControl/index.js +79 -0
- package/lib/modules/widget/index.css +17 -0
- package/lib/modules/widget/index.d.ts +10 -0
- package/lib/modules/widget/index.js +114 -0
- package/lib/modules/widget/sdk.d.ts +30 -0
- package/lib/modules/widget/sdk.js +221 -0
- package/lib/modules/widget/store.d.ts +14 -0
- package/lib/modules/widget/store.js +28 -0
- package/lib/modules/widget/type.d.ts +155 -0
- package/lib/modules/widget/type.js +6 -0
- package/lib/modules/widget/view.d.ts +2 -0
- package/lib/modules/widget/view.js +47 -0
- package/lib/modules/widget/web-widget.d.ts +29 -0
- package/lib/modules/widget/web-widget.js +234 -0
- package/lib/providers/ability-provider.d.ts +24 -0
- package/lib/providers/ability-provider.js +36 -0
- package/lib/providers/widget-provider.d.ts +44 -0
- package/lib/providers/widget-provider.js +167 -0
- package/lib/schema.d.ts +114 -0
- package/lib/schema.js +77 -0
- package/lib/shared-data-source/member-data.d.ts +126 -0
- package/lib/shared-data-source/member-data.js +465 -0
- package/lib/translations/enUS.d.ts +5 -0
- package/lib/translations/enUS.js +9 -3
- package/lib/translations/zhCN.d.ts +5 -0
- package/lib/translations/zhCN.js +13 -7
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/logger.d.ts +8 -0
- package/lib/utilities/logger.js +42 -0
- package/lib/utilities/meeting-detail.d.ts +2 -0
- package/lib/utilities/meeting-detail.js +56 -0
- package/lib/utilities/validate-params.d.ts +2 -0
- package/lib/utilities/validate-params.js +16 -0
- package/lib/widget-sdk.d.ts +2 -0
- package/lib/widget-sdk.js +13 -0
- package/package.json +5 -5
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { DialogKey, UIAction } from '../utilities/constant';
|
|
2
|
-
import { FcrUserInfo } from '
|
|
1
|
+
import { DialogKey, RoomType, UIAction } from '../utilities/constant';
|
|
2
|
+
import { FcrUserInfo } from 'fcr-core/lib/type';
|
|
3
3
|
import { DeviceSettingDialogConfig, CustomSetting } from '../modules/setting/store';
|
|
4
4
|
import { FcrUIExitReason } from '../type';
|
|
5
5
|
import { ToastSize } from 'agora-ui-foundation/lib/components/toast';
|
|
6
6
|
import { FcrIconType } from 'agora-ui-foundation/lib/components/icon/type';
|
|
7
7
|
import { ButtonType } from 'agora-ui-foundation/lib/components/button';
|
|
8
8
|
import { ConfirmContentProps } from 'agora-ui-foundation/lib/components/confirm-content';
|
|
9
|
-
import { FcrChatRoomReceiveBaseMessage } from '
|
|
10
|
-
|
|
9
|
+
import { FcrChatRoomReceiveBaseMessage } from 'fcr-core/lib/room-control/chatroom-control/type';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export interface FcrUIDialogParams<T> {
|
|
11
12
|
dialogKey: DialogKey;
|
|
12
13
|
dialogId: string;
|
|
13
|
-
params?: unknown;
|
|
14
|
+
params?: T extends unknown ? unknown : T;
|
|
14
15
|
}
|
|
15
16
|
export interface FcrUIToastParams {
|
|
16
17
|
type: 'error' | 'warn' | 'info' | 'normal';
|
|
@@ -20,6 +21,18 @@ export interface FcrUIToastParams {
|
|
|
20
21
|
size?: ToastSize;
|
|
21
22
|
customRootClass?: string;
|
|
22
23
|
}
|
|
24
|
+
export declare enum NotificationContentType {
|
|
25
|
+
WAITING_ROOM = "WAITING_ROOM",
|
|
26
|
+
INTERPRETER_STATUS = "INTERPRETER_STATUS"
|
|
27
|
+
}
|
|
28
|
+
export interface FcrNotificationParams {
|
|
29
|
+
duration?: number;
|
|
30
|
+
placement: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
|
|
31
|
+
type: NotificationContentType;
|
|
32
|
+
onOk?: () => void;
|
|
33
|
+
onClose?: () => void;
|
|
34
|
+
data?: any;
|
|
35
|
+
}
|
|
23
36
|
export interface FcrUIConfirmDialogParams {
|
|
24
37
|
title: string;
|
|
25
38
|
content: React.ReactNode;
|
|
@@ -44,6 +57,7 @@ export interface FcrUIUpdateAsideParams {
|
|
|
44
57
|
export interface FcrUINewChatMessagesParams {
|
|
45
58
|
latestMessage: FcrChatRoomReceiveBaseMessage;
|
|
46
59
|
count: number;
|
|
60
|
+
type: string;
|
|
47
61
|
}
|
|
48
62
|
export interface FcrUIToggleLayoutParams {
|
|
49
63
|
layout: 'speaker' | 'gallery';
|
|
@@ -82,12 +96,22 @@ export declare class FcrUIEventStore {
|
|
|
82
96
|
private _observable;
|
|
83
97
|
sendEvent(action: UIAction, payload?: unknown): void;
|
|
84
98
|
showToast(params: FcrUIToastParams): void;
|
|
99
|
+
showNotification(params: FcrNotificationParams): void;
|
|
100
|
+
closeNotification(key: NotificationContentType): void;
|
|
85
101
|
showChatToast(params: FcrUIToastParams): void;
|
|
102
|
+
/**
|
|
103
|
+
* 默认同一个 title 或 content 的 confirm 窗口只打开一个实例
|
|
104
|
+
* @param key 可以通过 key 区分相同 title 或 content 的 confirm 窗口
|
|
105
|
+
* @param duration 可以通过 duration 配置自动关闭时间
|
|
106
|
+
* @mulitple 可以通过 mulitple 配置打开多个实例(忽略 key)
|
|
107
|
+
* */
|
|
86
108
|
openConfirmDialog(params: ConfirmContentProps & {
|
|
87
|
-
|
|
88
|
-
|
|
109
|
+
key?: string;
|
|
110
|
+
duration?: number;
|
|
111
|
+
}, mulitple?: boolean): string;
|
|
89
112
|
openDialog(dialogKey: DialogKey, instanceId?: string, params?: unknown): string;
|
|
90
113
|
closeDialog(dialogId: string): void;
|
|
114
|
+
closeConfirm(dialogId: string): void;
|
|
91
115
|
startShareScreen(): void;
|
|
92
116
|
stopShareScreen(): void;
|
|
93
117
|
updateAside(params: FcrUIUpdateAsideParams): void;
|
|
@@ -106,14 +130,15 @@ export declare class FcrUIEventStore {
|
|
|
106
130
|
stopLiveStreaming(): void;
|
|
107
131
|
openInviteDialog(): void;
|
|
108
132
|
closeInviteDialog(): void;
|
|
109
|
-
|
|
110
|
-
|
|
133
|
+
closeWaitingRoomDialog(): void;
|
|
134
|
+
closeRemoveAdmitWaitingRoomDialog(dialogKey: DialogKey): void;
|
|
135
|
+
exitRoom(reason: FcrUIExitReason, roomType: number): void;
|
|
111
136
|
cloudRecording(action: FcrCloudRecordingParams['action']): void;
|
|
112
137
|
notifySpotlightStreamChanged(params: FcrSpotlightStreamChangedParams): void;
|
|
113
138
|
notifyCustomSettingsChanged(settings: CustomSetting): void;
|
|
114
139
|
addObserver(observer: FcrUIEventObserver): void;
|
|
115
140
|
removeObserver(observer: FcrUIEventObserver): void;
|
|
116
|
-
notifyChatUpdateTarget(user: FcrUserInfo): void;
|
|
141
|
+
notifyChatUpdateTarget(user: FcrUserInfo, roomType: RoomType): void;
|
|
117
142
|
notifyChatResetTarget(): void;
|
|
118
143
|
release(): void;
|
|
119
144
|
}
|
|
@@ -20,7 +20,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", {
|
|
21
21
|
value: true
|
|
22
22
|
});
|
|
23
|
-
exports.FcrUIEventStore = void 0;
|
|
23
|
+
exports.NotificationContentType = exports.FcrUIEventStore = void 0;
|
|
24
24
|
require("core-js/modules/es.array.concat.js");
|
|
25
25
|
require("core-js/modules/es.date.now.js");
|
|
26
26
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -32,6 +32,11 @@ var _logger = require("agora-foundation/lib/logger");
|
|
|
32
32
|
var _chat = require("../modules/chat");
|
|
33
33
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
34
34
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
35
|
+
var NotificationContentType = exports.NotificationContentType = /*#__PURE__*/function (NotificationContentType) {
|
|
36
|
+
NotificationContentType["WAITING_ROOM"] = "WAITING_ROOM";
|
|
37
|
+
NotificationContentType["INTERPRETER_STATUS"] = "INTERPRETER_STATUS";
|
|
38
|
+
return NotificationContentType;
|
|
39
|
+
}({});
|
|
35
40
|
var FcrUIEventStore = exports.FcrUIEventStore = /*#__PURE__*/function () {
|
|
36
41
|
function FcrUIEventStore() {
|
|
37
42
|
(0, _classCallCheck2["default"])(this, FcrUIEventStore);
|
|
@@ -41,13 +46,35 @@ var FcrUIEventStore = exports.FcrUIEventStore = /*#__PURE__*/function () {
|
|
|
41
46
|
return (0, _createClass2["default"])(FcrUIEventStore, [{
|
|
42
47
|
key: "sendEvent",
|
|
43
48
|
value: function sendEvent(action, payload) {
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
var start = Date.now();
|
|
50
|
+
try {
|
|
51
|
+
this._observable.notifyObservers('onEvent', action, payload);
|
|
52
|
+
} finally {
|
|
53
|
+
var end = Date.now();
|
|
54
|
+
var time = end - start;
|
|
55
|
+
if (time >= 10) {
|
|
56
|
+
this.logger.warn("[FcrUIEventStore] sendEvent ".concat(_constant.UIAction[action], ", payload: ").concat(payload, ", handlers took: ").concat(end - start, "ms"));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
46
59
|
}
|
|
47
60
|
}, {
|
|
48
61
|
key: "showToast",
|
|
49
62
|
value: function showToast(params) {
|
|
50
|
-
this.sendEvent(_constant.UIAction.
|
|
63
|
+
this.sendEvent(_constant.UIAction.OPEN_DIALOG, {
|
|
64
|
+
dialogKey: _constant.DialogKey.SHOW_TOAST,
|
|
65
|
+
dialogId: "".concat(_constant.DialogKey.SHOW_TOAST, "_").concat(Date.now()),
|
|
66
|
+
params: params
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
key: "showNotification",
|
|
71
|
+
value: function showNotification(params) {
|
|
72
|
+
this.sendEvent(_constant.UIAction.SHOW_NOTIFICATION, params);
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
key: "closeNotification",
|
|
76
|
+
value: function closeNotification(key) {
|
|
77
|
+
this.sendEvent(_constant.UIAction.COLSE_NOTIFICATION, key);
|
|
51
78
|
}
|
|
52
79
|
}, {
|
|
53
80
|
key: "showChatToast",
|
|
@@ -56,11 +83,18 @@ var FcrUIEventStore = exports.FcrUIEventStore = /*#__PURE__*/function () {
|
|
|
56
83
|
customRootClass: _chat.CHAT_WRAPPER_CLASS
|
|
57
84
|
}));
|
|
58
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 默认同一个 title 或 content 的 confirm 窗口只打开一个实例
|
|
89
|
+
* @param key 可以通过 key 区分相同 title 或 content 的 confirm 窗口
|
|
90
|
+
* @param duration 可以通过 duration 配置自动关闭时间
|
|
91
|
+
* @mulitple 可以通过 mulitple 配置打开多个实例(忽略 key)
|
|
92
|
+
* */
|
|
59
93
|
}, {
|
|
60
94
|
key: "openConfirmDialog",
|
|
61
|
-
value: function openConfirmDialog(params) {
|
|
95
|
+
value: function openConfirmDialog(params, mulitple) {
|
|
62
96
|
var dialogKey = _constant.DialogKey.CONFIRM;
|
|
63
|
-
var dialogId = "".concat(dialogKey, "_").concat(Date.now());
|
|
97
|
+
var dialogId = mulitple ? "".concat(dialogKey, "_").concat(Date.now()) : "".concat(dialogKey, "_").concat(params.key || params.title || params.content);
|
|
64
98
|
this.sendEvent(_constant.UIAction.OPEN_DIALOG, {
|
|
65
99
|
dialogKey: dialogKey,
|
|
66
100
|
dialogId: dialogId,
|
|
@@ -86,6 +120,14 @@ var FcrUIEventStore = exports.FcrUIEventStore = /*#__PURE__*/function () {
|
|
|
86
120
|
dialogId: dialogId
|
|
87
121
|
});
|
|
88
122
|
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "closeConfirm",
|
|
125
|
+
value: function closeConfirm(dialogId) {
|
|
126
|
+
this.sendEvent(_constant.UIAction.CLOSE_DIALOG, {
|
|
127
|
+
dialogId: dialogId,
|
|
128
|
+
dialogKey: _constant.DialogKey.CONFIRM
|
|
129
|
+
});
|
|
130
|
+
}
|
|
89
131
|
}, {
|
|
90
132
|
key: "startShareScreen",
|
|
91
133
|
value: function startShareScreen() {
|
|
@@ -185,15 +227,21 @@ var FcrUIEventStore = exports.FcrUIEventStore = /*#__PURE__*/function () {
|
|
|
185
227
|
this.sendEvent(_constant.UIAction.CLOSE_INVITE_DIALOG);
|
|
186
228
|
}
|
|
187
229
|
}, {
|
|
188
|
-
key: "
|
|
189
|
-
value: function
|
|
190
|
-
this.
|
|
230
|
+
key: "closeWaitingRoomDialog",
|
|
231
|
+
value: function closeWaitingRoomDialog() {
|
|
232
|
+
this.sendEvent(_constant.UIAction.CLOSE_WAITING_ROOM_DIALOG);
|
|
233
|
+
}
|
|
234
|
+
}, {
|
|
235
|
+
key: "closeRemoveAdmitWaitingRoomDialog",
|
|
236
|
+
value: function closeRemoveAdmitWaitingRoomDialog(dialogKey) {
|
|
237
|
+
this.sendEvent(_constant.UIAction.CLOSE_REMOVE_ADMIT_WAITING_ROOM_DIALOG, dialogKey);
|
|
191
238
|
}
|
|
192
239
|
}, {
|
|
193
240
|
key: "exitRoom",
|
|
194
|
-
value: function exitRoom(reason) {
|
|
241
|
+
value: function exitRoom(reason, roomType) {
|
|
195
242
|
this.sendEvent(_constant.UIAction.EXIT_ROOM, {
|
|
196
|
-
reason: reason
|
|
243
|
+
reason: reason,
|
|
244
|
+
roomType: roomType
|
|
197
245
|
});
|
|
198
246
|
}
|
|
199
247
|
}, {
|
|
@@ -225,8 +273,11 @@ var FcrUIEventStore = exports.FcrUIEventStore = /*#__PURE__*/function () {
|
|
|
225
273
|
}
|
|
226
274
|
}, {
|
|
227
275
|
key: "notifyChatUpdateTarget",
|
|
228
|
-
value: function notifyChatUpdateTarget(user) {
|
|
229
|
-
this.sendEvent(_constant.UIAction.CHAT_UPDATE_TARGET,
|
|
276
|
+
value: function notifyChatUpdateTarget(user, roomType) {
|
|
277
|
+
this.sendEvent(_constant.UIAction.CHAT_UPDATE_TARGET, {
|
|
278
|
+
user: user,
|
|
279
|
+
roomType: roomType
|
|
280
|
+
});
|
|
230
281
|
}
|
|
231
282
|
}, {
|
|
232
283
|
key: "notifyChatResetTarget",
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import { FcrPrivilegeControl, FcrStreamControl, FcrUserControl } from '
|
|
2
|
-
import { FcrUserRole, FcrUserInfo } from '
|
|
1
|
+
import { FcrPrivilegeControl, FcrStreamControl, FcrUserControl } from 'fcr-core';
|
|
2
|
+
import { FcrUserRole, FcrUserInfo, FcrLineType } from 'fcr-core/lib/type';
|
|
3
3
|
import { FcrUIEventStore } from './event-store';
|
|
4
|
-
import { FcrSharePermissionState } from '
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
public: 0 | 1;
|
|
9
|
-
private: {
|
|
10
|
-
host: 0 | 1;
|
|
11
|
-
cohost: 0 | 1;
|
|
12
|
-
participant: 0 | 1;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
4
|
+
import { FcrSharePermissionState } from 'fcr-core/lib/room-control/whiteboard-control/enums';
|
|
5
|
+
import { FcrPermissionInfo, FcrPrivilegeUserRole, FcrSecurityInfo, FcrSecuritySendChatPayload } from 'fcr-core/lib/room-control/privilege-control/type';
|
|
6
|
+
import { FcrInterpreterControl } from 'fcr-core/lib/room-control/interpreter-control/types';
|
|
7
|
+
import { FcrSecuritySendChatOriginalPayload } from './type';
|
|
15
8
|
export declare class FcrSecurityStore {
|
|
16
9
|
private _privilegeControl;
|
|
17
10
|
private _userControl;
|
|
18
11
|
private _streamControl;
|
|
19
|
-
private _roomSessionControl;
|
|
20
12
|
private _uiEventStore;
|
|
13
|
+
private _interpterControl?;
|
|
21
14
|
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
22
15
|
private _disposers;
|
|
16
|
+
private _prevWaterMarkEnable;
|
|
23
17
|
accessor securityInfos: FcrSecurityInfo[];
|
|
24
|
-
accessor permissionInfos: FcrPermissionInfo[]
|
|
18
|
+
accessor permissionInfos: FcrPermissionInfo[];
|
|
25
19
|
accessor privilegeOperator: FcrUserInfo | undefined;
|
|
26
20
|
accessor boardOwnerUser: FcrUserInfo | undefined;
|
|
27
|
-
|
|
21
|
+
get hasSecurityPermission(): boolean;
|
|
22
|
+
constructor(_privilegeControl: FcrPrivilegeControl, _userControl: FcrUserControl, _streamControl: FcrStreamControl, _uiEventStore: FcrUIEventStore, _interpterControl?: FcrInterpreterControl | undefined);
|
|
28
23
|
release(): void;
|
|
29
24
|
get localUser(): FcrUserInfo;
|
|
30
25
|
allowChangeSelfName: () => boolean;
|
|
31
26
|
allowChat: () => boolean;
|
|
27
|
+
getWaterMarkContent: () => string;
|
|
32
28
|
convertSendChatPayload: (payload: FcrSecuritySendChatOriginalPayload) => FcrSecuritySendChatPayload;
|
|
33
29
|
allowedAllChat: () => boolean | undefined;
|
|
34
30
|
allowedPublicChatAndDisallowedPrivateChat: () => boolean | undefined;
|
|
@@ -42,6 +38,8 @@ export declare class FcrSecurityStore {
|
|
|
42
38
|
allowUnmuteSelfAudio: () => boolean;
|
|
43
39
|
isLockRoomEnabled: () => boolean;
|
|
44
40
|
isWaitingRoomEnabled: () => boolean;
|
|
41
|
+
isWaterMarkEnabled: () => boolean;
|
|
42
|
+
hasWaitingRoomPermission: (role?: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
45
43
|
hasMutePermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
46
44
|
hasUnmutePermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
47
45
|
hasRequestStartAudioPermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
@@ -54,16 +52,17 @@ export declare class FcrSecurityStore {
|
|
|
54
52
|
hasAllUnmutePermission: () => boolean;
|
|
55
53
|
hasRevokeHostPermission: () => boolean;
|
|
56
54
|
hasKickOutPermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
57
|
-
hasCallMergePermission()
|
|
58
|
-
hasCallSplitPermission()
|
|
55
|
+
hasCallMergePermission: () => boolean;
|
|
56
|
+
hasCallSplitPermission: () => boolean;
|
|
59
57
|
hasStartScreenSharePermission: () => boolean;
|
|
60
58
|
hasChatSendPublicPermission: () => boolean;
|
|
59
|
+
hasChatSendPublicPermissionByTargetRole: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
61
60
|
hasPermissionToSendPrivateMessage: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
62
61
|
hasPermissionToControlAllowSendAll: () => boolean;
|
|
63
62
|
hasPermissionToControlDisallowSendAll: () => boolean;
|
|
64
63
|
hasPermissionToControlAllowSendPrivate: () => boolean;
|
|
65
64
|
hasPermissionToControlDisallowSendPrivate: () => boolean;
|
|
66
|
-
hasSetRolePermission(targetRole: FcrUserRole, setToRole: FcrPrivilegeUserRole | FcrUserRole)
|
|
65
|
+
hasSetRolePermission: (targetRole: FcrUserRole, setToRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
67
66
|
hasStartCloudRecordingPermission: () => boolean;
|
|
68
67
|
hasStartLiveStreamingPermission: () => boolean;
|
|
69
68
|
hasStopLiveStreamingPermission: () => boolean;
|
|
@@ -74,24 +73,33 @@ export declare class FcrSecurityStore {
|
|
|
74
73
|
hasEnableJoinWithAudioPermission: () => boolean;
|
|
75
74
|
hasEnableStartScreenSharePermission: () => boolean;
|
|
76
75
|
hasLockRoomPermission: () => boolean;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
76
|
+
hasWatermarkEnablePermission: () => boolean;
|
|
77
|
+
hasWatermarkDisablePermission: () => boolean;
|
|
78
|
+
hasEndRoomPermission: () => boolean;
|
|
79
|
+
hasAssignHostBeforeLeavingPermission: (role: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
80
|
+
hasStartBoardPermission: () => boolean;
|
|
81
|
+
hasCloseBoardPermission: () => boolean;
|
|
82
|
+
hasWriteBoardPermission: () => boolean;
|
|
83
|
+
hasAllowStartBoardPermission: () => boolean;
|
|
84
|
+
hasDisallowStartBoardPermission: () => boolean;
|
|
85
|
+
hasAllowWriteBoardPermission: () => boolean;
|
|
86
|
+
hasDisallowWriteBoardPermission: () => boolean;
|
|
87
|
+
hasAllowScreenShareAndBoardPermission: () => boolean;
|
|
88
|
+
hasAllowWaterMarkPermission: () => boolean;
|
|
89
|
+
hasEnableInterpreterPermission: () => boolean;
|
|
90
|
+
hasDisableInterpreterPermission: () => boolean;
|
|
91
|
+
hasAllowChangeNamePermission: () => boolean;
|
|
92
|
+
hasDisallowChangeNamePermission: () => boolean;
|
|
93
|
+
hasChangeNamePermission: (targetRole: FcrPrivilegeUserRole | FcrUserRole) => boolean;
|
|
94
|
+
isMulti: () => boolean;
|
|
95
|
+
getAllowedOperations: (targetUserRole: FcrUserRole, isSelf: boolean) => string[];
|
|
96
|
+
allowShare: (state: FcrSharePermissionState) => Promise<void>;
|
|
97
|
+
setAllowWriteBoard: (state: FcrSharePermissionState | boolean) => Promise<void>;
|
|
90
98
|
muteAll: () => void;
|
|
91
99
|
unmuteAll: () => void;
|
|
92
100
|
setLockRoomEnabled: (enable: boolean) => void;
|
|
93
101
|
setWaitingRoomEnabled: () => void;
|
|
94
|
-
setAllowChangeSelfName: () => void;
|
|
102
|
+
setAllowChangeSelfName: (enable: boolean) => void;
|
|
95
103
|
setAllowChat: (enable: boolean) => void;
|
|
96
104
|
setAllowChatWithPayload: (enable: boolean, payload: FcrSecuritySendChatPayload) => void;
|
|
97
105
|
setAllowedPublicChatAndDisallowedPrivateChat: () => void;
|
|
@@ -100,14 +108,14 @@ export declare class FcrSecurityStore {
|
|
|
100
108
|
setAllowShareScreen: (state: boolean) => void;
|
|
101
109
|
setAllowUnmuteSelfVideo: (enable: boolean) => void;
|
|
102
110
|
setAllowUnmuteSelfAudio: (enable: boolean) => void;
|
|
103
|
-
|
|
104
|
-
|
|
111
|
+
hasSendAllChatPermission: () => boolean;
|
|
112
|
+
private _hasPermission;
|
|
113
|
+
private _hasPermissionWithParams;
|
|
105
114
|
private _handlePermissionUpdated;
|
|
106
115
|
private _handleSecurityUpdated;
|
|
107
|
-
private _handleUnmuteSessionReceived;
|
|
108
116
|
permitPrivateChat(userId: string): boolean;
|
|
109
117
|
private _printAllPermissions;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
private _removeReactions;
|
|
118
|
+
setAllowWaterMark(state: boolean, lineType?: FcrLineType): Promise<void>;
|
|
119
|
+
_getInterpreterInfo(): import("fcr-core/lib/room-control/interpreter-control/types").FcrInterpreterUserInfo | null | undefined;
|
|
113
120
|
}
|
|
121
|
+
export declare const SecurityStoreContext: import("react").Context<FcrSecurityStore>;
|