@openfin/core 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.
@@ -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';
@@ -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.
@@ -8840,8 +8850,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
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,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8923
8921
  /**
8924
8922
  * @experimental
8925
8923
  *
8926
- * @param layoutIdentity
8927
- * @returns
8928
- */
8929
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8930
- /**
8931
- * @experimental
8924
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8925
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8926
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8927
+ * signify to your application it's time to destroy this layout.
8932
8928
  *
8933
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8934
- * Throws if it does not exist.
8935
- * @param layoutName
8936
- * @returns
8929
+ * 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.
8930
+ *
8931
+ * @param LayoutIdentity
8937
8932
  */
8938
- getLayoutByName(layoutName: string): LayoutInstance;
8933
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8939
8934
  /**
8940
8935
  * @experimental
8941
8936
  */
8942
- getLayouts(): Record<string, LayoutInstance>;
8937
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8943
8938
  /**
8944
8939
  * @experimental
8945
8940
  */
8946
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8941
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8947
8942
  /**
8948
8943
  * @experimental
8949
8944
  */
8950
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8945
+ size(): number;
8951
8946
  }
8952
8947
 
8953
8948
  /**
@@ -9190,11 +9185,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9190
9185
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9191
9186
 
9192
9187
  /**
9193
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9188
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9194
9189
  * @interface
9195
9190
  */
