@openfin/node-adapter 34.78.50 → 34.78.51

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.
@@ -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.ClientIdentity | OpenFin.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
  /**
@@ -3538,12 +3584,23 @@ declare type ConstViewOptions = {
3538
3584
  /**
3539
3585
  * **Platforms Only.**
3540
3586
  * Determines what happens when a view is closed in a platform window.
3541
- * Supersedes `detachOnClose`, but has no default value.
3587
+ * Supersedes the deprecated `detachOnClose`.
3588
+ * If not set, detaults to `destroy` if `detachOnClose` is false (default), or `detach` if `detachOnClose` is true.
3589
+ * While this option is not updateable, it may change at runtime if `detachOnClose` is updated.
3542
3590
  * 'hide' hides the view on the platform window that closed it.
3543
- * 'detach' behaves like 'detachOnClose': true.
3544
- * 'destroy' is the default behavior as long as 'detachOnClose' is not set.
3591
+ * 'detach' behaves like 'detachOnClose': true. It attaches the closed view to the platform provider.
3592
+ * 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
3593
+ */
3594
+ closeBehavior: 'hide' | 'detach' | 'destroy';
3595
+ /**
3596
+ * Controls interaction of the view with its parent window's download shelf.
3545
3597
  */
3546
- closeBehavior?: 'hide' | 'detach' | 'destroy';
3598
+ downloadShelf?: {
3599
+ /**
3600
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3601
+ */
3602
+ enabled: boolean;
3603
+ };
3547
3604
  };
3548
3605
 
3549
3606
  /**
@@ -3655,8 +3712,16 @@ declare type ConstWindowOptions = {
3655
3712
  * launches in favor of the cached value.
3656
3713
  */
3657
3714
  defaultWidth: number;
3715
+ downloadShelf: DownloadShelfOptions;
3658
3716
  height: number;
3659
3717
  layout: any;
3718
+ /**
3719
+ * @experimental
3720
+ *
3721
+ * The collection of layouts to load when the window is created. When launching multiple layouts, manage
3722
+ * the lifecycle via fin.Platform.Layout.create()/destroy() methods.
3723
+ */
3724
+ layoutSnapshot: LayoutSnapshot;
3660
3725
  /**
3661
3726
  * Parent identity of a modal window. It will create a modal child window when this option is set.
3662
3727
  */
@@ -3872,28 +3937,15 @@ declare type ContentCreationOptions = {
3872
3937
  * A rule for creating content in OpenFin; maps a content type to the way in which
3873
3938
  * newly-opened content of that type will be handled.
3874
3939
  *
3940
+ * @remarks This is effectively just a union type discriminated by the `behavior` key. The generic
3941
+ * parameter is a legacy feature that is included for backwards-compatibility reasons.
3875
3942
  *
3876
- * @interface
3943
+ * @typeParam Behavior The way content governed by this rule will be created. If provided, this type will narrow to
3944
+ * the specified `behavior` key.
3877
3945
  */
3878
- declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
3879
- /**
3880
- * Behavior to use when opening matched content. The value could be 'view' | 'window' | 'browser' | 'block'.
3881
- */
3882
- behavior: T;
3883
- /**
3884
- * List of [match patterns](https://developer.chrome.com/extensions/match_patterns) that indicate the specified
3885
- * behavior should be used
3886
- */
3887
- match: MatchPattern[];
3888
- /**
3889
- * Options for newly-created view or window (if applicable).
3890
- */
3891
- options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<ViewOptions> : never;
3892
- /**
3893
- * custom property
3894
- */
3895
- data?: unknown;
3896
- };
3946
+ declare type ContentCreationRule<Behavior extends ContentCreationBehaviorNames = ContentCreationBehaviorNames> = Extract<WindowContentCreationRule | ViewContentCreationRule | BrowserContentCreationRule | BlockedContentCreationRule, {
3947
+ behavior: Behavior;
3948
+ }>;
3897
3949
 
3898
3950
  /**
3899
3951
  * @interface
@@ -4402,15 +4454,12 @@ declare type CreatedEvent = BaseViewEvent & {
4402
4454
  };
4403
4455
 
4404
4456
  /**
4405
- * @interface
4457
+ * @interface @experimental
4406
4458
  */
4407
4459
  declare type CreateLayoutOptions = {
4408
- /**
4409
- * @experimental
4410
- *
4411
- * @returns
4412
- */
4413
- layoutManagerOverride: () => any;
4460
+ container: HTMLElement;
4461
+ layoutName: string;
4462
+ layout: LayoutOptions;
4414
4463
  };
4415
4464
 
4416
4465
  /**
@@ -4431,7 +4480,7 @@ declare type CreateViewPayload = {
4431
4480
  /**
4432
4481
  * @interface
4433
4482
  */
