@openfin/remote-adapter 43.100.32 → 43.100.35
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/out/remote-adapter.js +392 -282
- package/package.json +2 -2
package/out/remote-adapter.js
CHANGED
|
@@ -49,13 +49,13 @@ async function promiseMapSerial(arr, func) {
|
|
|
49
49
|
}
|
|
50
50
|
promises.promiseMapSerial = promiseMapSerial;
|
|
51
51
|
|
|
52
|
-
var __classPrivateFieldSet$
|
|
52
|
+
var __classPrivateFieldSet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
53
53
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
54
54
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
55
55
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
56
56
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
57
57
|
};
|
|
58
|
-
var __classPrivateFieldGet$
|
|
58
|
+
var __classPrivateFieldGet$i = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
59
59
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
60
60
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
61
61
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -140,7 +140,7 @@ class EmitterBase extends Base {
|
|
|
140
140
|
this.emit = (eventType, payload, ...args) => {
|
|
141
141
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
|
142
142
|
};
|
|
143
|
-
this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$
|
|
143
|
+
this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
|
|
144
144
|
/**
|
|
145
145
|
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
|
146
146
|
* `once` subscription.
|
|
@@ -150,14 +150,14 @@ class EmitterBase extends Base {
|
|
|
150
150
|
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
|
151
151
|
*/
|
|
152
152
|
this.cleanUpRemovedListener = (eventType, listener) => {
|
|
153
|
-
const deregister = __classPrivateFieldGet$
|
|
153
|
+
const deregister = __classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
|
|
154
154
|
if (deregister) {
|
|
155
|
-
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$
|
|
155
|
+
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
|
|
156
156
|
emitter.removeListener(eventType, deregister);
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
this.getOrCreateEmitter = () => {
|
|
160
|
-
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$
|
|
160
|
+
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
|
|
161
161
|
if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
|
|
162
162
|
emitter.on('removeListener', this.cleanUpRemovedListener);
|
|
163
163
|
}
|
|
@@ -199,8 +199,8 @@ class EmitterBase extends Base {
|
|
|
199
199
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
|
200
200
|
return Promise.resolve();
|
|
201
201
|
};
|
|
202
|
-
__classPrivateFieldSet$
|
|
203
|
-
__classPrivateFieldSet$
|
|
202
|
+
__classPrivateFieldSet$h(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
|
203
|
+
__classPrivateFieldSet$h(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
|
|
204
204
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
|
205
205
|
}
|
|
206
206
|
/**
|
|
@@ -229,7 +229,7 @@ class EmitterBase extends Base {
|
|
|
229
229
|
*/
|
|
230
230
|
async once(eventType, listener, options) {
|
|
231
231
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
232
|
-
__classPrivateFieldGet$
|
|
232
|
+
__classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
|
233
233
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
234
234
|
emitter.once(eventType, deregister);
|
|
235
235
|
emitter.once(eventType, listener);
|
|
@@ -260,7 +260,7 @@ class EmitterBase extends Base {
|
|
|
260
260
|
*/
|
|
261
261
|
async prependOnceListener(eventType, listener, options) {
|
|
262
262
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
263
|
-
__classPrivateFieldGet$
|
|
263
|
+
__classPrivateFieldGet$i(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
|
264
264
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
265
265
|
emitter.prependOnceListener(eventType, listener);
|
|
266
266
|
emitter.once(eventType, deregister);
|
|
@@ -320,7 +320,7 @@ class EmitterBase extends Base {
|
|
|
320
320
|
}
|
|
321
321
|
deleteEmitterIfNothingRegistered(emitter) {
|
|
322
322
|
if (emitter.eventNames().every((type) => type === 'removeListener')) {
|
|
323
|
-
this.wire.eventAggregator.delete(__classPrivateFieldGet$
|
|
323
|
+
this.wire.eventAggregator.delete(__classPrivateFieldGet$i(this, _EmitterBase_emitterAccessor, "f"));
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
}
|
|
@@ -851,13 +851,13 @@ class AsyncRetryableLazy {
|
|
|
851
851
|
}
|
|
852
852
|
lazy.AsyncRetryableLazy = AsyncRetryableLazy;
|
|
853
853
|
|
|
854
|
-
var __classPrivateFieldSet$
|
|
854
|
+
var __classPrivateFieldSet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
855
855
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
856
856
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
857
857
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
858
858
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
859
859
|
};
|
|
860
|
-
var __classPrivateFieldGet$
|
|
860
|
+
var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
861
861
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
862
862
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
863
863
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -868,12 +868,12 @@ var __importDefault$6 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
|
|
|
868
868
|
var _InteropBroker_fdc3Info, _InteropBroker_contextGroups, _InteropBroker_providerPromise;
|
|
869
869
|
Object.defineProperty(InteropBroker$1, "__esModule", { value: true });
|
|
870
870
|
InteropBroker$1.InteropBroker = void 0;
|
|
871
|
-
const base_1$
|
|
871
|
+
const base_1$n = base;
|
|
872
872
|
const SessionContextGroupBroker_1 = __importDefault$6(SessionContextGroupBroker$1);
|
|
873
873
|
const utils_1$7 = utils$3;
|
|
874
874
|
const isEqual_1$1 = __importDefault$6(require$$3);
|
|
875
875
|
const PrivateChannelProvider_1 = PrivateChannelProvider$1;
|
|
876
|
-
const lazy_1$
|
|
876
|
+
const lazy_1$3 = lazy;
|
|
877
877
|
const defaultContextGroups = [
|
|
878
878
|
{
|
|
879
879
|
id: 'green',
|
|
@@ -1037,7 +1037,7 @@ const defaultContextGroups = [
|
|
|
1037
1037
|
* ---
|
|
1038
1038
|
*
|
|
1039
1039
|
*/
|
|
1040
|
-
class InteropBroker extends base_1$
|
|
1040
|
+
class InteropBroker extends base_1$n.Base {
|
|
1041
1041
|
/**
|
|
1042
1042
|
* @internal
|
|
1043
1043
|
*/
|
|
@@ -1048,19 +1048,19 @@ class InteropBroker extends base_1$m.Base {
|
|
|
1048
1048
|
_InteropBroker_contextGroups.set(this, void 0);
|
|
1049
1049
|
_InteropBroker_providerPromise.set(this, void 0);
|
|
1050
1050
|
this.getProvider = () => {
|
|
1051
|
-
return __classPrivateFieldGet$
|
|
1051
|
+
return __classPrivateFieldGet$h(this, _InteropBroker_providerPromise, "f").getValue();
|
|
1052
1052
|
};
|
|
1053
1053
|
this.interopClients = new Map();
|
|
1054
1054
|
this.contextGroupsById = new Map();
|
|
1055
|
-
__classPrivateFieldSet$
|
|
1056
|
-
__classPrivateFieldSet$
|
|
1055
|
+
__classPrivateFieldSet$g(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
|
|
1056
|
+
__classPrivateFieldSet$g(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
|
|
1057
1057
|
if (options?.logging) {
|
|
1058
1058
|
this.logging = options.logging;
|
|
1059
1059
|
}
|
|
1060
1060
|
this.intentClientMap = new Map();
|
|
1061
1061
|
this.lastContextMap = new Map();
|
|
1062
1062
|
this.sessionContextGroupMap = new Map();
|
|
1063
|
-
__classPrivateFieldSet$
|
|
1063
|
+
__classPrivateFieldSet$g(this, _InteropBroker_providerPromise, new lazy_1$3.Lazy(createProvider), "f");
|
|
1064
1064
|
this.setContextGroupMap();
|
|
1065
1065
|
this.setupChannelProvider();
|
|
1066
1066
|
}
|
|
@@ -1328,7 +1328,7 @@ class InteropBroker extends base_1$m.Base {
|
|
|
1328
1328
|
// don't expose, analytics-only call
|
|
1329
1329
|
});
|
|
1330
1330
|
// Create copy for immutability
|
|
1331
|
-
return __classPrivateFieldGet$
|
|
1331
|
+
return __classPrivateFieldGet$h(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
|
|
1332
1332
|
return { ...contextGroup };
|
|
1333
1333
|
});
|
|
1334
1334
|
}
|
|
@@ -1739,7 +1739,7 @@ class InteropBroker extends base_1$m.Base {
|
|
|
1739
1739
|
const { fdc3Version } = payload;
|
|
1740
1740
|
return {
|
|
1741
1741
|
fdc3Version,
|
|
1742
|
-
...__classPrivateFieldGet$
|
|
1742
|
+
...__classPrivateFieldGet$h(this, _InteropBroker_fdc3Info, "f"),
|
|
1743
1743
|
optionalFeatures: {
|
|
1744
1744
|
OriginatingAppMetadata: false,
|
|
1745
1745
|
UserChannelMembershipAPIs: true
|
|
@@ -2748,8 +2748,8 @@ var main = {};
|
|
|
2748
2748
|
|
|
2749
2749
|
Object.defineProperty(main, "__esModule", { value: true });
|
|
2750
2750
|
main.WebContents = void 0;
|
|
2751
|
-
const base_1$
|
|
2752
|
-
class WebContents extends base_1$
|
|
2751
|
+
const base_1$m = base;
|
|
2752
|
+
class WebContents extends base_1$m.EmitterBase {
|
|
2753
2753
|
/**
|
|
2754
2754
|
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
2755
2755
|
* @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
@@ -7109,7 +7109,7 @@ var Instance$4 = {};
|
|
|
7109
7109
|
Object.defineProperty(Instance$4, "__esModule", { value: true });
|
|
7110
7110
|
Instance$4._Frame = void 0;
|
|
7111
7111
|
/* eslint-disable import/prefer-default-export */
|
|
7112
|
-
const base_1$
|
|
7112
|
+
const base_1$l = base;
|
|
7113
7113
|
/**
|
|
7114
7114
|
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
|
7115
7115
|
* has its own DOM and global JS context (which may or may not be linked to that of the parent depending
|
|
@@ -7130,7 +7130,7 @@ const base_1$k = base;
|
|
|
7130
7130
|
* The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
|
|
7131
7131
|
* (iframe or main window) as well as the ability to listen for {@link OpenFin.FrameEvents frame-specific events}.
|
|
7132
7132
|
*/
|
|
7133
|
-
class _Frame extends base_1$
|
|
7133
|
+
class _Frame extends base_1$l.EmitterBase {
|
|
7134
7134
|
/**
|
|
7135
7135
|
* @internal
|
|
7136
7136
|
*/
|
|
@@ -7176,13 +7176,13 @@ Instance$4._Frame = _Frame;
|
|
|
7176
7176
|
|
|
7177
7177
|
Object.defineProperty(Factory$5, "__esModule", { value: true });
|
|
7178
7178
|
Factory$5._FrameModule = void 0;
|
|
7179
|
-
const base_1$
|
|
7179
|
+
const base_1$k = base;
|
|
7180
7180
|
const validate_1$3 = validate;
|
|
7181
7181
|
const Instance_1$4 = Instance$4;
|
|
7182
7182
|
/**
|
|
7183
7183
|
* Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
|
|
7184
7184
|
*/
|
|
7185
|
-
class _FrameModule extends base_1$
|
|
7185
|
+
class _FrameModule extends base_1$k.Base {
|
|
7186
7186
|
/**
|
|
7187
7187
|
* Asynchronously returns an API handle for the given Frame identity.
|
|
7188
7188
|
*
|
|
@@ -7308,7 +7308,7 @@ var Instance$3 = {};
|
|
|
7308
7308
|
Object.defineProperty(Instance$3, "__esModule", { value: true });
|
|
7309
7309
|
Instance$3.ExternalApplication = void 0;
|
|
7310
7310
|
/* eslint-disable import/prefer-default-export */
|
|
7311
|
-
const base_1$
|
|
7311
|
+
const base_1$j = base;
|
|
7312
7312
|
/**
|
|
7313
7313
|
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
7314
7314
|
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
|
@@ -7319,7 +7319,7 @@ const base_1$i = base;
|
|
|
7319
7319
|
* - Processes started via `System.launchExternalApplication`
|
|
7320
7320
|
* - Processes monitored via `System.monitorExternalProcess`
|
|
7321
7321
|
*/
|
|
7322
|
-
class ExternalApplication extends base_1$
|
|
7322
|
+
class ExternalApplication extends base_1$j.EmitterBase {
|
|
7323
7323
|
/**
|
|
7324
7324
|
* @internal
|
|
7325
7325
|
*/
|
|
@@ -7347,12 +7347,12 @@ Instance$3.ExternalApplication = ExternalApplication;
|
|
|
7347
7347
|
|
|
7348
7348
|
Object.defineProperty(Factory$4, "__esModule", { value: true });
|
|
7349
7349
|
Factory$4.ExternalApplicationModule = void 0;
|
|
7350
|
-
const base_1$
|
|
7350
|
+
const base_1$i = base;
|
|
7351
7351
|
const Instance_1$3 = Instance$3;
|
|
7352
7352
|
/**
|
|
7353
7353
|
* Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
|
|
7354
7354
|
*/
|
|
7355
|
-
class ExternalApplicationModule extends base_1$
|
|
7355
|
+
class ExternalApplicationModule extends base_1$i.Base {
|
|
7356
7356
|
/**
|
|
7357
7357
|
* Asynchronously returns an External Application object that represents an external application.
|
|
7358
7358
|
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
@@ -7580,13 +7580,13 @@ function errorToPOJO(error) {
|
|
|
7580
7580
|
}
|
|
7581
7581
|
errors.errorToPOJO = errorToPOJO;
|
|
7582
7582
|
|
|
7583
|
-
var __classPrivateFieldSet$
|
|
7583
|
+
var __classPrivateFieldSet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
7584
7584
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
7585
7585
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
7586
7586
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
7587
7587
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7588
7588
|
};
|
|
7589
|
-
var __classPrivateFieldGet$
|
|
7589
|
+
var __classPrivateFieldGet$g = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
7590
7590
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
7591
7591
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
7592
7592
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -7614,19 +7614,19 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
7614
7614
|
// Typing as unknown to avoid circular dependency, should not be used directly.
|
|
7615
7615
|
_Transport_fin.set(this, void 0);
|
|
7616
7616
|
this.connectSync = () => {
|
|
7617
|
-
const wire = __classPrivateFieldGet$
|
|
7617
|
+
const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
|
|
7618
7618
|
wire.connectSync();
|
|
7619
7619
|
};
|
|
7620
7620
|
// This function is only used in our tests.
|
|
7621
7621
|
this.getPort = () => {
|
|
7622
|
-
const wire = __classPrivateFieldGet$
|
|
7622
|
+
const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
|
|
7623
7623
|
return wire.getPort();
|
|
7624
7624
|
};
|
|
7625
|
-
__classPrivateFieldSet$
|
|
7625
|
+
__classPrivateFieldSet$f(this, _Transport_wire, factory(this.onmessage.bind(this)), "f");
|
|
7626
7626
|
this.environment = environment;
|
|
7627
|
-
this.sendRaw = __classPrivateFieldGet$
|
|
7627
|
+
this.sendRaw = __classPrivateFieldGet$g(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$g(this, _Transport_wire, "f"));
|
|
7628
7628
|
this.registerMessageHandler(this.handleMessage.bind(this));
|
|
7629
|
-
__classPrivateFieldGet$
|
|
7629
|
+
__classPrivateFieldGet$g(this, _Transport_wire, "f").on('disconnected', () => {
|
|
7630
7630
|
for (const [, { handleNack }] of this.wireListeners) {
|
|
7631
7631
|
handleNack({ reason: 'Remote connection has closed' });
|
|
7632
7632
|
}
|
|
@@ -7638,24 +7638,24 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
7638
7638
|
this.me = (0, me_1$1.getBaseMe)(entityType, uuid, name);
|
|
7639
7639
|
}
|
|
7640
7640
|
getFin() {
|
|
7641
|
-
if (!__classPrivateFieldGet$
|
|
7641
|
+
if (!__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
|
|
7642
7642
|
throw new Error('No Fin object registered for this transport');
|
|
7643
7643
|
}
|
|
7644
|
-
return __classPrivateFieldGet$
|
|
7644
|
+
return __classPrivateFieldGet$g(this, _Transport_fin, "f");
|
|
7645
7645
|
}
|
|
7646
7646
|
registerFin(_fin) {
|
|
7647
|
-
if (__classPrivateFieldGet$
|
|
7647
|
+
if (__classPrivateFieldGet$g(this, _Transport_fin, "f")) {
|
|
7648
7648
|
throw new Error('Fin object has already been registered for this transport');
|
|
7649
7649
|
}
|
|
7650
|
-
__classPrivateFieldSet$
|
|
7650
|
+
__classPrivateFieldSet$f(this, _Transport_fin, _fin, "f");
|
|
7651
7651
|
}
|
|
7652
7652
|
shutdown() {
|
|
7653
|
-
const wire = __classPrivateFieldGet$
|
|
7653
|
+
const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
|
|
7654
7654
|
return wire.shutdown();
|
|
7655
7655
|
}
|
|
7656
7656
|
async connect(config) {
|
|
7657
7657
|
if ((0, wire_1.isConfigWithReceiver)(config)) {
|
|
7658
|
-
await __classPrivateFieldGet$
|
|
7658
|
+
await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(config.receiver);
|
|
7659
7659
|
return this.authorize(config);
|
|
7660
7660
|
}
|
|
7661
7661
|
if ((0, wire_1.isRemoteConfig)(config)) {
|
|
@@ -7671,13 +7671,13 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
7671
7671
|
return undefined;
|
|
7672
7672
|
}
|
|
7673
7673
|
async connectRemote(config) {
|
|
7674
|
-
await __classPrivateFieldGet$
|
|
7674
|
+
await __classPrivateFieldGet$g(this, _Transport_wire, "f").connect(new (this.environment.getWsConstructor())(config.address));
|
|
7675
7675
|
return this.authorize(config);
|
|
7676
7676
|
}
|
|
7677
7677
|
async connectByPort(config) {
|
|
7678
7678
|
const { address, uuid } = config;
|
|
7679
7679
|
const reqAuthPayload = { ...config, type: 'file-token' };
|
|
7680
|
-
const wire = __classPrivateFieldGet$
|
|
7680
|
+
const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
|
|
7681
7681
|
await wire.connect(new (this.environment.getWsConstructor())(config.address));
|
|
7682
7682
|
const requestExtAuthRet = await this.sendAction('request-external-authorization', {
|
|
7683
7683
|
uuid,
|
|
@@ -7713,7 +7713,7 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
7713
7713
|
payload,
|
|
7714
7714
|
messageId
|
|
7715
7715
|
};
|
|
7716
|
-
const wire = __classPrivateFieldGet$
|
|
7716
|
+
const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
|
|
7717
7717
|
this.addWireListener(messageId, resolve, (payload) => this.nackHandler(payload, reject, callSites), uncorrelated);
|
|
7718
7718
|
return wire.send(msg).catch(reject);
|
|
7719
7719
|
});
|
|
@@ -7735,7 +7735,7 @@ class Transport extends events_1$5.EventEmitter {
|
|
|
7735
7735
|
const resolver = (data) => {
|
|
7736
7736
|
resolve(data.payload);
|
|
7737
7737
|
};
|
|
7738
|
-
const wire = __classPrivateFieldGet$
|
|
7738
|
+
const wire = __classPrivateFieldGet$g(this, _Transport_wire, "f");
|
|
7739
7739
|
return wire
|
|
7740
7740
|
.send(origData)
|
|
7741
7741
|
.then(() => this.addWireListener(id, resolver, (payload) => this.nackHandler(payload, reject), false))
|
|
@@ -7891,7 +7891,7 @@ var system = {};
|
|
|
7891
7891
|
*/
|
|
7892
7892
|
Object.defineProperty(system, "__esModule", { value: true });
|
|
7893
7893
|
system.System = void 0;
|
|
7894
|
-
const base_1$
|
|
7894
|
+
const base_1$h = base;
|
|
7895
7895
|
const transport_errors_1$4 = transportErrors;
|
|
7896
7896
|
const window_1 = requireWindow();
|
|
7897
7897
|
const events_1$3 = require$$0;
|
|
@@ -7901,7 +7901,7 @@ const events_1$3 = require$$0;
|
|
|
7901
7901
|
* clearing the cache and exiting the runtime as well as listen to {@link OpenFin.SystemEvents system events}.
|
|
7902
7902
|
*
|
|
7903
7903
|
*/
|
|
7904
|
-
class System extends base_1$
|
|
7904
|
+
class System extends base_1$h.EmitterBase {
|
|
7905
7905
|
/**
|
|
7906
7906
|
* @internal
|
|
7907
7907
|
*/
|
|
@@ -10212,12 +10212,12 @@ class ChannelError extends Error {
|
|
|
10212
10212
|
}
|
|
10213
10213
|
channelError.ChannelError = ChannelError;
|
|
10214
10214
|
|
|
10215
|
-
var __classPrivateFieldGet$
|
|
10215
|
+
var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
10216
10216
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10217
10217
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10218
10218
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10219
10219
|
};
|
|
10220
|
-
var __classPrivateFieldSet$
|
|
10220
|
+
var __classPrivateFieldSet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10221
10221
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10222
10222
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10223
10223
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -10261,7 +10261,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
10261
10261
|
static closeChannelByEndpointId(id) {
|
|
10262
10262
|
const channel = channelClientsByEndpointId.get(id);
|
|
10263
10263
|
if (channel) {
|
|
10264
|
-
__classPrivateFieldGet$
|
|
10264
|
+
__classPrivateFieldGet$f(channel, _ChannelClient_close, "f").call(channel);
|
|
10265
10265
|
}
|
|
10266
10266
|
}
|
|
10267
10267
|
/**
|
|
@@ -10272,7 +10272,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
10272
10272
|
for (const channelClient of channelClientsByEndpointId.values()) {
|
|
10273
10273
|
if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
|
|
10274
10274
|
channelClient.disconnectListener(eventPayload);
|
|
10275
|
-
__classPrivateFieldGet$
|
|
10275
|
+
__classPrivateFieldGet$f(channelClient, _ChannelClient_close, "f").call(channelClient);
|
|
10276
10276
|
}
|
|
10277
10277
|
}
|
|
10278
10278
|
}
|
|
@@ -10287,12 +10287,12 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
10287
10287
|
this.processAction = (action, payload, senderIdentity) => super.processAction(action, payload, senderIdentity);
|
|
10288
10288
|
_ChannelClient_close.set(this, () => {
|
|
10289
10289
|
channelClientsByEndpointId.delete(this.endpointId);
|
|
10290
|
-
__classPrivateFieldGet$
|
|
10290
|
+
__classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").close();
|
|
10291
10291
|
});
|
|
10292
|
-
__classPrivateFieldSet$
|
|
10292
|
+
__classPrivateFieldSet$e(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
|
|
10293
10293
|
this.disconnectListener = () => undefined;
|
|
10294
10294
|
this.endpointId = routingInfo.endpointId;
|
|
10295
|
-
__classPrivateFieldSet$
|
|
10295
|
+
__classPrivateFieldSet$e(this, _ChannelClient_strategy, strategy, "f");
|
|
10296
10296
|
channelClientsByEndpointId.set(this.endpointId, this);
|
|
10297
10297
|
strategy.receive(this.processAction);
|
|
10298
10298
|
}
|
|
@@ -10300,7 +10300,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
10300
10300
|
* a read-only provider identity
|
|
10301
10301
|
*/
|
|
10302
10302
|
get providerIdentity() {
|
|
10303
|
-
const protectedObj = __classPrivateFieldGet$
|
|
10303
|
+
const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
|
|
10304
10304
|
return protectedObj.providerIdentity;
|
|
10305
10305
|
}
|
|
10306
10306
|
/**
|
|
@@ -10329,9 +10329,9 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
10329
10329
|
* ```
|
|
10330
10330
|
*/
|
|
10331
10331
|
async dispatch(action, payload) {
|
|
10332
|
-
if (__classPrivateFieldGet$
|
|
10332
|
+
if (__classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").isEndpointConnected(this.providerIdentity.channelId)) {
|
|
10333
10333
|
const callSites = transport_errors_1$1.RuntimeError.getCallSite();
|
|
10334
|
-
return __classPrivateFieldGet$
|
|
10334
|
+
return __classPrivateFieldGet$f(this, _ChannelClient_strategy, "f").send(this.providerIdentity.channelId, action, payload).catch((e) => {
|
|
10335
10335
|
throw new channel_error_1$1.ChannelError(e, action, payload, callSites);
|
|
10336
10336
|
});
|
|
10337
10337
|
}
|
|
@@ -10383,10 +10383,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
10383
10383
|
*/
|
|
10384
10384
|
async disconnect() {
|
|
10385
10385
|
await this.sendDisconnectAction();
|
|
10386
|
-
__classPrivateFieldGet$
|
|
10386
|
+
__classPrivateFieldGet$f(this, _ChannelClient_close, "f").call(this);
|
|
10387
10387
|
}
|
|
10388
10388
|
async sendDisconnectAction() {
|
|
10389
|
-
const protectedObj = __classPrivateFieldGet$
|
|
10389
|
+
const protectedObj = __classPrivateFieldGet$f(this, _ChannelClient_protectedObj, "f");
|
|
10390
10390
|
await protectedObj.close();
|
|
10391
10391
|
}
|
|
10392
10392
|
/**
|
|
@@ -10419,13 +10419,13 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
|
|
|
10419
10419
|
|
|
10420
10420
|
var strategy$3 = {};
|
|
10421
10421
|
|
|
10422
|
-
var __classPrivateFieldSet$
|
|
10422
|
+
var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10423
10423
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10424
10424
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10425
10425
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10426
10426
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
10427
10427
|
};
|
|
10428
|
-
var __classPrivateFieldGet$
|
|
10428
|
+
var __classPrivateFieldGet$e = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
10429
10429
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10430
10430
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10431
10431
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -10450,7 +10450,7 @@ class ClassicStrategy {
|
|
|
10450
10450
|
// connection problems occur
|
|
10451
10451
|
_ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map());
|
|
10452
10452
|
this.send = async (endpointId, action, payload) => {
|
|
10453
|
-
const to = __classPrivateFieldGet$
|
|
10453
|
+
const to = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
|
|
10454
10454
|
if (!to) {
|
|
10455
10455
|
throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
|
|
10456
10456
|
}
|
|
@@ -10462,13 +10462,13 @@ class ClassicStrategy {
|
|
|
10462
10462
|
}
|
|
10463
10463
|
delete cleanId.isLocalEndpointId;
|
|
10464
10464
|
// grab the promise before awaiting it to save in our pending messages map
|
|
10465
|
-
const p = __classPrivateFieldGet$
|
|
10465
|
+
const p = __classPrivateFieldGet$e(this, _ClassicStrategy_wire, "f").sendAction('send-channel-message', {
|
|
10466
10466
|
...cleanId,
|
|
10467
10467
|
providerIdentity: this.providerIdentity,
|
|
10468
10468
|
action,
|
|
10469
10469
|
payload
|
|
10470
10470
|
});
|
|
10471
|
-
__classPrivateFieldGet$
|
|
10471
|
+
__classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
|
|
10472
10472
|
const raw = await p
|
|
10473
10473
|
.catch((error) => {
|
|
10474
10474
|
if ('cause' in error) {
|
|
@@ -10478,16 +10478,16 @@ class ClassicStrategy {
|
|
|
10478
10478
|
})
|
|
10479
10479
|
.finally(() => {
|
|
10480
10480
|
// clean up the pending promise
|
|
10481
|
-
__classPrivateFieldGet$
|
|
10481
|
+
__classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
|
|
10482
10482
|
});
|
|
10483
10483
|
return raw.payload.data.result;
|
|
10484
10484
|
};
|
|
10485
10485
|
this.close = async () => {
|
|
10486
10486
|
this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
|
|
10487
|
-
[...__classPrivateFieldGet$
|
|
10488
|
-
__classPrivateFieldSet$
|
|
10487
|
+
[...__classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
|
|
10488
|
+
__classPrivateFieldSet$d(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
|
|
10489
10489
|
};
|
|
10490
|
-
__classPrivateFieldSet$
|
|
10490
|
+
__classPrivateFieldSet$d(this, _ClassicStrategy_wire, wire, "f");
|
|
10491
10491
|
}
|
|
10492
10492
|
onEndpointDisconnect(endpointId, listener) {
|
|
10493
10493
|
// Never fires for 'classic'.
|
|
@@ -10496,20 +10496,20 @@ class ClassicStrategy {
|
|
|
10496
10496
|
this.messageReceiver.addEndpoint(listener, this.providerIdentity.channelId, this.endpointId);
|
|
10497
10497
|
}
|
|
10498
10498
|
async closeEndpoint(endpointId) {
|
|
10499
|
-
const id = __classPrivateFieldGet$
|
|
10500
|
-
__classPrivateFieldGet$
|
|
10501
|
-
const pendingSet = __classPrivateFieldGet$
|
|
10499
|
+
const id = __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
|
|
10500
|
+
__classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
|
|
10501
|
+
const pendingSet = __classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
|
|
10502
10502
|
pendingSet?.forEach((p) => {
|
|
10503
10503
|
const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
|
|
10504
10504
|
p.cancel(new Error(errorMsg));
|
|
10505
10505
|
});
|
|
10506
10506
|
}
|
|
10507
10507
|
isEndpointConnected(endpointId) {
|
|
10508
|
-
return __classPrivateFieldGet$
|
|
10508
|
+
return __classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").has(endpointId);
|
|
10509
10509
|
}
|
|
10510
10510
|
addEndpoint(endpointId, payload) {
|
|
10511
|
-
__classPrivateFieldGet$
|
|
10512
|
-
__classPrivateFieldGet$
|
|
10511
|
+
__classPrivateFieldGet$e(this, _ClassicStrategy_endpointIdentityMap, "f").set(endpointId, payload.endpointIdentity);
|
|
10512
|
+
__classPrivateFieldGet$e(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
|
|
10513
10513
|
}
|
|
10514
10514
|
isValidEndpointPayload(payload) {
|
|
10515
10515
|
return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
|
|
@@ -10525,12 +10525,12 @@ var strategy$2 = {};
|
|
|
10525
10525
|
|
|
10526
10526
|
var endpoint = {};
|
|
10527
10527
|
|
|
10528
|
-
var __classPrivateFieldGet$
|
|
10528
|
+
var __classPrivateFieldGet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
10529
10529
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10530
10530
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10531
10531
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10532
10532
|
};
|
|
10533
|
-
var __classPrivateFieldSet$
|
|
10533
|
+
var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10534
10534
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10535
10535
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10536
10536
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -10565,8 +10565,8 @@ class RTCEndpoint {
|
|
|
10565
10565
|
if (this.rtc.rtcClient.connectionState !== 'connected') {
|
|
10566
10566
|
this.rtc.rtcClient.removeEventListener('connectionstatechange', this.connectionStateChangeHandler);
|
|
10567
10567
|
this.close();
|
|
10568
|
-
if (__classPrivateFieldGet$
|
|
10569
|
-
__classPrivateFieldGet$
|
|
10568
|
+
if (__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
|
|
10569
|
+
__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f").call(this);
|
|
10570
10570
|
}
|
|
10571
10571
|
}
|
|
10572
10572
|
};
|
|
@@ -10614,9 +10614,9 @@ class RTCEndpoint {
|
|
|
10614
10614
|
data = new TextDecoder().decode(e.data);
|
|
10615
10615
|
}
|
|
10616
10616
|
const { messageId, action, payload } = JSON.parse(data);
|
|
10617
|
-
if (__classPrivateFieldGet$
|
|
10617
|
+
if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
|
|
10618
10618
|
try {
|
|
10619
|
-
const res = await __classPrivateFieldGet$
|
|
10619
|
+
const res = await __classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f").call(this, action, payload, endpointIdentity);
|
|
10620
10620
|
this.rtc.channels.response.send(JSON.stringify({
|
|
10621
10621
|
messageId,
|
|
10622
10622
|
payload: res,
|
|
@@ -10650,25 +10650,25 @@ class RTCEndpoint {
|
|
|
10650
10650
|
datachannel.onclose = (e) => {
|
|
10651
10651
|
[...this.responseMap.values()].forEach((promise) => promise.reject(new Error('RTCDataChannel closed unexpectedly, this is most commonly caused by message size. Note: RTC Channels have a message size limit of ~255kB.')));
|
|
10652
10652
|
this.close();
|
|
10653
|
-
if (__classPrivateFieldGet$
|
|
10654
|
-
__classPrivateFieldGet$
|
|
10653
|
+
if (__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
|
|
10654
|
+
__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f").call(this);
|
|
10655
10655
|
}
|
|
10656
10656
|
};
|
|
10657
10657
|
});
|
|
10658
10658
|
}
|
|
10659
10659
|
onDisconnect(listener) {
|
|
10660
|
-
if (!__classPrivateFieldGet$
|
|
10661
|
-
__classPrivateFieldSet$
|
|
10660
|
+
if (!__classPrivateFieldGet$d(this, _RTCEndpoint_disconnectListener, "f")) {
|
|
10661
|
+
__classPrivateFieldSet$c(this, _RTCEndpoint_disconnectListener, listener, "f");
|
|
10662
10662
|
}
|
|
10663
10663
|
else {
|
|
10664
10664
|
throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
|
|
10665
10665
|
}
|
|
10666
10666
|
}
|
|
10667
10667
|
receive(listener) {
|
|
10668
|
-
if (__classPrivateFieldGet$
|
|
10668
|
+
if (__classPrivateFieldGet$d(this, _RTCEndpoint_processAction, "f")) {
|
|
10669
10669
|
throw new Error('You have already set a listener for this RTC Endpoint.');
|
|
10670
10670
|
}
|
|
10671
|
-
__classPrivateFieldSet$
|
|
10671
|
+
__classPrivateFieldSet$c(this, _RTCEndpoint_processAction, listener, "f");
|
|
10672
10672
|
}
|
|
10673
10673
|
get connected() {
|
|
10674
10674
|
return this.rtc.rtcClient.connectionState === 'connected';
|
|
@@ -10679,12 +10679,12 @@ _RTCEndpoint_processAction = new WeakMap(), _RTCEndpoint_disconnectListener = ne
|
|
|
10679
10679
|
|
|
10680
10680
|
var strategy$1 = {};
|
|
10681
10681
|
|
|
10682
|
-
var __classPrivateFieldGet$
|
|
10682
|
+
var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
10683
10683
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10684
10684
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10685
10685
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10686
10686
|
};
|
|
10687
|
-
var __classPrivateFieldSet$
|
|
10687
|
+
var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10688
10688
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10689
10689
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10690
10690
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -10705,11 +10705,11 @@ class EndpointStrategy {
|
|
|
10705
10705
|
return this.getEndpointById(endpointId).send(action, payload);
|
|
10706
10706
|
};
|
|
10707
10707
|
this.close = async () => {
|
|
10708
|
-
if (__classPrivateFieldGet$
|
|
10709
|
-
__classPrivateFieldGet$
|
|
10710
|
-
__classPrivateFieldSet$
|
|
10708
|
+
if (__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
|
|
10709
|
+
__classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
|
|
10710
|
+
__classPrivateFieldSet$b(this, _EndpointStrategy_endpointMap, new Map(), "f");
|
|
10711
10711
|
}
|
|
10712
|
-
__classPrivateFieldSet$
|
|
10712
|
+
__classPrivateFieldSet$b(this, _EndpointStrategy_connected, false, "f");
|
|
10713
10713
|
};
|
|
10714
10714
|
this.isValidEndpointPayload = validateEndpoint;
|
|
10715
10715
|
}
|
|
@@ -10717,39 +10717,39 @@ class EndpointStrategy {
|
|
|
10717
10717
|
this.getEndpointById(endpointId).onDisconnect(listener);
|
|
10718
10718
|
}
|
|
10719
10719
|
receive(listener) {
|
|
10720
|
-
if (__classPrivateFieldGet$
|
|
10720
|
+
if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
|
|
10721
10721
|
throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
|
|
10722
10722
|
}
|
|
10723
|
-
__classPrivateFieldSet$
|
|
10723
|
+
__classPrivateFieldSet$b(this, _EndpointStrategy_processAction, listener, "f");
|
|
10724
10724
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
10725
|
-
__classPrivateFieldGet$
|
|
10725
|
+
__classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")));
|
|
10726
10726
|
}
|
|
10727
10727
|
getEndpointById(endpointId) {
|
|
10728
|
-
const endpoint = __classPrivateFieldGet$
|
|
10728
|
+
const endpoint = __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").get(endpointId);
|
|
10729
10729
|
if (!endpoint) {
|
|
10730
10730
|
throw new Error(`Client with endpoint id ${endpointId} is not connected`);
|
|
10731
10731
|
}
|
|
10732
10732
|
return endpoint;
|
|
10733
10733
|
}
|
|
10734
10734
|
get connected() {
|
|
10735
|
-
return __classPrivateFieldGet$
|
|
10735
|
+
return __classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f");
|
|
10736
10736
|
}
|
|
10737
10737
|
isEndpointConnected(endpointId) {
|
|
10738
|
-
return __classPrivateFieldGet$
|
|
10738
|
+
return __classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").has(endpointId);
|
|
10739
10739
|
}
|
|
10740
10740
|
addEndpoint(endpointId, payload) {
|
|
10741
|
-
if (!__classPrivateFieldGet$
|
|
10741
|
+
if (!__classPrivateFieldGet$c(this, _EndpointStrategy_connected, "f")) {
|
|
10742
10742
|
console.warn(`Adding endpoint to disconnected ${this.StrategyName} Strategy`);
|
|
10743
10743
|
return;
|
|
10744
10744
|
}
|
|
10745
10745
|
const clientStrat = new this.EndpointType(payload);
|
|
10746
|
-
if (__classPrivateFieldGet$
|
|
10747
|
-
clientStrat.receive(__classPrivateFieldGet$
|
|
10746
|
+
if (__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f")) {
|
|
10747
|
+
clientStrat.receive(__classPrivateFieldGet$c(this, _EndpointStrategy_processAction, "f"));
|
|
10748
10748
|
}
|
|
10749
|
-
__classPrivateFieldGet$
|
|
10749
|
+
__classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").set(endpointId, clientStrat);
|
|
10750
10750
|
}
|
|
10751
10751
|
async closeEndpoint(endpointId) {
|
|
10752
|
-
__classPrivateFieldGet$
|
|
10752
|
+
__classPrivateFieldGet$c(this, _EndpointStrategy_endpointMap, "f").delete(endpointId);
|
|
10753
10753
|
}
|
|
10754
10754
|
}
|
|
10755
10755
|
strategy$1.EndpointStrategy = EndpointStrategy;
|
|
@@ -10776,11 +10776,11 @@ var iceManager = {};
|
|
|
10776
10776
|
|
|
10777
10777
|
Object.defineProperty(iceManager, "__esModule", { value: true });
|
|
10778
10778
|
iceManager.RTCICEManager = void 0;
|
|
10779
|
-
const base_1$
|
|
10779
|
+
const base_1$g = base;
|
|
10780
10780
|
/*
|
|
10781
10781
|
Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
|
|
10782
10782
|
*/
|
|
10783
|
-
class RTCICEManager extends base_1$
|
|
10783
|
+
class RTCICEManager extends base_1$g.EmitterBase {
|
|
10784
10784
|
constructor(wire) {
|
|
10785
10785
|
super(wire, 'channel');
|
|
10786
10786
|
this.ensureChannelOpened = (channel) => {
|
|
@@ -10931,12 +10931,12 @@ function runtimeUuidMeetsMinimumRuntimeVersion(runtimeUuid, minVersion) {
|
|
|
10931
10931
|
}
|
|
10932
10932
|
runtimeVersioning.runtimeUuidMeetsMinimumRuntimeVersion = runtimeUuidMeetsMinimumRuntimeVersion;
|
|
10933
10933
|
|
|
10934
|
-
var __classPrivateFieldGet$
|
|
10934
|
+
var __classPrivateFieldGet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
10935
10935
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10936
10936
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10937
10937
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
10938
10938
|
};
|
|
10939
|
-
var __classPrivateFieldSet$
|
|
10939
|
+
var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10940
10940
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10941
10941
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10942
10942
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -10980,19 +10980,19 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
10980
10980
|
* a read-only array containing all the identities of connecting clients.
|
|
10981
10981
|
*/
|
|
10982
10982
|
get connections() {
|
|
10983
|
-
return [...__classPrivateFieldGet$
|
|
10983
|
+
return [...__classPrivateFieldGet$b(this, _ChannelProvider_connections, "f")];
|
|
10984
10984
|
}
|
|
10985
10985
|
static handleClientDisconnection(channel, payload) {
|
|
10986
10986
|
if (payload?.endpointId) {
|
|
10987
10987
|
const { uuid, name, endpointId, isLocalEndpointId } = payload;
|
|
10988
|
-
__classPrivateFieldGet$
|
|
10988
|
+
__classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f").call(channel, { uuid, name, endpointId, isLocalEndpointId });
|
|
10989
10989
|
}
|
|
10990
10990
|
else {
|
|
10991
10991
|
// this is here to support older runtimes that did not have endpointId
|
|
10992
10992
|
const multipleRemoves = channel.connections.filter((identity) => {
|
|
10993
10993
|
return identity.uuid === payload.uuid && identity.name === payload.name;
|
|
10994
10994
|
});
|
|
10995
|
-
multipleRemoves.forEach(__classPrivateFieldGet$
|
|
10995
|
+
multipleRemoves.forEach(__classPrivateFieldGet$b(channel, _ChannelProvider_removeEndpoint, "f"));
|
|
10996
10996
|
}
|
|
10997
10997
|
channel.disconnectListener(payload);
|
|
10998
10998
|
}
|
|
@@ -11009,8 +11009,8 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
11009
11009
|
_ChannelProvider_strategy.set(this, void 0);
|
|
11010
11010
|
_ChannelProvider_removeEndpoint.set(this, (identity) => {
|
|
11011
11011
|
const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
|
|
11012
|
-
__classPrivateFieldGet$
|
|
11013
|
-
__classPrivateFieldSet$
|
|
11012
|
+
__classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
|
|
11013
|
+
__classPrivateFieldSet$a(this, _ChannelProvider_connections, remainingConnections, "f");
|
|
11014
11014
|
});
|
|
11015
11015
|
// Must be bound.
|
|
11016
11016
|
this.processAction = async (action, payload, senderIdentity) => {
|
|
@@ -11024,17 +11024,17 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
11024
11024
|
return super.processAction(action, payload, senderIdentity);
|
|
11025
11025
|
};
|
|
11026
11026
|
_ChannelProvider_close.set(this, () => {
|
|
11027
|
-
__classPrivateFieldGet$
|
|
11027
|
+
__classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").close();
|
|
11028
11028
|
const remove = ChannelProvider.removalMap.get(this);
|
|
11029
11029
|
if (remove) {
|
|
11030
11030
|
remove();
|
|
11031
11031
|
}
|
|
11032
11032
|
});
|
|
11033
|
-
__classPrivateFieldSet$
|
|
11033
|
+
__classPrivateFieldSet$a(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
|
|
11034
11034
|
this.connectListener = () => undefined;
|
|
11035
11035
|
this.disconnectListener = () => undefined;
|
|
11036
|
-
__classPrivateFieldSet$
|
|
11037
|
-
__classPrivateFieldSet$
|
|
11036
|
+
__classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
|
|
11037
|
+
__classPrivateFieldSet$a(this, _ChannelProvider_strategy, strategy, "f");
|
|
11038
11038
|
strategy.receive(this.processAction);
|
|
11039
11039
|
}
|
|
11040
11040
|
/**
|
|
@@ -11065,16 +11065,16 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
11065
11065
|
*/
|
|
11066
11066
|
dispatch(to, action, payload) {
|
|
11067
11067
|
const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
|
|
11068
|
-
if (endpointId && __classPrivateFieldGet$
|
|
11068
|
+
if (endpointId && __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
|
|
11069
11069
|
const callSites = transport_errors_1.RuntimeError.getCallSite();
|
|
11070
|
-
return __classPrivateFieldGet$
|
|
11070
|
+
return __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload).catch((e) => {
|
|
11071
11071
|
throw new channel_error_1.ChannelError(e, action, payload, callSites);
|
|
11072
11072
|
});
|
|
11073
11073
|
}
|
|
11074
11074
|
return Promise.reject(new Error(`Client connection with identity uuid: ${to.uuid} / name: ${to.name} / endpointId: ${endpointId} no longer connected.`));
|
|
11075
11075
|
}
|
|
11076
11076
|
async processConnection(senderId, payload) {
|
|
11077
|
-
__classPrivateFieldGet$
|
|
11077
|
+
__classPrivateFieldGet$b(this, _ChannelProvider_connections, "f").push(senderId);
|
|
11078
11078
|
return this.connectListener(senderId, payload);
|
|
11079
11079
|
}
|
|
11080
11080
|
/**
|
|
@@ -11097,7 +11097,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
11097
11097
|
* ```
|
|
11098
11098
|
*/
|
|
11099
11099
|
publish(action, payload) {
|
|
11100
|
-
return this.connections.map((to) => __classPrivateFieldGet$
|
|
11100
|
+
return this.connections.map((to) => __classPrivateFieldGet$b(this, _ChannelProvider_strategy, "f").send(to.endpointId, action, payload));
|
|
11101
11101
|
}
|
|
11102
11102
|
/**
|
|
11103
11103
|
* Register a listener that is called on every new client connection.
|
|
@@ -11171,11 +11171,11 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
11171
11171
|
* ```
|
|
11172
11172
|
*/
|
|
11173
11173
|
async destroy() {
|
|
11174
|
-
const protectedObj = __classPrivateFieldGet$
|
|
11174
|
+
const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
|
|
11175
11175
|
protectedObj.providerIdentity;
|
|
11176
|
-
__classPrivateFieldSet$
|
|
11176
|
+
__classPrivateFieldSet$a(this, _ChannelProvider_connections, [], "f");
|
|
11177
11177
|
await protectedObj.close();
|
|
11178
|
-
__classPrivateFieldGet$
|
|
11178
|
+
__classPrivateFieldGet$b(this, _ChannelProvider_close, "f").call(this);
|
|
11179
11179
|
}
|
|
11180
11180
|
/**
|
|
11181
11181
|
* Returns an array with info on every Client connected to the Provider
|
|
@@ -11245,7 +11245,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
11245
11245
|
getEndpointIdForOpenFinId(clientIdentity, action) {
|
|
11246
11246
|
const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
|
|
11247
11247
|
if (matchingConnections.length >= 2) {
|
|
11248
|
-
const protectedObj = __classPrivateFieldGet$
|
|
11248
|
+
const protectedObj = __classPrivateFieldGet$b(this, _ChannelProvider_protectedObj, "f");
|
|
11249
11249
|
const { uuid, name } = clientIdentity;
|
|
11250
11250
|
const providerUuid = protectedObj?.providerIdentity.uuid;
|
|
11251
11251
|
const providerName = protectedObj?.providerIdentity.name;
|
|
@@ -11281,14 +11281,14 @@ var messageReceiver = {};
|
|
|
11281
11281
|
Object.defineProperty(messageReceiver, "__esModule", { value: true });
|
|
11282
11282
|
messageReceiver.MessageReceiver = void 0;
|
|
11283
11283
|
const client_1$1 = client;
|
|
11284
|
-
const base_1$
|
|
11284
|
+
const base_1$f = base;
|
|
11285
11285
|
const errors_1 = errors;
|
|
11286
11286
|
/*
|
|
11287
11287
|
This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
|
|
11288
11288
|
It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
|
|
11289
11289
|
If functionality is not about receiving messages, it does not belong here.
|
|
11290
11290
|
*/
|
|
11291
|
-
class MessageReceiver extends base_1$
|
|
11291
|
+
class MessageReceiver extends base_1$f.Base {
|
|
11292
11292
|
constructor(wire) {
|
|
11293
11293
|
super(wire);
|
|
11294
11294
|
this.onmessage = (msg) => {
|
|
@@ -11457,13 +11457,13 @@ class CombinedStrategy {
|
|
|
11457
11457
|
}
|
|
11458
11458
|
strategy.default = CombinedStrategy;
|
|
11459
11459
|
|
|
11460
|
-
var __classPrivateFieldSet$
|
|
11460
|
+
var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
11461
11461
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
11462
11462
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
11463
11463
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11464
11464
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11465
11465
|
};
|
|
11466
|
-
var __classPrivateFieldGet$
|
|
11466
|
+
var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11467
11467
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
11468
11468
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11469
11469
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -11475,7 +11475,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
|
|
|
11475
11475
|
Object.defineProperty(connectionManager, "__esModule", { value: true });
|
|
11476
11476
|
connectionManager.ConnectionManager = void 0;
|
|
11477
11477
|
const exhaustive_1 = exhaustive;
|
|
11478
|
-
const base_1$
|
|
11478
|
+
const base_1$e = base;
|
|
11479
11479
|
const strategy_1 = strategy$3;
|
|
11480
11480
|
const strategy_2 = strategy$2;
|
|
11481
11481
|
const ice_manager_1 = iceManager;
|
|
@@ -11483,7 +11483,7 @@ const provider_1$1 = provider;
|
|
|
11483
11483
|
const message_receiver_1 = messageReceiver;
|
|
11484
11484
|
const protocol_manager_1 = protocolManager;
|
|
11485
11485
|
const strategy_3 = __importDefault$4(strategy);
|
|
11486
|
-
class ConnectionManager extends base_1$
|
|
11486
|
+
class ConnectionManager extends base_1$e.Base {
|
|
11487
11487
|
static getProtocolOptionsFromStrings(protocols) {
|
|
11488
11488
|
return protocols.map((protocol) => {
|
|
11489
11489
|
switch (protocol) {
|
|
@@ -11512,8 +11512,8 @@ class ConnectionManager extends base_1$d.Base {
|
|
|
11512
11512
|
};
|
|
11513
11513
|
this.providerMap = new Map();
|
|
11514
11514
|
this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
|
|
11515
|
-
__classPrivateFieldSet$
|
|
11516
|
-
__classPrivateFieldSet$
|
|
11515
|
+
__classPrivateFieldSet$9(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
|
|
11516
|
+
__classPrivateFieldSet$9(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
|
|
11517
11517
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
|
11518
11518
|
}
|
|
11519
11519
|
createProvider(options, providerIdentity) {
|
|
@@ -11524,7 +11524,7 @@ class ConnectionManager extends base_1$d.Base {
|
|
|
11524
11524
|
case 'rtc':
|
|
11525
11525
|
return new strategy_2.RTCStrategy();
|
|
11526
11526
|
case 'classic':
|
|
11527
|
-
return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$
|
|
11527
|
+
return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f"),
|
|
11528
11528
|
// Providers do not have an endpointId, use channelId as endpointId in the strategy.
|
|
11529
11529
|
providerIdentity.channelId, providerIdentity);
|
|
11530
11530
|
default:
|
|
@@ -11560,7 +11560,7 @@ class ConnectionManager extends base_1$d.Base {
|
|
|
11560
11560
|
const supportedProtocols = await Promise.all(protocols.map(async (type) => {
|
|
11561
11561
|
switch (type) {
|
|
11562
11562
|
case 'rtc': {
|
|
11563
|
-
const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$
|
|
11563
|
+
const { rtcClient, channels, offer, rtcConnectionId, channelsOpened } = await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").startClientOffer();
|
|
11564
11564
|
rtcPacket = { rtcClient, channels, channelsOpened };
|
|
11565
11565
|
return {
|
|
11566
11566
|
type: 'rtc',
|
|
@@ -11587,18 +11587,18 @@ class ConnectionManager extends base_1$d.Base {
|
|
|
11587
11587
|
routingInfo.endpointId = this.wire.environment.getNextMessageId();
|
|
11588
11588
|
// For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
|
|
11589
11589
|
// clients that are in the same context as the newly-connected client.
|
|
11590
|
-
__classPrivateFieldGet$
|
|
11590
|
+
__classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
|
|
11591
11591
|
}
|
|
11592
11592
|
const answer = routingInfo.answer ?? {
|
|
11593
11593
|
supportedProtocols: [{ type: 'classic', version: 1 }]
|
|
11594
11594
|
};
|
|
11595
11595
|
const createStrategyFromAnswer = async (protocol) => {
|
|
11596
11596
|
if (protocol.type === 'rtc' && rtcPacket) {
|
|
11597
|
-
await __classPrivateFieldGet$
|
|
11597
|
+
await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").finishClientOffer(rtcPacket.rtcClient, protocol.payload.answer, rtcPacket.channelsOpened);
|
|
11598
11598
|
return new strategy_2.RTCStrategy();
|
|
11599
11599
|
}
|
|
11600
11600
|
if (protocol.type === 'classic') {
|
|
11601
|
-
return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$
|
|
11601
|
+
return new strategy_1.ClassicStrategy(this.wire, __classPrivateFieldGet$a(this, _ConnectionManager_messageReceiver, "f"), routingInfo.endpointId, routingInfo);
|
|
11602
11602
|
}
|
|
11603
11603
|
return null;
|
|
11604
11604
|
};
|
|
@@ -11666,7 +11666,7 @@ class ConnectionManager extends base_1$d.Base {
|
|
|
11666
11666
|
clientAnswer = await overlappingProtocols.reduce(async (accumP, protocolToUse) => {
|
|
11667
11667
|
const answer = await accumP;
|
|
11668
11668
|
if (protocolToUse.type === 'rtc') {
|
|
11669
|
-
const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$
|
|
11669
|
+
const { answer: rtcAnswer, rtcClient, channels } = await __classPrivateFieldGet$a(this, _ConnectionManager_rtcConnectionManager, "f").createProviderAnswer(protocolToUse.payload.rtcConnectionId, protocolToUse.payload.offer);
|
|
11670
11670
|
answer.supportedProtocols.push({
|
|
11671
11671
|
type: 'rtc',
|
|
11672
11672
|
version: strategy_2.RTCInfo.version,
|
|
@@ -11714,13 +11714,13 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
|
|
|
11714
11714
|
*
|
|
11715
11715
|
* @packageDocumentation
|
|
11716
11716
|
*/
|
|
11717
|
-
var __classPrivateFieldSet$
|
|
11717
|
+
var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
11718
11718
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
11719
11719
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
11720
11720
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11721
11721
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11722
11722
|
};
|
|
11723
|
-
var __classPrivateFieldGet$
|
|
11723
|
+
var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11724
11724
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
11725
11725
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11726
11726
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -11730,8 +11730,8 @@ Object.defineProperty(channel$1, "__esModule", { value: true });
|
|
|
11730
11730
|
channel$1.Channel = void 0;
|
|
11731
11731
|
/* eslint-disable no-console */
|
|
11732
11732
|
const events_1$2 = require$$0;
|
|
11733
|
-
const lazy_1$
|
|
11734
|
-
const base_1$
|
|
11733
|
+
const lazy_1$2 = lazy;
|
|
11734
|
+
const base_1$d = base;
|
|
11735
11735
|
const client_1 = client;
|
|
11736
11736
|
const connection_manager_1 = connectionManager;
|
|
11737
11737
|
const provider_1 = provider;
|
|
@@ -11762,7 +11762,7 @@ function retryDelay(count) {
|
|
|
11762
11762
|
* * {@link Channel.onChannelConnect onChannelConnect(listener)}
|
|
11763
11763
|
* * {@link Channel.onChannelDisconnect onChannelDisconnect(listener)}
|
|
11764
11764
|
*/
|
|
11765
|
-
class Channel extends base_1$
|
|
11765
|
+
class Channel extends base_1$d.EmitterBase {
|
|
11766
11766
|
/**
|
|
11767
11767
|
* @internal
|
|
11768
11768
|
*/
|
|
@@ -11771,17 +11771,17 @@ class Channel extends base_1$c.EmitterBase {
|
|
|
11771
11771
|
_Channel_connectionManager.set(this, void 0);
|
|
11772
11772
|
_Channel_internalEmitter.set(this, new events_1$2.EventEmitter());
|
|
11773
11773
|
// OpenFin API has not been injected at construction time, *must* wait for API to be ready.
|
|
11774
|
-
_Channel_readyToConnect.set(this, new lazy_1$
|
|
11774
|
+
_Channel_readyToConnect.set(this, new lazy_1$2.AsyncRetryableLazy(async () => {
|
|
11775
11775
|
await Promise.all([
|
|
11776
11776
|
this.on('disconnected', (eventPayload) => {
|
|
11777
11777
|
client_1.ChannelClient.handleProviderDisconnect(eventPayload);
|
|
11778
11778
|
}),
|
|
11779
11779
|
this.on('connected', (...args) => {
|
|
11780
|
-
__classPrivateFieldGet$
|
|
11780
|
+
__classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").emit('connected', ...args);
|
|
11781
11781
|
})
|
|
11782
11782
|
]).catch(() => new Error('error setting up channel connection listeners'));
|
|
11783
11783
|
}));
|
|
11784
|
-
__classPrivateFieldSet$
|
|
11784
|
+
__classPrivateFieldSet$8(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
|
|
11785
11785
|
}
|
|
11786
11786
|
/**
|
|
11787
11787
|
*
|
|
@@ -11856,7 +11856,7 @@ class Channel extends base_1$c.EmitterBase {
|
|
|
11856
11856
|
resolve(true);
|
|
11857
11857
|
}
|
|
11858
11858
|
};
|
|
11859
|
-
__classPrivateFieldGet$
|
|
11859
|
+
__classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").on('connected', connectedListener);
|
|
11860
11860
|
});
|
|
11861
11861
|
try {
|
|
11862
11862
|
if (retryInfo.count > 0) {
|
|
@@ -11888,7 +11888,7 @@ class Channel extends base_1$c.EmitterBase {
|
|
|
11888
11888
|
finally {
|
|
11889
11889
|
retryInfo.count += 1;
|
|
11890
11890
|
// in case of other errors, remove our listener
|
|
11891
|
-
__classPrivateFieldGet$
|
|
11891
|
+
__classPrivateFieldGet$9(this, _Channel_internalEmitter, "f").removeListener('connected', connectedListener);
|
|
11892
11892
|
}
|
|
11893
11893
|
} while (shouldWait); // If we're waiting we retry the above loop
|
|
11894
11894
|
// Should wait was false, no channel was found.
|
|
@@ -11947,12 +11947,12 @@ class Channel extends base_1$c.EmitterBase {
|
|
|
11947
11947
|
async connect(channelName, options = {}) {
|
|
11948
11948
|
// Make sure we don't connect before listeners are set up
|
|
11949
11949
|
// This also errors if we're not in OpenFin, ensuring we don't run unnecessary code
|
|
11950
|
-
await __classPrivateFieldGet$
|
|
11950
|
+
await __classPrivateFieldGet$9(this, _Channel_readyToConnect, "f").getValue();
|
|
11951
11951
|
if (!channelName || typeof channelName !== 'string') {
|
|
11952
11952
|
throw new Error('Please provide a channelName string to connect to a channel.');
|
|
11953
11953
|
}
|
|
11954
11954
|
const opts = { wait: true, ...this.wire.environment.getDefaultChannelOptions().connect, ...options };
|
|
11955
|
-
const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$
|
|
11955
|
+
const { offer, rtc: rtcPacket } = await __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createClientOffer(opts);
|
|
11956
11956
|
let connectionUrl;
|
|
11957
11957
|
if (this.fin.me.isFrame || this.fin.me.isView || this.fin.me.isWindow) {
|
|
11958
11958
|
connectionUrl = (await this.fin.me.getInfo()).url;
|
|
@@ -11964,7 +11964,7 @@ class Channel extends base_1$c.EmitterBase {
|
|
|
11964
11964
|
connectionUrl
|
|
11965
11965
|
};
|
|
11966
11966
|
const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
|
|
11967
|
-
const strategy = await __classPrivateFieldGet$
|
|
11967
|
+
const strategy = await __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
|
|
11968
11968
|
const channel = new client_1.ChannelClient(routingInfo, () => client_1.ChannelClient.wireClose(this.wire, routingInfo, routingInfo.endpointId), strategy);
|
|
11969
11969
|
// It is the client's responsibility to handle endpoint disconnection to the provider.
|
|
11970
11970
|
// If the endpoint dies, the client will force a disconnection through the core.
|
|
@@ -12033,7 +12033,7 @@ class Channel extends base_1$c.EmitterBase {
|
|
|
12033
12033
|
throw new Error('Please provide a channelName to create a channel');
|
|
12034
12034
|
}
|
|
12035
12035
|
const { payload: { data: providerIdentity } } = await this.wire.sendAction('create-channel', { channelName });
|
|
12036
|
-
const channel = __classPrivateFieldGet$
|
|
12036
|
+
const channel = __classPrivateFieldGet$9(this, _Channel_connectionManager, "f").createProvider(options, providerIdentity);
|
|
12037
12037
|
// TODO: fix typing (internal)
|
|
12038
12038
|
// @ts-expect-error
|
|
12039
12039
|
this.on('client-disconnected', (eventPayload) => {
|
|
@@ -12057,7 +12057,7 @@ interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
|
|
|
12057
12057
|
* @packageDocumentation
|
|
12058
12058
|
*/
|
|
12059
12059
|
const events_1$1 = require$$0;
|
|
12060
|
-
const base_1$
|
|
12060
|
+
const base_1$c = base;
|
|
12061
12061
|
const ref_counter_1 = refCounter;
|
|
12062
12062
|
const index_1$2 = channel$1;
|
|
12063
12063
|
const validate_1$2 = validate;
|
|
@@ -12065,7 +12065,7 @@ const validate_1$2 = validate;
|
|
|
12065
12065
|
* A messaging bus that allows for pub/sub messaging between different applications.
|
|
12066
12066
|
*
|
|
12067
12067
|
*/
|
|
12068
|
-
class InterApplicationBus extends base_1$
|
|
12068
|
+
class InterApplicationBus extends base_1$c.Base {
|
|
12069
12069
|
/**
|
|
12070
12070
|
* @internal
|
|
12071
12071
|
*/
|
|
@@ -12271,12 +12271,12 @@ var clipboard = {};
|
|
|
12271
12271
|
*/
|
|
12272
12272
|
Object.defineProperty(clipboard, "__esModule", { value: true });
|
|
12273
12273
|
clipboard.Clipboard = void 0;
|
|
12274
|
-
const base_1$
|
|
12274
|
+
const base_1$b = base;
|
|
12275
12275
|
/**
|
|
12276
12276
|
* The Clipboard API allows reading and writing to the clipboard in multiple formats.
|
|
12277
12277
|
*
|
|
12278
12278
|
*/
|
|
12279
|
-
class Clipboard extends base_1$
|
|
12279
|
+
class Clipboard extends base_1$b.Base {
|
|
12280
12280
|
/**
|
|
12281
12281
|
* Writes data into the clipboard as plain text
|
|
12282
12282
|
* @param writeObj The object for writing data into the clipboard
|
|
@@ -12460,12 +12460,12 @@ var globalHotkey = {};
|
|
|
12460
12460
|
|
|
12461
12461
|
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
|
12462
12462
|
globalHotkey.GlobalHotkey = void 0;
|
|
12463
|
-
const base_1$
|
|
12463
|
+
const base_1$a = base;
|
|
12464
12464
|
/**
|
|
12465
12465
|
* The GlobalHotkey module can register/unregister a global hotkeys.
|
|
12466
12466
|
*
|
|
12467
12467
|
*/
|
|
12468
|
-
class GlobalHotkey extends base_1$
|
|
12468
|
+
class GlobalHotkey extends base_1$a.EmitterBase {
|
|
12469
12469
|
/**
|
|
12470
12470
|
* @internal
|
|
12471
12471
|
*/
|
|
@@ -12599,13 +12599,13 @@ var Factory$3 = {};
|
|
|
12599
12599
|
|
|
12600
12600
|
var Instance$2 = {};
|
|
12601
12601
|
|
|
12602
|
-
var __classPrivateFieldSet$
|
|
12602
|
+
var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
12603
12603
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
12604
12604
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
12605
12605
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
12606
12606
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12607
12607
|
};
|
|
12608
|
-
var __classPrivateFieldGet$
|
|
12608
|
+
var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
12609
12609
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
12610
12610
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
12611
12611
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -12614,14 +12614,14 @@ var _Platform_channelName, _Platform_connectToProvider;
|
|
|
12614
12614
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
|
12615
12615
|
Instance$2.Platform = void 0;
|
|
12616
12616
|
/* eslint-disable import/prefer-default-export, no-undef */
|
|
12617
|
-
const base_1$
|
|
12617
|
+
const base_1$9 = base;
|
|
12618
12618
|
const validate_1$1 = validate;
|
|
12619
12619
|
/** Manages the life cycle of windows and views in the application.
|
|
12620
12620
|
*
|
|
12621
12621
|
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
|
12622
12622
|
* as well as listen to {@link OpenFin.PlatformEvents platform events}.
|
|
12623
12623
|
*/
|
|
12624
|
-
class Platform extends base_1$
|
|
12624
|
+
class Platform extends base_1$9.EmitterBase {
|
|
12625
12625
|
/**
|
|
12626
12626
|
* @internal
|
|
12627
12627
|
*/
|
|
@@ -12642,24 +12642,24 @@ class Platform extends base_1$8.EmitterBase {
|
|
|
12642
12642
|
this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
|
|
12643
12643
|
// don't expose
|
|
12644
12644
|
});
|
|
12645
|
-
if (!Platform.clientMap.has(__classPrivateFieldGet$
|
|
12646
|
-
const clientPromise = __classPrivateFieldGet$
|
|
12647
|
-
Platform.clientMap.set(__classPrivateFieldGet$
|
|
12645
|
+
if (!Platform.clientMap.has(__classPrivateFieldGet$8(this, _Platform_channelName, "f"))) {
|
|
12646
|
+
const clientPromise = __classPrivateFieldGet$8(this, _Platform_connectToProvider, "f").call(this);
|
|
12647
|
+
Platform.clientMap.set(__classPrivateFieldGet$8(this, _Platform_channelName, "f"), clientPromise);
|
|
12648
12648
|
}
|
|
12649
12649
|
// we set it above
|
|
12650
12650
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
12651
|
-
return Platform.clientMap.get(__classPrivateFieldGet$
|
|
12651
|
+
return Platform.clientMap.get(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
|
|
12652
12652
|
};
|
|
12653
12653
|
_Platform_connectToProvider.set(this, async () => {
|
|
12654
12654
|
try {
|
|
12655
|
-
const client = await this._channel.connect(__classPrivateFieldGet$
|
|
12655
|
+
const client = await this._channel.connect(__classPrivateFieldGet$8(this, _Platform_channelName, "f"), { wait: false });
|
|
12656
12656
|
client.onDisconnection(() => {
|
|
12657
|
-
Platform.clientMap.delete(__classPrivateFieldGet$
|
|
12657
|
+
Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
|
|
12658
12658
|
});
|
|
12659
12659
|
return client;
|
|
12660
12660
|
}
|
|
12661
12661
|
catch (e) {
|
|
12662
|
-
Platform.clientMap.delete(__classPrivateFieldGet$
|
|
12662
|
+
Platform.clientMap.delete(__classPrivateFieldGet$8(this, _Platform_channelName, "f"));
|
|
12663
12663
|
throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
|
|
12664
12664
|
}
|
|
12665
12665
|
});
|
|
@@ -12672,7 +12672,7 @@ class Platform extends base_1$8.EmitterBase {
|
|
|
12672
12672
|
if (errorMsg) {
|
|
12673
12673
|
throw new Error(errorMsg);
|
|
12674
12674
|
}
|
|
12675
|
-
__classPrivateFieldSet$
|
|
12675
|
+
__classPrivateFieldSet$7(this, _Platform_channelName, channelName, "f");
|
|
12676
12676
|
this._channel = this.fin.InterApplicationBus.Channel;
|
|
12677
12677
|
this.identity = { uuid: identity.uuid };
|
|
12678
12678
|
this.Layout = this.fin.Platform.Layout;
|
|
@@ -13728,13 +13728,13 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
|
|
|
13728
13728
|
};
|
|
13729
13729
|
channelApiRelay.createRelayedDispatch = createRelayedDispatch;
|
|
13730
13730
|
|
|
13731
|
-
var __classPrivateFieldSet$
|
|
13731
|
+
var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
13732
13732
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
13733
13733
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
13734
13734
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
13735
13735
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
13736
13736
|
};
|
|
13737
|
-
var __classPrivateFieldGet$
|
|
13737
|
+
var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
13738
13738
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
13739
13739
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
13740
13740
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -13788,7 +13788,7 @@ class LayoutNode {
|
|
|
13788
13788
|
* console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);
|
|
13789
13789
|
* ```
|
|
13790
13790
|
*/
|
|
13791
|
-
this.isRoot = () => __classPrivateFieldGet$
|
|
13791
|
+
this.isRoot = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").isRoot(this.entityId);
|
|
13792
13792
|
/**
|
|
13793
13793
|
* Checks if the TabStack or ColumnOrRow exists
|
|
13794
13794
|
*
|
|
@@ -13808,7 +13808,7 @@ class LayoutNode {
|
|
|
13808
13808
|
* console.log(`The entity exists: ${exists}`);
|
|
13809
13809
|
* ```
|
|
13810
13810
|
*/
|
|
13811
|
-
this.exists = () => __classPrivateFieldGet$
|
|
13811
|
+
this.exists = () => __classPrivateFieldGet$7(this, _LayoutNode_client, "f").exists(this.entityId);
|
|
13812
13812
|
/**
|
|
13813
13813
|
* Retrieves the parent of the TabStack or ColumnOrRow
|
|
13814
13814
|
*
|
|
@@ -13829,11 +13829,11 @@ class LayoutNode {
|
|
|
13829
13829
|
* ```
|
|
13830
13830
|
*/
|
|
13831
13831
|
this.getParent = async () => {
|
|
13832
|
-
const parent = await __classPrivateFieldGet$
|
|
13832
|
+
const parent = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getParent(this.entityId);
|
|
13833
13833
|
if (!parent) {
|
|
13834
13834
|
return undefined;
|
|
13835
13835
|
}
|
|
13836
|
-
return LayoutNode.getEntity(parent, __classPrivateFieldGet$
|
|
13836
|
+
return LayoutNode.getEntity(parent, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
|
|
13837
13837
|
};
|
|
13838
13838
|
/**
|
|
13839
13839
|
* Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
|
|
@@ -13884,8 +13884,8 @@ class LayoutNode {
|
|
|
13884
13884
|
* @experimental
|
|
13885
13885
|
*/
|
|
13886
13886
|
this.createAdjacentStack = async (views, options) => {
|
|
13887
|
-
const entityId = await __classPrivateFieldGet$
|
|
13888
|
-
return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$
|
|
13887
|
+
const entityId = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
|
|
13888
|
+
return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$7(this, _LayoutNode_client, "f"));
|
|
13889
13889
|
};
|
|
13890
13890
|
/**
|
|
13891
13891
|
* Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
|
|
@@ -13913,16 +13913,16 @@ class LayoutNode {
|
|
|
13913
13913
|
* @experimental
|
|
13914
13914
|
*/
|
|
13915
13915
|
this.getAdjacentStacks = async (edge) => {
|
|
13916
|
-
const adjacentStacks = await __classPrivateFieldGet$
|
|
13916
|
+
const adjacentStacks = await __classPrivateFieldGet$7(this, _LayoutNode_client, "f").getAdjacentStacks({
|
|
13917
13917
|
targetId: this.entityId,
|
|
13918
13918
|
edge
|
|
13919
13919
|
});
|
|
13920
13920
|
return adjacentStacks.map((stack) => LayoutNode.getEntity({
|
|
13921
13921
|
type: 'stack',
|
|
13922
13922
|
entityId: stack.entityId
|
|
13923
|
-
}, __classPrivateFieldGet$
|
|
13923
|
+
}, __classPrivateFieldGet$7(this, _LayoutNode_client, "f")));
|
|
13924
13924
|
};
|
|
13925
|
-
__classPrivateFieldSet$
|
|
13925
|
+
__classPrivateFieldSet$6(this, _LayoutNode_client, client, "f");
|
|
13926
13926
|
this.entityId = entityId;
|
|
13927
13927
|
}
|
|
13928
13928
|
}
|
|
@@ -13995,7 +13995,7 @@ class TabStack extends LayoutNode {
|
|
|
13995
13995
|
* ```
|
|
13996
13996
|
* @experimental
|
|
13997
13997
|
*/
|
|
13998
|
-
this.getViews = () => __classPrivateFieldGet$
|
|
13998
|
+
this.getViews = () => __classPrivateFieldGet$7(this, _TabStack_client, "f").getStackViews(this.entityId);
|
|
13999
13999
|
/**
|
|
14000
14000
|
* Adds or creates a view in this {@link TabStack}.
|
|
14001
14001
|
*
|
|
@@ -14025,7 +14025,7 @@ class TabStack extends LayoutNode {
|
|
|
14025
14025
|
* ```
|
|
14026
14026
|
* @experimental
|
|
14027
14027
|
*/
|
|
14028
|
-
this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$
|
|
14028
|
+
this.addView = async (view, options = { index: 0 }) => __classPrivateFieldGet$7(this, _TabStack_client, "f").addViewToStack(this.entityId, view, options);
|
|
14029
14029
|
/**
|
|
14030
14030
|
* Removes a view from this {@link TabStack}.
|
|
14031
14031
|
*
|
|
@@ -14055,7 +14055,7 @@ class TabStack extends LayoutNode {
|
|
|
14055
14055
|
* ```
|
|
14056
14056
|
*/
|
|
14057
14057
|
this.removeView = async (view) => {
|
|
14058
|
-
await __classPrivateFieldGet$
|
|
14058
|
+
await __classPrivateFieldGet$7(this, _TabStack_client, "f").removeViewFromStack(this.entityId, view);
|
|
14059
14059
|
};
|
|
14060
14060
|
/**
|
|
14061
14061
|
* Sets the active view of the {@link TabStack} without focusing it.
|
|
@@ -14079,9 +14079,9 @@ class TabStack extends LayoutNode {
|
|
|
14079
14079
|
* @experimental
|
|
14080
14080
|
*/
|
|
14081
14081
|
this.setActiveView = async (view) => {
|
|
14082
|
-
await __classPrivateFieldGet$
|
|
14082
|
+
await __classPrivateFieldGet$7(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
|
|
14083
14083
|
};
|
|
14084
|
-
__classPrivateFieldSet$
|
|
14084
|
+
__classPrivateFieldSet$6(this, _TabStack_client, client, "f");
|
|
14085
14085
|
}
|
|
14086
14086
|
}
|
|
14087
14087
|
layoutEntities.TabStack = TabStack;
|
|
@@ -14120,10 +14120,10 @@ class ColumnOrRow extends LayoutNode {
|
|
|
14120
14120
|
* ```
|
|
14121
14121
|
*/
|
|
14122
14122
|
this.getContent = async () => {
|
|
14123
|
-
const contentItemEntities = await __classPrivateFieldGet$
|
|
14124
|
-
return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$
|
|
14123
|
+
const contentItemEntities = await __classPrivateFieldGet$7(this, _ColumnOrRow_client, "f").getContent(this.entityId);
|
|
14124
|
+
return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$7(this, _ColumnOrRow_client, "f")));
|
|
14125
14125
|
};
|
|
14126
|
-
__classPrivateFieldSet$
|
|
14126
|
+
__classPrivateFieldSet$6(this, _ColumnOrRow_client, client, "f");
|
|
14127
14127
|
this.type = type;
|
|
14128
14128
|
}
|
|
14129
14129
|
}
|
|
@@ -14138,7 +14138,7 @@ layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
|
|
|
14138
14138
|
// TODO: eventually export this somehow
|
|
14139
14139
|
layout_constants.DEFAULT_LAYOUT_KEY = '__default__';
|
|
14140
14140
|
|
|
14141
|
-
var __classPrivateFieldGet$
|
|
14141
|
+
var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14142
14142
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
14143
14143
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14144
14144
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -14146,9 +14146,9 @@ var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
14146
14146
|
var _Layout_instances, _Layout_layoutClient, _Layout_forwardLayoutAction;
|
|
14147
14147
|
Object.defineProperty(Instance$1, "__esModule", { value: true });
|
|
14148
14148
|
Instance$1.Layout = void 0;
|
|
14149
|
-
const lazy_1 = lazy;
|
|
14149
|
+
const lazy_1$1 = lazy;
|
|
14150
14150
|
const validate_1 = validate;
|
|
14151
|
-
const base_1$
|
|
14151
|
+
const base_1$8 = base;
|
|
14152
14152
|
const common_utils_1$1 = commonUtils;
|
|
14153
14153
|
const layout_entities_1 = layoutEntities;
|
|
14154
14154
|
const layout_constants_1$1 = layout_constants;
|
|
@@ -14284,12 +14284,12 @@ const layout_constants_1$1 = layout_constants;
|
|
|
14284
14284
|
* }
|
|
14285
14285
|
* ```
|
|
14286
14286
|
*/
|
|
14287
|
-
class Layout extends base_1$
|
|
14287
|
+
class Layout extends base_1$8.Base {
|
|
14288
14288
|
/**
|
|
14289
14289
|
* @internal
|
|
14290
14290
|
*/
|
|
14291
14291
|
static getClient(layout) {
|
|
14292
|
-
return __classPrivateFieldGet$
|
|
14292
|
+
return __classPrivateFieldGet$6(layout, _Layout_layoutClient, "f").getValue();
|
|
14293
14293
|
}
|
|
14294
14294
|
/**
|
|
14295
14295
|
* @internal
|
|
@@ -14303,7 +14303,7 @@ class Layout extends base_1$7.Base {
|
|
|
14303
14303
|
* Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
|
|
14304
14304
|
* The client is for {@link LayoutEntitiesController}
|
|
14305
14305
|
*/
|
|
14306
|
-
_Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
|
|
14306
|
+
_Layout_layoutClient.set(this, new lazy_1$1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
|
|
14307
14307
|
/**
|
|
14308
14308
|
* Replaces a Platform window's layout with a new layout.
|
|
14309
14309
|
*
|
|
@@ -14512,7 +14512,7 @@ class Layout extends base_1$7.Base {
|
|
|
14512
14512
|
this.wire.sendAction('layout-get-root-item').catch(() => {
|
|
14513
14513
|
// don't expose
|
|
14514
14514
|
});
|
|
14515
|
-
const client = await __classPrivateFieldGet$
|
|
14515
|
+
const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
|
|
14516
14516
|
const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
|
|
14517
14517
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
|
14518
14518
|
}
|
|
@@ -14530,7 +14530,7 @@ class Layout extends base_1$7.Base {
|
|
|
14530
14530
|
this.wire.sendAction('layout-get-stack-by-view').catch(() => {
|
|
14531
14531
|
// don't expose
|
|
14532
14532
|
});
|
|
14533
|
-
const client = await __classPrivateFieldGet$
|
|
14533
|
+
const client = await __classPrivateFieldGet$6(this, _Layout_layoutClient, "f").getValue();
|
|
14534
14534
|
const stack = await client.getStackByView(identity);
|
|
14535
14535
|
if (!stack) {
|
|
14536
14536
|
throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
|
|
@@ -14550,7 +14550,7 @@ class Layout extends base_1$7.Base {
|
|
|
14550
14550
|
this.wire.sendAction('layout-add-view').catch((e) => {
|
|
14551
14551
|
// don't expose
|
|
14552
14552
|
});
|
|
14553
|
-
const { identity } = await __classPrivateFieldGet$
|
|
14553
|
+
const { identity } = await __classPrivateFieldGet$6(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-add-view', {
|
|
14554
14554
|
viewOptions,
|
|
14555
14555
|
location,
|
|
14556
14556
|
targetView
|
|
@@ -14568,7 +14568,7 @@ class Layout extends base_1$7.Base {
|
|
|
14568
14568
|
this.wire.sendAction('layout-close-view').catch((e) => {
|
|
14569
14569
|
// don't expose
|
|
14570
14570
|
});
|
|
14571
|
-
await __classPrivateFieldGet$
|
|
14571
|
+
await __classPrivateFieldGet$6(this, _Layout_instances, "m", _Layout_forwardLayoutAction).call(this, 'layout-close-view', { viewIdentity });
|
|
14572
14572
|
}
|
|
14573
14573
|
}
|
|
14574
14574
|
Instance$1.Layout = Layout;
|
|
@@ -14582,12 +14582,12 @@ async function _Layout_forwardLayoutAction(action, payload) {
|
|
|
14582
14582
|
return client.dispatch(action, { target: this.identity, opts: payload });
|
|
14583
14583
|
};
|
|
14584
14584
|
|
|
14585
|
-
var __classPrivateFieldGet$
|
|
14585
|
+
var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
14586
14586
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
14587
14587
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
14588
14588
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
14589
14589
|
};
|
|
14590
|
-
var __classPrivateFieldSet$
|
|
14590
|
+
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
14591
14591
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
14592
14592
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
14593
14593
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -14596,13 +14596,13 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
14596
14596
|
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_getSafeLayoutManager;
|
|
14597
14597
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
|
14598
14598
|
Factory$2.LayoutModule = void 0;
|
|
14599
|
-
const base_1$
|
|
14599
|
+
const base_1$7 = base;
|
|
14600
14600
|
const Instance_1$2 = Instance$1;
|
|
14601
14601
|
const layout_constants_1 = layout_constants;
|
|
14602
14602
|
/**
|
|
14603
14603
|
* Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
|
|
14604
14604
|
*/
|
|
14605
|
-
class LayoutModule extends base_1$
|
|
14605
|
+
class LayoutModule extends base_1$7.Base {
|
|
14606
14606
|
constructor() {
|
|
14607
14607
|
super(...arguments);
|
|
14608
14608
|
_LayoutModule_instances.add(this);
|
|
@@ -14653,23 +14653,23 @@ class LayoutModule extends base_1$6.Base {
|
|
|
14653
14653
|
if (!this.wire.environment.layoutAllowedInContext(this.fin)) {
|
|
14654
14654
|
throw new Error('Layout.init can only be called from a Window context.');
|
|
14655
14655
|
}
|
|
14656
|
-
if (__classPrivateFieldGet$
|
|
14656
|
+
if (__classPrivateFieldGet$5(this, _LayoutModule_layoutInitializationAttempted, "f")) {
|
|
14657
14657
|
throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
|
|
14658
14658
|
}
|
|
14659
14659
|
if (this.wire.environment.type === 'openfin') {
|
|
14660
14660
|
// preload the client
|
|
14661
14661
|
await this.fin.Platform.getCurrentSync().getClient();
|
|
14662
14662
|
}
|
|
14663
|
-
__classPrivateFieldSet$
|
|
14663
|
+
__classPrivateFieldSet$5(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
|
14664
14664
|
// TODO: rename to createLayoutManager
|
|
14665
|
-
__classPrivateFieldSet$
|
|
14666
|
-
await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$
|
|
14665
|
+
__classPrivateFieldSet$5(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
|
|
14666
|
+
await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f"), options);
|
|
14667
14667
|
const meIdentity = { name: this.fin.me.name, uuid: this.fin.me.uuid };
|
|
14668
14668
|
if (!options.layoutManagerOverride) {
|
|
14669
14669
|
// CORE-1081 to be removed when we actually delete the `layoutManager` prop
|
|
14670
14670
|
// in single-layout case, we return the undocumented layoutManager type
|
|
14671
14671
|
const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...meIdentity };
|
|
14672
|
-
return __classPrivateFieldGet$
|
|
14672
|
+
return __classPrivateFieldGet$5(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity);
|
|
14673
14673
|
}
|
|
14674
14674
|
return this.wrapSync(meIdentity);
|
|
14675
14675
|
};
|
|
@@ -14698,13 +14698,13 @@ class LayoutModule extends base_1$6.Base {
|
|
|
14698
14698
|
* @returns
|
|
14699
14699
|
*/
|
|
14700
14700
|
this.getCurrentLayoutManagerSync = () => {
|
|
14701
|
-
return __classPrivateFieldGet$
|
|
14701
|
+
return __classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
|
|
14702
14702
|
};
|
|
14703
14703
|
this.create = async (options) => {
|
|
14704
|
-
return this.wire.environment.createLayout(__classPrivateFieldGet$
|
|
14704
|
+
return this.wire.environment.createLayout(__classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
|
|
14705
14705
|
};
|
|
14706
14706
|
this.destroy = async (layoutIdentity) => {
|
|
14707
|
-
return this.wire.environment.destroyLayout(__classPrivateFieldGet$
|
|
14707
|
+
return this.wire.environment.destroyLayout(__classPrivateFieldGet$5(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
|
|
14708
14708
|
};
|
|
14709
14709
|
}
|
|
14710
14710
|
/**
|
|
@@ -14845,10 +14845,10 @@ class LayoutModule extends base_1$6.Base {
|
|
|
14845
14845
|
}
|
|
14846
14846
|
Factory$2.LayoutModule = LayoutModule;
|
|
14847
14847
|
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
|
|
14848
|
-
if (!__classPrivateFieldGet$
|
|
14848
|
+
if (!__classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f")) {
|
|
14849
14849
|
throw new Error(`You must call init before using the API ${method}`);
|
|
14850
14850
|
}
|
|
14851
|
-
return __classPrivateFieldGet$
|
|
14851
|
+
return __classPrivateFieldGet$5(this, _LayoutModule_layoutManager, "f");
|
|
14852
14852
|
};
|
|
14853
14853
|
|
|
14854
14854
|
(function (exports) {
|
|
@@ -14885,13 +14885,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
|
|
|
14885
14885
|
|
|
14886
14886
|
Object.defineProperty(Factory$3, "__esModule", { value: true });
|
|
14887
14887
|
Factory$3.PlatformModule = void 0;
|
|
14888
|
-
const base_1$
|
|
14888
|
+
const base_1$6 = base;
|
|
14889
14889
|
const Instance_1$1 = Instance$2;
|
|
14890
14890
|
const index_1$1 = layout;
|
|
14891
14891
|
/**
|
|
14892
14892
|
* Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
|
|
14893
14893
|
*/
|
|
14894
|
-
class PlatformModule extends base_1$
|
|
14894
|
+
class PlatformModule extends base_1$6.Base {
|
|
14895
14895
|
/**
|
|
14896
14896
|
* @internal
|
|
14897
14897
|
*/
|
|
@@ -15210,27 +15210,27 @@ var InteropClient$1 = {};
|
|
|
15210
15210
|
|
|
15211
15211
|
var SessionContextGroupClient$1 = {};
|
|
15212
15212
|
|
|
15213
|
-
var __classPrivateFieldSet$
|
|
15213
|
+
var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
15214
15214
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
15215
15215
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15216
15216
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15217
15217
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15218
15218
|
};
|
|
15219
|
-
var __classPrivateFieldGet$
|
|
15219
|
+
var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15220
15220
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15221
15221
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15222
15222
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
15223
15223
|
};
|
|
15224
15224
|
var _SessionContextGroupClient_clientPromise;
|
|
15225
15225
|
Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
|
|
15226
|
-
const base_1$
|
|
15226
|
+
const base_1$5 = base;
|
|
15227
15227
|
const utils_1$6 = utils$3;
|
|
15228
|
-
class SessionContextGroupClient extends base_1$
|
|
15228
|
+
class SessionContextGroupClient extends base_1$5.Base {
|
|
15229
15229
|
constructor(wire, client, id) {
|
|
15230
15230
|
super(wire);
|
|
15231
15231
|
_SessionContextGroupClient_clientPromise.set(this, void 0);
|
|
15232
15232
|
this.id = id;
|
|
15233
|
-
__classPrivateFieldSet$
|
|
15233
|
+
__classPrivateFieldSet$4(this, _SessionContextGroupClient_clientPromise, client, "f");
|
|
15234
15234
|
}
|
|
15235
15235
|
/**
|
|
15236
15236
|
* Sets a context for the session context group.
|
|
@@ -15242,7 +15242,7 @@ class SessionContextGroupClient extends base_1$4.Base {
|
|
|
15242
15242
|
this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
|
|
15243
15243
|
// don't expose, analytics-only call
|
|
15244
15244
|
});
|
|
15245
|
-
const client = await __classPrivateFieldGet$
|
|
15245
|
+
const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
|
|
15246
15246
|
return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
|
|
15247
15247
|
sessionContextGroupId: this.id,
|
|
15248
15248
|
context
|
|
@@ -15252,7 +15252,7 @@ class SessionContextGroupClient extends base_1$4.Base {
|
|
|
15252
15252
|
this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
|
|
15253
15253
|
// don't expose, analytics-only call
|
|
15254
15254
|
});
|
|
15255
|
-
const client = await __classPrivateFieldGet$
|
|
15255
|
+
const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
|
|
15256
15256
|
return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
|
|
15257
15257
|
sessionContextGroupId: this.id,
|
|
15258
15258
|
type
|
|
@@ -15265,7 +15265,7 @@ class SessionContextGroupClient extends base_1$4.Base {
|
|
|
15265
15265
|
if (typeof contextHandler !== 'function') {
|
|
15266
15266
|
throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
|
|
15267
15267
|
}
|
|
15268
|
-
const client = await __classPrivateFieldGet$
|
|
15268
|
+
const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
|
|
15269
15269
|
let handlerId;
|
|
15270
15270
|
if (contextType) {
|
|
15271
15271
|
handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$6.generateId)()}`;
|
|
@@ -15278,7 +15278,7 @@ class SessionContextGroupClient extends base_1$4.Base {
|
|
|
15278
15278
|
return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
|
|
15279
15279
|
}
|
|
15280
15280
|
async createUnsubscribeCb(handlerId) {
|
|
15281
|
-
const client = await __classPrivateFieldGet$
|
|
15281
|
+
const client = await __classPrivateFieldGet$4(this, _SessionContextGroupClient_clientPromise, "f");
|
|
15282
15282
|
return async () => {
|
|
15283
15283
|
client.remove(handlerId);
|
|
15284
15284
|
await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
|
|
@@ -15296,13 +15296,13 @@ class SessionContextGroupClient extends base_1$4.Base {
|
|
|
15296
15296
|
SessionContextGroupClient$1.default = SessionContextGroupClient;
|
|
15297
15297
|
_SessionContextGroupClient_clientPromise = new WeakMap();
|
|
15298
15298
|
|
|
15299
|
-
var __classPrivateFieldSet$
|
|
15299
|
+
var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
15300
15300
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
15301
15301
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
15302
15302
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
15303
15303
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
15304
15304
|
};
|
|
15305
|
-
var __classPrivateFieldGet$
|
|
15305
|
+
var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
15306
15306
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
15307
15307
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
15308
15308
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -15313,7 +15313,7 @@ var __importDefault$3 = (commonjsGlobal && commonjsGlobal.__importDefault) || fu
|
|
|
15313
15313
|
var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
|
|
15314
15314
|
Object.defineProperty(InteropClient$1, "__esModule", { value: true });
|
|
15315
15315
|
InteropClient$1.InteropClient = void 0;
|
|
15316
|
-
const base_1$
|
|
15316
|
+
const base_1$4 = base;
|
|
15317
15317
|
const SessionContextGroupClient_1 = __importDefault$3(SessionContextGroupClient$1);
|
|
15318
15318
|
const utils_1$5 = utils$3;
|
|
15319
15319
|
/**
|
|
@@ -15365,7 +15365,7 @@ const utils_1$5 = utils$3;
|
|
|
15365
15365
|
* * {@link InteropClient#getAllClientsInContextGroup getAllClientsInContextGroup(contextGroupId)}
|
|
15366
15366
|
*
|
|
15367
15367
|
*/
|
|
15368
|
-
class InteropClient extends base_1$
|
|
15368
|
+
class InteropClient extends base_1$4.Base {
|
|
15369
15369
|
/**
|
|
15370
15370
|
* @internal
|
|
15371
15371
|
*/
|
|
@@ -15374,9 +15374,9 @@ class InteropClient extends base_1$3.Base {
|
|
|
15374
15374
|
_InteropClient_clientPromise.set(this, void 0);
|
|
15375
15375
|
_InteropClient_sessionContextGroups.set(this, void 0);
|
|
15376
15376
|
_InteropClient_fdc3Factory.set(this, void 0);
|
|
15377
|
-
__classPrivateFieldSet$
|
|
15378
|
-
__classPrivateFieldSet$
|
|
15379
|
-
__classPrivateFieldSet$
|
|
15377
|
+
__classPrivateFieldSet$3(this, _InteropClient_sessionContextGroups, new Map(), "f");
|
|
15378
|
+
__classPrivateFieldSet$3(this, _InteropClient_clientPromise, clientPromise, "f");
|
|
15379
|
+
__classPrivateFieldSet$3(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
|
|
15380
15380
|
}
|
|
15381
15381
|
/*
|
|
15382
15382
|
Client APIs
|
|
@@ -15404,7 +15404,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15404
15404
|
this.wire.sendAction('interop-client-set-context').catch((e) => {
|
|
15405
15405
|
// don't expose, analytics-only call
|
|
15406
15406
|
});
|
|
15407
|
-
const client = await __classPrivateFieldGet$
|
|
15407
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15408
15408
|
return client.dispatch('setContext', { context });
|
|
15409
15409
|
}
|
|
15410
15410
|
/**
|
|
@@ -15471,7 +15471,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15471
15471
|
if (typeof handler !== 'function') {
|
|
15472
15472
|
throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
|
|
15473
15473
|
}
|
|
15474
|
-
const client = await __classPrivateFieldGet$
|
|
15474
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15475
15475
|
let handlerId;
|
|
15476
15476
|
if (contextType) {
|
|
15477
15477
|
handlerId = `invokeContextHandler-${contextType}-${(0, utils_1$5.generateId)()}`;
|
|
@@ -15511,7 +15511,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15511
15511
|
this.wire.sendAction('interop-client-get-context-groups').catch((e) => {
|
|
15512
15512
|
// don't expose, analytics-only call
|
|
15513
15513
|
});
|
|
15514
|
-
const client = await __classPrivateFieldGet$
|
|
15514
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15515
15515
|
return client.dispatch('getContextGroups');
|
|
15516
15516
|
}
|
|
15517
15517
|
/**
|
|
@@ -15542,7 +15542,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15542
15542
|
this.wire.sendAction('interop-client-join-context-group').catch((e) => {
|
|
15543
15543
|
// don't expose, analytics-only call
|
|
15544
15544
|
});
|
|
15545
|
-
const client = await __classPrivateFieldGet$
|
|
15545
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15546
15546
|
if (!contextGroupId) {
|
|
15547
15547
|
throw new Error('No contextGroupId specified for joinContextGroup.');
|
|
15548
15548
|
}
|
|
@@ -15571,7 +15571,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15571
15571
|
this.wire.sendAction('interop-client-remove-from-context-group').catch((e) => {
|
|
15572
15572
|
// don't expose, analytics-only call
|
|
15573
15573
|
});
|
|
15574
|
-
const client = await __classPrivateFieldGet$
|
|
15574
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15575
15575
|
return client.dispatch('removeFromContextGroup', { target });
|
|
15576
15576
|
}
|
|
15577
15577
|
/**
|
|
@@ -15594,7 +15594,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15594
15594
|
this.wire.sendAction('interop-client-get-all-clients-in-context-group').catch((e) => {
|
|
15595
15595
|
// don't expose, analytics-only call
|
|
15596
15596
|
});
|
|
15597
|
-
const client = await __classPrivateFieldGet$
|
|
15597
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15598
15598
|
if (!contextGroupId) {
|
|
15599
15599
|
throw new Error('No contextGroupId specified for getAllClientsInContextGroup.');
|
|
15600
15600
|
}
|
|
@@ -15619,7 +15619,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15619
15619
|
this.wire.sendAction('interop-client-get-info-for-context-group').catch((e) => {
|
|
15620
15620
|
// don't expose, analytics-only call
|
|
15621
15621
|
});
|
|
15622
|
-
const client = await __classPrivateFieldGet$
|
|
15622
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15623
15623
|
if (!contextGroupId) {
|
|
15624
15624
|
throw new Error('No contextGroupId specified for getInfoForContextGroup.');
|
|
15625
15625
|
}
|
|
@@ -15647,7 +15647,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15647
15647
|
this.wire.sendAction('interop-client-fire-intent').catch((e) => {
|
|
15648
15648
|
// don't expose, this is only for api analytics purposes
|
|
15649
15649
|
});
|
|
15650
|
-
const client = await __classPrivateFieldGet$
|
|
15650
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15651
15651
|
return client.dispatch('fireIntent', intent);
|
|
15652
15652
|
}
|
|
15653
15653
|
/**
|
|
@@ -15674,7 +15674,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15674
15674
|
this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
|
|
15675
15675
|
// don't expose, this is only for api analytics purposes
|
|
15676
15676
|
});
|
|
15677
|
-
const client = await __classPrivateFieldGet$
|
|
15677
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15678
15678
|
const handlerId = `intent-handler-${intentName}`;
|
|
15679
15679
|
const wrappedHandler = (0, utils_1$5.wrapIntentHandler)(handler, handlerId);
|
|
15680
15680
|
try {
|
|
@@ -15712,7 +15712,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15712
15712
|
this.wire.sendAction('interop-client-get-current-context').catch((e) => {
|
|
15713
15713
|
// don't expose, analytics-only call
|
|
15714
15714
|
});
|
|
15715
|
-
const client = await __classPrivateFieldGet$
|
|
15715
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15716
15716
|
return client.dispatch('getCurrentContext', { contextType });
|
|
15717
15717
|
}
|
|
15718
15718
|
/**
|
|
@@ -15732,7 +15732,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15732
15732
|
this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
|
|
15733
15733
|
// don't expose, analytics-only call
|
|
15734
15734
|
});
|
|
15735
|
-
const client = await __classPrivateFieldGet$
|
|
15735
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15736
15736
|
return client.dispatch('getInfoForIntent', options);
|
|
15737
15737
|
}
|
|
15738
15738
|
/**
|
|
@@ -15763,7 +15763,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15763
15763
|
this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
|
|
15764
15764
|
// don't expose, analytics-only call
|
|
15765
15765
|
});
|
|
15766
|
-
const client = await __classPrivateFieldGet$
|
|
15766
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15767
15767
|
return client.dispatch('getInfoForIntentsByContext', context);
|
|
15768
15768
|
}
|
|
15769
15769
|
/**
|
|
@@ -15795,7 +15795,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15795
15795
|
this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
|
|
15796
15796
|
// don't expose, analytics-only call
|
|
15797
15797
|
});
|
|
15798
|
-
const client = await __classPrivateFieldGet$
|
|
15798
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15799
15799
|
return client.dispatch('fireIntentForContext', context);
|
|
15800
15800
|
}
|
|
15801
15801
|
/**
|
|
@@ -15832,19 +15832,19 @@ class InteropClient extends base_1$3.Base {
|
|
|
15832
15832
|
*/
|
|
15833
15833
|
async joinSessionContextGroup(sessionContextGroupId) {
|
|
15834
15834
|
try {
|
|
15835
|
-
const currentSessionContextGroup = __classPrivateFieldGet$
|
|
15835
|
+
const currentSessionContextGroup = __classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").get(sessionContextGroupId);
|
|
15836
15836
|
if (currentSessionContextGroup) {
|
|
15837
15837
|
return currentSessionContextGroup.getUserInstance();
|
|
15838
15838
|
}
|
|
15839
|
-
const client = await __classPrivateFieldGet$
|
|
15839
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15840
15840
|
const { hasConflict } = await client.dispatch('sessionContextGroup:createIfNeeded', {
|
|
15841
15841
|
sessionContextGroupId
|
|
15842
15842
|
});
|
|
15843
15843
|
if (hasConflict) {
|
|
15844
15844
|
console.warn(`A (non-session) context group with the name "${sessionContextGroupId}" already exists. If you are trying to join a Context Group, call joinContextGroup instead.`);
|
|
15845
15845
|
}
|
|
15846
|
-
const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$
|
|
15847
|
-
__classPrivateFieldGet$
|
|
15846
|
+
const newSessionContextGroup = new SessionContextGroupClient_1.default(this.wire, __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f"), sessionContextGroupId);
|
|
15847
|
+
__classPrivateFieldGet$3(this, _InteropClient_sessionContextGroups, "f").set(sessionContextGroupId, newSessionContextGroup);
|
|
15848
15848
|
return newSessionContextGroup.getUserInstance();
|
|
15849
15849
|
}
|
|
15850
15850
|
catch (error) {
|
|
@@ -15871,14 +15871,14 @@ class InteropClient extends base_1$3.Base {
|
|
|
15871
15871
|
this.wire.sendAction('interop-client-add-ondisconnection-listener').catch((e) => {
|
|
15872
15872
|
// don't expose, analytics-only call
|
|
15873
15873
|
});
|
|
15874
|
-
const client = await __classPrivateFieldGet$
|
|
15874
|
+
const client = await __classPrivateFieldGet$3(this, _InteropClient_clientPromise, "f");
|
|
15875
15875
|
return client.onDisconnection((event) => {
|
|
15876
15876
|
const { uuid } = event;
|
|
15877
15877
|
listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
|
|
15878
15878
|
});
|
|
15879
15879
|
}
|
|
15880
15880
|
getFDC3Sync(version) {
|
|
15881
|
-
return __classPrivateFieldGet$
|
|
15881
|
+
return __classPrivateFieldGet$3(this, _InteropClient_fdc3Factory, "f").call(this, version, this, this.wire);
|
|
15882
15882
|
}
|
|
15883
15883
|
async getFDC3(version) {
|
|
15884
15884
|
return this.getFDC3Sync(version);
|
|
@@ -15889,7 +15889,7 @@ class InteropClient extends base_1$3.Base {
|
|
|
15889
15889
|
* Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
|
|
15890
15890
|
*/
|
|
15891
15891
|
static async ferryFdc3Call(interopClient, action, payload) {
|
|
15892
|
-
const client = await __classPrivateFieldGet$
|
|
15892
|
+
const client = await __classPrivateFieldGet$3(interopClient, _InteropClient_clientPromise, "f");
|
|
15893
15893
|
return client.dispatch(action, payload || null);
|
|
15894
15894
|
}
|
|
15895
15895
|
}
|
|
@@ -16267,12 +16267,12 @@ PrivateChannelClient$1.PrivateChannelClient = PrivateChannelClient;
|
|
|
16267
16267
|
exports.getIntentResolution = getIntentResolution;
|
|
16268
16268
|
} (utils$2));
|
|
16269
16269
|
|
|
16270
|
-
var __classPrivateFieldGet$
|
|
16270
|
+
var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
16271
16271
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
16272
16272
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
16273
16273
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
16274
16274
|
};
|
|
16275
|
-
var __classPrivateFieldSet$
|
|
16275
|
+
var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
16276
16276
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
16277
16277
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
16278
16278
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
@@ -16290,7 +16290,7 @@ const InteropClient_1$2 = InteropClient$1;
|
|
|
16290
16290
|
const isEqual_1 = __importDefault$2(require$$3);
|
|
16291
16291
|
class FDC3ModuleBase {
|
|
16292
16292
|
get client() {
|
|
16293
|
-
return __classPrivateFieldGet$
|
|
16293
|
+
return __classPrivateFieldGet$2(this, _FDC3ModuleBase_producer, "f").call(this);
|
|
16294
16294
|
}
|
|
16295
16295
|
get fin() {
|
|
16296
16296
|
return this.wire.getFin();
|
|
@@ -16299,7 +16299,7 @@ class FDC3ModuleBase {
|
|
|
16299
16299
|
constructor(producer, wire) {
|
|
16300
16300
|
this.wire = wire;
|
|
16301
16301
|
_FDC3ModuleBase_producer.set(this, void 0);
|
|
16302
|
-
__classPrivateFieldSet$
|
|
16302
|
+
__classPrivateFieldSet$2(this, _FDC3ModuleBase_producer, producer, "f");
|
|
16303
16303
|
}
|
|
16304
16304
|
/**
|
|
16305
16305
|
* Broadcasts a context for the channel of the current entity.
|
|
@@ -17080,7 +17080,7 @@ Object.defineProperty(Factory$1, "__esModule", { value: true });
|
|
|
17080
17080
|
Factory$1.InteropModule = void 0;
|
|
17081
17081
|
const cloneDeep_1 = __importDefault$1(require$$0$1);
|
|
17082
17082
|
const inaccessibleObject_1 = inaccessibleObject;
|
|
17083
|
-
const base_1$
|
|
17083
|
+
const base_1$3 = base;
|
|
17084
17084
|
const InteropBroker_1 = InteropBroker$1;
|
|
17085
17085
|
const InteropClient_1 = InteropClient$1;
|
|
17086
17086
|
const overrideCheck_1 = overrideCheck$1;
|
|
@@ -17092,7 +17092,7 @@ const BrokerParamAccessError = 'You have attempted to use or modify InteropBroke
|
|
|
17092
17092
|
* Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
|
|
17093
17093
|
*
|
|
17094
17094
|
*/
|
|
17095
|
-
class InteropModule extends base_1$
|
|
17095
|
+
class InteropModule extends base_1$3.Base {
|
|
17096
17096
|
/**
|
|
17097
17097
|
* Initializes an Interop Broker. This is called under-the-hood for Platforms.
|
|
17098
17098
|
*
|
|
@@ -17216,13 +17216,13 @@ const channelPrefix = 'snapshot-source-provider-';
|
|
|
17216
17216
|
const getSnapshotSourceChannelName = (id) => `${channelPrefix}${id.uuid}`;
|
|
17217
17217
|
utils.getSnapshotSourceChannelName = getSnapshotSourceChannelName;
|
|
17218
17218
|
|
|
17219
|
-
var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
17219
|
+
var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
17220
17220
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
17221
17221
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
17222
17222
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
17223
17223
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17224
17224
|
};
|
|
17225
|
-
var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17225
|
+
var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17226
17226
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
17227
17227
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
17228
17228
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -17231,7 +17231,7 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
|
|
|
17231
17231
|
Object.defineProperty(Instance, "__esModule", { value: true });
|
|
17232
17232
|
Instance.SnapshotSource = void 0;
|
|
17233
17233
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
17234
|
-
const base_1$
|
|
17234
|
+
const base_1$2 = base;
|
|
17235
17235
|
const utils_1$1 = utils;
|
|
17236
17236
|
const connectionMap = new Map();
|
|
17237
17237
|
/**
|
|
@@ -17240,7 +17240,7 @@ const connectionMap = new Map();
|
|
|
17240
17240
|
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
|
17241
17241
|
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
|
17242
17242
|
*/
|
|
17243
|
-
class SnapshotSource extends base_1$
|
|
17243
|
+
class SnapshotSource extends base_1$2.Base {
|
|
17244
17244
|
/**
|
|
17245
17245
|
* @internal
|
|
17246
17246
|
*/
|
|
@@ -17254,26 +17254,26 @@ class SnapshotSource extends base_1$1.Base {
|
|
|
17254
17254
|
return connectionMap.get(this.identity.uuid);
|
|
17255
17255
|
});
|
|
17256
17256
|
_SnapshotSource_getClient.set(this, () => {
|
|
17257
|
-
if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
|
|
17258
|
-
__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet(this, _SnapshotSource_startConnection, "f").call(this);
|
|
17257
|
+
if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise) {
|
|
17258
|
+
__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = __classPrivateFieldGet$1(this, _SnapshotSource_startConnection, "f").call(this);
|
|
17259
17259
|
}
|
|
17260
|
-
return __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
|
|
17260
|
+
return __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise;
|
|
17261
17261
|
});
|
|
17262
17262
|
_SnapshotSource_startConnection.set(this, async () => {
|
|
17263
17263
|
const channelName = (0, utils_1$1.getSnapshotSourceChannelName)(this.identity);
|
|
17264
17264
|
try {
|
|
17265
|
-
if (!__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
|
|
17266
|
-
await __classPrivateFieldGet(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
|
|
17265
|
+
if (!__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired) {
|
|
17266
|
+
await __classPrivateFieldGet$1(this, _SnapshotSource_setUpConnectionListener, "f").call(this);
|
|
17267
17267
|
}
|
|
17268
17268
|
const client = await this.fin.InterApplicationBus.Channel.connect(channelName, { wait: false });
|
|
17269
17269
|
client.onDisconnection(() => {
|
|
17270
|
-
__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
|
|
17271
|
-
__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
|
|
17270
|
+
__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
|
|
17271
|
+
__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = null;
|
|
17272
17272
|
});
|
|
17273
17273
|
return client;
|
|
17274
17274
|
}
|
|
17275
17275
|
catch (e) {
|
|
17276
|
-
__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
|
|
17276
|
+
__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).clientPromise = null;
|
|
17277
17277
|
throw new Error("The targeted SnapshotSource is not currently initialized. Await this object's ready() method.");
|
|
17278
17278
|
}
|
|
17279
17279
|
});
|
|
@@ -17285,7 +17285,7 @@ class SnapshotSource extends base_1$1.Base {
|
|
|
17285
17285
|
resolve = y;
|
|
17286
17286
|
reject = n;
|
|
17287
17287
|
});
|
|
17288
|
-
__classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
|
|
17288
|
+
__classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired = eventFired;
|
|
17289
17289
|
const listener = async (e) => {
|
|
17290
17290
|
try {
|
|
17291
17291
|
if (e.channelName === channelName) {
|
|
@@ -17299,10 +17299,10 @@ class SnapshotSource extends base_1$1.Base {
|
|
|
17299
17299
|
};
|
|
17300
17300
|
await this.fin.InterApplicationBus.Channel.on('connected', listener);
|
|
17301
17301
|
});
|
|
17302
|
-
__classPrivateFieldSet(this, _SnapshotSource_identity, id, "f");
|
|
17302
|
+
__classPrivateFieldSet$1(this, _SnapshotSource_identity, id, "f");
|
|
17303
17303
|
}
|
|
17304
17304
|
get identity() {
|
|
17305
|
-
return __classPrivateFieldGet(this, _SnapshotSource_identity, "f");
|
|
17305
|
+
return __classPrivateFieldGet$1(this, _SnapshotSource_identity, "f");
|
|
17306
17306
|
}
|
|
17307
17307
|
/**
|
|
17308
17308
|
* Method to determine if the SnapshotSource has been initialized.
|
|
@@ -17338,11 +17338,11 @@ class SnapshotSource extends base_1$1.Base {
|
|
|
17338
17338
|
// eslint-disable-next-line no-async-promise-executor
|
|
17339
17339
|
try {
|
|
17340
17340
|
// If getClient was already called before this, do we have a timing issue where the channel might have been created but we missed the event but this still fails?
|
|
17341
|
-
await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
|
|
17341
|
+
await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
|
|
17342
17342
|
}
|
|
17343
17343
|
catch (e) {
|
|
17344
17344
|
// it was not running.
|
|
17345
|
-
await __classPrivateFieldGet(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
|
|
17345
|
+
await __classPrivateFieldGet$1(this, _SnapshotSource_getConnection, "f").call(this).eventFired;
|
|
17346
17346
|
}
|
|
17347
17347
|
}
|
|
17348
17348
|
/**
|
|
@@ -17353,7 +17353,7 @@ class SnapshotSource extends base_1$1.Base {
|
|
|
17353
17353
|
this.wire.sendAction('snapshot-source-get-snapshot').catch((e) => {
|
|
17354
17354
|
// don't expose, analytics-only call
|
|
17355
17355
|
});
|
|
17356
|
-
const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
|
|
17356
|
+
const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
|
|
17357
17357
|
const response = (await client.dispatch('get-snapshot'));
|
|
17358
17358
|
return (await response).snapshot;
|
|
17359
17359
|
}
|
|
@@ -17365,7 +17365,7 @@ class SnapshotSource extends base_1$1.Base {
|
|
|
17365
17365
|
this.wire.sendAction('snapshot-source-apply-snapshot').catch((e) => {
|
|
17366
17366
|
// don't expose, analytics-only call
|
|
17367
17367
|
});
|
|
17368
|
-
const client = await __classPrivateFieldGet(this, _SnapshotSource_getClient, "f").call(this);
|
|
17368
|
+
const client = await __classPrivateFieldGet$1(this, _SnapshotSource_getClient, "f").call(this);
|
|
17369
17369
|
return client.dispatch('apply-snapshot', { snapshot });
|
|
17370
17370
|
}
|
|
17371
17371
|
}
|
|
@@ -17374,13 +17374,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
|
|
|
17374
17374
|
|
|
17375
17375
|
Object.defineProperty(Factory, "__esModule", { value: true });
|
|
17376
17376
|
Factory.SnapshotSourceModule = void 0;
|
|
17377
|
-
const base_1 = base;
|
|
17377
|
+
const base_1$1 = base;
|
|
17378
17378
|
const Instance_1 = Instance;
|
|
17379
17379
|
const utils_1 = utils;
|
|
17380
17380
|
/**
|
|
17381
17381
|
* Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
|
|
17382
17382
|
*/
|
|
17383
|
-
class SnapshotSourceModule extends base_1.Base {
|
|
17383
|
+
class SnapshotSourceModule extends base_1$1.Base {
|
|
17384
17384
|
/**
|
|
17385
17385
|
* Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
|
|
17386
17386
|
*
|
|
@@ -17486,6 +17486,114 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
|
17486
17486
|
__exportStar(Instance, exports);
|
|
17487
17487
|
} (snapshotSource));
|
|
17488
17488
|
|
|
17489
|
+
var notificationManager = {};
|
|
17490
|
+
|
|
17491
|
+
var factory = {};
|
|
17492
|
+
|
|
17493
|
+
var instance = {};
|
|
17494
|
+
|
|
17495
|
+
var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
17496
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
17497
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
17498
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
17499
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
17500
|
+
};
|
|
17501
|
+
var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
17502
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
17503
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
17504
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
17505
|
+
};
|
|
17506
|
+
var _NotificationManagerInstance_wire, _NotificationManagerInstance_handler, _NotificationManagerInstance_id, _NotificationManagerInstance_isReceivingNotifications;
|
|
17507
|
+
Object.defineProperty(instance, "__esModule", { value: true });
|
|
17508
|
+
instance.NotificationManagerInstance = void 0;
|
|
17509
|
+
const lazy_1 = lazy;
|
|
17510
|
+
class NotificationManagerInstance {
|
|
17511
|
+
constructor(wire, id) {
|
|
17512
|
+
_NotificationManagerInstance_wire.set(this, void 0);
|
|
17513
|
+
_NotificationManagerInstance_handler.set(this, void 0);
|
|
17514
|
+
_NotificationManagerInstance_id.set(this, void 0);
|
|
17515
|
+
_NotificationManagerInstance_isReceivingNotifications.set(this, new lazy_1.Lazy(async () => {
|
|
17516
|
+
await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").registerMessageHandler((message) => {
|
|
17517
|
+
if (message.action === 'notification-created' && message.payload.managerId === __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f")) {
|
|
17518
|
+
const { notificationId, properties, documentUrl: url, notificationIcon: icon, badge, image } = message.payload;
|
|
17519
|
+
try {
|
|
17520
|
+
__classPrivateFieldGet(this, _NotificationManagerInstance_handler, "f")?.call(this, {
|
|
17521
|
+
properties,
|
|
17522
|
+
images: {
|
|
17523
|
+
image,
|
|
17524
|
+
icon,
|
|
17525
|
+
badge
|
|
17526
|
+
},
|
|
17527
|
+
url,
|
|
17528
|
+
notificationId
|
|
17529
|
+
});
|
|
17530
|
+
}
|
|
17531
|
+
catch (error) {
|
|
17532
|
+
console.error('Failed to handle notification', error);
|
|
17533
|
+
}
|
|
17534
|
+
return true;
|
|
17535
|
+
}
|
|
17536
|
+
return false;
|
|
17537
|
+
});
|
|
17538
|
+
return true;
|
|
17539
|
+
}));
|
|
17540
|
+
this.setNotificationHandler = async (handler) => {
|
|
17541
|
+
await __classPrivateFieldGet(this, _NotificationManagerInstance_isReceivingNotifications, "f").getValue();
|
|
17542
|
+
__classPrivateFieldSet(this, _NotificationManagerInstance_handler, handler, "f");
|
|
17543
|
+
};
|
|
17544
|
+
this.destroy = async () => {
|
|
17545
|
+
await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('destroy-notification-manager', { managerId: __classPrivateFieldGet(this, _NotificationManagerInstance_id, "f") });
|
|
17546
|
+
};
|
|
17547
|
+
this.dispatch = async (event) => {
|
|
17548
|
+
const { notificationId, type } = event;
|
|
17549
|
+
await __classPrivateFieldGet(this, _NotificationManagerInstance_wire, "f").sendAction('dispatch-notification-event', {
|
|
17550
|
+
notificationId,
|
|
17551
|
+
type
|
|
17552
|
+
});
|
|
17553
|
+
};
|
|
17554
|
+
__classPrivateFieldSet(this, _NotificationManagerInstance_wire, wire, "f");
|
|
17555
|
+
__classPrivateFieldSet(this, _NotificationManagerInstance_id, id, "f");
|
|
17556
|
+
}
|
|
17557
|
+
}
|
|
17558
|
+
instance.NotificationManagerInstance = NotificationManagerInstance;
|
|
17559
|
+
_NotificationManagerInstance_wire = new WeakMap(), _NotificationManagerInstance_handler = new WeakMap(), _NotificationManagerInstance_id = new WeakMap(), _NotificationManagerInstance_isReceivingNotifications = new WeakMap();
|
|
17560
|
+
|
|
17561
|
+
Object.defineProperty(factory, "__esModule", { value: true });
|
|
17562
|
+
factory.NotificationManagerModule = void 0;
|
|
17563
|
+
const base_1 = base;
|
|
17564
|
+
const instance_1 = instance;
|
|
17565
|
+
class NotificationManagerModule extends base_1.Base {
|
|
17566
|
+
constructor() {
|
|
17567
|
+
super(...arguments);
|
|
17568
|
+
this.init = async () => {
|
|
17569
|
+
const { payload: { data: { managerId } } } = await this.wire.sendAction('init-notification-manager');
|
|
17570
|
+
const manager = new instance_1.NotificationManagerInstance(this.wire, managerId);
|
|
17571
|
+
return manager;
|
|
17572
|
+
};
|
|
17573
|
+
}
|
|
17574
|
+
}
|
|
17575
|
+
factory.NotificationManagerModule = NotificationManagerModule;
|
|
17576
|
+
|
|
17577
|
+
(function (exports) {
|
|
17578
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17579
|
+
if (k2 === undefined) k2 = k;
|
|
17580
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
17581
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17582
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17583
|
+
}
|
|
17584
|
+
Object.defineProperty(o, k2, desc);
|
|
17585
|
+
}) : (function(o, m, k, k2) {
|
|
17586
|
+
if (k2 === undefined) k2 = k;
|
|
17587
|
+
o[k2] = m[k];
|
|
17588
|
+
}));
|
|
17589
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
17590
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17591
|
+
};
|
|
17592
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17593
|
+
__exportStar(factory, exports);
|
|
17594
|
+
__exportStar(instance, exports);
|
|
17595
|
+
} (notificationManager));
|
|
17596
|
+
|
|
17489
17597
|
Object.defineProperty(fin$1, "__esModule", { value: true });
|
|
17490
17598
|
var Fin_1 = fin$1.Fin = void 0;
|
|
17491
17599
|
const events_1 = require$$0;
|
|
@@ -17503,6 +17611,7 @@ const index_10 = platform;
|
|
|
17503
17611
|
const me_1 = me;
|
|
17504
17612
|
const interop_1 = interop;
|
|
17505
17613
|
const snapshot_source_1 = snapshotSource;
|
|
17614
|
+
const notification_manager_1 = notificationManager;
|
|
17506
17615
|
/**
|
|
17507
17616
|
* @internal
|
|
17508
17617
|
*/
|
|
@@ -17525,6 +17634,7 @@ class Fin extends events_1.EventEmitter {
|
|
|
17525
17634
|
this.View = new index_9.ViewModule(wire);
|
|
17526
17635
|
this.Interop = new interop_1.InteropModule(wire);
|
|
17527
17636
|
this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
|
|
17637
|
+
this.NotificationManager = new notification_manager_1.NotificationManagerModule(wire);
|
|
17528
17638
|
wire.registerFin(this);
|
|
17529
17639
|
this.me = (0, me_1.getMe)(wire);
|
|
17530
17640
|
// Handle disconnect events
|