9196
9191
  declare type LayoutReadyEvent = BaseEvent_5 & {
9197
9192
  type: 'layout-ready';
9193
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9198
9194
  views: (OpenFin_2.Identity & {
9199
9195
  success: boolean;
9200
9196
  })[];
@@ -10132,6 +10128,7 @@ declare namespace OpenFin_2 {
10132
10128
  WebPermission,
10133
10129
  VerboseWebPermission,
10134
10130
  OpenExternalPermission,
10131
+ DeviceInfo,
10135
10132
  Permissions_2 as Permissions,
10136
10133
  PlatformWindowCreationOptions,
10137
10134
  PlatformWindowOptions,
@@ -10289,7 +10286,6 @@ declare namespace OpenFin_2 {
10289
10286
  InitLayoutOptions,
10290
10287
  LayoutManagerConstructor,
10291
10288
  LayoutManagerOverride,
10292
- LayoutInstance,
10293
10289
  LayoutManager,
10294
10290
  CreateLayoutOptions,
10295
10291
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10481,6 +10477,7 @@ declare type Permissions_2 = {
10481
10477
  Application?: Partial<ApplicationPermissions>;
10482
10478
  System?: Partial<SystemPermissions>;
10483
10479
  webAPIs?: WebPermission[];
10480
+ devices?: DeviceInfo[];
10484
10481
  };
10485
10482
 
10486
10483
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -17647,7 +17644,7 @@ declare namespace WebContentsEvents {
17647
17644
  * `clipboard-read`: Request access to read from the clipboard.<br>
17648
17645
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17649
17646
  */
17650
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17647
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17651
17648
 
17652
17649
  /**
17653
17650
  * 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';
@@ -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.
@@ -8840,8 +8850,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
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,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8923
8921
  /**
8924
8922
  * @experimental
8925
8923
  *
8926
- * @param layoutIdentity
8927
- * @returns
8928
- */
8929
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8930
- /**
8931
- * @experimental
8924
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8925
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8926
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8927
+ * signify to your application it's time to destroy this layout.
8932
8928
  *
8933
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8934
- * Throws if it does not exist.
8935
- * @param layoutName
8936
- * @returns
8929
+ * 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.
8930
+ *
8931
+ * @param LayoutIdentity
8937
8932
  */
8938
- getLayoutByName(layoutName: string): LayoutInstance;
8933
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8939
8934
  /**
8940
8935
  * @experimental
8941
8936
  */
8942
- getLayouts(): Record<string, LayoutInstance>;
8937
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8943
8938
  /**
8944
8939
  * @experimental
8945
8940
  */
8946
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8941
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8947
8942
  /**
8948
8943
  * @experimental
8949
8944
  */
8950
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8945
+ size(): number;
8951
8946
  }
8952
8947
 
8953
8948
  /**
@@ -9190,11 +9185,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9190
9185
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9191
9186
 
9192
9187
  /**
9193
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9188
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9194
9189
  * @interface
9195
9190
  */
9196
9191
  declare type LayoutReadyEvent = BaseEvent_5 & {
9197
9192
  type: 'layout-ready';
9193
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9198
9194
  views: (OpenFin_2.Identity & {
9199
9195
  success: boolean;
9200
9196
  })[];
@@ -10132,6 +10128,7 @@ declare namespace OpenFin_2 {
10132
10128
  WebPermission,
10133
10129
  VerboseWebPermission,
10134
10130
  OpenExternalPermission,
10131
+ DeviceInfo,
10135
10132
  Permissions_2 as Permissions,
10136
10133
  PlatformWindowCreationOptions,
10137
10134
  PlatformWindowOptions,
@@ -10289,7 +10286,6 @@ declare namespace OpenFin_2 {
10289
10286
  InitLayoutOptions,
10290
10287
  LayoutManagerConstructor,
10291
10288
  LayoutManagerOverride,
10292
- LayoutInstance,
10293
10289
  LayoutManager,
10294
10290
  CreateLayoutOptions,
10295
10291
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10481,6 +10477,7 @@ declare type Permissions_2 = {
10481
10477
  Application?: Partial<ApplicationPermissions>;
10482
10478
  System?: Partial<SystemPermissions>;
10483
10479
  webAPIs?: WebPermission[];
10480
+ devices?: DeviceInfo[];
10484
10481
  };
10485
10482
 
10486
10483
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -17647,7 +17644,7 @@ declare namespace WebContentsEvents {
17647
17644
  * `clipboard-read`: Request access to read from the clipboard.<br>
17648
17645
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17649
17646
  */
17650
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17647
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17651
17648
 
17652
17649
  /**
17653
17650
  * 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';
@@ -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.
@@ -8840,8 +8850,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
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,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8923
8921
  /**
8924
8922
  * @experimental
8925
8923
  *
8926
- * @param layoutIdentity
8927
- * @returns
8928
- */
8929
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8930
- /**
8931
- * @experimental
8924
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8925
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8926
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8927
+ * signify to your application it's time to destroy this layout.
8932
8928
  *
8933
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8934
- * Throws if it does not exist.
8935
- * @param layoutName
8936
- * @returns
8929
+ * 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.
8930
+ *
8931
+ * @param LayoutIdentity
8937
8932
  */
8938
- getLayoutByName(layoutName: string): LayoutInstance;
8933
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8939
8934
  /**
8940
8935
  * @experimental
8941
8936
  */
8942
- getLayouts(): Record<string, LayoutInstance>;
8937
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8943
8938
  /**
8944
8939
  * @experimental
8945
8940
  */
8946
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8941
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8947
8942
  /**
8948
8943
  * @experimental
8949
8944
  */
8950
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8945
+ size(): number;
8951
8946
  }
8952
8947
 
8953
8948
  /**
@@ -9190,11 +9185,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9190
9185
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9191
9186
 
9192
9187
  /**
9193
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9188
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9194
9189
  * @interface
9195
9190
  */
9196
9191
  declare type LayoutReadyEvent = BaseEvent_5 & {
9197
9192
  type: 'layout-ready';
9193
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9198
9194
  views: (OpenFin_2.Identity & {
9199
9195
  success: boolean;
9200
9196
  })[];
@@ -10132,6 +10128,7 @@ declare namespace OpenFin_2 {
10132
10128
  WebPermission,
10133
10129
  VerboseWebPermission,
10134
10130
  OpenExternalPermission,
10131
+ DeviceInfo,
10135
10132
  Permissions_2 as Permissions,
10136
10133
  PlatformWindowCreationOptions,
10137
10134
  PlatformWindowOptions,
@@ -10289,7 +10286,6 @@ declare namespace OpenFin_2 {
10289
10286
  InitLayoutOptions,
10290
10287
  LayoutManagerConstructor,
10291
10288
  LayoutManagerOverride,
10292
- LayoutInstance,
10293
10289
  LayoutManager,
10294
10290
  CreateLayoutOptions,
10295
10291
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10481,6 +10477,7 @@ declare type Permissions_2 = {
10481
10477
  Application?: Partial<ApplicationPermissions>;
10482
10478
  System?: Partial<SystemPermissions>;
10483
10479
  webAPIs?: WebPermission[];
10480
+ devices?: DeviceInfo[];
10484
10481
  };
10485
10482
 
10486
10483
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -17647,7 +17644,7 @@ declare namespace WebContentsEvents {
17647
17644
  * `clipboard-read`: Request access to read from the clipboard.<br>
17648
17645
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17649
17646
  */
17650
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17647
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17651
17648
 
17652
17649
  /**
17653
17650
  * 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';
@@ -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.
@@ -8993,28 +9003,6 @@ declare type LayoutInitializedEvent = BaseEvent_5 & {
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,28 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
9096
9074
  /**
9097
9075
  * @experimental
9098
9076
  *
9099
- * @param layoutIdentity
9100
- * @returns
9101
- */
9102
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
9103
- /**
9104
- * @experimental
9077
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
9078
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
9079
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
9080
+ * signify to your application it's time to destroy this layout.
9105
9081
  *
9106
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
9107
- * Throws if it does not exist.
9108
- * @param layoutName
9109
- * @returns
9082
+ * 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.
9083
+ *
9084
+ * @param LayoutIdentity
9110
9085
  */
9111
- getLayoutByName(layoutName: string): LayoutInstance;
9086
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
9112
9087
  /**
9113
9088
  * @experimental
9114
9089
  */
9115
- getLayouts(): Record<string, LayoutInstance>;
9090
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
9116
9091
  /**
9117
9092
  * @experimental
9118
9093
  */
9119
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
9094
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
9120
9095
  /**
9121
9096
  * @experimental
9122
9097
  */
9123
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
9098
+ size(): number;
9124
9099
  }
9125
9100
 
9126
9101
  /**
@@ -9520,11 +9495,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9520
9495
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9521
9496
 
9522
9497
  /**
9523
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9498
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9524
9499
  * @interface
9525
9500
  */
9526
9501
  declare type LayoutReadyEvent = BaseEvent_5 & {
9527
9502
  type: 'layout-ready';
9503
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9528
9504
  views: (OpenFin_2.Identity & {
9529
9505
  success: boolean;
9530
9506
  })[];
@@ -10480,6 +10456,7 @@ declare namespace OpenFin_2 {
10480
10456
  WebPermission,
10481
10457
  VerboseWebPermission,
10482
10458
  OpenExternalPermission,
10459
+ DeviceInfo,
10483
10460
  Permissions_2 as Permissions,
10484
10461
  PlatformWindowCreationOptions,
10485
10462
  PlatformWindowOptions,
@@ -10637,7 +10614,6 @@ declare namespace OpenFin_2 {
10637
10614
  InitLayoutOptions,
10638
10615
  LayoutManagerConstructor,
10639
10616
  LayoutManagerOverride,
10640
- LayoutInstance,
10641
10617
  LayoutManager,
10642
10618
  CreateLayoutOptions,
10643
10619
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10829,6 +10805,7 @@ declare type Permissions_2 = {
10829
10805
  Application?: Partial<ApplicationPermissions>;
10830
10806
  System?: Partial<SystemPermissions>;
10831
10807
  webAPIs?: WebPermission[];
10808
+ devices?: DeviceInfo[];
10832
10809
  };
10833
10810
 
10834
10811
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -18188,7 +18165,7 @@ declare namespace WebContentsEvents {
18188
18165
  * `clipboard-read`: Request access to read from the clipboard.<br>
18189
18166
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
18190
18167
  */
18191
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
18168
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
18192
18169
 
18193
18170
  /**
18194
18171
  * 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.
@@ -13079,7 +13079,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
13079
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");
13080
13080
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
13081
13081
  };
13082
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
13082
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
13083
13083
  Object.defineProperty(Factory$2, "__esModule", { value: true });
13084
13084
  Factory$2.LayoutModule = void 0;
13085
13085
  const base_1$5 = base;
@@ -13142,39 +13142,53 @@ class LayoutModule extends base_1$5.Base {
13142
13142
  throw new Error('Layout.init was already called, please use Layout.create to add additional layouts.');
13143
13143
  }
13144
13144
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
13145
- __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayout(this.fin, this.wire, options), "f");
13146
- // 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);
13147
13150
  if (!options.layoutManagerOverride) {
13148
- const layoutInstance = await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").resolveLayout();
13149
- const layout = this.wrapSync(layoutInstance.identity);
13150
- // Backward compat - undocumented / not typed layoutInstance as layoutManager
13151
- return Object.assign(layout, { layoutManager: layoutInstance });
13151
+ return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
13152
13152
  }
13153
- // 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
13154
13154
  setTimeout(() => {
13155
- const layoutSize = Object.keys(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").getLayouts()).length;
13156
- if (layoutSize === 0) {
13157
- 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 ` +
13158
13157
  `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
13159
13158
  }
13160
- }, 10000);
13159
+ }, 30000);
13161
13160
  return this.wrapSync(this.fin.me.identity);
13162
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
+ });
13163
13177
  /**
13164
13178
  * Returns the layout manager for the current window
13165
13179
  * @returns
13166
13180
  */
13167
13181
  this.getCurrentLayoutManagerSync = () => {
13168
- __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()`);
13169
13183
  // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
13170
13184
  return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
13171
13185
  };
13172
13186
  this.create = async (options) => {
13173
- __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()`);
13174
13188
  return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
13175
13189
  };
13176
13190
  this.destroy = async (layoutIdentity) => {
13177
- __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()`);
13178
13192
  return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
13179
13193
  };
13180
13194
  }
@@ -13273,9 +13287,9 @@ class LayoutModule extends base_1$5.Base {
13273
13287
  }
13274
13288
  }
13275
13289
  Factory$2.LayoutModule = LayoutModule;
13276
- _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) {
13277
13291
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
13278
- throw new Error('You must call init before using this API');
13292
+ throw new Error(`You must call init before using the API ${method}`);
13279
13293
  }
13280
13294
  };
13281
13295
 
@@ -13286,7 +13300,7 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layou
13286
13300
  * * {@link LayoutModule} contains static members of the `Layout` API, accessible through `fin.Platform.Layout`.
13287
13301
  * * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
13288
13302
  *
13289
- * 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),
13290
13304
  * both of these were documented on the same page.
13291
13305
  *
13292
13306
  * @packageDocumentation
@@ -13567,7 +13581,7 @@ Factory$3.PlatformModule = PlatformModule;
13567
13581
  * * {@link PlatformModule} contains static members of the `Platform` API, accessible through `fin.Platform`.
13568
13582
  * * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
13569
13583
  *
13570
- * 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),
13571
13585
  * both of these were documented on the same page.
13572
13586
  *
13573
13587
  * @packageDocumentation
@@ -14974,7 +14988,7 @@ function requireInteropBroker () {
14974
14988
  * // }
14975
14989
  * ```
14976
14990
  *
14977
- * 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).
14978
14992
  *
14979
14993
  * @param contextForIntent Data passed between entities and applications.
14980
14994
  * @param clientIdentity Identity of the Client making the request.
@@ -16777,7 +16791,7 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
16777
16791
  * * {@link SnapshotSourceModule} contains static members of the `SnapshotSource` API, accessible through `fin.SnapshotSource`.
16778
16792
  * * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
16779
16793
  *
16780
- * 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),
16781
16795
  * both of these were documented on the same page.
16782
16796
  *
16783
16797
  * @packageDocumentation
@@ -17211,7 +17225,7 @@ class MockEnvironment {
17211
17225
  getRtcPeer() {
17212
17226
  throw new Error(me_1.environmentUnsupportedMessage);
17213
17227
  }
17214
- initLayout() {
17228
+ initLayoutManager() {
17215
17229
  throw new Error(me_1.environmentUnsupportedMessage);
17216
17230
  }
17217
17231
  async createLayout() {
@@ -17220,6 +17234,9 @@ class MockEnvironment {
17220
17234
  async destroyLayout() {
17221
17235
  throw new Error(me_1.environmentUnsupportedMessage);
17222
17236
  }
17237
+ async resolveLayout() {
17238
+ throw new Error(me_1.environmentUnsupportedMessage);
17239
+ }
17223
17240
  initPlatform() {
17224
17241
  throw new Error(me_1.environmentUnsupportedMessage);
17225
17242
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "35.78.6",
3
+ "version": "35.78.12",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",