@openfin/node-adapter 36.79.13 → 36.79.17

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.
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1668,9 +1677,9 @@ declare class Base {
1668
1677
  * on the context in which the devtools panel was opened.
1669
1678
  */
1670
1679
  get me(): Identity;
1671
- protected isNodeEnvironment: () => boolean;
1672
- protected isOpenFinEnvironment: () => boolean;
1673
- protected isBrowserEnvironment: () => boolean;
1680
+ /* Excluded from this release type: isNodeEnvironment */
1681
+ /* Excluded from this release type: isOpenFinEnvironment */
1682
+ /* Excluded from this release type: isBrowserEnvironment */
1674
1683
  }
1675
1684
 
1676
1685
  /**
@@ -4470,6 +4479,32 @@ declare type CreateLayoutOptions = {
4470
4479
  container: HTMLElement;
4471
4480
  layoutName: string;
4472
4481
  layout: LayoutOptions;
4482
+ /**
4483
+ * @defaultValue 'default'
4484
+ *
4485
+ * Controls the View behavior for the given `layout` property. Note
4486
+ * that the selected behavior only applies to unnamed Views or
4487
+ * Views with the prefix `internal-generated-`. In all cases, if any
4488
+ * View in the `layout` does not already exist, it will be created
4489
+ * with a name that starts with `internal-generated-`.
4490
+ *
4491
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4492
+ * be reparented to the current Window and added to this new Layout.
4493
+ * Use this option when you need to transfer an existing Layout between Windows.
4494
+ *
4495
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4496
+ * be duplicated with new generated names. Use this option when you need
4497
+ * to clone a Layout to any Window.
4498
+ *
4499
+ * When set to `default` or omitted, the Layout will attempt to re-use
4500
+ * existing Views only if they are attached to the current Window or
4501
+ * the Provider Window. Set to `default` or omit this option when creating
4502
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4503
+ * override. Note that during applyLayoutSnapshot, Views are created and
4504
+ * attached to the Provider while the Window is being created, so it's
4505
+ * important to not 'duplicate' Views in this workflow.
4506
+ */
4507
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4473
4508
  };
4474
4509
 
4475
4510
  /**
@@ -5180,8 +5215,14 @@ declare interface Environment {
5180
5215
  getRtcPeer(): RTCPeerConnection;
5181
5216
  getWsConstructor(): typeof WebSocket;
5182
5217
  whenReady(): Promise<void>;
5218
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5219
+ fdc3Version?: Fdc3Version;
5220
+ }>;
5221
+ readonly type: EnvironmentType;
5183
5222
  }
5184
5223
 
5224
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5225
+
5185
5226
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5186
5227
 
5187
5228
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -5589,6 +5630,8 @@ declare namespace FDC3 {
5589
5630
  }
5590
5631
  }
5591
5632
 
5633
+ declare type Fdc3Version = '1.2' | '2.0';
5634
+
5592
5635
  /**
5593
5636
  * @interface
5594
5637
  */
@@ -6968,6 +7011,15 @@ declare class InterApplicationBus extends Base {
6968
7011
 
6969
7012
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
6970
7013
 
7014
+ declare type InternalFDC3Info = {
7015
+ providerVersion: string;
7016
+ provider: string;
7017
+ };
7018
+
7019
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7020
+ fdc3Info: InternalFDC3Info;
7021
+ };
7022
+
6971
7023
  /**
6972
7024
  * Define whether to enable interop action logging.
6973
7025
  *
@@ -7096,6 +7148,7 @@ declare type InteropActionLoggingOption = {
7096
7148
  *
7097
7149
  */
7098
7150
  declare class InteropBroker extends Base {
7151
+ #private;
7099
7152
  private getProvider;
7100
7153
  private interopClients;
7101
7154
  private contextGroupsById;
@@ -9413,6 +9466,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9413
9466
  type: 'monitor-info-changed';
9414
9467
  };
9415
9468
 
9469
+ /**
9470
+ * @experimental
9471
+ *
9472
+ * Used to control view behavior for Layout.create API
9473
+ */
9474
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9475
+
9416
9476
  /**
9417
9477
  * @interface
9418
9478
  */
