@openfin/node-adapter 35.78.29 → 35.79.2

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.
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -111,6 +111,13 @@ declare type ApiClient<T extends Record<any, any>> = {
111
111
  [key in keyof PickOfType<T, Function>]: (...args: Parameters<T[key]>) => ReturnType<T[key]> extends Promise<any> ? ReturnType<T[key]> : Promise<ReturnType<T[key]>>;
112
112
  };
113
113
 
114
+ /**
115
+ * @interface
116
+ */
117
+ declare type ApiInjection = {
118
+ fin: InjectionType;
119
+ };
120
+
114
121
  /**
115
122
  * Generated when a new Platform's API becomes responsive.
116
123
  * @interface
@@ -1178,10 +1185,13 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1178
1185
  */
1179
1186
  apiDiagnostics: boolean;
1180
1187
  /**
1181
- * Define the file download rules.
1182
- * See [here](https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads) for more details.
1188
+ * @deprecated Please use {@link domainSettings} instead
1183
1189
  */
1184
1190
  defaultDomainSettings: DefaultDomainSettings;
1191
+ /**
1192
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
1193
+ */
1194
+ domainSettings: DomainSettings;
1185
1195
  /**
1186
1196
  * @defaultValue false
1187
1197
  *
@@ -3480,9 +3490,13 @@ declare type ConstViewOptions = {
3480
3490
  /**
3481
3491
  * Controls interaction of the view with its parent window's download shelf.
3482
3492
  */
