@openfin/node-adapter 35.78.6 → 35.78.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3640,7 +3640,7 @@ declare type ConstWindowOptions = {
3640
3640
  /**
3641
3641
  * @defaultValue true
3642
3642
  *
3643
- * Toggling off would keep the Window alive even if all its Views were closed.
3643
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3644
3644
  * This is meant for advanced users and should be used with caution.
3645
3645
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3646
3646
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3650,7 +3650,8 @@ declare type ConstWindowOptions = {
3650
3650
  /**
3651
3651
  * @defaultValue 'all'
3652
3652
  *
3653
- * 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'.
3653
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3654
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3654
3655
  * **NOTE:** - This option is ignored in non-Platforms apps.
3655
3656
  */
3656
3657
  viewsPreventingClose: 'all' | 'layout';
@@ -4597,6 +4598,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4597
4598
  type: 'destroyed';
4598
4599
  };
4599
4600
 
4601
+ /**
4602
+ * @interface
4603
+ */
4604
+ declare type DeviceInfo = {
4605
+ vendorId: string | number;
4606
+ productId: string | number;
4607
+ };
4608
+
4600
4609
  /**
4601
4610
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4602
4611
  * @interface
@@ -5057,9 +5066,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5057
5066
  } : never;
5058
5067
 
5059
5068
  declare interface Environment {
5060
- initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5069
+ initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5061
5070
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5062
5071
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
5072
+ resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
5063
5073
  initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
5064
5074
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5065
5075
  writeToken(path: string, token: string): Promise<string>;
@@ -7441,7 +7451,7 @@ declare class InteropBroker extends Base {
7441
7451
  * // }
7442
7452
  * ```
7443
7453
  *
7444
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7454
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7445
7455
  *
7446
7456
  * @param contextForIntent Data passed between entities and applications.
7447
7457
  * @param clientIdentity Identity of the Client making the request.
@@ -8850,8 +8860,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
8850
8860
  })[];
8851
8861
  };
8852
8862
 
8853
- /* Excluded from this release type: LayoutInstance */
8854
-
8855
8863
  /**
8856
8864
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8857
8865
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8879,7 +8887,7 @@ declare type LayoutItemConfig = {
8879
8887
  *
8880
8888
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8881
8889
  *
8882
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8890
+ * Responsible for aggregating all layout snapshots and storing layout instances
8883
8891
  */
8884
8892
  declare interface LayoutManager<T extends LayoutSnapshot> {
8885
8893
  /**
@@ -8903,16 +8911,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8903
8911
  * @throws if Object.keys(snapshot).length > 1
8904
8912
  */
8905
8913
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8906
- /**
8907
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8908
- * contains a single layout.
8909
- *
8910
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8911
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8912
- *
8913
- * @param snapshot
8914
- * @throws if Object.keys(snapshot).length > 1
8915
- */
8916
8914
  /**
8917
8915
  * @experimental
8918
8916
  *
@@ -8933,31 +8931,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8933
8931
  /**
8934
8932
  * @experimental
8935
8933
  *
8936
- * @param layoutIdentity
8937
- * @returns
8938
- */
8939
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8940
- /**
8941
- * @experimental
8934
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8935
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8936
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8937
+ * signify to your application it's time to destroy this layout.
8942
8938
  *
8943
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8944
- * Throws if it does not exist.
8945
- * @param layoutName
8946
- * @returns
8939
+ * 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.
8940
+ *
8941
+ * @param LayoutIdentity
8947
8942
  */
8948
- getLayoutByName(layoutName: string): LayoutInstance;
8943
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8949
8944
  /**
8950
8945
  * @experimental
8951
8946
  */
8952
- getLayouts(): Record<string, LayoutInstance>;
8947
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8953
8948
  /**
8954
8949
  * @experimental
8955
8950
  */
8956
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8951
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8957
8952
  /**
8958
8953
  * @experimental
8959
8954
  */
8960
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8955
+ size(): number;
8961
8956
  }
8962
8957
 