@@ -10133,6 +10193,7 @@ declare namespace OpenFin {
10133
10193
  LayoutManagerOverride,
10134
10194
  LayoutManager,
10135
10195
  CreateLayoutOptions,
10196
+ MultiInstanceViewBehavior,
10136
10197
  PresetLayoutOptions_2 as PresetLayoutOptions,
10137
10198
  ResultBehavior,
10138
10199
  PopupBaseBehavior,
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1668,9 +1677,9 @@ declare class Base {
1668
1677
  * on the context in which the devtools panel was opened.
1669
1678
  */
1670
1679
  get me(): Identity;
1671
- protected isNodeEnvironment: () => boolean;
1672
- protected isOpenFinEnvironment: () => boolean;
1673
- protected isBrowserEnvironment: () => boolean;
1680
+ /* Excluded from this release type: isNodeEnvironment */
1681
+ /* Excluded from this release type: isOpenFinEnvironment */
1682
+ /* Excluded from this release type: isBrowserEnvironment */
1674
1683
  }
1675
1684
 
1676
1685
  /**
@@ -4470,6 +4479,32 @@ declare type CreateLayoutOptions = {
4470
4479
  container: HTMLElement;
4471
4480
  layoutName: string;
4472
4481
  layout: LayoutOptions;
4482
+ /**
4483
+ * @defaultValue 'default'
4484
+ *
4485
+ * Controls the View behavior for the given `layout` property. Note
4486
+ * that the selected behavior only applies to unnamed Views or
4487
+ * Views with the prefix `internal-generated-`. In all cases, if any
4488
+ * View in the `layout` does not already exist, it will be created
4489
+ * with a name that starts with `internal-generated-`.
4490
+ *
4491
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4492
+ * be reparented to the current Window and added to this new Layout.
4493
+ * Use this option when you need to transfer an existing Layout between Windows.
4494
+ *
4495
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4496
+ * be duplicated with new generated names. Use this option when you need
4497
+ * to clone a Layout to any Window.
4498
+ *
4499
+ * When set to `default` or omitted, the Layout will attempt to re-use
4500
+ * existing Views only if they are attached to the current Window or
4501
+ * the Provider Window. Set to `default` or omit this option when creating
4502
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4503
+ * override. Note that during applyLayoutSnapshot, Views are created and
4504
+ * attached to the Provider while the Window is being created, so it's
4505
+ * important to not 'duplicate' Views in this workflow.
4506
+ */
4507
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4473
4508
  };
4474
4509
 
4475
4510
  /**
@@ -5180,8 +5215,14 @@ declare interface Environment {
5180
5215
  getRtcPeer(): RTCPeerConnection;
5181
5216
  getWsConstructor(): typeof WebSocket;
5182
5217
  whenReady(): Promise<void>;
5218
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5219
+ fdc3Version?: Fdc3Version;
5220
+ }>;
5221
+ readonly type: EnvironmentType;
5183
5222
  }
5184
5223
 
5224
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5225
+
5185
5226
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5186
5227
 
5187
5228
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -5589,6 +5630,8 @@ declare namespace FDC3 {
5589
5630
  }
5590
5631
  }
5591
5632
 
5633
+ declare type Fdc3Version = '1.2' | '2.0';
5634
+
5592
5635
  /**
5593
5636
  * @interface
5594
5637
  */
@@ -6968,6 +7011,15 @@ declare class InterApplicationBus extends Base {
6968
7011
 
6969
7012
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
6970
7013
 
7014
+ declare type InternalFDC3Info = {
7015
+ providerVersion: string;
7016
+ provider: string;
7017
+ };
7018
+
7019
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7020
+ fdc3Info: InternalFDC3Info;
7021
+ };
7022
+
6971
7023
  /**
6972
7024
  * Define whether to enable interop action logging.
6973
7025
  *
@@ -7096,6 +7148,7 @@ declare type InteropActionLoggingOption = {
7096
7148
  *
7097
7149
  */
7098
7150
  declare class InteropBroker extends Base {
7151
+ #private;
7099
7152
  private getProvider;
7100
7153
  private interopClients;
7101
7154
  private contextGroupsById;
@@ -9413,6 +9466,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9413
9466
  type: 'monitor-info-changed';
9414
9467
  };
9415
9468
 
9469
+ /**
9470
+ * @experimental
9471
+ *
9472
+ * Used to control view behavior for Layout.create API
9473
+ */
9474
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9475
+
9416
9476
  /**
9417
9477
  * @interface
9418
9478
  */
