fcr-ui-widget-sdk 3.8.0 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/sdk.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { FcrRoomInfo, FcrRoomSchedule, FcrRoomState, FcrUserInfo } from 'fcr-core/lib/type';
1
+ import type { FcrIPConnectorSessionParams, FcrPhoneConnectorSessionParams, FcrRoomInfo, FcrRoomSchedule, FcrRoomState, FcrUserInfo } from 'fcr-core/lib/type';
2
2
  import { FcrUIWidgetObserver, FcrUIWidgetSDK } from './type';
3
3
  export declare class FcrUIWidgetSDKImpl implements FcrUIWidgetSDK {
4
4
  protected logger: import("agora-foundation/lib/logger").Logger;
@@ -15,6 +15,9 @@ export declare class FcrUIWidgetSDKImpl implements FcrUIWidgetSDK {
15
15
  getLocalUser(): Promise<FcrUserInfo>;
16
16
  getUserList(): Promise<FcrUserInfo[]>;
17
17
  getAllUserCount(): Promise<number>;
18
+ startSessionByPhone(params: FcrPhoneConnectorSessionParams): Promise<string>;
19
+ startSessionByIP(params: FcrIPConnectorSessionParams): Promise<string>;
20
+ stopSession(sessionId: string): Promise<void>;
18
21
  addObserver(observer: FcrUIWidgetObserver): void;
19
22
  removeObserver(observer: FcrUIWidgetObserver): void;
20
23
  private _handlePostMessage;
package/lib/sdk.js CHANGED
@@ -160,6 +160,21 @@ var FcrUIWidgetSDKImpl = exports.FcrUIWidgetSDKImpl = /*#__PURE__*/function () {
160
160
  getAllUserCount() {
161
161
  return this._sendRequest('getAllUserCount');
162
162
  }
163
+ }, {
164
+ key: "startSessionByPhone",
165
+ value: function startSessionByPhone(params) {
166
+ return this._sendRequest('startSessionByPhone', [params]);
167
+ }
168
+ }, {
169
+ key: "startSessionByIP",
170
+ value: function startSessionByIP(params) {
171
+ return this._sendRequest('startSessionByIP', [params]);
172
+ }
173
+ }, {
174
+ key: "stopSession",
175
+ value: function stopSession(sessionId) {
176
+ return this._sendRequest('stopSession', [sessionId]);
177
+ }
163
178
  }, {
164
179
  key: "addObserver",
165
180
  value: function
@@ -205,7 +220,7 @@ var FcrUIWidgetSDKImpl = exports.FcrUIWidgetSDKImpl = /*#__PURE__*/function () {
205
220
  }]);
206
221
  }();
207
222
  _FcrUIWidgetSDKImpl = FcrUIWidgetSDKImpl;
208
- var _applyDecs$e = _applyDecs(_FcrUIWidgetSDKImpl, [[_bound.bound, 2, "getRoomInfo"], [_bound.bound, 2, "getRoomSchedule"], [_bound.bound, 2, "getRoomState"], [_bound.bound, 2, "getLocalUser"], [_bound.bound, 2, "getUserList"], [_bound.bound, 2, "getAllUserCount"], [_bound.bound, 2, "addObserver"], [_bound.bound, 2, "removeObserver"], [_bound.bound, 2, "_handlePostMessage"]], []).e;
223
+ var _applyDecs$e = _applyDecs(_FcrUIWidgetSDKImpl, [[_bound.bound, 2, "getRoomInfo"], [_bound.bound, 2, "getRoomSchedule"], [_bound.bound, 2, "getRoomState"], [_bound.bound, 2, "getLocalUser"], [_bound.bound, 2, "getUserList"], [_bound.bound, 2, "getAllUserCount"], [_bound.bound, 2, "startSessionByPhone"], [_bound.bound, 2, "startSessionByIP"], [_bound.bound, 2, "stopSession"], [_bound.bound, 2, "addObserver"], [_bound.bound, 2, "removeObserver"], [_bound.bound, 2, "_handlePostMessage"]], []).e;
209
224
  var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 1);
210
225
  _initProto = _applyDecs$e2[0];
211
226
  _applyDecs$e;
