@openfin/core 29.73.10 → 29.73.12

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/OpenFin.d.ts CHANGED
@@ -134,6 +134,7 @@ declare namespace OpenFin {
134
134
  | 'alwaysOnTop'
135
135
  | 'api'
136
136
  | 'aspectRatio'
137
+ | 'autoplayPolicy'
137
138
  | 'autoShow'
138
139
  | 'backgroundColor'
139
140
  | 'contentNavigation'
@@ -273,10 +274,16 @@ declare namespace OpenFin {
273
274
 
274
275
  export type WindowState = 'maximized' | 'minimized' | 'normal';
275
276
 
277
+ export type AutoplayPolicyOptions =
278
+ | 'no-user-gesture-required'
279
+ | 'user-gesture-required'
280
+ | 'document-user-activation-required';
281
+
276
282
  export type ConstWindowOptions = {
277
283
  accelerator: Partial<Accelerator>;
278
284
  api: Api;
279
285
  applicationIcon: string;
286
+ autoplayPolicy: AutoplayPolicyOptions;
280
287
  autoShow: boolean;
281
288
  backgroundColor: string;
282
289
  contentCreation: ContentCreationOptions;
@@ -528,6 +535,7 @@ declare namespace OpenFin {
528
535
  fdc3InteropApi?: string;
529
536
  enableBeforeUnload: boolean;
530
537
  accelerator?: Partial<OpenFin.Accelerator>;
538
+ autoplayPolicy: AutoplayPolicyOptions;
531
539
  };
532
540
 
533
541
  export type ViewState = ViewCreationOptions & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "29.73.10",
3
+ "version": "29.73.12",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./src/mock.js",
6
6
  "types": "./src/mock.d.ts",
@@ -11,12 +11,13 @@ export default class ChannelClient extends ChannelBase {
11
11
  private disconnectListener;
12
12
  private endpointId;
13
13
  static closeChannelByEndpointId(id: string): void;
14
- static handleProviderDisconnect(channel: ChannelClient, eventPayload: ProviderIdentity): void;
14
+ static handleProviderDisconnect(eventPayload: ProviderIdentity): void;
15
15
  constructor(routingInfo: RoutingInfo, wire: Transport, strategy: AnyStrategy);
16
16
  protected processAction: (action: string, payload: any, senderIdentity: ProviderIdentity | OpenFin.ClientIdentity) => Promise<any>;
17
17
  get providerIdentity(): ProviderIdentity;
18
18
  dispatch(action: string, payload?: any): Promise<any>;
19
19
  onDisconnection(listener: DisconnectionListener): void;
20
20
  disconnect(): Promise<void>;
21
+ sendDisconnectAction(): Promise<void>;
21
22
  }
22
23
  export {};
@@ -38,10 +38,14 @@ class ChannelClient extends channel_1.ChannelBase {
38
38
  __classPrivateFieldGet(channel, _ChannelClient_close, "f").call(channel);
39
39
  }
40
40
  }
41
- // closes the channel and invokes the disconnect listener if an event payload is passed.
42
- static handleProviderDisconnect(channel, eventPayload) {
43
- channel.disconnectListener(eventPayload);
44
- __classPrivateFieldGet(channel, _ChannelClient_close, "f").call(channel);
41
+ // closes the corresponding channel and invokes the disconnect listener if an event payload is passed.
42
+ static handleProviderDisconnect(eventPayload) {
43
+ for (const channelClient of channelClientsByEndpointId.values()) {
44
+ if (channelClient.providerIdentity.channelId === eventPayload.channelId) {
45
+ channelClient.disconnectListener(eventPayload);
46
+ __classPrivateFieldGet(channelClient, _ChannelClient_close, "f").call(channelClient);
47
+ }
48
+ }
45
49
  }
46
50
  get providerIdentity() {
47
51
  const protectedObj = __classPrivateFieldGet(this, _ChannelClient_protectedObj, "f");
@@ -67,6 +71,10 @@ class ChannelClient extends channel_1.ChannelBase {
67
71
  };
68
72
  }
69
73
  async disconnect() {
74
+ await this.sendDisconnectAction();
75
+ __classPrivateFieldGet(this, _ChannelClient_close, "f").call(this);
76
+ }
77
+ async sendDisconnectAction() {
70
78
  const protectedObj = __classPrivateFieldGet(this, _ChannelClient_protectedObj, "f");
71
79
  const { channelName, uuid, name } = protectedObj.providerIdentity;
72
80
  await protectedObj.wire.sendAction('disconnect-from-channel', {
@@ -75,7 +83,6 @@ class ChannelClient extends channel_1.ChannelBase {
75
83
  name,
76
84
  endpointId: this.endpointId
77
85
  });
78
- __classPrivateFieldGet(this, _ChannelClient_close, "f").call(this);
79
86
  }
80
87
  }
81
88
  exports.default = ChannelClient;
@@ -25,6 +25,9 @@ class Channel extends base_1.EmitterBase {
25
25
  super(wire, 'channel');
26
26
  _Channel_connectionManager.set(this, void 0);
27
27
  __classPrivateFieldSet(this, _Channel_connectionManager, new connection_manager_1.ConnectionManager(wire), "f");
28
+ this.on('disconnected', (eventPayload) => {
29
+ client_1.default.handleProviderDisconnect(eventPayload);
30
+ }).catch((e) => console.error('Error setting up a disconnected listener:', e));
28
31
  }
29
32
  async getAllChannels() {
30
33
  return this.wire.sendAction('get-all-channels').then(({ payload }) => payload.data);
@@ -82,18 +85,13 @@ class Channel extends base_1.EmitterBase {
82
85
  // The provider does not care about endpoint disconnection.
83
86
  strategy.onEndpointDisconnect(routingInfo.channelId, async () => {
84
87
  try {
85
- await channel.disconnect();
88
+ await channel.sendDisconnectAction();
86
89
  }
87
90
  catch (error) {
88
91
  console.warn(`Something went wrong during disconnect for client with uuid: ${routingInfo.uuid} / name: ${routingInfo.name} / endpointId: ${routingInfo.endpointId}.`);
89
92
  }
90
93
  finally {
91
- client_1.default.handleProviderDisconnect(channel, routingInfo);
92
- }
93
- });
94
- this.on('disconnected', (eventPayload) => {
95
- if (eventPayload.channelName === channelName) {
96
- client_1.default.handleProviderDisconnect(channel, eventPayload);
94
+ client_1.default.handleProviderDisconnect(routingInfo);
97
95
  }
98
96
  });
99
97
  return channel;
@@ -19,7 +19,6 @@ export default class InteropModule extends Base {
19
19
  * @param { OverrideCallback<InteropBroker> } [override] - A callback function that can be used to extend or replace default Interop Broker behavior.
20
20
  * @return {Promise.<InteropBroker>}
21
21
  * @tutorial Interop.init
22
- * @experimental
23
22
  * @static
24
23
  */
25
24
  init(name: string, override?: OpenFin.OverrideCallback<InteropBroker>): Promise<InteropBroker>;
@@ -30,7 +29,6 @@ export default class InteropModule extends Base {
30
29
  * what context(s) the entity wants to subscribe to, and the current Context Group of the entity.
31
30
  * @return {InteropClient}
32
31
  * @tutorial Interop.connectSync
33
- * @experimental
34
32
  * @static
35
33
  */
36
34
  connectSync(name: string, interopConfig?: OpenFin.InteropConfig): InteropClient;
@@ -26,7 +26,6 @@ class InteropModule extends base_1.Base {
26
26
  * @param { OverrideCallback<InteropBroker> } [override] - A callback function that can be used to extend or replace default Interop Broker behavior.
27
27
  * @return {Promise.<InteropBroker>}
28
28
  * @tutorial Interop.init
29
- * @experimental
30
29
  * @static
31
30
  */
32
31
  async init(name, override = defaultOverride) {
@@ -63,7 +62,6 @@ class InteropModule extends base_1.Base {
63
62
  * what context(s) the entity wants to subscribe to, and the current Context Group of the entity.
64
63
  * @return {InteropClient}
65
64
  * @tutorial Interop.connectSync
66
- * @experimental
67
65
  * @static
68
66
  */
69
67
  connectSync(name, interopConfig) {
@@ -4,7 +4,7 @@ import { Base } from '../base';
4
4
  import type Transport from '../../transport/transport';
5
5
  declare type Identity = OpenFin.Identity;
6
6
  /**
7
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking **THE INTEROP API IS EXPERIMENTAL. IF YOU WOULD LIKE TO USE IT, PLEASE USE OUR DEFAULT IMPLEMENTATION IN BROWSER**}
7
+ * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
8
8
  *
9
9
  * The Interop Broker is responsible for keeping track of the Interop state of the Platform, and for directing messages to the proper locations.
10
10
  *
@@ -181,7 +181,6 @@ export declare class InteropBroker extends Base {
181
181
  * @param { SetContextOptions } setContextOptions - New context to set.
182
182
  * @param { ClientIdentity } clientIdentity - Identity of the client sender.
183
183
  * @return { void }
184
- * @experimental
185
184
  */
186
185
  setContext({ context }: {
187
186
  context: OpenFin.Context;
@@ -203,7 +202,6 @@ export declare class InteropBroker extends Base {
203
202
  * @return { Promise<void> }
204
203
  * @param { JoinContextGroupOptions } joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
205
204
  * @param { ClientIdentity } senderIdentity - Identity of the client sender.
206
- * @experimental
207
205
  */
208
206
  joinContextGroup({ contextGroupId, target }: {
209
207
  contextGroupId: string;
@@ -215,7 +213,6 @@ export declare class InteropBroker extends Base {
215
213
  * @return { Promise<void> }
216
214
  * @param { AddClientToContextGroupOptions } addClientToContextGroupOptions - Contains the contextGroupId
217
215
  * @param { ClientIdentity } clientIdentity - Identity of the client sender.
218
- * @experimental
219
216
  */
220
217
  addClientToContextGroup({ contextGroupId }: {
221
218
  contextGroupId: string;
@@ -228,7 +225,6 @@ export declare class InteropBroker extends Base {
228
225
  * @return { Promise<void> }
229
226
  * @param { RemoveFromContextGroupOptions } removeFromContextGroupOptions - Contains the target identity to remove.
230
227
  * @param { ClientIdentity } senderIdentity - Identity of the client sender.
231
- * @experimental
232
228
  */
233
229
  removeFromContextGroup({ target }: {
234
230
  target: OpenFin.Identity;
@@ -238,14 +234,12 @@ export declare class InteropBroker extends Base {
238
234
  * Used by Platform Windows.
239
235
  * @return { Promise<void> }
240
236
  * @property { ClientIdentity } clientIdentity - Identity of the client sender.
241
- * @experimental
242
237
  */
243
238
  removeClientFromContextGroup(clientIdentity: OpenFin.ClientIdentity): Promise<void>;
244
239
  /**
245
240
  * Returns the Interop-Broker-defined context groups available for an entity to join. Because this function is used in the rest of the Interop Broker to fetch the Context Groups, overriding this allows you to customize the Context Groups for the Interop Broker. However, we recommend customizing the context groups through configuration instead.
246
241
  * Used by Platform Windows.
247
242
  * @return { Promise<ContextGroupInfo[]>}
248
- * @experimental
249
243
  */
250
244
  getContextGroups(): Readonly<OpenFin.ContextGroupInfo[]>;
251
245
  /**
@@ -253,7 +247,6 @@ export declare class InteropBroker extends Base {
253
247
  * Used by Platform Windows.
254
248
  * @param { GetInfoForContextGroupOptions } getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
255
249
  * @return { Promise<ContextGroupInfo>}
256
- * @experimental
257
250
  */
258
251
  getInfoForContextGroup({ contextGroupId }: {
259
252
  contextGroupId: string;
@@ -263,7 +256,6 @@ export declare class InteropBroker extends Base {
263
256
  * Used by Platform Windows.
264
257
  * @param { GetAllClientsInContextGroupOptions } getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
265
258
  * @return { Promise<ClientIdentity[]>}
266
- * @experimental
267
259
  */
268
260
  getAllClientsInContextGroup({ contextGroupId }: {
269
261
  contextGroupId: string;
@@ -275,7 +267,6 @@ export declare class InteropBroker extends Base {
275
267
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
276
268
  * @return { Promise<unknown> }
277
269
  * @tutorial interop.handleFiredIntent
278
- * @experimental
279
270
  */
280
271
  handleFiredIntent(intent: OpenFin.Intent, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
281
272
  /**
@@ -284,7 +275,6 @@ export declare class InteropBroker extends Base {
284
275
  * @param { Intent } intent The combination of an action and a context that is passed to an application for resolution.
285
276
  * @param { Identity } target - Identity of the target that will handle the intent.
286
277
  * @return { Promise<void> }
287
- * @experimental
288
278
  */
289
279
  setIntentTarget(intent: OpenFin.Intent, target: OpenFin.Identity): Promise<void>;
290
280
  /**
@@ -294,7 +284,6 @@ export declare class InteropBroker extends Base {
294
284
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
295
285
  * @return { Promise<unknown> }
296
286
  * @tutorial interop.handleInfoForIntent
297
- * @experimental
298
287
  */
299
288
  handleInfoForIntent(options: OpenFin.InfoForIntentOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
300
289
  /**
@@ -304,7 +293,6 @@ export declare class InteropBroker extends Base {
304
293
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
305
294
  * @return { Promise<unknown> }
306
295
  * @tutorial interop.handleInfoForIntentsByContext
307
- * @experimental
308
296
  */
309
297
  handleInfoForIntentsByContext(context: OpenFin.Context | OpenFin.FindIntentsByContextOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
310
298
  /**
@@ -314,7 +302,6 @@ export declare class InteropBroker extends Base {
314
302
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
315
303
  * @return { Promise<unknown> }
316
304
  * @tutorial interop.handleFiredIntentForContext
317
- * @experimental
318
305
  */
319
306
  handleFiredIntentForContext(contextForIntent: OpenFin.ContextForIntent, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
320
307
  /**
@@ -50,7 +50,7 @@ let contextGroups = [
50
50
  }
51
51
  ];
52
52
  /**
53
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking **THE INTEROP API IS EXPERIMENTAL. IF YOU WOULD LIKE TO USE IT, PLEASE USE OUR DEFAULT IMPLEMENTATION IN BROWSER**}
53
+ * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
54
54
  *
55
55
  * The Interop Broker is responsible for keeping track of the Interop state of the Platform, and for directing messages to the proper locations.
56
56
  *
@@ -254,7 +254,6 @@ class InteropBroker extends base_1.Base {
254
254
  * @param { SetContextOptions } setContextOptions - New context to set.
255
255
  * @param { ClientIdentity } clientIdentity - Identity of the client sender.
256
256
  * @return { void }
257
- * @experimental
258
257
  */
259
258
  setContext({ context }, clientIdentity) {
260
259
  this.wire.sendAction('interop-broker-set-context').catch((e) => {
@@ -328,7 +327,6 @@ class InteropBroker extends base_1.Base {
328
327
  * @return { Promise<void> }
329
328
  * @param { JoinContextGroupOptions } joinContextGroupOptions - Id of the Context Group and identity of the entity to join to the group.
330
329
  * @param { ClientIdentity } senderIdentity - Identity of the client sender.
331
- * @experimental
332
330
  */
333
331
  async joinContextGroup({ contextGroupId, target }, senderIdentity) {
334
332
  this.wire.sendAction('interop-broker-join-context-group').catch((e) => {
@@ -374,7 +372,6 @@ class InteropBroker extends base_1.Base {
374
372
  * @return { Promise<void> }
375
373
  * @param { AddClientToContextGroupOptions } addClientToContextGroupOptions - Contains the contextGroupId
376
374
  * @param { ClientIdentity } clientIdentity - Identity of the client sender.
377
- * @experimental
378
375
  */
379
376
  async addClientToContextGroup({ contextGroupId }, clientIdentity) {
380
377
  this.wire.sendAction('interop-broker-add-client-to-context-group').catch((e) => {
@@ -418,7 +415,6 @@ class InteropBroker extends base_1.Base {
418
415
  * @return { Promise<void> }
419
416
  * @param { RemoveFromContextGroupOptions } removeFromContextGroupOptions - Contains the target identity to remove.
420
417
  * @param { ClientIdentity } senderIdentity - Identity of the client sender.
421
- * @experimental
422
418
  */
423
419
  async removeFromContextGroup({ target }, senderIdentity) {
424
420
  this.wire.sendAction('interop-broker-remove-from-context-group').catch((e) => {
@@ -459,7 +455,6 @@ class InteropBroker extends base_1.Base {
459
455
  * Used by Platform Windows.
460
456
  * @return { Promise<void> }
461
457
  * @property { ClientIdentity } clientIdentity - Identity of the client sender.
462
- * @experimental
463
458
  */
464
459
  async removeClientFromContextGroup(clientIdentity) {
465
460
  this.wire.sendAction('interop-broker-remove-client-from-context-group').catch((e) => {
@@ -476,7 +471,6 @@ class InteropBroker extends base_1.Base {
476
471
  * Returns the Interop-Broker-defined context groups available for an entity to join. Because this function is used in the rest of the Interop Broker to fetch the Context Groups, overriding this allows you to customize the Context Groups for the Interop Broker. However, we recommend customizing the context groups through configuration instead.
477
472
  * Used by Platform Windows.
478
473
  * @return { Promise<ContextGroupInfo[]>}
479
- * @experimental
480
474
  */
481
475
  // eslint-disable-next-line class-methods-use-this
482
476
  getContextGroups() {
@@ -494,7 +488,6 @@ class InteropBroker extends base_1.Base {
494
488
  * Used by Platform Windows.
495
489
  * @param { GetInfoForContextGroupOptions } getInfoForContextGroupOptions - Contains contextGroupId, the context group you wish to get display info for.
496
490
  * @return { Promise<ContextGroupInfo>}
497
- * @experimental
498
491
  */
499
492
  getInfoForContextGroup({ contextGroupId }) {
500
493
  this.wire.sendAction('interop-broker-get-info-for-context-group').catch((e) => {
@@ -508,7 +501,6 @@ class InteropBroker extends base_1.Base {
508
501
  * Used by Platform Windows.
509
502
  * @param { GetAllClientsInContextGroupOptions } getAllClientsInContextGroupOptions - Contains contextGroupId, the context group you wish to get clients for.
510
503
  * @return { Promise<ClientIdentity[]>}
511
- * @experimental
512
504
  */
513
505
  getAllClientsInContextGroup({ contextGroupId }) {
514
506
  this.wire.sendAction('interop-broker-get-all-clients-in-context-group').catch((e) => {
@@ -528,7 +520,6 @@ class InteropBroker extends base_1.Base {
528
520
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
529
521
  * @return { Promise<unknown> }
530
522
  * @tutorial interop.handleFiredIntent
531
- * @experimental
532
523
  */
533
524
  // eslint-disable-next-line class-methods-use-this
534
525
  async handleFiredIntent(intent, clientIdentity) {
@@ -542,7 +533,6 @@ class InteropBroker extends base_1.Base {
542
533
  * @param { Intent } intent The combination of an action and a context that is passed to an application for resolution.
543
534
  * @param { Identity } target - Identity of the target that will handle the intent.
544
535
  * @return { Promise<void> }
545
- * @experimental
546
536
  */
547
537
  async setIntentTarget(intent, target) {
548
538
  this.wire.sendAction('interop-broker-set-intent-target').catch((e) => {
@@ -586,7 +576,6 @@ class InteropBroker extends base_1.Base {
586
576
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
587
577
  * @return { Promise<unknown> }
588
578
  * @tutorial interop.handleInfoForIntent
589
- * @experimental
590
579
  */
591
580
  // eslint-disable-next-line class-methods-use-this
592
581
  async handleInfoForIntent(options, clientIdentity) {
@@ -601,7 +590,6 @@ class InteropBroker extends base_1.Base {
601
590
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
602
591
  * @return { Promise<unknown> }
603
592
  * @tutorial interop.handleInfoForIntentsByContext
604
- * @experimental
605
593
  */
606
594
  // eslint-disable-next-line class-methods-use-this
607
595
  async handleInfoForIntentsByContext(context, clientIdentity) {
@@ -616,7 +604,6 @@ class InteropBroker extends base_1.Base {
616
604
  * @param { ClientIdentity } clientIdentity Identity of the Client making the request.
617
605
  * @return { Promise<unknown> }
618
606
  * @tutorial interop.handleFiredIntentForContext
619
- * @experimental
620
607
  */
621
608
  // eslint-disable-next-line class-methods-use-this
622
609
  async handleFiredIntentForContext(contextForIntent, clientIdentity) {
@@ -82,7 +82,7 @@ import { Base } from '../base';
82
82
  * @return {Promise<void>}
83
83
  */
84
84
  /**
85
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking **THE INTEROP API IS EXPERIMENTAL. IF YOU WOULD LIKE TO USE IT, PLEASE USE OUR DEFAULT IMPLEMENTATION IN BROWSER**}
85
+ * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
86
86
  *
87
87
  * The Interop Client API is broken up into two groups:
88
88
  *
@@ -206,7 +206,6 @@ export declare class InteropClient extends Base {
206
206
  * @param { Intent } intent - The combination of an action and a context that is passed to an application for resolution.
207
207
  * @return { Promise<unknown>}
208
208
  * @tutorial interop.fireIntent
209
- * @experimental
210
209
  */
211
210
  fireIntent<T = unknown>(intent: OpenFin.Intent): Promise<T>;
212
211
  /**
@@ -215,7 +214,6 @@ export declare class InteropClient extends Base {
215
214
  * @param { string } intentName - The name of an intent.
216
215
  * @return { Promise<Subscription> }
217
216
  * @tutorial interop.registerIntentHandler
218
- * @experimental
219
217
  */
220
218
  registerIntentHandler(handler: OpenFin.IntentHandler, intentName: string, options?: any): Promise<{
221
219
  unsubscribe: () => Promise<void>;
@@ -226,7 +224,6 @@ export declare class InteropClient extends Base {
226
224
  * @param { string } [contextType]
227
225
  * @return { Promise<Context> }
228
226
  * @tutorial interop.getCurrentContext
229
- * @experimental
230
227
  */
231
228
  getCurrentContext(contextType?: string): Promise<OpenFin.Context>;
232
229
  /**
@@ -234,7 +231,6 @@ export declare class InteropClient extends Base {
234
231
  * @param { InfoForIntentOptions } options
235
232
  * @return { Promise<unknown> }
236
233
  * @tutorial interop.getInfoForIntent
237
- * @experimental
238
234
  */
239
235
  getInfoForIntent<T = unknown>(options: OpenFin.InfoForIntentOptions): Promise<T>;
240
236
  /**
@@ -242,7 +238,6 @@ export declare class InteropClient extends Base {
242
238
  * @param { Context } context
243
239
  * @return { Promise<unknown> }
244
240
  * @tutorial interop.getInfoForIntentsByContext
245
- * @experimental
246
241
  */
247
242
  getInfoForIntentsByContext<T = unknown>(context: OpenFin.Context): Promise<T>;
248
243
  /**
@@ -251,7 +246,6 @@ export declare class InteropClient extends Base {
251
246
  * @param { ContextForIntent } context
252
247
  * @return { Promise<unknown> }
253
248
  * @tutorial interop.fireIntentForContext
254
- * @experimental
255
249
  */
256
250
  fireIntentForContext<T = unknown>(context: OpenFin.ContextForIntent): Promise<T>;
257
251
  /**
@@ -261,7 +255,6 @@ export declare class InteropClient extends Base {
261
255
  * @param { string } sessionContextGroupId - Id of the context group.
262
256
  * @return { Promise<SessionContextGroup>}
263
257
  * @tutorial interop.joinSessionContextGroup
264
- * @experimental
265
258
  */
266
259
  joinSessionContextGroup(sessionContextGroupId: string): Promise<OpenFin.SessionContextGroup>;
267
260
  /**
@@ -98,7 +98,7 @@ const utils_1 = require("./utils");
98
98
  * @return {Promise<void>}
99
99
  */
100
100
  /**
101
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking **THE INTEROP API IS EXPERIMENTAL. IF YOU WOULD LIKE TO USE IT, PLEASE USE OUR DEFAULT IMPLEMENTATION IN BROWSER**}
101
+ * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
102
102
  *
103
103
  * The Interop Client API is broken up into two groups:
104
104
  *
@@ -305,7 +305,6 @@ class InteropClient extends base_1.Base {
305
305
  * @param { Intent } intent - The combination of an action and a context that is passed to an application for resolution.
306
306
  * @return { Promise<unknown>}
307
307
  * @tutorial interop.fireIntent
308
- * @experimental
309
308
  */
310
309
  async fireIntent(intent) {
311
310
  this.wire.sendAction('interop-client-fire-intent').catch((e) => {
@@ -320,7 +319,6 @@ class InteropClient extends base_1.Base {
320
319
  * @param { string } intentName - The name of an intent.
321
320
  * @return { Promise<Subscription> }
322
321
  * @tutorial interop.registerIntentHandler
323
- * @experimental
324
322
  */
325
323
  async registerIntentHandler(handler, intentName, options) {
326
324
  this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
@@ -348,7 +346,6 @@ class InteropClient extends base_1.Base {
348
346
  * @param { string } [contextType]
349
347
  * @return { Promise<Context> }
350
348
  * @tutorial interop.getCurrentContext
351
- * @experimental
352
349
  */
353
350
  async getCurrentContext(contextType) {
354
351
  this.wire.sendAction('interop-client-get-current-context').catch((e) => {
@@ -362,7 +359,6 @@ class InteropClient extends base_1.Base {
362
359
  * @param { InfoForIntentOptions } options
363
360
  * @return { Promise<unknown> }
364
361
  * @tutorial interop.getInfoForIntent
365
- * @experimental
366
362
  */
367
363
  async getInfoForIntent(options) {
368
364
  this.wire.sendAction('interop-client-get-info-for-intent').catch((e) => {
@@ -376,7 +372,6 @@ class InteropClient extends base_1.Base {
376
372
  * @param { Context } context
377
373
  * @return { Promise<unknown> }
378
374
  * @tutorial interop.getInfoForIntentsByContext
379
- * @experimental
380
375
  */
381
376
  async getInfoForIntentsByContext(context) {
382
377
  this.wire.sendAction('interop-client-get-info-for-intents-by-context').catch((e) => {
@@ -391,7 +386,6 @@ class InteropClient extends base_1.Base {
391
386
  * @param { ContextForIntent } context
392
387
  * @return { Promise<unknown> }
393
388
  * @tutorial interop.fireIntentForContext
394
- * @experimental
395
389
  */
396
390
  async fireIntentForContext(context) {
397
391
  this.wire.sendAction('interop-client-fire-intent-for-context').catch((e) => {
@@ -407,7 +401,6 @@ class InteropClient extends base_1.Base {
407
401
  * @param { string } sessionContextGroupId - Id of the context group.
408
402
  * @return { Promise<SessionContextGroup>}
409
403
  * @tutorial interop.joinSessionContextGroup
410
- * @experimental
411
404
  */
412
405
  async joinSessionContextGroup(sessionContextGroupId) {
413
406
  try {
@@ -130,7 +130,7 @@ class Fdc3Module extends base_1.Base {
130
130
  this.wire.sendAction('fdc3-broadcast').catch((e) => {
131
131
  // we do not want to expose this error, just continue if this analytics-only call fails
132
132
  });
133
- this.fin.me.interop.setContext(context);
133
+ return this.fin.me.interop.setContext(context);
134
134
  }
135
135
  /**
136
136
  * Returns the Interop-Broker-defined context groups available for an entity to join.
@@ -165,7 +165,7 @@ class Fdc3Module extends base_1.Base {
165
165
  // we do not want to expose this error, just continue if this analytics-only call fails
166
166
  });
167
167
  try {
168
- await this.fin.me.interop.joinContextGroup(channelId);
168
+ return await this.fin.me.interop.joinContextGroup(channelId);
169
169
  }
170
170
  catch (error) {
171
171
  if (error.message === utils_2.BROKER_ERRORS.joinSessionContextGroupWithJoinContextGroup) {
@@ -187,7 +187,7 @@ class Fdc3Module extends base_1.Base {
187
187
  this.wire.sendAction('fdc3-leave-current-channel').catch((e) => {
188
188
  // we do not want to expose this error, just continue if this analytics-only call fails
189
189
  });
190
- this.fin.me.interop.removeFromContextGroup();
190
+ return this.fin.me.interop.removeFromContextGroup();
191
191
  }
192
192
  /**
193
193
  * Adds a listener for incoming Intents.
@@ -232,7 +232,7 @@ class Fdc3Module extends base_1.Base {
232
232
  return await this.fin.me.interop.fireIntent(intentObj);
233
233
  }
234
234
  catch (error) {
235
- const errorToThrow = error.message === utils_2.BROKER_ERRORS.fireIntent ? 'ResolverUnavailable' : error;
235
+ const errorToThrow = error.message === utils_2.BROKER_ERRORS.fireIntent ? 'ResolverUnavailable' : error.message;
236
236
  throw new Error(errorToThrow);
237
237
  }
238
238
  }
@@ -266,7 +266,7 @@ class Fdc3Module extends base_1.Base {
266
266
  return await this.fin.me.interop.getInfoForIntent({ name: intent, context });
267
267
  }
268
268
  catch (error) {
269
- const errorToThrow = error.message === utils_2.BROKER_ERRORS.getInfoForIntent ? 'ResolverUnavailable' : error;
269
+ const errorToThrow = error.message === utils_2.BROKER_ERRORS.getInfoForIntent ? 'ResolverUnavailable' : error.message;
270
270
  throw new Error(errorToThrow);
271
271
  }
272
272
  }
@@ -284,7 +284,7 @@ class Fdc3Module extends base_1.Base {
284
284
  return await this.fin.me.interop.getInfoForIntentsByContext(context);
285
285
  }
286
286
  catch (error) {
287
- const errorToThrow = error.message === utils_2.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error;
287
+ const errorToThrow = error.message === utils_2.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error.message;
288
288
  throw new Error(errorToThrow);
289
289
  }
290
290
  }
@@ -303,7 +303,7 @@ class Fdc3Module extends base_1.Base {
303
303
  return await this.fin.me.interop.fireIntentForContext({ ...context, metadata: { target: app } });
304
304
  }
305
305
  catch (error) {
306
- const errorToThrow = error.message === utils_2.BROKER_ERRORS.fireIntentForContext ? 'ResolverUnavailable' : error;
306
+ const errorToThrow = error.message === utils_2.BROKER_ERRORS.fireIntentForContext ? 'ResolverUnavailable' : error.message;
307
307
  throw new Error(errorToThrow);
308
308
  }
309
309
  }
@@ -354,7 +354,7 @@ class Fdc3Module extends base_1.Base {
354
354
  return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3Open', { app, context });
355
355
  }
356
356
  catch (error) {
357
- const errorToThrow = error.message === utils_2.BROKER_ERRORS.fdc3Open ? 'ResolverUnavailable' : error;
357
+ const errorToThrow = error.message === utils_2.BROKER_ERRORS.fdc3Open ? 'ResolverUnavailable' : error.message;
358
358
  throw new Error(errorToThrow);
359
359
  }
360
360
  }
@@ -191,7 +191,7 @@ class Fdc3Module2 extends base_1.Base {
191
191
  return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3FindInstances', app);
192
192
  }
193
193
  catch (error) {
194
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3FindInstances ? 'ResolverUnavailable' : error;
194
+ const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3FindInstances ? 'ResolverUnavailable' : error.message;
195
195
  throw new Error(errorToThrow);
196
196
  }
197
197
  }
@@ -209,7 +209,7 @@ class Fdc3Module2 extends base_1.Base {
209
209
  return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3GetAppMetadata', app);
210
210
  }
211
211
  catch (error) {
212
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetAppMetadata ? 'ResolverUnavailable' : error;
212
+ const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetAppMetadata ? 'ResolverUnavailable' : error.message;
213
213
  throw new Error(errorToThrow);
214
214
  }
215
215
  }
@@ -268,7 +268,7 @@ class Fdc3Module2 extends base_1.Base {
268
268
  return await this.fin.me.interop.getInfoForIntent({ name: intent, context, metadata: { resultType } });
269
269
  }
270
270
  catch (error) {
271
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntent ? 'ResolverUnavailable' : error;
271
+ const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntent ? 'ResolverUnavailable' : error.message;
272
272
  throw new Error(errorToThrow);
273
273
  }
274
274
  }
@@ -288,7 +288,7 @@ class Fdc3Module2 extends base_1.Base {
288
288
  return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3v2FindIntentsByContext', payload);
289
289
  }
290
290
  catch (error) {
291
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error;
291
+ const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error.message;
292
292
  throw new Error(errorToThrow);
293
293
  }
294
294
  }
@@ -308,7 +308,7 @@ class Fdc3Module2 extends base_1.Base {
308
308
  return (0, utils_2.getIntentResolution)(this.fin.me.interop, context, app, intent);
309
309
  }
310
310
  catch (error) {
311
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.fireIntent ? 'ResolverUnavailable' : error;
311
+ const errorToThrow = error.message === utils_1.BROKER_ERRORS.fireIntent ? 'ResolverUnavailable' : error.message;
312
312
  throw new Error(errorToThrow);
313
313
  }
314
314
  }
@@ -328,7 +328,7 @@ class Fdc3Module2 extends base_1.Base {
328
328
  return (0, utils_2.getIntentResolution)(this.fin.me.interop, context, app);
329
329
  }
330
330
  catch (error) {
331
- const errorToThrow = error.message === utils_1.BROKER_ERRORS.fireIntent ? 'ResolverUnavailable' : error;
331
+ const errorToThrow = error.message === utils_1.BROKER_ERRORS.fireIntent ? 'ResolverUnavailable' : error.message;
332
332
  throw new Error(errorToThrow);
333
333
  }
334
334
  }
@@ -455,11 +455,11 @@ export declare class View extends WebContents<ViewEvents> {
455
455
  * **NOTE**: Internal use only.
456
456
  * Attaches this view to an HTML element in the current context. The view will resize responsively when the element bounds change.
457
457
  *
458
- * @param { string } elementId - id of the HTML element to attach the view to.
458
+ * @param {HTMLElement} element - HTML element to attach the view to.
459
459
  * @return {Function} - Cleanup function that will disconnect the element resize observer.
460
460
  * @internal
461
461
  * @experimental
462
462
  * @tutorial View.bindToElement
463
463
  */
464
- bindToElement: (elementId: string) => Promise<() => void>;
464
+ bindToElement: (element: HTMLElement) => Promise<() => void>;
465
465
  }
@@ -460,16 +460,15 @@ class View extends main_1.WebContents {
460
460
  * **NOTE**: Internal use only.
461
461
  * Attaches this view to an HTML element in the current context. The view will resize responsively when the element bounds change.
462
462
  *
463
- * @param { string } elementId - id of the HTML element to attach the view to.
463
+ * @param {HTMLElement} element - HTML element to attach the view to.
464
464
  * @return {Function} - Cleanup function that will disconnect the element resize observer.
465
465
  * @internal
466
466
  * @experimental
467
467
  * @tutorial View.bindToElement
468
468
  */
469
- this.bindToElement = async (elementId) => {
470
- const element = document.getElementById(elementId);
469
+ this.bindToElement = async (element) => {
471
470
  if (!element) {
472
- throw new Error(`Element matching id: ${elementId} not found.`);
471
+ throw new Error('Element not found.');
473
472
  }
474
473
  const onChange = async (bounds) => this.setBounds(bounds);
475
474
  return (0, bounds_observer_1.observeBounds)(element, onChange);