fcr-ui-scene 3.9.0 → 3.9.1-alpha
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 -1
- package/lib/creator/provider-initializer.electron.js +11 -4
- package/lib/electron/injections.d.ts +1 -0
- package/lib/electron/injections.js +4 -1
- package/lib/electron/preload.js +1 -0
- package/lib/modules/action-bar/main-scene/store.base.d.ts +1 -0
- package/lib/modules/action-bar/main-scene/store.base.js +5 -0
- package/lib/modules/audio-stream/index.d.ts +2 -0
- package/lib/modules/audio-stream/index.js +33 -1
- package/lib/modules/chat/index.js +1 -1
- package/lib/modules/chat/store.d.ts +1 -1
- package/lib/modules/chat/store.js +4 -2
- package/lib/modules/components/device-control/store.base.d.ts +1 -0
- package/lib/modules/components/device-control/store.base.js +22 -3
- package/lib/modules/components/leave-meeting/index.js +3 -2
- package/lib/modules/components/leave-meeting/main-scene/store.d.ts +1 -0
- package/lib/modules/components/leave-meeting/main-scene/store.js +6 -1
- package/lib/modules/components/leave-meeting/store.base.d.ts +1 -0
- package/lib/modules/components/leave-meeting/store.base.js +1 -1
- package/lib/modules/components/leave-meeting/waiting-scene/store.d.ts +1 -0
- package/lib/modules/components/leave-meeting/waiting-scene/store.js +6 -1
- package/lib/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
- package/lib/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
- package/lib/modules/components/member-window/components/member-actions/index.js +0 -7
- package/lib/modules/components/member-window/components/member-actions/store.js +1 -1
- package/lib/modules/components/member-window/index.js +1 -1
- package/lib/modules/components/tab-frame/index.css +12 -1
- package/lib/modules/components/tab-frame/index.js +4 -1
- package/lib/modules/control-bar/components/share-state-nav/index.js +1 -3
- package/lib/modules/control-bar/mouse-event-bridge.d.ts +23 -0
- package/lib/modules/control-bar/mouse-event-bridge.js +87 -0
- package/lib/modules/control-bar/store.d.ts +1 -1
- package/lib/modules/control-bar/store.js +10 -27
- package/lib/modules/control-bar/type.d.ts +0 -1
- package/lib/modules/control-bar/view.js +9 -16
- package/lib/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
- package/lib/modules/dialog/dialogs/invite/index.js +6 -24
- package/lib/modules/invite/components/copy-info.css +72 -0
- package/lib/modules/invite/components/copy-info.d.ts +3 -0
- package/lib/modules/invite/components/copy-info.js +144 -0
- package/lib/modules/invite/components/pstn-invite.js +3 -15
- package/lib/modules/invite/components/voip-invite.js +10 -1
- package/lib/modules/invite/enums.d.ts +3 -1
- package/lib/modules/invite/enums.js +2 -0
- package/lib/modules/invite/store.d.ts +4 -1
- package/lib/modules/invite/store.js +37 -13
- package/lib/modules/invite/view.js +41 -20
- package/lib/modules/layout/store.base.d.ts +2 -1
- package/lib/modules/layout/store.base.js +20 -23
- package/lib/modules/participant/components/confirm-input/index.css +67 -1
- package/lib/modules/participant/components/confirm-input/index.js +16 -13
- package/lib/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
- package/lib/modules/participant/store.base.d.ts +1 -0
- package/lib/modules/participant/store.base.js +34 -7
- package/lib/modules/pc-audio-connect/main-scene/store.d.ts +2 -0
- package/lib/modules/pc-audio-connect/main-scene/store.js +12 -2
- package/lib/modules/pc-audio-connect/view.js +4 -2
- package/lib/modules/phone-audio-connect/store.d.ts +6 -4
- package/lib/modules/phone-audio-connect/store.js +12 -1
- package/lib/modules/phone-audio-connect/view.js +6 -4
- package/lib/modules/secondary-window/index.js +2 -2
- package/lib/modules/secondary-window/store.d.ts +3 -0
- package/lib/modules/secondary-window/store.js +16 -1
- package/lib/modules/secondary-window/view.js +96 -72
- package/lib/modules/toast-manager/type.d.ts +2 -1
- package/lib/modules/toast-manager/type.js +4 -1
- package/lib/plugins/module-dev-plugin.js +4 -4
- package/lib/providers/ability-provider.d.ts +15 -0
- package/lib/providers/ability-provider.js +13 -1
- package/lib/providers/mouse-detect/provider.d.ts +2 -0
- package/lib/providers/mouse-detect/provider.empty.d.ts +14 -0
- package/lib/providers/mouse-detect/provider.empty.js +47 -0
- package/lib/providers/mouse-detect/provider.js +13 -4
- package/lib/providers/mouse-detect/type.d.ts +2 -0
- package/lib/providers/phone-audio-provider.d.ts +31 -5
- package/lib/providers/phone-audio-provider.js +83 -22
- package/lib/runtime.d.ts +1 -0
- package/lib/scenes/main-scene.js +2 -1
- package/lib/shared-data/chat-data.d.ts +19 -0
- package/lib/shared-data/chat-data.js +54 -7
- package/lib/shared-data/member-data.d.ts +9 -1
- package/lib/shared-data/member-data.js +46 -17
- package/lib/shared-data/video-window.js +8 -4
- package/lib/translations/enUS.d.ts +245 -1
- package/lib/translations/enUS.js +247 -3
- package/lib/translations/zhCN.d.ts +245 -1
- package/lib/translations/zhCN.js +246 -2
- package/lib/utilities/os.d.ts +1 -0
- package/lib/utilities/os.js +15 -0
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +7 -1
- package/lib-es/creator/provider-initializer.browser.js +2 -1
- package/lib-es/creator/provider-initializer.electron.js +9 -2
- package/lib-es/electron/injections.js +3 -0
- package/lib-es/electron/preload.js +2 -1
- package/lib-es/modules/action-bar/main-scene/store.base.js +5 -0
- package/lib-es/modules/audio-stream/index.js +33 -1
- package/lib-es/modules/chat/index.js +1 -1
- package/lib-es/modules/chat/store.js +4 -2
- package/lib-es/modules/components/device-control/store.base.js +22 -3
- package/lib-es/modules/components/leave-meeting/index.js +3 -2
- package/lib-es/modules/components/leave-meeting/main-scene/store.js +6 -1
- package/lib-es/modules/components/leave-meeting/store.base.js +1 -1
- package/lib-es/modules/components/leave-meeting/waiting-scene/store.js +6 -1
- package/lib-es/modules/components/member-window/components/member-actions/components/icon-status.js +7 -10
- package/lib-es/modules/components/member-window/components/member-actions/components/more-actions.js +2 -2
- package/lib-es/modules/components/member-window/components/member-actions/index.js +0 -7
- package/lib-es/modules/components/member-window/components/member-actions/store.js +1 -1
- package/lib-es/modules/components/member-window/index.js +1 -1
- package/lib-es/modules/components/tab-frame/index.css +12 -1
- package/lib-es/modules/components/tab-frame/index.js +4 -1
- package/lib-es/modules/control-bar/components/share-state-nav/index.js +1 -3
- package/lib-es/modules/control-bar/mouse-event-bridge.js +79 -0
- package/lib-es/modules/control-bar/store.js +11 -28
- package/lib-es/modules/control-bar/view.js +9 -16
- package/lib-es/modules/dialog/dialogs/connection-gateway/tabs.js +3 -2
- package/lib-es/modules/dialog/dialogs/invite/index.js +6 -24
- package/lib-es/modules/invite/components/copy-info.css +72 -0
- package/lib-es/modules/invite/components/copy-info.js +137 -0
- package/lib-es/modules/invite/components/pstn-invite.js +3 -15
- package/lib-es/modules/invite/components/voip-invite.js +10 -1
- package/lib-es/modules/invite/enums.js +2 -0
- package/lib-es/modules/invite/store.js +38 -14
- package/lib-es/modules/invite/view.js +43 -22
- package/lib-es/modules/layout/store.base.js +20 -23
- package/lib-es/modules/participant/components/confirm-input/index.css +67 -1
- package/lib-es/modules/participant/components/confirm-input/index.js +16 -13
- package/lib-es/modules/participant/components/participants/components/render-user/components/attendee/index.css +4 -0
- package/lib-es/modules/participant/store.base.js +34 -7
- package/lib-es/modules/pc-audio-connect/main-scene/store.js +12 -2
- package/lib-es/modules/pc-audio-connect/view.js +4 -2
- package/lib-es/modules/phone-audio-connect/store.js +12 -1
- package/lib-es/modules/phone-audio-connect/view.js +6 -4
- package/lib-es/modules/secondary-window/index.js +2 -2
- package/lib-es/modules/secondary-window/store.js +16 -1
- package/lib-es/modules/secondary-window/view.js +97 -73
- package/lib-es/modules/toast-manager/type.js +4 -1
- package/lib-es/plugins/module-dev-plugin.js +4 -4
- package/lib-es/providers/ability-provider.js +13 -1
- package/lib-es/providers/mouse-detect/provider.empty.js +39 -0
- package/lib-es/providers/mouse-detect/provider.js +13 -4
- package/lib-es/providers/phone-audio-provider.js +109 -48
- package/lib-es/scenes/main-scene.js +3 -2
- package/lib-es/shared-data/chat-data.js +55 -8
- package/lib-es/shared-data/member-data.js +46 -17
- package/lib-es/shared-data/video-window.js +8 -4
- package/lib-es/translations/enUS.js +247 -3
- package/lib-es/translations/zhCN.js +246 -2
- package/lib-es/utilities/os.js +8 -0
- package/lib-es/utilities/renderer.js +7 -1
- package/lib-es/utilities/shared-storage.js +2 -2
- package/package.json +6 -6
- package/lib/modules/connection-gateway/components/computer/index.css +0 -12
- package/lib/modules/connection-gateway/components/computer/index.d.ts +0 -3
- package/lib/modules/connection-gateway/components/computer/index.js +0 -66
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.d.ts +0 -10
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -78
- package/lib/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
- package/lib/modules/connection-gateway/components/phone/components/calling/index.d.ts +0 -7
- package/lib/modules/connection-gateway/components/phone/components/calling/index.js +0 -58
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.d.ts +0 -5
- package/lib/modules/connection-gateway/components/phone/components/remeber/index.js +0 -24
- package/lib/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
- package/lib/modules/connection-gateway/components/phone/components/useing/index.d.ts +0 -3
- package/lib/modules/connection-gateway/components/phone/components/useing/index.js +0 -36
- package/lib/modules/connection-gateway/components/phone/index.css +0 -49
- package/lib/modules/connection-gateway/components/phone/index.d.ts +0 -3
- package/lib/modules/connection-gateway/components/phone/index.js +0 -185
- package/lib/modules/connection-gateway/enums.d.ts +0 -4
- package/lib/modules/connection-gateway/enums.js +0 -12
- package/lib/modules/connection-gateway/index.css +0 -6
- package/lib/modules/connection-gateway/index.d.ts +0 -10
- package/lib/modules/connection-gateway/index.js +0 -78
- package/lib/modules/connection-gateway/store.d.ts +0 -68
- package/lib/modules/connection-gateway/store.js +0 -713
- package/lib/modules/connection-gateway/types.d.ts +0 -8
- package/lib/modules/connection-gateway/types.js +0 -6
- package/lib/modules/connection-gateway/view.d.ts +0 -1
- package/lib/modules/connection-gateway/view.js +0 -39
- package/lib-es/modules/connection-gateway/components/computer/index.css +0 -12
- package/lib-es/modules/connection-gateway/components/computer/index.js +0 -59
- package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.css +0 -36
- package/lib-es/modules/connection-gateway/components/phone/components/callinfo/index.js +0 -71
- package/lib-es/modules/connection-gateway/components/phone/components/calling/index.css +0 -72
- package/lib-es/modules/connection-gateway/components/phone/components/calling/index.js +0 -51
- package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.css +0 -10
- package/lib-es/modules/connection-gateway/components/phone/components/remeber/index.js +0 -17
- package/lib-es/modules/connection-gateway/components/phone/components/useing/index.css +0 -46
- package/lib-es/modules/connection-gateway/components/phone/components/useing/index.js +0 -29
- package/lib-es/modules/connection-gateway/components/phone/index.css +0 -49
- package/lib-es/modules/connection-gateway/components/phone/index.js +0 -177
- package/lib-es/modules/connection-gateway/enums.js +0 -5
- package/lib-es/modules/connection-gateway/index.css +0 -6
- package/lib-es/modules/connection-gateway/index.js +0 -60
- package/lib-es/modules/connection-gateway/store.js +0 -707
- package/lib-es/modules/connection-gateway/types.js +0 -1
- package/lib-es/modules/connection-gateway/view.js +0 -31
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
export var FcrUIMouseDetectProviderEmptyImpl = /*#__PURE__*/function () {
|
|
4
|
+
function FcrUIMouseDetectProviderEmptyImpl() {
|
|
5
|
+
_classCallCheck(this, FcrUIMouseDetectProviderEmptyImpl);
|
|
6
|
+
}
|
|
7
|
+
return _createClass(FcrUIMouseDetectProviderEmptyImpl, [{
|
|
8
|
+
key: "isMouseDetectEnabled",
|
|
9
|
+
value: function isMouseDetectEnabled() {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}, {
|
|
13
|
+
key: "setDisplayId",
|
|
14
|
+
value: function setDisplayId(_displayId) {}
|
|
15
|
+
}, {
|
|
16
|
+
key: "setDetectionPositionOffset",
|
|
17
|
+
value: function setDetectionPositionOffset(_offset) {}
|
|
18
|
+
}, {
|
|
19
|
+
key: "setDetectArea",
|
|
20
|
+
value: function setDetectArea(_areaId, _areaList) {}
|
|
21
|
+
}, {
|
|
22
|
+
key: "getDetectAreas",
|
|
23
|
+
value: function getDetectAreas(_areaId) {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
key: "deleteDetectArea",
|
|
28
|
+
value: function deleteDetectArea(_areaId) {}
|
|
29
|
+
}, {
|
|
30
|
+
key: "addObserver",
|
|
31
|
+
value: function addObserver(_observer) {}
|
|
32
|
+
}, {
|
|
33
|
+
key: "removeObserver",
|
|
34
|
+
value: function removeObserver(_observer) {}
|
|
35
|
+
}, {
|
|
36
|
+
key: "release",
|
|
37
|
+
value: function release() {}
|
|
38
|
+
}]);
|
|
39
|
+
}();
|
|
@@ -119,6 +119,7 @@ export var FcrUIMouseDetectProviderImpl = /*#__PURE__*/function () {
|
|
|
119
119
|
});
|
|
120
120
|
_defineProperty(this, "_isDebug", false);
|
|
121
121
|
_defineProperty(this, "_displayId", null);
|
|
122
|
+
_defineProperty(this, "_macMenuBarOffsetY", 30);
|
|
122
123
|
_defineProperty(this, "_debugWindowObserver", {
|
|
123
124
|
onReady: function onReady() {
|
|
124
125
|
var AreaDebugger = observer(function () {
|
|
@@ -156,9 +157,6 @@ export var FcrUIMouseDetectProviderImpl = /*#__PURE__*/function () {
|
|
|
156
157
|
this._task = AgoraScheduler.shared.addPollingTask(function () {
|
|
157
158
|
_this._detect();
|
|
158
159
|
}, 50);
|
|
159
|
-
if (isMac()) {
|
|
160
|
-
this._task.stop();
|
|
161
|
-
}
|
|
162
160
|
|
|
163
161
|
// 调试时使用,用于查看检测区域
|
|
164
162
|
// this._debug(true);
|
|
@@ -171,6 +169,11 @@ export var FcrUIMouseDetectProviderImpl = /*#__PURE__*/function () {
|
|
|
171
169
|
set: function set(v) {
|
|
172
170
|
_classPrivateFieldSet(_A, this, v);
|
|
173
171
|
}
|
|
172
|
+
}, {
|
|
173
|
+
key: "isMouseDetectEnabled",
|
|
174
|
+
value: function isMouseDetectEnabled() {
|
|
175
|
+
return true;
|
|
176
|
+
}
|
|
174
177
|
}, {
|
|
175
178
|
key: "setDisplayId",
|
|
176
179
|
value: function setDisplayId(displayId) {
|
|
@@ -213,7 +216,10 @@ export var FcrUIMouseDetectProviderImpl = /*#__PURE__*/function () {
|
|
|
213
216
|
}, {
|
|
214
217
|
key: "setDetectionPositionOffset",
|
|
215
218
|
value: function setDetectionPositionOffset(offset) {
|
|
216
|
-
this._detectionOffset =
|
|
219
|
+
this._detectionOffset = {
|
|
220
|
+
x: offset.x,
|
|
221
|
+
y: offset.y + (isMac() ? this._macMenuBarOffsetY : 0)
|
|
222
|
+
};
|
|
217
223
|
}
|
|
218
224
|
}, {
|
|
219
225
|
key: "addObserver",
|
|
@@ -282,6 +288,9 @@ export var FcrUIMouseDetectProviderImpl = /*#__PURE__*/function () {
|
|
|
282
288
|
window.show();
|
|
283
289
|
window.setIgnoreMouseEvents(true);
|
|
284
290
|
window.setAlwaysOnTop(true, 'screen-saver', WindowRelativeLevel.MOUSE_DETECT_DEBUGGER_LEVEL);
|
|
291
|
+
window.setVisibleOnAllWorkspaces(true, {
|
|
292
|
+
visibleOnFullScreen: true
|
|
293
|
+
});
|
|
285
294
|
window.addObserver(this._debugWindowObserver);
|
|
286
295
|
} else {
|
|
287
296
|
this._isDebug = false;
|
|
@@ -1,23 +1,50 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
|
+
var _FcrUIPhoneAudioConnectorProviderImpl;
|
|
8
|
+
var _initProto, _init_accepted, _init_connectionPhoneInfos, _init_connectInfo, _init_phoneCallState, _init_phoneCallReason, _init_connectSession, _init_calling, _init_outgoingCall, _init_isHangup, _init_hasPstnStream, _init_hasVolteStream, _init_hasOwnPstnStream, _init_hasOwnVolteStream, _init_hasNeedMergedStream, _getConnectorInfoDecs, _setConnectionInfoDecs, _startCallDecs, _getCallOutTypeArrayDecs, _getPhoneCallOutTypeDecs, _stopCallDecs, _phoneCallUpdatedDecs, _phoneCallReasonDecs, _setStreamStateDecs, _handleStreamsAddedOrUpdatedDecs, _handleStreamsRemovedDecs, _ref;
|
|
9
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
10
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
11
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
12
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
1
13
|
import "core-js/modules/es.symbol.js";
|
|
2
14
|
import "core-js/modules/es.symbol.description.js";
|
|
3
15
|
import "core-js/modules/es.symbol.iterator.js";
|
|
4
16
|
import "core-js/modules/es.symbol.to-primitive.js";
|
|
5
17
|
import "core-js/modules/es.error.cause.js";
|
|
6
18
|
import "core-js/modules/es.error.to-string.js";
|
|
19
|
+
import "core-js/modules/es.array.find.js";
|
|
20
|
+
import "core-js/modules/es.array.find-index.js";
|
|
21
|
+
import "core-js/modules/es.array.for-each.js";
|
|
7
22
|
import "core-js/modules/es.array.from.js";
|
|
8
23
|
import "core-js/modules/es.array.is-array.js";
|
|
24
|
+
import "core-js/modules/es.array.iterator.js";
|
|
25
|
+
import "core-js/modules/es.array.push.js";
|
|
9
26
|
import "core-js/modules/es.array.slice.js";
|
|
27
|
+
import "core-js/modules/es.array.some.js";
|
|
10
28
|
import "core-js/modules/es.date.to-primitive.js";
|
|
11
29
|
import "core-js/modules/es.date.to-string.js";
|
|
30
|
+
import "core-js/modules/es.function.bind.js";
|
|
12
31
|
import "core-js/modules/es.function.name.js";
|
|
13
32
|
import "core-js/modules/es.map.js";
|
|
33
|
+
import "core-js/modules/es.number.constructor.js";
|
|
14
34
|
import "core-js/modules/es.object.create.js";
|
|
15
35
|
import "core-js/modules/es.object.define-property.js";
|
|
16
36
|
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
37
|
+
import "core-js/modules/es.object.to-string.js";
|
|
17
38
|
import "core-js/modules/es.regexp.exec.js";
|
|
18
39
|
import "core-js/modules/es.regexp.test.js";
|
|
19
40
|
import "core-js/modules/es.regexp.to-string.js";
|
|
41
|
+
import "core-js/modules/es.string.iterator.js";
|
|
42
|
+
import "core-js/modules/es.weak-map.js";
|
|
20
43
|
import "core-js/modules/esnext.function.metadata.js";
|
|
44
|
+
import "core-js/modules/esnext.iterator.constructor.js";
|
|
45
|
+
import "core-js/modules/esnext.iterator.find.js";
|
|
46
|
+
import "core-js/modules/esnext.iterator.for-each.js";
|
|
47
|
+
import "core-js/modules/esnext.iterator.some.js";
|
|
21
48
|
import "core-js/modules/esnext.map.delete-all.js";
|
|
22
49
|
import "core-js/modules/esnext.map.emplace.js";
|
|
23
50
|
import "core-js/modules/esnext.map.every.js";
|
|
@@ -33,33 +60,6 @@ import "core-js/modules/esnext.map.reduce.js";
|
|
|
33
60
|
import "core-js/modules/esnext.map.some.js";
|
|
34
61
|
import "core-js/modules/esnext.map.update.js";
|
|
35
62
|
import "core-js/modules/esnext.symbol.metadata.js";
|
|
36
|
-
import _typeof from "@babel/runtime/helpers/typeof";
|
|
37
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
38
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
39
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
40
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
41
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
42
|
-
var _FcrUIPhoneAudioConnectorProviderImpl;
|
|
43
|
-
var _initProto, _init_accepted, _init_connectionPhoneInfos, _init_connectInfo, _init_phoneCallState, _init_phoneCallReason, _init_connectSession, _init_calling, _init_outgoingCall, _init_isHangup, _init_hasPstnStream, _init_hasOwnPstnStream, _init_hasNeedMergedStream, _getConnectorInfoDecs, _setConnectionInfoDecs, _startCallDecs, _stopCallDecs, _phoneCallUpdatedDecs, _phoneCallReasonDecs, _setStreamStateDecs, _handleStreamsAddedOrUpdatedDecs, _handleStreamsRemovedDecs, _ref;
|
|
44
|
-
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
45
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
46
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
47
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
48
|
-
import "core-js/modules/es.array.find.js";
|
|
49
|
-
import "core-js/modules/es.array.find-index.js";
|
|
50
|
-
import "core-js/modules/es.array.for-each.js";
|
|
51
|
-
import "core-js/modules/es.array.iterator.js";
|
|
52
|
-
import "core-js/modules/es.array.push.js";
|
|
53
|
-
import "core-js/modules/es.array.some.js";
|
|
54
|
-
import "core-js/modules/es.function.bind.js";
|
|
55
|
-
import "core-js/modules/es.number.constructor.js";
|
|
56
|
-
import "core-js/modules/es.object.to-string.js";
|
|
57
|
-
import "core-js/modules/es.string.iterator.js";
|
|
58
|
-
import "core-js/modules/es.weak-map.js";
|
|
59
|
-
import "core-js/modules/esnext.iterator.constructor.js";
|
|
60
|
-
import "core-js/modules/esnext.iterator.find.js";
|
|
61
|
-
import "core-js/modules/esnext.iterator.for-each.js";
|
|
62
|
-
import "core-js/modules/esnext.iterator.some.js";
|
|
63
63
|
import "core-js/modules/esnext.weak-map.delete-all.js";
|
|
64
64
|
import "core-js/modules/esnext.weak-map.emplace.js";
|
|
65
65
|
import "core-js/modules/web.dom-collections.for-each.js";
|
|
@@ -75,14 +75,14 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
75
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
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
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
|
-
import { FcrRoomConnectorType } from 'fcr-core';
|
|
78
|
+
import { FcrPermissionAction, FcrRoomConnectorType } from 'fcr-core';
|
|
79
79
|
import { action, computed, observable, reaction } from 'mobx';
|
|
80
|
-
import { FcrRoomConnectorSessionReason, FcrRoomConnectorSessionState } from 'fcr-core/lib/room-control/room-connector-control/type';
|
|
80
|
+
import { FcrPhoneConnectorSessionType, FcrPhoneConnectorSessionTypeToStringMap, FcrRoomConnectorSessionReason, FcrRoomConnectorSessionState } from 'fcr-core/lib/room-control/room-connector-control/type';
|
|
81
81
|
import { bound } from 'agora-foundation/lib/decorator';
|
|
82
82
|
import { FcrUIConnectType } from '../type';
|
|
83
83
|
import { AgoraObservable } from 'fcr-core/lib/imports';
|
|
84
|
-
import { ConnectorRegion } from '../modules/connection-gateway/enums';
|
|
85
84
|
import { FcrUIToastKey } from '../modules/toast-manager/type';
|
|
85
|
+
import { ConnectorRegion } from '../modules/phone-audio-connect/enums';
|
|
86
86
|
var _A = /*#__PURE__*/new WeakMap();
|
|
87
87
|
var _B = /*#__PURE__*/new WeakMap();
|
|
88
88
|
var _C = /*#__PURE__*/new WeakMap();
|
|
@@ -95,13 +95,16 @@ var _I = /*#__PURE__*/new WeakMap();
|
|
|
95
95
|
var _J = /*#__PURE__*/new WeakMap();
|
|
96
96
|
var _K = /*#__PURE__*/new WeakMap();
|
|
97
97
|
var _L = /*#__PURE__*/new WeakMap();
|
|
98
|
-
|
|
98
|
+
var _M = /*#__PURE__*/new WeakMap();
|
|
99
|
+
var _N = /*#__PURE__*/new WeakMap();
|
|
100
|
+
_ref = (_getConnectorInfoDecs = [action, action.bound], _setConnectionInfoDecs = [action, action.bound], _startCallDecs = [action, action.bound], _getCallOutTypeArrayDecs = [action, action.bound], _getPhoneCallOutTypeDecs = [action, action.bound], _stopCallDecs = [action, action.bound], _phoneCallUpdatedDecs = [action, action.bound], _phoneCallReasonDecs = [action, action.bound], _setStreamStateDecs = [action, action.bound], _handleStreamsAddedOrUpdatedDecs = [action, action.bound], _handleStreamsRemovedDecs = [action, action.bound], "_observable");
|
|
99
101
|
export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
100
102
|
function FcrUIPhoneAudioConnectorProviderImpl(_ref2) {
|
|
101
103
|
var _this = this;
|
|
102
104
|
var roomControl = _ref2.roomControl,
|
|
103
105
|
messageProvider = _ref2.messageProvider,
|
|
104
|
-
deviceProvider = _ref2.deviceProvider
|
|
106
|
+
deviceProvider = _ref2.deviceProvider,
|
|
107
|
+
abilityProvider = _ref2.abilityProvider;
|
|
105
108
|
_classCallCheck(this, FcrUIPhoneAudioConnectorProviderImpl);
|
|
106
109
|
_defineProperty(this, _ref, (_initProto(this), new AgoraObservable()));
|
|
107
110
|
_defineProperty(this, "_disposers", []);
|
|
@@ -125,13 +128,16 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
125
128
|
_classPrivateFieldInitSpec(this, _H, _init_outgoingCall(this, false));
|
|
126
129
|
_classPrivateFieldInitSpec(this, _I, _init_isHangup(this, false));
|
|
127
130
|
_classPrivateFieldInitSpec(this, _J, _init_hasPstnStream(this, false));
|
|
128
|
-
_classPrivateFieldInitSpec(this, _K,
|
|
129
|
-
_classPrivateFieldInitSpec(this, _L,
|
|
131
|
+
_classPrivateFieldInitSpec(this, _K, _init_hasVolteStream(this, false));
|
|
132
|
+
_classPrivateFieldInitSpec(this, _L, _init_hasOwnPstnStream(this, false));
|
|
133
|
+
_classPrivateFieldInitSpec(this, _M, _init_hasOwnVolteStream(this, false));
|
|
134
|
+
_classPrivateFieldInitSpec(this, _N, _init_hasNeedMergedStream(this, false));
|
|
130
135
|
this._roomControl = roomControl;
|
|
131
136
|
this._messageProvider = messageProvider;
|
|
132
137
|
this._deviceProvider = deviceProvider;
|
|
133
138
|
this._streamControl = roomControl.getStreamControl();
|
|
134
139
|
this._userControl = roomControl.getUserControl();
|
|
140
|
+
this._abilityProvider = abilityProvider;
|
|
135
141
|
this._roomControl.getRoomConnectorControl().addObserver(this._roomOberver);
|
|
136
142
|
this._streamControl.addObserver(this._streamObserver);
|
|
137
143
|
this.getConnectorInfo();
|
|
@@ -226,7 +232,7 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
226
232
|
_classPrivateFieldSet(_J, this, v);
|
|
227
233
|
}
|
|
228
234
|
}, {
|
|
229
|
-
key: "
|
|
235
|
+
key: "hasVolteStream",
|
|
230
236
|
get: function get() {
|
|
231
237
|
return _classPrivateFieldGet(_K, this);
|
|
232
238
|
},
|
|
@@ -234,13 +240,29 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
234
240
|
_classPrivateFieldSet(_K, this, v);
|
|
235
241
|
}
|
|
236
242
|
}, {
|
|
237
|
-
key: "
|
|
243
|
+
key: "hasOwnPstnStream",
|
|
238
244
|
get: function get() {
|
|
239
245
|
return _classPrivateFieldGet(_L, this);
|
|
240
246
|
},
|
|
241
247
|
set: function set(v) {
|
|
242
248
|
_classPrivateFieldSet(_L, this, v);
|
|
243
249
|
}
|
|
250
|
+
}, {
|
|
251
|
+
key: "hasOwnVolteStream",
|
|
252
|
+
get: function get() {
|
|
253
|
+
return _classPrivateFieldGet(_M, this);
|
|
254
|
+
},
|
|
255
|
+
set: function set(v) {
|
|
256
|
+
_classPrivateFieldSet(_M, this, v);
|
|
257
|
+
}
|
|
258
|
+
}, {
|
|
259
|
+
key: "hasNeedMergedStream",
|
|
260
|
+
get: function get() {
|
|
261
|
+
return _classPrivateFieldGet(_N, this);
|
|
262
|
+
},
|
|
263
|
+
set: function set(v) {
|
|
264
|
+
_classPrivateFieldSet(_N, this, v);
|
|
265
|
+
}
|
|
244
266
|
}, {
|
|
245
267
|
key: "connectType",
|
|
246
268
|
get: function get() {
|
|
@@ -282,8 +304,8 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
282
304
|
}, {
|
|
283
305
|
key: "startCall",
|
|
284
306
|
value: function () {
|
|
285
|
-
var _startCall = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(phoneNumber) {
|
|
286
|
-
var _this$_userControl$ge, phoneUserId, userName;
|
|
307
|
+
var _startCall = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(phoneNumber, callOutType) {
|
|
308
|
+
var _this$_userControl$ge, phoneUserId, userName, type;
|
|
287
309
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
288
310
|
while (1) switch (_context2.prev = _context2.next) {
|
|
289
311
|
case 0:
|
|
@@ -297,11 +319,13 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
297
319
|
}
|
|
298
320
|
return _context2.abrupt("return");
|
|
299
321
|
case 1:
|
|
322
|
+
type = callOutType !== null && callOutType !== void 0 ? callOutType : this.getPhoneCallOutType();
|
|
300
323
|
_context2.next = 2;
|
|
301
324
|
return this._roomControl.getRoomConnectorControl().startSessionByPhone({
|
|
302
325
|
phoneNumber: phoneNumber,
|
|
303
326
|
userName: userName,
|
|
304
|
-
phoneUserId: phoneUserId
|
|
327
|
+
phoneUserId: phoneUserId,
|
|
328
|
+
type: type
|
|
305
329
|
});
|
|
306
330
|
case 2:
|
|
307
331
|
this._sessionId = _context2.sent;
|
|
@@ -311,11 +335,40 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
311
335
|
}
|
|
312
336
|
}, _callee2, this);
|
|
313
337
|
}));
|
|
314
|
-
function startCall(_x) {
|
|
338
|
+
function startCall(_x, _x2) {
|
|
315
339
|
return _startCall.apply(this, arguments);
|
|
316
340
|
}
|
|
317
341
|
return startCall;
|
|
318
342
|
}()
|
|
343
|
+
}, {
|
|
344
|
+
key: "getCallOutTypeArray",
|
|
345
|
+
value: function getCallOutTypeArray() {
|
|
346
|
+
var _permissionInfo$info$, _permissionInfo$info;
|
|
347
|
+
var permissionInfo = this._roomControl.getPrivilegeControl().getLocalUserPermissionInfo(FcrPermissionAction.CallOut);
|
|
348
|
+
if (!permissionInfo.enable) {
|
|
349
|
+
return [];
|
|
350
|
+
}
|
|
351
|
+
var types = (_permissionInfo$info$ = (_permissionInfo$info = permissionInfo.info) === null || _permissionInfo$info === void 0 || (_permissionInfo$info = _permissionInfo$info.params) === null || _permissionInfo$info === void 0 ? void 0 : _permissionInfo$info.type) !== null && _permissionInfo$info$ !== void 0 ? _permissionInfo$info$ : [];
|
|
352
|
+
return types;
|
|
353
|
+
}
|
|
354
|
+
}, {
|
|
355
|
+
key: "getPhoneCallOutType",
|
|
356
|
+
value: function getPhoneCallOutType() {
|
|
357
|
+
var types = this.getCallOutTypeArray();
|
|
358
|
+
var isSupportVolte = types.find(function (item) {
|
|
359
|
+
return item === FcrPhoneConnectorSessionTypeToStringMap[FcrPhoneConnectorSessionType.VOLTE];
|
|
360
|
+
}) && this._abilityProvider.isCallOutVolteAbilitySupported();
|
|
361
|
+
var volte = isSupportVolte ? FcrPhoneConnectorSessionType.VOLTE : null;
|
|
362
|
+
var isSupportPstn = types.find(function (item) {
|
|
363
|
+
return item === FcrPhoneConnectorSessionTypeToStringMap[FcrPhoneConnectorSessionType.PSTN];
|
|
364
|
+
}) && this._abilityProvider.isCallOutAbilitySupported();
|
|
365
|
+
var pstn = isSupportPstn ? FcrPhoneConnectorSessionType.PSTN : null;
|
|
366
|
+
var type = volte || pstn;
|
|
367
|
+
if (!type) {
|
|
368
|
+
throw new Error('You are not allowed to call out');
|
|
369
|
+
}
|
|
370
|
+
return type;
|
|
371
|
+
}
|
|
319
372
|
}, {
|
|
320
373
|
key: "stopCall",
|
|
321
374
|
value: function () {
|
|
@@ -434,16 +487,22 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
434
487
|
var connectorType = _ref3.connectorType;
|
|
435
488
|
return connectorType === FcrRoomConnectorType.PSTN;
|
|
436
489
|
};
|
|
490
|
+
var matchVOLTE = function matchVOLTE(_ref4) {
|
|
491
|
+
var connectorType = _ref4.connectorType;
|
|
492
|
+
return connectorType === FcrRoomConnectorType.VOLTE;
|
|
493
|
+
};
|
|
437
494
|
var _this$_userControl$ge2 = this._userControl.getLocalUser(),
|
|
438
495
|
userId = _this$_userControl$ge2.userId;
|
|
439
496
|
var myStreams = this._streamControl.getStreamsByUserId(userId);
|
|
440
497
|
var allStreams = this._streamControl.getStreamList();
|
|
441
498
|
this.hasPstnStream = allStreams.some(matchPSTN);
|
|
499
|
+
this.hasVolteStream = allStreams.some(matchVOLTE);
|
|
442
500
|
this.hasOwnPstnStream = myStreams.some(matchPSTN);
|
|
501
|
+
this.hasOwnVolteStream = myStreams.some(matchVOLTE);
|
|
443
502
|
this.hasNeedMergedStream = allStreams.some(function (stream) {
|
|
444
|
-
return stream.owner.connectorType === FcrRoomConnectorType.PSTN && stream.connectorType === FcrRoomConnectorType.PSTN;
|
|
503
|
+
return stream.owner.connectorType === FcrRoomConnectorType.PSTN && stream.connectorType === FcrRoomConnectorType.PSTN || stream.owner.connectorType === FcrRoomConnectorType.VOLTE && stream.connectorType === FcrRoomConnectorType.VOLTE;
|
|
445
504
|
});
|
|
446
|
-
if (this.hasOwnPstnStream) {
|
|
505
|
+
if (this.hasOwnPstnStream || this.hasOwnVolteStream) {
|
|
447
506
|
this._deviceProvider.setConnectType(FcrUIConnectType.PHONE);
|
|
448
507
|
}
|
|
449
508
|
return {
|
|
@@ -468,7 +527,7 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
468
527
|
try {
|
|
469
528
|
var _loop = function _loop() {
|
|
470
529
|
var modifiedStream = _step.value.modifiedStream;
|
|
471
|
-
if (modifiedStream.connectorType !== FcrRoomConnectorType.PSTN) return {
|
|
530
|
+
if (modifiedStream.connectorType !== FcrRoomConnectorType.PSTN && modifiedStream.connectorType !== FcrRoomConnectorType.VOLTE) return {
|
|
472
531
|
v: void 0
|
|
473
532
|
};
|
|
474
533
|
if (modifiedStream.owner.userId === userId && _this3._deviceProvider.connectType === FcrUIConnectType.PHONE) {
|
|
@@ -501,8 +560,8 @@ export var FcrUIPhoneAudioConnectorProviderImpl = /*#__PURE__*/function () {
|
|
|
501
560
|
}]);
|
|
502
561
|
}();
|
|
503
562
|
_FcrUIPhoneAudioConnectorProviderImpl = FcrUIPhoneAudioConnectorProviderImpl;
|
|
504
|
-
var _applyDecs$e = _applyDecs(_FcrUIPhoneAudioConnectorProviderImpl, [[observable, 1, "accepted"], [observable, 1, "connectionPhoneInfos"], [observable, 1, "connectInfo"], [observable, 1, "phoneCallState"], [observable, 1, "phoneCallReason"], [observable, 1, "connectSession"], [observable, 1, "calling"], [observable, 1, "outgoingCall"], [observable, 1, "isHangup"], [observable, 1, "hasPstnStream"], [observable, 1, "hasOwnPstnStream"], [observable, 1, "hasNeedMergedStream"], [computed, 3, "connectType"], [_getConnectorInfoDecs, 18, "getConnectorInfo"], [_setConnectionInfoDecs, 18, "setConnectionInfo"], [_startCallDecs, 18, "startCall"], [_stopCallDecs, 18, "stopCall"], [bound, 2, "_setResetTimer"], [_phoneCallUpdatedDecs, 18, "_phoneCallUpdated"], [_phoneCallReasonDecs, 18, "_phoneCallReason"], [_setStreamStateDecs, 18, "_setStreamState"], [_handleStreamsAddedOrUpdatedDecs, 18, "_handleStreamsAddedOrUpdated"], [_handleStreamsRemovedDecs, 18, "_handleStreamsRemoved"]], []).e;
|
|
505
|
-
var _applyDecs$e2 = _slicedToArray(_applyDecs$e,
|
|
563
|
+
var _applyDecs$e = _applyDecs(_FcrUIPhoneAudioConnectorProviderImpl, [[observable, 1, "accepted"], [observable, 1, "connectionPhoneInfos"], [observable, 1, "connectInfo"], [observable, 1, "phoneCallState"], [observable, 1, "phoneCallReason"], [observable, 1, "connectSession"], [observable, 1, "calling"], [observable, 1, "outgoingCall"], [observable, 1, "isHangup"], [observable, 1, "hasPstnStream"], [observable, 1, "hasVolteStream"], [observable, 1, "hasOwnPstnStream"], [observable, 1, "hasOwnVolteStream"], [observable, 1, "hasNeedMergedStream"], [computed, 3, "connectType"], [_getConnectorInfoDecs, 18, "getConnectorInfo"], [_setConnectionInfoDecs, 18, "setConnectionInfo"], [_startCallDecs, 18, "startCall"], [_getCallOutTypeArrayDecs, 18, "getCallOutTypeArray"], [_getPhoneCallOutTypeDecs, 18, "getPhoneCallOutType"], [_stopCallDecs, 18, "stopCall"], [bound, 2, "_setResetTimer"], [_phoneCallUpdatedDecs, 18, "_phoneCallUpdated"], [_phoneCallReasonDecs, 18, "_phoneCallReason"], [_setStreamStateDecs, 18, "_setStreamState"], [_handleStreamsAddedOrUpdatedDecs, 18, "_handleStreamsAddedOrUpdated"], [_handleStreamsRemovedDecs, 18, "_handleStreamsRemoved"]], []).e;
|
|
564
|
+
var _applyDecs$e2 = _slicedToArray(_applyDecs$e, 15);
|
|
506
565
|
_init_accepted = _applyDecs$e2[0];
|
|
507
566
|
_init_connectionPhoneInfos = _applyDecs$e2[1];
|
|
508
567
|
_init_connectInfo = _applyDecs$e2[2];
|
|
@@ -513,7 +572,9 @@ _init_calling = _applyDecs$e2[6];
|
|
|
513
572
|
_init_outgoingCall = _applyDecs$e2[7];
|
|
514
573
|
_init_isHangup = _applyDecs$e2[8];
|
|
515
574
|
_init_hasPstnStream = _applyDecs$e2[9];
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
575
|
+
_init_hasVolteStream = _applyDecs$e2[10];
|
|
576
|
+
_init_hasOwnPstnStream = _applyDecs$e2[11];
|
|
577
|
+
_init_hasOwnVolteStream = _applyDecs$e2[12];
|
|
578
|
+
_init_hasNeedMergedStream = _applyDecs$e2[13];
|
|
579
|
+
_initProto = _applyDecs$e2[14];
|
|
519
580
|
_applyDecs$e;
|
|
@@ -30,7 +30,7 @@ import { ChatDialog, electronWindowConfig as chatDialogWindowConfig, webDialogCo
|
|
|
30
30
|
import { ConnectionGatewayDialog, electronWindowConfig as connectionGatewayDialogWindowConfig, webDialogConfig as connectionGatewayWebDialogConfig } from '../modules/dialog/dialogs/connection-gateway';
|
|
31
31
|
import { ControlBarDialog, electronWindowConfig as controlBarDialogWindowConfig } from '../modules/dialog/dialogs/control-bar';
|
|
32
32
|
import { InterpreterDialog, electronWindowConfig as interpreterDialogWindowConfig, webDialogConfig as interpreterWebDialogConfig } from '../modules/dialog/dialogs/interpreter';
|
|
33
|
-
import { InviteDialog, electronWindowConfig as inviteDialogWindowConfig } from '../modules/dialog/dialogs/invite';
|
|
33
|
+
import { InviteDialog, electronWindowConfig as inviteDialogWindowConfig, webDialogConfig as inviteWebDialogConfig } from '../modules/dialog/dialogs/invite';
|
|
34
34
|
import { LiveStreamingDialog, electronWindowConfig as liveStreamingDialogWindowConfig } from '../modules/dialog/dialogs/live-streaming';
|
|
35
35
|
import { ParticipantDialog, electronWindowConfig as participantDialogWindowConfig, webDialogConfig as participantWebDialogConfig } from '../modules/dialog/dialogs/participant';
|
|
36
36
|
import { electronRevokeHostWindowConfig, webRevokeHostWindowConfig, SystemPreferenceDialog } from '../modules/dialog/dialogs/system-preference';
|
|
@@ -328,7 +328,8 @@ export var FcrMainUIScene = /*#__PURE__*/function (_FcrBaseUIScene) {
|
|
|
328
328
|
})
|
|
329
329
|
}, dialogId);
|
|
330
330
|
},
|
|
331
|
-
electronWindowConfig: inviteDialogWindowConfig
|
|
331
|
+
electronWindowConfig: inviteDialogWindowConfig,
|
|
332
|
+
webDialogConfig: inviteWebDialogConfig
|
|
332
333
|
}, {
|
|
333
334
|
key: FcrUIDialogKey.CHAT,
|
|
334
335
|
component: function component(_ref0) {
|
|
@@ -43,7 +43,7 @@ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
|
43
43
|
import _createClass from "@babel/runtime/helpers/createClass";
|
|
44
44
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
45
45
|
var _FcrUISharedChatDataSourceImpl;
|
|
46
|
-
var _initProto, _init_newMessageCount, _init_latestMessage, _init_activeTab, _handleNewMessageEventDecs, _init__handleNewMessageEvent, _ref;
|
|
46
|
+
var _initProto, _init_newMessageCount, _init_latestMessage, _init_activeTab, _init_mainRoomConnectionState, _init_waitingRoomConnectionState, _handleNewMessageEventDecs, _init__handleNewMessageEvent, _handleConnectionStateUpdatedDecs, _init__handleConnectionStateUpdated, _setConnectionStateDecs, _ref;
|
|
47
47
|
import "core-js/modules/es.array.iterator.js";
|
|
48
48
|
import "core-js/modules/es.number.constructor.js";
|
|
49
49
|
import "core-js/modules/es.object.to-string.js";
|
|
@@ -64,12 +64,15 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
64
64
|
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); }
|
|
65
65
|
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; }
|
|
66
66
|
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; }
|
|
67
|
-
import { action, observable } from 'mobx';
|
|
67
|
+
import { action, observable, computed } from 'mobx';
|
|
68
68
|
import { FcrUIRoomType } from '../type';
|
|
69
|
+
import { FcrChatRoomConnectionState } from 'fcr-core/lib/room-control/chatroom-control/type';
|
|
69
70
|
var _A = /*#__PURE__*/new WeakMap();
|
|
70
71
|
var _B = /*#__PURE__*/new WeakMap();
|
|
71
72
|
var _C = /*#__PURE__*/new WeakMap();
|
|
72
|
-
|
|
73
|
+
var _D = /*#__PURE__*/new WeakMap();
|
|
74
|
+
var _E = /*#__PURE__*/new WeakMap();
|
|
75
|
+
_ref = (_handleNewMessageEventDecs = [action, action.bound], _handleConnectionStateUpdatedDecs = [action, action.bound], _setConnectionStateDecs = [action, action.bound], "newMessageCount");
|
|
73
76
|
export var FcrUISharedChatDataSourceImpl = /*#__PURE__*/function () {
|
|
74
77
|
function FcrUISharedChatDataSourceImpl(_chatProvider) {
|
|
75
78
|
var _this = this;
|
|
@@ -77,6 +80,8 @@ export var FcrUISharedChatDataSourceImpl = /*#__PURE__*/function () {
|
|
|
77
80
|
_classPrivateFieldInitSpec(this, _A, (_initProto(this), _init_newMessageCount(this, _defineProperty({}, FcrUIRoomType.MAIN_ROOM, 0))));
|
|
78
81
|
_classPrivateFieldInitSpec(this, _B, _init_latestMessage(this));
|
|
79
82
|
_classPrivateFieldInitSpec(this, _C, _init_activeTab(this, FcrUIRoomType.MAIN_ROOM));
|
|
83
|
+
_classPrivateFieldInitSpec(this, _D, _init_mainRoomConnectionState(this, FcrChatRoomConnectionState.Disconnected));
|
|
84
|
+
_classPrivateFieldInitSpec(this, _E, _init_waitingRoomConnectionState(this, FcrChatRoomConnectionState.Disconnected));
|
|
80
85
|
_defineProperty(this, "_handleNewMessageEvent", _init__handleNewMessageEvent(this, function (info) {
|
|
81
86
|
var _msgObj$currentRoomTy;
|
|
82
87
|
var msgObj = _objectSpread({}, _this.newMessageCount);
|
|
@@ -88,9 +93,13 @@ export var FcrUISharedChatDataSourceImpl = /*#__PURE__*/function () {
|
|
|
88
93
|
_this.newMessageCount = _objectSpread({}, msgObj);
|
|
89
94
|
_this.latestMessage = latestMessage;
|
|
90
95
|
}));
|
|
96
|
+
_defineProperty(this, "_handleConnectionStateUpdated", _init__handleConnectionStateUpdated(this, function (_, state, roomType) {
|
|
97
|
+
_this.setConnectionState(roomType, state);
|
|
98
|
+
}));
|
|
91
99
|
this._chatProvider = _chatProvider;
|
|
92
100
|
this._chatProvider.addObserver({
|
|
93
|
-
onUnReadMessageUpdated: this._handleNewMessageEvent
|
|
101
|
+
onUnReadMessageUpdated: this._handleNewMessageEvent,
|
|
102
|
+
onChatRoomConnectionStateUpdated: this._handleConnectionStateUpdated
|
|
94
103
|
});
|
|
95
104
|
}
|
|
96
105
|
return _createClass(FcrUISharedChatDataSourceImpl, [{
|
|
@@ -119,17 +128,55 @@ export var FcrUISharedChatDataSourceImpl = /*#__PURE__*/function () {
|
|
|
119
128
|
set: function set(v) {
|
|
120
129
|
_classPrivateFieldSet(_C, this, v);
|
|
121
130
|
}
|
|
131
|
+
}, {
|
|
132
|
+
key: "mainRoomConnectionState",
|
|
133
|
+
get: function get() {
|
|
134
|
+
return _classPrivateFieldGet(_D, this);
|
|
135
|
+
},
|
|
136
|
+
set: function set(v) {
|
|
137
|
+
_classPrivateFieldSet(_D, this, v);
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
key: "waitingRoomConnectionState",
|
|
141
|
+
get: function get() {
|
|
142
|
+
return _classPrivateFieldGet(_E, this);
|
|
143
|
+
},
|
|
144
|
+
set: function set(v) {
|
|
145
|
+
_classPrivateFieldSet(_E, this, v);
|
|
146
|
+
}
|
|
122
147
|
}, {
|
|
123
148
|
key: "release",
|
|
124
149
|
value: function release() {}
|
|
150
|
+
}, {
|
|
151
|
+
key: "setConnectionState",
|
|
152
|
+
value: function setConnectionState(roomType, state) {
|
|
153
|
+
if (roomType === FcrUIRoomType.MAIN_ROOM) {
|
|
154
|
+
this.mainRoomConnectionState = state;
|
|
155
|
+
} else if (roomType === FcrUIRoomType.WAITING_ROOM) {
|
|
156
|
+
this.waitingRoomConnectionState = state;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
key: "getConnectionState",
|
|
161
|
+
value: function getConnectionState(roomType) {
|
|
162
|
+
return roomType === FcrUIRoomType.MAIN_ROOM ? this.mainRoomConnectionState : this.waitingRoomConnectionState;
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
key: "currentConnectionState",
|
|
166
|
+
get: function get() {
|
|
167
|
+
return this.getConnectionState(this.activeTab);
|
|
168
|
+
}
|
|
125
169
|
}]);
|
|
126
170
|
}();
|
|
127
171
|
_FcrUISharedChatDataSourceImpl = FcrUISharedChatDataSourceImpl;
|
|
128
|
-
var _applyDecs$e = _applyDecs(_FcrUISharedChatDataSourceImpl, [[observable, 1, "newMessageCount"], [observable, 1, "latestMessage"], [observable, 1, "activeTab"], [_handleNewMessageEventDecs, 16, "_handleNewMessageEvent"]], []).e;
|
|
129
|
-
var _applyDecs$e2 = _slicedToArray(_applyDecs$e,
|
|
172
|
+
var _applyDecs$e = _applyDecs(_FcrUISharedChatDataSourceImpl, [[observable, 1, "newMessageCount"], [observable, 1, "latestMessage"], [observable, 1, "activeTab"], [observable, 1, "mainRoomConnectionState"], [observable, 1, "waitingRoomConnectionState"], [_setConnectionStateDecs, 18, "setConnectionState"], [computed, 3, "currentConnectionState"], [_handleNewMessageEventDecs, 16, "_handleNewMessageEvent"], [_handleConnectionStateUpdatedDecs, 16, "_handleConnectionStateUpdated"]], []).e;
|
|
173
|
+
var _applyDecs$e2 = _slicedToArray(_applyDecs$e, 8);
|
|
130
174
|
_init_newMessageCount = _applyDecs$e2[0];
|
|
131
175
|
_init_latestMessage = _applyDecs$e2[1];
|
|
132
176
|
_init_activeTab = _applyDecs$e2[2];
|
|
133
|
-
|
|
134
|
-
|
|
177
|
+
_init_mainRoomConnectionState = _applyDecs$e2[3];
|
|
178
|
+
_init_waitingRoomConnectionState = _applyDecs$e2[4];
|
|
179
|
+
_init__handleNewMessageEvent = _applyDecs$e2[5];
|
|
180
|
+
_init__handleConnectionStateUpdated = _applyDecs$e2[6];
|
|
181
|
+
_initProto = _applyDecs$e2[7];
|
|
135
182
|
_applyDecs$e;
|