@openfin/core 35.78.27 → 35.79.1

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
  *
@@ -3476,9 +3486,13 @@ declare type ConstViewOptions = {
3476
3486
  /**
3477
3487
  * Controls interaction of the view with its parent window's download shelf.
3478
3488
  */
3479
- downloadShelf?: {
3489
+ downloadShelf: {
3480
3490
  /**
3481
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3491
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3492
+ *
3493
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3494
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3495
+ * `enabled: false`.
3482
3496
  */
3483
3497
  enabled: boolean;
3484
3498
  };
@@ -3594,6 +3608,12 @@ declare type ConstWindowOptions = {
3594
3608
  * launches in favor of the cached value.
3595
3609
  */
3596
3610
  defaultWidth: number;
3611
+ /**
3612
+ * Controls the styling and behavior of the window download shelf.
3613
+ *
3614
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3615
+ * triggered by the window itself, or a view targeting the window.
3616
+ */
3597
3617
  downloadShelf: DownloadShelfOptions;
3598
3618
  height: number;
3599
3619
  layout: any;
@@ -4431,21 +4451,15 @@ declare type CustomRequestHeaders = {
4431
4451
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4432
4452
 
4433
4453
  /**
4454
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4434
4455
  * @interface
4435
4456
  */
4436
- declare type DefaultDomainSettings = {
4437
- rules: DefaultDomainSettingsRule[];
4438
- };
4457
+ declare type DefaultDomainSettings = DomainSettings;
4439
4458
 
4440
4459
  /**
4441
- * @interface
4460
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4442
4461
  */
4443
- declare type DefaultDomainSettingsRule = {
4444
- match: string[];
4445
- options: {
4446
- downloadSettings: FileDownloadSettings;
4447
- };
4448
- };
4462
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4449
4463
 
4450
4464
  declare interface DesktopAgent {
4451
4465
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4690,6 +4704,25 @@ declare type DisplayMetadata_3 = {
4690
4704
  readonly glyph?: string;
4691
4705
  };
4692
4706
 
4707
+ /**
4708
+ * @interface
4709
+ * 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.
4710
+ */
4711
+ declare type DomainSettings = {
4712
+ rules: DomainSettingsRule[];
4713
+ };
4714
+
4715
+ /**
4716
+ * @interface
4717
+ */
4718
+ declare type DomainSettingsRule = {
4719
+ match: string[];
4720
+ options: {
4721
+ downloadSettings?: FileDownloadSettings;
4722
+ api?: ApiInjection;
4723
+ };
4724
+ };
4725
+
4693
4726
  /**
4694
4727
  * Metadata returned from a preload script download request.
4695
4728
  *
@@ -4734,14 +4767,24 @@ declare type DownloadRule = {
4734
4767
  * @interface
4735
4768
  *
4736
4769
  * Controls the styling and behavior of the window download shelf.
4770
+ *
4771
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4772
+ * triggered by the window itself, or a view targeting the window.
4737
4773
  */
4738
4774
  declare type DownloadShelfOptions = {
4739
4775
  /**
4740
- * Whether downloads in this window trigger opening the download shelf.
4776
+ * Whether downloads in this window trigger display of the download shelf.
4777
+ *
4778
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4779
+ * with `downloadShelf: { enabled: true }` initiates a download.
4741
4780
  */
4742
4781
  enabled: boolean;
4743
4782
  /**
4744
4783
  * Styling options for the download shelf border.
4784
+ *
4785
+ * @remarks These apply regardless of whether download shelf display was
4786
+ * triggered by this window itself, or a view targeting the window. Individual views
4787
+ * cannot control the rendering of their parent window's download shelf.
4745
4788
  */
4746
4789
  border?: {
4747
4790
  /**
@@ -4751,7 +4794,7 @@ declare type DownloadShelfOptions = {
4751
4794
  */
4752
4795
  size?: number;
4753
4796
  /**
4754
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4797
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4755
4798
  * if absent.
4756
4799
  */
4757
4800
  color?: string;
@@ -6560,6 +6603,13 @@ declare type InitPlatformOptions = {
6560
6603
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6561
6604
  };
6562
6605
 
6606
+ /**
6607
+ * * 'none': The `fin` API will be not available from within this context.
6608
+ * * 'global': The entire `fin` API will be available from within this context.
6609
+ * @defaultValue 'global'
6610
+ */
6611
+ declare type InjectionType = 'none' | 'global';
6612
+
6563
6613
  /**
6564
6614
  * Generated when the value of the element changes.
6565
6615
  * @interface
@@ -7404,8 +7454,6 @@ declare type InteropBrokerOptions = {
7404
7454
  };
7405
7455
 
7406
7456
  /**
7407
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7408
- *
7409
7457
  * The Interop Client API is broken up into two groups:
7410
7458
  *
7411
7459
  * **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.
@@ -7808,7 +7856,7 @@ declare class InteropClient extends Base {
7808
7856
  * ```
7809
7857
  */
7810
7858
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7811
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7859
+ /* Excluded from this release type: ferryFdc3Call */
7812
7860
  }
7813
7861
 
7814
7862
  /**
@@ -8736,7 +8784,7 @@ declare type LayoutOptions = {
8736
8784
  * @defaultValue false
8737
8785
  *
8738
8786
  * Limits the area to which tabs can be dragged.
8739
- * If true, stack headers are the only areas where tabs can be dropped.
8787
+ * If true, the layout container is the only area where tabs can be dropped.
8740
8788
  */
8741
8789
  constrainDragToContainer?: boolean;
8742
8790
  /**
@@ -8813,7 +8861,7 @@ declare type LayoutOptions = {
8813
8861
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
8814
8862
 
8815
8863
  /**
8816
- * @interface
8864
+ * Layout preset type.
8817
8865
  */
8818
8866
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8819
8867
 
@@ -9528,7 +9576,7 @@ declare type MutableWindowOptions = {
9528
9576
  showTaskbarIcon: boolean;
9529
9577
  interop: InteropConfig;
9530
9578
  /* Excluded from this release type: _internalWorkspaceData */
9531
- workspacePlatform: unknown;
9579
+ /* Excluded from this release type: workspacePlatform */
9532
9580
  };
9533
9581
 
9534
9582
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9716,6 +9764,7 @@ declare namespace OpenFin_2 {
9716
9764
  ResizeRegion,
9717
9765
  Accelerator,
9718
9766
  Api,
9767
+ InjectionType,
9719
9768
  NavigationRules,
9720
9769
  ContentNavigation,
9721
9770
  ContentRedirect,
@@ -9863,6 +9912,9 @@ declare namespace OpenFin_2 {
9863
9912
  RuntimeInfo,
9864
9913
  DefaultDomainSettings,
9865
9914
  DefaultDomainSettingsRule,
9915
+ DomainSettings,
9916
+ ApiInjection,
9917
+ DomainSettingsRule,
9866
9918
  FileDownloadBehaviorNames,
9867
9919
  FileDownloadSettings,
9868
9920
  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
  *
@@ -3476,9 +3486,13 @@ declare type ConstViewOptions = {
3476
3486
  /**
3477
3487
  * Controls interaction of the view with its parent window's download shelf.
3478
3488
  */
3479
- downloadShelf?: {
3489
+ downloadShelf: {
3480
3490
  /**
3481
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3491
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3492
+ *
3493
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3494
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3495
+ * `enabled: false`.
3482
3496
  */
3483
3497
  enabled: boolean;
3484
3498
  };
@@ -3594,6 +3608,12 @@ declare type ConstWindowOptions = {
3594
3608
  * launches in favor of the cached value.
3595
3609
  */
3596
3610
  defaultWidth: number;
3611
+ /**
3612
+ * Controls the styling and behavior of the window download shelf.
3613
+ *
3614
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3615
+ * triggered by the window itself, or a view targeting the window.
3616
+ */
3597
3617
  downloadShelf: DownloadShelfOptions;
3598
3618
  height: number;
3599
3619
  layout: any;
@@ -4431,21 +4451,15 @@ declare type CustomRequestHeaders = {
4431
4451
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4432
4452
 
4433
4453
  /**
4454
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4434
4455
  * @interface
4435
4456
  */
4436
- declare type DefaultDomainSettings = {
4437
- rules: DefaultDomainSettingsRule[];
4438
- };
4457
+ declare type DefaultDomainSettings = DomainSettings;
4439
4458
 
4440
4459
  /**
4441
- * @interface
4460
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4442
4461
  */
4443
- declare type DefaultDomainSettingsRule = {
4444
- match: string[];
4445
- options: {
4446
- downloadSettings: FileDownloadSettings;
4447
- };
4448
- };
4462
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4449
4463
 
4450
4464
  declare interface DesktopAgent {
4451
4465
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4690,6 +4704,25 @@ declare type DisplayMetadata_3 = {
4690
4704
  readonly glyph?: string;
4691
4705
  };
4692
4706
 
4707
+ /**
4708
+ * @interface
4709
+ * 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.
4710
+ */
4711
+ declare type DomainSettings = {
4712
+ rules: DomainSettingsRule[];
4713
+ };
4714
+
4715
+ /**
4716
+ * @interface
4717
+ */
4718
+ declare type DomainSettingsRule = {
4719
+ match: string[];
4720
+ options: {
4721
+ downloadSettings?: FileDownloadSettings;
4722
+ api?: ApiInjection;
4723
+ };
4724
+ };
4725
+
4693
4726
  /**
4694
4727
  * Metadata returned from a preload script download request.
4695
4728
  *
@@ -4734,14 +4767,24 @@ declare type DownloadRule = {
4734
4767
  * @interface
4735
4768
  *
4736
4769
  * Controls the styling and behavior of the window download shelf.
4770
+ *
4771
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4772
+ * triggered by the window itself, or a view targeting the window.
4737
4773
  */
4738
4774
  declare type DownloadShelfOptions = {
4739
4775
  /**
4740
- * Whether downloads in this window trigger opening the download shelf.
4776
+ * Whether downloads in this window trigger display of the download shelf.
4777
+ *
4778
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4779
+ * with `downloadShelf: { enabled: true }` initiates a download.
4741
4780
  */
4742
4781
  enabled: boolean;
4743
4782
  /**
4744
4783
  * Styling options for the download shelf border.
4784
+ *
4785
+ * @remarks These apply regardless of whether download shelf display was
4786
+ * triggered by this window itself, or a view targeting the window. Individual views
4787
+ * cannot control the rendering of their parent window's download shelf.
4745
4788
  */
4746
4789
  border?: {
4747
4790
  /**
@@ -4751,7 +4794,7 @@ declare type DownloadShelfOptions = {
4751
4794
  */
4752
4795
  size?: number;
4753
4796
  /**
4754
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4797
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4755
4798
  * if absent.
4756
4799
  */
4757
4800
  color?: string;
@@ -6560,6 +6603,13 @@ declare type InitPlatformOptions = {
6560
6603
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6561
6604
  };
6562
6605
 
6606
+ /**
6607
+ * * 'none': The `fin` API will be not available from within this context.
6608
+ * * 'global': The entire `fin` API will be available from within this context.
6609
+ * @defaultValue 'global'
6610
+ */
6611
+ declare type InjectionType = 'none' | 'global';
6612
+
6563
6613
  /**
6564
6614
  * Generated when the value of the element changes.
6565
6615
  * @interface
@@ -7404,8 +7454,6 @@ declare type InteropBrokerOptions = {
7404
7454
  };
7405
7455
 
7406
7456
  /**
7407
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7408
- *
7409
7457
  * The Interop Client API is broken up into two groups:
7410
7458
  *
7411
7459
  * **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.
@@ -7808,7 +7856,7 @@ declare class InteropClient extends Base {
7808
7856
  * ```
7809
7857
  */
7810
7858
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7811
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7859
+ /* Excluded from this release type: ferryFdc3Call */
7812
7860
  }
7813
7861
 
7814
7862
  /**
@@ -8736,7 +8784,7 @@ declare type LayoutOptions = {
8736
8784
  * @defaultValue false
8737
8785
  *
8738
8786
  * Limits the area to which tabs can be dragged.
8739
- * If true, stack headers are the only areas where tabs can be dropped.
8787
+ * If true, the layout container is the only area where tabs can be dropped.
8740
8788
  */
8741
8789
  constrainDragToContainer?: boolean;
8742
8790
  /**
@@ -8813,7 +8861,7 @@ declare type LayoutOptions = {
8813
8861
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
8814
8862
 
8815
8863
  /**
8816
- * @interface
8864
+ * Layout preset type.
8817
8865
  */
8818
8866
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8819
8867
 
@@ -9528,7 +9576,7 @@ declare type MutableWindowOptions = {
9528
9576
  showTaskbarIcon: boolean;
9529
9577
  interop: InteropConfig;
9530
9578
  /* Excluded from this release type: _internalWorkspaceData */
9531
- workspacePlatform: unknown;
9579
+ /* Excluded from this release type: workspacePlatform */
9532
9580
  };
9533
9581
 
9534
9582
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9716,6 +9764,7 @@ declare namespace OpenFin_2 {
9716
9764
  ResizeRegion,
9717
9765
  Accelerator,
9718
9766
  Api,
9767
+ InjectionType,
9719
9768
  NavigationRules,
9720
9769
  ContentNavigation,
9721
9770
  ContentRedirect,
@@ -9863,6 +9912,9 @@ declare namespace OpenFin_2 {
9863
9912
  RuntimeInfo,
9864
9913
  DefaultDomainSettings,
9865
9914
  DefaultDomainSettingsRule,
9915
+ DomainSettings,
9916
+ ApiInjection,
9917
+ DomainSettingsRule,
9866
9918
  FileDownloadBehaviorNames,
9867
9919
  FileDownloadSettings,
9868
9920
  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
  *
@@ -3476,9 +3486,13 @@ declare type ConstViewOptions = {
3476
3486
  /**
3477
3487
  * Controls interaction of the view with its parent window's download shelf.
3478
3488
  */
3479
- downloadShelf?: {
3489
+ downloadShelf: {
3480
3490
  /**
3481
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3491
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3492
+ *
3493
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3494
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3495
+ * `enabled: false`.
3482
3496
  */
3483
3497
  enabled: boolean;
3484
3498
  };
@@ -3594,6 +3608,12 @@ declare type ConstWindowOptions = {
3594
3608
  * launches in favor of the cached value.
3595
3609
  */
3596
3610
  defaultWidth: number;
3611
+ /**
3612
+ * Controls the styling and behavior of the window download shelf.
3613
+ *
3614
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3615
+ * triggered by the window itself, or a view targeting the window.
3616
+ */
3597
3617
  downloadShelf: DownloadShelfOptions;
3598
3618
  height: number;
3599
3619
  layout: any;
@@ -4431,21 +4451,15 @@ declare type CustomRequestHeaders = {
4431
4451
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4432
4452
 
4433
4453
  /**
4454
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4434
4455
  * @interface
4435
4456
  */
4436
- declare type DefaultDomainSettings = {
4437
- rules: DefaultDomainSettingsRule[];
4438
- };
4457
+ declare type DefaultDomainSettings = DomainSettings;
4439
4458
 
4440
4459
  /**
4441
- * @interface
4460
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4442
4461
  */
4443
- declare type DefaultDomainSettingsRule = {
4444
- match: string[];
4445
- options: {
4446
- downloadSettings: FileDownloadSettings;
4447
- };
4448
- };
4462
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4449
4463
 
4450
4464
  declare interface DesktopAgent {
4451
4465
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4690,6 +4704,25 @@ declare type DisplayMetadata_3 = {
4690
4704
  readonly glyph?: string;
4691
4705
  };
4692
4706
 
4707
+ /**
4708
+ * @interface
4709
+ * 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.
4710
+ */
4711
+ declare type DomainSettings = {
4712
+ rules: DomainSettingsRule[];
4713
+ };
4714
+
4715
+ /**
4716
+ * @interface
4717
+ */
4718
+ declare type DomainSettingsRule = {
4719
+ match: string[];
4720
+ options: {
4721
+ downloadSettings?: FileDownloadSettings;
4722
+ api?: ApiInjection;
4723
+ };
4724
+ };
4725
+
4693
4726
  /**
4694
4727
  * Metadata returned from a preload script download request.
4695
4728
  *
@@ -4734,14 +4767,24 @@ declare type DownloadRule = {
4734
4767
  * @interface
4735
4768
  *
4736
4769
  * Controls the styling and behavior of the window download shelf.
4770
+ *
4771
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4772
+ * triggered by the window itself, or a view targeting the window.
4737
4773
  */
4738
4774
  declare type DownloadShelfOptions = {
4739
4775
  /**
4740
- * Whether downloads in this window trigger opening the download shelf.
4776
+ * Whether downloads in this window trigger display of the download shelf.
4777
+ *
4778
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4779
+ * with `downloadShelf: { enabled: true }` initiates a download.
4741
4780
  */
4742
4781
  enabled: boolean;
4743
4782
  /**
4744
4783
  * Styling options for the download shelf border.
4784
+ *
4785
+ * @remarks These apply regardless of whether download shelf display was
4786
+ * triggered by this window itself, or a view targeting the window. Individual views
4787
+ * cannot control the rendering of their parent window's download shelf.
4745
4788
  */
4746
4789
  border?: {
4747
4790
  /**
@@ -4751,7 +4794,7 @@ declare type DownloadShelfOptions = {
4751
4794
  */
4752
4795
  size?: number;
4753
4796
  /**
4754
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4797
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4755
4798
  * if absent.
4756
4799
  */
4757
4800
  color?: string;
@@ -6560,6 +6603,13 @@ declare type InitPlatformOptions = {
6560
6603
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6561
6604
  };
6562
6605
 
6606
+ /**
6607
+ * * 'none': The `fin` API will be not available from within this context.
6608
+ * * 'global': The entire `fin` API will be available from within this context.
6609
+ * @defaultValue 'global'
6610
+ */
6611
+ declare type InjectionType = 'none' | 'global';
6612
+
6563
6613
  /**
6564
6614
  * Generated when the value of the element changes.
6565
6615
  * @interface
@@ -7404,8 +7454,6 @@ declare type InteropBrokerOptions = {
7404
7454
  };
7405
7455
 
7406
7456
  /**
7407
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7408
- *
7409
7457
  * The Interop Client API is broken up into two groups:
7410
7458
  *
7411
7459
  * **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.
@@ -7808,7 +7856,7 @@ declare class InteropClient extends Base {
7808
7856
  * ```
7809
7857
  */
7810
7858
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7811
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7859
+ /* Excluded from this release type: ferryFdc3Call */
7812
7860
  }
7813
7861
 
7814
7862
  /**
@@ -8736,7 +8784,7 @@ declare type LayoutOptions = {
8736
8784
  * @defaultValue false
8737
8785
  *
8738
8786
  * Limits the area to which tabs can be dragged.
8739
- * If true, stack headers are the only areas where tabs can be dropped.
8787
+ * If true, the layout container is the only area where tabs can be dropped.
8740
8788
  */
8741
8789
  constrainDragToContainer?: boolean;
8742
8790
  /**
@@ -8813,7 +8861,7 @@ declare type LayoutOptions = {
8813
8861
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
8814
8862
 
8815
8863
  /**
8816
- * @interface
8864
+ * Layout preset type.
8817
8865
  */
8818
8866
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
8819
8867
 
@@ -9528,7 +9576,7 @@ declare type MutableWindowOptions = {
9528
9576
  showTaskbarIcon: boolean;
9529
9577
  interop: InteropConfig;
9530
9578
  /* Excluded from this release type: _internalWorkspaceData */
9531
- workspacePlatform: unknown;
9579
+ /* Excluded from this release type: workspacePlatform */
9532
9580
  };
9533
9581
 
9534
9582
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -9716,6 +9764,7 @@ declare namespace OpenFin_2 {
9716
9764
  ResizeRegion,
9717
9765
  Accelerator,
9718
9766
  Api,
9767
+ InjectionType,
9719
9768
  NavigationRules,
9720
9769
  ContentNavigation,
9721
9770
  ContentRedirect,
@@ -9863,6 +9912,9 @@ declare namespace OpenFin_2 {
9863
9912
  RuntimeInfo,
9864
9913
  DefaultDomainSettings,
9865
9914
  DefaultDomainSettingsRule,
9915
+ DomainSettings,
9916
+ ApiInjection,
9917
+ DomainSettingsRule,
9866
9918
  FileDownloadBehaviorNames,
9867
9919
  FileDownloadSettings,
9868
9920
  DownloadRule,
package/out/mock.d.ts CHANGED
@@ -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
  *
@@ -3519,9 +3529,13 @@ declare type ConstViewOptions = {
3519
3529
  /**
3520
3530
  * Controls interaction of the view with its parent window's download shelf.
3521
3531
  */
3522
- downloadShelf?: {
3532
+ downloadShelf: {
3523
3533
  /**
3524
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3534
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3535
+ *
3536
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3537
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3538
+ * `enabled: false`.
3525
3539
  */
3526
3540
  enabled: boolean;
3527
3541
  };
@@ -3637,6 +3651,12 @@ declare type ConstWindowOptions = {
3637
3651
  * launches in favor of the cached value.
3638
3652
  */
3639
3653
  defaultWidth: number;
3654
+ /**
3655
+ * Controls the styling and behavior of the window download shelf.
3656
+ *
3657
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3658
+ * triggered by the window itself, or a view targeting the window.
3659
+ */
3640
3660
  downloadShelf: DownloadShelfOptions;
3641
3661
  height: number;
3642
3662
  layout: any;
@@ -4474,21 +4494,15 @@ declare type CustomRequestHeaders = {
4474
4494
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4475
4495
 
4476
4496
  /**
4497
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4477
4498
  * @interface
4478
4499
  */
4479
- declare type DefaultDomainSettings = {
4480
- rules: DefaultDomainSettingsRule[];
4481
- };
4500
+ declare type DefaultDomainSettings = DomainSettings;
4482
4501
 
4483
4502
  /**
4484
- * @interface
4503
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4485
4504
  */
4486
- declare type DefaultDomainSettingsRule = {
4487
- match: string[];
4488
- options: {
4489
- downloadSettings: FileDownloadSettings;
4490
- };
4491
- };
4505
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4492
4506
 
4493
4507
  declare interface DesktopAgent {
4494
4508
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4733,6 +4747,25 @@ declare type DisplayMetadata_3 = {
4733
4747
  readonly glyph?: string;
4734
4748
  };
4735
4749
 
4750
+ /**
4751
+ * @interface
4752
+ * 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.
4753
+ */
4754
+ declare type DomainSettings = {
4755
+ rules: DomainSettingsRule[];
4756
+ };
4757
+
4758
+ /**
4759
+ * @interface
4760
+ */
4761
+ declare type DomainSettingsRule = {
4762
+ match: string[];
4763
+ options: {
4764
+ downloadSettings?: FileDownloadSettings;
4765
+ api?: ApiInjection;
4766
+ };
4767
+ };
4768
+
4736
4769
  /**
4737
4770
  * Metadata returned from a preload script download request.
4738
4771
  *
@@ -4777,14 +4810,24 @@ declare type DownloadRule = {
4777
4810
  * @interface
4778
4811
  *
4779
4812
  * Controls the styling and behavior of the window download shelf.
4813
+ *
4814
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4815
+ * triggered by the window itself, or a view targeting the window.
4780
4816
  */
4781
4817
  declare type DownloadShelfOptions = {
4782
4818
  /**
4783
- * Whether downloads in this window trigger opening the download shelf.
4819
+ * Whether downloads in this window trigger display of the download shelf.
4820
+ *
4821
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4822
+ * with `downloadShelf: { enabled: true }` initiates a download.
4784
4823
  */
4785
4824
  enabled: boolean;
4786
4825
  /**
4787
4826
  * Styling options for the download shelf border.
4827
+ *
4828
+ * @remarks These apply regardless of whether download shelf display was
4829
+ * triggered by this window itself, or a view targeting the window. Individual views
4830
+ * cannot control the rendering of their parent window's download shelf.
4788
4831
  */
4789
4832
  border?: {
4790
4833
  /**
@@ -4794,7 +4837,7 @@ declare type DownloadShelfOptions = {
4794
4837
  */
4795
4838
  size?: number;
4796
4839
  /**
4797
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4840
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4798
4841
  * if absent.
4799
4842
  */
4800
4843
  color?: string;
@@ -6638,6 +6681,13 @@ declare type InitPlatformOptions = {
6638
6681
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6639
6682
  };
6640
6683
 
6684
+ /**
6685
+ * * 'none': The `fin` API will be not available from within this context.
6686
+ * * 'global': The entire `fin` API will be available from within this context.
6687
+ * @defaultValue 'global'
6688
+ */
6689
+ declare type InjectionType = 'none' | 'global';
6690
+
6641
6691
  /**
6642
6692
  * Generated when the value of the element changes.
6643
6693
  * @interface
@@ -7497,8 +7547,6 @@ declare type InteropBrokerOptions = {
7497
7547
  };
7498
7548
 
7499
7549
  /**
7500
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7501
- *
7502
7550
  * The Interop Client API is broken up into two groups:
7503
7551
  *
7504
7552
  * **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.
@@ -7904,6 +7952,11 @@ declare class InteropClient extends Base {
7904
7952
  * ```
7905
7953
  */
7906
7954
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7955
+ /**
7956
+ * @internal
7957
+ *
7958
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
7959
+ */
7907
7960
  static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7908
7961
  }
7909
7962
 
@@ -9008,7 +9061,7 @@ declare type LayoutOptions = {
9008
9061
  * @defaultValue false
9009
9062
  *
9010
9063
  * Limits the area to which tabs can be dragged.
9011
- * If true, stack headers are the only areas where tabs can be dropped.
9064
+ * If true, the layout container is the only area where tabs can be dropped.
9012
9065
  */
9013
9066
  constrainDragToContainer?: boolean;
9014
9067
  /**
@@ -9085,7 +9138,7 @@ declare type LayoutOptions = {
9085
9138
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9086
9139
 
9087
9140
  /**
9088
- * @interface
9141
+ * Layout preset type.
9089
9142
  */
9090
9143
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9091
9144
 
@@ -9808,7 +9861,11 @@ declare type MutableWindowOptions = {
9808
9861
  * Used by Workspace to store custom data. Overwriting or modifying this field may impact the functionality of Workspace
9809
9862
  */
9810
9863
  _internalWorkspaceData: any;
9811
- workspacePlatform: unknown;
9864
+ /**
9865
+ * @internal
9866
+ * Used by workspace to stork platform specific options. Overwriting or modifying this field may impact the functionality of Workspace
9867
+ */
9868
+ workspacePlatform: WorkspacePlatformOptions;
9812
9869
  };
9813
9870
 
9814
9871
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10006,6 +10063,7 @@ declare namespace OpenFin_2 {
10006
10063
  ResizeRegion,
10007
10064
  Accelerator,
10008
10065
  Api,
10066
+ InjectionType,
10009
10067
  NavigationRules,
10010
10068
  ContentNavigation,
10011
10069
  ContentRedirect,
@@ -10153,6 +10211,9 @@ declare namespace OpenFin_2 {
10153
10211
  RuntimeInfo,
10154
10212
  DefaultDomainSettings,
10155
10213
  DefaultDomainSettingsRule,
10214
+ DomainSettings,
10215
+ ApiInjection,
10216
+ DomainSettingsRule,
10156
10217
  FileDownloadBehaviorNames,
10157
10218
  FileDownloadSettings,
10158
10219
  DownloadRule,
package/out/mock.js CHANGED
@@ -8274,7 +8274,8 @@ function errorToPOJO(error) {
8274
8274
  stack: error.stack,
8275
8275
  name: error.name,
8276
8276
  message: error.message,
8277
- toString: error.toString
8277
+ // support the case where stack is empty or missing
8278
+ toString: () => error.stack || error.toString()
8278
8279
  };
8279
8280
  }
8280
8281
  errors.errorToPOJO = errorToPOJO;
@@ -11879,7 +11880,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
11879
11880
  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");
11880
11881
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11881
11882
  };
11882
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
11883
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_waitForBackCompatLayoutManager, _LayoutModule_getSafeLayoutManager;
11883
11884
  Object.defineProperty(Factory$2, "__esModule", { value: true });
11884
11885
  Factory$2.LayoutModule = void 0;
11885
11886
  const base_1$5 = base;
@@ -11932,7 +11933,7 @@ class LayoutModule extends base_1$5.Base {
11932
11933
  * ```
11933
11934
  */
11934
11935
  this.init = async (options = {}) => {
11935
- this.wire.sendAction('layout-init').catch((e) => {
11936
+ this.wire.sendAction('layout-init').catch(() => {
11936
11937
  // don't expose
11937
11938
  });
11938
11939
  if (!this.fin.me.isWindow) {
@@ -11943,23 +11944,29 @@ class LayoutModule extends base_1$5.Base {
11943
11944
  }
11944
11945
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
11945
11946
  __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
11947
+ // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
11948
+ let backCompatLayoutPromise;
11949
+ if (!options.layoutManagerOverride) {
11950
+ backCompatLayoutPromise = __classPrivateFieldGet$4(this, _LayoutModule_waitForBackCompatLayoutManager, "f").call(this, this.fin);
11951
+ }
11946
11952
  // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
11947
11953
  const platformClient = await this.fin.Platform.getCurrentSync().getClient();
11948
11954
  const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
11949
11955
  await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
11950
- if (!options.layoutManagerOverride) {
11951
- return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
11956
+ if (backCompatLayoutPromise) {
11957
+ return backCompatLayoutPromise;
11952
11958
  }
11953
11959
  // warn user if they do not call create() in the next 30 seconds
11954
11960
  setTimeout(() => {
11955
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").size() === 0) {
11961
+ if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")?.size() === 0) {
11956
11962
  console.warn(`[Layout.init] Layout.init was called 30s ago, but no layouts have been created yet. Make sure you ` +
11957
11963
  `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
11958
11964
  }
11959
11965
  }, 30000);
11960
11966
  return this.wrapSync(this.fin.me.identity);
11961
11967
  };
11962
- _LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
11968
+ // deprecate with CORE-1081
11969
+ _LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
11963
11970
  let layoutManager;
11964
11971
  let resolve;
11965
11972
  const layoutResolved = new Promise((r) => {
@@ -11967,6 +11974,7 @@ class LayoutModule extends base_1$5.Base {
11967
11974
  });
11968
11975
  // wait for a layout to be created
11969
11976
  await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
11977
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
11970
11978
  layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11971
11979
  // Backward compat - undocumented / not typed openfin-layout as layoutManager
11972
11980
  // TODO: eventually deprecate this
@@ -11979,17 +11987,13 @@ class LayoutModule extends base_1$5.Base {
11979
11987
  * @returns
11980
11988
  */
11981
11989
  this.getCurrentLayoutManagerSync = () => {
11982
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11983
- // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
11984
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
11990
+ return __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11985
11991
  };
11986
11992
  this.create = async (options) => {
11987
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.create()`);
11988
- return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
11993
+ return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
11989
11994
  };
11990
11995
  this.destroy = async (layoutIdentity) => {
11991
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.destroy()`);
11992
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11996
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
11993
11997
  };
11994
11998
  }
11995
11999
  /**
@@ -12012,7 +12016,7 @@ class LayoutModule extends base_1$5.Base {
12012
12016
  * ```
12013
12017
  */
12014
12018
  async wrap(identity) {
12015
- this.wire.sendAction('layout-wrap').catch((e) => {
12019
+ this.wire.sendAction('layout-wrap').catch(() => {
12016
12020
  // don't expose
12017
12021
  });
12018
12022
  return new Instance_1$2.Layout(identity, this.wire);
@@ -12037,7 +12041,7 @@ class LayoutModule extends base_1$5.Base {
12037
12041
  * ```
12038
12042
  */
12039
12043
  wrapSync(identity) {
12040
- this.wire.sendAction('layout-wrap-sync').catch((e) => {
12044
+ this.wire.sendAction('layout-wrap-sync').catch(() => {
12041
12045
  // don't expose
12042
12046
  });
12043
12047
  return new Instance_1$2.Layout(identity, this.wire);
@@ -12053,7 +12057,7 @@ class LayoutModule extends base_1$5.Base {
12053
12057
  * ```
12054
12058
  */
12055
12059
  async getCurrent() {
12056
- this.wire.sendAction('layout-get-current').catch((e) => {
12060
+ this.wire.sendAction('layout-get-current').catch(() => {
12057
12061
  // don't expose
12058
12062
  });
12059
12063
  if (!this.fin.me.isWindow) {
@@ -12076,7 +12080,7 @@ class LayoutModule extends base_1$5.Base {
12076
12080
  * ```
12077
12081
  */
12078
12082
  getCurrentSync() {
12079
- this.wire.sendAction('layout-get-current-sync').catch((e) => {
12083
+ this.wire.sendAction('layout-get-current-sync').catch(() => {
12080
12084
  // don't expose
12081
12085
  });
12082
12086
  if (!this.fin.me.isWindow) {
@@ -12087,10 +12091,11 @@ class LayoutModule extends base_1$5.Base {
12087
12091
  }
12088
12092
  }
12089
12093
  Factory$2.LayoutModule = LayoutModule;
12090
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12094
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_waitForBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
12091
12095
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
12092
12096
  throw new Error(`You must call init before using the API ${method}`);
12093
12097
  }
12098
+ return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
12094
12099
  };
12095
12100
 
12096
12101
  (function (exports) {
@@ -14428,8 +14433,6 @@ const base_1$2 = base;
14428
14433
  const SessionContextGroupClient_1 = SessionContextGroupClient$1;
14429
14434
  const utils_1$2 = utils$1;
14430
14435
  /**
14431
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
14432
- *
14433
14436
  * The Interop Client API is broken up into two groups:
14434
14437
  *
14435
14438
  * **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.
@@ -14995,7 +14998,11 @@ class InteropClient extends base_1$2.Base {
14995
14998
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
14996
14999
  });
14997
15000
  }
14998
- // used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15001
+ /**
15002
+ * @internal
15003
+ *
15004
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
15005
+ */
14999
15006
  static async ferryFdc3Call(interopClient, action, payload) {
15000
15007
  const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
15001
15008
  return client.dispatch(action, payload || null);
@@ -15012,29 +15019,33 @@ function requireOverrideCheck () {
15012
15019
  if (hasRequiredOverrideCheck) return overrideCheck;
15013
15020
  hasRequiredOverrideCheck = 1;
15014
15021
  Object.defineProperty(overrideCheck, "__esModule", { value: true });
15015
- overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
15022
+ overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
15016
15023
  const InteropBroker_1 = requireInteropBroker();
15017
15024
  function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
15018
15025
  const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
15019
15026
  return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
15020
15027
  }
15021
15028
  overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
15022
- // TODO: Unit test this
15029
+ function checkFDC32Overrides(overriddenBroker) {
15030
+ // These are the APIs that must be overridden for FDC3 2.0 compliance
15031
+ const mustOverrideAPIs = [
15032
+ 'fdc3HandleFindInstances',
15033
+ 'handleInfoForIntent',
15034
+ 'handleInfoForIntentsByContext',
15035
+ 'fdc3HandleGetAppMetadata',
15036
+ 'fdc3HandleGetInfo',
15037
+ 'fdc3HandleOpen',
15038
+ 'handleFiredIntent',
15039
+ 'handleFiredIntentForContext'
15040
+ ];
15041
+ return mustOverrideAPIs.filter((api) => {
15042
+ return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
15043
+ });
15044
+ }
15045
+ overrideCheck.checkFDC32Overrides = checkFDC32Overrides;
15023
15046
  function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
15024
15047
  if (fdc3InteropApi && fdc3InteropApi === '2.0') {
15025
- const mustOverrideAPIs = [
15026
- 'fdc3HandleFindInstances',
15027
- 'handleInfoForIntent',
15028
- 'handleInfoForIntentsByContext',
15029
- 'fdc3HandleGetAppMetadata',
15030
- 'fdc3HandleGetInfo',
15031
- 'fdc3HandleOpen',
15032
- 'handleFiredIntent',
15033
- 'handleFiredIntentForContext'
15034
- ];
15035
- const notOverridden = mustOverrideAPIs.filter((api) => {
15036
- return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
15037
- });
15048
+ const notOverridden = checkFDC32Overrides(overriddenBroker);
15038
15049
  if (notOverridden.length > 0) {
15039
15050
  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')}`);
15040
15051
  }
@@ -15939,6 +15950,7 @@ var mockWire = {};
15939
15950
 
15940
15951
  Object.defineProperty(mockWire, "__esModule", { value: true });
15941
15952
  mockWire.MockWire = void 0;
15953
+ /* eslint-disable @typescript-eslint/no-unused-vars */
15942
15954
  const events_1 = require$$0;
15943
15955
  class MockWire extends events_1.EventEmitter {
15944
15956
  connect() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "35.78.27",
3
+ "version": "35.79.1",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",