@@ -10133,6 +10193,7 @@ declare namespace OpenFin {
10133
10193
  LayoutManagerOverride,
10134
10194
  LayoutManager,
10135
10195
  CreateLayoutOptions,
10196
+ MultiInstanceViewBehavior,
10136
10197
  PresetLayoutOptions_2 as PresetLayoutOptions,
10137
10198
  ResultBehavior,
10138
10199
  PopupBaseBehavior,
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1668,9 +1677,9 @@ declare class Base {
1668
1677
  * on the context in which the devtools panel was opened.
1669
1678
  */
1670
1679
  get me(): Identity;
1671
- protected isNodeEnvironment: () => boolean;
1672
- protected isOpenFinEnvironment: () => boolean;
1673
- protected isBrowserEnvironment: () => boolean;
1680
+ /* Excluded from this release type: isNodeEnvironment */
1681
+ /* Excluded from this release type: isOpenFinEnvironment */
1682
+ /* Excluded from this release type: isBrowserEnvironment */
1674
1683
  }
1675
1684
 
1676
1685
  /**
@@ -4470,6 +4479,32 @@ declare type CreateLayoutOptions = {
4470
4479
  container: HTMLElement;
4471
4480
  layoutName: string;
4472
4481
  layout: LayoutOptions;
4482
+ /**
4483
+ * @defaultValue 'default'
4484
+ *
4485
+ * Controls the View behavior for the given `layout` property. Note
4486
+ * that the selected behavior only applies to unnamed Views or
4487
+ * Views with the prefix `internal-generated-`. In all cases, if any
4488
+ * View in the `layout` does not already exist, it will be created
4489
+ * with a name that starts with `internal-generated-`.
4490
+ *
4491
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4492
+ * be reparented to the current Window and added to this new Layout.
4493
+ * Use this option when you need to transfer an existing Layout between Windows.
4494
+ *
4495
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4496
+ * be duplicated with new generated names. Use this option when you need
4497
+ * to clone a Layout to any Window.
4498
+ *
4499
+ * When set to `default` or omitted, the Layout will attempt to re-use
4500
+ * existing Views only if they are attached to the current Window or
4501
+ * the Provider Window. Set to `default` or omit this option when creating
4502
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4503
+ * override. Note that during applyLayoutSnapshot, Views are created and
4504
+ * attached to the Provider while the Window is being created, so it's
4505
+ * important to not 'duplicate' Views in this workflow.
4506
+ */
4507
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4473
4508
  };
4474
4509
 
4475
4510
  /**
@@ -5180,8 +5215,14 @@ declare interface Environment {
5180
5215
  getRtcPeer(): RTCPeerConnection;
5181
5216
  getWsConstructor(): typeof WebSocket;
5182
5217
  whenReady(): Promise<void>;
5218
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5219
+ fdc3Version?: Fdc3Version;
5220
+ }>;
5221
+ readonly type: EnvironmentType;
5183
5222
  }
5184
5223
 
5224
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5225
+
5185
5226
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5186
5227
 
5187
5228
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -5589,6 +5630,8 @@ declare namespace FDC3 {
5589
5630
  }
5590
5631
  }
5591
5632
 
5633
+ declare type Fdc3Version = '1.2' | '2.0';
5634
+
5592
5635
  /**
5593
5636
  * @interface
5594
5637
  */
@@ -6968,6 +7011,15 @@ declare class InterApplicationBus extends Base {
6968
7011
 
6969
7012
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
6970
7013
 
7014
+ declare type InternalFDC3Info = {
7015
+ providerVersion: string;
7016
+ provider: string;
7017
+ };
7018
+
7019
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7020
+ fdc3Info: InternalFDC3Info;
7021
+ };
7022
+
6971
7023
  /**
6972
7024
  * Define whether to enable interop action logging.
6973
7025
  *
@@ -7096,6 +7148,7 @@ declare type InteropActionLoggingOption = {
7096
7148
  *
7097
7149
  */
7098
7150
  declare class InteropBroker extends Base {
7151
+ #private;
7099
7152
  private getProvider;
7100
7153
  private interopClients;
7101
7154
  private contextGroupsById;
@@ -9413,6 +9466,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9413
9466
  type: 'monitor-info-changed';
9414
9467
  };
9415
9468
 
9469
+ /**
9470
+ * @experimental
9471
+ *
9472
+ * Used to control view behavior for Layout.create API
9473
+ */
9474
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9475
+
9416
9476
  /**
9417
9477
  * @interface
9418
9478
  */
