@openfin/core 34.78.50 → 35.78.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/mock.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="jquery" />
2
1
  /// <reference types="node" />
3
2
 
4
3
  import { EventEmitter } from 'events';
@@ -43,15 +42,6 @@ declare type Accelerator = {
43
42
  zoom: boolean;
44
43
  };
45
44
 
46
- /**
47
- * @interface
48
- */
49
- declare type AddLayoutInstanceOptions = {
50
- container: HTMLDivElement;
51
- layoutName: string;
52
- layout: LayoutOptions;
53
- };
54
-
55
45
  /**
56
46
  * @interface
57
47
  */
@@ -1746,6 +1736,23 @@ declare type BaseConfig = {
1746
1736
  timeout?: number;
1747
1737
  };
1748
1738
 
1739
+ /**
1740
+ * Properties shared by all content creation rules, regardless of context.
1741
+ *
1742
+ * @interface
1743
+ */
1744
+ declare type BaseContentCreationRule = {
1745
+ /**
1746
+ * List of [match patterns](https://developer.chrome.com/extensions/match_patterns) that indicate the specified
1747
+ * behavior should be used
1748
+ */
1749
+ match: MatchPattern[];
1750
+ /**
1751
+ * custom property
1752
+ */
1753
+ data?: unknown;
1754
+ };
1755
+
1749
1756
  /**
1750
1757
  * A base OpenFin event. All OpenFin event payloads extend this type.
1751
1758
  *
@@ -1846,6 +1853,18 @@ declare type BeginUserBoundsChangingEvent = UserBoundsChangeEvent & {
1846
1853
  type: 'begin-user-bounds-changing';
1847
1854
  };
1848
1855
 
1856
+ /**
1857
+ * A rule prescribing content creation that should be blocked.
1858
+ *
1859
+ * @interface
1860
+ */
1861
+ declare type BlockedContentCreationRule = BaseContentCreationRule & {
1862
+ /**
1863
+ * Behavior to use when opening matched content.
1864
+ */
1865
+ behavior: 'block';
1866
+ };
1867
+
1849
1868
  /**
1850
1869
  * Generated when a WebContents loses focus.
1851
1870
  * @interface
@@ -1893,6 +1912,18 @@ declare type BoundsChangingEvent = BoundsChangeEvent & {
1893
1912
  type: 'bounds-changing';
1894
1913
  };
1895
1914
 
1915
+ /**
1916
+ * A rule prescribing content creation in the browser.
1917
+ *
1918
+ * @interface
1919
+ */
1920
+ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1921
+ /**
1922
+ * Behavior to use when opening matched content.
1923
+ */
1924
+ behavior: 'browser';
1925
+ };
1926
+
1896
1927
  declare interface BrowserWindow {
1897
1928
  /**
1898
1929
  * True if the window has been opened and its GoldenLayout instance initialised.
@@ -3012,7 +3043,7 @@ declare class ClassicStrategy implements ChannelStrategy<EndpointPayload> {
3012
3043
  private messageReceiver;
3013
3044
  private endpointId;
3014
3045
  private providerIdentity;
3015
- constructor(wire: Transport, messageReceiver: MessageReceiver, endpointId: string, // Provider endpointId is channelId
3046
+ constructor(wire: Transport, messageReceiver: MessageReceiver_2, endpointId: string, // Provider endpointId is channelId
3016
3047
  providerIdentity: ProviderIdentity_4);
3017
3048
  onEndpointDisconnect(endpointId: string, listener: () => void): void;
3018
3049
  receive(listener: (action: string, payload: any, identity: OpenFin_2.ClientIdentity | OpenFin_2.ClientIdentityMultiRuntime | ProviderIdentity_4) => Promise<any>): void;
@@ -3291,6 +3322,16 @@ declare type ClosedMenuResult = {
3291
3322
  result: 'closed';
3292
3323
  };
3293
3324
 
3325
+ /**
3326
+ * @interface
3327
+ */
3328
+ declare type CloseViewOptions = {
3329
+ /**
3330
+ *View to be closed.
3331
+ */
3332
+ viewIdentity: Identity_5;
3333
+ };
3334
+
3294
3335
  /**
3295
3336
  * @interface
3296
3337
  */
@@ -3299,6 +3340,11 @@ declare type CloseViewPayload = {
3299
3340
  *View to be closed.
3300
3341
  */
3301
3342
  view: Identity_5;
3343
+ /**
3344
+ * The target layout identity where this view should be closed. If not provided, will resolve to the
3345
+ * visible layout.
3346
+ */
3347
+ target?: LayoutIdentity;
3302
3348
  };
3303
3349
 
3304
3350
  /**
@@ -3534,12 +3580,23 @@ declare type ConstViewOptions = {
3534
3580
  /**
3535
3581
  * **Platforms Only.**
3536
3582
  * Determines what happens when a view is closed in a platform window.
3537
- * Supersedes `detachOnClose`, but has no default value.
3583
+ * Supersedes the deprecated `detachOnClose`.
3584
+ * If not set, detaults to `destroy` if `detachOnClose` is false (default), or `detach` if `detachOnClose` is true.
3585
+ * While this option is not updateable, it may change at runtime if `detachOnClose` is updated.
3538
3586
  * 'hide' hides the view on the platform window that closed it.
3539
- * 'detach' behaves like 'detachOnClose': true.
3540
- * 'destroy' is the default behavior as long as 'detachOnClose' is not set.
3587
+ * 'detach' behaves like 'detachOnClose': true. It attaches the closed view to the platform provider.
3588
+ * 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
3589
+ */
3590
+ closeBehavior: 'hide' | 'detach' | 'destroy';
3591
+ /**
3592
+ * Controls interaction of the view with its parent window's download shelf.
3541
3593
  */
3542
- closeBehavior?: 'hide' | 'detach' | 'destroy';
3594
+ downloadShelf?: {
3595
+ /**
3596
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3597
+ */
3598
+ enabled: boolean;
3599
+ };
3543
3600
  };
3544
3601
 
3545
3602
  /**
@@ -3651,8 +3708,16 @@ declare type ConstWindowOptions = {
3651
3708
  * launches in favor of the cached value.
3652
3709
  */
3653
3710
  defaultWidth: number;
3711
+ downloadShelf: DownloadShelfOptions;
3654
3712
  height: number;
3655
3713
  layout: any;
3714
+ /**
3715
+ * @experimental
3716
+ *
3717
+ * The collection of layouts to load when the window is created. When launching multiple layouts, manage
3718
+ * the lifecycle via fin.Platform.Layout.create()/destroy() methods.
3719
+ */
3720
+ layoutSnapshot: LayoutSnapshot;
3656
3721
  /**
3657
3722
  * Parent identity of a modal window. It will create a modal child window when this option is set.
3658
3723
  */
@@ -3868,28 +3933,15 @@ declare type ContentCreationOptions = {
3868
3933
  * A rule for creating content in OpenFin; maps a content type to the way in which
3869
3934
  * newly-opened content of that type will be handled.
3870
3935
  *
3936
+ * @remarks This is effectively just a union type discriminated by the `behavior` key. The generic
3937
+ * parameter is a legacy feature that is included for backwards-compatibility reasons.
3871
3938
  *
3872
- * @interface
3939
+ * @typeParam Behavior The way content governed by this rule will be created. If provided, this type will narrow to
3940
+ * the specified `behavior` key.
3873
3941
  */
3874
- declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
3875
- /**
3876
- * Behavior to use when opening matched content. The value could be 'view' | 'window' | 'browser' | 'block'.
3877
- */
3878
- behavior: T;
3879
- /**
3880
- * List of [match patterns](https://developer.chrome.com/extensions/match_patterns) that indicate the specified
3881
- * behavior should be used
3882
- */
3883
- match: MatchPattern[];
3884
- /**
3885
- * Options for newly-created view or window (if applicable).
3886
- */
3887
- options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<ViewOptions> : never;
3888
- /**
3889
- * custom property
3890
- */
3891
- data?: unknown;
3892
- };
3942
+ declare type ContentCreationRule<Behavior extends ContentCreationBehaviorNames = ContentCreationBehaviorNames> = Extract<WindowContentCreationRule | ViewContentCreationRule | BrowserContentCreationRule | BlockedContentCreationRule, {
3943
+ behavior: Behavior;
3944
+ }>;
3893
3945
 
3894
3946
  /**
3895
3947
  * @interface
@@ -4398,15 +4450,12 @@ declare type CreatedEvent = BaseViewEvent & {
4398
4450
  };
4399
4451
 
4400
4452
  /**
4401
- * @interface
4453
+ * @interface @experimental
4402
4454
  */
