@openfin/core 40.82.17 → 40.82.19
Sign up to get free protection for your applications and to get access to all the features.
- package/out/mock-alpha.d.ts +2 -3
- package/out/mock-beta.d.ts +2 -3
- package/out/mock-public.d.ts +2 -3
- package/out/mock.d.ts +8 -4
- package/out/mock.js +70 -53
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
@@ -2265,8 +2265,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
|
|
2265
2265
|
|
2266
2266
|
declare type Channel_2 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2267
2267
|
|
2268
|
-
declare type Channel_3 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2269
|
-
|
2270
2268
|
declare type ChannelAction = OpenFin_2.ChannelAction;
|
2271
2269
|
|
2272
2270
|
declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
|
@@ -7622,7 +7620,7 @@ declare class Layout extends Base {
|
|
7622
7620
|
* ```
|
7623
7621
|
*/
|
7624
7622
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7625
|
-
|
7623
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7626
7624
|
/**
|
7627
7625
|
* Replaces the specified view with a view with the provided configuration.
|
7628
7626
|
*
|
@@ -9620,6 +9618,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
9620
9618
|
private _channel;
|
9621
9619
|
Application: OpenFin_2.Application;
|
9622
9620
|
identity: OpenFin_2.ApplicationIdentity;
|
9621
|
+
/* Excluded from this release type: clientMap */
|
9623
9622
|
/* Excluded from this release type: __constructor */
|
9624
9623
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
9625
9624
|
/**
|
package/out/mock-beta.d.ts
CHANGED
@@ -2265,8 +2265,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
|
|
2265
2265
|
|
2266
2266
|
declare type Channel_2 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2267
2267
|
|
2268
|
-
declare type Channel_3 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2269
|
-
|
2270
2268
|
declare type ChannelAction = OpenFin_2.ChannelAction;
|
2271
2269
|
|
2272
2270
|
declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
|
@@ -7622,7 +7620,7 @@ declare class Layout extends Base {
|
|
7622
7620
|
* ```
|
7623
7621
|
*/
|
7624
7622
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7625
|
-
|
7623
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7626
7624
|
/**
|
7627
7625
|
* Replaces the specified view with a view with the provided configuration.
|
7628
7626
|
*
|
@@ -9620,6 +9618,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
9620
9618
|
private _channel;
|
9621
9619
|
Application: OpenFin_2.Application;
|
9622
9620
|
identity: OpenFin_2.ApplicationIdentity;
|
9621
|
+
/* Excluded from this release type: clientMap */
|
9623
9622
|
/* Excluded from this release type: __constructor */
|
9624
9623
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
9625
9624
|
/**
|
package/out/mock-public.d.ts
CHANGED
@@ -2265,8 +2265,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
|
|
2265
2265
|
|
2266
2266
|
declare type Channel_2 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2267
2267
|
|
2268
|
-
declare type Channel_3 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2269
|
-
|
2270
2268
|
declare type ChannelAction = OpenFin_2.ChannelAction;
|
2271
2269
|
|
2272
2270
|
declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
|
@@ -7622,7 +7620,7 @@ declare class Layout extends Base {
|
|
7622
7620
|
* ```
|
7623
7621
|
*/
|
7624
7622
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7625
|
-
|
7623
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7626
7624
|
/**
|
7627
7625
|
* Replaces the specified view with a view with the provided configuration.
|
7628
7626
|
*
|
@@ -9620,6 +9618,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
9620
9618
|
private _channel;
|
9621
9619
|
Application: OpenFin_2.Application;
|
9622
9620
|
identity: OpenFin_2.ApplicationIdentity;
|
9621
|
+
/* Excluded from this release type: clientMap */
|
9623
9622
|
/* Excluded from this release type: __constructor */
|
9624
9623
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
9625
9624
|
/**
|
package/out/mock.d.ts
CHANGED
@@ -2304,8 +2304,6 @@ declare class Channel extends EmitterBase<ChannelEvent> {
|
|
2304
2304
|
|
2305
2305
|
declare type Channel_2 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2306
2306
|
|
2307
|
-
declare type Channel_3 = OpenFin_2.Fin['InterApplicationBus']['Channel'];
|
2308
|
-
|
2309
2307
|
declare type ChannelAction = OpenFin_2.ChannelAction;
|
2310
2308
|
|
2311
2309
|
declare type ChannelAction_2 = (payload: unknown, id: ProviderIdentity_4 | ClientIdentity) => unknown;
|
@@ -7745,7 +7743,7 @@ declare class Layout extends Base {
|
|
7745
7743
|
* ```
|
7746
7744
|
*/
|
7747
7745
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
7748
|
-
|
7746
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
7749
7747
|
/**
|
7750
7748
|
* Replaces the specified view with a view with the provided configuration.
|
7751
7749
|
*
|
@@ -9935,10 +9933,16 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
9935
9933
|
private _channel;
|
9936
9934
|
Application: OpenFin_2.Application;
|
9937
9935
|
identity: OpenFin_2.ApplicationIdentity;
|
9936
|
+
/**
|
9937
|
+
* @internal
|
9938
|
+
* Reuse clients to avoid overwriting already-registered client in provider
|
9939
|
+
* This ensures that only channel client is created per channel name per `fin` instance
|
9940
|
+
*/
|
9941
|
+
private static clientMap;
|
9938
9942
|
/**
|
9939
9943
|
* @internal
|
9940
9944
|
*/
|
9941
|
-
constructor(identity: OpenFin_2.ApplicationIdentity,
|
9945
|
+
constructor(wire: Transport, identity: OpenFin_2.ApplicationIdentity, channelName?: string);
|
9942
9946
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
9943
9947
|
/**
|
9944
9948
|
* Creates a new view and attaches it to a specified target window.
|
package/out/mock.js
CHANGED
@@ -361,7 +361,7 @@ async function promiseMapSerial(arr, func) {
|
|
361
361
|
}
|
362
362
|
promises.promiseMapSerial = promiseMapSerial;
|
363
363
|
|
364
|
-
var __classPrivateFieldSet$
|
364
|
+
var __classPrivateFieldSet$d = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
365
365
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
366
366
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
367
367
|
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");
|
@@ -490,7 +490,7 @@ class EmitterBase extends Base {
|
|
490
490
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
491
491
|
return Promise.resolve();
|
492
492
|
};
|
493
|
-
__classPrivateFieldSet$
|
493
|
+
__classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
494
494
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
495
495
|
}
|
496
496
|
/**
|
@@ -1309,7 +1309,7 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
|
|
1309
1309
|
};
|
1310
1310
|
channelApiRelay.createRelayedDispatch = createRelayedDispatch;
|
1311
1311
|
|
1312
|
-
var __classPrivateFieldSet$
|
1312
|
+
var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
1313
1313
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
1314
1314
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
1315
1315
|
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");
|
@@ -1503,7 +1503,7 @@ class LayoutNode {
|
|
1503
1503
|
entityId: stack.entityId
|
1504
1504
|
}, __classPrivateFieldGet$d(this, _LayoutNode_client, "f")));
|
1505
1505
|
};
|
1506
|
-
__classPrivateFieldSet$
|
1506
|
+
__classPrivateFieldSet$c(this, _LayoutNode_client, client, "f");
|
1507
1507
|
this.entityId = entityId;
|
1508
1508
|
}
|
1509
1509
|
}
|
@@ -1662,7 +1662,7 @@ class TabStack extends LayoutNode {
|
|
1662
1662
|
this.setActiveView = async (view) => {
|
1663
1663
|
await __classPrivateFieldGet$d(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
|
1664
1664
|
};
|
1665
|
-
__classPrivateFieldSet$
|
1665
|
+
__classPrivateFieldSet$c(this, _TabStack_client, client, "f");
|
1666
1666
|
}
|
1667
1667
|
}
|
1668
1668
|
layoutEntities.TabStack = TabStack;
|
@@ -1704,7 +1704,7 @@ class ColumnOrRow extends LayoutNode {
|
|
1704
1704
|
const contentItemEntities = await __classPrivateFieldGet$d(this, _ColumnOrRow_client, "f").getContent(this.entityId);
|
1705
1705
|
return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$d(this, _ColumnOrRow_client, "f")));
|
1706
1706
|
};
|
1707
|
-
__classPrivateFieldSet$
|
1707
|
+
__classPrivateFieldSet$c(this, _ColumnOrRow_client, client, "f");
|
1708
1708
|
this.type = type;
|
1709
1709
|
}
|
1710
1710
|
}
|
@@ -3279,7 +3279,7 @@ function requireInstance$2 () {
|
|
3279
3279
|
});
|
3280
3280
|
try {
|
3281
3281
|
const layout = await this.getParentLayout();
|
3282
|
-
return layout.
|
3282
|
+
return layout.getStackByViewIdentity(this.identity);
|
3283
3283
|
}
|
3284
3284
|
catch (error) {
|
3285
3285
|
throw new transport_errors_1.RuntimeError({ reason: 'This view does not belong to a stack.', error });
|
@@ -8317,7 +8317,7 @@ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
8317
8317
|
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");
|
8318
8318
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
8319
8319
|
};
|
8320
|
-
var __classPrivateFieldSet$
|
8320
|
+
var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
8321
8321
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
8322
8322
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
8323
8323
|
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");
|
@@ -8389,10 +8389,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
8389
8389
|
channelClientsByEndpointId.delete(this.endpointId);
|
8390
8390
|
__classPrivateFieldGet$c(this, _ChannelClient_strategy, "f").close();
|
8391
8391
|
});
|
8392
|
-
__classPrivateFieldSet$
|
8392
|
+
__classPrivateFieldSet$b(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
|
8393
8393
|
this.disconnectListener = () => undefined;
|
8394
8394
|
this.endpointId = routingInfo.endpointId;
|
8395
|
-
__classPrivateFieldSet$
|
8395
|
+
__classPrivateFieldSet$b(this, _ChannelClient_strategy, strategy, "f");
|
8396
8396
|
channelClientsByEndpointId.set(this.endpointId, this);
|
8397
8397
|
strategy.receive(this.processAction);
|
8398
8398
|
}
|
@@ -8519,7 +8519,7 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
|
|
8519
8519
|
|
8520
8520
|
var strategy$3 = {};
|
8521
8521
|
|
8522
|
-
var __classPrivateFieldSet$
|
8522
|
+
var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
8523
8523
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
8524
8524
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
8525
8525
|
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");
|
@@ -8585,9 +8585,9 @@ class ClassicStrategy {
|
|
8585
8585
|
this.close = async () => {
|
8586
8586
|
this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
|
8587
8587
|
[...__classPrivateFieldGet$b(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
|
8588
|
-
__classPrivateFieldSet$
|
8588
|
+
__classPrivateFieldSet$a(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
|
8589
8589
|
};
|
8590
|
-
__classPrivateFieldSet$
|
8590
|
+
__classPrivateFieldSet$a(this, _ClassicStrategy_wire, wire, "f");
|
8591
8591
|
}
|
8592
8592
|
onEndpointDisconnect(endpointId, listener) {
|
8593
8593
|
// Never fires for 'classic'.
|
@@ -8649,7 +8649,7 @@ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
8649
8649
|
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");
|
8650
8650
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
8651
8651
|
};
|
8652
|
-
var __classPrivateFieldSet$
|
8652
|
+
var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
8653
8653
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
8654
8654
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
8655
8655
|
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");
|
@@ -8777,7 +8777,7 @@ class RTCEndpoint {
|
|
8777
8777
|
}
|
8778
8778
|
onDisconnect(listener) {
|
8779
8779
|
if (!__classPrivateFieldGet$a(this, _RTCEndpoint_disconnectListener, "f")) {
|
8780
|
-
__classPrivateFieldSet$
|
8780
|
+
__classPrivateFieldSet$9(this, _RTCEndpoint_disconnectListener, listener, "f");
|
8781
8781
|
}
|
8782
8782
|
else {
|
8783
8783
|
throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
|
@@ -8787,7 +8787,7 @@ class RTCEndpoint {
|
|
8787
8787
|
if (__classPrivateFieldGet$a(this, _RTCEndpoint_processAction, "f")) {
|
8788
8788
|
throw new Error('You have already set a listener for this RTC Endpoint.');
|
8789
8789
|
}
|
8790
|
-
__classPrivateFieldSet$
|
8790
|
+
__classPrivateFieldSet$9(this, _RTCEndpoint_processAction, listener, "f");
|
8791
8791
|
}
|
8792
8792
|
get connected() {
|
8793
8793
|
return this.rtc.rtcClient.connectionState === 'connected';
|
@@ -8803,7 +8803,7 @@ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
8803
8803
|
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");
|
8804
8804
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
8805
8805
|
};
|
8806
|
-
var __classPrivateFieldSet$
|
8806
|
+
var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
8807
8807
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
8808
8808
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
8809
8809
|
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");
|
@@ -8826,9 +8826,9 @@ class EndpointStrategy {
|
|
8826
8826
|
this.close = async () => {
|
8827
8827
|
if (__classPrivateFieldGet$9(this, _EndpointStrategy_connected, "f")) {
|
8828
8828
|
__classPrivateFieldGet$9(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
|
8829
|
-
__classPrivateFieldSet$
|
8829
|
+
__classPrivateFieldSet$8(this, _EndpointStrategy_endpointMap, new Map(), "f");
|
8830
8830
|
}
|
8831
|
-
__classPrivateFieldSet$
|
8831
|
+
__classPrivateFieldSet$8(this, _EndpointStrategy_connected, false, "f");
|
8832
8832
|
};
|
8833
8833
|
this.isValidEndpointPayload = validateEndpoint;
|
8834
8834
|
}
|
@@ -8839,7 +8839,7 @@ class EndpointStrategy {
|
|
8839
8839
|
if (__classPrivateFieldGet$9(this, _EndpointStrategy_processAction, "f")) {
|
8840
8840
|
throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
|
8841
8841
|
}
|
8842
|
-
__classPrivateFieldSet$
|
8842
|
+
__classPrivateFieldSet$8(this, _EndpointStrategy_processAction, listener, "f");
|
8843
8843
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
8844
8844
|
__classPrivateFieldGet$9(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$9(this, _EndpointStrategy_processAction, "f")));
|
8845
8845
|
}
|
@@ -9055,7 +9055,7 @@ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
9055
9055
|
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");
|
9056
9056
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
9057
9057
|
};
|
9058
|
-
var __classPrivateFieldSet$
|
9058
|
+
var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
9059
9059
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
9060
9060
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
9061
9061
|
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");
|
@@ -9128,7 +9128,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9128
9128
|
_ChannelProvider_removeEndpoint.set(this, (identity) => {
|
9129
9129
|
const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
|
9130
9130
|
__classPrivateFieldGet$8(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
|
9131
|
-
__classPrivateFieldSet$
|
9131
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_connections, remainingConnections, "f");
|
9132
9132
|
});
|
9133
9133
|
// Must be bound.
|
9134
9134
|
this.processAction = async (action, payload, senderIdentity) => {
|
@@ -9148,11 +9148,11 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9148
9148
|
remove();
|
9149
9149
|
}
|
9150
9150
|
});
|
9151
|
-
__classPrivateFieldSet$
|
9151
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
|
9152
9152
|
this.connectListener = () => undefined;
|
9153
9153
|
this.disconnectListener = () => undefined;
|
9154
|
-
__classPrivateFieldSet$
|
9155
|
-
__classPrivateFieldSet$
|
9154
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_connections, [], "f");
|
9155
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_strategy, strategy, "f");
|
9156
9156
|
strategy.receive(this.processAction);
|
9157
9157
|
}
|
9158
9158
|
/**
|
@@ -9291,7 +9291,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9291
9291
|
async destroy() {
|
9292
9292
|
const protectedObj = __classPrivateFieldGet$8(this, _ChannelProvider_protectedObj, "f");
|
9293
9293
|
protectedObj.providerIdentity;
|
9294
|
-
__classPrivateFieldSet$
|
9294
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_connections, [], "f");
|
9295
9295
|
await protectedObj.close();
|
9296
9296
|
__classPrivateFieldGet$8(this, _ChannelProvider_close, "f").call(this);
|
9297
9297
|
}
|
@@ -9575,7 +9575,7 @@ class CombinedStrategy {
|
|
9575
9575
|
}
|
9576
9576
|
strategy.default = CombinedStrategy;
|
9577
9577
|
|
9578
|
-
var __classPrivateFieldSet$
|
9578
|
+
var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
9579
9579
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
9580
9580
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
9581
9581
|
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");
|
@@ -9630,8 +9630,8 @@ class ConnectionManager extends base_1$f.Base {
|
|
9630
9630
|
};
|
9631
9631
|
this.providerMap = new Map();
|
9632
9632
|
this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
|
9633
|
-
__classPrivateFieldSet$
|
9634
|
-
__classPrivateFieldSet$
|
9633
|
+
__classPrivateFieldSet$6(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
|
9634
|
+
__classPrivateFieldSet$6(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
|
9635
9635
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
9636
9636
|
}
|
9637
9637
|
createProvider(options, providerIdentity) {
|
@@ -9832,7 +9832,7 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
|
|
9832
9832
|
*
|
9833
9833
|
* @packageDocumentation
|
9834
9834
|
*/
|
9835
|
-
var __classPrivateFieldSet$
|
9835
|
+
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
9836
9836
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
9837
9837
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
9838
9838
|
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");
|
@@ -9899,7 +9899,7 @@ class Channel extends base_1$e.EmitterBase {
|
|
9899
9899
|
})
|
9900
9900
|
]).catch(() => new Error('error setting up channel connection listeners'));
|
9901
9901
|
}));
|
9902
|
-
__classPrivateFieldSet$
|
9902
|
+
__classPrivateFieldSet$5(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
|
9903
9903
|
}
|
9904
9904
|
/**
|
9905
9905
|
*
|
@@ -11042,19 +11042,23 @@ var Factory$3 = {};
|
|
11042
11042
|
|
11043
11043
|
var Instance$2 = {};
|
11044
11044
|
|
11045
|
+
var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
11046
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
11047
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
11048
|
+
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");
|
11049
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
11050
|
+
};
|
11045
11051
|
var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
11046
11052
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
11047
11053
|
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");
|
11048
11054
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
11049
11055
|
};
|
11050
|
-
var _Platform_connectToProvider;
|
11056
|
+
var _Platform_channelName, _Platform_connectToProvider;
|
11051
11057
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
11052
11058
|
Instance$2.Platform = void 0;
|
11053
11059
|
/* eslint-disable import/prefer-default-export, no-undef */
|
11054
11060
|
const base_1$6 = base;
|
11055
11061
|
const validate_1$1 = validate;
|
11056
|
-
// Reuse clients to avoid overwriting already-registered client in provider
|
11057
|
-
const clientMap = new Map();
|
11058
11062
|
/** Manages the life cycle of windows and views in the application.
|
11059
11063
|
*
|
11060
11064
|
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
@@ -11065,34 +11069,40 @@ class Platform extends base_1$6.EmitterBase {
|
|
11065
11069
|
* @internal
|
11066
11070
|
*/
|
11067
11071
|
// eslint-disable-next-line no-shadow
|
11068
|
-
constructor(identity,
|
11072
|
+
constructor(wire, identity, channelName = `custom-frame-${identity.uuid}`) {
|
11069
11073
|
// we piggyback off of application event emitter because from the core's perspective platform is just an app.
|
11070
|
-
super(
|
11071
|
-
|
11074
|
+
super(wire, 'application', identity.uuid);
|
11075
|
+
/**
|
11076
|
+
* @internal
|
11077
|
+
*/
|
11078
|
+
_Platform_channelName.set(this, void 0);
|
11079
|
+
this.getClient = (identity = this.identity) => {
|
11080
|
+
if (identity.uuid !== this.identity.uuid) {
|
11081
|
+
// I have no idea why we allow passing in a different identity, but we do.
|
11082
|
+
// Doing this above the analytics call so we only register one call.
|
11083
|
+
return new Platform(this.wire, identity).getClient();
|
11084
|
+
}
|
11072
11085
|
this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
|
11073
11086
|
// don't expose
|
11074
11087
|
});
|
11075
|
-
|
11076
|
-
|
11077
|
-
|
11078
|
-
const clientPromise = __classPrivateFieldGet$5(this, _Platform_connectToProvider, "f").call(this, uuid);
|
11079
|
-
clientMap.set(uuid, clientPromise);
|
11088
|
+
if (!Platform.clientMap.has(__classPrivateFieldGet$5(this, _Platform_channelName, "f"))) {
|
11089
|
+
const clientPromise = __classPrivateFieldGet$5(this, _Platform_connectToProvider, "f").call(this);
|
11090
|
+
Platform.clientMap.set(__classPrivateFieldGet$5(this, _Platform_channelName, "f"), clientPromise);
|
11080
11091
|
}
|
11081
11092
|
// we set it above
|
11082
11093
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
11083
|
-
return clientMap.get(
|
11094
|
+
return Platform.clientMap.get(__classPrivateFieldGet$5(this, _Platform_channelName, "f"));
|
11084
11095
|
};
|
11085
|
-
_Platform_connectToProvider.set(this, async (
|
11096
|
+
_Platform_connectToProvider.set(this, async () => {
|
11086
11097
|
try {
|
11087
|
-
const
|
11088
|
-
const client = await this._channel.connect(channelName, { wait: false });
|
11098
|
+
const client = await this._channel.connect(__classPrivateFieldGet$5(this, _Platform_channelName, "f"), { wait: false });
|
11089
11099
|
client.onDisconnection(() => {
|
11090
|
-
clientMap.delete(
|
11100
|
+
Platform.clientMap.delete(__classPrivateFieldGet$5(this, _Platform_channelName, "f"));
|
11091
11101
|
});
|
11092
11102
|
return client;
|
11093
11103
|
}
|
11094
11104
|
catch (e) {
|
11095
|
-
clientMap.delete(
|
11105
|
+
Platform.clientMap.delete(__classPrivateFieldGet$5(this, _Platform_channelName, "f"));
|
11096
11106
|
throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
|
11097
11107
|
}
|
11098
11108
|
});
|
@@ -11105,7 +11115,8 @@ class Platform extends base_1$6.EmitterBase {
|
|
11105
11115
|
if (errorMsg) {
|
11106
11116
|
throw new Error(errorMsg);
|
11107
11117
|
}
|
11108
|
-
this
|
11118
|
+
__classPrivateFieldSet$4(this, _Platform_channelName, channelName, "f");
|
11119
|
+
this._channel = this.fin.InterApplicationBus.Channel;
|
11109
11120
|
this.identity = { uuid: identity.uuid };
|
11110
11121
|
this.Layout = this.fin.Platform.Layout;
|
11111
11122
|
this.Application = this.fin.Application.wrapSync(this.identity);
|
@@ -11870,7 +11881,13 @@ class Platform extends base_1$6.EmitterBase {
|
|
11870
11881
|
}
|
11871
11882
|
}
|
11872
11883
|
Instance$2.Platform = Platform;
|
11873
|
-
_Platform_connectToProvider = new WeakMap();
|
11884
|
+
_Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
|
11885
|
+
/**
|
11886
|
+
* @internal
|
11887
|
+
* Reuse clients to avoid overwriting already-registered client in provider
|
11888
|
+
* This ensures that only channel client is created per channel name per `fin` instance
|
11889
|
+
*/
|
11890
|
+
Platform.clientMap = new Map();
|
11874
11891
|
|
11875
11892
|
var layout = {};
|
11876
11893
|
|
@@ -12271,7 +12288,7 @@ class Layout extends base_1$5.Base {
|
|
12271
12288
|
const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
|
12272
12289
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
12273
12290
|
}
|
12274
|
-
async
|
12291
|
+
async getStackByViewIdentity(identity) {
|
12275
12292
|
this.wire.sendAction('layout-get-stack-by-view').catch(() => {
|
12276
12293
|
// don't expose
|
12277
12294
|
});
|
@@ -12640,7 +12657,7 @@ class PlatformModule extends base_1$3.Base {
|
|
12640
12657
|
this.wire.sendAction('platform-wrap').catch((e) => {
|
12641
12658
|
// don't expose
|
12642
12659
|
});
|
12643
|
-
return new Instance_1$1.Platform({ uuid: identity.uuid }
|
12660
|
+
return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
|
12644
12661
|
}
|
12645
12662
|
/**
|
12646
12663
|
* Synchronously returns a Platform object that represents an existing platform.
|
@@ -12657,7 +12674,7 @@ class PlatformModule extends base_1$3.Base {
|
|
12657
12674
|
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
12658
12675
|
// don't expose
|
12659
12676
|
});
|
12660
|
-
return new Instance_1$1.Platform({ uuid: identity.uuid }
|
12677
|
+
return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
|
12661
12678
|
}
|
12662
12679
|
/**
|
12663
12680
|
* Asynchronously returns a Platform object that represents the current platform.
|