4434
- declare type CreateViewTarget = Identity_5 & {
4483
+ declare type CreateViewTarget = LayoutIdentity & {
4435
4484
  /**
4436
4485
  * If specified, view creation will not attach to a window and caller must
4437
4486
  * insert the view into the layout explicitly
@@ -4442,6 +4491,44 @@ declare type CreateViewTarget = Identity_5 & {
4442
4491
  };
4443
4492
  };
4444
4493
 
4494
+ /**
4495
+ * The registry entry for a given protocol exists but can't be parsed.
4496
+ * @interface
4497
+ */
4498
+ declare type CustomProtocolMalformedState = {
4499
+ state: 'Malformed';
4500
+ };
4501
+
4502
+ /**
4503
+ * The registry entry is missing for a given custom protocol.
4504
+ * @interface
4505
+ */
4506
+ declare type CustomProtocolMissingState = {
4507
+ state: 'Missing';
4508
+ };
4509
+
4510
+ /**
4511
+ * Define possible options for Custom protocol.
4512
+ * @interface
4513
+ */
4514
+ declare type CustomProtocolOptions = {
4515
+ protocolName: string;
4516
+ };
4517
+
4518
+ /**
4519
+ * The registry rentry for a given protocol exists and can be parsed successfully.
4520
+ * @interface
4521
+ */
4522
+ declare type CustomProtocolRegisteredState = {
4523
+ state: 'Registered';
4524
+ handlerManifestUrl: string;
4525
+ };
4526
+
4527
+ /**
4528
+ * Define possible registration states for a given custom protocol.
4529
+ */
4530
+ declare type CustomProtocolState = CustomProtocolMissingState | CustomProtocolMalformedState | CustomProtocolRegisteredState;
4531
+
4445
4532
  /**
4446
4533
  * Custom headers for requests sent by the window.
4447
4534
  *
@@ -4459,6 +4546,8 @@ declare type CustomRequestHeaders = {
4459
4546
  headers: WebRequestHeader[];
4460
4547
  };
4461
4548
 
4549
+ declare type DataChannelReadyState = RTCDataChannel['readyState'];
4550
+
4462
4551
  /**
4463
4552
  * @interface
4464
4553
  */
@@ -4531,13 +4620,6 @@ declare type DestroyedEvent = BaseViewEvent & {
4531
4620
  type: 'destroyed';
4532
4621
  };
4533
4622
 
4534
- /**
4535
- * @interface
4536
- */
4537
- declare type DestroyLayoutOptions = {
4538
- layoutName: string;
4539
- };
4540
-
4541
4623
  /**
4542
4624
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4543
4625
  * @interface
@@ -4734,6 +4816,47 @@ declare type DownloadRule = {
4734
4816
  match: string[];
4735
4817
  };
4736
4818
 
4819
+ /**
4820
+ * @interface
4821
+ *
4822
+ * Controls the styling and behavior of the window download shelf.
4823
+ */
4824
+ declare type DownloadShelfOptions = {
4825
+ /**
4826
+ * Whether downloads in this window trigger opening the download shelf.
4827
+ */
4828
+ enabled: boolean;
4829
+ /**
4830
+ * Styling options for the download shelf border.
4831
+ */
4832
+ border?: {
4833
+ /**
4834
+ * Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
4835
+ *
4836
+ * @remarks The top border is fixed to 1 pixel regardless of this setting.
4837
+ */
4838
+ size?: number;
4839
+ /**
4840
+ * Color of the border, either a string name or a hex code. Defaults to chromium theme
4841
+ * if absent.
4842
+ */
4843
+ color?: string;
4844
+ };
4845
+ };
4846
+
4847
+ /**
4848
+ * Generated when the visibility of the window's download shelf changes.
4849
+ *
4850
+ * @interface
4851
+ */
4852
+ declare type DownloadShelfVisibilityChangedEvent = BaseWindowEvent & {
4853
+ type: 'download-shelf-visibility-changed';
4854
+ /**
4855
+ * True if the download shelf was just opened; false if it was just closed.
4856
+ */
4857
+ visible: boolean;
4858
+ };
4859
+
4737
4860
  /**
4738
4861
  * DPI (dots per inch) configuration for printing.
4739
4862
  *
@@ -4938,9 +5061,11 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
4938
5061
  } : never;
4939
5062
 
4940
5063
  declare interface Environment {
4941
- initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, ...args: Parameters<OpenFin.Fin['Platform']['Layout']['init']>): ReturnType<OpenFin.Fin['Platform']['Layout']['init']>;
5064
+ initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5065
+ createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5066
+ destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
4942
5067
  initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
4943
- observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (() => void);
5068
+ observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
4944
5069
  writeToken(path: string, token: string): Promise<string>;
4945
5070
  retrievePort(config: NewConnectConfig): Promise<number>;
4946
5071
  getNextMessageId(): any;
@@ -5219,7 +5344,7 @@ declare namespace ExternalApplicationEvents {
5219
5344
  }
5220
5345
 
5221
5346
  /**
5222
- * Union of possible `type` values for a {@link OpenFin.ApplicationEvents.ApplicationEvent}.
5347
+ * Union of possible `type` values for a {@link ApplicationEvent}.
5223
5348
  */
5224
5349
  declare type ExternalApplicationEventType = ExternalApplicationEvent['type'];
5225
5350
 
@@ -5571,6 +5696,8 @@ declare type FindIntentsByContextOptions<MetadataType = IntentMetadata_3> = {
5571
5696
  metadata?: MetadataType;
5572
5697
  };
5573
5698
 
5699
+ declare type FlexReadyState = WebSocketReadyState | DataChannelReadyState;
5700
+
5574
5701
  /**
5575
5702
  * Generated when a WebContents gains focus.
5576
5703
  * @interface
@@ -5891,6 +6018,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
5891
6018
  * Registers a global hotkey with the operating system.
5892
6019
  * @param hotkey a hotkey string
5893
6020
  * @param listener called when the registered hotkey is pressed by the user.
6021
+ * @throws If the `hotkey` is reserved, see list below.
6022
+ * @throws if the `hotkey` is already registered by another application.
5894
6023
  *
5895
6024
  * @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.
5896
6025
  * 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.
@@ -5963,7 +6092,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
5963
6092
  */
5964
6093
  unregisterAll(): Promise<void>;
5965
6094
  /**
5966
- * Checks if a given hotkey has been registered
6095
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5967
6096
  * @param hotkey a hotkey string
5968
6097
  *
5969
6098
  * @example
@@ -6027,6 +6156,7 @@ declare namespace GoldenLayout {
6027
6156
  DragSource,
6028
6157
  BrowserWindow,
6029
6158
  Header,
6159
+ TabDragListener,
6030
6160
  Tab,
6031
6161
  EventEmitter_2 as EventEmitter
6032
6162
  }
@@ -6141,10 +6271,7 @@ declare class GoldenLayout_2 implements EventEmitter_2 {
6141
6271
  * @param itemConfiguration An item configuration (can be an entire tree of items)
6142
6272
  * @param parent A parent item
6143
6273
  */
6144
- createContentItem(
6145
- itemConfiguration?: ItemConfigType,
6146
- parent?: ContentItem
6147
- ): ContentItem;
6274
+ createContentItem(itemConfiguration?: ItemConfigType, parent?: ContentItem): ContentItem;
6148
6275
 
6149
6276
  /**
6150
6277
  * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
@@ -6177,10 +6304,7 @@ declare class GoldenLayout_2 implements EventEmitter_2 {
6177
6304
  * @return the dragSource that was created. This can be used to remove the
6178
6305
  * dragSource from the layout later.
6179
6306
  */
6180
- createDragSource(
6181
- element: HTMLElement | JQuery,
6182
- itemConfiguration: ItemConfigType
6183
- ): DragSource;
6307
+ createDragSource(element: HTMLElement | JQuery, itemConfiguration: ItemConfigType): DragSource;
6184
6308
 
6185
6309
  /**
6186
6310
  * Removes a dragSource from the layout.
@@ -6556,19 +6680,30 @@ declare type InitializedEvent = IdentityEvent & {
6556
6680
  type: 'initialized';
6557
6681
  };
6558
6682
 
6559
- declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
6560
-
6561
- declare type InitLayoutOptions_2 = OpenFin.InitLayoutOptions;
6562
-
6563
6683
  /**
6564
6684
  * @interface
6565
6685
  */
6566
- declare type InitLayoutOptions_3 = {
6686
+ declare type InitLayoutOptions = {
6567
6687
  /**
6688
+ * @deprecated use container HTMLElement instead
6689
+ *
6568
6690
  * The id attribute of the container where the window's Layout should be initialized. If not provided
6569
6691
  * then an element with id `layout-container` is used. We recommend using a div element.
6570
6692
  */
6571
6693
  containerId?: string;
6694
+ /**
6695
+ * The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
6696
+ */
6697
+ container?: HTMLElement;
6698
+ /**
6699
+ * An override callback used to instantiate a custom LayoutManager. When present, will enable
6700
+ * Multiple Layouts. The callback should return a class.
6701
+ *
6702
+ * @remarks
6703
+ * **NOTE**: Unlike the Platform Provider overrideCallback and interopOverride, this override should
6704
+ * return a class, not an instance
6705
+ */
6706
+ layoutManagerOverride?: LayoutManagerOverride<LayoutSnapshot>;
6572
6707
  };
6573
6708
 
6574
6709
  /**
@@ -8418,8 +8553,8 @@ declare class Layout extends Base {
8418
8553
  /**
8419
8554
  * @internal
8420
8555
  */
8421
- init: (options?: InitLayoutOptions_2) => Promise<Layout>;
8422
- identity: Identity_4;
8556
+ init: (options?: OpenFin.InitLayoutOptions) => Promise<Layout>;
8557
+ identity: OpenFin.LayoutIdentity;
8423
8558
  private platform;
8424
8559
  wire: Transport;
8425
8560
  /**
@@ -8598,133 +8733,30 @@ declare type LayoutComponent = LayoutItemConfig & {
8598
8733
 
8599
8734
  declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
8600
8735
 
8601
- declare class LayoutContentCache {
8602
- private contentItemCache;
8603
- private contentItemCacheId;
8604
- private createCacheKey;
8605
- hasKey: (id: string) => boolean;
8606
- getItemOrUndefined: (id: string) => GoldenLayout.ContentItem | undefined;
8607
- getContentItemOrThrow: (id: string, expectedType?: string[]) => GoldenLayout.ContentItem;
8608
- getOrCreateEntityId: (contentItem: GoldenLayout.ContentItem) => string;
8609
- }
8610
-
8611
8736
  declare type LayoutEntitiesClient = ApiClient<LayoutEntitiesController>;
8612
8737
 
8613
- /**
8614
- * @internal
8615
- * Controller for the layout entities apis, allowing alterations to be applied
8616
- * to an instance of layout manager in a structured manner.
8617
- */
8618
- declare class LayoutEntitiesController {
8619
- private layoutInstance;
8620
- private layoutContentCache;
8621
- private wire;
8622
- constructor(layoutInstance: OpenFinLayout, layoutContentCache: LayoutContentCache);
8623
- private analytics;
8624
- /**
8625
- * @internal
8626
- * @returns the root contentItem of the layout.
8627
- */
8628
- getRoot: () => OpenFin.LayoutEntityDefinition;
8629
- /**
8630
- * @internal
8631
- * Retrieves the containing stack of a given view identity.
8632
- * @param view Identity of the view to retrieve the stack of.
8633
- * @returns Stack containing the given view.
8634
- * @throws If the view does not belong to a stack within the layout manager.
8635
- */
8636
- getStackByView: (view: OpenFin.Identity) => Promise<OpenFin.LayoutEntityDefinition | undefined>;
8637
- /**
8638
- * @internal
8639
- * Returns all views belonging to a given stack
8640
- *
8641
- * NOTE: Due to (TODO: ticket) Golden Layouts has an issue which changes the order of tabs
8642
- * when the amount of new views to add overflows the width of the container. This results
8643
- * in tabs being re-ordered in the UI, while the underlying content item array remains in the
8644
- * original order specified. So calling getStackViews() will return this underlying array order,
8645
- * with indexes that will not match up to the render-order of the tabs.
8646
- *
8647
- * @param id - Entity id of the stack.
8648
- * @returns A list of view identities in order of appearance.
8649
- * @throws if the content item associated with the entity id does not exist or is not a stack.
8650
- */
8738
+ declare type LayoutEntitiesController = {
8739
+ getLayoutIdentityForViewOrThrow: (viewIdentity?: OpenFin.Identity) => Promise<OpenFin.LayoutIdentity>;
8740
+ getRoot: (layoutIdentity?: OpenFin.LayoutIdentity) => Promise<OpenFin.LayoutEntityDefinition>;
8741
+ getStackByView: (viewIdentity: OpenFin.Identity) => Promise<OpenFin.LayoutEntityDefinition | undefined>;
8651
8742
  getStackViews: (id: string) => OpenFin.Identity[];
8652
- /**
8653
- * @internal
8654
- * Retrieves the content of a column or row and adds each to the
8655
- * entity cache to allow them to be addressed externally.
8656
- * @param id Entity id of the Column Or Row to retrieve the content of.
8657
- * @returns Array of layout entity definitions
8658
- * @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.
8659
- */
8660
- getContent(id: string): OpenFin.LayoutEntityDefinition[];
8661
- /**
8662
- * @internal
8663
- * Retrieves the parent content item of the given entity, and adds it to the entity cache
8664
- * so it can be addressed externally.
8665
- * @param id Entity id associated with a layout content item.
8666
- * @returns An entity definition for the given entity's parent, or undefined if the entity is the top level
8667
- * content item or has been removed from the layout entirely.
8668
- */
8669
- getParent(id: string): OpenFin.LayoutEntityDefinition | undefined;
8670
- /**
8671
- * @internal
8672
- * @param id Entity id associated with a layout content item.
8673
- * @returns true if the given entity is the root content item, false otherwise.
8674
- */
8743
+ getContent: (id: string) => OpenFin.LayoutEntityDefinition[];
8744
+ getParent: (id: string) => OpenFin.LayoutEntityDefinition | undefined;
8675
8745
  isRoot: (id: string) => boolean;
8676
- /**
8677
- * @internal
8678
- * Checks whether the given entity exists.
8679
- * @param entityId Id of a content item within the layout
8680
- * @returns True if the content item exists and belongs to the layout.
8681
- */
8682
8746
  exists: (entityId: string) => boolean;
8683
- /**
8684
- * @internal
8685
- * Adds an existing view to the stack, or creates and adds a view to the given stack.
8686
- *
8687
- * NOTE: Due to (TODO: ticket) Golden Layouts has an issue which changes the order of tabs
8688
- * when the amount of new views to add overflows the width of the container. This results
8689
- * in tabs being re-ordered in the UI, while the underlying content item array remains in the
8690
- * original order specified. So calling getStackViews() will return this underlying array order,
8691
- * with indexes that will not match up to the render-order of the tabs.
8692
- *
8693
- * @param stackEntityId Entity id of the stack content item within the layout.
8694
- * @param viewCreationOrReference View identity or creation options
8695
- * @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)
8696
- * @returns Promise resolving with the identity of the newly added view.
8697
- * @throws If the view does not exist, fails to create, or the stack does not exist.
8698
- */
8699
- addViewToStack: (stackEntityId: string, viewCreationOrReference: ViewCreationOrReference, { index }?: OpenFin.AddViewToStackOptions) => Promise<OpenFin.Identity>;
8700
- private findViewInStack;
8701
- /**
8702
- * @internal
8703
- * Removes a view from the given stack. If it's the only view, the stack will be destroyed, unless window creation
8704
- * option closeOnLastViewRemoved is set to false.
8705
- *
8706
- * @param stackEntityId Entity id of a stack content item to remove the view from.
8707
- * @param view Identity of the view to remove.
8708
- * @throws If the stack does not exist or the view does not exist or belong to the stack.
8709
- */
8747
+ addViewToStack: (stackEntityId: string, viewCreationOrReference: ViewCreationOrReference, viewInsertionOptions?: {
8748
+ index?: number;
8749
+ }) => Promise<OpenFin.Identity>;
8710
8750
  removeViewFromStack: (stackEntityId: string, view: OpenFin.Identity) => Promise<void>;
8711
- /**
8712
- * @internal
8713
- * Creates a new adjacent 'stack' and adds the views to it at the specified position
8714
- * @param targetId Entity id of the content item to add a stack adjacent to it
8715
- * @param views List of identities or view creation options of the views to include in the stack
8716
- * @param options Creation options, defaults to { position: 'right' }
8717
- * @returns the Entity Id of the new stack
8718
- */
8719
- createAdjacentStack: (targetId: string, views: ViewCreationOrReference[], { position }?: {
8751
+ createAdjacentStack: (targetId: string, views: ViewCreationOrReference[], stackCreationOptions?: {
8720
8752
  position?: OpenFin.LayoutPosition;
8721
8753
  }) => Promise<string>;
8722
- getAdjacentStacks: ({ targetId, edge }: {
8754
+ getAdjacentStacks: (stackTarget: {
8723
8755
  targetId: string;
8724
8756
  edge: OpenFin.LayoutPosition;
8725
8757
  }) => Promise<Pick<OpenFin.LayoutEntityDefinition, 'entityId'>[]>;
8726
8758
  setStackActiveView: (stackEntityId: string, viewIdentity: OpenFin.Identity) => Promise<void>;
8727
- }
8759
+ };
8728
8760
 
8729
8761
  /**
8730
8762
  * @interface
@@ -8759,11 +8791,14 @@ declare type LayoutInitializedEvent = BaseWindowEvent & {
8759
8791
  };
8760
8792
 
8761
8793
  /**
8762
- * @interface @experimental
8794
+ * @interface @experimental @internal
8795
+ *
8796
+ * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8763
8797
  *
8764
8798
  * Responsible for handling all layout management and renderering
8765
8799
  */
8766
8800
  declare type LayoutInstance = {
8801
+ identity: LayoutIdentity;
8767
8802
  getFrameSnapshot: () => Promise<LayoutOptions>;
8768
8803
  addView: (payload: AddViewOptions) => Promise<View_2>;
8769
8804
  closeView: (viewIdentity: Identity_5) => Promise<void>;
@@ -8772,15 +8807,14 @@ declare type LayoutInstance = {
8772
8807
  getViews: () => LayoutComponent[];
8773
8808
  getCurrentViews: () => Identity_5[];
8774
8809
  startReplaceLayout: (payload: ReplaceLayoutOptions) => Promise<void>;
8775
- applyPreset: (payload: PresetLayoutOptions_3) => void;
8810
+ applyPreset: (payload: PresetLayoutOptions_2) => void;
8776
8811
  isVisible: () => boolean;
8777
- destroy: () => void;
8812
+ destroy: () => Promise<void>;
8778
8813
  };
8779
8814
 
8780
8815
  /**
8781
8816
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8782
- * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
8783
- * {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
8817
+ * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
8784
8818
  *
8785
8819
  * @interface
8786
8820
  */
@@ -8802,25 +8836,43 @@ declare type LayoutItemConfig = {
8802
8836
 
8803
8837
  /**
8804
8838
  * @interface @experimental
8839
+ *
8840
+ * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8841
+ *
8842
+ * Responsible for aggergating all layout snapshots and storing LayoutInstances
8805
8843
  */
8806
- declare interface LayoutManager<T extends LayoutSnapshot = LayoutSnapshot> {
8844
+ declare interface LayoutManager<T extends LayoutSnapshot> {
8807
8845
  /**
8808
8846
  * @experimental
8809
8847
  *
8810
- * Must be overridden when working with multiple layouts
8848
+ * To enable multiple layouts, override this method and do not call super.applyLayoutSnapshot()
8849
+ *
8850
+ * This hook is called by OpenFin during fin.Platform.Layout.init() call, to pass a snapshot to derived
8851
+ * classes which will be used launch a platform window. Use this hook to set your local UI state and
8852
+ * begin rendering the containers for your layouts UI.
8853
+ *
8854
+ * Ensure you call fin.Platform.Layout.create() on every layout in snapshot.layouts when that layout is
8855
+ * ready to be created in your application.
8811
8856
  *
8812
- * Hook called during fin.Platform.Layout.init() call, to inform derived classes
8813
- * when a snapshot is being applied to launch a platform window. Use this hook to set the
8814
- * local state and ensure you call fin.Platform.Layout.create() on every layout in snapshot.layouts
8857
+ * If you add custom data to the app manifest snapshot.windows.layoutSnapshot key, this data will
8858
+ * be included in the snapshot type.
8815
8859
  *
8816
- * When using custom data to the app manifest snapshot.windows.layoutSnapshot key, this data will
8817
- * be included in the snapshot type T and should align with your component state T.
8860
+ * The default implementation throws if it is called with a snapshot containing more than one layout.
8818
8861
  *
8819
- * TODO: detect if layoutManager override was set and this was not overridden somehow to warn?
8820
8862
  * @param snapshot
8821
- * @returns
8863
+ * @throws if Object.keys(snapshot).length > 1
8864
+ */
8865
+ applyLayoutSnapshot(snapshot: T): Promise<void>;
8866
+ /**
8867
+ * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8868
+ * contains a single layout.
8869
+ *
8870
+ * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8871
+ * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8872
+ *
8873
+ * @param snapshot
8874
+ * @throws if Object.keys(snapshot).length > 1
8822
8875
  */
8823
- applyLayoutSnapshot: (snapshot: T) => Promise<void>;
8824
8876
  /**
8825
8877
  * @experimental
8826
8878
  *
@@ -8831,35 +8883,63 @@ declare interface LayoutManager<T extends LayoutSnapshot = LayoutSnapshot> {
8831
8883
  * @param layoutIdentity
8832
8884
  * @returns
8833
8885
  */
8834
- showLayout: ({ layoutName }: LayoutIdentity) => Promise<void>;
8886
+ showLayout({ layoutName }: LayoutIdentity): Promise<void>;
8835
8887
  /**
8836
8888
  * @experimental
8837
8889
  *
8838
8890
  * @returns T
8839
8891
  */
8840
- getLayoutSnapshot: () => Promise<T>;
8892
+ getLayoutSnapshot(): Promise<T>;
8841
8893
  /**
8842
8894
  * @experimental
8843
8895
  *
8844
- * @param param0
8896
+ * @param layoutIdentity
8845
8897
  * @returns
8846
8898
  */
8847
- resolveLayout: ({ layoutName }: LayoutIdentity) => LayoutInstance;
8899
+ resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8848
8900
  /**
8849
8901
  * @experimental
8850
8902
  *
8851
8903
  * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8852
8904
  * Throws if it does not exist.
8853
- * @param layoutIdentity
8905
+ * @param layoutName
8854
8906
  * @returns
8855
8907
  */
8856
- getLayoutByName: (layoutName: string) => LayoutInstance;
8908
+ getLayoutByName(layoutName: string): LayoutInstance;
8857
8909
  /**
8858
8910
  * @experimental
8859
8911
  */
8860
8912
  getLayouts(): Record<string, LayoutInstance>;
8913
+ /**
8914
+ * @experimental
8915
+ */
8916
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8917
+ /**
8918
+ * @experimental
8919
+ */
8920
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8861
8921
  }
8862
8922
 
8923
+ /**
8924
+ * @experimental
8925
+ *
8926
+ * Constructor type for LayoutManager to be used with multiple layouts
8927
+ */
8928
+ declare type LayoutManagerConstructor<T extends LayoutSnapshot> = {
8929
+ new (): LayoutManager<T>;
8930
+ };
8931
+
8932
+ /**
8933
+ * @experimental
8934
+ *
8935
+ * Override callback used to init and configure multiple layouts. Implement by passing
8936
+ * a lambda and returning a class that OpenFin will new up for you.
8937
+ * @remarks
8938
+ * **NOTE**: Unlike the Platform Provider overrideCallback and interopOverride, this override should
8939
+ * return a class, not an instance
8940
+ */
8941
+ declare type LayoutManagerOverride<T extends LayoutSnapshot> = (Base: LayoutManagerConstructor<LayoutSnapshot>) => LayoutManagerConstructor<T>;
8942
+
8863
8943
  /**
8864
8944
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
8865
8945
  */
@@ -8884,7 +8964,7 @@ declare class LayoutModule extends Base {
8884
8964
  * const layoutConfig = await layout.getConfig();
8885
8965
  * ```
8886
8966
  */
8887
- wrap(identity: OpenFin.Identity): Promise<OpenFin.Layout>;
8967
+ wrap(identity: OpenFin.LayoutIdentity): Promise<OpenFin.Layout>;
8888
8968
  /**
8889
8969
  * Synchronously returns a Layout object that represents a Window's layout.
8890
8970
  *
@@ -8904,7 +8984,7 @@ declare class LayoutModule extends Base {
8904
8984
  * const layoutConfig = await layout.getConfig();
8905
8985
  * ```
8906
8986
  */
8907
- wrapSync(identity: OpenFin.Identity): OpenFin.Layout;
8987
+ wrapSync(identity: OpenFin.LayoutIdentity): OpenFin.Layout;
8908
8988
  /**
8909
8989
  * Asynchronously returns a Layout object that represents a Window's layout.
8910
8990
  *
@@ -8968,7 +9048,14 @@ declare class LayoutModule extends Base {
8968
9048
  * const layout = await fin.Platform.Layout.init({ containerId });
8969
9049
  * ```
8970
9050
  */
8971
- init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
9051
+ init: (options?: OpenFin.InitLayoutOptions) => Promise<OpenFin.Layout>;
9052
+ /**
9053
+ * Returns the layout manager for the current window
9054
+ * @returns
9055
+ */
9056
+ getCurrentLayoutManagerSync: <UserSnapshotType extends OpenFin.LayoutSnapshot>() => OpenFin.LayoutManager<UserSnapshotType>;
9057
+ create: (options: OpenFin.CreateLayoutOptions) => Promise<void>;
9058
+ destroy: (layoutIdentity: OpenFin.LayoutIdentity) => Promise<void>;
8972
9059
  }
8973
9060
 
8974
9061
  declare type LayoutModule_2 = OpenFin.Fin['Platform']['Layout'];
@@ -8996,7 +9083,7 @@ declare abstract class LayoutNode {
8996
9083
  /**
8997
9084
  * @ignore
8998
9085
  * @internal
8999
- * Encapsulates Api consumption of {@link LayoutEntitiesController} with a relayed dispatch
9086
+ * Encapsulates Api consumption of {@link LayoutEntitiesClient} with a relayed dispatch
9000
9087
  * @param client
9001
9088
  * @param controllerId
9002
9089
  * @param identity
@@ -9211,8 +9298,7 @@ declare type LayoutOptions = {
9211
9298
  };
9212
9299
  /**
9213
9300
  * Content of the layout. There can only be one top-level LayoutItem in the content array.
9214
- * We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
9215
- * {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
9301
+ * We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
9216
9302
  */
9217
9303
  content?: LayoutContent;
9218
9304
  dimensions?: {
@@ -9508,7 +9594,17 @@ declare interface Message<T> {
9508
9594
 
9509
9595
  declare type MessageHandler = (data: any) => boolean;
9510
9596
 
9511
- declare class MessageReceiver extends Base {
9597
+ declare interface MessageReceiver {
9598
+ addEventListener(e: 'open', listener: (ev: Event) => void): void;
9599
+ addEventListener(e: 'error', listener: (ev: Event) => void): void;
9600
+ addEventListener(e: 'message', listener: (ev: MessageEvent) => void): void;
9601
+ addEventListener(e: 'close', listener: (ev: Event) => void): void;
9602
+ send(data: unknown): void;
9603
+ close(): void;
9604
+ readyState: FlexReadyState;
9605
+ }
9606
+
9607
+ declare class MessageReceiver_2 extends Base {
9512
9608
  private endpointMap;
9513
9609
  private latestEndpointIdByChannelId;
9514
9610
  constructor(wire: Transport);
@@ -9662,7 +9758,7 @@ declare type MutableViewOptions = {
9662
9758
  contentRedirect: ContentRedirect;
9663
9759
  /**
9664
9760
  * @defaultValue false
9665
- *
9761
+ * @deprecated
9666
9762
  * **Platforms Only.** If true, will hide and detach the View from the window for later use instead of closing,
9667
9763
  * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
9668
9764
  */
@@ -10085,6 +10181,11 @@ declare namespace OpenFin {
10085
10181
  Rectangle,
10086
10182
  ApplicationCreationOptions,
10087
10183
  ApplicationOptions,
10184
+ CustomProtocolMissingState,
10185
+ CustomProtocolMalformedState,
10186
+ CustomProtocolRegisteredState,
10187
+ CustomProtocolState,
10188
+ CustomProtocolOptions,
10088
10189
  InteropBrokerOptions,
10089
10190
  ContextGroupInfo,
10090
10191
  DisplayMetadata_3 as DisplayMetadata,
@@ -10148,6 +10249,7 @@ declare namespace OpenFin {
10148
10249
  ReplaceViewPayload,
10149
10250
  ReplaceViewOptions,
10150
10251
  CloseViewPayload,
10252
+ CloseViewOptions,
10151
10253
  FetchManifestPayload,
10152
10254
  ReplaceLayoutOpts,
10153
10255
  ReplaceLayoutPayload,
@@ -10271,6 +10373,11 @@ declare namespace OpenFin {
10271
10373
  IntentHandler_2 as IntentHandler,
10272
10374
  ContentCreationBehaviorNames,
10273
10375
  MatchPattern,
10376
+ BaseContentCreationRule,
10377
+ WindowContentCreationRule,
10378
+ ViewContentCreationRule,
10379
+ BrowserContentCreationRule,
10380
+ BlockedContentCreationRule,
10274
10381
  ContentCreationRule,
10275
10382
  ContentCreationOptions,
10276
10383
  SnapshotProvider,
@@ -10310,13 +10417,13 @@ declare namespace OpenFin {
10310
10417
  LayoutPresetType,
10311
10418
  LayoutIdentity,
10312
10419
  LayoutSnapshot,
10313
- InitLayoutOptions_3 as InitLayoutOptions,
10420
+ InitLayoutOptions,
10421
+ LayoutManagerConstructor,
10422
+ LayoutManagerOverride,
10314
10423
  LayoutInstance,
10315
10424
  LayoutManager,
10316
- AddLayoutInstanceOptions,
10317
10425
  CreateLayoutOptions,
10318
- DestroyLayoutOptions,
10319
- PresetLayoutOptions_3 as PresetLayoutOptions,
10426
+ PresetLayoutOptions_2 as PresetLayoutOptions,
10320
10427
  ResultBehavior,
10321
10428
  PopupBaseBehavior,
10322
10429
  PopupResultBehavior,
@@ -10356,6 +10463,7 @@ declare namespace OpenFin {
10356
10463
  ChannelClientDisconnectionListener,
10357
10464
  ChannelProviderDisconnectionListener,
10358
10465
  RoutingInfo,
10466
+ DownloadShelfOptions,
10359
10467
  ApplicationEvents,
10360
10468
  BaseEvents,
10361
10469
  ExternalApplicationEvents,
@@ -10370,105 +10478,6 @@ declare namespace OpenFin {
10370
10478
  }
10371
10479
  export default OpenFin;
10372
10480
 
10373
- declare class OpenFinLayout implements OpenFin.LayoutInstance {
10374
- #private;
10375
- private readonly splitterController;
10376
- private readonly tabDragController;
10377
- private readonly layoutContentCache;
10378
- private get defaultFaviconUrl();
10379
- private get isDragging();
10380
- private get resizing();
10381
- private get showBackgroundImages();
10382
- private get showFavicons();
10383
- private get showViewsOnSplitterDrag();
10384
- private get showViewsOnTabDrag();
10385
- private get showViewsOnWindowResize();
10386
- private get container();
10387
- get layout(): GoldenLayout.GoldenLayout;
10388
- private get layoutConfigToRestore();
10389
- private client;
10390
- private containerResizeObserver;
10391
- private viewsResizeObserver;
10392
- readonly ofWindow: OpenFin.Window;
10393
- readonly platform: Platform_2;
10394
- private lastItemDestroyed?;
10395
- private viewsSubscribedTo;
10396
- constructor(splitterController: SplitterController, tabDragController: TabDragController, layoutContentCache: LayoutContentCache, container: HTMLElement);
10397
- getViews: () => OpenFin.LayoutComponent[];
10398
- startReplaceLayout: ({ layout }: {
10399
- layout: GoldenLayout.Config;
10400
- }) => Promise<void>;
10401
- applyPreset: (payload: PresetLayoutOptions_2) => void;
10402
- isVisible: () => boolean;
10403
- destroy: () => void;
10404
- /**
10405
- * @internal
10406
- * Needed by init-layout util to wire up {@link LayoutEntitiesController}
10407
- */
10408
- static getClient: (instance: OpenFinLayout) => OpenFin.ChannelClient;
10409
- initManager: () => Promise<void>;
10410
- createLayout: (layout: GoldenLayout.Config, container: HTMLElement) => Promise<void>;
10411
- private setContainer;
10412
- private setupDragDropRegions;
10413
- private replaceLayout;
10414
- private onViewDetached;
10415
- private setupLayoutListeners;
10416
- private onLayoutInit;
10417
- private registerViewComponent;
10418
- private setupWindowListeners;
10419
- private setupResizeObservers;
10420
- /**
10421
- * Shows/hides a view depending on use case (used by browser)
10422
- * @ignore
10423
- */
10424
- private updateViewVisibility;
10425
- private onStackCreated;
10426
- private onTabCreated;
10427
- private onTabMouseUp;
10428
- private replaceCloseTabButton;
10429
- onCloseTabButtonClick: (tab: GoldenLayout.Tab) => Promise<void>;
10430
- addFaviconToTab: (tab: GoldenLayout.Tab, eventIcons: string[]) => void;
10431
- onPopoutClick: (stack: GoldenLayout.ContentItem) => void;
10432
- onStackCloseClick: (stack: GoldenLayout.ContentItem) => void;
10433
- private updateButtonDisplay;
10434
- private onItemCreated;
10435
- private observeSplitters;
10436
- handleOutOfWindowDrop: (e: {
10437
- screenY: number;
10438
- screenX: number;
10439
- }, parentTab: GoldenLayout.Tab, dimensions: {
10440
- width: any;
10441
- height: any;
10442
- }) => Promise<void>;
10443
- private onTabDragStart;
10444
- private setBackgroundImage;
10445
- private setBackgroundImages;
10446
- getFrameSnapshot: () => Promise<GoldenLayout.Config>;
10447
- getCurrentViews: () => OpenFin.Identity[];
10448
- addView: ({ options: viewConfig, targetView, location }: OpenFin.AddViewOptions) => Promise<View_4>;
10449
- replaceView: ({ viewToReplace, newView }: OpenFin.ReplaceViewOptions) => Promise<View_4>;
10450
- removeView: (viewConfig: OpenFin.Identity | OpenFin.ViewState) => Promise<View_4>;
10451
- closeView: (viewIdentity: OpenFin.Identity) => Promise<void>;
10452
- private createChannelConnections;
10453
- getViewComponent: ({ name }: {
10454
- name: string;
10455
- }) => ViewComponent | undefined;
10456
- getViewComponents: () => ViewComponent[];
10457
- private hideHighlight;
10458
- getOfViewFromComponentState: ({ name }: {
10459
- name: string;
10460
- }) => View_4;
10461
- private hideAllViews;
10462
- private showViews;
10463
- private initializeLayoutViews;
10464
- private createResizableView;
10465
- private attachView;
10466
- private createAndAttachView;
10467
- private setupViewEvents;
10468
- private dispatchLayoutEvent;
10469
- private setComponentState;
10470
- }
10471
-
10472
10481
  declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
10473
10482
 
10474
10483
  declare type OverlapsOnlyIfMatching<T, U> = {
@@ -11235,8 +11244,6 @@ declare class Platform extends EmitterBase<OpenFin.PlatformEvent> {
11235
11244
  }): Promise<void>;
11236
11245
  }
11237
11246
 
11238
- declare type Platform_2 = OpenFin.Platform;
11239
-
11240
11247
  /**
11241
11248
  * Generated when a new Platform's API becomes responsive.
11242
11249
  * @interface
@@ -11531,6 +11538,29 @@ declare interface PlatformProvider {
11531
11538
  * ```
11532
11539
  */
11533
11540
  getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
11541
+ /**
11542
+ * @experimental @internal
11543
+ *
11544
+ * **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
11545
+ *
11546
+ * Returns the window options value for `layoutSnapshot` which has already been normalized.
11547
+ * @param payload
11548
+ * @param callerIdentity
11549
+ */
11550
+ getInitialLayoutSnapshot(payload: undefined, callerIdentity: OpenFin.Identity): Promise<OpenFin.LayoutSnapshot | undefined>;
11551
+ /**
11552
+ * @experimental @internal
11553
+ *
11554
+ * **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
11555
+ *
11556
+ * Calls platform.createView for every view in the given layout. Returns an array of promises
11557
+ * one promise for each view create call
11558
+ *
11559
+ * @param layout
11560
+ * @param target
11561
+ * @returns an array of promises
11562
+ */
11563
+ createViewsForLayout(layout: GoldenLayout.Config, target: OpenFin.Identity): Promise<OpenFin.View>[];
11534
11564
  /**
11535
11565
  * **NOTE**: Internal use only. It is not recommended to manage the state of individual views.
11536
11566
  * 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.
@@ -12266,12 +12296,10 @@ declare type PreloadScriptsStateChangingEvent = PreloadScriptsStateChangeEvent &
12266
12296
 
12267
12297
  declare type PresetLayoutOptions = OpenFin.PresetLayoutOptions;
12268
12298
 
12269
- declare type PresetLayoutOptions_2 = OpenFin.PresetLayoutOptions;
12270
-
12271
12299
  /**
12272
12300
  * @interface
12273
12301
  */
12274
- declare type PresetLayoutOptions_3 = {
12302
+ declare type PresetLayoutOptions_2 = {
12275
12303
  /**
12276
12304
  * Which preset layout arrangement to use.
12277
12305
  * The preset options are `columns`, `grid`, `rows`, and `tabs`.
@@ -12495,7 +12523,7 @@ declare type PropagatedEventType<Topic extends string, Type extends string> = `$
12495
12523
 
12496
12524
  /**
12497
12525
  * A view event that has propagated to a parent {@link OpenFin.WindowEvents Window}, {@link OpenFin.ApplicationEvents Application},
12498
- * or {@link Openfin.SystemEvents System}), adding a `viewIdentity` property (since the `Identity` property of the propagated event refers to the `Window`) and prefixing the
12526
+ * or {@link OpenFin.SystemEvents System}), adding a `viewIdentity` property (since the `Identity` property of the propagated event refers to the `Window`) and prefixing the
12499
12527
  * event type key with `'view-'`.
12500
12528
  */
12501
12529
  declare type PropagatedViewEvent<TargetTopic extends string> = PropagatedEvent<'view', TargetTopic, ViewEvent> & {
@@ -12509,7 +12537,7 @@ declare type PropagatedViewEventType = PropagatedViewEvent<string>['type'];
12509
12537
 
12510
12538
  /**
12511
12539
  * A Window event that has propagated to the parent {@link OpenFin.ApplicationEvents Application} and {@link OpenFin.SystemEvents System},
12512
- * prefixing the type string with `'window-'`. Only {@link NativeWindowEvent native window events} will propagate
12540
+ * prefixing the type string with `'window-'`. Only {@link WindowSourcedEvent window-sourced events} will propagate
12513
12541
  * this way; those that have {@link OpenFin.ViewEvents.PropagatedViewEvent propagated} from {@link OpenFin.ViewEvents}
12514
12542
  * will *not* re-propagate.
12515
12543
  *
@@ -12727,6 +12755,13 @@ declare interface ProtocolMap extends ProtocolMapBase {
12727
12755
  anchor: OpenFin.AnchorType;
12728
12756
  }>>;
12729
12757
  'set-window-bounds': IdentityCall<WithPositioningOptions<Partial<OpenFin.Bounds>>>;
12758
+ 'register-custom-protocol': ApiCall<OpenFin.CustomProtocolOptions, void>;
12759
+ 'unregister-custom-protocol': ApiCall<{
12760
+ protocolName: string;
12761
+ }, void>;
12762
+ 'get-custom-protocol-state': ApiCall<{
12763
+ protocolName: string;
12764
+ }, OpenFin.CustomProtocolState>;
12730
12765
  }
12731
12766
 
12732
12767
  declare interface ProtocolMapBase {
@@ -12858,6 +12893,10 @@ declare interface ReactComponentConfig extends ItemConfig {
12858
12893
  */
12859
12894
  declare type ReadImageClipboardRequest = BaseClipboardRequest & ImageFormatOptions;
12860
12895
 
12896
+ declare interface ReceiverConfig extends Omit<RemoteConfig, 'address'> {
12897
+ receiver: MessageReceiver;
12898
+ }
12899
+
12861
12900
  /**
12862
12901
  * A rectangular area on the screen.
12863
12902
  *
@@ -12939,19 +12978,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12939
12978
  /**
12940
12979
  * @interface
12941
12980
  */
12942
- declare type ReplaceLayoutOptions = ReplaceLayoutOpts;
12981
+ declare type ReplaceLayoutOptions = {
12982
+ /**
12983
+ * Layout config to be applied.
12984
+ */
12985
+ layout: LayoutOptions;
12986
+ };
12943
12987
 
12944
12988
  /**
12945
12989
  * @interface
12946
12990
  *
12947
12991
  * @deprecated use ReplaceLayoutOptions instead
12948
12992
  */
12949
- declare type ReplaceLayoutOpts = {
12950
- /**
12951
- * Layout config to be applied.
12952
- */
12953
- layout: LayoutOptions;
12954
- };
12993
+ declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
12955
12994
 
12956
12995
  /**
12957
12996
  * @interface
@@ -12962,9 +13001,9 @@ declare type ReplaceLayoutPayload = {
12962
13001
  */
12963
13002
  opts: ReplaceLayoutOptions;
12964
13003
  /**
12965
- * Identity of the window whose layout will be replace.
13004
+ * Identity of the window whose layout will be replaced.
12966
13005
  */
12967
- target: Identity_5;
13006
+ target: LayoutIdentity;
12968
13007
  };
12969
13008
 
12970
13009
  /**
@@ -12983,7 +13022,7 @@ declare type ReplaceViewPayload = {
12983
13022
  viewToReplace: Identity_5;
12984
13023
  newView: Partial<ViewOptions>;
12985
13024
  };
12986
- target: Identity_5;
13025
+ target: LayoutIdentity;
12987
13026
  };
12988
13027
 
12989
13028
  /**
@@ -13495,6 +13534,49 @@ declare type ShortcutOverride = Hotkey & {
13495
13534
  command: string;
13496
13535
  };
13497
13536
 
13537
+ /**
13538
+ * Generated when the Download Shelf 'Show All' button is clicked.
13539
+ *
13540
+ * @remarks By default, OpenFin does not handle the clicking of the `Show All` button on the download
13541
+ * shelf. Instead, it fires this event, which leaves rendering a download manager to the user. For a simple
13542
+ * implementation, the `chrome://downloads` page can be used (see the example below):
13543
+ *
13544
+ * @example
13545
+ *
13546
+ * ```typescript
13547
+ * const platform = await fin.Platform.getCurrentSync();
13548
+ * // Listen to the propagated event at the Platform level, so that we only need one listener for a click from any window
13549
+ * platform.on('window-show-all-downloads', () => {
13550
+ * // Render the `chrome://downloads` window when a user clicks on the download shelf `Show All` button
13551
+ * platform.createWindow({
13552
+ * name: 'show-download-window',
13553
+ * layout: {
13554
+ * content: [
13555
+ * {
13556
+ * type: 'stack',
13557
+ * content: [
13558
+ * {
13559
+ * type: 'component',
13560
+ * componentName: 'view',
13561
+ * componentState: {
13562
+ * name: 'show-download-view',
13563
+ * url: 'chrome://downloads'
13564
+ * }
13565
+ * }
13566
+ * ]
13567
+ * }
13568
+ * ]
13569
+ * }
13570
+ * });
13571
+ * })
13572
+ * ```
13573
+ *
13574
+ * @interface
13575
+ */
13576
+ declare type ShowAllDownloadsEvent = BaseWindowEvent & {
13577
+ type: 'show-all-downloads';
13578
+ };
13579
+
13498
13580
  /**
13499
13581
  * Generated when a View is shown. This event will fire during creation of a View.
13500
13582
  * @interface
@@ -13687,37 +13769,6 @@ declare class SnapshotSourceModule extends Base {
13687
13769
  wrap(identity: OpenFin.ApplicationIdentity): Promise<SnapshotSource>;
13688
13770
  }
13689
13771
 
13690
- /**
13691
- * Utility class for managing Golden Layout splitter drag interactions.
13692
- * @ignore
13693
- */
13694
- declare class SplitterController {
13695
- private readonly viewOverlay;
13696
- constructor(viewOverlay: ViewOverlay);
13697
- private teardown?;
13698
- private tryTeardown;
13699
- /**
13700
- * Disables the pointer events on the splitters, preventing them from being dragged.
13701
- */
13702
- preventSplitterResize: () => void;
13703
- /**
13704
- * Ends a splitter drag move, if one is in progress.
13705
- */
13706
- endMove: () => Promise<void>;
13707
- /**
13708
- * Initialises a splitter drag move, rendering a view on top of the splitter
13709
- * to allow it to render on top of the views within a layout (as they will always
13710
- * have a higher z-index to the platform window itself).
13711
- * @param splitterItem The Golden Layout splitter item that is currently being dragged.
13712
- */
13713
- startMove: (splitterItem: SplitterItem) => Promise<void>;
13714
- }
13715
-
13716
- declare type SplitterItem = GoldenLayout.ContentItem & {
13717
- viewEventsAdded: boolean;
13718
- isVertical: boolean;
13719
- };
13720
-
13721
13772
  /**
13722
13773
  * Generated when an application has started.
13723
13774
  * @interface
@@ -14566,6 +14617,70 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
14566
14617
  * ```
14567
14618
  */
14568
14619
  openUrlWithBrowser(url: string): Promise<void>;
14620
+ /**
14621
+ * Creates a new registry entry under the HKCU root Windows registry key if the given custom protocol name doesn't exist or
14622
+ * overwrites the existing registry entry if the given custom protocol name already exists.
14623
+ *
14624
+ * Note: This method is restricted by default and must be enabled via
14625
+ * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
14626
+ *
14627
+ *
14628
+ * @remarks These protocols are reserved and cannot be registered:
14629
+ * - fin
14630
+ * - fins
14631
+ * - openfin
14632
+ * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
14633
+ *
14634
+ * @throws if a given custom protocol failed to be registered.
14635
+ * @throws if a manifest URL contains the '%1' string.
14636
+ * @throws if a manifest URL contains a query string parameter which name equals to the Protocol Launch Request Parameter Name.
14637
+ * @throws if the full length of the command string that is to be written to the registry exceeds 2048 bytes.
14638
+ *
14639
+ * @example
14640
+ * ```js
14641
+ * fin.System.registerCustomProtocol({protocolName:'protocol1'}).then(console.log).catch(console.error);
14642
+ * ```
14643
+ */
14644
+ registerCustomProtocol(options: OpenFin.CustomProtocolOptions): Promise<void>;
14645
+ /**
14646
+ * Removes the registry entry for a given custom protocol.
14647
+ *
14648
+ * Note: This method is restricted by default and must be enabled via
14649
+ * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
14650
+ *
14651
+ *
14652
+ * @remarks These protocols are reserved and cannot be unregistered:
14653
+ * - fin
14654
+ * - fins
14655
+ * - openfin
14656
+ * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
14657
+ *
14658
+ * @throws if a protocol entry failed to be removed in registry.
14659
+ *
14660
+ * @example
14661
+ * ```js
14662
+ * await fin.System.unregisterCustomProtocol('protocol1');
14663
+ * ```
14664
+ */
14665
+ unregisterCustomProtocol(protocolName: string): Promise<void>;
14666
+ /**
14667
+ * Retrieves the registration state for a given custom protocol.
14668
+ *
14669
+ * Note: This method is restricted by default and must be enabled via
14670
+ * {@link https://developers.openfin.co/docs/api-security API security settings}. It requires RVM 12 or higher version.
14671
+ *
14672
+ * @remarks These protocols are reserved and cannot get states for them:
14673
+ * - fin
14674
+ * - fins
14675
+ * - openfin
14676
+ * - URI Schemes registered with {@link https://en.wikipedia.org/wiki/List_of_URI_schemes#Official_IANA-registered_schemes IANA}
14677
+ *
14678
+ *
14679
+ * @example
14680
+ * ```js
14681
+ * const protocolState = await fin.System.getCustomProtocolState('protocol1');
14682
+ */
14683
+ getCustomProtocolState(protocolName: string): Promise<OpenFin.CustomProtocolState>;
14569
14684
  /**
14570
14685
  * Removes the process entry for the passed UUID obtained from a prior call
14571
14686
  * of fin.System.launchExternalProcess().
@@ -15262,6 +15377,18 @@ declare type SystemPermissions = {
15262
15377
  enabled: boolean;
15263
15378
  protocols: string[];
15264
15379
  };
15380
+ registerCustomProtocol: boolean | {
15381
+ enabled: boolean;
15382
+ protocols: string[];
15383
+ };
15384
+ unregisterCustomProtocol: boolean | {
15385
+ enabled: boolean;
15386
+ protocols: string[];
15387
+ };
15388
+ getCustomProtocolState: boolean | {
15389
+ enabled: boolean;
15390
+ protocols: string[];
15391
+ };
15265
15392
  };
15266
15393
 
15267
15394
  /**
@@ -15286,7 +15413,7 @@ declare type SystemShutdownHandler = (shutdownEvent: {
15286
15413
  }) => void;
15287
15414
 
15288
15415
  declare interface Tab {
15289
- _dragListener: EventEmitter_2;
15416
+ _dragListener: TabDragListener;
15290
15417
 
15291
15418
  /**
15292
15419
  * True if this tab is the selected tab
@@ -15331,60 +15458,11 @@ declare interface Tab {
15331
15458
  setActive(isActive: boolean): void;
15332
15459
  }
15333
15460
 
15334
- /**
15335
- * Set of apis used to facilitate tab drag interactions without needing to hide views.
15336
- * @ignore
15337
- */
15338
- declare class TabDragController {
15339
- private readonly viewOverlay;
15340
- constructor(viewOverlay: ViewOverlay);
15341
- private dropZonePreview?;
15342
- /**
15343
- *
15344
- * When a tab is dragged out of a stack, it will need to be hidden from the stack.
15345
- *
15346
- * Additionally, if there is a new view to show in the stack, it will be shown at the position specified by
15347
- * containerBounds
15348
- *
15349
- * As drag interactions can under extreme circumstances complete before this chain of promises has completed,
15350
- * we need to pass in a isDragging() function which returns whether the drag is in progress.
15351
- * This allows us to cancel any layout affecting operations.
15352
- *
15353
- * @param draggingView The view which is currently being dragged
15354
- * @param isLastViewInWindow Whether the draggin view is the last view in a window or not. If false, the dragging view will not hide.
15355
- * @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
15356
- * modifying any views if the drag has completed (as the post drag procedure will have taken care of it.)
15357
- * @param containerBounds The bounds of the container of the view to be shown in the stack
15358
- * @param nextView The view which has become active after dragging the draggingView out.
15359
- */
15360
- handleTabStackActiveView: (draggingView: View_3, isLastViewInWindow: boolean, isDragging: () => boolean, containerBounds?: OpenFin.Bounds, nextView?: View_3) => Promise<void>;
15361
- /**
15362
- * Extracts the border and backgroundColor css values from the drop zone preview,
15363
- * and sets the viewOverlay to match them.
15364
- */
15365
- inheritStyles: () => Promise<void>;
15461
+ declare interface TabDragListener extends EventEmitter_2 {
15366
15462
  /**
15367
- * Called when a tab drag interaction is started from the current window (not when it enters the window).
15368
- *
15369
- * Sets all views in the platform to ignore mouse events so that they can pass through to the golden-layout
15370
- * document whilst remaining visible.
15371
- */
15372
- startDrag: () => Promise<void>;
15373
- /**
15374
- * Called when a tab drag interaction which was started from the current window ends.
15375
- *
15376
- * Disables the click through setting on every view in the platform.
15377
- */
15378
- endDrag: () => Promise<void>;
15379
- private disposeObserve?;
15380
- disposeOverlayObserver: () => void;
15381
- /**
15382
- * Observes a golden-layout drop zone preview in order to render a BrowserView
15383
- * overlay whenever a tab is dragged over a droppable region.
15384
- * @param dropZonePreview The drop zone preview element created by Golden Layout in order to highlight
15385
- * droppable regions of the UI.
15463
+ * A reference to the content item this tab relates to
15386
15464
  */
15387
- observeOverlay: (dropZonePreview: HTMLElement) => Promise<void>;
15465
+ contentItem: ContentItem;
15388
15466
  }
15389
15467
 
15390
15468
  /**
@@ -15716,7 +15794,7 @@ declare class Transport<MeType extends EntityType = EntityType> extends EventEmi
15716
15794
  connectSync: () => void;
15717
15795
  getPort: () => string;
15718
15796
  shutdown(): Promise<void>;
15719
- connect(config: InternalConnectConfig | RemoteConfig): Promise<string | void>;
15797
+ connect(config: InternalConnectConfig | RemoteConfig | ReceiverConfig): Promise<string | void>;
15720
15798
  private connectRemote;
15721
15799
  connectByPort(config: ExistingConnectConfig): Promise<void>;
15722
15800
  private authorize;
@@ -16526,10 +16604,6 @@ declare class View_2 extends WebContents<OpenFin.ViewEvent> {
16526
16604
  bindToElement: (element: HTMLElement) => Promise<() => void>;
16527
16605
  }
16528
16606
 
16529
- declare type View_3 = OpenFin.View;
16530
-
16531
- declare type View_4 = OpenFin.View;
16532
-
16533
16607
  /**
16534
16608
  * Generated when a View is attached to a window.
16535
16609
  * @interface
@@ -16540,9 +16614,21 @@ declare type ViewAttachedEvent = BaseWindowEvent & {
16540
16614
  viewIdentity: OpenFin.Identity;
16541
16615
  };
16542
16616
 
16543
- declare interface ViewComponent extends GoldenLayout.ContentItem {
16544
- componentState: OpenFin.ViewState;
16545
- }
16617
+ /**
16618
+ * A rule prescribing content creation in a {@link OpenFin.View}.
16619
+ *
16620
+ * @interface
16621
+ */
16622
+ declare type ViewContentCreationRule = BaseContentCreationRule & {
16623
+ /**
16624
+ * Behavior to use when opening matched content.
16625
+ */
16626
+ behavior: 'view';
16627
+ /**
16628
+ * Options for newly-created view.
16629
+ */
16630
+ options?: Partial<ViewOptions>;
16631
+ };
16546
16632
 
16547
16633
  /**
16548
16634
  * The options object required by {@link View.ViewModule.create View.create}.
@@ -16709,40 +16795,6 @@ declare class ViewModule extends Base {
16709
16795
  */
16710
16796
  declare type ViewOptions = ConstViewOptions & MutableViewOptions;
16711
16797
 
16712
- /**
16713
- * Api client allowing an empty electron BrowserView to be rendered
16714
- * in the current window with the specified bounds.
16715
- *
16716
- * Please note, only one view based overlay can be rendered at a time per runtime.
16717
- * @ignore
16718
- */
16719
- declare class ViewOverlay {
16720
- private wire;
16721
- constructor(wire: Transport);
16722
- /**
16723
- * Sets the style of the root <html> element of the view overlay webcontent.
16724
- * @param style A partial collection of Css style declarations to set.
16725
- */
16726
- setStyle: (style: Partial<CSSStyleDeclaration>) => Promise<void>;
16727
- /**
16728
- * Renders the overlay at the specified position relative to the calling window.
16729
- * @param options Bounds and background color to display in the overlay.
16730
- */
16731
- renderOverlay: (bounds: OpenFin.Bounds) => Promise<void>;
16732
- /**
16733
- * Removes the overlay from the current window.
16734
- */
16735
- detachOverlay: () => Promise<void>;
16736
- /**
16737
- * Allows setting all OpenFin views to ignore or consume mouse events.
16738
- *
16739
- * This can help with the rendering of view overlays that depend on OpenFin views not consuming mouse events.
16740
- *
16741
- * @param enabled If true, all mouse events are ignored by openfin views. If false, all OpenFin views will consume mouse events.
16742
- */
16743
- setIgnoreViewMouseEvents(enabled: boolean): Promise<void>;
16744
- }
16745
-
16746
16798
  /**
16747
16799
  * Represents the payload shape for Views that are trying to prevent an unload.
16748
16800
  * @interface
@@ -17846,6 +17898,8 @@ declare type WebRequestHeader = {
17846
17898
  [key: string]: string;
17847
17899
  };
17848
17900
 
17901
+ declare type WebSocketReadyState = WebSocket['readyState'];
17902
+
17849
17903
  /**
17850
17904
  * Generated when a window is being moved by the user.
17851
17905
  * @remarks For use with monitor scaling that is not 100%. Bounds are given in DIP (adjusted for monitor scale factor).
@@ -18816,7 +18870,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
18816
18870
  * ```
18817
18871
  * @experimental
18818
18872
  */
18819
- getLayout(): Promise<OpenFin.Layout>;
18873
+ getLayout(layoutIdentity?: OpenFin.LayoutIdentity): Promise<OpenFin.Layout>;
18820
18874
  /**
18821
18875
  * Gets the current settings of the window.
18822
18876
  *
@@ -19558,6 +19612,22 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19558
19612
  type: 'closing';
19559
19613
  };
19560
19614
 
19615
+ /**
19616
+ * A rule prescribing content creation in a {@link OpenFin.Window}.
19617
+ *
19618
+ * @interface
19619
+ */
19620
+ declare type WindowContentCreationRule = BaseContentCreationRule & {
19621
+ /**
19622
+ * Behavior to use when opening matched content.
19623
+ */
19624
+ behavior: 'window';
19625
+ /**
19626
+ * Options for newly-created window.
19627
+ */
19628
+ options?: Partial<WindowOptions>;
19629
+ };
19630
+
19561
19631
  /**
19562
19632
  * Generated when a child window is created.
19563
19633
  * @interface
@@ -19682,6 +19752,8 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19682
19752
  WillMoveEvent,
19683
19753
  WillResizeEvent,
19684
19754
  NonPropagatedWindowEvent,
19755
+ ShowAllDownloadsEvent,
19756
+ DownloadShelfVisibilityChangedEvent,
19685
19757
  WindowSourcedEvent,
19686
19758
  WillPropagateWindowEvent,
19687
19759
  WindowEvent,
@@ -19901,7 +19973,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19901
19973
  * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19902
19974
  * from {@link OpenFin.ViewEvents}.
19903
19975
  */
19904
- 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;
19976
+ 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;
19905
19977
 
19906
19978
  /**
19907
19979
  * Generated when a child window starts loading.
@@ -19933,7 +20005,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19933
20005
  };
19934
20006
 
19935
20007
  declare type Wire = EventEmitter & {
19936
- connect(address: string, WsConstructor: typeof WebSocket): Promise<any>;
20008
+ connect(messageReciever: MessageReceiver): Promise<any>;
19937
20009
  connectSync(): any;
19938
20010
  send(data: any): Promise<any>;
19939
20011
  shutdown(): Promise<void>;