4403
4455
  declare type CreateLayoutOptions = {
4404
- /**
4405
- * @experimental
4406
- *
4407
- * @returns
4408
- */
4409
- layoutManagerOverride: () => any;
4456
+ container: HTMLElement;
4457
+ layoutName: string;
4458
+ layout: LayoutOptions;
4410
4459
  };
4411
4460
 
4412
4461
  /**
@@ -4427,7 +4476,7 @@ declare type CreateViewPayload = {
4427
4476
  /**
4428
4477
  * @interface
4429
4478
  */
4430
- declare type CreateViewTarget = Identity_5 & {
4479
+ declare type CreateViewTarget = LayoutIdentity & {
4431
4480
  /**
4432
4481
  * If specified, view creation will not attach to a window and caller must
4433
4482
  * insert the view into the layout explicitly
@@ -4438,6 +4487,44 @@ declare type CreateViewTarget = Identity_5 & {
4438
4487
  };
4439
4488
  };
4440
4489
 
4490
+ /**
4491
+ * The registry entry for a given protocol exists but can't be parsed.
4492
+ * @interface
4493
+ */
4494
+ declare type CustomProtocolMalformedState = {
4495
+ state: 'Malformed';
4496
+ };
4497
+
4498
+ /**
4499
+ * The registry entry is missing for a given custom protocol.
4500
+ * @interface
4501
+ */
4502
+ declare type CustomProtocolMissingState = {
4503
+ state: 'Missing';
4504
+ };
4505
+
4506
+ /**
4507
+ * Define possible options for Custom protocol.
4508
+ * @interface
4509
+ */
4510
+ declare type CustomProtocolOptions = {
4511
+ protocolName: string;
4512
+ };
4513
+
4514
+ /**
4515
+ * The registry rentry for a given protocol exists and can be parsed successfully.
4516
+ * @interface
4517
+ */
4518
+ declare type CustomProtocolRegisteredState = {
4519
+ state: 'Registered';
4520
+ handlerManifestUrl: string;
4521
+ };
4522
+
4523
+ /**
4524
+ * Define possible registration states for a given custom protocol.
4525
+ */
4526
+ declare type CustomProtocolState = CustomProtocolMissingState | CustomProtocolMalformedState | CustomProtocolRegisteredState;
4527
+
4441
4528
  /**
4442
4529
  * Custom headers for requests sent by the window.
4443
4530
  *
@@ -4455,6 +4542,8 @@ declare type CustomRequestHeaders = {
4455
4542
  headers: WebRequestHeader[];
4456
4543
  };
4457
4544
 
4545
+ declare type DataChannelReadyState = RTCDataChannel['readyState'];
4546
+
4458
4547
  /**
4459
4548
  * @interface
4460
4549
  */
@@ -4527,13 +4616,6 @@ declare type DestroyedEvent = BaseViewEvent & {
4527
4616
  type: 'destroyed';
4528
4617
  };
4529
4618
 
4530
- /**
4531
- * @interface
4532
- */
4533
- declare type DestroyLayoutOptions = {
4534
- layoutName: string;
4535
- };
4536
-
4537
4619
  /**
4538
4620
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4539
4621
  * @interface
@@ -4730,6 +4812,47 @@ declare type DownloadRule = {
4730
4812
  match: string[];
4731
4813
  };
4732
4814
 
4815
+ /**
4816
+ * @interface
4817
+ *
4818
+ * Controls the styling and behavior of the window download shelf.
4819
+ */
4820
+ declare type DownloadShelfOptions = {
4821
+ /**
4822
+ * Whether downloads in this window trigger opening the download shelf.
4823
+ */
4824
+ enabled: boolean;
4825
+ /**
4826
+ * Styling options for the download shelf border.
4827
+ */
4828
+ border?: {
4829
+ /**
4830
+ * Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
4831
+ *
4832
+ * @remarks The top border is fixed to 1 pixel regardless of this setting.
4833
+ */
4834
+ size?: number;
4835
+ /**
4836
+ * Color of the border, either a string name or a hex code. Defaults to chromium theme
4837
+ * if absent.
4838
+ */
4839
+ color?: string;
4840
+ };
4841
+ };
4842
+
4843
+ /**
4844
+ * Generated when the visibility of the window's download shelf changes.
4845
+ *
4846
+ * @interface
4847
+ */
4848
+ declare type DownloadShelfVisibilityChangedEvent = BaseWindowEvent & {
4849
+ type: 'download-shelf-visibility-changed';
4850
+ /**
4851
+ * True if the download shelf was just opened; false if it was just closed.
4852
+ */
4853
+ visible: boolean;
4854
+ };
4855
+
4733
4856
  /**
4734
4857
  * DPI (dots per inch) configuration for printing.
4735
4858
  *
@@ -4934,9 +5057,11 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4934
5057
  } : never;
4935
5058
 
4936
5059
  declare interface Environment {
4937
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, ...args: Parameters<OpenFin_2.Fin['Platform']['Layout']['init']>): ReturnType<OpenFin_2.Fin['Platform']['Layout']['init']>;
5060
+ initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5061
+ createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5062
+ destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
4938
5063
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
4939
- observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (() => void);
5064
+ observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
4940
5065
  writeToken(path: string, token: string): Promise<string>;
4941
5066
  retrievePort(config: NewConnectConfig): Promise<number>;
4942
5067
  getNextMessageId(): any;
@@ -5215,7 +5340,7 @@ declare namespace ExternalApplicationEvents {
5215
5340
  }
5216
5341
 
5217
5342
  /**
5218
- * Union of possible `type` values for a {@link OpenFin.ApplicationEvents.ApplicationEvent}.
5343
+ * Union of possible `type` values for a {@link ApplicationEvent}.
5219
5344
  */
5220
5345
  declare type ExternalApplicationEventType = ExternalApplicationEvent['type'];
5221
5346
 
@@ -5541,6 +5666,8 @@ declare type FindIntentsByContextOptions<MetadataType = IntentMetadata_3> = {
5541
5666
  metadata?: MetadataType;
5542
5667
  };
5543
5668
 
5669
+ declare type FlexReadyState = WebSocketReadyState | DataChannelReadyState;
5670
+
5544
5671
  /**
5545
5672
  * Generated when a WebContents gains focus.
5546
5673
  * @interface
@@ -5861,6 +5988,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5861
5988
  * Registers a global hotkey with the operating system.
5862
5989
  * @param hotkey a hotkey string
5863
5990
  * @param listener called when the registered hotkey is pressed by the user.
5991
+ * @throws If the `hotkey` is reserved, see list below.
5992
+ * @throws if the `hotkey` is already registered by another application.
5864
5993
  *
5865
5994
  * @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
5866
5995
  * If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
@@ -5933,7 +6062,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5933
6062
  */
5934
6063
  unregisterAll(): Promise<void>;
5935
6064
  /**
5936
- * Checks if a given hotkey has been registered
6065
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5937
6066
  * @param hotkey a hotkey string
5938
6067
  *
5939
6068
  * @example
@@ -5997,6 +6126,7 @@ declare namespace GoldenLayout {
5997
6126
  DragSource,
5998
6127
  BrowserWindow,
5999
6128
  Header,
6129
+ TabDragListener,
6000
6130
  Tab,
6001
6131
  EventEmitter_2 as EventEmitter
6002
6132
  }
@@ -6111,10 +6241,7 @@ declare class GoldenLayout_2 implements EventEmitter_2 {
6111
6241
  * @param itemConfiguration An item configuration (can be an entire tree of items)
6112
6242
  * @param parent A parent item
6113
6243
  */
6114
- createContentItem(
6115
- itemConfiguration?: ItemConfigType,
6116
- parent?: ContentItem
6117
- ): ContentItem;
6244
+ createContentItem(itemConfiguration?: ItemConfigType, parent?: ContentItem): ContentItem;
6118
6245
 
6119
6246
  /**
6120
6247
  * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
@@ -6147,10 +6274,7 @@ declare class GoldenLayout_2 implements EventEmitter_2 {
6147
6274
  * @return the dragSource that was created. This can be used to remove the
6148
6275
  * dragSource from the layout later.
6149
6276
  */
6150
- createDragSource(
6151
- element: HTMLElement | JQuery,
6152
- itemConfiguration: ItemConfigType
6153
- ): DragSource;
6277
+ createDragSource(element: HTMLElement | JQuery, itemConfiguration: ItemConfigType): DragSource;
6154
6278
 
6155
6279
  /**
6156
6280
  * Removes a dragSource from the layout.
@@ -6526,19 +6650,30 @@ declare type InitializedEvent = IdentityEvent & {
6526
6650
  type: 'initialized';
6527
6651
  };
6528
6652
 
6529
- declare type InitLayoutOptions = OpenFin_2.InitLayoutOptions;
6530
-
6531
- declare type InitLayoutOptions_2 = OpenFin_2.InitLayoutOptions;
6532
-
6533
6653
  /**
6534
6654
  * @interface
6535
6655
  */
6536
- declare type InitLayoutOptions_3 = {
6656
+ declare type InitLayoutOptions = {
6537
6657
  /**
6658
+ * @deprecated use container HTMLElement instead
6659
+ *
6538
6660
  * The id attribute of the container where the window's Layout should be initialized. If not provided
6539
6661
  * then an element with id `layout-container` is used. We recommend using a div element.
6540
6662
  */
6541
6663
  containerId?: string;
6664
+ /**
6665
+ * The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
6666
+ */
6667
+ container?: HTMLElement;
6668
+ /**
6669
+ * An override callback used to instantiate a custom LayoutManager. When present, will enable
6670
+ * Multiple Layouts. The callback should return a class.
6671
+ *
6672
+ * @remarks
6673
+ * **NOTE**: Unlike the Platform Provider overrideCallback and interopOverride, this override should
6674
+ * return a class, not an instance
6675
+ */
6676
+ layoutManagerOverride?: LayoutManagerOverride<LayoutSnapshot>;
6542
6677
  };
6543
6678
 
6544
6679
  /**
@@ -8386,8 +8521,8 @@ declare class Layout extends Base {
8386
8521
  /**
8387
8522
  * @internal
8388
8523
  */
8389
- init: (options?: InitLayoutOptions_2) => Promise<Layout>;
8390
- identity: Identity_4;
8524
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<Layout>;
8525
+ identity: OpenFin_2.LayoutIdentity;
8391
8526
  private platform;
8392
8527
  wire: Transport;
8393
8528
  /**
@@ -8566,133 +8701,30 @@ declare type LayoutComponent = LayoutItemConfig & {
8566
8701
 
8567
8702
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
8568
8703
 
8569
- declare class LayoutContentCache {
8570
- private contentItemCache;
8571
- private contentItemCacheId;
8572
- private createCacheKey;
8573
- hasKey: (id: string) => boolean;
8574
- getItemOrUndefined: (id: string) => GoldenLayout.ContentItem | undefined;
8575
- getContentItemOrThrow: (id: string, expectedType?: string[]) => GoldenLayout.ContentItem;
8576
- getOrCreateEntityId: (contentItem: GoldenLayout.ContentItem) => string;
8577
- }
8578
-
8579
8704
  declare type LayoutEntitiesClient = ApiClient<LayoutEntitiesController>;
8580
8705
 
8581
- /**
8582
- * @internal
8583
- * Controller for the layout entities apis, allowing alterations to be applied
8584
- * to an instance of layout manager in a structured manner.
8585
- */
8586
- declare class LayoutEntitiesController {
8587
- private layoutInstance;
8588
- private layoutContentCache;
8589
- private wire;
8590
- constructor(layoutInstance: OpenFinLayout, layoutContentCache: LayoutContentCache);
8591
- private analytics;
8592
- /**
8593
- * @internal
8594
- * @returns the root contentItem of the layout.
8595
- */
8596
- getRoot: () => OpenFin_2.LayoutEntityDefinition;
8597
- /**
8598
- * @internal
8599
- * Retrieves the containing stack of a given view identity.
8600
- * @param view Identity of the view to retrieve the stack of.
8601
- * @returns Stack containing the given view.
8602
- * @throws If the view does not belong to a stack within the layout manager.
8603
- */
8604
- getStackByView: (view: OpenFin_2.Identity) => Promise<OpenFin_2.LayoutEntityDefinition | undefined>;
8605
- /**
8606
- * @internal
8607
- * Returns all views belonging to a given stack
8608
- *
8609
- * NOTE: Due to (TODO: ticket) Golden Layouts has an issue which changes the order of tabs
8610
- * when the amount of new views to add overflows the width of the container. This results
8611
- * in tabs being re-ordered in the UI, while the underlying content item array remains in the
8612
- * original order specified. So calling getStackViews() will return this underlying array order,
8613
- * with indexes that will not match up to the render-order of the tabs.
8614
- *
8615
- * @param id - Entity id of the stack.
8616
- * @returns A list of view identities in order of appearance.
8617
- * @throws if the content item associated with the entity id does not exist or is not a stack.
8618
- */
8706
+ declare type LayoutEntitiesController = {
8707
+ getLayoutIdentityForViewOrThrow: (viewIdentity?: OpenFin_2.Identity) => Promise<OpenFin_2.LayoutIdentity>;
8708
+ getRoot: (layoutIdentity?: OpenFin_2.LayoutIdentity) => Promise<OpenFin_2.LayoutEntityDefinition>;
8709
+ getStackByView: (viewIdentity: OpenFin_2.Identity) => Promise<OpenFin_2.LayoutEntityDefinition | undefined>;
8619
8710
  getStackViews: (id: string) => OpenFin_2.Identity[];
8620
- /**
8621
- * @internal
8622
- * Retrieves the content of a column or row and adds each to the
8623
- * entity cache to allow them to be addressed externally.
8624
- * @param id Entity id of the Column Or Row to retrieve the content of.
8625
- * @returns Array of layout entity definitions
8626
- * @throws if the entity associated with {@link id} is not in the entity cache, does not belogn to a layout, or is not a column/row.
8627
- */
8628
- getContent(id: string): OpenFin_2.LayoutEntityDefinition[];
8629
- /**
8630
- * @internal
8631
- * Retrieves the parent content item of the given entity, and adds it to the entity cache
8632
- * so it can be addressed externally.
8633
- * @param id Entity id associated with a layout content item.
8634
- * @returns An entity definition for the given entity's parent, or undefined if the entity is the top level
8635
- * content item or has been removed from the layout entirely.
8636
- */
8637
- getParent(id: string): OpenFin_2.LayoutEntityDefinition | undefined;
8638
- /**
8639
- * @internal
8640
- * @param id Entity id associated with a layout content item.
8641
- * @returns true if the given entity is the root content item, false otherwise.
8642
- */
8711
+ getContent: (id: string) => OpenFin_2.LayoutEntityDefinition[];
8712
+ getParent: (id: string) => OpenFin_2.LayoutEntityDefinition | undefined;
8643
8713
  isRoot: (id: string) => boolean;
8644
- /**
8645
- * @internal
8646
- * Checks whether the given entity exists.
8647
- * @param entityId Id of a content item within the layout
8648
- * @returns True if the content item exists and belongs to the layout.
8649
- */
8650
8714
  exists: (entityId: string) => boolean;
8651
- /**
8652
- * @internal
8653
- * Adds an existing view to the stack, or creates and adds a view to the given stack.
8654
- *
8655
- * NOTE: Due to (TODO: ticket) Golden Layouts has an issue which changes the order of tabs
8656
- * when the amount of new views to add overflows the width of the container. This results
8657
- * in tabs being re-ordered in the UI, while the underlying content item array remains in the
8658
- * original order specified. So calling getStackViews() will return this underlying array order,
8659
- * with indexes that will not match up to the render-order of the tabs.
8660
- *
8661
- * @param stackEntityId Entity id of the stack content item within the layout.
8662
- * @param viewCreationOrReference View identity or creation options
8663
- * @param options Optional view options: index number used to insert the view into the stack at that index. Defaults to 0 (front of the stack)
8664
- * @returns Promise resolving with the identity of the newly added view.
8665
- * @throws If the view does not exist, fails to create, or the stack does not exist.
8666
- */
8667
- addViewToStack: (stackEntityId: string, viewCreationOrReference: ViewCreationOrReference, { index }?: OpenFin_2.AddViewToStackOptions) => Promise<OpenFin_2.Identity>;
8668
- private findViewInStack;
8669
- /**
8670
- * @internal
8671
- * Removes a view from the given stack. If it's the only view, the stack will be destroyed, unless window creation
8672
- * option closeOnLastViewRemoved is set to false.
8673
- *
8674
- * @param stackEntityId Entity id of a stack content item to remove the view from.
8675
- * @param view Identity of the view to remove.
8676
- * @throws If the stack does not exist or the view does not exist or belong to the stack.
8677
- */
8715
+ addViewToStack: (stackEntityId: string, viewCreationOrReference: ViewCreationOrReference, viewInsertionOptions?: {
8716
+ index?: number;
8717
+ }) => Promise<OpenFin_2.Identity>;
8678
8718
  removeViewFromStack: (stackEntityId: string, view: OpenFin_2.Identity) => Promise<void>;
8679
- /**
8680
- * @internal
8681
- * Creates a new adjacent 'stack' and adds the views to it at the specified position
8682
- * @param targetId Entity id of the content item to add a stack adjacent to it
8683
- * @param views List of identities or view creation options of the views to include in the stack
8684
- * @param options Creation options, defaults to { position: 'right' }
8685
- * @returns the Entity Id of the new stack
8686
- */
8687
- createAdjacentStack: (targetId: string, views: ViewCreationOrReference[], { position }?: {
8719
+ createAdjacentStack: (targetId: string, views: ViewCreationOrReference[], stackCreationOptions?: {
8688
8720
  position?: OpenFin_2.LayoutPosition;
8689
8721
  }) => Promise<string>;
8690
- getAdjacentStacks: ({ targetId, edge }: {
8722
+ getAdjacentStacks: (stackTarget: {
8691
8723
  targetId: string;
8692
8724
  edge: OpenFin_2.LayoutPosition;
8693
8725
  }) => Promise<Pick<OpenFin_2.LayoutEntityDefinition, 'entityId'>[]>;
8694
8726
  setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin_2.Identity) => Promise<void>;
8695
- }
8727
+ };
8696
8728
 
8697
8729
  /**
8698
8730
  * @interface
@@ -8727,11 +8759,14 @@ declare type LayoutInitializedEvent = BaseWindowEvent & {
8727
8759
  };
8728
8760
 
8729
8761
  /**
8730
- * @interface @experimental
8762
+ * @interface @experimental @internal
8763
+ *
8764
+ * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8731
8765
  *
8732
8766
  * Responsible for handling all layout management and renderering
8733
8767
  */
8734
8768
  declare type LayoutInstance = {
8769
+ identity: LayoutIdentity;
8735
8770
  getFrameSnapshot: () => Promise<LayoutOptions>;
8736
8771
  addView: (payload: AddViewOptions) => Promise<View_2>;
8737
8772
  closeView: (viewIdentity: Identity_5) => Promise<void>;
@@ -8740,15 +8775,14 @@ declare type LayoutInstance = {
8740
8775
  getViews: () => LayoutComponent[];
8741
8776
  getCurrentViews: () => Identity_5[];
8742
8777
  startReplaceLayout: (payload: ReplaceLayoutOptions) => Promise<void>;
8743
- applyPreset: (payload: PresetLayoutOptions_3) => void;
8778
+ applyPreset: (payload: PresetLayoutOptions_2) => void;
8744
8779
  isVisible: () => boolean;
8745
- destroy: () => void;
8780
+ destroy: () => Promise<void>;
8746
8781
  };
8747
8782
 
8748
8783
  /**
8749
8784
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8750
- * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
8751
- * {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
8785
+ * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
8752
8786
  *
8753
8787
  * @interface
8754
8788
  */
@@ -8770,25 +8804,43 @@ declare type LayoutItemConfig = {
8770
8804
 
8771
8805
  /**
8772
8806
  * @interface @experimental
8807
+ *
8808
+ * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8809
+ *
8810
+ * Responsible for aggergating all layout snapshots and storing LayoutInstances
8773
8811
  */
8774
- declare interface LayoutManager<T extends LayoutSnapshot = LayoutSnapshot> {
8812
+ declare interface LayoutManager<T extends LayoutSnapshot> {
8775
8813
  /**
8776
8814
  * @experimental
8777
8815
  *
8778
- * Must be overridden when working with multiple layouts
8816
+ * To enable multiple layouts, override this method and do not call super.applyLayoutSnapshot()
8817
+ *
8818
+ * This hook is called by OpenFin during fin.Platform.Layout.init() call, to pass a snapshot to derived
8819
+ * classes which will be used launch a platform window. Use this hook to set your local UI state and
8820
+ * begin rendering the containers for your layouts UI.
8821
+ *
8822
+ * Ensure you call fin.Platform.Layout.create() on every layout in snapshot.layouts when that layout is
8823
+ * ready to be created in your application.
8779
8824
  *
8780
- * Hook called during fin.Platform.Layout.init() call, to inform derived classes
8781
- * when a snapshot is being applied to launch a platform window. Use this hook to set the
8782
- * local state and ensure you call fin.Platform.Layout.create() on every layout in snapshot.layouts
8825
+ * If you add custom data to the app manifest snapshot.windows.layoutSnapshot key, this data will
8826
+ * be included in the snapshot type.
8783
8827
  *
8784
- * When using custom data to the app manifest snapshot.windows.layoutSnapshot key, this data will
8785
- * be included in the snapshot type T and should align with your component state T.
8828
+ * The default implementation throws if it is called with a snapshot containing more than one layout.
8786
8829
  *
8787
- * TODO: detect if layoutManager override was set and this was not overridden somehow to warn?
8788
8830
  * @param snapshot
8789
- * @returns
8831
+ * @throws if Object.keys(snapshot).length > 1
8832
+ */
8833
+ applyLayoutSnapshot(snapshot: T): Promise<void>;
8834
+ /**
8835
+ * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8836
+ * contains a single layout.
8837
+ *
8838
+ * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8839
+ * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8840
+ *
8841
+ * @param snapshot
8842
+ * @throws if Object.keys(snapshot).length > 1
8790
8843
  */
8791
- applyLayoutSnapshot: (snapshot: T) => Promise<void>;
8792
8844
  /**
8793
8845
  * @experimental
8794
8846
  *
@@ -8799,35 +8851,63 @@ declare interface LayoutManager<T extends LayoutSnapshot = LayoutSnapshot> {
8799
8851
  * @param layoutIdentity
8800
8852
  * @returns
8801
8853
  */
8802
- showLayout: ({ layoutName }: LayoutIdentity) => Promise<void>;
8854
+ showLayout({ layoutName }: LayoutIdentity): Promise<void>;
8803
8855
  /**
8804
8856
  * @experimental
8805
8857
  *
8806
8858
  * @returns T
8807
8859
  */
8808
- getLayoutSnapshot: () => Promise<T>;
8860
+ getLayoutSnapshot(): Promise<T>;
8809
8861
  /**
8810
8862
  * @experimental
8811
8863
  *
8812
- * @param param0
8864
+ * @param layoutIdentity
8813
8865
  * @returns
8814
8866
  */
8815
- resolveLayout: ({ layoutName }: LayoutIdentity) => LayoutInstance;
8867
+ resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8816
8868
  /**
8817
8869
  * @experimental
8818
8870
  *
8819
8871
  * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8820
8872
  * Throws if it does not exist.
8821
- * @param layoutIdentity
8873
+ * @param layoutName
8822
8874
  * @returns
8823
8875
  */
8824
- getLayoutByName: (layoutName: string) => LayoutInstance;
8876
+ getLayoutByName(layoutName: string): LayoutInstance;
8825
8877
  /**
8826
8878
  * @experimental
8827
8879
  */
8828
8880
  getLayouts(): Record<string, LayoutInstance>;
8881
+ /**
8882
+ * @experimental
8883
+ */
8884
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8885
+ /**
8886
+ * @experimental
8887
+ */
8888
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8829
8889
  }
8830
8890
 
8891
+ /**
8892
+ * @experimental
8893
+ *
8894
+ * Constructor type for LayoutManager to be used with multiple layouts
8895
+ */
8896
+ declare type LayoutManagerConstructor<T extends LayoutSnapshot> = {
8897
+ new (): LayoutManager<T>;
8898
+ };
8899
+
8900
+ /**
8901
+ * @experimental
8902
+ *
8903
+ * Override callback used to init and configure multiple layouts. Implement by passing
8904
+ * a lambda and returning a class that OpenFin will new up for you.
8905
+ * @remarks
8906
+ * **NOTE**: Unlike the Platform Provider overrideCallback and interopOverride, this override should
8907
+ * return a class, not an instance
8908
+ */
8909
+ declare type LayoutManagerOverride<T extends LayoutSnapshot> = (Base: LayoutManagerConstructor<LayoutSnapshot>) => LayoutManagerConstructor<T>;
8910
+
8831
8911
  /**
8832
8912
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
8833
8913
  */
@@ -8852,7 +8932,7 @@ declare class LayoutModule extends Base {
8852
8932
  * const layoutConfig = await layout.getConfig();
8853
8933
  * ```
8854
8934
  */
8855
- wrap(identity: OpenFin_2.Identity): Promise<OpenFin_2.Layout>;
8935
+ wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8856
8936
  /**
8857
8937
  * Synchronously returns a Layout object that represents a Window's layout.
8858
8938
  *
@@ -8872,7 +8952,7 @@ declare class LayoutModule extends Base {
8872
8952
  * const layoutConfig = await layout.getConfig();
8873
8953
  * ```
8874
8954
  */
8875
- wrapSync(identity: OpenFin_2.Identity): OpenFin_2.Layout;
8955
+ wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
8876
8956
  /**
8877
8957
  * Asynchronously returns a Layout object that represents a Window's layout.
8878
8958
  *
@@ -8936,7 +9016,14 @@ declare class LayoutModule extends Base {
8936
9016
  * const layout = await fin.Platform.Layout.init({ containerId });
8937
9017
  * ```
8938
9018
  */
8939
- init: (options?: InitLayoutOptions) => Promise<OpenFin_2.Layout>;
9019
+ init: (options?: OpenFin_2.InitLayoutOptions) => Promise<OpenFin_2.Layout>;
9020
+ /**
9021
+ * Returns the layout manager for the current window
9022
+ * @returns
9023
+ */
9024
+ getCurrentLayoutManagerSync: <UserSnapshotType extends OpenFin_2.LayoutSnapshot>() => OpenFin_2.LayoutManager<UserSnapshotType>;
9025
+ create: (options: OpenFin_2.CreateLayoutOptions) => Promise<void>;
9026
+ destroy: (layoutIdentity: OpenFin_2.LayoutIdentity) => Promise<void>;
8940
9027
  }
8941
9028
 
8942
9029
  declare type LayoutModule_2 = OpenFin_2.Fin['Platform']['Layout'];
@@ -8964,7 +9051,7 @@ declare abstract class LayoutNode {
8964
9051
  /**
8965
9052
  * @ignore
8966
9053
  * @internal
8967
- * Encapsulates Api consumption of {@link LayoutEntitiesController} with a relayed dispatch
9054
+ * Encapsulates Api consumption of {@link LayoutEntitiesClient} with a relayed dispatch
8968
9055
  * @param client
8969
9056
  * @param controllerId
8970
9057
  * @param identity
@@ -9179,8 +9266,7 @@ declare type LayoutOptions = {
9179
9266
  };
9180
9267
  /**
9181
9268
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
9182
- * We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
9183
- * {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
9269
+ * We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
9184
9270
  */
9185
9271
  content?: LayoutContent;
9186
9272
  dimensions?: {
@@ -9476,7 +9562,17 @@ declare interface Message<T> {
9476
9562
 
9477
9563
  declare type MessageHandler = (data: any) => boolean;
9478
9564
 
9479
- declare class MessageReceiver extends Base {
9565
+ declare interface MessageReceiver {
9566
+ addEventListener(e: 'open', listener: (ev: Event) => void): void;
9567
+ addEventListener(e: 'error', listener: (ev: Event) => void): void;
9568
+ addEventListener(e: 'message', listener: (ev: MessageEvent) => void): void;
9569
+ addEventListener(e: 'close', listener: (ev: Event) => void): void;
9570
+ send(data: unknown): void;
9571
+ close(): void;
9572
+ readyState: FlexReadyState;
9573
+ }
9574
+
9575
+ declare class MessageReceiver_2 extends Base {
9480
9576
  private endpointMap;
9481
9577
  private latestEndpointIdByChannelId;
9482
9578
  constructor(wire: Transport);
@@ -9630,7 +9726,7 @@ declare type MutableViewOptions = {
9630
9726
  contentRedirect: ContentRedirect;
9631
9727
  /**
9632
9728
  * @defaultValue false
9633
- *
9729
+ * @deprecated
9634
9730
  * **Platforms Only.** If true, will hide and detach the View from the window for later use instead of closing,
9635
9731
  * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
9636
9732
  */
@@ -10053,6 +10149,11 @@ declare namespace OpenFin_2 {
10053
10149
  Rectangle,
10054
10150
  ApplicationCreationOptions,
10055
10151
  ApplicationOptions,
10152
+ CustomProtocolMissingState,
10153
+ CustomProtocolMalformedState,
10154
+ CustomProtocolRegisteredState,
10155
+ CustomProtocolState,
10156
+ CustomProtocolOptions,
10056
10157
  InteropBrokerOptions,
10057
10158
  ContextGroupInfo,
10058
10159
  DisplayMetadata_3 as DisplayMetadata,
@@ -10116,6 +10217,7 @@ declare namespace OpenFin_2 {
10116
10217
  ReplaceViewPayload,
10117
10218
  ReplaceViewOptions,
10118
10219
  CloseViewPayload,
10220
+ CloseViewOptions,
10119
10221
  FetchManifestPayload,
10120
10222
  ReplaceLayoutOpts,
10121
10223
  ReplaceLayoutPayload,
@@ -10239,6 +10341,11 @@ declare namespace OpenFin_2 {
10239
10341
  IntentHandler_2 as IntentHandler,
10240
10342
  ContentCreationBehaviorNames,
10241
10343
  MatchPattern,
10344
+ BaseContentCreationRule,
10345
+ WindowContentCreationRule,
10346
+ ViewContentCreationRule,
10347
+ BrowserContentCreationRule,
10348
+ BlockedContentCreationRule,
10242
10349
  ContentCreationRule,
10243
10350
  ContentCreationOptions,
10244
10351
  SnapshotProvider,
@@ -10278,13 +10385,13 @@ declare namespace OpenFin_2 {
10278
10385
  LayoutPresetType,
10279
10386
  LayoutIdentity,
10280
10387
  LayoutSnapshot,
10281
- InitLayoutOptions_3 as InitLayoutOptions,
10388
+ InitLayoutOptions,
10389
+ LayoutManagerConstructor,
10390
+ LayoutManagerOverride,
10282
10391
  LayoutInstance,
10283
10392
  LayoutManager,
10284
- AddLayoutInstanceOptions,
10285
10393
  CreateLayoutOptions,
10286
- DestroyLayoutOptions,
10287
- PresetLayoutOptions_3 as PresetLayoutOptions,
10394
+ PresetLayoutOptions_2 as PresetLayoutOptions,
10288
10395
  ResultBehavior,
10289
10396
  PopupBaseBehavior,
10290
10397
  PopupResultBehavior,
@@ -10324,6 +10431,7 @@ declare namespace OpenFin_2 {
10324
10431
  ChannelClientDisconnectionListener,
10325
10432
  ChannelProviderDisconnectionListener,
10326
10433
  RoutingInfo,
10434
+ DownloadShelfOptions,
10327
10435
  ApplicationEvents,
10328
10436
  BaseEvents,
10329
10437
  ExternalApplicationEvents,
@@ -10338,105 +10446,6 @@ declare namespace OpenFin_2 {
10338
10446
  }
10339
10447
  export default OpenFin_2;
10340
10448
 
10341
- declare class OpenFinLayout implements OpenFin_2.LayoutInstance {
10342
- #private;
10343
- private readonly splitterController;
10344
- private readonly tabDragController;
10345
- private readonly layoutContentCache;
10346
- private get defaultFaviconUrl();
10347
- private get isDragging();
10348
- private get resizing();
10349
- private get showBackgroundImages();
10350
- private get showFavicons();
10351
- private get showViewsOnSplitterDrag();
10352
- private get showViewsOnTabDrag();
10353
- private get showViewsOnWindowResize();
10354
- private get container();
10355
- get layout(): GoldenLayout.GoldenLayout;
10356
- private get layoutConfigToRestore();
10357
- private client;
10358
- private containerResizeObserver;
10359
- private viewsResizeObserver;
10360
- readonly ofWindow: OpenFin_2.Window;
10361
- readonly platform: Platform_2;
10362
- private lastItemDestroyed?;
10363
- private viewsSubscribedTo;
10364
- constructor(splitterController: SplitterController, tabDragController: TabDragController, layoutContentCache: LayoutContentCache, container: HTMLElement);
10365
- getViews: () => OpenFin_2.LayoutComponent[];
10366
- startReplaceLayout: ({ layout }: {
10367
- layout: GoldenLayout.Config;
10368
- }) => Promise<void>;
10369
- applyPreset: (payload: PresetLayoutOptions_2) => void;
10370
- isVisible: () => boolean;
10371
- destroy: () => void;
10372
- /**
10373
- * @internal
10374
- * Needed by init-layout util to wire up {@link LayoutEntitiesController}
10375
- */
10376
- static getClient: (instance: OpenFinLayout) => OpenFin_2.ChannelClient;
10377
- initManager: () => Promise<void>;
10378
- createLayout: (layout: GoldenLayout.Config, container: HTMLElement) => Promise<void>;
10379
- private setContainer;
10380
- private setupDragDropRegions;
10381
- private replaceLayout;
10382
- private onViewDetached;
10383
- private setupLayoutListeners;
10384
- private onLayoutInit;
10385
- private registerViewComponent;
10386
- private setupWindowListeners;
10387
- private setupResizeObservers;
10388
- /**
10389
- * Shows/hides a view depending on use case (used by browser)
10390
- * @ignore
10391
- */
10392
- private updateViewVisibility;
10393
- private onStackCreated;
10394
- private onTabCreated;
10395
- private onTabMouseUp;
10396
- private replaceCloseTabButton;
10397
- onCloseTabButtonClick: (tab: GoldenLayout.Tab) => Promise<void>;
10398
- addFaviconToTab: (tab: GoldenLayout.Tab, eventIcons: string[]) => void;
10399
- onPopoutClick: (stack: GoldenLayout.ContentItem) => void;
10400
- onStackCloseClick: (stack: GoldenLayout.ContentItem) => void;
10401
- private updateButtonDisplay;
10402
- private onItemCreated;
10403
- private observeSplitters;
10404
- handleOutOfWindowDrop: (e: {
10405
- screenY: number;
10406
- screenX: number;
10407
- }, parentTab: GoldenLayout.Tab, dimensions: {
10408
- width: any;
10409
- height: any;
10410
- }) => Promise<void>;
10411
- private onTabDragStart;
10412
- private setBackgroundImage;
10413
- private setBackgroundImages;
10414
- getFrameSnapshot: () => Promise<GoldenLayout.Config>;
10415
- getCurrentViews: () => OpenFin_2.Identity[];
10416
- addView: ({ options: viewConfig, targetView, location }: OpenFin_2.AddViewOptions) => Promise<View_4>;
10417
- replaceView: ({ viewToReplace, newView }: OpenFin_2.ReplaceViewOptions) => Promise<View_4>;
10418
- removeView: (viewConfig: OpenFin_2.Identity | OpenFin_2.ViewState) => Promise<View_4>;
10419
- closeView: (viewIdentity: OpenFin_2.Identity) => Promise<void>;
10420
- private createChannelConnections;
10421
- getViewComponent: ({ name }: {
10422
- name: string;
10423
- }) => ViewComponent | undefined;
10424
- getViewComponents: () => ViewComponent[];
10425
- private hideHighlight;
10426
- getOfViewFromComponentState: ({ name }: {
10427
- name: string;
10428
- }) => View_4;
10429
- private hideAllViews;
10430
- private showViews;
10431
- private initializeLayoutViews;
10432
- private createResizableView;
10433
- private attachView;
10434
- private createAndAttachView;
10435
- private setupViewEvents;
10436
- private dispatchLayoutEvent;
10437
- private setComponentState;
10438
- }
10439
-
10440
10449
  declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
10441
10450
 
10442
10451
  declare type OverlapsOnlyIfMatching<T, U> = {
@@ -11203,8 +11212,6 @@ declare class Platform extends EmitterBase<OpenFin_2.PlatformEvent> {
11203
11212
  }): Promise<void>;
11204
11213
  }
11205
11214
 
11206
- declare type Platform_2 = OpenFin_2.Platform;
11207
-
11208
11215
  /**
11209
11216
  * Generated when a new Platform's API becomes responsive.
11210
11217
  * @interface
@@ -11499,6 +11506,29 @@ declare interface PlatformProvider {
11499
11506
  * ```
11500
11507
  */
11501
11508
  getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
11509
+ /**
11510
+ * @experimental @internal
11511
+ *
11512
+ * **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
11513
+ *
11514
+ * Returns the window options value for `layoutSnapshot` which has already been normalized.
11515
+ * @param payload
11516
+ * @param callerIdentity
11517
+ */
11518
+ getInitialLayoutSnapshot(payload: undefined, callerIdentity: OpenFin_2.Identity): Promise<OpenFin_2.LayoutSnapshot | undefined>;
11519
+ /**
11520
+ * @experimental @internal
11521
+ *
11522
+ * **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
11523
+ *
11524
+ * Calls platform.createView for every view in the given layout. Returns an array of promises
11525
+ * one promise for each view create call
11526
+ *
11527
+ * @param layout
11528
+ * @param target
11529
+ * @returns an array of promises
11530
+ */
11531
+ createViewsForLayout(layout: GoldenLayout.Config, target: OpenFin_2.Identity): Promise<OpenFin_2.View>[];
11502
11532
  /**
11503
11533
  * **NOTE**: Internal use only. It is not recommended to manage the state of individual views.
11504
11534
  * Gets the current state of a single view and returns an object with the options needed to restore that view as part of a snapshot.
@@ -12234,12 +12264,10 @@ declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent &
12234
12264
 
12235
12265
  declare type PresetLayoutOptions = OpenFin_2.PresetLayoutOptions;
12236
12266
 
12237
- declare type PresetLayoutOptions_2 = OpenFin_2.PresetLayoutOptions;
12238
-
12239
12267
  /**
12240
12268
  * @interface
12241
12269
  */
12242
- declare type PresetLayoutOptions_3 = {
12270
+ declare type PresetLayoutOptions_2 = {
12243
12271
  /**
12244
12272
  * Which preset layout arrangement to use.
12245
12273
  * The preset options are `columns`, `grid`, `rows`, and `tabs`.
@@ -12463,7 +12491,7 @@ declare type PropagatedEventType<Topic extends string, Type extends string> = `$
12463
12491
 
12464
12492
  /**
12465
12493
  * A view event that has propagated to a parent {@link OpenFin.WindowEvents Window}, {@link OpenFin.ApplicationEvents Application},
12466
- * or {@link Openfin.SystemEvents System}), adding a `viewIdentity` property (since the `Identity` property of the propagated event refers to the `Window`) and prefixing the
12494
+ * or {@link OpenFin.SystemEvents System}), adding a `viewIdentity` property (since the `Identity` property of the propagated event refers to the `Window`) and prefixing the
12467
12495
  * event type key with `'view-'`.
12468
12496
  */
12469
12497
  declare type PropagatedViewEvent<TargetTopic extends string> = PropagatedEvent<'view', TargetTopic, ViewEvent> & {
@@ -12477,7 +12505,7 @@ declare type PropagatedViewEventType = PropagatedViewEvent<string>['type'];
12477
12505
 
12478
12506
  /**
12479
12507
  * A Window event that has propagated to the parent {@link OpenFin.ApplicationEvents Application} and {@link OpenFin.SystemEvents System},
12480
- * prefixing the type string with `'window-'`. Only {@link NativeWindowEvent native window events} will propagate
12508
+ * prefixing the type string with `'window-'`. Only {@link WindowSourcedEvent window-sourced events} will propagate
12481
12509
  * this way; those that have {@link OpenFin.ViewEvents.PropagatedViewEvent propagated} from {@link OpenFin.ViewEvents}
12482
12510
  * will *not* re-propagate.
12483
12511
  *
@@ -12695,6 +12723,13 @@ declare interface ProtocolMap extends ProtocolMapBase {
12695
12723
  anchor: OpenFin_2.AnchorType;
12696
12724
  }>>;
12697
12725
  'set-window-bounds': IdentityCall<WithPositioningOptions<Partial<OpenFin_2.Bounds>>>;
12726
+ 'register-custom-protocol': ApiCall<OpenFin_2.CustomProtocolOptions, void>;
12727
+ 'unregister-custom-protocol': ApiCall<{
12728
+ protocolName: string;
12729
+ }, void>;
12730
+ 'get-custom-protocol-state': ApiCall<{
12731
+ protocolName: string;
12732
+ }, OpenFin_2.CustomProtocolState>;
12698
12733
  }
12699
12734
 
12700
12735
  declare interface ProtocolMapBase {
@@ -12826,6 +12861,10 @@ declare interface ReactComponentConfig extends ItemConfig {
12826
12861
  */
12827
12862
  declare type ReadImageClipboardRequest = BaseClipboardRequest & ImageFormatOptions;
12828
12863
 
12864
+ declare interface ReceiverConfig extends Omit<RemoteConfig, 'address'> {
12865
+ receiver: MessageReceiver;
12866
+ }
12867
+
12829
12868
  /**
12830
12869
  * A rectangular area on the screen.
12831
12870
  *
@@ -12907,19 +12946,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12907
12946
  /**
12908
12947
  * @interface
12909
12948
  */
12910
- declare type ReplaceLayoutOptions = ReplaceLayoutOpts;
12949
+ declare type ReplaceLayoutOptions = {
12950
+ /**
12951
+ * Layout config to be applied.
12952
+ */
12953
+ layout: LayoutOptions;
12954
+ };
12911
12955
 
12912
12956
  /**
12913
12957
  * @interface
12914
12958
  *
12915
12959
  * @deprecated use ReplaceLayoutOptions instead
12916
12960
  */
12917
- declare type ReplaceLayoutOpts = {
12918
- /**
12919
- * Layout config to be applied.
12920
- */
12921
- layout: LayoutOptions;
12922
- };
12961
+ declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
12923
12962
 
12924
12963
  /**
12925
12964
  * @interface
@@ -12930,9 +12969,9 @@ declare type ReplaceLayoutPayload = {
12930
12969
  */
12931
12970
  opts: ReplaceLayoutOptions;
12932
12971
  /**
12933
- * Identity of the window whose layout will be replace.
12972
+ * Identity of the window whose layout will be replaced.
12934
12973
  */
12935
- target: Identity_5;
12974
+ target: LayoutIdentity;
12936
12975
  };
12937
12976
 
12938
12977
  /**
@@ -12951,7 +12990,7 @@ declare type ReplaceViewPayload = {
12951
12990
  viewToReplace: Identity_5;
12952
12991
  newView: Partial<ViewOptions>;
12953
12992
  };
12954
- target: Identity_5;
12993
+ target: LayoutIdentity;
12955
12994
  };
12956
12995
 
12957
12996
  /**
@@ -13463,6 +13502,49 @@ declare type ShortcutOverride = Hotkey & {
13463
13502
  command: string;
13464
13503
  };
13465
13504
 
13505
+ /**
13506
+ * Generated when the Download Shelf 'Show All' button is clicked.
13507
+ *
13508
+ * @remarks By default, OpenFin does not handle the clicking of the `Show All` button on the download
13509
+ * shelf. Instead, it fires this event, which leaves rendering a download manager to the user. For a simple
13510
+ * implementation, the `chrome://downloads` page can be used (see the example below):
13511
+ *
13512
+ * @example
13513
+ *
13514
+ * ```typescript
13515
+ * const platform = await fin.Platform.getCurrentSync();
13516
+ * // Listen to the propagated event at the Platform level, so that we only need one listener for a click from any window
13517
+ * platform.on('window-show-all-downloads', () => {
13518
+ * // Render the `chrome://downloads` window when a user clicks on the download shelf `Show All` button
13519
+ * platform.createWindow({
13520
+ * name: 'show-download-window',
13521
+ * layout: {
13522
+ * content: [
13523
+ * {
13524
+ * type: 'stack',
13525
+ * content: [
13526
+ * {
13527
+ * type: 'component',
13528
+ * componentName: 'view',
13529
+ * componentState: {
13530
+ * name: 'show-download-view',
13531
+ * url: 'chrome://downloads'
13532
+ * }
13533
+ * }
13534
+ * ]
13535
+ * }
13536
+ * ]
13537
+ * }
13538
+ * });
13539
+ * })
13540
+ * ```
13541
+ *
13542
+ * @interface
13543
+ */
13544
+ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
13545
+ type: 'show-all-downloads';
13546
+ };
13547
+
13466
13548
  /**
13467
13549
  * Generated when a View is shown. This event will fire during creation of a View.
13468
13550
  * @interface
@@ -13655,37 +13737,6 @@ declare class SnapshotSourceModule extends Base {
13655
13737
  wrap(identity: OpenFin_2.ApplicationIdentity): Promise<SnapshotSource>;
13656
13738
  }
13657
13739
 
13658
- /**
13659
- * Utility class for managing Golden Layout splitter drag interactions.
13660
- * @ignore
13661
- */
13662
- declare class SplitterController {
13663
- private readonly viewOverlay;
13664
- constructor(viewOverlay: ViewOverlay);
13665
- private teardown?;
13666
- private tryTeardown;
13667
- /**
13668
- * Disables the pointer events on the splitters, preventing them from being dragged.
13669
- */
13670
- preventSplitterResize: () => void;
13671
- /**
13672
- * Ends a splitter drag move, if one is in progress.
13673
- */
13674
- endMove: () => Promise<void>;
13675
- /**
13676
- * Initialises a splitter drag move, rendering a view on top of the splitter
13677
- * to allow it to render on top of the views within a layout (as they will always
13678
- * have a higher z-index to the platform window itself).
13679
- * @param splitterItem The Golden Layout splitter item that is currently being dragged.
13680
- */
13681
- startMove: (splitterItem: SplitterItem) => Promise<void>;
13682
- }
13683
-
13684
- declare type SplitterItem = GoldenLayout.ContentItem & {
13685
- viewEventsAdded: boolean;
13686
- isVertical: boolean;
13687
- };
13688
-
13689
13740
  /**
13690
13741
  * Generated when an application has started.
13691
13742
  * @interface
@@ -14534,6 +14585,70 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
14534
14585
  * ```
14535
14586
  */
14536
14587
  openUrlWithBrowser(url: string): Promise<void>;
14588
+ /**
14589
+ * Creates a new registry entry under the HKCU root Windows registry key if the given custom protocol name doesn't exist or
14590
+ * overwrites the existing registry entry if the given custom protocol name already exists.
14591
+ *
14592
+ * Note: This method is restricted by default and must be enabled via
14593
+ * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
14594
+ *
14595
+ *
14596
+ * @remarks These protocols are reserved and cannot be registered:
14597
+ * - fin
14598
+ * - fins
14599
+ * - openfin
14600
+ * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
14601
+ *
14602
+ * @throws if a given custom protocol failed to be registered.
14603
+ * @throws if a manifest URL contains the '%1' string.
14604
+ * @throws if a manifest URL contains a query string parameter which name equals to the Protocol Launch Request Parameter Name.
14605
+ * @throws if the full length of the command string that is to be written to the registry exceeds 2048 bytes.
14606
+ *
14607
+ * @example
14608
+ * ```js
14609
+ * fin.System.registerCustomProtocol({protocolName:'protocol1'}).then(console.log).catch(console.error);
14610
+ * ```
14611
+ */
14612
+ registerCustomProtocol(options: OpenFin_2.CustomProtocolOptions): Promise<void>;
14613
+ /**
14614
+ * Removes the registry entry for a given custom protocol.
14615
+ *
14616
+ * Note: This method is restricted by default and must be enabled via
14617
+ * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
14618
+ *
14619
+ *
14620
+ * @remarks These protocols are reserved and cannot be unregistered:
14621
+ * - fin
14622
+ * - fins
14623
+ * - openfin
14624
+ * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
14625
+ *
14626
+ * @throws if a protocol entry failed to be removed in registry.
14627
+ *
14628
+ * @example
14629
+ * ```js
14630
+ * await fin.System.unregisterCustomProtocol('protocol1');
14631
+ * ```
14632
+ */
14633
+ unregisterCustomProtocol(protocolName: string): Promise<void>;
14634
+ /**
14635
+ * Retrieves the registration state for a given custom protocol.
14636
+ *
14637
+ * Note: This method is restricted by default and must be enabled via
14638
+ * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
14639
+ *
14640
+ * @remarks These protocols are reserved and cannot get states for them:
14641
+ * - fin
14642
+ * - fins
14643
+ * - openfin
14644
+ * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
14645
+ *
14646
+ *
14647
+ * @example
14648
+ * ```js
14649
+ * const protocolState = await fin.System.getCustomProtocolState('protocol1');
14650
+ */
14651
+ getCustomProtocolState(protocolName: string): Promise<OpenFin_2.CustomProtocolState>;
14537
14652
  /**
14538
14653
  * Removes the process entry for the passed UUID obtained from a prior call
14539
14654
  * of fin.System.launchExternalProcess().
@@ -15230,6 +15345,18 @@ declare type SystemPermissions = {
15230
15345
  enabled: boolean;
15231
15346
  protocols: string[];
15232
15347
  };
15348
+ registerCustomProtocol: boolean | {
15349
+ enabled: boolean;
15350
+ protocols: string[];
15351
+ };
15352
+ unregisterCustomProtocol: boolean | {
15353
+ enabled: boolean;
15354
+ protocols: string[];
15355
+ };
15356
+ getCustomProtocolState: boolean | {
15357
+ enabled: boolean;
15358
+ protocols: string[];
15359
+ };
15233
15360
  };
15234
15361
 
15235
15362
  /**
@@ -15254,7 +15381,7 @@ declare type SystemShutdownHandler = (shutdownEvent: {
15254
15381
  }) => void;
15255
15382
 
15256
15383
  declare interface Tab {
15257
- _dragListener: EventEmitter_2;
15384
+ _dragListener: TabDragListener;
15258
15385
 
15259
15386
  /**
15260
15387
  * True if this tab is the selected tab
@@ -15299,60 +15426,11 @@ declare interface Tab {
15299
15426
  setActive(isActive: boolean): void;
15300
15427
  }
15301
15428
 
15302
- /**
15303
- * Set of apis used to facilitate tab drag interactions without needing to hide views.
15304
- * @ignore
15305
- */
15306
- declare class TabDragController {
15307
- private readonly viewOverlay;
15308
- constructor(viewOverlay: ViewOverlay);
15309
- private dropZonePreview?;
15310
- /**
15311
- *
15312
- * When a tab is dragged out of a stack, it will need to be hidden from the stack.
15313
- *
15314
- * Additionally, if there is a new view to show in the stack, it will be shown at the position specified by
15315
- * containerBounds
15316
- *
15317
- * As drag interactions can under extreme circumstances complete before this chain of promises has completed,
15318
- * we need to pass in a isDragging() function which returns whether the drag is in progress.
15319
- * This allows us to cancel any layout affecting operations.
15320
- *
15321
- * @param draggingView The view which is currently being dragged
15322
- * @param isLastViewInWindow Whether the draggin view is the last view in a window or not. If false, the dragging view will not hide.
15323
- * @param isDragging A function which returns true if the drag is still in progress. As we chain some async calls here, we want to avoid
15324
- * modifying any views if the drag has completed (as the post drag procedure will have taken care of it.)
15325
- * @param containerBounds The bounds of the container of the view to be shown in the stack
15326
- * @param nextView The view which has become active after dragging the draggingView out.
15327
- */
15328
- handleTabStackActiveView: (draggingView: View_3, isLastViewInWindow: boolean, isDragging: () => boolean, containerBounds?: OpenFin_2.Bounds, nextView?: View_3) => Promise<void>;
15329
- /**
15330
- * Extracts the border and backgroundColor css values from the drop zone preview,
15331
- * and sets the viewOverlay to match them.
15332
- */
15333
- inheritStyles: () => Promise<void>;
15334
- /**
15335
- * Called when a tab drag interaction is started from the current window (not when it enters the window).
15336
- *
15337
- * Sets all views in the platform to ignore mouse events so that they can pass through to the golden-layout
15338
- * document whilst remaining visible.
15339
- */
15340
- startDrag: () => Promise<void>;
15341
- /**
15342
- * Called when a tab drag interaction which was started from the current window ends.
15343
- *
15344
- * Disables the click through setting on every view in the platform.
15345
- */
15346
- endDrag: () => Promise<void>;
15347
- private disposeObserve?;
15348
- disposeOverlayObserver: () => void;
15429
+ declare interface TabDragListener extends EventEmitter_2 {
15349
15430
  /**
15350
- * Observes a golden-layout drop zone preview in order to render a BrowserView
15351
- * overlay whenever a tab is dragged over a droppable region.
15352
- * @param dropZonePreview The drop zone preview element created by Golden Layout in order to highlight
15353
- * droppable regions of the UI.
15431
+ * A reference to the content item this tab relates to
15354
15432
  */
15355
- observeOverlay: (dropZonePreview: HTMLElement) => Promise<void>;
15433
+ contentItem: ContentItem;
15356
15434
  }
15357
15435
 
15358
15436
  /**
@@ -15684,7 +15762,7 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
15684
15762
  connectSync: () => void;
15685
15763
  getPort: () => string;
15686
15764
  shutdown(): Promise<void>;
15687
- connect(config: InternalConnectConfig | RemoteConfig): Promise<string | void>;
15765
+ connect(config: InternalConnectConfig | RemoteConfig | ReceiverConfig): Promise<string | void>;
15688
15766
  private connectRemote;
15689
15767
  connectByPort(config: ExistingConnectConfig): Promise<void>;
15690
15768
  private authorize;
@@ -16494,10 +16572,6 @@ declare class View_2 extends WebContents<OpenFin_2.ViewEvent> {
16494
16572
  bindToElement: (element: HTMLElement) => Promise<() => void>;
16495
16573
  }
16496
16574
 
16497
- declare type View_3 = OpenFin_2.View;
16498
-
16499
- declare type View_4 = OpenFin_2.View;
16500
-
16501
16575
  /**
16502
16576
  * Generated when a View is attached to a window.
16503
16577
  * @interface
@@ -16508,9 +16582,21 @@ declare type ViewAttachedEvent = BaseWindowEvent & {
16508
16582
  viewIdentity: OpenFin_2.Identity;
16509
16583
  };
16510
16584
 
16511
- declare interface ViewComponent extends GoldenLayout.ContentItem {
16512
- componentState: OpenFin_2.ViewState;
16513
- }
16585
+ /**
16586
+ * A rule prescribing content creation in a {@link OpenFin.View}.
16587
+ *
16588
+ * @interface
16589
+ */
16590
+ declare type ViewContentCreationRule = BaseContentCreationRule & {
16591
+ /**
16592
+ * Behavior to use when opening matched content.
16593
+ */
16594
+ behavior: 'view';
16595
+ /**
16596
+ * Options for newly-created view.
16597
+ */
16598
+ options?: Partial<ViewOptions>;
16599
+ };
16514
16600
 
16515
16601
  /**
16516
16602
  * The options object required by {@link View.ViewModule.create View.create}.
@@ -16677,40 +16763,6 @@ declare class ViewModule extends Base {
16677
16763
  */
16678
16764
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16679
16765
 
16680
- /**
16681
- * Api client allowing an empty electron BrowserView to be rendered
16682
- * in the current window with the specified bounds.
16683
- *
16684
- * Please note, only one view based overlay can be rendered at a time per runtime.
16685
- * @ignore
16686
- */
16687
- declare class ViewOverlay {
16688
- private wire;
16689
- constructor(wire: Transport);
16690
- /**
16691
- * Sets the style of the root <html> element of the view overlay webcontent.
16692
- * @param style A partial collection of Css style declarations to set.
16693
- */
16694
- setStyle: (style: Partial<CSSStyleDeclaration>) => Promise<void>;
16695
- /**
16696
- * Renders the overlay at the specified position relative to the calling window.
16697
- * @param options Bounds and background color to display in the overlay.
16698
- */
16699
- renderOverlay: (bounds: OpenFin_2.Bounds) => Promise<void>;
16700
- /**
16701
- * Removes the overlay from the current window.
16702
- */
16703
- detachOverlay: () => Promise<void>;
16704
- /**
16705
- * Allows setting all OpenFin views to ignore or consume mouse events.
16706
- *
16707
- * This can help with the rendering of view overlays that depend on OpenFin views not consuming mouse events.
16708
- *
16709
- * @param enabled If true, all mouse events are ignored by openfin views. If false, all OpenFin views will consume mouse events.
16710
- */
16711
- setIgnoreViewMouseEvents(enabled: boolean): Promise<void>;
16712
- }
16713
-
16714
16766
  /**
16715
16767
  * Represents the payload shape for Views that are trying to prevent an unload.
16716
16768
  * @interface
@@ -17814,6 +17866,8 @@ declare type WebRequestHeader = {
17814
17866
  [key: string]: string;
17815
17867
  };
17816
17868
 
17869
+ declare type WebSocketReadyState = WebSocket['readyState'];
17870
+
17817
17871
  /**
17818
17872
  * Generated when a window is being moved by the user.
17819
17873
  * @remarks For use with monitor scaling that is not 100%. Bounds are given in DIP (adjusted for monitor scale factor).
@@ -18784,7 +18838,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18784
18838
  * ```
18785
18839
  * @experimental
18786
18840
  */
18787
- getLayout(): Promise<OpenFin_2.Layout>;
18841
+ getLayout(layoutIdentity?: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
18788
18842
  /**
18789
18843
  * Gets the current settings of the window.
18790
18844
  *
@@ -19526,6 +19580,22 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19526
19580
  type: 'closing';
19527
19581
  };
19528
19582
 
19583
+ /**
19584
+ * A rule prescribing content creation in a {@link OpenFin.Window}.
19585
+ *
19586
+ * @interface
19587
+ */
19588
+ declare type WindowContentCreationRule = BaseContentCreationRule & {
19589
+ /**
19590
+ * Behavior to use when opening matched content.
19591
+ */
19592
+ behavior: 'window';
19593
+ /**
19594
+ * Options for newly-created window.
19595
+ */
19596
+ options?: Partial<WindowOptions>;
19597
+ };
19598
+
19529
19599
  /**
19530
19600
  * Generated when a child window is created.
19531
19601
  * @interface
@@ -19650,6 +19720,8 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19650
19720
  WillMoveEvent,
19651
19721
  WillResizeEvent,
19652
19722
  NonPropagatedWindowEvent,
19723
+ ShowAllDownloadsEvent,
19724
+ DownloadShelfVisibilityChangedEvent,
19653
19725
  WindowSourcedEvent,
19654
19726
  WillPropagateWindowEvent,
19655
19727
  WindowEvent,
@@ -19869,7 +19941,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19869
19941
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19870
19942
  * from {@link OpenFin.ViewEvents}.
19871
19943
  */
19872
- declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
19944
+ declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
19873
19945
 
19874
19946
  /**
19875
19947
  * Generated when a child window starts loading.
@@ -19901,7 +19973,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19901
19973
  };
19902
19974
 
19903
19975
  declare type Wire = EventEmitter & {
19904
- connect(address: string, WsConstructor: typeof WebSocket): Promise<any>;
19976
+ connect(messageReciever: MessageReceiver): Promise<any>;
19905
19977
  connectSync(): any;
19906
19978
  send(data: any): Promise<any>;
19907
19979
  shutdown(): Promise<void>;