package/lib/type.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { FcrRoomInfo, FcrRoomSchedule, FcrRoomState, FcrUserInfo } from 'fcr-core/lib/type';
1
+ import type { FcrIPConnectorSession, FcrIPConnectorSessionParams, FcrPhoneConnectorSession, FcrPhoneConnectorSessionParams, FcrRoomConnectorSessionReason, FcrRoomConnectorSessionState, FcrRoomInfo, FcrRoomSchedule, FcrRoomState, FcrUserInfo } from 'fcr-core/lib/type';
2
2
  import type { FcrUserJoinedEvent, FcrUserLeftEvent, FcrUserPageParams, FcrUserPageResponse, FcrUserUpdatedEvent } from 'fcr-core/lib/room-control/user-control/type';
3
3
  type MethodNames<T> = {
4
4
  [K in keyof T]: T[K] extends Function ? K : never;
@@ -34,6 +34,20 @@ export interface FcrUIWidgetSDK {
34
34
  * 获取房间内用户总数
35
35
  */
36
36
  getAllUserCount(): Promise<number>;
37
+ /**
38
+ * 开始电话会话
39
+ * @param params 会话参数
40
+ */
41
+ startSessionByPhone(params: FcrPhoneConnectorSessionParams): Promise<string>;
42
+ /**
43
+ * 开始IP会话
44
+ */
45
+ startSessionByIP(params: FcrIPConnectorSessionParams): Promise<string>;
46
+ /**
47
+ * 停止会话
48
+ * @param sessionId 会话ID
49
+ */
50
+ stopSession(sessionId: string): Promise<void>;
37
51
  /**
38
52
  * 添加观察者,用来接收 Widget 事件回调
39
53
  * @param observer 实现 FcrUIWidgetObserver 的对象
@@ -72,6 +86,20 @@ export interface FcrUIWidgetObserver {
72
86
  * @param count 当前的用户数量
73
87
  */
74
88
  onAllUserCountUpdated?(roomId: string, count: number): void;
89
+ /**
90
+ * 电话会话状态更新回调
91
+ * @param session 会话信息
92
+ * @param state 状态
93
+ * @param reason 原因
94
+ */
95
+ onPhoneConnectorSessionStateUpdated?(session: FcrPhoneConnectorSession, state: FcrRoomConnectorSessionState, reason: FcrRoomConnectorSessionReason): void;
96
+ /**
97
+ * IP会话状态更新回调
98
+ * @param session 会话信息
99
+ * @param state 状态
100
+ * @param reason 原因
101
+ */
102
+ onIPConnectorSessionStateUpdated?(session: FcrIPConnectorSession, state: FcrRoomConnectorSessionState, reason: FcrRoomConnectorSessionReason): void;
75
103
  }
76
104
  export interface FcrUIBaseWidget {
77
105
  /**
@@ -98,6 +126,20 @@ export interface FcrUIBaseWidget {
98
126
  * 获取房间内用户总数
99
127
  */
100
128
  getAllUserCount(): number;
129
+ /**
130
+ * 开始电话会话
131
+ * @param params 会话参数
132
+ */
133
+ startSessionByPhone(params: FcrPhoneConnectorSessionParams): Promise<string>;
134
+ /**
135
+ * 开始IP会话
136
+ */
137
+ startSessionByIP(params: FcrIPConnectorSessionParams): Promise<string>;
138
+ /**
139
+ * 停止会话
140
+ * @param sessionId 会话ID
141
+ */
142
+ stopSession(sessionId: string): Promise<void>;
101
143
  /**
102
144
  * Fetches the list of users.
103
145
  * @param params
@@ -0,0 +1 @@
1
+ export { FcrUIWidgetSDKImpl as FcrUIWidgetSDK } from './sdk';
@@ -0,0 +1,33 @@
1
+ import "core-js/modules/es.array.concat.js";
2
+ import "core-js/modules/es.array.for-each.js";
3
+ import "core-js/modules/es.object.to-string.js";
4
+ import "core-js/modules/esnext.iterator.constructor.js";
5
+ import "core-js/modules/esnext.iterator.for-each.js";
6
+ import "core-js/modules/web.dom-collections.for-each.js";
7
+ import { getLogger as _getLogger, createLogger as _createLogger } from 'agora-foundation/lib/logger';
8
+ import { randomString } from 'agora-foundation/lib/utilities/misc';
9
+ import { serializeArgs } from 'agora-foundation/lib/decorator/log/log-serializer';
10
+ export var getLogger = function getLogger() {
11
+ return _getLogger({
12
+ label: 'fcr-widget-sdk'
13
+ });
14
+ };
15
+ export var createLogger = function createLogger(opts) {
16
+ return _createLogger({
17
+ label: 'fcr-widget-sdk',
18
+ prefix: "".concat(opts.prefix, "@").concat(randomString(5)),
19
+ database: opts.database
20
+ });
21
+ };
22
+ export var generateLogObserver = function generateLogObserver(logger, callbackMethods) {
23
+ var observer = {};
24
+ callbackMethods.forEach(function (method) {
25
+ observer[method] = function () {
26
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
+ args[_key] = arguments[_key];
28
+ }
29
+ logger.info("[API Callback] ".concat(method, " [parameters: ").concat(serializeArgs(args), "]"));
30
+ };
31
+ });
32
+ return observer;
33
+ };
package/lib-es/sdk.js ADDED
@@ -0,0 +1,218 @@
1
+ import "core-js/modules/es.symbol.js";
2
+ import "core-js/modules/es.symbol.description.js";
3
+ import "core-js/modules/es.symbol.to-primitive.js";
4
+ import "core-js/modules/es.error.cause.js";
5
+ import "core-js/modules/es.error.to-string.js";
6
+ import "core-js/modules/es.array.push.js";
7
+ import "core-js/modules/es.date.to-primitive.js";
8
+ import "core-js/modules/es.function.bind.js";
9
+ import "core-js/modules/es.function.name.js";
10
+ import "core-js/modules/es.object.create.js";
11
+ import "core-js/modules/es.object.define-property.js";
12
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
13
+ import "core-js/modules/esnext.function.metadata.js";
14
+ import "core-js/modules/esnext.symbol.metadata.js";
15
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
16
+ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
17
+ import _typeof from "@babel/runtime/helpers/typeof";
18
+ import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
19
+ import _createClass from "@babel/runtime/helpers/createClass";
20
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
21
+ var _FcrUIWidgetSDKImpl;
22
+ var _initProto;
23
+ import "core-js/modules/es.array.concat.js";
24
+ import "core-js/modules/es.array.is-array.js";
25
+ import "core-js/modules/es.array.iterator.js";
26
+ import "core-js/modules/es.date.to-string.js";
27
+ import "core-js/modules/es.map.js";
28
+ import "core-js/modules/es.number.constructor.js";
29
+ import "core-js/modules/es.object.to-string.js";
30
+ import "core-js/modules/es.string.iterator.js";
31
+ import "core-js/modules/esnext.map.delete-all.js";
32
+ import "core-js/modules/esnext.map.emplace.js";
33
+ import "core-js/modules/esnext.map.every.js";
34
+ import "core-js/modules/esnext.map.filter.js";
35
+ import "core-js/modules/esnext.map.find.js";
36
+ import "core-js/modules/esnext.map.find-key.js";
37
+ import "core-js/modules/esnext.map.includes.js";
38
+ import "core-js/modules/esnext.map.key-of.js";
39
+ import "core-js/modules/esnext.map.map-keys.js";
40
+ import "core-js/modules/esnext.map.map-values.js";
41
+ import "core-js/modules/esnext.map.merge.js";
42
+ import "core-js/modules/esnext.map.reduce.js";
43
+ import "core-js/modules/esnext.map.some.js";
44
+ import "core-js/modules/esnext.map.update.js";
45
+ import "core-js/modules/web.dom-collections.iterator.js";
46
+ 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)]; } }; }
47
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
48
+ 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); }
49
+ 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; }
50
+ 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; }
51
+ import { bound } from 'agora-foundation/lib/decorator/bound';
52
+ import { AgoraObservable } from 'agora-foundation/lib/utilities/observable';
53
+ import { createLogger, generateLogObserver } from './logger';
54
+ import { createControlledPromise } from './utils';
55
+ export var FcrUIWidgetSDKImpl = /*#__PURE__*/function () {
56
+ function FcrUIWidgetSDKImpl() {
57
+ _classCallCheck(this, FcrUIWidgetSDKImpl);
58
+ _defineProperty(this, "logger", (_initProto(this), createLogger({
59
+ prefix: 'FcrUIWidgetSDK',
60
+ database: false
61
+ })));
62
+ _defineProperty(this, "_observable", new AgoraObservable());
63
+ _defineProperty(this, "_requestPromises", new Map());
64
+ window.addEventListener('message', this._handlePostMessage);
65
+ this._addLogObserver();
66
+ }
67
+ return _createClass(FcrUIWidgetSDKImpl, [{
68
+ key: "_addLogObserver",
69
+ value: function _addLogObserver() {
70
+ this.addObserver(generateLogObserver(this.logger, ['onRoomStateUpdated', 'onRemoteUsersJoined', 'onRemoteUsersLeft', 'onUserInfoUpdated', 'onAllUserCountUpdated']));
71
+ }
72
+ }, {
73
+ key: "_createCallId",
74
+ value: function _createCallId(prefix) {
75
+ return "".concat(prefix, "-").concat(Number(new Date()));
76
+ }
77
+ }, {
78
+ key: "_createRequestParams",
79
+ value: function _createRequestParams(funcName, parameters) {
80
+ var callId = this._createCallId(funcName);
81
+ var finalParameters = parameters !== null && parameters !== void 0 ? parameters : [];
82
+ return {
83
+ action: 'apiRequest',
84
+ callId: callId,
85
+ method: funcName,
86
+ parameters: finalParameters
87
+ };
88
+ }
89
+ }, {
90
+ key: "_sendRequest",
91
+ value: function _sendRequest(funcName, parameters) {
92
+ var params = this._createRequestParams(funcName, parameters);
93
+ var p = createControlledPromise();
94
+ this._requestPromises.set(params.callId, p);
95
+ try {
96
+ if (_typeof(window.JsBridge) === 'object' && window.JsBridge !== null) {
97
+ var func = window.JsBridge[funcName];
98
+ if (typeof func === 'function') {
99
+ func(params);
100
+ this.logger.debug('sendRequest + JsBridge: ', params);
101
+ }
102
+ } else {
103
+ this.logger.debug('sendRequest + postMessage: ', params);
104
+ window.parent.postMessage(params, '*');
105
+ }
106
+ } catch (error) {
107
+ this.logger.error('Error sending request:', error);
108
+ var reject = p.reject;
109
+ reject && reject(error);
110
+ }
111
+ return p.promise;
112
+ }
113
+ }, {
114
+ key: "getRoomInfo",
115
+ value: function
116
+ // @trace
117
+ getRoomInfo() {
118
+ return this._sendRequest('getRoomInfo');
119
+ }
120
+ }, {
121
+ key: "getRoomSchedule",
122
+ value: function
123
+ // @trace
124
+ getRoomSchedule() {
125
+ return this._sendRequest('getRoomSchedule');
126
+ }
127
+ }, {
128
+ key: "getRoomState",
129
+ value: function
130
+ // @trace
131
+ getRoomState() {
132
+ return this._sendRequest('getRoomState');
133
+ }
134
+ }, {
135
+ key: "getLocalUser",
136
+ value: function
137
+ // @trace
138
+ getLocalUser() {
139
+ return this._sendRequest('getLocalUser');
140
+ }
141
+ }, {
142
+ key: "getUserList",
143
+ value: function
144
+ // @trace
145
+ getUserList() {
146
+ return this._sendRequest('getUserList');
147
+ }
148
+ }, {
149
+ key: "getAllUserCount",
150
+ value: function
151
+ // @trace
152
+ getAllUserCount() {
153
+ return this._sendRequest('getAllUserCount');
154
+ }
155
+ }, {
156
+ key: "startSessionByPhone",
157
+ value: function startSessionByPhone(params) {
158
+ return this._sendRequest('startSessionByPhone', [params]);
159
+ }
160
+ }, {
161
+ key: "startSessionByIP",
162
+ value: function startSessionByIP(params) {
163
+ return this._sendRequest('startSessionByIP', [params]);
164
+ }
165
+ }, {
166
+ key: "stopSession",
167
+ value: function stopSession(sessionId) {
168
+ return this._sendRequest('stopSession', [sessionId]);
169
+ }
170
+ }, {
171
+ key: "addObserver",
172
+ value: function
173
+ // @trace
174
+ addObserver(observer) {
175
+ this._observable.addObserver(observer);
176
+ }
177
+ }, {
178
+ key: "removeObserver",
179
+ value: function
180
+ // @trace
181
+ removeObserver(observer) {
182
+ this._observable.removeObserver(observer);
183
+ }
184
+ }, {
185
+ key: "_handlePostMessage",
186
+ value: function _handlePostMessage(event) {
187
+ if (event.data) {
188
+ var action = event.data.action;
189
+ if (action === 'apiResponse') {
190
+ this.logger.debug('handlePostMessage apiResponse: ', event.data);
191
+ var _event$data = event.data,
192
+ callId = _event$data.callId,
193
+ returnValue = _event$data.returnValue;
194
+ var controllerPromiseGroup = this._requestPromises.get(callId);
195
+ if (controllerPromiseGroup) {
196
+ this.logger.info('resolve callId', callId);
197
+ var resolve = controllerPromiseGroup.resolve;
198
+ resolve && resolve(returnValue);
199
+ this._requestPromises["delete"](callId);
200
+ }
201
+ } else if (action === 'callback') {
202
+ var _this$_observable;
203
+ this.logger.debug('handlePostMessage callback: ', event.data);
204
+ var _event$data2 = event.data,
205
+ payload = _event$data2.payload,
206
+ method = _event$data2.method;
207
+ var args = Array.isArray(payload) ? payload : [payload];
208
+ (_this$_observable = this._observable).notifyObservers.apply(_this$_observable, [method].concat(_toConsumableArray(args)));
209
+ }
210
+ }
211
+ }
212
+ }]);
213
+ }();
214
+ _FcrUIWidgetSDKImpl = FcrUIWidgetSDKImpl;
215
+ var _applyDecs$e = _applyDecs(_FcrUIWidgetSDKImpl, [[bound, 2, "getRoomInfo"], [bound, 2, "getRoomSchedule"], [bound, 2, "getRoomState"], [bound, 2, "getLocalUser"], [bound, 2, "getUserList"], [bound, 2, "getAllUserCount"], [bound, 2, "startSessionByPhone"], [bound, 2, "startSessionByIP"], [bound, 2, "stopSession"], [bound, 2, "addObserver"], [bound, 2, "removeObserver"], [bound, 2, "_handlePostMessage"]], []).e;
216
+ var _applyDecs$e2 = _slicedToArray(_applyDecs$e, 1);
217
+ _initProto = _applyDecs$e2[0];
218
+ _applyDecs$e;
package/lib-es/type.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import "core-js/modules/es.object.to-string.js";
2
+ import "core-js/modules/es.promise.js";
3
+ export var createControlledPromise = function createControlledPromise() {
4
+ var resolve = function resolve() {};
5
+ var reject = function reject() {};
6
+ var promise = new Promise(function (_resolve, _reject) {
7
+ resolve = _resolve;
8
+ reject = _reject;
9
+ });
10
+ return {
11
+ promise: promise,
12
+ resolve: resolve,
13
+ reject: reject
14
+ };
15
+ };
package/package.json CHANGED
@@ -1,29 +1,30 @@
1
1
  {
2
- "name": "fcr-ui-widget-sdk",
3
- "version": "3.8.0",
4
- "main": "lib/index.js",
5
- "types": "lib/index.d.ts",
6
- "repository": "ssh://git@git.agoralab.co/aduc/fcr-ui-scene-desktop.git",
7
- "author": "agora.io",
8
- "license": "MIT",
9
- "files": [
10
- "lib"
11
- ],
12
- "scripts": {
13
- "build": "agora-tc-transpile",
14
- "build-widget": "node scripts/build-widget.js",
15
- "test": "agora-tc-test-karma-browser"
16
- },
17
- "dependencies": {
18
- "fcr-core": "3.8.0",
19
- "agora-foundation": "3.8.0"
20
- },
21
- "devDependencies": {
22
- "@babel/core": "^7.23.5",
23
- "@babel/preset-env": "^7.23.5",
24
- "@babel/preset-react": "^7.24.1",
25
- "@babel/preset-typescript": "^7.23.3",
26
- "agora-toolchain": "3.8.0",
27
- "tslib": "^2.6.2"
28
- }
29
- }
2
+ "name": "fcr-ui-widget-sdk",
3
+ "version": "3.8.2",
4
+ "main": "lib/index.js",
5
+ "types": "lib/index.d.ts",
6
+ "repository": "ssh://git@git.agoralab.co/aduc/fcr-ui-scene-desktop.git",
7
+ "author": "agora.io",
8
+ "license": "MIT",
9
+ "files": [
10
+ "lib",
11
+ "lib-es"
12
+ ],
13
+ "scripts": {
14
+ "build": "agora-tc-transpile --esm",
15
+ "build-widget": "node scripts/build-widget.js",
16
+ "test": "agora-tc-test-karma-browser"
17
+ },
18
+ "dependencies": {
19
+ "agora-foundation": "3.8.2",
20
+ "fcr-core": "3.8.2"
21
+ },
22
+ "devDependencies": {
23
+ "@babel/core": "^7.23.5",
24
+ "@babel/preset-env": "^7.23.5",
25
+ "@babel/preset-react": "^7.24.1",
26
+ "@babel/preset-typescript": "^7.23.3",
27
+ "agora-toolchain": "3.8.2",
28
+ "tslib": "^2.6.2"
29
+ }
30
+ }