@@ -10133,6 +10193,7 @@ declare namespace OpenFin {
10133
10193
  LayoutManagerOverride,
10134
10194
  LayoutManager,
10135
10195
  CreateLayoutOptions,
10196
+ MultiInstanceViewBehavior,
10136
10197
  PresetLayoutOptions_2 as PresetLayoutOptions,
10137
10198
  ResultBehavior,
10138
10199
  PopupBaseBehavior,
@@ -88,12 +88,21 @@ declare type Api = {
88
88
  iframe?: {
89
89
  /**
90
90
  * Inject OpenFin API into cross-origin iframes
91
+ *
92
+ * @defaultValue false
91
93
  */
92
94
  crossOriginInjection?: boolean;
93
95
  /**
94
96
  * Inject OpenFin API into same-origin iframes
97
+ *
98
+ * @defaultValue true
95
99
  */
96
100
  sameOriginInjection?: boolean;
101
+ /**
102
+ * @deprecated Shared names should not be used; support is provided purely for back-compat reasons.
103
+ *
104
+ * When `true`, iframes will have the same name as their parent WebContents.
105
+ */
97
106
  enableDeprecatedSharedName?: boolean;
98
107
  };
99
108
  /**
@@ -1688,8 +1697,20 @@ declare class Base {
1688
1697
  * on the context in which the devtools panel was opened.
1689
1698
  */
1690
1699
  get me(): Identity;
1700
+ /**
1701
+ * @internal
1702
+ * @deprecated
1703
+ */
1691
1704
  protected isNodeEnvironment: () => boolean;
1705
+ /**
1706
+ * @internal
1707
+ * @deprecated
1708
+ */
1692
1709
  protected isOpenFinEnvironment: () => boolean;
1710
+ /**
1711
+ * @internal
1712
+ * @deprecated
1713
+ */
1693
1714
  protected isBrowserEnvironment: () => boolean;
1694
1715
  }
1695
1716
 
@@ -4513,6 +4534,32 @@ declare type CreateLayoutOptions = {
4513
4534
  container: HTMLElement;
4514
4535
  layoutName: string;
4515
4536
  layout: LayoutOptions;
4537
+ /**
4538
+ * @defaultValue 'default'
4539
+ *
4540
+ * Controls the View behavior for the given `layout` property. Note
4541
+ * that the selected behavior only applies to unnamed Views or
4542
+ * Views with the prefix `internal-generated-`. In all cases, if any
4543
+ * View in the `layout` does not already exist, it will be created
4544
+ * with a name that starts with `internal-generated-`.
4545
+ *
4546
+ * When set to `reparent`, Views prefixed with `internal-generated-` will
4547
+ * be reparented to the current Window and added to this new Layout.
4548
+ * Use this option when you need to transfer an existing Layout between Windows.
4549
+ *
4550
+ * When set to 'duplicate', Views prefixed with `internal-generated-` will
4551
+ * be duplicated with new generated names. Use this option when you need
4552
+ * to clone a Layout to any Window.
4553
+ *
4554
+ * When set to `default` or omitted, the Layout will attempt to re-use
4555
+ * existing Views only if they are attached to the current Window or
4556
+ * the Provider Window. Set to `default` or omit this option when creating
4557
+ * Layouts as part of implementing the LayoutManager::applyLayoutSnapshot
4558
+ * override. Note that during applyLayoutSnapshot, Views are created and
4559
+ * attached to the Provider while the Window is being created, so it's
4560
+ * important to not 'duplicate' Views in this workflow.
4561
+ */
4562
+ multiInstanceViewBehavior?: MultiInstanceViewBehavior;
4516
4563
  };
4517
4564
 
4518
4565
  /**
@@ -5228,8 +5275,14 @@ declare interface Environment {
5228
5275
  getRtcPeer(): RTCPeerConnection;
5229
5276
  getWsConstructor(): typeof WebSocket;
5230
5277
  whenReady(): Promise<void>;
5278
+ getInteropInfo(fin: OpenFin.Fin<OpenFin.EntityType>): Promise<InternalInteropBrokerOptions & {
5279
+ fdc3Version?: Fdc3Version;
5280
+ }>;
5281
+ readonly type: EnvironmentType;
5231
5282
  }
5232
5283
 
5284
+ declare type EnvironmentType = 'node' | 'openfin' | 'other';
5285
+
5233
5286
  declare type ErrorMiddleware = OpenFin.ErrorMiddleware;
5234
5287
 
5235
5288
  declare type ErrorMiddleware_2 = (topic: string, error: Error, id: ProviderIdentity_7 | ClientIdentity) => unknown;
@@ -5658,6 +5711,8 @@ declare namespace FDC3 {
5658
5711
  }
5659
5712
  }
5660
5713
 
5714
+ declare type Fdc3Version = '1.2' | '2.0';
5715
+
5661
5716
  /**
5662
5717
  * @interface
5663
5718
  */
@@ -7080,6 +7135,15 @@ declare class InterAppPayload {
7080
7135
 
7081
7136
  declare type InternalConnectConfig = ExistingConnectConfig | NewConnectConfig;
7082
7137
 
7138
+ declare type InternalFDC3Info = {
7139
+ providerVersion: string;
7140
+ provider: string;
7141
+ };
7142
+
7143
+ declare type InternalInteropBrokerOptions = OpenFin.InteropBrokerOptions & {
7144
+ fdc3Info: InternalFDC3Info;
7145
+ };
7146
+
7083
7147
  /**
7084
7148
  * Define whether to enable interop action logging.
7085
7149
  *
@@ -7208,6 +7272,7 @@ declare type InteropActionLoggingOption = {
7208
7272
  *
7209
7273
  */
7210
7274
  declare class InteropBroker extends Base {
7275
+ #private;
7211
7276
  private getProvider;
7212
7277
  private interopClients;
7213
7278
  private contextGroupsById;
@@ -7219,7 +7284,7 @@ declare class InteropBroker extends Base {
7219
7284
  /**
7220
7285
  * @internal
7221
7286
  */
7222
- constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options?: any);
7287
+ constructor(wire: Transport, getProvider: () => Promise<OpenFin.ChannelProvider>, options: InternalInteropBrokerOptions);
7223
7288
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
7224
7289
  new (): InteropBroker;
7225
7290
  };
@@ -9712,6 +9777,13 @@ declare type MonitorInfoChangedEvent = BaseEvent_9 & OpenFin.MonitorInfo & {
9712
9777
  type: 'monitor-info-changed';
9713
9778
  };
9714
9779
 
9780
+ /**
9781
+ * @experimental
9782
+ *
9783
+ * Used to control view behavior for Layout.create API
9784
+ */
9785
+ declare type MultiInstanceViewBehavior = 'reparent' | 'duplicate' | 'default';
9786
+
9715
9787
  /**
9716
9788
  * @interface
9717
9789
  */
@@ -10454,6 +10526,7 @@ declare namespace OpenFin {
10454
10526
  LayoutManagerOverride,
10455
10527
  LayoutManager,
10456
10528
  CreateLayoutOptions,
10529
+ MultiInstanceViewBehavior,
10457
10530
  PresetLayoutOptions_2 as PresetLayoutOptions,
10458
10531
  ResultBehavior,
10459
10532
  PopupBaseBehavior,
@@ -92,14 +92,26 @@ class Base {
92
92
  * @internal
93
93
  */
94
94
  constructor(wire) {
95
+ /**
96
+ * @internal
97
+ * @deprecated
98
+ */
95
99
  this.isNodeEnvironment = () => {
96
- return this.wire.environment.constructor.name === 'NodeEnvironment';
100
+ return this.wire.environment.type === 'node';
97
101
  };
102
+ /**
103
+ * @internal
104
+ * @deprecated
105
+ */
98
106
  this.isOpenFinEnvironment = () => {
99
- return this.wire.environment.constructor.name === 'OpenFinEnvironment';
107
+ return this.wire.environment.type === 'openfin';
100
108
  };
109
+ /**
110
+ * @internal
111
+ * @deprecated
112
+ */
101
113
  this.isBrowserEnvironment = () => {
102
- return this.wire.environment.constructor.name === 'BrowserEnvironment';
114
+ return this.wire.environment.type === 'other';
103
115
  };
104
116
  this.wire = wire;
105
117
  }
@@ -6661,7 +6673,7 @@ class System extends base_1$j.EmitterBase {
6661
6673
  reject = n;
6662
6674
  });
6663
6675
  // node.js environment not supported
6664
- if (this.wire.environment.constructor.name === 'NodeEnvironment') {
6676
+ if (this.wire.environment.type !== 'openfin') {
6665
6677
  throw new transport_errors_1$2.NotSupportedError('downloadAsset only supported in an OpenFin Render process');
6666
6678
  }
6667
6679
  const callSite = transport_errors_1$2.RuntimeError.getCallSite();
@@ -6738,7 +6750,7 @@ class System extends base_1$j.EmitterBase {
6738
6750
  const callsites = transport_errors_1$2.RuntimeError.getCallSite();
6739
6751
  return new Promise((resolve, reject) => {
6740
6752
  // node.js environment not supported
6741
- if (this.wire.environment.constructor.name === 'NodeEnvironment') {
6753
+ if (this.wire.environment.type !== 'openfin') {
6742
6754
  reject(new transport_errors_1$2.NotSupportedError('downloadRuntime only supported in an OpenFin Render process'));
6743
6755
  return;
6744
6756
  }
@@ -9084,7 +9096,7 @@ class ConnectionManager extends base_1$g.Base {
9084
9096
  return false;
9085
9097
  };
9086
9098
  this.providerMap = new Map();
9087
- this.protocolManager = new protocol_manager_1.ProtocolManager(this.isNodeEnvironment() ? ['classic'] : ['rtc', 'classic']);
9099
+ this.protocolManager = new protocol_manager_1.ProtocolManager(this.wire.environment.type === 'node' ? ['classic'] : ['rtc', 'classic']);
9088
9100
  __classPrivateFieldSet$6(this, _ConnectionManager_messageReceiver, new message_receiver_1.MessageReceiver(wire), "f");
9089
9101
  __classPrivateFieldSet$6(this, _ConnectionManager_rtcConnectionManager, new ice_manager_1.RTCICEManager(wire), "f");
9090
9102
  wire.registerMessageHandler(this.onmessage.bind(this));
@@ -9668,14 +9680,12 @@ class InterApplicationBus extends base_1$e.Base {
9668
9680
  * fin.InterApplicationBus.publish('topic', 'hello').then(() => console.log('Published')).catch(err => console.log(err));
9669
9681
  * ```
9670
9682
  */
9671
- publish(topic, message) {
9672
- return this.wire
9673
- .sendAction('publish-message', {
9683
+ async publish(topic, message) {
9684
+ await this.wire.sendAction('publish-message', {
9674
9685
  topic,
9675
9686
  message,
9676
9687
  sourceWindowName: this.me.name
9677
- })
9678
- .then(() => undefined);
9688
+ });
9679
9689
  }
9680
9690
  /**
9681
9691
  * Sends a message to a specific application on a specific topic.
@@ -9724,8 +9734,8 @@ class InterApplicationBus extends base_1$e.Base {
9724
9734
  */
9725
9735
  subscribe(source, topic, listener) {
9726
9736
  const subKey = this.createSubscriptionKey(source.uuid, source.name || '*', topic);
9727
- const sendSubscription = () => {
9728
- return this.wire.sendAction('subscribe', {
9737
+ const sendSubscription = async () => {
9738
+ await this.wire.sendAction('subscribe', {
9729
9739
  sourceUuid: source.uuid,
9730
9740
  sourceWindowName: source.name || '*',
9731
9741
  topic,
@@ -9765,8 +9775,8 @@ class InterApplicationBus extends base_1$e.Base {
9765
9775
  unsubscribe(source, topic, listener) {
9766
9776
  const sourceWindowName = source.name || '*';
9767
9777
  const subKey = this.createSubscriptionKey(source.uuid, sourceWindowName, topic);
9768
- const sendUnsubscription = () => {
9769
- return this.wire.sendAction('unsubscribe', {
9778
+ const sendUnsubscription = async () => {
9779
+ await this.wire.sendAction('unsubscribe', {
9770
9780
  sourceUuid: source.uuid,
9771
9781
  sourceWindowName,
9772
9782
  topic,
@@ -12914,6 +12924,18 @@ var hasRequiredInteropBroker;
12914
12924
  function requireInteropBroker () {
12915
12925
  if (hasRequiredInteropBroker) return InteropBroker;
12916
12926
  hasRequiredInteropBroker = 1;
12927
+ var __classPrivateFieldSet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12928
+ if (kind === "m") throw new TypeError("Private method is not writable");
12929
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
12930
+ 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");
12931
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12932
+ };
12933
+ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
12934
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
12935
+ 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");
12936
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12937
+ };
12938
+ var _InteropBroker_fdc3Info, _InteropBroker_contextGroups;
12917
12939
  Object.defineProperty(InteropBroker, "__esModule", { value: true });
12918
12940
  InteropBroker.InteropBroker = void 0;
12919
12941
  const base_1 = base$1;
@@ -12921,7 +12943,7 @@ function requireInteropBroker () {
12921
12943
  const utils_1 = utils$1;
12922
12944
  const lodash_1 = require$$3;
12923
12945
  const PrivateChannelProvider_1 = requirePrivateChannelProvider();
12924
- let contextGroups = [
12946
+ const defaultContextGroups = [
12925
12947
  {
12926
12948
  id: 'green',
12927
12949
  displayMetadata: {
@@ -13092,11 +13114,12 @@ function requireInteropBroker () {
13092
13114
  // Tip from Pierre and Michael from the overrideCheck work: Don't use bound methods for overrideable InteropBroker functions.
13093
13115
  super(wire);
13094
13116
  this.getProvider = getProvider;
13117
+ _InteropBroker_fdc3Info.set(this, void 0);
13118
+ _InteropBroker_contextGroups.set(this, void 0);
13095
13119
  this.interopClients = new Map();
13096
13120
  this.contextGroupsById = new Map();
13097
- if (options?.contextGroups) {
13098
- contextGroups = options.contextGroups;
13099
- }
13121
+ __classPrivateFieldSet(this, _InteropBroker_contextGroups, options.contextGroups ?? [...defaultContextGroups], "f");
13122
+ __classPrivateFieldSet(this, _InteropBroker_fdc3Info, options.fdc3Info, "f");
13100
13123
  if (options?.logging) {
13101
13124
  this.logging = options.logging;
13102
13125
  }
@@ -13360,7 +13383,7 @@ function requireInteropBroker () {
13360
13383
  // don't expose, analytics-only call
13361
13384
  });
13362
13385
  // Create copy for immutability
13363
- return contextGroups.map((contextGroup) => {
13386
+ return __classPrivateFieldGet(this, _InteropBroker_contextGroups, "f").map((contextGroup) => {
13364
13387
  return { ...contextGroup };
13365
13388
  });
13366
13389
  }
@@ -13771,8 +13794,7 @@ function requireInteropBroker () {
13771
13794
  const { fdc3Version } = payload;
13772
13795
  return {
13773
13796
  fdc3Version,
13774
- provider: 'OpenFin',
13775
- providerVersion: await this.fin.System.getVersion(),
13797
+ ...__classPrivateFieldGet(this, _InteropBroker_fdc3Info, "f"),
13776
13798
  optionalFeatures: {
13777
13799
  OriginatingAppMetadata: false,
13778
13800
  UserChannelMembershipAPIs: true
@@ -14041,23 +14063,25 @@ function requireInteropBroker () {
14041
14063
  }
14042
14064
  }
14043
14065
  async setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId) {
14044
- const entityInfo = await this.fin.System.getEntityInfo(clientIdentity.uuid, clientIdentity.name);
14045
- let entity;
14046
- if (entityInfo.entityType === 'view') {
14047
- entity = await this.fin.View.wrap(clientIdentity);
14048
- }
14049
- else if (entityInfo.entityType === 'window') {
14050
- entity = await this.fin.Window.wrap(clientIdentity);
14051
- }
14052
- if (entity) {
14053
- await entity.updateOptions({
14054
- interop: {
14055
- currentContextGroup: contextGroupId
14056
- }
14057
- });
14066
+ try {
14067
+ const entityInfo = await this.fin.System.getEntityInfo(clientIdentity.uuid, clientIdentity.name);
14068
+ let entity;
14069
+ if (entityInfo.entityType === 'view') {
14070
+ entity = await this.fin.View.wrap(clientIdentity);
14071
+ }
14072
+ else if (entityInfo.entityType === 'window') {
14073
+ entity = await this.fin.Window.wrap(clientIdentity);
14074
+ }
14075
+ if (entity) {
14076
+ await entity.updateOptions({
14077
+ interop: {
14078
+ currentContextGroup: contextGroupId
14079
+ }
14080
+ });
14081
+ }
14058
14082
  }
14059
- else {
14060
- console.warn(`Setting Current Context Group: Entity with identity ${clientIdentity.uuid}, ${clientIdentity.name} is not a window or view. It is a ${entityInfo.entityType} instead.`);
14083
+ catch (error) {
14084
+ // May file in interop
14061
14085
  }
14062
14086
  }
14063
14087
  async setupChannelProvider() {
@@ -14175,6 +14199,7 @@ function requireInteropBroker () {
14175
14199
  }
14176
14200
  };
14177
14201
  InteropBroker.InteropBroker = InteropBroker$1;
14202
+ _InteropBroker_fdc3Info = new WeakMap(), _InteropBroker_contextGroups = new WeakMap();
14178
14203
  return InteropBroker;
14179
14204
  }
14180
14205
 
@@ -14875,7 +14900,7 @@ function requireOverrideCheck () {
14875
14900
  overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
14876
14901
  const InteropBroker_1 = requireInteropBroker();
14877
14902
  function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
14878
- const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
14903
+ const setVersion = manifest?.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
14879
14904
  return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
14880
14905
  }
14881
14906
  overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
@@ -14950,10 +14975,9 @@ function requireFactory () {
14950
14975
  // don't expose, analytics-only call
14951
14976
  });
14952
14977
  // Allows for manifest-level configuration, without having to override. (e.g. specifying custom context groups)
14953
- const options = await this.fin.Application.getCurrentSync().getInfo();
14954
- const opts = options.initialOptions.interopBrokerConfiguration ?? {};
14978
+ const options = await this.wire.environment.getInteropInfo(this.wire.getFin());
14955
14979
  const objectThatThrows = (0, inaccessibleObject_1.createUnusableObject)(BrokerParamAccessError);
14956
- const warningOptsClone = (0, inaccessibleObject_1.createWarningObject)(BrokerParamAccessError, (0, lodash_1.cloneDeep)(opts));
14980
+ const warningOptsClone = (0, inaccessibleObject_1.createWarningObject)(BrokerParamAccessError, (0, lodash_1.cloneDeep)(options));
14957
14981
  let provider;
14958
14982
  const getProvider = () => {
14959
14983
  if (!provider) {
@@ -14965,7 +14989,7 @@ function requireFactory () {
14965
14989
  // eslint-disable-next-line no-console
14966
14990
  throw new Error(BrokerParamAccessError);
14967
14991
  };
14968
- const OverrideableBroker = InteropBroker_1.InteropBroker.createClosedConstructor(this.wire, getProvider, opts);
14992
+ const OverrideableBroker = InteropBroker_1.InteropBroker.createClosedConstructor(this.wire, getProvider, options);
14969
14993
  let broker;
14970
14994
  if (Array.isArray(override)) {
14971
14995
  const BrokerConstructor = (0, common_utils_1.overrideFromComposables)(...override)(OverrideableBroker);
@@ -14978,7 +15002,7 @@ function requireFactory () {
14978
15002
  // @ts-expect-error
14979
15003
  broker = await override(OverrideableBroker, objectThatThrows, throwingGetProvider, warningOptsClone);
14980
15004
  }
14981
- (0, overrideCheck_1.overrideCheck)(broker, (0, overrideCheck_1.getDefaultViewFdc3VersionFromAppInfo)(options));
15005
+ (0, overrideCheck_1.overrideCheck)(broker, options.fdc3Version);
14982
15006
  return broker;
14983
15007
  }
14984
15008
  /**
@@ -16200,6 +16224,30 @@ function requirePortDiscovery () {
16200
16224
  return portDiscovery;
16201
16225
  }
16202
16226
 
16227
+ var baseEnv = {};
16228
+
16229
+ Object.defineProperty(baseEnv, "__esModule", { value: true });
16230
+ baseEnv.BaseEnvironment = void 0;
16231
+ const overrideCheck_1 = requireOverrideCheck();
16232
+ class BaseEnvironment {
16233
+ async getInteropInfo(fin) {
16234
+ const appInfo = await fin.Application.getCurrentSync()
16235
+ .getInfo()
16236
+ .catch(() => null);
16237
+ const brokerConfig = appInfo?.initialOptions?.interopBrokerConfiguration ?? {};
16238
+ const fdc3Version = appInfo ? (0, overrideCheck_1.getDefaultViewFdc3VersionFromAppInfo)(appInfo) : undefined;
16239
+ return {
16240
+ fdc3Version,
16241
+ ...brokerConfig,
16242
+ fdc3Info: {
16243
+ providerVersion: await fin.System.getVersion(),
16244
+ provider: 'OpenFin'
16245
+ }
16246
+ };
16247
+ }
16248
+ }
16249
+ baseEnv.BaseEnvironment = BaseEnvironment;
16250
+
16203
16251
  var hasRequiredNodeEnv;
16204
16252
 
16205
16253
  function requireNodeEnv () {
@@ -16213,13 +16261,16 @@ function requireNodeEnv () {
16213
16261
  const environment_1 = environment;
16214
16262
  const port_discovery_1 = requirePortDiscovery();
16215
16263
  const transport_errors_1 = transportErrors;
16264
+ const base_env_1 = baseEnv;
16216
16265
  // Due to https://github.com/rollup/rollup/issues/1267, we need this guard
16217
16266
  // to ensure the import works with and without the 'esModuleInterop' ts flag.
16218
16267
  // This is due to our mocha tests not being compatible with esModuleInterop,
16219
16268
  // whereas rollup enforces it.
16220
16269
  const WS = _WS.default || _WS;
16221
- class NodeEnvironment {
16270
+ class NodeEnvironment extends base_env_1.BaseEnvironment {
16222
16271
  constructor() {
16272
+ super(...arguments);
16273
+ this.type = 'node';
16223
16274
  this.messageCounter = 0;
16224
16275
  this.childViews = false;
16225
16276
  this.writeToken = (path, token) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "36.79.13",
3
+ "version": "36.79.17",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",