@openfin/core 40.82.16 → 40.82.19
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/mock-alpha.d.ts +2 -2
- package/out/mock-beta.d.ts +2 -2
- package/out/mock-public.d.ts +2 -2
- package/out/mock.d.ts +8 -3
- package/out/mock.js +83 -58
- 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,6 +7620,7 @@ declare class Layout extends Base {
|
|
|
7622
7620
|
* ```
|
|
7623
7621
|
*/
|
|
7624
7622
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7623
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7625
7624
|
/**
|
|
7626
7625
|
* Replaces the specified view with a view with the provided configuration.
|
|
7627
7626
|
*
|
|
@@ -9619,6 +9618,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
|
9619
9618
|
private _channel;
|
|
9620
9619
|
Application: OpenFin_2.Application;
|
|
9621
9620
|
identity: OpenFin_2.ApplicationIdentity;
|
|
9621
|
+
/* Excluded from this release type: clientMap */
|
|
9622
9622
|
/* Excluded from this release type: __constructor */
|
|
9623
9623
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
|
9624
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,6 +7620,7 @@ declare class Layout extends Base {
|
|
|
7622
7620
|
* ```
|
|
7623
7621
|
*/
|
|
7624
7622
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7623
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7625
7624
|
/**
|
|
7626
7625
|
* Replaces the specified view with a view with the provided configuration.
|
|
7627
7626
|
*
|
|
@@ -9619,6 +9618,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
|
9619
9618
|
private _channel;
|
|
9620
9619
|
Application: OpenFin_2.Application;
|
|
9621
9620
|
identity: OpenFin_2.ApplicationIdentity;
|
|
9621
|
+
/* Excluded from this release type: clientMap */
|
|
9622
9622
|
/* Excluded from this release type: __constructor */
|
|
9623
9623
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
|
9624
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,6 +7620,7 @@ declare class Layout extends Base {
|
|
|
7622
7620
|
* ```
|
|
7623
7621
|
*/
|
|
7624
7622
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7623
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7625
7624
|
/**
|
|
7626
7625
|
* Replaces the specified view with a view with the provided configuration.
|
|
7627
7626
|
*
|
|
@@ -9619,6 +9618,7 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
|
9619
9618
|
private _channel;
|
|
9620
9619
|
Application: OpenFin_2.Application;
|
|
9621
9620
|
identity: OpenFin_2.ApplicationIdentity;
|
|
9621
|
+
/* Excluded from this release type: clientMap */
|
|
9622
9622
|
/* Excluded from this release type: __constructor */
|
|
9623
9623
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
|
9624
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,6 +7743,7 @@ declare class Layout extends Base {
|
|
|
7745
7743
|
* ```
|
|
7746
7744
|
*/
|
|
7747
7745
|
getRootItem(): Promise<OpenFin_2.ColumnOrRow | OpenFin_2.TabStack>;
|
|
7746
|
+
getStackByViewIdentity(identity: OpenFin_2.Identity): Promise<OpenFin_2.TabStack>;
|
|
7748
7747
|
/**
|
|
7749
7748
|
* Replaces the specified view with a view with the provided configuration.
|
|
7750
7749
|
*
|
|
@@ -9934,10 +9933,16 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
|
|
|
9934
9933
|
private _channel;
|
|
9935
9934
|
Application: OpenFin_2.Application;
|
|
9936
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;
|
|
9937
9942
|
/**
|
|
9938
9943
|
* @internal
|
|
9939
9944
|
*/
|
|
9940
|
-
constructor(identity: OpenFin_2.ApplicationIdentity,
|
|
9945
|
+
constructor(wire: Transport, identity: OpenFin_2.ApplicationIdentity, channelName?: string);
|
|
9941
9946
|
getClient: (identity?: OpenFin_2.ApplicationIdentity) => Promise<ChannelClient_2>;
|
|
9942
9947
|
/**
|
|
9943
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
|
}
|
|
@@ -3278,11 +3278,8 @@ function requireInstance$2 () {
|
|
|
3278
3278
|
// don't expose
|
|
3279
3279
|
});
|
|
3280
3280
|
try {
|
|
3281
|
-
const
|
|
3282
|
-
|
|
3283
|
-
const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
|
|
3284
|
-
const stackDefinition = (await client.getStackByView(this.identity));
|
|
3285
|
-
return layout_entities_1.LayoutNode.getEntity(stackDefinition, client);
|
|
3281
|
+
const layout = await this.getParentLayout();
|
|
3282
|
+
return layout.getStackByViewIdentity(this.identity);
|
|
3286
3283
|
}
|
|
3287
3284
|
catch (error) {
|
|
3288
3285
|
throw new transport_errors_1.RuntimeError({ reason: 'This view does not belong to a stack.', error });
|
|
@@ -8320,7 +8317,7 @@ var __classPrivateFieldGet$c = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
8320
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");
|
|
8321
8318
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
8322
8319
|
};
|
|
8323
|
-
var __classPrivateFieldSet$
|
|
8320
|
+
var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8324
8321
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8325
8322
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
8326
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");
|
|
@@ -8392,10 +8389,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
8392
8389
|
channelClientsByEndpointId.delete(this.endpointId);
|
|
8393
8390
|
__classPrivateFieldGet$c(this, _ChannelClient_strategy, "f").close();
|
|
8394
8391
|
});
|
|
8395
|
-
__classPrivateFieldSet$
|
|
8392
|
+
__classPrivateFieldSet$b(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
|
|
8396
8393
|
this.disconnectListener = () => undefined;
|
|
8397
8394
|
this.endpointId = routingInfo.endpointId;
|
|
8398
|
-
__classPrivateFieldSet$
|
|
8395
|
+
__classPrivateFieldSet$b(this, _ChannelClient_strategy, strategy, "f");
|
|
8399
8396
|
channelClientsByEndpointId.set(this.endpointId, this);
|
|
8400
8397
|
strategy.receive(this.processAction);
|
|
8401
8398
|
}
|
|
@@ -8522,7 +8519,7 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
|
|
|
8522
8519
|
|
|
8523
8520
|
var strategy$3 = {};
|
|
8524
8521
|
|
|
8525
|
-
var __classPrivateFieldSet$
|
|
8522
|
+
var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8526
8523
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8527
8524
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
8528
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");
|
|
@@ -8588,9 +8585,9 @@ class ClassicStrategy {
|
|
|
8588
8585
|
this.close = async () => {
|
|
8589
8586
|
this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
|
|
8590
8587
|
[...__classPrivateFieldGet$b(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
|
|
8591
|
-
__classPrivateFieldSet$
|
|
8588
|
+
__classPrivateFieldSet$a(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
|
|
8592
8589
|
};
|
|
8593
|
-
__classPrivateFieldSet$
|
|
8590
|
+
__classPrivateFieldSet$a(this, _ClassicStrategy_wire, wire, "f");
|
|
8594
8591
|
}
|
|
8595
8592
|
onEndpointDisconnect(endpointId, listener) {
|
|
8596
8593
|
// Never fires for 'classic'.
|
|
@@ -8652,7 +8649,7 @@ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
8652
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");
|
|
8653
8650
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
8654
8651
|
};
|
|
8655
|
-
var __classPrivateFieldSet$
|
|
8652
|
+
var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8656
8653
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8657
8654
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
8658
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");
|
|
@@ -8780,7 +8777,7 @@ class RTCEndpoint {
|
|
|
8780
8777
|
}
|
|
8781
8778
|
onDisconnect(listener) {
|
|
8782
8779
|
if (!__classPrivateFieldGet$a(this, _RTCEndpoint_disconnectListener, "f")) {
|
|
8783
|
-
__classPrivateFieldSet$
|
|
8780
|
+
__classPrivateFieldSet$9(this, _RTCEndpoint_disconnectListener, listener, "f");
|
|
8784
8781
|
}
|
|
8785
8782
|
else {
|
|
8786
8783
|
throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
|
|
@@ -8790,7 +8787,7 @@ class RTCEndpoint {
|
|
|
8790
8787
|
if (__classPrivateFieldGet$a(this, _RTCEndpoint_processAction, "f")) {
|
|
8791
8788
|
throw new Error('You have already set a listener for this RTC Endpoint.');
|
|
8792
8789
|
}
|
|
8793
|
-
__classPrivateFieldSet$
|
|
8790
|
+
__classPrivateFieldSet$9(this, _RTCEndpoint_processAction, listener, "f");
|
|
8794
8791
|
}
|
|
8795
8792
|
get connected() {
|
|
8796
8793
|
return this.rtc.rtcClient.connectionState === 'connected';
|
|
@@ -8806,7 +8803,7 @@ var __classPrivateFieldGet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
8806
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");
|
|
8807
8804
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
8808
8805
|
};
|
|
8809
|
-
var __classPrivateFieldSet$
|
|
8806
|
+
var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8810
8807
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
8811
8808
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
8812
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");
|
|
@@ -8829,9 +8826,9 @@ class EndpointStrategy {
|
|
|
8829
8826
|
this.close = async () => {
|
|
8830
8827
|
if (__classPrivateFieldGet$9(this, _EndpointStrategy_connected, "f")) {
|
|
8831
8828
|
__classPrivateFieldGet$9(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
|
|
8832
|
-
__classPrivateFieldSet$
|
|
8829
|
+
__classPrivateFieldSet$8(this, _EndpointStrategy_endpointMap, new Map(), "f");
|
|
8833
8830
|
}
|
|
8834
|
-
__classPrivateFieldSet$
|
|
8831
|
+
__classPrivateFieldSet$8(this, _EndpointStrategy_connected, false, "f");
|
|
8835
8832
|
};
|
|
8836
8833
|
this.isValidEndpointPayload = validateEndpoint;
|
|
8837
8834
|
}
|
|
@@ -8842,7 +8839,7 @@ class EndpointStrategy {
|
|
|
8842
8839
|
if (__classPrivateFieldGet$9(this, _EndpointStrategy_processAction, "f")) {
|
|
8843
8840
|
throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
|
|
8844
8841
|
}
|
|
8845
|
-
__classPrivateFieldSet$
|
|
8842
|
+
__classPrivateFieldSet$8(this, _EndpointStrategy_processAction, listener, "f");
|
|
8846
8843
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
8847
8844
|
__classPrivateFieldGet$9(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$9(this, _EndpointStrategy_processAction, "f")));
|
|
8848
8845
|
}
|
|
@@ -9058,7 +9055,7 @@ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
9058
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");
|
|
9059
9056
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
9060
9057
|
};
|
|
9061
|
-
var __classPrivateFieldSet$
|
|
9058
|
+
var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9062
9059
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9063
9060
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9064
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");
|
|
@@ -9131,7 +9128,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
9131
9128
|
_ChannelProvider_removeEndpoint.set(this, (identity) => {
|
|
9132
9129
|
const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
|
|
9133
9130
|
__classPrivateFieldGet$8(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
|
|
9134
|
-
__classPrivateFieldSet$
|
|
9131
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_connections, remainingConnections, "f");
|
|
9135
9132
|
});
|
|
9136
9133
|
// Must be bound.
|
|
9137
9134
|
this.processAction = async (action, payload, senderIdentity) => {
|
|
@@ -9151,11 +9148,11 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
9151
9148
|
remove();
|
|
9152
9149
|
}
|
|
9153
9150
|
});
|
|
9154
|
-
__classPrivateFieldSet$
|
|
9151
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
|
|
9155
9152
|
this.connectListener = () => undefined;
|
|
9156
9153
|
this.disconnectListener = () => undefined;
|
|
9157
|
-
__classPrivateFieldSet$
|
|
9158
|
-
__classPrivateFieldSet$
|
|
9154
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_connections, [], "f");
|
|
9155
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_strategy, strategy, "f");
|
|
9159
9156
|
strategy.receive(this.processAction);
|
|
9160
9157
|
}
|
|
9161
9158
|
/**
|
|
@@ -9294,7 +9291,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
|
9294
9291
|
async destroy() {
|
|
9295
9292
|
const protectedObj = __classPrivateFieldGet$8(this, _ChannelProvider_protectedObj, "f");
|
|
9296
9293
|
protectedObj.providerIdentity;
|
|
9297
|
-
__classPrivateFieldSet$
|
|
9294
|
+
__classPrivateFieldSet$7(this, _ChannelProvider_connections, [], "f");
|
|
9298
9295
|
await protectedObj.close();
|
|
9299
9296
|
__classPrivateFieldGet$8(this, _ChannelProvider_close, "f").call(this);
|
|
9300
9297
|
}
|
|
@@ -9578,7 +9575,7 @@ class CombinedStrategy {
|
|
|
9578
9575
|
}
|
|
9579
9576
|
strategy.default = CombinedStrategy;
|
|
9580
9577
|
|
|
9581
|
-
var __classPrivateFieldSet$
|
|
9578
|
+
var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9582
9579
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9583
9580
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9584
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");
|
|
@@ -9633,8 +9630,8 @@ class ConnectionManager extends base_1$f.Base {
|
|
|
9633
9630
|
};
|
|
9634
9631
|
this.providerMap = new Map();
|
|
9635
9632
|
this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
|
|
9636
|
-
__classPrivateFieldSet$
|
|
9637
|
-
__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");
|
|
9638
9635
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
|
9639
9636
|
}
|
|
9640
9637
|
createProvider(options, providerIdentity) {
|
|
@@ -9835,7 +9832,7 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
|
|
|
9835
9832
|
*
|
|
9836
9833
|
* @packageDocumentation
|
|
9837
9834
|
*/
|
|
9838
|
-
var __classPrivateFieldSet$
|
|
9835
|
+
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
9839
9836
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9840
9837
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
9841
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");
|
|
@@ -9902,7 +9899,7 @@ class Channel extends base_1$e.EmitterBase {
|
|
|
9902
9899
|
})
|
|
9903
9900
|
]).catch(() => new Error('error setting up channel connection listeners'));
|
|
9904
9901
|
}));
|
|
9905
|
-
__classPrivateFieldSet$
|
|
9902
|
+
__classPrivateFieldSet$5(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
|
|
9906
9903
|
}
|
|
9907
9904
|
/**
|
|
9908
9905
|
*
|
|
@@ -11045,19 +11042,23 @@ var Factory$3 = {};
|
|
|
11045
11042
|
|
|
11046
11043
|
var Instance$2 = {};
|
|
11047
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
|
+
};
|
|
11048
11051
|
var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
11049
11052
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
11050
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");
|
|
11051
11054
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11052
11055
|
};
|
|
11053
|
-
var _Platform_connectToProvider;
|
|
11056
|
+
var _Platform_channelName, _Platform_connectToProvider;
|
|
11054
11057
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
|
11055
11058
|
Instance$2.Platform = void 0;
|
|
11056
11059
|
/* eslint-disable import/prefer-default-export, no-undef */
|
|
11057
11060
|
const base_1$6 = base;
|
|
11058
11061
|
const validate_1$1 = validate;
|
|
11059
|
-
// Reuse clients to avoid overwriting already-registered client in provider
|
|
11060
|
-
const clientMap = new Map();
|
|
11061
11062
|
/** Manages the life cycle of windows and views in the application.
|
|
11062
11063
|
*
|
|
11063
11064
|
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
|
@@ -11068,34 +11069,40 @@ class Platform extends base_1$6.EmitterBase {
|
|
|
11068
11069
|
* @internal
|
|
11069
11070
|
*/
|
|
11070
11071
|
// eslint-disable-next-line no-shadow
|
|
11071
|
-
constructor(identity,
|
|
11072
|
+
constructor(wire, identity, channelName = `custom-frame-${identity.uuid}`) {
|
|
11072
11073
|
// we piggyback off of application event emitter because from the core's perspective platform is just an app.
|
|
11073
|
-
super(
|
|
11074
|
-
|
|
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
|
+
}
|
|
11075
11085
|
this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
|
|
11076
11086
|
// don't expose
|
|
11077
11087
|
});
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
|
|
11081
|
-
const clientPromise = __classPrivateFieldGet$5(this, _Platform_connectToProvider, "f").call(this, uuid);
|
|
11082
|
-
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);
|
|
11083
11091
|
}
|
|
11084
11092
|
// we set it above
|
|
11085
11093
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11086
|
-
return clientMap.get(
|
|
11094
|
+
return Platform.clientMap.get(__classPrivateFieldGet$5(this, _Platform_channelName, "f"));
|
|
11087
11095
|
};
|
|
11088
|
-
_Platform_connectToProvider.set(this, async (
|
|
11096
|
+
_Platform_connectToProvider.set(this, async () => {
|
|
11089
11097
|
try {
|
|
11090
|
-
const
|
|
11091
|
-
const client = await this._channel.connect(channelName, { wait: false });
|
|
11098
|
+
const client = await this._channel.connect(__classPrivateFieldGet$5(this, _Platform_channelName, "f"), { wait: false });
|
|
11092
11099
|
client.onDisconnection(() => {
|
|
11093
|
-
clientMap.delete(
|
|
11100
|
+
Platform.clientMap.delete(__classPrivateFieldGet$5(this, _Platform_channelName, "f"));
|
|
11094
11101
|
});
|
|
11095
11102
|
return client;
|
|
11096
11103
|
}
|
|
11097
11104
|
catch (e) {
|
|
11098
|
-
clientMap.delete(
|
|
11105
|
+
Platform.clientMap.delete(__classPrivateFieldGet$5(this, _Platform_channelName, "f"));
|
|
11099
11106
|
throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
|
|
11100
11107
|
}
|
|
11101
11108
|
});
|
|
@@ -11108,7 +11115,8 @@ class Platform extends base_1$6.EmitterBase {
|
|
|
11108
11115
|
if (errorMsg) {
|
|
11109
11116
|
throw new Error(errorMsg);
|
|
11110
11117
|
}
|
|
11111
|
-
this
|
|
11118
|
+
__classPrivateFieldSet$4(this, _Platform_channelName, channelName, "f");
|
|
11119
|
+
this._channel = this.fin.InterApplicationBus.Channel;
|
|
11112
11120
|
this.identity = { uuid: identity.uuid };
|
|
11113
11121
|
this.Layout = this.fin.Platform.Layout;
|
|
11114
11122
|
this.Application = this.fin.Application.wrapSync(this.identity);
|
|
@@ -11873,7 +11881,13 @@ class Platform extends base_1$6.EmitterBase {
|
|
|
11873
11881
|
}
|
|
11874
11882
|
}
|
|
11875
11883
|
Instance$2.Platform = Platform;
|
|
11876
|
-
_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();
|
|
11877
11891
|
|
|
11878
11892
|
var layout = {};
|
|
11879
11893
|
|
|
@@ -12274,6 +12288,17 @@ class Layout extends base_1$5.Base {
|
|
|
12274
12288
|
const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
|
|
12275
12289
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
|
12276
12290
|
}
|
|
12291
|
+
async getStackByViewIdentity(identity) {
|
|
12292
|
+
this.wire.sendAction('layout-get-stack-by-view').catch(() => {
|
|
12293
|
+
// don't expose
|
|
12294
|
+
});
|
|
12295
|
+
const client = await __classPrivateFieldGet$4(this, _Layout_layoutClient, "f").getValue();
|
|
12296
|
+
const stack = await client.getStackByView(identity);
|
|
12297
|
+
if (!stack) {
|
|
12298
|
+
throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
|
|
12299
|
+
}
|
|
12300
|
+
return layout_entities_1.LayoutNode.getEntity(stack, client);
|
|
12301
|
+
}
|
|
12277
12302
|
}
|
|
12278
12303
|
Instance$1.Layout = Layout;
|
|
12279
12304
|
_Layout_layoutClient = new WeakMap();
|
|
@@ -12467,7 +12492,7 @@ class LayoutModule extends base_1$4.Base {
|
|
|
12467
12492
|
this.wire.sendAction('layout-get-current').catch((e) => {
|
|
12468
12493
|
// don't expose
|
|
12469
12494
|
});
|
|
12470
|
-
if (!this.fin.me.isWindow) {
|
|
12495
|
+
if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
|
|
12471
12496
|
throw new Error('You are not in a Window context. Only Windows can have a Layout.');
|
|
12472
12497
|
}
|
|
12473
12498
|
const { uuid, name } = this.fin.me;
|
|
@@ -12490,7 +12515,7 @@ class LayoutModule extends base_1$4.Base {
|
|
|
12490
12515
|
this.wire.sendAction('layout-get-current-sync').catch((e) => {
|
|
12491
12516
|
// don't expose
|
|
12492
12517
|
});
|
|
12493
|
-
if (!this.fin.me.isWindow) {
|
|
12518
|
+
if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
|
|
12494
12519
|
throw new Error('You are not in a Window context. Only Windows can have a Layout.');
|
|
12495
12520
|
}
|
|
12496
12521
|
const { uuid, name } = this.fin.me;
|
|
@@ -12632,7 +12657,7 @@ class PlatformModule extends base_1$3.Base {
|
|
|
12632
12657
|
this.wire.sendAction('platform-wrap').catch((e) => {
|
|
12633
12658
|
// don't expose
|
|
12634
12659
|
});
|
|
12635
|
-
return new Instance_1$1.Platform({ uuid: identity.uuid }
|
|
12660
|
+
return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
|
|
12636
12661
|
}
|
|
12637
12662
|
/**
|
|
12638
12663
|
* Synchronously returns a Platform object that represents an existing platform.
|
|
@@ -12649,7 +12674,7 @@ class PlatformModule extends base_1$3.Base {
|
|
|
12649
12674
|
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
|
12650
12675
|
// don't expose
|
|
12651
12676
|
});
|
|
12652
|
-
return new Instance_1$1.Platform({ uuid: identity.uuid }
|
|
12677
|
+
return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
|
|
12653
12678
|
}
|
|
12654
12679
|
/**
|
|
12655
12680
|
* Asynchronously returns a Platform object that represents the current platform.
|