@openfin/remote-adapter 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.
@@ -49,7 +49,7 @@ async function promiseMapSerial(arr, func) {
49
49
  }
50
50
  promises.promiseMapSerial = promiseMapSerial;
51
51
 
52
- var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
52
+ var __classPrivateFieldSet$d = (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");
@@ -178,7 +178,7 @@ class EmitterBase extends Base {
178
178
  // This will only be reached if unsubscribe from event that does not exist but do not want to error here
179
179
  return Promise.resolve();
180
180
  };
181
- __classPrivateFieldSet$c(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
181
+ __classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
182
182
  this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
183
183
  }
184
184
  /**
@@ -432,7 +432,7 @@ var utils$3 = {};
432
432
  exports.wrapIntentHandler = wrapIntentHandler;
433
433
  } (utils$3));
434
434
 
435
- var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
435
+ var __classPrivateFieldSet$c = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
436
436
  if (kind === "m") throw new TypeError("Private method is not writable");
437
437
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
438
438
  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");
@@ -452,7 +452,7 @@ class SessionContextGroupClient extends base_1$j.Base {
452
452
  super(wire);
453
453
  _SessionContextGroupClient_clientPromise.set(this, void 0);
454
454
  this.id = id;
455
- __classPrivateFieldSet$b(this, _SessionContextGroupClient_clientPromise, client, "f");
455
+ __classPrivateFieldSet$c(this, _SessionContextGroupClient_clientPromise, client, "f");
456
456
  }
457
457
  /**
458
458
  * Sets a context for the session context group.
@@ -5116,7 +5116,7 @@ const createRelayedDispatch = (client, target, relayId, relayErrorMsg) => async
5116
5116
  };
5117
5117
  channelApiRelay.createRelayedDispatch = createRelayedDispatch;
5118
5118
 
5119
- var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
5119
+ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
5120
5120
  if (kind === "m") throw new TypeError("Private method is not writable");
5121
5121
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5122
5122
  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");
@@ -5310,7 +5310,7 @@ class LayoutNode {
5310
5310
  entityId: stack.entityId
5311
5311
  }, __classPrivateFieldGet$c(this, _LayoutNode_client, "f")));
5312
5312
  };
5313
- __classPrivateFieldSet$a(this, _LayoutNode_client, client, "f");
5313
+ __classPrivateFieldSet$b(this, _LayoutNode_client, client, "f");
5314
5314
  this.entityId = entityId;
5315
5315
  }
5316
5316
  }
@@ -5469,7 +5469,7 @@ class TabStack extends LayoutNode {
5469
5469
  this.setActiveView = async (view) => {
5470
5470
  await __classPrivateFieldGet$c(this, _TabStack_client, "f").setStackActiveView(this.entityId, view);
5471
5471
  };
5472
- __classPrivateFieldSet$a(this, _TabStack_client, client, "f");
5472
+ __classPrivateFieldSet$b(this, _TabStack_client, client, "f");
5473
5473
  }
5474
5474
  }
5475
5475
  layoutEntities.TabStack = TabStack;
@@ -5511,7 +5511,7 @@ class ColumnOrRow extends LayoutNode {
5511
5511
  const contentItemEntities = await __classPrivateFieldGet$c(this, _ColumnOrRow_client, "f").getContent(this.entityId);
5512
5512
  return contentItemEntities.map((entity) => LayoutNode.getEntity(entity, __classPrivateFieldGet$c(this, _ColumnOrRow_client, "f")));
5513
5513
  };
5514
- __classPrivateFieldSet$a(this, _ColumnOrRow_client, client, "f");
5514
+ __classPrivateFieldSet$b(this, _ColumnOrRow_client, client, "f");
5515
5515
  this.type = type;
5516
5516
  }
5517
5517
  }
@@ -9712,11 +9712,8 @@ function requireInstance () {
9712
9712
  // don't expose
9713
9713
  });
9714
9714
  try {
9715
- const layoutWindow = await this.getCurrentWindow();
9716
- const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
9717
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
9718
- const stackDefinition = (await client.getStackByView(this.identity));
9719
- return layout_entities_1.LayoutNode.getEntity(stackDefinition, client);
9715
+ const layout = await this.getParentLayout();
9716
+ return layout.getStackByViewIdentity(this.identity);
9720
9717
  }
9721
9718
  catch (error) {
9722
9719
  throw new transport_errors_1.RuntimeError({ reason: 'This view does not belong to a stack.', error });
@@ -10326,7 +10323,7 @@ function errorToPOJO(error) {
10326
10323
  }
10327
10324
  errors.errorToPOJO = errorToPOJO;
10328
10325
 
10329
- var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10326
+ var __classPrivateFieldSet$a = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
10330
10327
  if (kind === "m") throw new TypeError("Private method is not writable");
10331
10328
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
10332
10329
  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");
@@ -10368,7 +10365,7 @@ class Transport extends events_1$5.EventEmitter {
10368
10365
  const wire = __classPrivateFieldGet$b(this, _Transport_wire, "f");
10369
10366
  return wire.getPort();
10370
10367
  };
10371
- __classPrivateFieldSet$9(this, _Transport_wire, new WireType(this.onmessage.bind(this)), "f");
10368
+ __classPrivateFieldSet$a(this, _Transport_wire, new WireType(this.onmessage.bind(this)), "f");
10372
10369
  this.environment = environment;
10373
10370
  this.sendRaw = __classPrivateFieldGet$b(this, _Transport_wire, "f").send.bind(__classPrivateFieldGet$b(this, _Transport_wire, "f"));
10374
10371
  this.registerMessageHandler(this.handleMessage.bind(this));
@@ -10393,7 +10390,7 @@ class Transport extends events_1$5.EventEmitter {
10393
10390
  if (__classPrivateFieldGet$b(this, _Transport_fin, "f")) {
10394
10391
  throw new Error('Fin object has already been registered for this transport');
10395
10392
  }
10396
- __classPrivateFieldSet$9(this, _Transport_fin, _fin, "f");
10393
+ __classPrivateFieldSet$a(this, _Transport_fin, _fin, "f");
10397
10394
  }
10398
10395
  shutdown() {
10399
10396
  const wire = __classPrivateFieldGet$b(this, _Transport_wire, "f");
@@ -12921,7 +12918,7 @@ var __classPrivateFieldGet$a = (commonjsGlobal && commonjsGlobal.__classPrivateF
12921
12918
  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");
12922
12919
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12923
12920
  };
12924
- var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12921
+ var __classPrivateFieldSet$9 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12925
12922
  if (kind === "m") throw new TypeError("Private method is not writable");
12926
12923
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12927
12924
  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");
@@ -12993,10 +12990,10 @@ class ChannelClient extends channel_1$1.ChannelBase {
12993
12990
  channelClientsByEndpointId.delete(this.endpointId);
12994
12991
  __classPrivateFieldGet$a(this, _ChannelClient_strategy, "f").close();
12995
12992
  });
12996
- __classPrivateFieldSet$8(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
12993
+ __classPrivateFieldSet$9(this, _ChannelClient_protectedObj, new channel_1$1.ProtectedItems(routingInfo, close), "f");
12997
12994
  this.disconnectListener = () => undefined;
12998
12995
  this.endpointId = routingInfo.endpointId;
12999
- __classPrivateFieldSet$8(this, _ChannelClient_strategy, strategy, "f");
12996
+ __classPrivateFieldSet$9(this, _ChannelClient_strategy, strategy, "f");
13000
12997
  channelClientsByEndpointId.set(this.endpointId, this);
13001
12998
  strategy.receive(this.processAction);
13002
12999
  }
@@ -13123,7 +13120,7 @@ exhaustive.exhaustiveCheck = exhaustiveCheck;
13123
13120
 
13124
13121
  var strategy$3 = {};
13125
13122
 
13126
- var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13123
+ var __classPrivateFieldSet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13127
13124
  if (kind === "m") throw new TypeError("Private method is not writable");
13128
13125
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13129
13126
  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");
@@ -13189,9 +13186,9 @@ class ClassicStrategy {
13189
13186
  this.close = async () => {
13190
13187
  this.messageReceiver.removeEndpoint(this.providerIdentity.channelId, this.endpointId);
13191
13188
  [...__classPrivateFieldGet$9(this, _ClassicStrategy_endpointIdentityMap, "f").keys()].forEach((id) => this.closeEndpoint(id));
13192
- __classPrivateFieldSet$7(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
13189
+ __classPrivateFieldSet$8(this, _ClassicStrategy_endpointIdentityMap, new Map(), "f");
13193
13190
  };
13194
- __classPrivateFieldSet$7(this, _ClassicStrategy_wire, wire, "f");
13191
+ __classPrivateFieldSet$8(this, _ClassicStrategy_wire, wire, "f");
13195
13192
  }
13196
13193
  onEndpointDisconnect(endpointId, listener) {
13197
13194
  // Never fires for 'classic'.
@@ -13234,7 +13231,7 @@ var __classPrivateFieldGet$8 = (commonjsGlobal && commonjsGlobal.__classPrivateF
13234
13231
  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");
13235
13232
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13236
13233
  };
13237
- var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13234
+ var __classPrivateFieldSet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13238
13235
  if (kind === "m") throw new TypeError("Private method is not writable");
13239
13236
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13240
13237
  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");
@@ -13362,7 +13359,7 @@ class RTCEndpoint {
13362
13359
  }
13363
13360
  onDisconnect(listener) {
13364
13361
  if (!__classPrivateFieldGet$8(this, _RTCEndpoint_disconnectListener, "f")) {
13365
- __classPrivateFieldSet$6(this, _RTCEndpoint_disconnectListener, listener, "f");
13362
+ __classPrivateFieldSet$7(this, _RTCEndpoint_disconnectListener, listener, "f");
13366
13363
  }
13367
13364
  else {
13368
13365
  throw new Error('RTCEndpoint disconnectListener cannot be set twice.');
@@ -13372,7 +13369,7 @@ class RTCEndpoint {
13372
13369
  if (__classPrivateFieldGet$8(this, _RTCEndpoint_processAction, "f")) {
13373
13370
  throw new Error('You have already set a listener for this RTC Endpoint.');
13374
13371
  }
13375
- __classPrivateFieldSet$6(this, _RTCEndpoint_processAction, listener, "f");
13372
+ __classPrivateFieldSet$7(this, _RTCEndpoint_processAction, listener, "f");
13376
13373
  }
13377
13374
  get connected() {
13378
13375
  return this.rtc.rtcClient.connectionState === 'connected';
@@ -13388,7 +13385,7 @@ var __classPrivateFieldGet$7 = (commonjsGlobal && commonjsGlobal.__classPrivateF
13388
13385
  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");
13389
13386
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13390
13387
  };
13391
- var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13388
+ var __classPrivateFieldSet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13392
13389
  if (kind === "m") throw new TypeError("Private method is not writable");
13393
13390
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13394
13391
  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");
@@ -13411,9 +13408,9 @@ class EndpointStrategy {
13411
13408
  this.close = async () => {
13412
13409
  if (__classPrivateFieldGet$7(this, _EndpointStrategy_connected, "f")) {
13413
13410
  __classPrivateFieldGet$7(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.close());
13414
- __classPrivateFieldSet$5(this, _EndpointStrategy_endpointMap, new Map(), "f");
13411
+ __classPrivateFieldSet$6(this, _EndpointStrategy_endpointMap, new Map(), "f");
13415
13412
  }
13416
- __classPrivateFieldSet$5(this, _EndpointStrategy_connected, false, "f");
13413
+ __classPrivateFieldSet$6(this, _EndpointStrategy_connected, false, "f");
13417
13414
  };
13418
13415
  this.isValidEndpointPayload = validateEndpoint;
13419
13416
  }
@@ -13424,7 +13421,7 @@ class EndpointStrategy {
13424
13421
  if (__classPrivateFieldGet$7(this, _EndpointStrategy_processAction, "f")) {
13425
13422
  throw new Error(`You have already set a listener for this ${this.StrategyName} Strategy`);
13426
13423
  }
13427
- __classPrivateFieldSet$5(this, _EndpointStrategy_processAction, listener, "f");
13424
+ __classPrivateFieldSet$6(this, _EndpointStrategy_processAction, listener, "f");
13428
13425
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
13429
13426
  __classPrivateFieldGet$7(this, _EndpointStrategy_endpointMap, "f").forEach((endpoint) => endpoint.receive(__classPrivateFieldGet$7(this, _EndpointStrategy_processAction, "f")));
13430
13427
  }
@@ -13640,7 +13637,7 @@ var __classPrivateFieldGet$6 = (commonjsGlobal && commonjsGlobal.__classPrivateF
13640
13637
  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");
13641
13638
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
13642
13639
  };
13643
- var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13640
+ var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
13644
13641
  if (kind === "m") throw new TypeError("Private method is not writable");
13645
13642
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
13646
13643
  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");
@@ -13713,7 +13710,7 @@ class ChannelProvider extends channel_1.ChannelBase {
13713
13710
  _ChannelProvider_removeEndpoint.set(this, (identity) => {
13714
13711
  const remainingConnections = this.connections.filter((clientIdentity) => clientIdentity.endpointId !== identity.endpointId);
13715
13712
  __classPrivateFieldGet$6(this, _ChannelProvider_strategy, "f").closeEndpoint(identity.endpointId);
13716
- __classPrivateFieldSet$4(this, _ChannelProvider_connections, remainingConnections, "f");
13713
+ __classPrivateFieldSet$5(this, _ChannelProvider_connections, remainingConnections, "f");
13717
13714
  });
13718
13715
  // Must be bound.
13719
13716
  this.processAction = async (action, payload, senderIdentity) => {
@@ -13733,11 +13730,11 @@ class ChannelProvider extends channel_1.ChannelBase {
13733
13730
  remove();
13734
13731
  }
13735
13732
  });
13736
- __classPrivateFieldSet$4(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
13733
+ __classPrivateFieldSet$5(this, _ChannelProvider_protectedObj, new channel_1.ProtectedItems(providerIdentity, close), "f");
13737
13734
  this.connectListener = () => undefined;
13738
13735
  this.disconnectListener = () => undefined;
13739
- __classPrivateFieldSet$4(this, _ChannelProvider_connections, [], "f");
13740
- __classPrivateFieldSet$4(this, _ChannelProvider_strategy, strategy, "f");
13736
+ __classPrivateFieldSet$5(this, _ChannelProvider_connections, [], "f");
13737
+ __classPrivateFieldSet$5(this, _ChannelProvider_strategy, strategy, "f");
13741
13738
  strategy.receive(this.processAction);
13742
13739
  }
13743
13740
  /**
@@ -13876,7 +13873,7 @@ class ChannelProvider extends channel_1.ChannelBase {
13876
13873
  async destroy() {
13877
13874
  const protectedObj = __classPrivateFieldGet$6(this, _ChannelProvider_protectedObj, "f");
13878
13875
  protectedObj.providerIdentity;
13879
- __classPrivateFieldSet$4(this, _ChannelProvider_connections, [], "f");
13876
+ __classPrivateFieldSet$5(this, _ChannelProvider_connections, [], "f");
13880
13877
  await protectedObj.close();
13881
13878
  __classPrivateFieldGet$6(this, _ChannelProvider_close, "f").call(this);
13882
13879
  }
@@ -14160,7 +14157,7 @@ class CombinedStrategy {
14160
14157
  }
14161
14158
  strategy.default = CombinedStrategy;
14162
14159
 
14163
- var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14160
+ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14164
14161
  if (kind === "m") throw new TypeError("Private method is not writable");
14165
14162
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14166
14163
  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");
@@ -14215,8 +14212,8 @@ class ConnectionManager extends base_1$a.Base {
14215
14212
  };
14216
14213
  this.providerMap = new Map();
14217
14214
  this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
14218
- __classPrivateFieldSet$3(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
14219
- __classPrivateFieldSet$3(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
14215
+ __classPrivateFieldSet$4(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
14216
+ __classPrivateFieldSet$4(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
14220
14217
  wire.registerMessageHandler(this.onmessage.bind(this));
14221
14218
  }
14222
14219
  createProvider(options, providerIdentity) {
@@ -14417,7 +14414,7 @@ _ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnec
14417
14414
  *
14418
14415
  * @packageDocumentation
14419
14416
  */
14420
- var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14417
+ var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
14421
14418
  if (kind === "m") throw new TypeError("Private method is not writable");
14422
14419
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14423
14420
  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");
@@ -14484,7 +14481,7 @@ class Channel extends base_1$9.EmitterBase {
14484
14481
  })
