@openfin/core 34.78.53 → 34.78.56

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.
@@ -3636,7 +3636,7 @@ declare type ConstWindowOptions = {
3636
3636
  /**
3637
3637
  * @defaultValue true
3638
3638
  *
3639
- * Toggling off would keep the Window alive even if all its Views were closed.
3639
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3640
3640
  * This is meant for advanced users and should be used with caution.
3641
3641
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3642
3642
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3646,7 +3646,8 @@ declare type ConstWindowOptions = {
3646
3646
  /**
3647
3647
  * @defaultValue 'all'
3648
3648
  *
3649
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3649
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3650
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3650
3651
  * **NOTE:** - This option is ignored in non-Platforms apps.
3651
3652
  */
3652
3653
  viewsPreventingClose: 'all' | 'layout';
@@ -4453,7 +4454,7 @@ declare type CreateViewPayload = {
4453
4454
  /**
4454
4455
  * @interface
4455
4456
  */
4456
- declare type CreateViewTarget = LayoutIdentity & {
4457
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4457
4458
  /**
4458
4459
  * If specified, view creation will not attach to a window and caller must
4459
4460
  * insert the view into the layout explicitly
@@ -4593,6 +4594,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4593
4594
  type: 'destroyed';
4594
4595
  };
4595
4596
 
4597
+ /**
4598
+ * @interface
4599
+ */
4600
+ declare type DeviceInfo = {
4601
+ vendorId: string | number;
4602
+ productId: string | number;
4603
+ };
4604
+
4596
4605
  /**
4597
4606
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4598
4607
  * @interface
@@ -5053,9 +5062,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5053
5062
  } : never;
5054
5063
 
5055
5064
  declare interface Environment {
5056
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5065
+ initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5057
5066
  createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5058
5067
  destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
5068
+ resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5059
5069
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5060
5070
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5061
5071
  writeToken(path: string, token: string): Promise<string>;
@@ -7433,7 +7443,7 @@ declare class InteropBroker extends Base {
7433
7443
  * // }
7434
7444
  * ```
7435
7445
  *
7436
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7446
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7437
7447
  *
7438
7448
  * @param contextForIntent Data passed between entities and applications.
7439
7449
  * @param clientIdentity Identity of the Client making the request.
@@ -8607,7 +8617,7 @@ declare type LaunchIntoPlatformPayload = {
8607
8617
  declare class Layout extends Base {
8608
8618
  #private;
8609
8619
  /* Excluded from this release type: init */
8610
- identity: OpenFin_2.LayoutIdentity;
8620
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8611
8621
  private platform;
8612
8622
  wire: Transport;
8613
8623
  /* Excluded from this release type: __constructor */
@@ -8823,25 +8833,23 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8823
8833
  */
8824
8834
  declare type LayoutIdentity = Identity_5 & {
8825
8835
  /**
8826
- * The name of the layout an action should be targeted to. When not provided,
8827
- * OpenFin attempts to resolve the instance via visibility checks.
8836
+ * The name of the layout in a given window.
8828
8837
  */
8829
- layoutName?: string;
8838
+ layoutName: string;
8830
8839
  };
8831
8840
 
8832
8841
  /**
8833
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8842
+ * Generated when the window and all of its layout's views have either finished or failed navigation, once per layout.
8834
8843
  * @interface
8835
8844
  */
8836
8845
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8837
8846
  type: 'layout-initialized';
8847
+ layoutIdentity: OpenFin_2.LayoutIdentity;
8838
8848
  ofViews: (OpenFin_2.Identity & {
8839
8849
  entityType: 'view';
8840
8850
  })[];
8841
8851
  };
8842
8852
 
8843
- /* Excluded from this release type: LayoutInstance */
8844
-
8845
8853
  /**
8846
8854
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8847
8855
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8869,7 +8877,7 @@ declare type LayoutItemConfig = {
8869
8877
  *
8870
8878
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8871
8879
  *
8872
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8880
+ * Responsible for aggregating all layout snapshots and storing layout instances
8873
8881
  */
8874
8882
  declare interface LayoutManager<T extends LayoutSnapshot> {
8875
8883
  /**
@@ -8893,16 +8901,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8893
8901
  * @throws if Object.keys(snapshot).length > 1
8894
8902
  */
8895
8903
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8896
- /**
8897
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8898
- * contains a single layout.
8899
- *
8900
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8901
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8902
- *
8903
- * @param snapshot
8904
- * @throws if Object.keys(snapshot).length > 1
8905
- */
8906
8904
  /**
8907
8905
  * @experimental
8908
8906
  *
@@ -8923,31 +8921,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8923
8921
  /**
8924
8922
  * @experimental
8925
8923
  *
8926
- * @param layoutIdentity
8927
- * @returns
8924
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8925
+ * this method to control the target layout for Layout API calls.
8926
+ *
8927
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8928
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8929
+ * "last visible" layout identity and return it.
8930
+ *
8931
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8932
+ * call must route to in this order of precedence:
8933
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8934
+ * - if there is only 1 layout, resolves that one
8935
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8936
+ * - returns undefined
8937
+ *
8938
+ * @param identity
8939
+ * @returns LayoutIdentity | undefined
8928
8940
  */
8929
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8941
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8930
8942
  /**
8931
8943
  * @experimental
8932
8944
  *
8933
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8934
- * Throws if it does not exist.
8935
- * @param layoutName
8936
- * @returns
8945
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8946
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8947
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8948
+ * signify to your application it's time to destroy this layout.
8949
+ *
8950
+ * Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
8951
+ *
8952
+ * @param LayoutIdentity
8937
8953
  */
8938
- getLayoutByName(layoutName: string): LayoutInstance;
8954
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8939
8955
  /**
8940
8956
  * @experimental
8941
8957
  */
8942
- getLayouts(): Record<string, LayoutInstance>;
8958
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8943
8959
  /**
8944
8960
  * @experimental
8945
8961
  */
8946
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8962
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8947
8963
  /**
8948
8964
  * @experimental
8949
8965
  */
8950
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8966
+ size(): number;
8951
8967
  }
8952
8968
 
8953
8969
  /**
@@ -8994,7 +9010,7 @@ declare class LayoutModule extends Base {
8994
9010
  * const layoutConfig = await layout.getConfig();
8995
9011
  * ```
8996
9012
  */
8997
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9013
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8998
9014
  /**
8999
9015
  * Synchronously returns a Layout object that represents a Window's layout.
9000
9016
  *
@@ -9014,7 +9030,7 @@ declare class LayoutModule extends Base {
9014
9030
  * const layoutConfig = await layout.getConfig();
9015
9031
  * ```
9016
9032
  */
9017
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9033
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9018
9034
  /**
9019
9035
  * Asynchronously returns a Layout object that represents a Window's layout.
9020
9036
  *
@@ -9190,11 +9206,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9190
9206
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9191
9207
 
9192
9208
  /**
9193
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9209
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9194
9210
  * @interface
9195
9211
  */
9196
9212
  declare type LayoutReadyEvent = BaseEvent_5 & {
9197
9213
  type: 'layout-ready';
9214
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9198
9215
  views: (OpenFin_2.Identity & {
9199
9216
  success: boolean;
9200
9217
  })[];
@@ -10132,6 +10149,7 @@ declare namespace OpenFin_2 {
10132
10149
  WebPermission,
10133
10150
  VerboseWebPermission,
10134
10151
  OpenExternalPermission,
10152
+ DeviceInfo,
10135
10153
  Permissions_2 as Permissions,
10136
10154
  PlatformWindowCreationOptions,
10137
10155
  PlatformWindowOptions,
@@ -10289,7 +10307,6 @@ declare namespace OpenFin_2 {
10289
10307
  InitLayoutOptions,
10290
10308
  LayoutManagerConstructor,
10291
10309
  LayoutManagerOverride,
10292
- LayoutInstance,
10293
10310
  LayoutManager,
10294
10311
  CreateLayoutOptions,
10295
10312
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10481,6 +10498,7 @@ declare type Permissions_2 = {
10481
10498
  Application?: Partial<ApplicationPermissions>;
10482
10499
  System?: Partial<SystemPermissions>;
10483
10500
  webAPIs?: WebPermission[];
10501
+ devices?: DeviceInfo[];
10484
10502
  };
10485
10503
 
10486
10504
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -12821,7 +12839,7 @@ declare type ReplaceLayoutPayload = {
12821
12839
  /**
12822
12840
  * Identity of the window whose layout will be replaced.
12823
12841
  */
12824
- target: LayoutIdentity;
12842
+ target: Identity_5 | LayoutIdentity;
12825
12843
  };
12826
12844
 
12827
12845
  /**
@@ -16411,7 +16429,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
16411
16429
  */
16412
16430
  declare type ViewDetachedEvent = BaseEvent_5 & {
16413
16431
  type: 'view-detached';
16414
- target: OpenFin_2.Identity;
16432
+ target: OpenFin_2.Identity | null;
16415
16433
  previousTarget: OpenFin_2.Identity;
16416
16434
  viewIdentity: OpenFin_2.Identity;
16417
16435
  };
@@ -17647,7 +17665,7 @@ declare namespace WebContentsEvents {
17647
17665
  * `clipboard-read`: Request access to read from the clipboard.<br>
17648
17666
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17649
17667
  */
17650
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17668
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17651
17669
 
17652
17670
  /**
17653
17671
  * Object representing headers and their values, where the
@@ -3636,7 +3636,7 @@ declare type ConstWindowOptions = {
3636
3636
  /**
3637
3637
  * @defaultValue true
3638
3638
  *
3639
- * Toggling off would keep the Window alive even if all its Views were closed.
3639
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3640
3640
  * This is meant for advanced users and should be used with caution.
3641
3641
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3642
3642
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3646,7 +3646,8 @@ declare type ConstWindowOptions = {
3646
3646
  /**
3647
3647
  * @defaultValue 'all'
3648
3648
  *
3649
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3649
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3650
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3650
3651
  * **NOTE:** - This option is ignored in non-Platforms apps.
3651
3652
  */
3652
3653
  viewsPreventingClose: 'all' | 'layout';
@@ -4453,7 +4454,7 @@ declare type CreateViewPayload = {
4453
4454
  /**
4454
4455
  * @interface
4455
4456
  */
4456
- declare type CreateViewTarget = LayoutIdentity & {
4457
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4457
4458
  /**
4458
4459
  * If specified, view creation will not attach to a window and caller must
4459
4460
  * insert the view into the layout explicitly
@@ -4593,6 +4594,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4593
4594
  type: 'destroyed';
4594
4595
  };
4595
4596
 
4597
+ /**
4598
+ * @interface
4599
+ */
4600
+ declare type DeviceInfo = {
4601
+ vendorId: string | number;
4602
+ productId: string | number;
4603
+ };
4604
+
4596
4605
  /**
4597
4606
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4598
4607
  * @interface
@@ -5053,9 +5062,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5053
5062
  } : never;
5054
5063
 
5055
5064
  declare interface Environment {
5056
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5065
+ initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5057
5066
  createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5058
5067
  destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
5068
+ resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5059
5069
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5060
5070
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5061
5071
  writeToken(path: string, token: string): Promise<string>;
@@ -7433,7 +7443,7 @@ declare class InteropBroker extends Base {
7433
7443
  * // }
7434
7444
  * ```
7435
7445
  *
7436
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7446
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7437
7447
  *
7438
7448
  * @param contextForIntent Data passed between entities and applications.
7439
7449
  * @param clientIdentity Identity of the Client making the request.
@@ -8607,7 +8617,7 @@ declare type LaunchIntoPlatformPayload = {
8607
8617
  declare class Layout extends Base {
8608
8618
  #private;
8609
8619
  /* Excluded from this release type: init */
8610
- identity: OpenFin_2.LayoutIdentity;
8620
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8611
8621
  private platform;
8612
8622
  wire: Transport;
8613
8623
  /* Excluded from this release type: __constructor */
@@ -8823,25 +8833,23 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8823
8833
  */
8824
8834
  declare type LayoutIdentity = Identity_5 & {
8825
8835
  /**
8826
- * The name of the layout an action should be targeted to. When not provided,
8827
- * OpenFin attempts to resolve the instance via visibility checks.
8836
+ * The name of the layout in a given window.
8828
8837
  */
8829
- layoutName?: string;
8838
+ layoutName: string;
8830
8839
  };
8831
8840
 
8832
8841
  /**
8833
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8842
+ * Generated when the window and all of its layout's views have either finished or failed navigation, once per layout.
8834
8843
  * @interface
8835
8844
  */
8836
8845
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8837
8846
  type: 'layout-initialized';
8847
+ layoutIdentity: OpenFin_2.LayoutIdentity;
8838
8848
  ofViews: (OpenFin_2.Identity & {
8839
8849
  entityType: 'view';
8840
8850
  })[];
8841
8851
  };
8842
8852
 
8843
- /* Excluded from this release type: LayoutInstance */
8844
-
8845
8853
  /**
8846
8854
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8847
8855
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8869,7 +8877,7 @@ declare type LayoutItemConfig = {
8869
8877
  *
8870
8878
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8871
8879
  *
8872
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8880
+ * Responsible for aggregating all layout snapshots and storing layout instances
8873
8881
  */
8874
8882
  declare interface LayoutManager<T extends LayoutSnapshot> {
8875
8883
  /**
@@ -8893,16 +8901,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8893
8901
  * @throws if Object.keys(snapshot).length > 1
8894
8902
  */
8895
8903
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8896
- /**
8897
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8898
- * contains a single layout.
8899
- *
8900
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8901
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8902
- *
8903
- * @param snapshot
8904
- * @throws if Object.keys(snapshot).length > 1
8905
- */
8906
8904
  /**
8907
8905
  * @experimental
8908
8906
  *
@@ -8923,31 +8921,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8923
8921
  /**
8924
8922
  * @experimental
8925
8923
  *
8926
- * @param layoutIdentity
8927
- * @returns
8924
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8925
+ * this method to control the target layout for Layout API calls.
8926
+ *
8927
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8928
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8929
+ * "last visible" layout identity and return it.
8930
+ *
8931
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8932
+ * call must route to in this order of precedence:
8933
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8934
+ * - if there is only 1 layout, resolves that one
8935
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8936
+ * - returns undefined
8937
+ *
8938
+ * @param identity
8939
+ * @returns LayoutIdentity | undefined
8928
8940
  */
8929
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8941
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8930
8942
  /**
8931
8943
  * @experimental
8932
8944
  *
8933
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8934
- * Throws if it does not exist.
8935
- * @param layoutName
8936
- * @returns
8945
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8946
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8947
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8948
+ * signify to your application it's time to destroy this layout.
8949
+ *
8950
+ * Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
8951
+ *
8952
+ * @param LayoutIdentity
8937
8953
  */
8938
- getLayoutByName(layoutName: string): LayoutInstance;
8954
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8939
8955
  /**
8940
8956
  * @experimental
8941
8957
  */
8942
- getLayouts(): Record<string, LayoutInstance>;
8958
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8943
8959
  /**
8944
8960
  * @experimental
8945
8961
  */
8946
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8962
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8947
8963
  /**
8948
8964
  * @experimental
8949
8965
  */
8950
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8966
+ size(): number;
8951
8967
  }
8952
8968
 
8953
8969
  /**
@@ -8994,7 +9010,7 @@ declare class LayoutModule extends Base {
8994
9010
  * const layoutConfig = await layout.getConfig();
8995
9011
  * ```
8996
9012
  */
8997
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9013
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8998
9014
  /**
8999
9015
  * Synchronously returns a Layout object that represents a Window's layout.
9000
9016
  *
@@ -9014,7 +9030,7 @@ declare class LayoutModule extends Base {
9014
9030
  * const layoutConfig = await layout.getConfig();
9015
9031
  * ```
9016
9032
  */
9017
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9033
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9018
9034
  /**
9019
9035
  * Asynchronously returns a Layout object that represents a Window's layout.
9020
9036
  *
@@ -9190,11 +9206,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9190
9206
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9191
9207
 
9192
9208
  /**
9193
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9209
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9194
9210
  * @interface
9195
9211
  */
9196
9212
  declare type LayoutReadyEvent = BaseEvent_5 & {
9197
9213
  type: 'layout-ready';
9214
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9198
9215
  views: (OpenFin_2.Identity & {
9199
9216
  success: boolean;
9200
9217
  })[];
@@ -10132,6 +10149,7 @@ declare namespace OpenFin_2 {
10132
10149
  WebPermission,
10133
10150
  VerboseWebPermission,
10134
10151
  OpenExternalPermission,
10152
+ DeviceInfo,
10135
10153
  Permissions_2 as Permissions,
10136
10154
  PlatformWindowCreationOptions,
10137
10155
  PlatformWindowOptions,
@@ -10289,7 +10307,6 @@ declare namespace OpenFin_2 {
10289
10307
  InitLayoutOptions,
10290
10308
  LayoutManagerConstructor,
10291
10309
  LayoutManagerOverride,
10292
- LayoutInstance,
10293
10310
  LayoutManager,
10294
10311
  CreateLayoutOptions,
10295
10312
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10481,6 +10498,7 @@ declare type Permissions_2 = {
10481
10498
  Application?: Partial<ApplicationPermissions>;
10482
10499
  System?: Partial<SystemPermissions>;
10483
10500
  webAPIs?: WebPermission[];
10501
+ devices?: DeviceInfo[];
10484
10502
  };
10485
10503
 
10486
10504
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -12821,7 +12839,7 @@ declare type ReplaceLayoutPayload = {
12821
12839
  /**
12822
12840
  * Identity of the window whose layout will be replaced.
12823
12841
  */
12824
- target: LayoutIdentity;
12842
+ target: Identity_5 | LayoutIdentity;
12825
12843
  };
12826
12844
 
12827
12845
  /**
@@ -16411,7 +16429,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
16411
16429
  */
16412
16430
  declare type ViewDetachedEvent = BaseEvent_5 & {
16413
16431
  type: 'view-detached';
16414
- target: OpenFin_2.Identity;
16432
+ target: OpenFin_2.Identity | null;
16415
16433
  previousTarget: OpenFin_2.Identity;
16416
16434
  viewIdentity: OpenFin_2.Identity;
16417
16435
  };
@@ -17647,7 +17665,7 @@ declare namespace WebContentsEvents {
17647
17665
  * `clipboard-read`: Request access to read from the clipboard.<br>
17648
17666
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17649
17667
  */
17650
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17668
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17651
17669
 
17652
17670
  /**
17653
17671
  * Object representing headers and their values, where the
@@ -3636,7 +3636,7 @@ declare type ConstWindowOptions = {
3636
3636
  /**
3637
3637
  * @defaultValue true
3638
3638
  *
3639
- * Toggling off would keep the Window alive even if all its Views were closed.
3639
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3640
3640
  * This is meant for advanced users and should be used with caution.
3641
3641
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3642
3642
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3646,7 +3646,8 @@ declare type ConstWindowOptions = {
3646
3646
  /**
3647
3647
  * @defaultValue 'all'
3648
3648
  *
3649
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3649
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3650
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3650
3651
  * **NOTE:** - This option is ignored in non-Platforms apps.
3651
3652
  */
3652
3653
  viewsPreventingClose: 'all' | 'layout';
@@ -4453,7 +4454,7 @@ declare type CreateViewPayload = {
4453
4454
  /**
4454
4455
  * @interface
4455
4456
  */
4456
- declare type CreateViewTarget = LayoutIdentity & {
4457
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4457
4458
  /**
4458
4459
  * If specified, view creation will not attach to a window and caller must
4459
4460
  * insert the view into the layout explicitly
@@ -4593,6 +4594,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4593
4594
  type: 'destroyed';
4594
4595
  };
4595
4596
 
4597
+ /**
4598
+ * @interface
4599
+ */
4600
+ declare type DeviceInfo = {
4601
+ vendorId: string | number;
4602
+ productId: string | number;
4603
+ };
4604
+
4596
4605
  /**
4597
4606
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4598
4607
  * @interface
@@ -5053,9 +5062,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5053
5062
  } : never;
5054
5063
 
5055
5064
  declare interface Environment {
5056
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5065
+ initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5057
5066
  createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5058
5067
  destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
5068
+ resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5059
5069
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5060
5070
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5061
5071
  writeToken(path: string, token: string): Promise<string>;
@@ -7433,7 +7443,7 @@ declare class InteropBroker extends Base {
7433
7443
  * // }
7434
7444
  * ```
7435
7445
  *
7436
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7446
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7437
7447
  *
7438
7448
  * @param contextForIntent Data passed between entities and applications.
7439
7449
  * @param clientIdentity Identity of the Client making the request.
@@ -8607,7 +8617,7 @@ declare type LaunchIntoPlatformPayload = {
8607
8617
  declare class Layout extends Base {
8608
8618
  #private;
8609
8619
  /* Excluded from this release type: init */
8610
- identity: OpenFin_2.LayoutIdentity;
8620
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8611
8621
  private platform;
8612
8622
  wire: Transport;
8613
8623
  /* Excluded from this release type: __constructor */
@@ -8823,25 +8833,23 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8823
8833
  */
8824
8834
  declare type LayoutIdentity = Identity_5 & {
8825
8835
  /**
8826
- * The name of the layout an action should be targeted to. When not provided,
8827
- * OpenFin attempts to resolve the instance via visibility checks.
8836
+ * The name of the layout in a given window.
8828
8837
  */
8829
- layoutName?: string;
8838
+ layoutName: string;
8830
8839
  };
8831
8840
 
8832
8841
  /**
8833
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8842
+ * Generated when the window and all of its layout's views have either finished or failed navigation, once per layout.
8834
8843
  * @interface
8835
8844
  */
8836
8845
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8837
8846
  type: 'layout-initialized';
8847
+ layoutIdentity: OpenFin_2.LayoutIdentity;
8838
8848
  ofViews: (OpenFin_2.Identity & {
8839
8849
  entityType: 'view';
8840
8850
  })[];
8841
8851
  };
8842
8852
 
8843
- /* Excluded from this release type: LayoutInstance */
8844
-
8845
8853
  /**
8846
8854
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8847
8855
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8869,7 +8877,7 @@ declare type LayoutItemConfig = {
8869
8877
  *
8870
8878
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8871
8879
  *
8872
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8880
+ * Responsible for aggregating all layout snapshots and storing layout instances
8873
8881
  */
8874
8882
  declare interface LayoutManager<T extends LayoutSnapshot> {
8875
8883
  /**
@@ -8893,16 +8901,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8893
8901
  * @throws if Object.keys(snapshot).length > 1
8894
8902
  */
8895
8903
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8896
- /**
8897
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8898
- * contains a single layout.
8899
- *
8900
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8901
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8902
- *
8903
- * @param snapshot
8904
- * @throws if Object.keys(snapshot).length > 1
8905
- */
8906
8904
  /**
8907
8905
  * @experimental
8908
8906
  *
@@ -8923,31 +8921,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8923
8921
  /**
8924
8922
  * @experimental
8925
8923
  *
8926
- * @param layoutIdentity
8927
- * @returns
8924
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8925
+ * this method to control the target layout for Layout API calls.
8926
+ *
8927
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8928
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8929
+ * "last visible" layout identity and return it.
8930
+ *
8931
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8932
+ * call must route to in this order of precedence:
8933
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8934
+ * - if there is only 1 layout, resolves that one
8935
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8936
+ * - returns undefined
8937
+ *
8938
+ * @param identity
8939
+ * @returns LayoutIdentity | undefined
8928
8940
  */
8929
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8941
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8930
8942
  /**
8931
8943
  * @experimental
8932
8944
  *
8933
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8934
- * Throws if it does not exist.
8935
- * @param layoutName
8936
- * @returns
8945
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8946
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8947
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8948
+ * signify to your application it's time to destroy this layout.
8949
+ *
8950
+ * Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
8951
+ *
8952
+ * @param LayoutIdentity
8937
8953
  */
8938
- getLayoutByName(layoutName: string): LayoutInstance;
8954
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8939
8955
  /**
8940
8956
  * @experimental
8941
8957
  */
8942
- getLayouts(): Record<string, LayoutInstance>;
8958
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8943
8959
  /**
8944
8960
  * @experimental
8945
8961
  */
8946
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8962
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8947
8963
  /**
8948
8964
  * @experimental
8949
8965
  */
8950
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8966
+ size(): number;
8951
8967
  }
8952
8968
 
8953
8969
  /**
@@ -8994,7 +9010,7 @@ declare class LayoutModule extends Base {
8994
9010
  * const layoutConfig = await layout.getConfig();
8995
9011
  * ```
8996
9012
  */
8997
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9013
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8998
9014
  /**
8999
9015
  * Synchronously returns a Layout object that represents a Window's layout.
9000
9016
  *
@@ -9014,7 +9030,7 @@ declare class LayoutModule extends Base {
9014
9030
  * const layoutConfig = await layout.getConfig();
9015
9031
  * ```
9016
9032
  */
9017
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9033
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9018
9034
  /**
9019
9035
  * Asynchronously returns a Layout object that represents a Window's layout.
9020
9036
  *
@@ -9190,11 +9206,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9190
9206
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9191
9207
 
9192
9208
  /**
9193
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9209
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9194
9210
  * @interface
9195
9211
  */
9196
9212
  declare type LayoutReadyEvent = BaseEvent_5 & {
9197
9213
  type: 'layout-ready';
9214
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9198
9215
  views: (OpenFin_2.Identity & {
9199
9216
  success: boolean;
9200
9217
  })[];
@@ -10132,6 +10149,7 @@ declare namespace OpenFin_2 {
10132
10149
  WebPermission,
10133
10150
  VerboseWebPermission,
10134
10151
  OpenExternalPermission,
10152
+ DeviceInfo,
10135
10153
  Permissions_2 as Permissions,
10136
10154
  PlatformWindowCreationOptions,
10137
10155
  PlatformWindowOptions,
@@ -10289,7 +10307,6 @@ declare namespace OpenFin_2 {
10289
10307
  InitLayoutOptions,
10290
10308
  LayoutManagerConstructor,
10291
10309
  LayoutManagerOverride,
10292
- LayoutInstance,
10293
10310
  LayoutManager,
10294
10311
  CreateLayoutOptions,
10295
10312
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10481,6 +10498,7 @@ declare type Permissions_2 = {
10481
10498
  Application?: Partial<ApplicationPermissions>;
10482
10499
  System?: Partial<SystemPermissions>;
10483
10500
  webAPIs?: WebPermission[];
10501
+ devices?: DeviceInfo[];
10484
10502
  };
10485
10503
 
10486
10504
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -12821,7 +12839,7 @@ declare type ReplaceLayoutPayload = {
12821
12839
  /**
12822
12840
  * Identity of the window whose layout will be replaced.
12823
12841
  */
12824
- target: LayoutIdentity;
12842
+ target: Identity_5 | LayoutIdentity;
12825
12843
  };
12826
12844
 
12827
12845
  /**
@@ -16411,7 +16429,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
16411
16429
  */
16412
16430
  declare type ViewDetachedEvent = BaseEvent_5 & {
16413
16431
  type: 'view-detached';
16414
- target: OpenFin_2.Identity;
16432
+ target: OpenFin_2.Identity | null;
16415
16433
  previousTarget: OpenFin_2.Identity;
16416
16434
  viewIdentity: OpenFin_2.Identity;
16417
16435
  };
@@ -17647,7 +17665,7 @@ declare namespace WebContentsEvents {
17647
17665
  * `clipboard-read`: Request access to read from the clipboard.<br>
17648
17666
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17649
17667
  */
17650
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17668
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17651
17669
 
17652
17670
  /**
17653
17671
  * Object representing headers and their values, where the
package/out/mock.d.ts CHANGED
@@ -3730,7 +3730,7 @@ declare type ConstWindowOptions = {
3730
3730
  /**
3731
3731
  * @defaultValue true
3732
3732
  *
3733
- * Toggling off would keep the Window alive even if all its Views were closed.
3733
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3734
3734
  * This is meant for advanced users and should be used with caution.
3735
3735
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3736
3736
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3740,7 +3740,8 @@ declare type ConstWindowOptions = {
3740
3740
  /**
3741
3741
  * @defaultValue 'all'
3742
3742
  *
3743
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3743
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3744
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3744
3745
  * **NOTE:** - This option is ignored in non-Platforms apps.
3745
3746
  */
3746
3747
  viewsPreventingClose: 'all' | 'layout';
@@ -4547,7 +4548,7 @@ declare type CreateViewPayload = {
4547
4548
  /**
4548
4549
  * @interface
4549
4550
  */
4550
- declare type CreateViewTarget = LayoutIdentity & {
4551
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4551
4552
  /**
4552
4553
  * If specified, view creation will not attach to a window and caller must
4553
4554
  * insert the view into the layout explicitly
@@ -4687,6 +4688,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4687
4688
  type: 'destroyed';
4688
4689
  };
4689
4690
 
4691
+ /**
4692
+ * @interface
4693
+ */
4694
+ declare type DeviceInfo = {
4695
+ vendorId: string | number;
4696
+ productId: string | number;
4697
+ };
4698
+
4690
4699
  /**
4691
4700
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4692
4701
  * @interface
@@ -5152,9 +5161,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5152
5161
  } : never;
5153
5162
 
5154
5163
  declare interface Environment {
5155
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5164
+ initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5156
5165
  createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5157
5166
  destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
5167
+ resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5158
5168
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5159
5169
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5160
5170
  writeToken(path: string, token: string): Promise<string>;
@@ -7577,7 +7587,7 @@ declare class InteropBroker extends Base {
7577
7587
  * // }
7578
7588
  * ```
7579
7589
  *
7580
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7590
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7581
7591
  *
7582
7592
  * @param contextForIntent Data passed between entities and applications.
7583
7593
  * @param clientIdentity Identity of the Client making the request.
@@ -8757,7 +8767,7 @@ declare class Layout extends Base {
8757
8767
  * @internal
8758
8768
  */
8759
8769
  init: (options?: OpenFin_2.InitLayoutOptions) => Promise<Layout>;
8760
- identity: OpenFin_2.LayoutIdentity;
8770
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8761
8771
  private platform;
8762
8772
  wire: Transport;
8763
8773
  /**
@@ -8976,45 +8986,23 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8976
8986
  */
8977
8987
  declare type LayoutIdentity = Identity_5 & {
8978
8988
  /**
8979
- * The name of the layout an action should be targeted to. When not provided,
8980
- * OpenFin attempts to resolve the instance via visibility checks.
8989
+ * The name of the layout in a given window.
8981
8990
  */
8982
- layoutName?: string;
8991
+ layoutName: string;
8983
8992
  };
8984
8993
 
8985
8994
  /**
8986
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8995
+ * Generated when the window and all of its layout's views have either finished or failed navigation, once per layout.
8987
8996
  * @interface
8988
8997
  */
8989
8998
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8990
8999
  type: 'layout-initialized';
9000
+ layoutIdentity: OpenFin_2.LayoutIdentity;
8991
9001
  ofViews: (OpenFin_2.Identity & {
8992
9002
  entityType: 'view';
8993
9003
  })[];
8994
9004
  };
8995
9005
 
8996
- /**
8997
- * @interface @experimental @internal
8998
- *
8999
- * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
9000
- *
9001
- * Responsible for handling all layout management and renderering
9002
- */
9003
- declare type LayoutInstance = {
9004
- identity: LayoutIdentity;
9005
- getFrameSnapshot: () => Promise<LayoutOptions>;
9006
- addView: (payload: AddViewOptions) => Promise<View_2>;
9007
- closeView: (viewIdentity: Identity_5) => Promise<void>;
9008
- removeView: (viewConfig: Identity_5 | ViewState) => Promise<View_2>;
9009
- replaceView: (payload: ReplaceViewOptions) => Promise<View_2>;
9010
- getViews: () => LayoutComponent[];
9011
- getCurrentViews: () => Identity_5[];
9012
- startReplaceLayout: (payload: ReplaceLayoutOptions) => Promise<void>;
9013
- applyPreset: (payload: PresetLayoutOptions_2) => void;
9014
- isVisible: () => boolean;
9015
- destroy: () => Promise<void>;
9016
- };
9017
-
9018
9006
  /**
9019
9007
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
9020
9008
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -9042,7 +9030,7 @@ declare type LayoutItemConfig = {
9042
9030
  *
9043
9031
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
9044
9032
  *
9045
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
9033
+ * Responsible for aggregating all layout snapshots and storing layout instances
9046
9034
  */
9047
9035
  declare interface LayoutManager<T extends LayoutSnapshot> {
9048
9036
  /**
@@ -9066,16 +9054,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
9066
9054
  * @throws if Object.keys(snapshot).length > 1
9067
9055
  */
9068
9056
  applyLayoutSnapshot(snapshot: T): Promise<void>;
9069
- /**
9070
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
9071
- * contains a single layout.
9072
- *
9073
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
9074
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
9075
- *
9076
- * @param snapshot
9077
- * @throws if Object.keys(snapshot).length > 1
9078
- */
9079
9057
  /**
9080
9058
  * @experimental
9081
9059
  *
@@ -9096,31 +9074,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
9096
9074
  /**
9097
9075
  * @experimental
9098
9076
  *
9099
- * @param layoutIdentity
9100
- * @returns
9077
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
9078
+ * this method to control the target layout for Layout API calls.
9079
+ *
9080
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
9081
+ * execute an API call (ex: Layout.replace()) - override this method and save the
9082
+ * "last visible" layout identity and return it.
9083
+ *
9084
+ * By default, OpenFin will use a series of checks to determine which Layout the API
9085
+ * call must route to in this order of precedence:
9086
+ * - try to resolve the layout from the layoutIdentity, throws if missing
9087
+ * - if there is only 1 layout, resolves that one
9088
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
9089
+ * - returns undefined
9090
+ *
9091
+ * @param identity
9092
+ * @returns LayoutIdentity | undefined
9101
9093
  */
9102
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
9094
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
9103
9095
  /**
9104
9096
  * @experimental
9105
9097
  *
9106
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
9107
- * Throws if it does not exist.
9108
- * @param layoutName
9109
- * @returns
9098
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
9099
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
9100
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
9101
+ * signify to your application it's time to destroy this layout.
9102
+ *
9103
+ * Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
9104
+ *
9105
+ * @param LayoutIdentity
9110
9106
  */
9111
- getLayoutByName(layoutName: string): LayoutInstance;
9107
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
9112
9108
  /**
9113
9109
  * @experimental
9114
9110
  */
9115
- getLayouts(): Record<string, LayoutInstance>;
9111
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
9116
9112
  /**
9117
9113
  * @experimental
9118
9114
  */
9119
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
9115
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
9120
9116
  /**
9121
9117
  * @experimental
9122
9118
  */
9123
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
9119
+ size(): number;
9124
9120
  }
9125
9121
 
9126
9122
  /**
@@ -9167,7 +9163,7 @@ declare class LayoutModule extends Base {
9167
9163
  * const layoutConfig = await layout.getConfig();
9168
9164
  * ```
9169
9165
  */
9170
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9166
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9171
9167
  /**
9172
9168
  * Synchronously returns a Layout object that represents a Window's layout.
9173
9169
  *
@@ -9187,7 +9183,7 @@ declare class LayoutModule extends Base {
9187
9183
  * const layoutConfig = await layout.getConfig();
9188
9184
  * ```
9189
9185
  */
9190
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9186
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9191
9187
  /**
9192
9188
  * Asynchronously returns a Layout object that represents a Window's layout.
9193
9189
  *
@@ -9520,11 +9516,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9520
9516
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9521
9517
 
9522
9518
  /**
9523
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9519
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9524
9520
  * @interface
9525
9521
  */
9526
9522
  declare type LayoutReadyEvent = BaseEvent_5 & {
9527
9523
  type: 'layout-ready';
9524
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9528
9525
  views: (OpenFin_2.Identity & {
9529
9526
  success: boolean;
9530
9527
  })[];
@@ -10480,6 +10477,7 @@ declare namespace OpenFin_2 {
10480
10477
  WebPermission,
10481
10478
  VerboseWebPermission,
10482
10479
  OpenExternalPermission,
10480
+ DeviceInfo,
10483
10481
  Permissions_2 as Permissions,
10484
10482
  PlatformWindowCreationOptions,
10485
10483
  PlatformWindowOptions,
@@ -10637,7 +10635,6 @@ declare namespace OpenFin_2 {
10637
10635
  InitLayoutOptions,
10638
10636
  LayoutManagerConstructor,
10639
10637
  LayoutManagerOverride,
10640
- LayoutInstance,
10641
10638
  LayoutManager,
10642
10639
  CreateLayoutOptions,
10643
10640
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10829,6 +10826,7 @@ declare type Permissions_2 = {
10829
10826
  Application?: Partial<ApplicationPermissions>;
10830
10827
  System?: Partial<SystemPermissions>;
10831
10828
  webAPIs?: WebPermission[];
10829
+ devices?: DeviceInfo[];
10832
10830
  };
10833
10831
 
10834
10832
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -13262,7 +13260,7 @@ declare type ReplaceLayoutPayload = {
13262
13260
  /**
13263
13261
  * Identity of the window whose layout will be replaced.
13264
13262
  */
13265
- target: LayoutIdentity;
13263
+ target: Identity_5 | LayoutIdentity;
13266
13264
  };
13267
13265
 
13268
13266
  /**
@@ -16952,7 +16950,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
16952
16950
  */
16953
16951
  declare type ViewDetachedEvent = BaseEvent_5 & {
16954
16952
  type: 'view-detached';
16955
- target: OpenFin_2.Identity;
16953
+ target: OpenFin_2.Identity | null;
16956
16954
  previousTarget: OpenFin_2.Identity;
16957
16955
  viewIdentity: OpenFin_2.Identity;
16958
16956
  };
@@ -18188,7 +18186,7 @@ declare namespace WebContentsEvents {
18188
18186
  * `clipboard-read`: Request access to read from the clipboard.<br>
18189
18187
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
18190
18188
  */
18191
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
18189
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
18192
18190
 
18193
18191
  /**
18194
18192
  * Object representing headers and their values, where the
package/out/mock.js CHANGED
@@ -3463,7 +3463,7 @@ function requireView () {
3463
3463
  * * {@link ViewModule} contains static members of the `View` API, accessible through `fin.View`.
3464
3464
  * * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
3465
3465
  *
3466
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
3466
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
3467
3467
  * both of these were documented on the same page.
3468
3468
  *
3469
3469
  * @packageDocumentation
@@ -4604,7 +4604,7 @@ function requireApplication () {
4604
4604
  * * {@link ApplicationModule} contains static members of the `Application` API, accessible through `fin.Application`.
4605
4605
  * * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
4606
4606
  *
4607
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
4607
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
4608
4608
  * both of these were documented on the same page.
4609
4609
  *
4610
4610
  * @packageDocumentation
@@ -6661,7 +6661,7 @@ function requireWindow () {
6661
6661
  * * {@link _WindowModule} contains static members of the `Window` API, accessible through `fin.Window`.
6662
6662
  * * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
6663
6663
  *
6664
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
6664
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
6665
6665
  * both of these were documented on the same page.
6666
6666
  *
6667
6667
  * Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
@@ -11415,7 +11415,7 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
11415
11415
  * * {@link ExternalApplicationModule} contains static members of the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
11416
11416
  * * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
11417
11417
  *
11418
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
11418
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
11419
11419
  * both of these were documented on the same page.
11420
11420
  *
11421
11421
  * @packageDocumentation
@@ -11666,7 +11666,7 @@ Factory$4._FrameModule = _FrameModule;
11666
11666
  * * {@link _FrameModule} contains static members of the `Frame` API, accessible through `fin.Frame`.
11667
11667
  * * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
11668
11668
  *
11669
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
11669
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
11670
11670
  * both of these were documented on the same page.
11671
11671
  *
11672
11672
  * Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
@@ -13012,7 +13012,6 @@ class Layout extends base_1$6.Base {
13012
13012
  // don't expose
13013
13013
  });
13014
13014
  const client = await this.platform.getClient();
13015
- console.log(`Layout::toConfig() called!`);
13016
13015
  return client.dispatch('get-frame-snapshot', {
13017
13016
  target: this.identity
13018
13017
  });
@@ -13062,7 +13061,7 @@ class Layout extends base_1$6.Base {
13062
13061
  // don't expose
13063
13062
  });
13064
13063
  const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
13065
- const root = await client.getRoot(this.identity);
13064
+ const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
13066
13065
  return layout_entities_1.LayoutNode.getEntity(root, client);
13067
13066
  }
13068
13067
  }
@@ -13080,7 +13079,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
13080
13079
  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");
13081
13080
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13082
13081
  };
13083
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
13082
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
13084
13083
  Object.defineProperty(Factory$2, "__esModule", { value: true });
13085
13084
  Factory$2.LayoutModule = void 0;
13086
13085
  const base_1$5 = base;
@@ -13143,39 +13142,53 @@ class LayoutModule extends base_1$5.Base {
13143
13142
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
13144
13143
  }
13145
13144
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
13146
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayout(this.fin, this.wire, options), "f");
13147
- // back-compat ONLY if layoutManagerOverride not provided
13145
+ __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
13146
+ // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
13147
+ const platformClient = await this.fin.Platform.getCurrentSync().getClient();
13148
+ const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
13149
+ await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
13148
13150
  if (!options.layoutManagerOverride) {
13149
- const layoutInstance = await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").resolveLayout();
13150
- const layout = this.wrapSync(layoutInstance.identity);
13151
- // Backward compat - undocumented / not typed layoutInstance as layoutManager
13152
- return Object.assign(layout, { layoutManager: layoutInstance });
13151
+ return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
13153
13152
  }
13154
- // Warn user if they do not create any layouts in the next 10 seconds
13153
+ // warn user if they do not call create() in the next 30 seconds
13155
13154
  setTimeout(() => {
13156
- const layoutSize = Object.keys(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").getLayouts()).length;
13157
- if (layoutSize === 0) {
13158
- console.warn(`[Layout.init] Layout.init was called but no layouts have been created yet. Make sure you ` +
13155
+ if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").size() === 0) {
13156
+ console.warn(`[Layout.init] Layout.init was called 30s ago, but no layouts have been created yet. Make sure you ` +
13159
13157
  `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
13160
13158
  }
13161
- }, 10000);
13159
+ }, 30000);
13162
13160
  return this.wrapSync(this.fin.me.identity);
13163
13161
  };
13162
+ _LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
13163
+ let layoutManager;
13164
+ let resolve;
13165
+ const layoutResolved = new Promise((r) => {
13166
+ resolve = r;
13167
+ });
13168
+ // wait for a layout to be created
13169
+ await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
13170
+ layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
13171
+ // Backward compat - undocumented / not typed openfin-layout as layoutManager
13172
+ // TODO: eventually deprecate this
13173
+ resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
13174
+ });
13175
+ return layoutResolved;
13176
+ });
13164
13177
  /**
13165
13178
  * Returns the layout manager for the current window
13166
13179
  * @returns
13167
13180
  */
13168
13181
  this.getCurrentLayoutManagerSync = () => {
13169
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this);
13182
+ __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
13170
13183
  // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
13171
13184
  return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
13172
13185
  };
13173
13186
  this.create = async (options) => {
13174
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this);
13187
+ __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.create()`);
13175
13188
  return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
13176
13189
  };
13177
13190
  this.destroy = async (layoutIdentity) => {
13178
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this);
13191
+ __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.destroy()`);
13179
13192
  return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
13180
13193
  };
13181
13194
  }
@@ -13274,9 +13287,9 @@ class LayoutModule extends base_1$5.Base {
13274
13287
  }
13275
13288
  }
13276
13289
  Factory$2.LayoutModule = LayoutModule;
13277
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized() {
13290
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
13278
13291
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
13279
- throw new Error('You must call init before using this API');
13292
+ throw new Error(`You must call init before using the API ${method}`);
13280
13293
  }
13281
13294
  };
13282
13295
 
@@ -13287,7 +13300,7 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
13287
13300
  * * {@link LayoutModule} contains static members of the `Layout` API, accessible through `fin.Platform.Layout`.
13288
13301
  * * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
13289
13302
  *
13290
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
13303
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
13291
13304
  * both of these were documented on the same page.
13292
13305
  *
13293
13306
  * @packageDocumentation
@@ -13568,7 +13581,7 @@ Factory$3.PlatformModule = PlatformModule;
13568
13581
  * * {@link PlatformModule} contains static members of the `Platform` API, accessible through `fin.Platform`.
13569
13582
  * * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
13570
13583
  *
13571
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
13584
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
13572
13585
  * both of these were documented on the same page.
13573
13586
  *
13574
13587
  * @packageDocumentation
@@ -14975,7 +14988,7 @@ function requireInteropBroker () {
14975
14988
  * // }
14976
14989
  * ```
14977
14990
  *
14978
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
14991
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
14979
14992
  *
14980
14993
  * @param contextForIntent Data passed between entities and applications.
14981
14994
  * @param clientIdentity Identity of the Client making the request.
@@ -16778,7 +16791,7 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16778
16791
  * * {@link SnapshotSourceModule} contains static members of the `SnapshotSource` API, accessible through `fin.SnapshotSource`.
16779
16792
  * * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
16780
16793
  *
16781
- * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
16794
+ * These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/32.114.76.10/index.html),
16782
16795
  * both of these were documented on the same page.
16783
16796
  *
16784
16797
  * @packageDocumentation
@@ -17212,7 +17225,7 @@ class MockEnvironment {
17212
17225
  getRtcPeer() {
17213
17226
  throw new Error(me_1.environmentUnsupportedMessage);
17214
17227
  }
17215
- initLayout() {
17228
+ initLayoutManager() {
17216
17229
  throw new Error(me_1.environmentUnsupportedMessage);
17217
17230
  }
17218
17231
  async createLayout() {
@@ -17221,6 +17234,9 @@ class MockEnvironment {
17221
17234
  async destroyLayout() {
17222
17235
  throw new Error(me_1.environmentUnsupportedMessage);
17223
17236
  }
17237
+ async resolveLayout() {
17238
+ throw new Error(me_1.environmentUnsupportedMessage);
17239
+ }
17224
17240
  initPlatform() {
17225
17241
  throw new Error(me_1.environmentUnsupportedMessage);
17226
17242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "34.78.53",
3
+ "version": "34.78.56",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "main": "out/mock.js",