fcr-ui-scene 3.7.7-rc.1 → 3.7.8
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/creator/provider-initializer.browser.js +2 -2
- package/lib/creator/provider-initializer.electron.js +2 -2
- package/lib/creator.d.ts +36 -0
- package/lib/creator.js +465 -0
- package/lib/electron/bootstrap-sdk.js +70 -33
- package/lib/electron/hang-detection/index.d.ts +3 -0
- package/lib/electron/hang-detection/index.js +15 -0
- package/lib/electron/hang-detection/manager.d.ts +28 -0
- package/lib/electron/hang-detection/manager.js +231 -0
- package/lib/electron/hang-detection/types.d.ts +14 -0
- package/lib/electron/hang-detection/types.js +6 -0
- package/lib/electron/until.d.ts +1 -4
- package/lib/electron/until.js +9 -4
- package/lib/modules/action-bar/components/screen-share/index.electron.js +1 -1
- package/lib/modules/action-bar/index.d.ts +56 -0
- package/lib/modules/action-bar/index.dev.d.ts +0 -0
- package/lib/modules/action-bar/index.dev.js +94 -0
- package/lib/modules/action-bar/index.js +108 -0
- package/lib/modules/action-bar/store.d.ts +256 -0
- package/lib/modules/action-bar/store.js +1572 -0
- package/lib/modules/action-bar/types.d.ts +90 -0
- package/lib/modules/action-bar/types.js +6 -0
- package/lib/modules/action-bar/view.d.ts +5 -0
- package/lib/modules/action-bar/view.js +112 -0
- package/lib/modules/annotation/annotation-index.d.ts +2 -0
- package/lib/modules/annotation/annotation-index.js +80 -0
- package/lib/modules/annotation/annotation-toolbar-store.d.ts +75 -0
- package/lib/modules/annotation/annotation-toolbar-store.js +459 -0
- package/lib/modules/annotation/board-cursor.css +77 -0
- package/lib/modules/annotation/components/color-picker/components/color.d.ts +5 -0
- package/lib/modules/annotation/components/color-picker/components/color.js +38 -0
- package/lib/modules/annotation/components/color-picker/components/panel.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/panel.js +109 -0
- package/lib/modules/annotation/components/color-picker/components/picker.d.ts +1 -0
- package/lib/modules/annotation/components/color-picker/components/picker.js +75 -0
- package/lib/modules/annotation/components/color-picker/index.d.ts +2 -0
- package/lib/modules/annotation/components/color-picker/index.js +47 -0
- package/lib/modules/annotation/components/eraser-picker.d.ts +4 -0
- package/lib/modules/annotation/components/eraser-picker.js +144 -0
- package/lib/modules/annotation/components/expansion/index.d.ts +1 -0
- package/lib/modules/annotation/components/expansion/index.js +100 -0
- package/lib/modules/annotation/components/extra-tool-picker.d.ts +1 -0
- package/lib/modules/annotation/components/extra-tool-picker.js +62 -0
- package/lib/modules/annotation/components/history.d.ts +2 -0
- package/lib/modules/annotation/components/history.js +78 -0
- package/lib/modules/annotation/components/icons/fold-icon.d.ts +2 -0
- package/lib/modules/annotation/components/icons/fold-icon.js +41 -0
- package/lib/modules/annotation/components/icons/move-icon.d.ts +1 -0
- package/lib/modules/annotation/components/icons/move-icon.js +66 -0
- package/lib/modules/annotation/components/item/index.d.ts +1 -0
- package/lib/modules/annotation/components/item/index.js +43 -0
- package/lib/modules/annotation/components/move-handle.d.ts +5 -0
- package/lib/modules/annotation/components/move-handle.js +134 -0
- package/lib/modules/annotation/components/pen-picker.d.ts +4 -0
- package/lib/modules/annotation/components/pen-picker.js +155 -0
- package/lib/modules/annotation/components/screen-capture-picker.d.ts +4 -0
- package/lib/modules/annotation/components/screen-capture-picker.js +85 -0
- package/lib/modules/annotation/components/shape-picker.d.ts +4 -0
- package/lib/modules/annotation/components/shape-picker.js +210 -0
- package/lib/modules/annotation/hooks/index.d.ts +14 -0
- package/lib/modules/annotation/hooks/index.js +292 -0
- package/lib/modules/annotation/index.d.ts +45 -0
- package/lib/modules/annotation/index.js +168 -0
- package/lib/modules/annotation/store.d.ts +98 -0
- package/lib/modules/annotation/store.js +621 -0
- package/lib/modules/annotation/style.css +36 -0
- package/lib/modules/annotation/view.d.ts +3 -0
- package/lib/modules/annotation/view.js +44 -0
- package/lib/modules/components/control-bar/components/switch-theme/index.js +4 -2
- package/lib/modules/components/control-bar/index.js +1 -3
- package/lib/modules/components/device-control/store.d.ts +42 -0
- package/lib/modules/components/device-control/store.js +241 -0
- package/lib/modules/components/leave-meeting/store.d.ts +39 -0
- package/lib/modules/components/leave-meeting/store.js +270 -0
- package/lib/modules/control-bar/components/annotation-button/index.d.ts +1 -0
- package/lib/modules/control-bar/components/annotation-button/index.js +72 -0
- package/lib/modules/control-bar/types.d.ts +20 -0
- package/lib/modules/control-bar/types.js +6 -0
- package/lib/modules/dialog/dialogs/pre-setting/index.css +26 -0
- package/lib/modules/dialog/dialogs/pre-setting/index.d.ts +6 -0
- package/lib/modules/dialog/dialogs/pre-setting/index.js +62 -0
- package/lib/modules/dialog/dialogs/widget/electron.d.ts +6 -0
- package/lib/modules/dialog/dialogs/widget/electron.js +38 -0
- package/lib/modules/dialog/hooks/use-popover-watcher.d.ts +14 -0
- package/lib/modules/dialog/hooks/use-popover-watcher.js +110 -0
- package/lib/modules/dialog/hooks/useElectron.d.ts +28 -0
- package/lib/modules/dialog/hooks/useElectron.js +277 -0
- package/lib/modules/dialog/store.d.ts +135 -0
- package/lib/modules/dialog/store.js +616 -0
- package/lib/modules/event-confirm/components/window/index.d.ts +4 -0
- package/lib/modules/event-confirm/components/window/index.js +197 -0
- package/lib/modules/event-confirm/index.css +24 -0
- package/lib/modules/event-confirm/index.d.ts +27 -0
- package/lib/modules/event-confirm/index.js +76 -0
- package/lib/modules/event-confirm/store.d.ts +45 -0
- package/lib/modules/event-confirm/store.js +345 -0
- package/lib/modules/event-confirm/view.d.ts +2 -0
- package/lib/modules/event-confirm/view.js +53 -0
- package/lib/modules/event-toast/store.d.ts +27 -0
- package/lib/modules/event-toast/store.js +205 -0
- package/lib/modules/layout/store.d.ts +176 -0
- package/lib/modules/layout/store.js +1466 -0
- package/lib/modules/participant/store.base.js +0 -1
- package/lib/modules/participant/store.d.ts +222 -0
- package/lib/modules/participant/store.js +1927 -0
- package/lib/modules/pc-audio-connect/index.d.ts +22 -0
- package/lib/modules/pc-audio-connect/index.js +67 -0
- package/lib/modules/pc-audio-connect/store.d.ts +46 -0
- package/lib/modules/pc-audio-connect/store.js +304 -0
- package/lib/modules/setting/common/advance-link.d.ts +3 -0
- package/lib/modules/setting/common/advance-link.js +27 -0
- package/lib/modules/setting/common/index.css +26 -0
- package/lib/modules/setting/common/useNamespace.d.ts +15 -0
- package/lib/modules/setting/common/useNamespace.js +66 -0
- package/lib/modules/setting/dialog-wrapper.d.ts +2 -0
- package/lib/modules/setting/dialog-wrapper.js +110 -0
- package/lib/modules/setting/store.d.ts +261 -0
- package/lib/modules/setting/store.js +1321 -0
- package/lib/modules/share-screen/store.d.ts +148 -0
- package/lib/modules/share-screen/store.electron.js +9 -0
- package/lib/modules/share-screen/store.js +950 -0
- package/lib/modules/share-screen/types.d.ts +26 -0
- package/lib/modules/share-screen/types.js +6 -0
- package/lib/modules/state-bar/store.base.electron.js +6 -2
- package/lib/modules/state-bar/store.d.ts +124 -0
- package/lib/modules/state-bar/store.js +664 -0
- package/lib/modules/whiteboard/components/progress/electron.d.ts +1 -0
- package/lib/modules/whiteboard/components/progress/electron.js +33 -0
- package/lib/modules/widget/store.d.ts +14 -0
- package/lib/modules/widget/store.js +28 -0
- package/lib/providers/annotation-provider.d.ts +124 -0
- package/lib/providers/annotation-provider.js +369 -0
- package/lib/providers/board-share/bar-control/base.d.ts +2 -0
- package/lib/providers/board-share/bar-control/base.js +13 -3
- package/lib/providers/board-share/bar-control/electron.d.ts +1 -0
- package/lib/providers/board-share/bar-control/electron.js +15 -4
- package/lib/providers/board-share/provider.base.d.ts +1 -0
- package/lib/providers/board-share/provider.base.js +3 -1
- package/lib/providers/board-share/provider.electron.d.ts +1 -0
- package/lib/providers/board-share/provider.electron.js +8 -2
- package/lib/providers/board-share/type.d.ts +2 -0
- package/lib/providers/dialog/provider.electron.js +10 -2
- package/lib/providers/dialog-provider.d.ts +137 -0
- package/lib/providers/dialog-provider.js +194 -0
- package/lib/providers/message-provider.d.ts +69 -0
- package/lib/providers/message-provider.js +140 -0
- package/lib/providers/room-provider.d.ts +194 -0
- package/lib/providers/room-provider.js +916 -0
- package/lib/providers/screen-share/strategy/browser.js +50 -3
- package/lib/providers/screen-share/strategy/electron.js +77 -8
- package/lib/providers/screen-share/stream-state-sync.d.ts +3 -1
- package/lib/providers/screen-share/stream-state-sync.js +133 -40
- package/lib/providers/screen-share-provider.d.ts +244 -0
- package/lib/providers/screen-share-provider.js +835 -0
- package/lib/providers/sharing-provider.d.ts +42 -0
- package/lib/providers/sharing-provider.js +221 -0
- package/lib/providers/user-setting-storage-provider.d.ts +21 -0
- package/lib/providers/user-setting-storage-provider.js +65 -0
- package/lib/providers/whiteboard-provider.d.ts +24 -0
- package/lib/providers/whiteboard-provider.js +127 -0
- package/lib/shared-data-source/annotation-data.d.ts +17 -0
- package/lib/shared-data-source/annotation-data.js +110 -0
- package/lib/shared-data-source/app-list-data.d.ts +34 -0
- package/lib/shared-data-source/app-list-data.js +133 -0
- package/lib/shared-data-source/chat-data.d.ts +25 -0
- package/lib/shared-data-source/chat-data.js +139 -0
- package/lib/shared-data-source/config.d.ts +35 -0
- package/lib/shared-data-source/config.js +40 -0
- package/lib/shared-data-source/confirm-data.d.ts +25 -0
- package/lib/shared-data-source/confirm-data.js +97 -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 +77 -0
- package/lib/shared-data-source/interpreter.js +247 -0
- package/lib/shared-data-source/layout-data.d.ts +31 -0
- package/lib/shared-data-source/layout-data.js +189 -0
- package/lib/shared-data-source/meeting-time.d.ts +90 -0
- package/lib/shared-data-source/meeting-time.js +416 -0
- package/lib/shared-data-source/member-data.d.ts +139 -0
- package/lib/shared-data-source/member-data.js +517 -0
- package/lib/shared-data-source/pin-data.d.ts +13 -0
- package/lib/shared-data-source/pin-data.js +111 -0
- package/lib/shared-data-source/screen-share-data.d.ts +364 -0
- package/lib/shared-data-source/screen-share-data.js +520 -0
- package/lib/shared-data-source/security-data.d.ts +39 -0
- package/lib/shared-data-source/security-data.js +156 -0
- package/lib/shared-data-source/setting.d.ts +67 -0
- package/lib/shared-data-source/setting.js +220 -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 +165 -0
- package/lib/shared-data-source/video-window.js +1266 -0
- package/lib/shared-data-source/waiting-room.d.ts +46 -0
- package/lib/shared-data-source/waiting-room.js +222 -0
- package/lib/shared-data-source/whiteboard-data.d.ts +68 -0
- package/lib/shared-data-source/whiteboard-data.js +347 -0
- package/lib/utilities/board-context.d.ts +4 -0
- package/lib/utilities/board-context.js +12 -0
- package/lib/utilities/copyText.d.ts +2 -0
- package/lib/utilities/copyText.js +48 -0
- package/lib/utilities/renderer-event.d.ts +10 -0
- package/lib/utilities/renderer-event.js +95 -0
- package/lib/utilities/screen-capture-permission.d.ts +2 -0
- package/lib/utilities/screen-capture-permission.js +24 -0
- package/lib/utilities/screen.d.ts +3 -0
- package/lib/utilities/screen.js +53 -0
- package/lib/utilities/video-track-render-context.d.ts +6 -0
- package/lib/utilities/video-track-render-context.js +9 -0
- package/lib/waiting-room-control-manager.d.ts +28 -0
- package/lib/waiting-room-control-manager.js +230 -0
- package/package.json +5 -5
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { FcrUIRoomProvider } from '../providers/room-provider';
|
|
2
|
+
import { FcrUIEventProvider } from '../providers/event-provider';
|
|
3
|
+
import { FcrUIMemberListDataSourceImpl } from '../modules/participant/member-list-data-source';
|
|
4
|
+
export interface FcrUISharedWaitingRoomDataSource {
|
|
5
|
+
/**
|
|
6
|
+
* 设置action-bar成员列表icon小红点未读状态
|
|
7
|
+
* @param state 状态
|
|
8
|
+
*/
|
|
9
|
+
set unReadState(state: boolean);
|
|
10
|
+
/**
|
|
11
|
+
* 获取action-bar成员列表icon小红点未读状态
|
|
12
|
+
*/
|
|
13
|
+
get unReadState(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* 获取等候室参会者人数
|
|
16
|
+
*/
|
|
17
|
+
get totalWaitingRoomUser(): number;
|
|
18
|
+
/**
|
|
19
|
+
* 获取等候室参会者列表
|
|
20
|
+
*/
|
|
21
|
+
get waitingRoomDataSource(): FcrUIMemberListDataSourceImpl;
|
|
22
|
+
release(): void;
|
|
23
|
+
}
|
|
24
|
+
export declare class FcrUISharedWaitingRoomDataSourceImpl implements FcrUISharedWaitingRoomDataSource {
|
|
25
|
+
private _roomProvider;
|
|
26
|
+
private _uiEventStore;
|
|
27
|
+
private _waitingRoomControl?;
|
|
28
|
+
private _mainRoomControl?;
|
|
29
|
+
private _waitingRoomUserControl?;
|
|
30
|
+
accessor waitingRoomDataSource: FcrUIMemberListDataSourceImpl;
|
|
31
|
+
private _waitingRoomTargetUserRole?;
|
|
32
|
+
private _localUserId?;
|
|
33
|
+
private _streamControl?;
|
|
34
|
+
private _roomProviderObserver;
|
|
35
|
+
private _userControlObserver;
|
|
36
|
+
accessor totalWaitingRoomUser: number;
|
|
37
|
+
accessor unReadState: boolean;
|
|
38
|
+
constructor(_roomProvider: FcrUIRoomProvider, _uiEventStore: FcrUIEventProvider);
|
|
39
|
+
private _isWaitingRoomTargetUser;
|
|
40
|
+
private _getWaitingRoomUserCount;
|
|
41
|
+
private _handleRemoteWaitingUserJoined;
|
|
42
|
+
private _handleRemoteWaitingUserLeft;
|
|
43
|
+
private _addWaitingRoomDataSource;
|
|
44
|
+
private _initWaitingRoomUserList;
|
|
45
|
+
release(): void;
|
|
46
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.symbol.js");
|
|
4
|
+
require("core-js/modules/es.symbol.description.js");
|
|
5
|
+
require("core-js/modules/es.symbol.to-primitive.js");
|
|
6
|
+
require("core-js/modules/es.error.cause.js");
|
|
7
|
+
require("core-js/modules/es.error.to-string.js");
|
|
8
|
+
require("core-js/modules/es.array.is-array.js");
|
|
9
|
+
require("core-js/modules/es.array.push.js");
|
|
10
|
+
require("core-js/modules/es.date.to-primitive.js");
|
|
11
|
+
require("core-js/modules/es.function.name.js");
|
|
12
|
+
require("core-js/modules/es.map.js");
|
|
13
|
+
require("core-js/modules/es.number.constructor.js");
|
|
14
|
+
require("core-js/modules/es.object.create.js");
|
|
15
|
+
require("core-js/modules/es.object.define-property.js");
|
|
16
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
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");
|
|
32
|
+
require("core-js/modules/esnext.symbol.metadata.js");
|
|
33
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
34
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
35
|
+
Object.defineProperty(exports, "__esModule", {
|
|
36
|
+
value: true
|
|
37
|
+
});
|
|
38
|
+
exports.FcrUISharedWaitingRoomDataSourceImpl = void 0;
|
|
39
|
+
require("core-js/modules/es.array.filter.js");
|
|
40
|
+
require("core-js/modules/es.array.for-each.js");
|
|
41
|
+
require("core-js/modules/es.array.includes.js");
|
|
42
|
+
require("core-js/modules/es.array.iterator.js");
|
|
43
|
+
require("core-js/modules/es.function.bind.js");
|
|
44
|
+
require("core-js/modules/es.object.entries.js");
|
|
45
|
+
require("core-js/modules/es.object.to-string.js");
|
|
46
|
+
require("core-js/modules/es.string.includes.js");
|
|
47
|
+
require("core-js/modules/es.string.iterator.js");
|
|
48
|
+
require("core-js/modules/es.weak-map.js");
|
|
49
|
+
require("core-js/modules/esnext.iterator.constructor.js");
|
|
50
|
+
require("core-js/modules/esnext.iterator.filter.js");
|
|
51
|
+
require("core-js/modules/esnext.iterator.for-each.js");
|
|
52
|
+
require("core-js/modules/esnext.weak-map.delete-all.js");
|
|
53
|
+
require("core-js/modules/esnext.weak-map.emplace.js");
|
|
54
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
55
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
56
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
57
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
58
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
59
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
60
|
+
var _type = require("fcr-core/lib/room-control/privilege-control/type");
|
|
61
|
+
var _mobx = require("mobx");
|
|
62
|
+
var _constant = require("../utilities/constant");
|
|
63
|
+
var _base = require("../base");
|
|
64
|
+
var _memberListDataSource = require("../modules/participant/member-list-data-source");
|
|
65
|
+
var _type2 = require("../type");
|
|
66
|
+
var _FcrUISharedWaitingRoomDataSourceImpl;
|
|
67
|
+
var _initProto, _init_waitingRoomDataSource, _init_totalWaitingRoomUser, _init_unReadState, _initWaitingRoomUserListDecs, _releaseDecs, _ref;
|
|
68
|
+
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
69
|
+
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
70
|
+
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
71
|
+
function _classPrivateFieldGet(s, a) { return s.get(_assertClassBrand(s, a)); }
|
|
72
|
+
function _assertClassBrand(e, t, n) { if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; throw new TypeError("Private element is not present on this object"); }
|
|
73
|
+
function _applyDecs(e, t, r, n, o, a) { function i(e, t, r) { return function (n, o) { return r && r(n), e[t].call(n, o); }; } function c(e, t) { for (var r = 0; r < e.length; r++) e[r].call(t); return t; } function s(e, t, r, n) { if ("function" != typeof e && (n || void 0 !== e)) throw new TypeError(t + " must " + (r || "be") + " a function" + (n ? "" : " or undefined")); return e; } function applyDec(e, t, r, n, o, a, c, u, l, f, p, d, h) { function m(e) { if (!h(e)) throw new TypeError("Attempted to access private element on non-instance"); } var y, v = t[0], g = t[3], b = !u; if (!b) { r || Array.isArray(v) || (v = [v]); var w = {}, S = [], A = 3 === o ? "get" : 4 === o || d ? "set" : "value"; f ? (p || d ? w = { get: _setFunctionName(function () { return g(this); }, n, "get"), set: function set(e) { t[4](this, e); } } : w[A] = g, p || _setFunctionName(w[A], n, 2 === o ? "" : A)) : p || (w = Object.getOwnPropertyDescriptor(e, n)); } for (var P = e, j = v.length - 1; j >= 0; j -= r ? 2 : 1) { var D = v[j], E = r ? v[j - 1] : void 0, I = {}, O = { kind: ["field", "accessor", "method", "getter", "setter", "class"][o], name: n, metadata: a, addInitializer: function (e, t) { if (e.v) throw Error("attempted to call addInitializer after decoration was finished"); s(t, "An initializer", "be", !0), c.push(t); }.bind(null, I) }; try { if (b) (y = s(D.call(E, P, O), "class decorators", "return")) && (P = y);else { var k, F; O["static"] = l, O["private"] = f, f ? 2 === o ? k = function k(e) { return m(e), w.value; } : (o < 4 && (k = i(w, "get", m)), 3 !== o && (F = i(w, "set", m))) : (k = function k(e) { return e[n]; }, (o < 2 || 4 === o) && (F = function F(e, t) { e[n] = t; })); var N = O.access = { has: f ? h.bind() : function (e) { return n in e; } }; if (k && (N.get = k), F && (N.set = F), P = D.call(E, d ? { get: w.get, set: w.set } : w[A], O), d) { if ("object" == _typeof(P) && P) (y = s(P.get, "accessor.get")) && (w.get = y), (y = s(P.set, "accessor.set")) && (w.set = y), (y = s(P.init, "accessor.init")) && S.push(y);else if (void 0 !== P) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } else s(P, (p ? "field" : "method") + " decorators", "return") && (p ? S.push(P) : w[A] = P); } } finally { I.v = !0; } } return (p || d) && u.push(function (e, t) { for (var r = S.length - 1; r >= 0; r--) t = S[r].call(e, t); return t; }), p || b || (f ? d ? u.push(i(w, "get"), i(w, "set")) : u.push(2 === o ? w[A] : i.call.bind(w[A])) : Object.defineProperty(e, n, w)), P; } function u(e, t) { return Object.defineProperty(e, Symbol.metadata || Symbol["for"]("Symbol.metadata"), { configurable: !0, enumerable: !0, value: t }); } if (arguments.length >= 6) var l = a[Symbol.metadata || Symbol["for"]("Symbol.metadata")]; var f = Object.create(null == l ? null : l), p = function (e, t, r, n) { var o, a, i = [], s = function s(t) { return _checkInRHS(t) === e; }, u = new Map(); function l(e) { e && i.push(c.bind(null, e)); } for (var f = 0; f < t.length; f++) { var p = t[f]; if (Array.isArray(p)) { var d = p[1], h = p[2], m = p.length > 3, y = 16 & d, v = !!(8 & d), g = 0 == (d &= 7), b = h + "/" + v; if (!g && !m) { var w = u.get(b); if (!0 === w || 3 === w && 4 !== d || 4 === w && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h); u.set(b, !(d > 2) || d); } applyDec(v ? e : e.prototype, p, y, m ? "#" + h : _toPropertyKey(h), d, n, v ? a = a || [] : o = o || [], i, v, m, g, 1 === d, v && m ? s : r); } } return l(o), l(a), i; }(e, t, o, f); return r.length || u(e, f), { e: p, get c() { var t = []; return r.length && [u(applyDec(e, [r], n, e.name, 5, f, t), f), c.bind(null, t, e)]; } }; }
|
|
74
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
75
|
+
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); }
|
|
76
|
+
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; }
|
|
77
|
+
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; }
|
|
78
|
+
var _A = /*#__PURE__*/new WeakMap();
|
|
79
|
+
var _B = /*#__PURE__*/new WeakMap();
|
|
80
|
+
var _C = /*#__PURE__*/new WeakMap();
|
|
81
|
+
_ref = (_initWaitingRoomUserListDecs = [_mobx.action, _mobx.action.bound], _releaseDecs = [_mobx.action, _mobx.action.bound], "_waitingRoomControl");
|
|
82
|
+
var FcrUISharedWaitingRoomDataSourceImpl = exports.FcrUISharedWaitingRoomDataSourceImpl = /*#__PURE__*/function () {
|
|
83
|
+
function FcrUISharedWaitingRoomDataSourceImpl(_roomProvider, _uiEventStore) {
|
|
84
|
+
var _this = this;
|
|
85
|
+
(0, _classCallCheck2["default"])(this, FcrUISharedWaitingRoomDataSourceImpl);
|
|
86
|
+
(0, _defineProperty2["default"])(this, _ref, void _initProto(this));
|
|
87
|
+
_classPrivateFieldInitSpec(this, _A, _init_waitingRoomDataSource(this, new _memberListDataSource.FcrUIMemberListDataSourceImpl()));
|
|
88
|
+
(0, _defineProperty2["default"])(this, "_userControlObserver", {
|
|
89
|
+
onRemoteUsersJoined: this._handleRemoteWaitingUserJoined.bind(this),
|
|
90
|
+
onRemoteUsersLeft: this._handleRemoteWaitingUserLeft.bind(this)
|
|
91
|
+
});
|
|
92
|
+
_classPrivateFieldInitSpec(this, _B, _init_totalWaitingRoomUser(this, 0));
|
|
93
|
+
_classPrivateFieldInitSpec(this, _C, _init_unReadState(this, false));
|
|
94
|
+
this._roomProvider = _roomProvider;
|
|
95
|
+
this._uiEventStore = _uiEventStore;
|
|
96
|
+
this._mainRoomControl = _roomProvider.currentRoomControl;
|
|
97
|
+
this._roomProviderObserver = {
|
|
98
|
+
onJoinWaitingRoom: function onJoinWaitingRoom(roomControl) {
|
|
99
|
+
var _privilegeControl$get;
|
|
100
|
+
_this._waitingRoomControl = roomControl;
|
|
101
|
+
_this._waitingRoomUserControl = roomControl.getUserControl();
|
|
102
|
+
var privilegeControl = _this._mainRoomControl.getPrivilegeControl();
|
|
103
|
+
_this._waitingRoomTargetUserRole = (_privilegeControl$get = privilegeControl.getSecurityInfo(_type.FcrSecurityAction.WaitingRoom).info) === null || _privilegeControl$get === void 0 ? void 0 : _privilegeControl$get.targetRoles;
|
|
104
|
+
_this.totalWaitingRoomUser = _this._getWaitingRoomUserCount();
|
|
105
|
+
_this._localUserId = _this._waitingRoomUserControl.getLocalUser().userId;
|
|
106
|
+
_this._streamControl = _this._waitingRoomControl.getStreamControl();
|
|
107
|
+
_this._initWaitingRoomUserList();
|
|
108
|
+
roomControl.getUserControl().addObserver(_this._userControlObserver);
|
|
109
|
+
},
|
|
110
|
+
onWaitingRoomManageCanceled: function onWaitingRoomManageCanceled() {
|
|
111
|
+
_this.totalWaitingRoomUser = 0;
|
|
112
|
+
_this.unReadState = false;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
_roomProvider.addObserver(this._roomProviderObserver);
|
|
116
|
+
}
|
|
117
|
+
return (0, _createClass2["default"])(FcrUISharedWaitingRoomDataSourceImpl, [{
|
|
118
|
+
key: "waitingRoomDataSource",
|
|
119
|
+
get: function get() {
|
|
120
|
+
return _classPrivateFieldGet(_A, this);
|
|
121
|
+
},
|
|
122
|
+
set: function set(v) {
|
|
123
|
+
_classPrivateFieldSet(_A, this, v);
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
key: "totalWaitingRoomUser",
|
|
127
|
+
get: function get() {
|
|
128
|
+
return _classPrivateFieldGet(_B, this);
|
|
129
|
+
},
|
|
130
|
+
set: function set(v) {
|
|
131
|
+
_classPrivateFieldSet(_B, this, v);
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
key: "unReadState",
|
|
135
|
+
get: function get() {
|
|
136
|
+
return _classPrivateFieldGet(_C, this);
|
|
137
|
+
},
|
|
138
|
+
set: function set(v) {
|
|
139
|
+
_classPrivateFieldSet(_C, this, v);
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "_isWaitingRoomTargetUser",
|
|
143
|
+
value: function _isWaitingRoomTargetUser(user) {
|
|
144
|
+
if (this._waitingRoomTargetUserRole) {
|
|
145
|
+
return this._waitingRoomTargetUserRole.includes(user.userRole);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}, {
|
|
149
|
+
key: "_getWaitingRoomUserCount",
|
|
150
|
+
value: function _getWaitingRoomUserCount() {
|
|
151
|
+
var _this2 = this;
|
|
152
|
+
if (this._waitingRoomUserControl) {
|
|
153
|
+
this.totalWaitingRoomUser = this._waitingRoomUserControl.getUserList().filter(function (user) {
|
|
154
|
+
return _this2._isWaitingRoomTargetUser(user);
|
|
155
|
+
}).length;
|
|
156
|
+
if (this.totalWaitingRoomUser === 0) {
|
|
157
|
+
this._uiEventStore.sendEvent(_constant.FcrUIAction.CHANGE_PARTICIPANT_TAB, _type2.FcrUIRoomType.MAIN_ROOM);
|
|
158
|
+
this.unReadState = false;
|
|
159
|
+
}
|
|
160
|
+
return this.totalWaitingRoomUser;
|
|
161
|
+
} else {
|
|
162
|
+
return 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
key: "_handleRemoteWaitingUserJoined",
|
|
167
|
+
value: function _handleRemoteWaitingUserJoined(roomId, events) {
|
|
168
|
+
var _this3 = this;
|
|
169
|
+
var totalWaitingRoomUser = this._getWaitingRoomUserCount();
|
|
170
|
+
if (totalWaitingRoomUser > 0) {
|
|
171
|
+
this.unReadState = true;
|
|
172
|
+
}
|
|
173
|
+
events.forEach(function (event) {
|
|
174
|
+
var userInfo = event.userInfo;
|
|
175
|
+
_this3._addWaitingRoomDataSource(userInfo);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}, {
|
|
179
|
+
key: "_handleRemoteWaitingUserLeft",
|
|
180
|
+
value: function _handleRemoteWaitingUserLeft(roomId, events) {
|
|
181
|
+
var _this4 = this;
|
|
182
|
+
this._getWaitingRoomUserCount();
|
|
183
|
+
events.forEach(function (event) {
|
|
184
|
+
var userInfo = event.userInfo;
|
|
185
|
+
_this4.waitingRoomDataSource["delete"](userInfo);
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}, {
|
|
189
|
+
key: "_addWaitingRoomDataSource",
|
|
190
|
+
value: function _addWaitingRoomDataSource(modifiedUser) {
|
|
191
|
+
if (modifiedUser.userId !== this._localUserId && this._isWaitingRoomTargetUser(modifiedUser)) {
|
|
192
|
+
this.waitingRoomDataSource.add(modifiedUser, this._streamControl.getStreamsByUserId(modifiedUser.userId), false);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}, {
|
|
196
|
+
key: "_initWaitingRoomUserList",
|
|
197
|
+
value: function _initWaitingRoomUserList() {
|
|
198
|
+
if (!this._waitingRoomUserControl) return;
|
|
199
|
+
var users = this._waitingRoomUserControl.getUsers();
|
|
200
|
+
for (var _i = 0, _Object$entries = Object.entries(users); _i < _Object$entries.length; _i++) {
|
|
201
|
+
var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2),
|
|
202
|
+
userId = _Object$entries$_i[0],
|
|
203
|
+
user = _Object$entries$_i[1];
|
|
204
|
+
this._addWaitingRoomDataSource(user);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "release",
|
|
209
|
+
value: function release() {
|
|
210
|
+
var _this$_waitingRoomUse;
|
|
211
|
+
(_this$_waitingRoomUse = this._waitingRoomUserControl) === null || _this$_waitingRoomUse === void 0 || _this$_waitingRoomUse.removeObserver(this._userControlObserver);
|
|
212
|
+
this._roomProvider.removeObserver(this._roomProviderObserver);
|
|
213
|
+
}
|
|
214
|
+
}]);
|
|
215
|
+
}();
|
|
216
|
+
_FcrUISharedWaitingRoomDataSourceImpl = FcrUISharedWaitingRoomDataSourceImpl;
|
|
217
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrUISharedWaitingRoomDataSourceImpl, [[_mobx.observable, 1, "waitingRoomDataSource"], [_mobx.observable, 1, "totalWaitingRoomUser"], [_mobx.observable, 1, "unReadState"], [_initWaitingRoomUserListDecs, 18, "_initWaitingRoomUserList"], [_releaseDecs, 18, "release"]], []).e, 4);
|
|
218
|
+
_init_waitingRoomDataSource = _applyDecs$e[0];
|
|
219
|
+
_init_totalWaitingRoomUser = _applyDecs$e[1];
|
|
220
|
+
_init_unReadState = _applyDecs$e[2];
|
|
221
|
+
_initProto = _applyDecs$e[3];
|
|
222
|
+
(0, _base.registerDependency)('sharedWaitingRoomDataSource');
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { FcrConnectionState, FcrUserInfo } from 'fcr-core/lib/type';
|
|
2
|
+
import { WhiteboardToolAction } from '../modules/secondary-window/type';
|
|
3
|
+
import { FcrBoardShape, FcrBoardToolType } from 'fcr-core/lib/room-control/whiteboard-control/enums';
|
|
4
|
+
import { WhiteboardThemeType } from '../modules/whiteboard/type';
|
|
5
|
+
import { FcrPrivilegedWhiteboardControl } from 'fcr-core/lib/room-control/whiteboard-control-v2/whiteboard-control/type';
|
|
6
|
+
import { FcrUIPrivilegeProvider } from '../providers/privilege-provider';
|
|
7
|
+
import { FcrToolbarState } from '../modules/components/toolbar/types';
|
|
8
|
+
export interface FcrUISharedWhiteboardDataSource {
|
|
9
|
+
get canWriteBoard(): boolean;
|
|
10
|
+
get sharingUserInfo(): FcrUserInfo | undefined;
|
|
11
|
+
get backgroundColor(): string;
|
|
12
|
+
get currentTheme(): WhiteboardThemeType;
|
|
13
|
+
get connectionState(): FcrConnectionState;
|
|
14
|
+
get showLoading(): boolean;
|
|
15
|
+
get joinSuccess(): boolean;
|
|
16
|
+
get toolbarState(): FcrToolbarState;
|
|
17
|
+
setSharingUser: (userInfo: FcrUserInfo) => void;
|
|
18
|
+
setBackgroundColor: (color: string) => void;
|
|
19
|
+
setWhiteboardTool: (tool: {
|
|
20
|
+
action: WhiteboardToolAction;
|
|
21
|
+
tool: FcrBoardToolType | FcrBoardShape | string | number;
|
|
22
|
+
}) => void;
|
|
23
|
+
setTheme: (theme: WhiteboardThemeType) => void;
|
|
24
|
+
setControlEnable: (enable: boolean) => void;
|
|
25
|
+
setShowLoading: (show: boolean) => void;
|
|
26
|
+
setCommonColors: (colors: string[]) => void;
|
|
27
|
+
saveDraft: () => void;
|
|
28
|
+
setProgress: (progress: number) => void;
|
|
29
|
+
setJoinSuccess: (success: boolean) => void;
|
|
30
|
+
inActive: () => void;
|
|
31
|
+
release: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare class FcrUISharedWhiteboardDataSourceImpl implements FcrUISharedWhiteboardDataSource {
|
|
34
|
+
private _whiteboardControl;
|
|
35
|
+
private _privilegeProvider;
|
|
36
|
+
protected logger: import("agora-foundation/lib/logger").Logger;
|
|
37
|
+
private _showLoading;
|
|
38
|
+
private _disposers;
|
|
39
|
+
private _fcrUIMainWindowRenderer;
|
|
40
|
+
private _toolbarStateObserver;
|
|
41
|
+
accessor currentTheme: Required<WhiteboardThemeType>;
|
|
42
|
+
accessor sharingUserInfo: FcrUserInfo | undefined;
|
|
43
|
+
accessor backgroundColor: string;
|
|
44
|
+
accessor hasWriteBoardPermission: boolean;
|
|
45
|
+
accessor connectionState: FcrConnectionState;
|
|
46
|
+
accessor joinSuccess: boolean;
|
|
47
|
+
accessor toolbarState: FcrToolbarState;
|
|
48
|
+
get showLoading(): boolean;
|
|
49
|
+
get canWriteBoard(): boolean;
|
|
50
|
+
constructor(_whiteboardControl: FcrPrivilegedWhiteboardControl, _privilegeProvider: FcrUIPrivilegeProvider);
|
|
51
|
+
setControlEnable(enable: boolean): void;
|
|
52
|
+
setSharingUser(userInfo: FcrUserInfo): void;
|
|
53
|
+
setBackgroundColor(color: string): void;
|
|
54
|
+
setWhiteboardTool(tool: {
|
|
55
|
+
action: WhiteboardToolAction;
|
|
56
|
+
tool: FcrBoardToolType | FcrBoardShape | string | number;
|
|
57
|
+
}): void;
|
|
58
|
+
setTheme(theme: WhiteboardThemeType): void;
|
|
59
|
+
setShowLoading(show: boolean): void;
|
|
60
|
+
setCommonColors(colors: string[]): void;
|
|
61
|
+
saveDraft(): void;
|
|
62
|
+
setProgress(progress: number): void;
|
|
63
|
+
setJoinSuccess(success: boolean): void;
|
|
64
|
+
inActive(): void;
|
|
65
|
+
release(): void;
|
|
66
|
+
private _resetWhiteboardTool;
|
|
67
|
+
private _handleConnectionStateUpdated;
|
|
68
|
+
}
|