14485
14482
  ]).catch(() => new Error('error setting up channel connection listeners'));
14486
14483
  }));
14487
- __classPrivateFieldSet$2(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
14484
+ __classPrivateFieldSet$3(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
14488
14485
  }
14489
14486
  /**
14490
14487
  *
@@ -15302,19 +15299,23 @@ var Factory$2 = {};
15302
15299
 
15303
15300
  var Instance$2 = {};
15304
15301
 
15302
+ var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
15303
+ if (kind === "m") throw new TypeError("Private method is not writable");
15304
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
15305
+ 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");
15306
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
15307
+ };
15305
15308
  var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
15306
15309
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
15307
15310
  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
15311
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
15309
15312
  };
15310
- var _Platform_connectToProvider;
15313
+ var _Platform_channelName, _Platform_connectToProvider;
15311
15314
  Object.defineProperty(Instance$2, "__esModule", { value: true });
15312
15315
  Instance$2.Platform = void 0;
15313
15316
  /* eslint-disable import/prefer-default-export, no-undef */
15314
15317
  const base_1$5 = base;
15315
15318
  const validate_1$1 = validate;
15316
- // Reuse clients to avoid overwriting already-registered client in provider
15317
- const clientMap = new Map();
15318
15319
  /** Manages the life cycle of windows and views in the application.
15319
15320
  *
15320
15321
  * Enables taking snapshots of itself and applying them to restore a previous configuration
@@ -15325,34 +15326,40 @@ class Platform extends base_1$5.EmitterBase {
15325
15326
  * @internal
15326
15327
  */
15327
15328
  // eslint-disable-next-line no-shadow
15328
- constructor(identity, channel) {
15329
+ constructor(wire, identity, channelName = `custom-frame-${identity.uuid}`) {
15329
15330
  // we piggyback off of application event emitter because from the core's perspective platform is just an app.
15330
- super(channel.wire, 'application', identity.uuid);
15331
- this.getClient = (identity) => {
15331
+ super(wire, 'application', identity.uuid);
15332
+ /**
15333
+ * @internal
15334
+ */
15335
+ _Platform_channelName.set(this, void 0);
15336
+ this.getClient = (identity = this.identity) => {
15337
+ if (identity.uuid !== this.identity.uuid) {
15338
+ // I have no idea why we allow passing in a different identity, but we do.
15339
+ // Doing this above the analytics call so we only register one call.
15340
+ return new Platform(this.wire, identity).getClient();
15341
+ }
15332
15342
  this.wire.sendAction('platform-get-client', this.identity).catch((e) => {
15333
15343
  // don't expose
15334
15344
  });
15335
- const target = identity || this.identity;
15336
- const { uuid } = target;
15337
- if (!clientMap.has(uuid)) {
15338
- const clientPromise = __classPrivateFieldGet$3(this, _Platform_connectToProvider, "f").call(this, uuid);
15339
- clientMap.set(uuid, clientPromise);
15345
+ if (!Platform.clientMap.has(__classPrivateFieldGet$3(this, _Platform_channelName, "f"))) {
15346
+ const clientPromise = __classPrivateFieldGet$3(this, _Platform_connectToProvider, "f").call(this);
15347
+ Platform.clientMap.set(__classPrivateFieldGet$3(this, _Platform_channelName, "f"), clientPromise);
15340
15348
  }
15341
15349
  // we set it above
15342
15350
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15343
- return clientMap.get(uuid);
15351
+ return Platform.clientMap.get(__classPrivateFieldGet$3(this, _Platform_channelName, "f"));
15344
15352
  };
15345
- _Platform_connectToProvider.set(this, async (uuid) => {
15353
+ _Platform_connectToProvider.set(this, async () => {
15346
15354
  try {
15347
- const channelName = `custom-frame-${uuid}`;
15348
- const client = await this._channel.connect(channelName, { wait: false });
15355
+ const client = await this._channel.connect(__classPrivateFieldGet$3(this, _Platform_channelName, "f"), { wait: false });
15349
15356
  client.onDisconnection(() => {
15350
- clientMap.delete(uuid);
15357
+ Platform.clientMap.delete(__classPrivateFieldGet$3(this, _Platform_channelName, "f"));
15351
15358
  });
15352
15359
  return client;
15353
15360
  }
15354
15361
  catch (e) {
15355
- clientMap.delete(uuid);
15362
+ Platform.clientMap.delete(__classPrivateFieldGet$3(this, _Platform_channelName, "f"));
15356
15363
  throw new Error('The targeted Platform is not currently running. Listen for application-started event for the given Uuid.');
15357
15364
  }
15358
15365
  });
@@ -15365,7 +15372,8 @@ class Platform extends base_1$5.EmitterBase {
15365
15372
  if (errorMsg) {
15366
15373
  throw new Error(errorMsg);
15367
15374
  }
15368
- this._channel = channel;
15375
+ __classPrivateFieldSet$2(this, _Platform_channelName, channelName, "f");
15376
+ this._channel = this.fin.InterApplicationBus.Channel;
15369
15377
  this.identity = { uuid: identity.uuid };
15370
15378
  this.Layout = this.fin.Platform.Layout;
15371
15379
  this.Application = this.fin.Application.wrapSync(this.identity);
@@ -16130,7 +16138,13 @@ class Platform extends base_1$5.EmitterBase {
16130
16138
  }
16131
16139
  }
16132
16140
  Instance$2.Platform = Platform;
16133
- _Platform_connectToProvider = new WeakMap();
16141
+ _Platform_channelName = new WeakMap(), _Platform_connectToProvider = new WeakMap();
16142
+ /**
16143
+ * @internal
16144
+ * Reuse clients to avoid overwriting already-registered client in provider
16145
+ * This ensures that only channel client is created per channel name per `fin` instance
16146
+ */
16147
+ Platform.clientMap = new Map();
16134
16148
 
16135
16149
  var layout = {};
16136
16150
 
@@ -16509,6 +16523,17 @@ class Layout extends base_1$4.Base {
16509
16523
  const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
16510
16524
  return layout_entities_1.LayoutNode.getEntity(root, client);
16511
16525
  }
16526
+ async getStackByViewIdentity(identity) {
16527
+ this.wire.sendAction('layout-get-stack-by-view').catch(() => {
16528
+ // don't expose
16529
+ });
16530
+ const client = await __classPrivateFieldGet$2(this, _Layout_layoutClient, "f").getValue();
16531
+ const stack = await client.getStackByView(identity);
16532
+ if (!stack) {
16533
+ throw new Error(`No stack found for view: ${identity.uuid}/${identity.name}`);
16534
+ }
16535
+ return layout_entities_1.LayoutNode.getEntity(stack, client);
16536
+ }
16512
16537
  }
16513
16538
  Instance$1.Layout = Layout;
16514
16539
  _Layout_layoutClient = new WeakMap();
@@ -16702,7 +16727,7 @@ class LayoutModule extends base_1$3.Base {
16702
16727
  this.wire.sendAction('layout-get-current').catch((e) => {
16703
16728
  // don't expose
16704
16729
  });
16705
- if (!this.fin.me.isWindow) {
16730
+ if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
16706
16731
  throw new Error('You are not in a Window context. Only Windows can have a Layout.');
16707
16732
  }
16708
16733
  const { uuid, name } = this.fin.me;
@@ -16725,7 +16750,7 @@ class LayoutModule extends base_1$3.Base {
16725
16750
  this.wire.sendAction('layout-get-current-sync').catch((e) => {
16726
16751
  // don't expose
16727
16752
  });
16728
- if (!this.fin.me.isWindow) {
16753
+ if (this.wire.environment.type === 'openfin' && !this.fin.me.isWindow) {
16729
16754
  throw new Error('You are not in a Window context. Only Windows can have a Layout.');
16730
16755
  }
16731
16756
  const { uuid, name } = this.fin.me;
@@ -16867,7 +16892,7 @@ class PlatformModule extends base_1$2.Base {
16867
16892
  this.wire.sendAction('platform-wrap').catch((e) => {
16868
16893
  // don't expose
16869
16894
  });
16870
- return new Instance_1$1.Platform({ uuid: identity.uuid }, this._channel);
16895
+ return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
16871
16896
  }
16872
16897
  /**
16873
16898
  * Synchronously returns a Platform object that represents an existing platform.
@@ -16884,7 +16909,7 @@ class PlatformModule extends base_1$2.Base {
16884
16909
  this.wire.sendAction('platform-wrap-sync').catch((e) => {
16885
16910
  // don't expose
16886
16911
  });
16887
- return new Instance_1$1.Platform({ uuid: identity.uuid }, this._channel);
16912
+ return new Instance_1$1.Platform(this.wire, { uuid: identity.uuid });
16888
16913
  }
16889
16914
  /**
16890
16915
  * Asynchronously returns a Platform object that represents the current platform.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/remote-adapter",
3
- "version": "40.82.16",
3
+ "version": "40.82.19",
4
4
  "description": "Establish intermachine runtime connections using webRTC.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "private": false,
@@ -19,6 +19,6 @@
19
19
  "author": "OpenFin",
20
20
  "dependencies": {
21
21
  "lodash": "^4.17.21",
22
- "@openfin/core": "40.82.16"
22
+ "@openfin/core": "40.82.19"
23
23
  }
24
24
  }