8963
8958
  /**
@@ -9200,11 +9195,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9200
9195
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9201
9196
 
9202
9197
  /**
9203
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9198
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9204
9199
  * @interface
9205
9200
  */
9206
9201
  declare type LayoutReadyEvent = BaseEvent_5 & {
9207
9202
  type: 'layout-ready';
9203
+ layoutIdentity: OpenFin.LayoutIdentity;
9208
9204
  views: (OpenFin.Identity & {
9209
9205
  success: boolean;
9210
9206
  })[];
@@ -10142,6 +10138,7 @@ declare namespace OpenFin {
10142
10138
  WebPermission,
10143
10139
  VerboseWebPermission,
10144
10140
  OpenExternalPermission,
10141
+ DeviceInfo,
10145
10142
  Permissions_2 as Permissions,
10146
10143
  PlatformWindowCreationOptions,
10147
10144
  PlatformWindowOptions,
@@ -10299,7 +10296,6 @@ declare namespace OpenFin {
10299
10296
  InitLayoutOptions,
10300
10297
  LayoutManagerConstructor,
10301
10298
  LayoutManagerOverride,
10302
- LayoutInstance,
10303
10299
  LayoutManager,
10304
10300
  CreateLayoutOptions,
10305
10301
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10491,6 +10487,7 @@ declare type Permissions_2 = {
10491
10487
  Application?: Partial<ApplicationPermissions>;
10492
10488
  System?: Partial<SystemPermissions>;
10493
10489
  webAPIs?: WebPermission[];
10490
+ devices?: DeviceInfo[];
10494
10491
  };
10495
10492
 
10496
10493
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -17657,7 +17654,7 @@ declare namespace WebContentsEvents {
17657
17654
  * `clipboard-read`: Request access to read from the clipboard.<br>
17658
17655
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17659
17656
  */
17660
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17657
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17661
17658
 
17662
17659
  /**
17663
17660
  * Object representing headers and their values, where the
@@ -3640,7 +3640,7 @@ declare type ConstWindowOptions = {
3640
3640
  /**
3641
3641
  * @defaultValue true
3642
3642
  *
3643
- * Toggling off would keep the Window alive even if all its Views were closed.
3643
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3644
3644
  * This is meant for advanced users and should be used with caution.
3645
3645
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3646
3646
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3650,7 +3650,8 @@ declare type ConstWindowOptions = {
3650
3650
  /**
3651
3651
  * @defaultValue 'all'
3652
3652
  *
3653
- * 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'.
3653
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3654
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3654
3655
  * **NOTE:** - This option is ignored in non-Platforms apps.
3655
3656
  */
3656
3657
  viewsPreventingClose: 'all' | 'layout';
@@ -4597,6 +4598,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4597
4598
  type: 'destroyed';
4598
4599
  };
4599
4600
 
4601
+ /**
4602
+ * @interface
4603
+ */
4604
+ declare type DeviceInfo = {
4605
+ vendorId: string | number;
4606
+ productId: string | number;
4607
+ };
4608
+
4600
4609
  /**
4601
4610
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4602
4611
  * @interface
@@ -5057,9 +5066,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5057
5066
  } : never;
5058
5067
 
5059
5068
  declare interface Environment {
5060
- initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5069
+ initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5061
5070
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5062
5071
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
5072
+ resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
5063
5073
  initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
5064
5074
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5065
5075
  writeToken(path: string, token: string): Promise<string>;
@@ -7441,7 +7451,7 @@ declare class InteropBroker extends Base {
7441
7451
  * // }
7442
7452
  * ```
7443
7453
  *
7444
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7454
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7445
7455
  *
7446
7456
  * @param contextForIntent Data passed between entities and applications.
7447
7457
  * @param clientIdentity Identity of the Client making the request.
@@ -8850,8 +8860,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
8850
8860
  })[];
8851
8861
  };
8852
8862
 
8853
- /* Excluded from this release type: LayoutInstance */
8854
-
8855
8863
  /**
8856
8864
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8857
8865
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8879,7 +8887,7 @@ declare type LayoutItemConfig = {
8879
8887
  *
8880
8888
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8881
8889
  *
8882
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8890
+ * Responsible for aggregating all layout snapshots and storing layout instances
8883
8891
  */
8884
8892
  declare interface LayoutManager<T extends LayoutSnapshot> {
8885
8893
  /**
@@ -8903,16 +8911,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8903
8911
  * @throws if Object.keys(snapshot).length > 1
8904
8912
  */
8905
8913
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8906
- /**
8907
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8908
- * contains a single layout.
8909
- *
8910
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8911
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8912
- *
8913
- * @param snapshot
8914
- * @throws if Object.keys(snapshot).length > 1
8915
- */
8916
8914
  /**
8917
8915
  * @experimental
8918
8916
  *
@@ -8933,31 +8931,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8933
8931
  /**
8934
8932
  * @experimental
8935
8933
  *
8936
- * @param layoutIdentity
8937
- * @returns
8938
- */
8939
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8940
- /**
8941
- * @experimental
8934
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8935
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8936
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8937
+ * signify to your application it's time to destroy this layout.
8942
8938
  *
8943
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8944
- * Throws if it does not exist.
8945
- * @param layoutName
8946
- * @returns
8939
+ * 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.
8940
+ *
8941
+ * @param LayoutIdentity
8947
8942
  */
8948
- getLayoutByName(layoutName: string): LayoutInstance;
8943
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8949
8944
  /**
8950
8945
  * @experimental
8951
8946
  */
8952
- getLayouts(): Record<string, LayoutInstance>;
8947
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8953
8948
  /**
8954
8949
  * @experimental
8955
8950
  */
8956
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8951
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8957
8952
  /**
8958
8953
  * @experimental
8959
8954
  */
8960
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8955
+ size(): number;
8961
8956
  }
8962
8957
 
8963
8958
  /**
@@ -9200,11 +9195,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9200
9195
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9201
9196
 
9202
9197
  /**
9203
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9198
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9204
9199
  * @interface
9205
9200
  */
9206
9201
  declare type LayoutReadyEvent = BaseEvent_5 & {
9207
9202
  type: 'layout-ready';
9203
+ layoutIdentity: OpenFin.LayoutIdentity;
9208
9204
  views: (OpenFin.Identity & {
9209
9205
  success: boolean;
9210
9206
  })[];
@@ -10142,6 +10138,7 @@ declare namespace OpenFin {
10142
10138
  WebPermission,
10143
10139
  VerboseWebPermission,
10144
10140
  OpenExternalPermission,
10141
+ DeviceInfo,
10145
10142
  Permissions_2 as Permissions,
10146
10143
  PlatformWindowCreationOptions,
10147
10144
  PlatformWindowOptions,
@@ -10299,7 +10296,6 @@ declare namespace OpenFin {
10299
10296
  InitLayoutOptions,
10300
10297
  LayoutManagerConstructor,
10301
10298
  LayoutManagerOverride,
10302
- LayoutInstance,
10303
10299
  LayoutManager,
10304
10300
  CreateLayoutOptions,
10305
10301
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10491,6 +10487,7 @@ declare type Permissions_2 = {
10491
10487
  Application?: Partial<ApplicationPermissions>;
10492
10488
  System?: Partial<SystemPermissions>;
10493
10489
  webAPIs?: WebPermission[];
10490
+ devices?: DeviceInfo[];
10494
10491
  };
10495
10492
 
10496
10493
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -17657,7 +17654,7 @@ declare namespace WebContentsEvents {
17657
17654
  * `clipboard-read`: Request access to read from the clipboard.<br>
17658
17655
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17659
17656
  */
17660
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17657
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17661
17658
 
17662
17659
  /**
17663
17660
  * Object representing headers and their values, where the
@@ -3640,7 +3640,7 @@ declare type ConstWindowOptions = {
3640
3640
  /**
3641
3641
  * @defaultValue true
3642
3642
  *
3643
- * Toggling off would keep the Window alive even if all its Views were closed.
3643
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3644
3644
  * This is meant for advanced users and should be used with caution.
3645
3645
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3646
3646
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3650,7 +3650,8 @@ declare type ConstWindowOptions = {
3650
3650
  /**
3651
3651
  * @defaultValue 'all'
3652
3652
  *
3653
- * 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'.
3653
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3654
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3654
3655
  * **NOTE:** - This option is ignored in non-Platforms apps.
3655
3656
  */
3656
3657
  viewsPreventingClose: 'all' | 'layout';
@@ -4597,6 +4598,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4597
4598
  type: 'destroyed';
4598
4599
  };
4599
4600
 
4601
+ /**
4602
+ * @interface
4603
+ */
4604
+ declare type DeviceInfo = {
4605
+ vendorId: string | number;
4606
+ productId: string | number;
4607
+ };
4608
+
4600
4609
  /**
4601
4610
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4602
4611
  * @interface
@@ -5057,9 +5066,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5057
5066
  } : never;
5058
5067
 
5059
5068
  declare interface Environment {
5060
- initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5069
+ initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5061
5070
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5062
5071
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
5072
+ resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
5063
5073
  initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
5064
5074
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5065
5075
  writeToken(path: string, token: string): Promise<string>;
@@ -7441,7 +7451,7 @@ declare class InteropBroker extends Base {
7441
7451
  * // }
7442
7452
  * ```
7443
7453
  *
7444
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7454
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7445
7455
  *
7446
7456
  * @param contextForIntent Data passed between entities and applications.
7447
7457
  * @param clientIdentity Identity of the Client making the request.
@@ -8850,8 +8860,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
8850
8860
  })[];
8851
8861
  };
8852
8862
 
8853
- /* Excluded from this release type: LayoutInstance */
8854
-
8855
8863
  /**
8856
8864
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8857
8865
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8879,7 +8887,7 @@ declare type LayoutItemConfig = {
8879
8887
  *
8880
8888
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8881
8889
  *
8882
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8890
+ * Responsible for aggregating all layout snapshots and storing layout instances
8883
8891
  */
8884
8892
  declare interface LayoutManager<T extends LayoutSnapshot> {
8885
8893
  /**
@@ -8903,16 +8911,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8903
8911
  * @throws if Object.keys(snapshot).length > 1
8904
8912
  */
8905
8913
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8906
- /**
8907
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8908
- * contains a single layout.
8909
- *
8910
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8911
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8912
- *
8913
- * @param snapshot
8914
- * @throws if Object.keys(snapshot).length > 1
8915
- */
8916
8914
  /**
8917
8915
  * @experimental
8918
8916
  *
@@ -8933,31 +8931,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8933
8931
  /**
8934
8932
  * @experimental
8935
8933
  *
8936
- * @param layoutIdentity
8937
- * @returns
8938
- */
8939
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8940
- /**
8941
- * @experimental
8934
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8935
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8936
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8937
+ * signify to your application it's time to destroy this layout.
8942
8938
  *
8943
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8944
- * Throws if it does not exist.
8945
- * @param layoutName
8946
- * @returns
8939
+ * 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.
8940
+ *
8941
+ * @param LayoutIdentity
8947
8942
  */
8948
- getLayoutByName(layoutName: string): LayoutInstance;
8943
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8949
8944
  /**
8950
8945
  * @experimental
8951
8946
  */
8952
- getLayouts(): Record<string, LayoutInstance>;
8947
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8953
8948
  /**
8954
8949
  * @experimental
8955
8950
  */
8956
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8951
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8957
8952
  /**
8958
8953
  * @experimental
8959
8954
  */
8960
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8955
+ size(): number;
8961
8956
  }
8962
8957
 
8963
8958
  /**
@@ -9200,11 +9195,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9200
9195
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9201
9196
 
9202
9197
  /**
9203
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9198
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9204
9199
  * @interface
9205
9200
  */
9206
9201
  declare type LayoutReadyEvent = BaseEvent_5 & {
9207
9202
  type: 'layout-ready';
9203
+ layoutIdentity: OpenFin.LayoutIdentity;
9208
9204
  views: (OpenFin.Identity & {
9209
9205
  success: boolean;
9210
9206
  })[];
@@ -10142,6 +10138,7 @@ declare namespace OpenFin {
10142
10138
  WebPermission,
10143
10139
  VerboseWebPermission,
10144
10140
  OpenExternalPermission,
10141
+ DeviceInfo,
10145
10142
  Permissions_2 as Permissions,
10146
10143
  PlatformWindowCreationOptions,
10147
10144
  PlatformWindowOptions,
@@ -10299,7 +10296,6 @@ declare namespace OpenFin {
10299
10296
  InitLayoutOptions,
10300
10297
  LayoutManagerConstructor,
10301
10298
  LayoutManagerOverride,
10302
- LayoutInstance,
10303
10299
  LayoutManager,
10304
10300
  CreateLayoutOptions,
10305
10301
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10491,6 +10487,7 @@ declare type Permissions_2 = {
10491
10487
  Application?: Partial<ApplicationPermissions>;
10492
10488
  System?: Partial<SystemPermissions>;
10493
10489
  webAPIs?: WebPermission[];
10490
+ devices?: DeviceInfo[];
10494
10491
  };
10495
10492
 
10496
10493
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -17657,7 +17654,7 @@ declare namespace WebContentsEvents {
17657
17654
  * `clipboard-read`: Request access to read from the clipboard.<br>
17658
17655
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17659
17656
  */
17660
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17657
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17661
17658
 
17662
17659
  /**
17663
17660
  * Object representing headers and their values, where the
@@ -3734,7 +3734,7 @@ declare type ConstWindowOptions = {
3734
3734
  /**
3735
3735
  * @defaultValue true
3736
3736
  *
3737
- * Toggling off would keep the Window alive even if all its Views were closed.
3737
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3738
3738
  * This is meant for advanced users and should be used with caution.
3739
3739
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3740
3740
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3744,7 +3744,8 @@ declare type ConstWindowOptions = {
3744
3744
  /**
3745
3745
  * @defaultValue 'all'
3746
3746
  *
3747
- * 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'.
3747
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3748
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3748
3749
  * **NOTE:** - This option is ignored in non-Platforms apps.
3749
3750
  */
3750
3751
  viewsPreventingClose: 'all' | 'layout';
@@ -4691,6 +4692,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4691
4692
  type: 'destroyed';
4692
4693
  };
4693
4694
 
4695
+ /**
4696
+ * @interface
4697
+ */
4698
+ declare type DeviceInfo = {
4699
+ vendorId: string | number;
4700
+ productId: string | number;
4701
+ };
4702
+
4694
4703
  /**
4695
4704
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4696
4705
  * @interface
@@ -5156,9 +5165,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5156
5165
  } : never;
5157
5166
 
5158
5167
  declare interface Environment {
5159
- initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5168
+ initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5160
5169
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5161
5170
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
5171
+ resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
5162
5172
  initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
5163
5173
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5164
5174
  writeToken(path: string, token: string): Promise<string>;
@@ -7607,7 +7617,7 @@ declare class InteropBroker extends Base {
7607
7617
  * // }
7608
7618
  * ```
7609
7619
  *
7610
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7620
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7611
7621
  *
7612
7622
  * @param contextForIntent Data passed between entities and applications.
7613
7623
  * @param clientIdentity Identity of the Client making the request.
@@ -9025,28 +9035,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
9025
9035
  })[];
9026
9036
  };
9027
9037
 
9028
- /**
9029
- * @interface @experimental @internal
9030
- *
9031
- * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
9032
- *
9033
- * Responsible for handling all layout management and renderering
9034
- */
9035
- declare type LayoutInstance = {
9036
- identity: LayoutIdentity;
9037
- getFrameSnapshot: () => Promise<LayoutOptions>;
9038
- addView: (payload: AddViewOptions) => Promise<View_2>;
9039
- closeView: (viewIdentity: Identity_5) => Promise<void>;
9040
- removeView: (viewConfig: Identity_5 | ViewState) => Promise<View_2>;
9041
- replaceView: (payload: ReplaceViewOptions) => Promise<View_2>;
9042
- getViews: () => LayoutComponent[];
9043
- getCurrentViews: () => Identity_5[];
9044
- startReplaceLayout: (payload: ReplaceLayoutOptions) => Promise<void>;
9045
- applyPreset: (payload: PresetLayoutOptions_2) => void;
9046
- isVisible: () => boolean;
9047
- destroy: () => Promise<void>;
9048
- };
9049
-
9050
9038
  /**
9051
9039
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
9052
9040
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -9074,7 +9062,7 @@ declare type LayoutItemConfig = {
9074
9062
  *
9075
9063
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
9076
9064
  *
9077
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
9065
+ * Responsible for aggregating all layout snapshots and storing layout instances
9078
9066
  */
9079
9067
  declare interface LayoutManager<T extends LayoutSnapshot> {
9080
9068
  /**
@@ -9098,16 +9086,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
9098
9086
  * @throws if Object.keys(snapshot).length > 1
9099
9087
  */
9100
9088
  applyLayoutSnapshot(snapshot: T): Promise<void>;
9101
- /**
9102
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
9103
- * contains a single layout.
9104
- *
9105
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
9106
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
9107
- *
9108
- * @param snapshot
9109
- * @throws if Object.keys(snapshot).length > 1
9110
- */
9111
9089
  /**
9112
9090
  * @experimental
9113
9091
  *
@@ -9128,31 +9106,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
9128
9106
  /**
9129
9107
  * @experimental
9130
9108
  *
9131
- * @param layoutIdentity
9132
- * @returns
9133
- */
9134
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
9135
- /**
9136
- * @experimental
9109
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
9110
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
9111
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
9112
+ * signify to your application it's time to destroy this layout.
9137
9113
  *
9138
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
9139
- * Throws if it does not exist.
9140
- * @param layoutName
9141
- * @returns
9114
+ * 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.
9115
+ *
9116
+ * @param LayoutIdentity
9142
9117
  */
9143
- getLayoutByName(layoutName: string): LayoutInstance;
9118
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
9144
9119
  /**
9145
9120
  * @experimental
9146
9121
  */
9147
- getLayouts(): Record<string, LayoutInstance>;
9122
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
9148
9123
  /**
9149
9124
  * @experimental
9150
9125
  */
9151
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
9126
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
9152
9127
  /**
9153
9128
  * @experimental
9154
9129
  */
9155
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
9130
+ size(): number;
9156
9131
  }
9157
9132
 
9158
9133
  /**
@@ -9552,11 +9527,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9552
9527
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9553
9528
 
9554
9529
  /**
9555
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9530
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9556
9531
  * @interface
9557
9532
  */
9558
9533
  declare type LayoutReadyEvent = BaseEvent_5 & {
9559
9534
  type: 'layout-ready';
9535
+ layoutIdentity: OpenFin.LayoutIdentity;
9560
9536
  views: (OpenFin.Identity & {
9561
9537
  success: boolean;
9562
9538
  })[];
@@ -10512,6 +10488,7 @@ declare namespace OpenFin {
10512
10488
  WebPermission,
10513
10489
  VerboseWebPermission,
10514
10490
  OpenExternalPermission,
10491
+ DeviceInfo,
10515
10492
  Permissions_2 as Permissions,
10516
10493
  PlatformWindowCreationOptions,
10517
10494
  PlatformWindowOptions,
@@ -10669,7 +10646,6 @@ declare namespace OpenFin {
10669
10646
  InitLayoutOptions,
10670
10647
  LayoutManagerConstructor,
10671
10648
  LayoutManagerOverride,
10672
- LayoutInstance,
10673
10649
  LayoutManager,
10674
10650
  CreateLayoutOptions,
10675
10651
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10861,6 +10837,7 @@ declare type Permissions_2 = {
10861
10837
  Application?: Partial<ApplicationPermissions>;
10862
10838
  System?: Partial<SystemPermissions>;
10863
10839
  webAPIs?: WebPermission[];
10840
+ devices?: DeviceInfo[];
10864
10841
  };
10865
10842
 
10866
10843
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -18220,7 +18197,7 @@ declare namespace WebContentsEvents {
18220
18197
  * `clipboard-read`: Request access to read from the clipboard.<br>
18221
18198
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
18222
18199
  */
18223
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
18200
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
18224
18201
 
18225
18202
  /**
18226
18203
  * Object representing headers and their values, where the
@@ -3243,7 +3243,7 @@ function requireView () {
3243
3243
  * * {@link ViewModule} contains static members of the `View` API, accessible through `fin.View`.
3244
3244
  * * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
3245
3245
  *
3246
- * 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),
3246
+ * 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),
3247
3247
  * both of these were documented on the same page.
3248
3248
  *
3249
3249
  * @packageDocumentation
@@ -4384,7 +4384,7 @@ function requireApplication () {
4384
4384
  * * {@link ApplicationModule} contains static members of the `Application` API, accessible through `fin.Application`.
4385
4385
  * * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
4386
4386
  *
4387
- * 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),
4387
+ * 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),
4388
4388
  * both of these were documented on the same page.
4389
4389
  *
4390
4390
  * @packageDocumentation
@@ -6441,7 +6441,7 @@ function requireWindow () {
6441
6441
  * * {@link _WindowModule} contains static members of the `Window` API, accessible through `fin.Window`.
6442
6442
  * * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
6443
6443
  *
6444
- * 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),
6444
+ * 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),
6445
6445
  * both of these were documented on the same page.
6446
6446
  *
6447
6447
  * Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
@@ -11195,7 +11195,7 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
11195
11195
  * * {@link ExternalApplicationModule} contains static members of the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
11196
11196
  * * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
11197
11197
  *
11198
- * 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),
11198
+ * 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),
11199
11199
  * both of these were documented on the same page.
11200
11200
  *
11201
11201
  * @packageDocumentation
@@ -11446,7 +11446,7 @@ Factory$4._FrameModule = _FrameModule;
11446
11446
  * * {@link _FrameModule} contains static members of the `Frame` API, accessible through `fin.Frame`.
11447
11447
  * * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
11448
11448
  *
11449
- * 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),
11449
+ * 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),
11450
11450
  * both of these were documented on the same page.
11451
11451
  *
11452
11452
  * Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
@@ -12859,7 +12859,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12859
12859
  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");
12860
12860
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12861
12861
  };
12862
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12862
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12863
12863
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12864
12864
  Factory$2.LayoutModule = void 0;
12865
12865
  const base_1$5 = base$1;
@@ -12922,39 +12922,53 @@ class LayoutModule extends base_1$5.Base {
12922
12922
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
12923
12923
  }
12924
12924
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12925
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayout(this.fin, this.wire, options), "f");
12926
- // back-compat ONLY if layoutManagerOverride not provided
12925
+ __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12926
+ // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
12927
+ const platformClient = await this.fin.Platform.getCurrentSync().getClient();
12928
+ const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
12929
+ await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
12927
12930
  if (!options.layoutManagerOverride) {
12928
- const layoutInstance = await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").resolveLayout();
12929
- const layout = this.wrapSync(layoutInstance.identity);
12930
- // Backward compat - undocumented / not typed layoutInstance as layoutManager
12931
- return Object.assign(layout, { layoutManager: layoutInstance });
12931
+ return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
12932
12932
  }
12933
- // Warn user if they do not create any layouts in the next 10 seconds
12933
+ // warn user if they do not call create() in the next 30 seconds
12934
12934
  setTimeout(() => {
12935
- const layoutSize = Object.keys(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").getLayouts()).length;
12936
- if (layoutSize === 0) {
12937
- console.warn(`[Layout.init] Layout.init was called but no layouts have been created yet. Make sure you ` +
12935
+ if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").size() === 0) {
12936
+ console.warn(`[Layout.init] Layout.init was called 30s ago, but no layouts have been created yet. Make sure you ` +
12938
12937
  `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
12939
12938
  }
12940
- }, 10000);
12939
+ }, 30000);
12941
12940
  return this.wrapSync(this.fin.me.identity);
12942
12941
  };
12942
+ _LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
12943
+ let layoutManager;
12944
+ let resolve;
12945
+ const layoutResolved = new Promise((r) => {
12946
+ resolve = r;
12947
+ });
12948
+ // wait for a layout to be created
12949
+ await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
12950
+ layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12951
+ // Backward compat - undocumented / not typed openfin-layout as layoutManager
12952
+ // TODO: eventually deprecate this
12953
+ resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
12954
+ });
12955
+ return layoutResolved;
12956
+ });
12943
12957
  /**
12944
12958
  * Returns the layout manager for the current window
12945
12959
  * @returns
12946
12960
  */
12947
12961
  this.getCurrentLayoutManagerSync = () => {
12948
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this);
12962
+ __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
12949
12963
  // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
12950
12964
  return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
12951
12965
  };
12952
12966
  this.create = async (options) => {
12953
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this);
12967
+ __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.create()`);
12954
12968
  return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
12955
12969
  };
12956
12970
  this.destroy = async (layoutIdentity) => {
12957
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this);
12971
+ __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.destroy()`);
12958
12972
  return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12959
12973
  };
12960
12974
  }
@@ -13053,9 +13067,9 @@ class LayoutModule extends base_1$5.Base {
13053
13067
  }
13054
13068
  }
13055
13069
  Factory$2.LayoutModule = LayoutModule;
13056
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized() {
13070
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
13057
13071
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
13058
- throw new Error('You must call init before using this API');
13072
+ throw new Error(`You must call init before using the API ${method}`);
13059
13073
  }
13060
13074
  };
13061
13075
 
@@ -13066,7 +13080,7 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
13066
13080
  * * {@link LayoutModule} contains static members of the `Layout` API, accessible through `fin.Platform.Layout`.
13067
13081
  * * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
13068
13082
  *
13069
- * 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),
13083
+ * 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),
13070
13084
  * both of these were documented on the same page.
13071
13085
  *
13072
13086
  * @packageDocumentation
@@ -13347,7 +13361,7 @@ Factory$3.PlatformModule = PlatformModule;
13347
13361
  * * {@link PlatformModule} contains static members of the `Platform` API, accessible through `fin.Platform`.
13348
13362
  * * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
13349
13363
  *
13350
- * 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),
13364
+ * 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),
13351
13365
  * both of these were documented on the same page.
13352
13366
  *
13353
13367
  * @packageDocumentation
@@ -14754,7 +14768,7 @@ function requireInteropBroker () {
14754
14768
  * // }
14755
14769
  * ```
14756
14770
  *
14757
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
14771
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
14758
14772
  *
14759
14773
  * @param contextForIntent Data passed between entities and applications.
14760
14774
  * @param clientIdentity Identity of the Client making the request.
@@ -16557,7 +16571,7 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16557
16571
  * * {@link SnapshotSourceModule} contains static members of the `SnapshotSource` API, accessible through `fin.SnapshotSource`.
16558
16572
  * * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
16559
16573
  *
16560
- * 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),
16574
+ * 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),
16561
16575
  * both of these were documented on the same page.
16562
16576
  *
16563
16577
  * @packageDocumentation
@@ -17501,7 +17515,7 @@ function requireNodeEnv () {
17501
17515
  getRtcPeer() {
17502
17516
  throw new Error('Method not implemented.');
17503
17517
  }
17504
- async initLayout() {
17518
+ async initLayoutManager() {
17505
17519
  throw new Error('Method not implemented.');
17506
17520
  }
17507
17521
  async createLayout() {
@@ -17510,6 +17524,9 @@ function requireNodeEnv () {
17510
17524
  async destroyLayout() {
17511
17525
  throw new Error('Method not implemented.');
17512
17526
  }
17527
+ async resolveLayout() {
17528
+ throw new Error('Method not implemented.');
17529
+ }
17513
17530
  async initPlatform() {
17514
17531
  throw new Error('Method not implemented.');
17515
17532
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "35.78.6",
3
+ "version": "35.78.12",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",