3483
- downloadShelf?: {
3493
+ downloadShelf: {
3484
3494
  /**
3485
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3495
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3496
+ *
3497
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3498
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3499
+ * `enabled: false`.
3486
3500
  */
3487
3501
  enabled: boolean;
3488
3502
  };
@@ -3598,6 +3612,12 @@ declare type ConstWindowOptions = {
3598
3612
  * launches in favor of the cached value.
3599
3613
  */
3600
3614
  defaultWidth: number;
3615
+ /**
3616
+ * Controls the styling and behavior of the window download shelf.
3617
+ *
3618
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3619
+ * triggered by the window itself, or a view targeting the window.
3620
+ */
3601
3621
  downloadShelf: DownloadShelfOptions;
3602
3622
  height: number;
3603
3623
  layout: any;
@@ -4435,21 +4455,15 @@ declare type CustomRequestHeaders = {
4435
4455
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4436
4456
 
4437
4457
  /**
4458
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4438
4459
  * @interface
4439
4460
  */
4440
- declare type DefaultDomainSettings = {
4441
- rules: DefaultDomainSettingsRule[];
4442
- };
4461
+ declare type DefaultDomainSettings = DomainSettings;
4443
4462
 
4444
4463
  /**
4445
- * @interface
4464
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4446
4465
  */
4447
- declare type DefaultDomainSettingsRule = {
4448
- match: string[];
4449
- options: {
4450
- downloadSettings: FileDownloadSettings;
4451
- };
4452
- };
4466
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4453
4467
 
4454
4468
  declare interface DesktopAgent {
4455
4469
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4694,6 +4708,25 @@ declare type DisplayMetadata_3 = {
4694
4708
  readonly glyph?: string;
4695
4709
  };
4696
4710
 
4711
+ /**
4712
+ * @interface
4713
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
4714
+ */
4715
+ declare type DomainSettings = {
4716
+ rules: DomainSettingsRule[];
4717
+ };
4718
+
4719
+ /**
4720
+ * @interface
4721
+ */
4722
+ declare type DomainSettingsRule = {
4723
+ match: string[];
4724
+ options: {
4725
+ downloadSettings?: FileDownloadSettings;
4726
+ api?: ApiInjection;
4727
+ };
4728
+ };
4729
+
4697
4730
  /**
4698
4731
  * Metadata returned from a preload script download request.
4699
4732
  *
@@ -4738,14 +4771,24 @@ declare type DownloadRule = {
4738
4771
  * @interface
4739
4772
  *
4740
4773
  * Controls the styling and behavior of the window download shelf.
4774
+ *
4775
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4776
+ * triggered by the window itself, or a view targeting the window.
4741
4777
  */
4742
4778
  declare type DownloadShelfOptions = {
4743
4779
  /**
4744
- * Whether downloads in this window trigger opening the download shelf.
4780
+ * Whether downloads in this window trigger display of the download shelf.
4781
+ *
4782
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4783
+ * with `downloadShelf: { enabled: true }` initiates a download.
4745
4784
  */
4746
4785
  enabled: boolean;
4747
4786
  /**
4748
4787
  * Styling options for the download shelf border.
4788
+ *
4789
+ * @remarks These apply regardless of whether download shelf display was
4790
+ * triggered by this window itself, or a view targeting the window. Individual views
4791
+ * cannot control the rendering of their parent window's download shelf.
4749
4792
  */
4750
4793
  border?: {
4751
4794
  /**
@@ -4755,7 +4798,7 @@ declare type DownloadShelfOptions = {
4755
4798
  */
4756
4799
  size?: number;
4757
4800
  /**
4758
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4801
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4759
4802
  * if absent.
4760
4803
  */
4761
4804
  color?: string;
@@ -4975,6 +5018,7 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4975
5018
 
4976
5019
  declare interface Environment {
4977
5020
  initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5021
+ applyLayoutSnapshot(fin: OpenFin.Fin<OpenFin.EntityType>, layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.InitLayoutOptions): Promise<void>;
4978
5022
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
4979
5023
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
4980
5024
  resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
@@ -6568,6 +6612,13 @@ declare type InitPlatformOptions = {
6568
6612
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6569
6613
  };
6570
6614
 
6615
+ /**
6616
+ * * 'none': The `fin` API will be not available from within this context.
6617
+ * * 'global': The entire `fin` API will be available from within this context.
6618
+ * @defaultValue 'global'
6619
+ */
6620
+ declare type InjectionType = 'none' | 'global';
6621
+
6571
6622
  /**
6572
6623
  * Generated when the value of the element changes.
6573
6624
  * @interface
@@ -7412,8 +7463,6 @@ declare type InteropBrokerOptions = {
7412
7463
  };
7413
7464
 
7414
7465
  /**
7415
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7416
- *
7417
7466
  * The Interop Client API is broken up into two groups:
7418
7467
  *
7419
7468
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7816,7 +7865,7 @@ declare class InteropClient extends Base {
7816
7865
  * ```
7817
7866
  */
7818
7867
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7819
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7868
+ /* Excluded from this release type: ferryFdc3Call */
7820
7869
  }
7821
7870
 
7822
7871
  /**
@@ -8457,16 +8506,17 @@ declare type LayoutIdentity = Identity_5 & {
8457
8506
  };
8458
8507
 
8459
8508
  /**
8460
- * Generated when the window is created, and all of its layout's views have either finished or failed
8461
- * navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
8509
+ * Generated after a layout is created and all of its views have either finished or failed navigation
8510
+ * once per layout. Does not emit for layouts created using Layout.replace() API.
8462
8511
  * @interface
8463
8512
  */
8464
8513
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8465
8514
  type: 'layout-initialized';
8466
8515
  layoutIdentity: OpenFin.LayoutIdentity;
8467
- ofViews: (OpenFin.Identity & {
8516
+ ofViews: {
8517
+ identity: OpenFin.Identity;
8468
8518
  entityType: 'view';
8469
- })[];
8519
+ }[];
8470
8520
  };
8471
8521
 
8472
8522
  /**
@@ -8823,7 +8873,7 @@ declare type LayoutOptions = {
8823
8873
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
8824
8874
 
8825
8875
  /**
8826
- * @interface
8876
+ * Layout preset type.
8827
8877
  */
8828
8878
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8829
8879
 
@@ -8834,9 +8884,11 @@ declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8834
8884
  declare type LayoutReadyEvent = BaseEvent_5 & {
8835
8885
  type: 'layout-ready';
8836
8886
  layoutIdentity: OpenFin.LayoutIdentity;
8837
- views: (OpenFin.Identity & {
8887
+ views: {
8888
+ identity: OpenFin.Identity;
8838
8889
  success: boolean;
8839
- })[];
8890
+ error?: Error;
8891
+ }[];
8840
8892
  };
8841
8893
 
8842
8894
  /**
@@ -9538,7 +9590,7 @@ declare type MutableWindowOptions = {
9538
9590
  showTaskbarIcon: boolean;
9539
9591
  interop: InteropConfig;
9540
9592
  /* Excluded from this release type: _internalWorkspaceData */
9541
- workspacePlatform: unknown;
9593
+ /* Excluded from this release type: workspacePlatform */
9542
9594
  };
9543
9595
 
9544
9596
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9726,6 +9778,7 @@ declare namespace OpenFin {
9726
9778
  ResizeRegion,
9727
9779
  Accelerator,
9728
9780
  Api,
9781
+ InjectionType,
9729
9782
  NavigationRules,
9730
9783
  ContentNavigation,
9731
9784
  ContentRedirect,
@@ -9873,6 +9926,9 @@ declare namespace OpenFin {
9873
9926
  RuntimeInfo,
9874
9927
  DefaultDomainSettings,
9875
9928
  DefaultDomainSettingsRule,
9929
+ DomainSettings,
9930
+ ApiInjection,
9931
+ DomainSettingsRule,
9876
9932
  FileDownloadBehaviorNames,
9877
9933
  FileDownloadSettings,
9878
9934
  DownloadRule,
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -111,6 +111,13 @@ declare type ApiClient<T extends Record<any, any>> = {
111
111
  [key in keyof PickOfType<T, Function>]: (...args: Parameters<T[key]>) => ReturnType<T[key]> extends Promise<any> ? ReturnType<T[key]> : Promise<ReturnType<T[key]>>;
112
112
  };
113
113
 
114
+ /**
115
+ * @interface
116
+ */
117
+ declare type ApiInjection = {
118
+ fin: InjectionType;
119
+ };
120
+
114
121
  /**
115
122
  * Generated when a new Platform's API becomes responsive.
116
123
  * @interface
@@ -1178,10 +1185,13 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1178
1185
  */
1179
1186
  apiDiagnostics: boolean;
1180
1187
  /**
1181
- * Define the file download rules.
1182
- * See [here](https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads) for more details.
1188
+ * @deprecated Please use {@link domainSettings} instead
1183
1189
  */
1184
1190
  defaultDomainSettings: DefaultDomainSettings;
1191
+ /**
1192
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
1193
+ */
1194
+ domainSettings: DomainSettings;
1185
1195
  /**
1186
1196
  * @defaultValue false
1187
1197
  *
@@ -3480,9 +3490,13 @@ declare type ConstViewOptions = {
3480
3490
  /**
3481
3491
  * Controls interaction of the view with its parent window's download shelf.
3482
3492
  */
3483
- downloadShelf?: {
3493
+ downloadShelf: {
3484
3494
  /**
3485
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3495
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3496
+ *
3497
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3498
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3499
+ * `enabled: false`.
3486
3500
  */
3487
3501
  enabled: boolean;
3488
3502
  };
@@ -3598,6 +3612,12 @@ declare type ConstWindowOptions = {
3598
3612
  * launches in favor of the cached value.
3599
3613
  */
3600
3614
  defaultWidth: number;
3615
+ /**
3616
+ * Controls the styling and behavior of the window download shelf.
3617
+ *
3618
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3619
+ * triggered by the window itself, or a view targeting the window.
3620
+ */
3601
3621
  downloadShelf: DownloadShelfOptions;
3602
3622
  height: number;
3603
3623
  layout: any;
@@ -4435,21 +4455,15 @@ declare type CustomRequestHeaders = {
4435
4455
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4436
4456
 
4437
4457
  /**
4458
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4438
4459
  * @interface
4439
4460
  */
4440
- declare type DefaultDomainSettings = {
4441
- rules: DefaultDomainSettingsRule[];
4442
- };
4461
+ declare type DefaultDomainSettings = DomainSettings;
4443
4462
 
4444
4463
  /**
4445
- * @interface
4464
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4446
4465
  */
4447
- declare type DefaultDomainSettingsRule = {
4448
- match: string[];
4449
- options: {
4450
- downloadSettings: FileDownloadSettings;
4451
- };
4452
- };
4466
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4453
4467
 
4454
4468
  declare interface DesktopAgent {
4455
4469
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4694,6 +4708,25 @@ declare type DisplayMetadata_3 = {
4694
4708
  readonly glyph?: string;
4695
4709
  };
4696
4710
 
4711
+ /**
4712
+ * @interface
4713
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
4714
+ */
4715
+ declare type DomainSettings = {
4716
+ rules: DomainSettingsRule[];
4717
+ };
4718
+
4719
+ /**
4720
+ * @interface
4721
+ */
4722
+ declare type DomainSettingsRule = {
4723
+ match: string[];
4724
+ options: {
4725
+ downloadSettings?: FileDownloadSettings;
4726
+ api?: ApiInjection;
4727
+ };
4728
+ };
4729
+
4697
4730
  /**
4698
4731
  * Metadata returned from a preload script download request.
4699
4732
  *
@@ -4738,14 +4771,24 @@ declare type DownloadRule = {
4738
4771
  * @interface
4739
4772
  *
4740
4773
  * Controls the styling and behavior of the window download shelf.
4774
+ *
4775
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4776
+ * triggered by the window itself, or a view targeting the window.
4741
4777
  */
4742
4778
  declare type DownloadShelfOptions = {
4743
4779
  /**
4744
- * Whether downloads in this window trigger opening the download shelf.
4780
+ * Whether downloads in this window trigger display of the download shelf.
4781
+ *
4782
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4783
+ * with `downloadShelf: { enabled: true }` initiates a download.
4745
4784
  */
4746
4785
  enabled: boolean;
4747
4786
  /**
4748
4787
  * Styling options for the download shelf border.
4788
+ *
4789
+ * @remarks These apply regardless of whether download shelf display was
4790
+ * triggered by this window itself, or a view targeting the window. Individual views
4791
+ * cannot control the rendering of their parent window's download shelf.
4749
4792
  */
4750
4793
  border?: {
4751
4794
  /**
@@ -4755,7 +4798,7 @@ declare type DownloadShelfOptions = {
4755
4798
  */
4756
4799
  size?: number;
4757
4800
  /**
4758
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4801
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4759
4802
  * if absent.
4760
4803
  */
4761
4804
  color?: string;
@@ -4975,6 +5018,7 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4975
5018
 
4976
5019
  declare interface Environment {
4977
5020
  initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5021
+ applyLayoutSnapshot(fin: OpenFin.Fin<OpenFin.EntityType>, layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.InitLayoutOptions): Promise<void>;
4978
5022
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
4979
5023
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
4980
5024
  resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
@@ -6568,6 +6612,13 @@ declare type InitPlatformOptions = {
6568
6612
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6569
6613
  };
6570
6614
 
6615
+ /**
6616
+ * * 'none': The `fin` API will be not available from within this context.
6617
+ * * 'global': The entire `fin` API will be available from within this context.
6618
+ * @defaultValue 'global'
6619
+ */
6620
+ declare type InjectionType = 'none' | 'global';
6621
+
6571
6622
  /**
6572
6623
  * Generated when the value of the element changes.
6573
6624
  * @interface
@@ -7412,8 +7463,6 @@ declare type InteropBrokerOptions = {
7412
7463
  };
7413
7464
 
7414
7465
  /**
7415
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7416
- *
7417
7466
  * The Interop Client API is broken up into two groups:
7418
7467
  *
7419
7468
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7816,7 +7865,7 @@ declare class InteropClient extends Base {
7816
7865
  * ```
7817
7866
  */
7818
7867
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7819
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7868
+ /* Excluded from this release type: ferryFdc3Call */
7820
7869
  }
7821
7870
 
7822
7871
  /**
@@ -8457,16 +8506,17 @@ declare type LayoutIdentity = Identity_5 & {
8457
8506
  };
8458
8507
 
8459
8508
  /**
8460
- * Generated when the window is created, and all of its layout's views have either finished or failed
8461
- * navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
8509
+ * Generated after a layout is created and all of its views have either finished or failed navigation
8510
+ * once per layout. Does not emit for layouts created using Layout.replace() API.
8462
8511
  * @interface
8463
8512
  */
8464
8513
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8465
8514
  type: 'layout-initialized';
8466
8515
  layoutIdentity: OpenFin.LayoutIdentity;
8467
- ofViews: (OpenFin.Identity & {
8516
+ ofViews: {
8517
+ identity: OpenFin.Identity;
8468
8518
  entityType: 'view';
8469
- })[];
8519
+ }[];
8470
8520
  };
8471
8521
 
8472
8522
  /**
@@ -8823,7 +8873,7 @@ declare type LayoutOptions = {
8823
8873
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
8824
8874
 
8825
8875
  /**
8826
- * @interface
8876
+ * Layout preset type.
8827
8877
  */
8828
8878
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8829
8879
 
@@ -8834,9 +8884,11 @@ declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8834
8884
  declare type LayoutReadyEvent = BaseEvent_5 & {
8835
8885
  type: 'layout-ready';
8836
8886
  layoutIdentity: OpenFin.LayoutIdentity;
8837
- views: (OpenFin.Identity & {
8887
+ views: {
8888
+ identity: OpenFin.Identity;
8838
8889
  success: boolean;
8839
- })[];
8890
+ error?: Error;
8891
+ }[];
8840
8892
  };
8841
8893
 
8842
8894
  /**
@@ -9538,7 +9590,7 @@ declare type MutableWindowOptions = {
9538
9590
  showTaskbarIcon: boolean;
9539
9591
  interop: InteropConfig;
9540
9592
  /* Excluded from this release type: _internalWorkspaceData */
9541
- workspacePlatform: unknown;
9593
+ /* Excluded from this release type: workspacePlatform */
9542
9594
  };
9543
9595
 
9544
9596
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9726,6 +9778,7 @@ declare namespace OpenFin {
9726
9778
  ResizeRegion,
9727
9779
  Accelerator,
9728
9780
  Api,
9781
+ InjectionType,
9729
9782
  NavigationRules,
9730
9783
  ContentNavigation,
9731
9784
  ContentRedirect,
@@ -9873,6 +9926,9 @@ declare namespace OpenFin {
9873
9926
  RuntimeInfo,
9874
9927
  DefaultDomainSettings,
9875
9928
  DefaultDomainSettingsRule,
9929
+ DomainSettings,
9930
+ ApiInjection,
9931
+ DomainSettingsRule,
9876
9932
  FileDownloadBehaviorNames,
9877
9933
  FileDownloadSettings,
9878
9934
  DownloadRule,
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -111,6 +111,13 @@ declare type ApiClient<T extends Record<any, any>> = {
111
111
  [key in keyof PickOfType<T, Function>]: (...args: Parameters<T[key]>) => ReturnType<T[key]> extends Promise<any> ? ReturnType<T[key]> : Promise<ReturnType<T[key]>>;
112
112
  };
113
113
 
114
+ /**
115
+ * @interface
116
+ */
117
+ declare type ApiInjection = {
118
+ fin: InjectionType;
119
+ };
120
+
114
121
  /**
115
122
  * Generated when a new Platform's API becomes responsive.
116
123
  * @interface
@@ -1178,10 +1185,13 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1178
1185
  */
1179
1186
  apiDiagnostics: boolean;
1180
1187
  /**
1181
- * Define the file download rules.
1182
- * See [here](https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads) for more details.
1188
+ * @deprecated Please use {@link domainSettings} instead
1183
1189
  */
1184
1190
  defaultDomainSettings: DefaultDomainSettings;
1191
+ /**
1192
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
1193
+ */
1194
+ domainSettings: DomainSettings;
1185
1195
  /**
1186
1196
  * @defaultValue false
1187
1197
  *
@@ -3480,9 +3490,13 @@ declare type ConstViewOptions = {
3480
3490
  /**
3481
3491
  * Controls interaction of the view with its parent window's download shelf.
3482
3492
  */
3483
- downloadShelf?: {
3493
+ downloadShelf: {
3484
3494
  /**
3485
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3495
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3496
+ *
3497
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3498
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3499
+ * `enabled: false`.
3486
3500
  */
3487
3501
  enabled: boolean;
3488
3502
  };
@@ -3598,6 +3612,12 @@ declare type ConstWindowOptions = {
3598
3612
  * launches in favor of the cached value.
3599
3613
  */
3600
3614
  defaultWidth: number;
3615
+ /**
3616
+ * Controls the styling and behavior of the window download shelf.
3617
+ *
3618
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3619
+ * triggered by the window itself, or a view targeting the window.
3620
+ */
3601
3621
  downloadShelf: DownloadShelfOptions;
3602
3622
  height: number;
3603
3623
  layout: any;
@@ -4435,21 +4455,15 @@ declare type CustomRequestHeaders = {
4435
4455
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4436
4456
 
4437
4457
  /**
4458
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4438
4459
  * @interface
4439
4460
  */
4440
- declare type DefaultDomainSettings = {
4441
- rules: DefaultDomainSettingsRule[];
4442
- };
4461
+ declare type DefaultDomainSettings = DomainSettings;
4443
4462
 
4444
4463
  /**
4445
- * @interface
4464
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4446
4465
  */
4447
- declare type DefaultDomainSettingsRule = {
4448
- match: string[];
4449
- options: {
4450
- downloadSettings: FileDownloadSettings;
4451
- };
4452
- };
4466
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4453
4467
 
4454
4468
  declare interface DesktopAgent {
4455
4469
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4694,6 +4708,25 @@ declare type DisplayMetadata_3 = {
4694
4708
  readonly glyph?: string;
4695
4709
  };
4696
4710
 
4711
+ /**
4712
+ * @interface
4713
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
4714
+ */
4715
+ declare type DomainSettings = {
4716
+ rules: DomainSettingsRule[];
4717
+ };
4718
+
4719
+ /**
4720
+ * @interface
4721
+ */
4722
+ declare type DomainSettingsRule = {
4723
+ match: string[];
4724
+ options: {
4725
+ downloadSettings?: FileDownloadSettings;
4726
+ api?: ApiInjection;
4727
+ };
4728
+ };
4729
+
4697
4730
  /**
4698
4731
  * Metadata returned from a preload script download request.
4699
4732
  *
@@ -4738,14 +4771,24 @@ declare type DownloadRule = {
4738
4771
  * @interface
4739
4772
  *
4740
4773
  * Controls the styling and behavior of the window download shelf.
4774
+ *
4775
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4776
+ * triggered by the window itself, or a view targeting the window.
4741
4777
  */
4742
4778
  declare type DownloadShelfOptions = {
4743
4779
  /**
4744
- * Whether downloads in this window trigger opening the download shelf.
4780
+ * Whether downloads in this window trigger display of the download shelf.
4781
+ *
4782
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4783
+ * with `downloadShelf: { enabled: true }` initiates a download.
4745
4784
  */
4746
4785
  enabled: boolean;
4747
4786
  /**
4748
4787
  * Styling options for the download shelf border.
4788
+ *
4789
+ * @remarks These apply regardless of whether download shelf display was
4790
+ * triggered by this window itself, or a view targeting the window. Individual views
4791
+ * cannot control the rendering of their parent window's download shelf.
4749
4792
  */
4750
4793
  border?: {
4751
4794
  /**
@@ -4755,7 +4798,7 @@ declare type DownloadShelfOptions = {
4755
4798
  */
4756
4799
  size?: number;
4757
4800
  /**
4758
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4801
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4759
4802
  * if absent.
4760
4803
  */
4761
4804
  color?: string;
@@ -4975,6 +5018,7 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4975
5018
 
4976
5019
  declare interface Environment {
4977
5020
  initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5021
+ applyLayoutSnapshot(fin: OpenFin.Fin<OpenFin.EntityType>, layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.InitLayoutOptions): Promise<void>;
4978
5022
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
4979
5023
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
4980
5024
  resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
@@ -6568,6 +6612,13 @@ declare type InitPlatformOptions = {
6568
6612
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6569
6613
  };
6570
6614
 
6615
+ /**
6616
+ * * 'none': The `fin` API will be not available from within this context.
6617
+ * * 'global': The entire `fin` API will be available from within this context.
6618
+ * @defaultValue 'global'
6619
+ */
6620
+ declare type InjectionType = 'none' | 'global';
6621
+
6571
6622
  /**
6572
6623
  * Generated when the value of the element changes.
6573
6624
  * @interface
@@ -7412,8 +7463,6 @@ declare type InteropBrokerOptions = {
7412
7463
  };
7413
7464
 
7414
7465
  /**
7415
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7416
- *
7417
7466
  * The Interop Client API is broken up into two groups:
7418
7467
  *
7419
7468
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7816,7 +7865,7 @@ declare class InteropClient extends Base {
7816
7865
  * ```
7817
7866
  */
7818
7867
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7819
- static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7868
+ /* Excluded from this release type: ferryFdc3Call */
7820
7869
  }
7821
7870
 
7822
7871
  /**
@@ -8457,16 +8506,17 @@ declare type LayoutIdentity = Identity_5 & {
8457
8506
  };
8458
8507
 
8459
8508
  /**
8460
- * Generated when the window is created, and all of its layout's views have either finished or failed
8461
- * navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
8509
+ * Generated after a layout is created and all of its views have either finished or failed navigation
8510
+ * once per layout. Does not emit for layouts created using Layout.replace() API.
8462
8511
  * @interface
8463
8512
  */
8464
8513
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8465
8514
  type: 'layout-initialized';
8466
8515
  layoutIdentity: OpenFin.LayoutIdentity;
8467
- ofViews: (OpenFin.Identity & {
8516
+ ofViews: {
8517
+ identity: OpenFin.Identity;
8468
8518
  entityType: 'view';
8469
- })[];
8519
+ }[];
8470
8520
  };
8471
8521
 
8472
8522
  /**
@@ -8823,7 +8873,7 @@ declare type LayoutOptions = {
8823
8873
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
8824
8874
 
8825
8875
  /**
8826
- * @interface
8876
+ * Layout preset type.
8827
8877
  */
8828
8878
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8829
8879
 
@@ -8834,9 +8884,11 @@ declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8834
8884
  declare type LayoutReadyEvent = BaseEvent_5 & {
8835
8885
  type: 'layout-ready';
8836
8886
  layoutIdentity: OpenFin.LayoutIdentity;
8837
- views: (OpenFin.Identity & {
8887
+ views: {
8888
+ identity: OpenFin.Identity;
8838
8889
  success: boolean;
8839
- })[];
8890
+ error?: Error;
8891
+ }[];
8840
8892
  };
8841
8893
 
8842
8894
  /**
@@ -9538,7 +9590,7 @@ declare type MutableWindowOptions = {
9538
9590
  showTaskbarIcon: boolean;
9539
9591
  interop: InteropConfig;
9540
9592
  /* Excluded from this release type: _internalWorkspaceData */
9541
- workspacePlatform: unknown;
9593
+ /* Excluded from this release type: workspacePlatform */
9542
9594
  };
9543
9595
 
9544
9596
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9726,6 +9778,7 @@ declare namespace OpenFin {
9726
9778
  ResizeRegion,
9727
9779
  Accelerator,
9728
9780
  Api,
9781
+ InjectionType,
9729
9782
  NavigationRules,
9730
9783
  ContentNavigation,
9731
9784
  ContentRedirect,
@@ -9873,6 +9926,9 @@ declare namespace OpenFin {
9873
9926
  RuntimeInfo,
9874
9927
  DefaultDomainSettings,
9875
9928
  DefaultDomainSettingsRule,
9929
+ DomainSettings,
9930
+ ApiInjection,
9931
+ DomainSettingsRule,
9876
9932
  FileDownloadBehaviorNames,
9877
9933
  FileDownloadSettings,
9878
9934
  DownloadRule,
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -111,6 +111,13 @@ declare type ApiClient<T extends Record<any, any>> = {
111
111
  [key in keyof PickOfType<T, Function>]: (...args: Parameters<T[key]>) => ReturnType<T[key]> extends Promise<any> ? ReturnType<T[key]> : Promise<ReturnType<T[key]>>;
112
112
  };
113
113
 
114
+ /**
115
+ * @interface
116
+ */
117
+ declare type ApiInjection = {
118
+ fin: InjectionType;
119
+ };
120
+
114
121
  /**
115
122
  * Generated when a new Platform's API becomes responsive.
116
123
  * @interface
@@ -1184,10 +1191,13 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1184
1191
  */
1185
1192
  apiDiagnostics: boolean;
1186
1193
  /**
1187
- * Define the file download rules.
1188
- * See [here](https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads) for more details.
1194
+ * @deprecated Please use {@link domainSettings} instead
1189
1195
  */
1190
1196
  defaultDomainSettings: DefaultDomainSettings;
1197
+ /**
1198
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
1199
+ */
1200
+ domainSettings: DomainSettings;
1191
1201
  /**
1192
1202
  * @defaultValue false
1193
1203
  *
@@ -3523,9 +3533,13 @@ declare type ConstViewOptions = {
3523
3533
  /**
3524
3534
  * Controls interaction of the view with its parent window's download shelf.
3525
3535
  */
3526
- downloadShelf?: {
3536
+ downloadShelf: {
3527
3537
  /**
3528
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3538
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3539
+ *
3540
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3541
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3542
+ * `enabled: false`.
3529
3543
  */
3530
3544
  enabled: boolean;
3531
3545
  };
@@ -3641,6 +3655,12 @@ declare type ConstWindowOptions = {
3641
3655
  * launches in favor of the cached value.
3642
3656
  */
3643
3657
  defaultWidth: number;
3658
+ /**
3659
+ * Controls the styling and behavior of the window download shelf.
3660
+ *
3661
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3662
+ * triggered by the window itself, or a view targeting the window.
3663
+ */
3644
3664
  downloadShelf: DownloadShelfOptions;
3645
3665
  height: number;
3646
3666
  layout: any;
@@ -4478,21 +4498,15 @@ declare type CustomRequestHeaders = {
4478
4498
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4479
4499
 
4480
4500
  /**
4501
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4481
4502
  * @interface
4482
4503
  */
4483
- declare type DefaultDomainSettings = {
4484
- rules: DefaultDomainSettingsRule[];
4485
- };
4504
+ declare type DefaultDomainSettings = DomainSettings;
4486
4505
 
4487
4506
  /**
4488
- * @interface
4507
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4489
4508
  */
4490
- declare type DefaultDomainSettingsRule = {
4491
- match: string[];
4492
- options: {
4493
- downloadSettings: FileDownloadSettings;
4494
- };
4495
- };
4509
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4496
4510
 
4497
4511
  declare interface DesktopAgent {
4498
4512
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4737,6 +4751,25 @@ declare type DisplayMetadata_3 = {
4737
4751
  readonly glyph?: string;
4738
4752
  };
4739
4753
 
4754
+ /**
4755
+ * @interface
4756
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
4757
+ */
4758
+ declare type DomainSettings = {
4759
+ rules: DomainSettingsRule[];
4760
+ };
4761
+
4762
+ /**
4763
+ * @interface
4764
+ */
4765
+ declare type DomainSettingsRule = {
4766
+ match: string[];
4767
+ options: {
4768
+ downloadSettings?: FileDownloadSettings;
4769
+ api?: ApiInjection;
4770
+ };
4771
+ };
4772
+
4740
4773
  /**
4741
4774
  * Metadata returned from a preload script download request.
4742
4775
  *
@@ -4781,14 +4814,24 @@ declare type DownloadRule = {
4781
4814
  * @interface
4782
4815
  *
4783
4816
  * Controls the styling and behavior of the window download shelf.
4817
+ *
4818
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4819
+ * triggered by the window itself, or a view targeting the window.
4784
4820
  */
4785
4821
  declare type DownloadShelfOptions = {
4786
4822
  /**
4787
- * Whether downloads in this window trigger opening the download shelf.
4823
+ * Whether downloads in this window trigger display of the download shelf.
4824
+ *
4825
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4826
+ * with `downloadShelf: { enabled: true }` initiates a download.
4788
4827
  */
4789
4828
  enabled: boolean;
4790
4829
  /**
4791
4830
  * Styling options for the download shelf border.
4831
+ *
4832
+ * @remarks These apply regardless of whether download shelf display was
4833
+ * triggered by this window itself, or a view targeting the window. Individual views
4834
+ * cannot control the rendering of their parent window's download shelf.
4792
4835
  */
4793
4836
  border?: {
4794
4837
  /**
@@ -4798,7 +4841,7 @@ declare type DownloadShelfOptions = {
4798
4841
  */
4799
4842
  size?: number;
4800
4843
  /**
4801
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4844
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4802
4845
  * if absent.
4803
4846
  */
4804
4847
  color?: string;
@@ -5023,6 +5066,7 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5023
5066
 
5024
5067
  declare interface Environment {
5025
5068
  initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5069
+ applyLayoutSnapshot(fin: OpenFin.Fin<OpenFin.EntityType>, layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.InitLayoutOptions): Promise<void>;
5026
5070
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5027
5071
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
5028
5072
  resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
@@ -6668,6 +6712,13 @@ declare type InitPlatformOptions = {
6668
6712
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6669
6713
  };
6670
6714
 
6715
+ /**
6716
+ * * 'none': The `fin` API will be not available from within this context.
6717
+ * * 'global': The entire `fin` API will be available from within this context.
6718
+ * @defaultValue 'global'
6719
+ */
6720
+ declare type InjectionType = 'none' | 'global';
6721
+
6671
6722
  /**
6672
6723
  * Generated when the value of the element changes.
6673
6724
  * @interface
@@ -7527,8 +7578,6 @@ declare type InteropBrokerOptions = {
7527
7578
  };
7528
7579
 
7529
7580
  /**
7530
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7531
- *
7532
7581
  * The Interop Client API is broken up into two groups:
7533
7582
  *
7534
7583
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7934,6 +7983,11 @@ declare class InteropClient extends Base {
7934
7983
  * ```
7935
7984
  */
7936
7985
  onDisconnection(listener: OpenFin.InteropClientOnDisconnectionListener): Promise<void>;
7986
+ /**
7987
+ * @internal
7988
+ *
7989
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
7990
+ */
7937
7991
  static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
7938
7992
  }
7939
7993
 
@@ -8581,16 +8635,17 @@ declare type LayoutIdentity = Identity_5 & {
8581
8635
  };
8582
8636
 
8583
8637
  /**
8584
- * Generated when the window is created, and all of its layout's views have either finished or failed
8585
- * navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
8638
+ * Generated after a layout is created and all of its views have either finished or failed navigation
8639
+ * once per layout. Does not emit for layouts created using Layout.replace() API.
8586
8640
  * @interface
8587
8641
  */
8588
8642
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8589
8643
  type: 'layout-initialized';
8590
8644
  layoutIdentity: OpenFin.LayoutIdentity;
8591
- ofViews: (OpenFin.Identity & {
8645
+ ofViews: {
8646
+ identity: OpenFin.Identity;
8592
8647
  entityType: 'view';
8593
- })[];
8648
+ }[];
8594
8649
  };
8595
8650
 
8596
8651
  /**
@@ -9117,7 +9172,7 @@ declare type LayoutOptions = {
9117
9172
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9118
9173
 
9119
9174
  /**
9120
- * @interface
9175
+ * Layout preset type.
9121
9176
  */
9122
9177
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9123
9178
 
@@ -9128,9 +9183,11 @@ declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9128
9183
  declare type LayoutReadyEvent = BaseEvent_5 & {
9129
9184
  type: 'layout-ready';
9130
9185
  layoutIdentity: OpenFin.LayoutIdentity;
9131
- views: (OpenFin.Identity & {
9186
+ views: {
9187
+ identity: OpenFin.Identity;
9132
9188
  success: boolean;
9133
- })[];
9189
+ error?: Error;
9190
+ }[];
9134
9191
  };
9135
9192
 
9136
9193
  /**
@@ -9840,7 +9897,11 @@ declare type MutableWindowOptions = {
9840
9897
  * Used by Workspace to store custom data. Overwriting or modifying this field may impact the functionality of Workspace
9841
9898
  */
9842
9899
  _internalWorkspaceData: any;
9843
- workspacePlatform: unknown;
9900
+ /**
9901
+ * @internal
9902
+ * Used by workspace to stork platform specific options. Overwriting or modifying this field may impact the functionality of Workspace
9903
+ */
9904
+ workspacePlatform: WorkspacePlatformOptions;
9844
9905
  };
9845
9906
 
9846
9907
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10038,6 +10099,7 @@ declare namespace OpenFin {
10038
10099
  ResizeRegion,
10039
10100
  Accelerator,
10040
10101
  Api,
10102
+ InjectionType,
10041
10103
  NavigationRules,
10042
10104
  ContentNavigation,
10043
10105
  ContentRedirect,
@@ -10185,6 +10247,9 @@ declare namespace OpenFin {
10185
10247
  RuntimeInfo,
10186
10248
  DefaultDomainSettings,
10187
10249
  DefaultDomainSettingsRule,
10250
+ DomainSettings,
10251
+ ApiInjection,
10252
+ DomainSettingsRule,
10188
10253
  FileDownloadBehaviorNames,
10189
10254
  FileDownloadSettings,
10190
10255
  DownloadRule,
@@ -8054,7 +8054,8 @@ function errorToPOJO(error) {
8054
8054
  stack: error.stack,
8055
8055
  name: error.name,
8056
8056
  message: error.message,
8057
- toString: error.toString
8057
+ // support the case where stack is empty or missing
8058
+ toString: () => error.stack || error.toString()
8058
8059
  };
8059
8060
  }
8060
8061
  errors.errorToPOJO = errorToPOJO;
@@ -11286,7 +11287,7 @@ const validate_1 = validate;
11286
11287
  const base_1$6 = base$1;
11287
11288
  const common_utils_1 = commonUtils;
11288
11289
  const layout_entities_1 = layoutEntities;
11289
- const layout_constants_1 = layout_constants;
11290
+ const layout_constants_1$1 = layout_constants;
11290
11291
  /**
11291
11292
  *
11292
11293
  * Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
@@ -11431,7 +11432,7 @@ class Layout extends base_1$6.Base {
11431
11432
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
11432
11433
  * The client is for {@link LayoutEntitiesController}
11433
11434
  */
11434
- _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1.LAYOUT_CONTROLLER_ID, this.identity)));
11435
+ _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
11435
11436
  /**
11436
11437
  * Replaces a Platform window's layout with a new layout.
11437
11438
  *
@@ -11659,11 +11660,12 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
11659
11660
  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");
11660
11661
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11661
11662
  };
11662
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
11663
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getSafeLayoutManager;
11663
11664
  Object.defineProperty(Factory$2, "__esModule", { value: true });
11664
11665
  Factory$2.LayoutModule = void 0;
11665
11666
  const base_1$5 = base$1;
11666
11667
  const Instance_1$2 = Instance$1;
11668
+ const layout_constants_1 = layout_constants;
11667
11669
  /**
11668
11670
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
11669
11671
  */
@@ -11712,7 +11714,7 @@ class LayoutModule extends base_1$5.Base {
11712
11714
  * ```
11713
11715
  */
11714
11716
  this.init = async (options = {}) => {
11715
- this.wire.sendAction('layout-init').catch((e) => {
11717
+ this.wire.sendAction('layout-init').catch(() => {
11716
11718
  // don't expose
11717
11719
  });
11718
11720
  if (!this.fin.me.isWindow) {
@@ -11722,54 +11724,30 @@ class LayoutModule extends base_1$5.Base {
11722
11724
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
11723
11725
  }
11724
11726
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
11727
+ // preload the client
11728
+ await this.fin.Platform.getCurrentSync().getClient();
11725
11729
  __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
11726
- // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
11727
- const platformClient = await this.fin.Platform.getCurrentSync().getClient();
11728
- const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
11729
- await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
11730
+ await this.wire.environment.applyLayoutSnapshot(this.fin, __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
11730
11731
  if (!options.layoutManagerOverride) {
11731
- return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
11732
+ // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
11733
+ const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
11734
+ const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11735
+ return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
11732
11736
  }
11733
- // warn user if they do not call create() in the next 30 seconds
11734
- setTimeout(() => {
11735
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").size() === 0) {
11736
- console.warn(`[Layout.init] Layout.init was called 30s ago, but no layouts have been created yet. Make sure you ` +
11737
- `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
11738
- }
11739
- }, 30000);
11740
11737
  return this.wrapSync(this.fin.me.identity);
11741
11738
  };
11742
- _LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
11743
- let layoutManager;
11744
- let resolve;
11745
- const layoutResolved = new Promise((r) => {
11746
- resolve = r;
11747
- });
11748
- // wait for a layout to be created
11749
- await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
11750
- layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11751
- // Backward compat - undocumented / not typed openfin-layout as layoutManager
11752
- // TODO: eventually deprecate this
11753
- resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
11754
- });
11755
- return layoutResolved;
11756
- });
11757
11739
  /**
11758
11740
  * Returns the layout manager for the current window
11759
11741
  * @returns
11760
11742
  */
11761
11743
  this.getCurrentLayoutManagerSync = () => {
11762
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11763
- // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
11764
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
11744
+ return __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11765
11745
  };
11766
11746
  this.create = async (options) => {
11767
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.create()`);
11768
- return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
11747
+ return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
11769
11748
  };
11770
11749
  this.destroy = async (layoutIdentity) => {
11771
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.destroy()`);
11772
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11750
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
11773
11751
  };
11774
11752
  }
11775
11753
  /**
@@ -11792,7 +11770,7 @@ class LayoutModule extends base_1$5.Base {
11792
11770
  * ```
11793
11771
  */
11794
11772
  async wrap(identity) {
11795
- this.wire.sendAction('layout-wrap').catch((e) => {
11773
+ this.wire.sendAction('layout-wrap').catch(() => {
11796
11774
  // don't expose
11797
11775
  });
11798
11776
  return new Instance_1$2.Layout(identity, this.wire);
@@ -11817,7 +11795,7 @@ class LayoutModule extends base_1$5.Base {
11817
11795
  * ```
11818
11796
  */
11819
11797
  wrapSync(identity) {
11820
- this.wire.sendAction('layout-wrap-sync').catch((e) => {
11798
+ this.wire.sendAction('layout-wrap-sync').catch(() => {
11821
11799
  // don't expose
11822
11800
  });
11823
11801
  return new Instance_1$2.Layout(identity, this.wire);
@@ -11833,7 +11811,7 @@ class LayoutModule extends base_1$5.Base {
11833
11811
  * ```
11834
11812
  */
11835
11813
  async getCurrent() {
11836
- this.wire.sendAction('layout-get-current').catch((e) => {
11814
+ this.wire.sendAction('layout-get-current').catch(() => {
11837
11815
  // don't expose
11838
11816
  });
11839
11817
  if (!this.fin.me.isWindow) {
@@ -11856,7 +11834,7 @@ class LayoutModule extends base_1$5.Base {
11856
11834
  * ```
11857
11835
  */
11858
11836
  getCurrentSync() {
11859
- this.wire.sendAction('layout-get-current-sync').catch((e) => {
11837
+ this.wire.sendAction('layout-get-current-sync').catch(() => {
11860
11838
  // don't expose
11861
11839
  });
11862
11840
  if (!this.fin.me.isWindow) {
@@ -11867,10 +11845,11 @@ class LayoutModule extends base_1$5.Base {
11867
11845
  }
11868
11846
  }
11869
11847
  Factory$2.LayoutModule = LayoutModule;
11870
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
11848
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
11871
11849
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
11872
11850
  throw new Error(`You must call init before using the API ${method}`);
11873
11851
  }
11852
+ return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
11874
11853
  };
11875
11854
 
11876
11855
  (function (exports) {
@@ -14208,8 +14187,6 @@ const base_1$2 = base$1;
14208
14187
  const SessionContextGroupClient_1 = SessionContextGroupClient$1;
14209
14188
  const utils_1$2 = utils$1;
14210
14189
  /**
14211
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
14212
- *
14213
14190
  * The Interop Client API is broken up into two groups:
14214
14191
  *
14215
14192
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -14775,7 +14752,11 @@ class InteropClient extends base_1$2.Base {
14775
14752
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
14776
14753
  });
14777
14754
  }
14778
- // used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
14755
+ /**
14756
+ * @internal
14757
+ *
14758
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
14759
+ */
14779
14760
  static async ferryFdc3Call(interopClient, action, payload) {
14780
14761
  const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
14781
14762
  return client.dispatch(action, payload || null);
@@ -14792,29 +14773,33 @@ function requireOverrideCheck () {
14792
14773
  if (hasRequiredOverrideCheck) return overrideCheck;
14793
14774
  hasRequiredOverrideCheck = 1;
14794
14775
  Object.defineProperty(overrideCheck, "__esModule", { value: true });
14795
- overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
14776
+ overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
14796
14777
  const InteropBroker_1 = requireInteropBroker();
14797
14778
  function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
14798
14779
  const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
14799
14780
  return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
14800
14781
  }
14801
14782
  overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
14802
- // TODO: Unit test this
14783
+ function checkFDC32Overrides(overriddenBroker) {
14784
+ // These are the APIs that must be overridden for FDC3 2.0 compliance
14785
+ const mustOverrideAPIs = [
14786
+ 'fdc3HandleFindInstances',
14787
+ 'handleInfoForIntent',
14788
+ 'handleInfoForIntentsByContext',
14789
+ 'fdc3HandleGetAppMetadata',
14790
+ 'fdc3HandleGetInfo',
14791
+ 'fdc3HandleOpen',
14792
+ 'handleFiredIntent',
14793
+ 'handleFiredIntentForContext'
14794
+ ];
14795
+ return mustOverrideAPIs.filter((api) => {
14796
+ return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
14797
+ });
14798
+ }
14799
+ overrideCheck.checkFDC32Overrides = checkFDC32Overrides;
14803
14800
  function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
14804
14801
  if (fdc3InteropApi && fdc3InteropApi === '2.0') {
14805
- const mustOverrideAPIs = [
14806
- 'fdc3HandleFindInstances',
14807
- 'handleInfoForIntent',
14808
- 'handleInfoForIntentsByContext',
14809
- 'fdc3HandleGetAppMetadata',
14810
- 'fdc3HandleGetInfo',
14811
- 'fdc3HandleOpen',
14812
- 'handleFiredIntent',
14813
- 'handleFiredIntentForContext'
14814
- ];
14815
- const notOverridden = mustOverrideAPIs.filter((api) => {
14816
- return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
14817
- });
14802
+ const notOverridden = checkFDC32Overrides(overriddenBroker);
14818
14803
  if (notOverridden.length > 0) {
14819
14804
  console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
14820
14805
  }
@@ -16171,6 +16156,9 @@ function requireNodeEnv () {
16171
16156
  async initLayoutManager() {
16172
16157
  throw new Error('Method not implemented.');
16173
16158
  }
16159
+ async applyLayoutSnapshot() {
16160
+ throw new Error('Method not implemented.');
16161
+ }
16174
16162
  async createLayout() {
16175
16163
  throw new Error('Method not implemented.');
16176
16164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "35.78.29",
3
+ "version": "35.79.2",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",