@openfin/node-adapter 34.78.20 → 34.78.21

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.
@@ -2,7 +2,6 @@
2
2
  /// <reference types="node" />
3
3
 
4
4
  import { EventEmitter } from 'events';
5
- import type * as GoldenLayout from '@openfin/golden-layout';
6
5
 
7
6
  /**
8
7
  * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
@@ -1841,6 +1840,48 @@ declare type BoundsChangingEvent = BoundsChangeEvent & {
1841
1840
  type: 'bounds-changing';
1842
1841
  };
1843
1842
 
1843
+ declare interface BrowserWindow {
1844
+ /**
1845
+ * True if the window has been opened and its GoldenLayout instance initialised.
1846
+ */
1847
+ isInitialised: boolean;
1848
+
1849
+ /**
1850
+ * Creates a window configuration object from the Popout.
1851
+ */
1852
+ toConfig(): {
1853
+ dimensions: {
1854
+ width: number;
1855
+ height: number;
1856
+ left: number;
1857
+ top: number;
1858
+ };
1859
+ content: Config;
1860
+ parentId: string;
1861
+ indexInParent: number;
1862
+ };
1863
+
1864
+ /**
1865
+ * Returns the GoldenLayout instance from the child window
1866
+ */
1867
+ getGlInstance(): GoldenLayout_2;
1868
+
1869
+ /**
1870
+ * Returns the native Window object
1871
+ */
1872
+ getWindow(): Window;
1873
+
1874
+ /**
1875
+ * Closes the popout
1876
+ */
1877
+ close(): void;
1878
+
1879
+ /**
1880
+ * Returns the popout to its original position as specified in parentId and indexInParent
1881
+ */
1882
+ popIn(): void;
1883
+ }
1884
+
1844
1885
  /**
1845
1886
  * Configuration for page capture.
1846
1887
  *
@@ -3253,6 +3294,31 @@ declare class CombinedStrategy<A, B> implements ChannelStrategy<OnlyIfCompatible
3253
3294
  close(): Promise<void>;
3254
3295
  }
3255
3296
 
3297
+ declare interface ComponentConfig extends ItemConfig {
3298
+ /**
3299
+ * The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
3300
+ */
3301
+ componentName: string;
3302
+
3303
+ /**
3304
+ * A serialisable object. Will be passed to the component constructor function and will be the value returned by
3305
+ * container.getState().
3306
+ */
3307
+ componentState?: any;
3308
+ }
3309
+
3310
+ declare interface Config {
3311
+ settings?: Settings;
3312
+ dimensions?: Dimensions;
3313
+ labels?: Labels;
3314
+ content?: ItemConfigType[];
3315
+ /**
3316
+ * (Only on layout config object)
3317
+ * Id of the currently maximised content item
3318
+ */
3319
+ maximisedItemId?: string;
3320
+ }
3321
+
3256
3322
  declare type ConfigWithRuntime = BaseConfig & {
3257
3323
  runtime: RuntimeConfig;
3258
3324
  };
@@ -3547,6 +3613,103 @@ declare type ConstWindowOptions = {
3547
3613
  viewVisibility?: ViewVisibilityOptions;
3548
3614
  };
3549
3615
 
3616
+ declare interface Container extends EventEmitter_2 {
3617
+ /**
3618
+ * The current width of the container in pixel
3619
+ */
3620
+ width: number;
3621
+
3622
+ /**
3623
+ * The current height of the container in pixel
3624
+ */
3625
+ height: number;
3626
+
3627
+ /**
3628
+ * A reference to the component-item that controls this container
3629
+ */
3630
+ parent: ContentItem;
3631
+
3632
+ /**
3633
+ * A reference to the tab that controls this container. Will initially be null
3634
+ * (and populated once a tab event has been fired).
3635
+ */
3636
+ tab: Tab;
3637
+
3638
+ /**
3639
+ * The current title of the container
3640
+ */
3641
+ title: string;
3642
+
3643
+ /*
3644
+ * A reference to the GoldenLayout instance this container belongs to
3645
+ */
3646
+ layoutManager: GoldenLayout_2;
3647
+
3648
+ /**
3649
+ * True if the item is currently hidden
3650
+ */
3651
+ isHidden: boolean;
3652
+
3653
+ /**
3654
+ * Overwrites the components state with the provided value. To only change parts of the componentState see
3655
+ * extendState below. This is the main mechanism for saving the state of a component. This state will be the
3656
+ * value of componentState when layout.toConfig() is called and will be passed back to the component's
3657
+ * constructor function. It will also be used when the component is opened in a new window.
3658
+ * @param state A serialisable object
3659
+ */
3660
+ setState(state: any): void;
3661
+
3662
+ /**
3663
+ * The same as setState but does not emit 'stateChanged' event
3664
+ * @param {serialisable} state
3665
+ */
3666
+ setStateSkipEvent(state: any): void;
3667
+
3668
+ /**
3669
+ * This is similar to setState, but merges the provided state into the current one, rather than overwriting it.
3670
+ * @param state A serialisable object
3671
+ */
3672
+ extendState(state: any): void;
3673
+
3674
+ /**
3675
+ * Returns the current state.
3676
+ */
3677
+ getState(): any;
3678
+
3679
+ /**
3680
+ * Returns the container's inner element as a jQuery element
3681
+ */
3682
+ getElement(): JQuery;
3683
+
3684
+ /**
3685
+ * hides the container or returns false if hiding it is not possible
3686
+ */
3687
+ hide(): boolean;
3688
+
3689
+ /**
3690
+ * shows the container or returns false if showing it is not possible
3691
+ */
3692
+ show(): boolean;
3693
+
3694
+ /**
3695
+ * Sets the container to the specified size or returns false if that's not possible
3696
+ * @param width the new width in pixel
3697
+ * @param height the new height in pixel
3698
+ */
3699
+ setSize(width: number, height: number): boolean;
3700
+
3701
+ /**
3702
+ * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3703
+ * @param title the new title
3704
+ */
3705
+ setTitle(title: string): void;
3706
+
3707
+ /**
3708
+ * Closes the container or returns false if that is not possible
3709
+ */
3710
+ close(): boolean;
3711
+ }
3712
+
3550
3713
  declare type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
3551
3714
 
3552
3715
  /**
@@ -3617,6 +3780,218 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3617
3780
  disposition: string;
3618
3781
  };
3619
3782
 
3783
+ declare interface ContentItem extends EventEmitter_2 {
3784
+ instance: any;
3785
+ header: any;
3786
+ _splitter: any;
3787
+ /**
3788
+ * This items configuration in its current state
3789
+ */
3790
+ config: ItemConfigType;
3791
+
3792
+ /**
3793
+ * The type of the item. Can be row, column, stack, component or root
3794
+ */
3795
+ type: ItemType;
3796
+
3797
+ /**
3798
+ * An array of items that are children of this item
3799
+ */
3800
+ contentItems: ContentItem[];
3801
+
3802
+ container: Container;
3803
+ /**
3804
+ * The item that is this item's parent (or null if the item is root)
3805
+ */
3806
+ parent: ContentItem;
3807
+
3808
+ /**
3809
+ * A String or array of identifiers if provided in the configuration
3810
+ */
3811
+ id: string;
3812
+
3813
+ /**
3814
+ * True if the item had been initialised
3815
+ */
3816
+ isInitialised: boolean;
3817
+
3818
+ /**
3819
+ * True if the item is maximised
3820
+ */
3821
+ isMaximised: boolean;
3822
+
3823
+ /**
3824
+ * True if the item is the layout's root item
3825
+ */
3826
+ isRoot: boolean;
3827
+
3828
+ /**
3829
+ * True if the item is a row
3830
+ */
3831
+ isRow: boolean;
3832
+
3833
+ /**
3834
+ * True if the item is a column
3835
+ */
3836
+ isColumn: boolean;
3837
+
3838
+ /**
3839
+ * True if the item is a stack
3840
+ */
3841
+ isStack: boolean;
3842
+
3843
+ /**
3844
+ * True if the item is a component
3845
+ */
3846
+ isComponent: boolean;
3847
+
3848
+ /**
3849
+ * A reference to the layoutManager that controls this item
3850
+ */
3851
+ layoutManager: any;
3852
+
3853
+ /**
3854
+ * The item's outer element
3855
+ */
3856
+ element: JQuery;
3857
+
3858
+ /**
3859
+ * The item's inner element. Can be the same as the outer element.
3860
+ */
3861
+ childElementContainer: Container;
3862
+
3863
+ /**
3864
+ * Adds an item as a child to this item. If the item is already a part of a layout it will be removed
3865
+ * from its original position before adding it to this item.
3866
+ * @param itemOrItemConfig A content item (or tree of content items) or an ItemConfiguration to create the item from
3867
+ * @param index last index An optional index that determines at which position the new item should be added. Default: last index.
3868
+ */
3869
+ addChild(itemOrItemConfig: ContentItem | ItemConfigType, index?: number): void;
3870
+
3871
+ /**
3872
+ * Destroys the item and all it's children
3873
+ * @param contentItem The contentItem that should be removed
3874
+ * @param keepChild If true the item won't be destroyed. (Use cautiosly, if the item isn't destroyed it's up to you to destroy it later). Default: false.
3875
+ */
3876
+ removeChild(contentItem: ContentItem, keepChild?: boolean): void;
3877
+
3878
+ /**
3879
+ * The contentItem that should be removed
3880
+ * @param oldChild ContentItem The contentItem that should be removed
3881
+ * @param newChild A content item (or tree of content items) or an ItemConfiguration to create the item from
3882
+ */
3883
+ replaceChild(oldChild: ContentItem, newChild: ContentItem | ItemConfigType): void;
3884
+
3885
+ /**
3886
+ * Updates the items size. To actually assign a new size from within a component, use container.setSize( width, height )
3887
+ */
3888
+ setSize(): void;
3889
+
3890
+ /**
3891
+ * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3892
+ * @param title the new title
3893
+ */
3894
+ setTitle(title: string): void;
3895
+
3896
+ /**
3897
+ * A powerful, yet admittedly confusing method to recursively call methods on items in a tree. Usually you wouldn't need
3898
+ * to use it directly, but it's used internally to setSizes, destroy parts of the item tree etc.
3899
+ * @param functionName The name of the method to invoke
3900
+ * @param functionArguments An array of arguments to pass to every function
3901
+ * @param bottomUp If true, the method is invoked on the lowest parts of the tree first and then bubbles upwards. Default: false
3902
+ * @param skipSelf If true, the method will only be invoked on the item's children, but not on the item itself. Default: false
3903
+ */
3904
+ callDownwards(functionName: string, functionArguments?: any[], bottomUp?: boolean, skipSelf?: boolean): void;
3905
+
3906
+ /**
3907
+ * Emits an event that bubbles up the item tree until it reaches the root element (and after a delay the layout manager). Useful e.g. for indicating state changes.
3908
+ */
3909
+ emitBubblingEvent(name: string): void;
3910
+
3911
+ /**
3912
+ * Convenience method for item.parent.removeChild( item )
3913
+ */
3914
+ remove(): void;
3915
+
3916
+ /**
3917
+ * Removes the item from its current position in the layout and opens it in a window
3918
+ */
3919
+ popout(): BrowserWindow;
3920
+
3921
+ /**
3922
+ * Maximises the item or minimises it if it's already maximised
3923
+ */
3924
+ toggleMaximise(): void;
3925
+
3926
+ /**
3927
+ * Selects the item. Only relevant if settings.selectionEnabled is set to true
3928
+ */
3929
+ select(): void;
3930
+
3931
+ /**
3932
+ * Unselects the item. Only relevant if settings.selectionEnabled is set to true
3933
+ */
3934
+ deselect(): void;
3935
+
3936
+ /**
3937
+ * Returns true if the item has the specified id or false if not
3938
+ * @param id An id to check for
3939
+ */
3940
+ hasId(id: string): boolean;
3941
+
3942
+ /**
3943
+ * Only Stacks have this method! It's the programmatical equivalent of clicking a tab.
3944
+ * @param contentItem The new active content item
3945
+ * @param preventFocus [OpenFin Custom] Indicates to openfin that the view should not be focused when activated.
3946
+ */
3947
+ // (CORE-198)[../docs/golden-layout-changelog.md#CORE-198 stack.setActiveView]
3948
+ setActiveContentItem(contentItem: ContentItem, preventFocus?: boolean): void;
3949
+
3950
+ /**
3951
+ * Only Stacks have this method! Returns the currently selected contentItem.
3952
+ */
3953
+ getActiveContentItem(): ContentItem;
3954
+
3955
+ /**
3956
+ * Adds an id to an item or does nothing if the id is already present
3957
+ * @param id The id to be added
3958
+ */
3959
+ addId(id: string): void;
3960
+
3961
+ /**
3962
+ * Removes an id from an item or throws an error if the id couldn't be found
3963
+ * @param id The id to be removed
3964
+ */
3965
+ removeId(id: string): void;
3966
+
3967
+ /**
3968
+ * Calls filterFunction recursively for every item in the tree. If the function returns true the item is added to the resulting array
3969
+ * @param filterFunction A function that determines whether an item matches certain criteria
3970
+ */
3971
+ getItemsByFilter(filterFunction: (contentItem: ContentItem) => boolean): ContentItem[];
3972
+
3973
+ /**
3974
+ * Returns all items with the specified id.
3975
+ * @param id An id specified in the itemConfig
3976
+ */
3977
+ getItemsById(id: string | string[]): ContentItem[];
3978
+
3979
+ /**
3980
+ * Returns all items with the specified type
3981
+ * @param type 'row', 'column', 'stack', 'component' or 'root'
3982
+ */
3983
+ getItemsByType(type: string): ContentItem[];
3984
+
3985
+ /**
3986
+ * Returns all instances of the component with the specified componentName
3987
+ * @param componentName a componentName as specified in the itemConfig
3988
+ */
3989
+ getComponentsByName(componentName: string): any;
3990
+
3991
+ _contentAreaDimensions: any;
3992
+ _$getArea: () => any;
3993
+ }
3994
+
3620
3995
  /**
3621
3996
  * Restrict navigation to URLs that match an allowed pattern.
3622
3997
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -4000,6 +4375,46 @@ declare type DidFinishLoadEvent = NamedEvent & {
4000
4375
  type: 'did-finish-load';
4001
4376
  };
4002
4377
 
4378
+ declare interface Dimensions {
4379
+ /**
4380
+ * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
4381
+ * than the visible one, making it safe to set this to small values without affecting usability.
4382
+ * Default: 5
4383
+ */
4384
+ borderWidth?: number;
4385
+
4386
+ /**
4387
+ * The minimum height an item can be resized to (in pixel).
4388
+ * Default: 10
4389
+ */
4390
+ minItemHeight?: number;
4391
+
4392
+ /**
4393
+ * The minimum width an item can be resized to (in pixel).
4394
+ * Default: 10
4395
+ */
4396
+ minItemWidth?: number;
4397
+
4398
+ /**
4399
+ * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
4400
+ * adjusted accordingly.
4401
+ * Default: 20
4402
+ */
4403
+ headerHeight?: number;
4404
+
4405
+ /**
4406
+ * The width of the element that appears when an item is dragged (in pixel).
4407
+ * Default: 300
4408
+ */
4409
+ dragProxyWidth?: number;
4410
+
4411
+ /**
4412
+ * The height of the element that appears when an item is dragged (in pixel).
4413
+ * Default: 200
4414
+ */
4415
+ dragProxyHeight?: number;
4416
+ }
4417
+
4003
4418
  /**
4004
4419
  * @interface
4005
4420
  */
@@ -4148,6 +4563,8 @@ declare type Dpi = {
4148
4563
  vertical?: number;
4149
4564
  };
4150
4565
 
4566
+ declare interface DragSource {}
4567
+
4151
4568
  /**
4152
4569
  * Generated when a window has been embedded.
4153
4570
  * @interface
@@ -4375,6 +4792,43 @@ declare class EventAggregator extends EmitterMap {
4375
4792
  dispatchEvent: (message: Message<any>) => boolean;
4376
4793
  }
4377
4794
 
4795
+ declare interface EventEmitter_2 {
4796
+ [x: string]: any;
4797
+ /**
4798
+ * Subscribe to an event
4799
+ * @param eventName The name of the event to describe to
4800
+ * @param callback The function that should be invoked when the event occurs
4801
+ * @param context The value of the this pointer in the callback function
4802
+ */
4803
+ on(eventName: string, callback: Function, context?: any): void;
4804
+
4805
+ /**
4806
+ * Notify listeners of an event and pass arguments along
4807
+ * @param eventName The name of the event to emit
4808
+ */
4809
+ emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
4810
+
4811
+ /**
4812
+ * Alias for emit
4813
+ */
4814
+ trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
4815
+
4816
+ /**
4817
+ * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
4818
+ * eventName and callback or just a specific callback with a specific context if invoked with all three
4819
+ * arguments.
4820
+ * @param eventName The name of the event to unsubscribe from
4821
+ * @param callback The function that should be invoked when the event occurs
4822
+ * @param context The value of the this pointer in the callback function
4823
+ */
4824
+ unbind(eventName: string, callback?: Function, context?: any): void;
4825
+
4826
+ /**
4827
+ * Alias for unbind
4828
+ */
4829
+ off(eventName: string, callback?: Function, context?: any): void;
4830
+ }
4831
+
4378
4832
  /**
4379
4833
  * Handler for an event on an EventEmitter.
4380
4834
  * @remarks Selects the correct type for the event
@@ -5352,6 +5806,244 @@ declare namespace GlobalHotkeyEvents {
5352
5806
  }
5353
5807
  }
5354
5808
 
5809
+ declare namespace GoldenLayout {
5810
+ export {
5811
+ GoldenLayout_2 as GoldenLayout,
5812
+ ItemConfigType,
5813
+ Settings,
5814
+ Dimensions,
5815
+ Labels,
5816
+ ItemType,
5817
+ ItemConfig,
5818
+ ComponentConfig,
5819
+ ReactComponentConfig,
5820
+ Config,
5821
+ ContentItem,
5822
+ Container,
5823
+ DragSource,
5824
+ BrowserWindow,
5825
+ Header,
5826
+ Tab,
5827
+ EventEmitter_2 as EventEmitter
5828
+ }
5829
+ }
5830
+
5831
+ declare class GoldenLayout_2 implements EventEmitter_2 {
5832
+ /**
5833
+ * The topmost item in the layout item tree. In browser terms: Think of the GoldenLayout instance as window
5834
+ * object and of goldenLayout.root as the document.
5835
+ */
5836
+ root: ContentItem;
5837
+
5838
+ /**
5839
+ * A reference to the (jQuery) DOM element containing the layout
5840
+ */
5841
+ container: JQuery;
5842
+
5843
+ /**
5844
+ * True once the layout item tree has been created and the initialised event has been fired
5845
+ */
5846
+ isInitialised: boolean;
5847
+
5848
+ /**
5849
+ * A reference to the current, extended top level config.
5850
+ *
5851
+ * Don't rely on this object for state saving / serialisation. Use layout.toConfig() instead.
5852
+ */
5853
+ config: Config;
5854
+
5855
+ /**
5856
+ * The currently selected item or null if no item is selected. Only relevant if settings.selectionEnabled is set
5857
+ * to true.
5858
+ */
5859
+ selectedItem: ContentItem;
5860
+
5861
+ /**
5862
+ * The current outer width of the layout in pixels.
5863
+ */
5864
+ width: number;
5865
+
5866
+ /**
5867
+ * The current outer height of the layout in pixels.
5868
+ */
5869
+ height: number;
5870
+
5871
+ /**
5872
+ * An array of BrowserWindow instances
5873
+ */
5874
+ openPopouts: BrowserWindow[];
5875
+
5876
+ /**
5877
+ * True if the layout has been opened as a popout by another layout.
5878
+ */
5879
+ isSubWindow: boolean;
5880
+
5881
+ /**
5882
+ * A singleton instance of EventEmitter that works across windows
5883
+ */
5884
+ eventHub: EventEmitter_2;
5885
+
5886
+ _dragProxy: any;
5887
+
5888
+ dropTargetIndicator: any;
5889
+
5890
+ /**
5891
+ * @param config A GoldenLayout configuration object
5892
+ * @param container The DOM element the layout will be initialised in. Default: document.body
5893
+ */
5894
+ constructor(configuration: Config, container?: Element | HTMLElement | JQuery);
5895
+
5896
+ /*
5897
+ * @param name The name of the component, as referred to by componentName in the component configuration.
5898
+ * @param component A constructor or factory function. Will be invoked with new and two arguments, a
5899
+ * containerobject and a component state
5900
+ */
5901
+ registerComponent(name: String, component: any): void;
5902
+
5903
+ /**
5904
+ * Renders the layout into the container. If init() is called before the document is ready it attaches itself as
5905
+ * a listener to the document and executes once it becomes ready.
5906
+ */
5907
+ init(): void;
5908
+
5909
+ /**
5910
+ * Returns the current state of the layout and its components as a serialisable object.
5911
+ */
5912
+ toConfig(): Config;
5913
+
5914
+ /**
5915
+ * Returns a component that was previously registered with layout.registerComponent().
5916
+ * @param name The name of a previously registered component
5917
+ */
5918
+ getComponent(name: string): any;
5919
+
5920
+ /**
5921
+ * Resizes the layout. If no arguments are provided GoldenLayout measures its container and resizes accordingly.
5922
+ * @param width The outer width the layout should be resized to. Default: The container elements width
5923
+ * @param height The outer height the layout should be resized to. Default: The container elements height
5924
+ */
5925
+ updateSize(width?: number, height?: number): void;
5926
+
5927
+ /**
5928
+ * Destroys the layout. Recursively calls destroy on all components and content items, removes all event
5929
+ * listeners and finally removes itself from the DOM.
5930
+ */
5931
+ destroy(): void;
5932
+
5933
+ /**
5934
+ * Creates a new content item or tree of content items from configuration. Usually you wouldn't call this
5935
+ * directly, but instead use methods like layout.createDragSource(), item.addChild() or item.replaceChild() that
5936
+ * all call this method implicitly.
5937
+ * @param itemConfiguration An item configuration (can be an entire tree of items)
5938
+ * @param parent A parent item
5939
+ */
5940
+ createContentItem(
5941
+ itemConfiguration?: ItemConfigType,
5942
+ parent?: ContentItem
5943
+ ): ContentItem;
5944
+
5945
+ /**
5946
+ * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
5947
+ * @param configOrContentItem The content item or config that will be created in the new window. If a item is
5948
+ * provided its config will be read, if config is provided, only the content key
5949
+ * will be used
5950
+ * @param dimensions A map containing the keys left, top, width and height. Left and top can be negative to
5951
+ * place the window in another screen.
5952
+ * @param parentId The id of the item within the current layout the child window's content will be appended to
5953
+ * when popIn is clicked
5954
+ * @param indexInParent The index at which the child window's contents will be appended to. Default: null
5955
+ */
5956
+ createPopout(
5957
+ configOrContentItem: ItemConfigType | ContentItem,
5958
+ dimensions: {
5959
+ width: number;
5960
+ height: number;
5961
+ left: number;
5962
+ top: number;
5963
+ },
5964
+ parentId?: string,
5965
+ indexInParent?: number
5966
+ ): void;
5967
+
5968
+ /**
5969
+ * Turns a DOM element into a dragSource, meaning that the user can drag the element directly onto the layout
5970
+ * where it turns into a contentItem.
5971
+ * @param element The DOM element that will be turned into a dragSource
5972
+ * @param itemConfiguration An item configuration (can be an entire tree of items)
5973
+ * @return the dragSource that was created. This can be used to remove the
5974
+ * dragSource from the layout later.
5975
+ */
5976
+ createDragSource(
5977
+ element: HTMLElement | JQuery,
5978
+ itemConfiguration: ItemConfigType
5979
+ ): DragSource;
5980
+
5981
+ /**
5982
+ * Removes a dragSource from the layout.
5983
+ *
5984
+ * @param dragSource The dragSource to remove
5985
+ */
5986
+ removeDragSource(dragSource: DragSource): void;
5987
+
5988
+ /**
5989
+ * If settings.selectionEnabled is set to true, this allows to select items programmatically.
5990
+ * @param contentItem A ContentItem instance
5991
+ */
5992
+ selectItem(contentItem: ContentItem): void;
5993
+
5994
+ /**
5995
+ * Static method on the GoldenLayout constructor! This method will iterate through a GoldenLayout config object
5996
+ * and replace frequent keys and values with single letter substitutes.
5997
+ * @param config A GoldenLayout configuration object
5998
+ */
5999
+ static minifyConfig(config: any): any;
6000
+
6001
+ /**
6002
+ * Static method on the GoldenLayout constructor! This method will reverse the minifications of minifyConfig.
6003
+ * @param minifiedConfig A minified GoldenLayout configuration object
6004
+ */
6005
+ static unminifyConfig(minifiedConfig: any): any;
6006
+
6007
+ /**
6008
+ * Subscribe to an event
6009
+ * @param eventName The name of the event to describe to
6010
+ * @param callback The function that should be invoked when the event occurs
6011
+ * @param context The value of the this pointer in the callback function
6012
+ */
6013
+ on(eventName: string, callback: Function, context?: any): void;
6014
+
6015
+ /**
6016
+ * Notify listeners of an event and pass arguments along
6017
+ * @param eventName The name of the event to emit
6018
+ */
6019
+ emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6020
+
6021
+ /**
6022
+ * Alias for emit
6023
+ */
6024
+ trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6025
+
6026
+ /**
6027
+ * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
6028
+ * eventName and callback or just a specific callback with a specific context if invoked with all three
6029
+ * arguments.
6030
+ * @param eventName The name of the event to unsubscribe from
6031
+ * @param callback The function that should be invoked when the event occurs
6032
+ * @param context The value of the this pointer in the callback function
6033
+ */
6034
+ unbind(eventName: string, callback?: Function, context?: any): void;
6035
+
6036
+ /**
6037
+ * Alias for unbind
6038
+ */
6039
+ off(eventName: string, callback?: Function, context?: any): void;
6040
+
6041
+ /**
6042
+ * Internal method that create drop areas on the far edges of window, e.g. far-right of window
6043
+ */
6044
+ _$createRootItemAreas(): void;
6045
+ }
6046
+
5355
6047
  /**
5356
6048
  * @interface
5357
6049
  */
@@ -5359,6 +6051,62 @@ declare type GpuInfo = {
5359
6051
  name: string;
5360
6052
  };
5361
6053
 
6054
+ declare interface Header {
6055
+ /**
6056
+ * A reference to the LayoutManager instance
6057
+ */
6058
+ layoutManager: GoldenLayout_2;
6059
+
6060
+ /**
6061
+ * A reference to the Stack this Header belongs to
6062
+ */
6063
+ parent: ContentItem;
6064
+
6065
+ /**
6066
+ * An array of the Tabs within this header
6067
+ */
6068
+ tabs: Tab[];
6069
+
6070
+ /**
6071
+ * The currently selected activeContentItem
6072
+ */
6073
+ activeContentItem: ContentItem;
6074
+
6075
+ /**
6076
+ * The outer (jQuery) DOM element of this Header
6077
+ */
6078
+ element: JQuery;
6079
+
6080
+ /**
6081
+ * The (jQuery) DOM element containing the tabs
6082
+ */
6083
+ tabsContainer: JQuery;
6084
+
6085
+ /**
6086
+ * The (jQuery) DOM element containing the close, maximise and popout button
6087
+ */
6088
+ controlsContainer: JQuery;
6089
+
6090
+ /**
6091
+ * Hides the currently selected contentItem, shows the specified one and highlights its tab.
6092
+ * @param contentItem The content item that will be selected
6093
+ */
6094
+ setActiveContentItem(contentItem: ContentItem): void;
6095
+
6096
+ /**
6097
+ * Creates a new tab and associates it with a content item
6098
+ * @param contentItem The content item the tab will be associated with
6099
+ * @param index A zero based index, specifying the position of the new tab
6100
+ */
6101
+ createTab(contentItem: ContentItem, index?: number): void;
6102
+
6103
+ /**
6104
+ * Finds a tab by its contentItem and removes it
6105
+ * @param contentItem The content item the tab is associated with
6106
+ */
6107
+ removeTab(contentItem: ContentItem): void;
6108
+ }
6109
+
5362
6110
  /**
5363
6111
  * Generated when a View is hidden.
5364
6112
  * @interface
@@ -7107,6 +7855,50 @@ declare class InteropModule extends Base {
7107
7855
  connectSync(name: string, interopConfig?: OpenFin.InteropConfig): InteropClient;
7108
7856
  }
7109
7857
 
7858
+ declare interface ItemConfig {
7859
+ /**
7860
+ * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
7861
+ */
7862
+ type: ItemType;
7863
+
7864
+ /**
7865
+ * An array of configurations for items that will be created as children of this item.
7866
+ */
7867
+ content?: ItemConfigType[];
7868
+
7869
+ /**
7870
+ * The width of this item, relative to the other children of its parent in percent
7871
+ */
7872
+ width?: number;
7873
+
7874
+ /**
7875
+ * The height of this item, relative to the other children of its parent in percent
7876
+ */
7877
+ height?: number;
7878
+
7879
+ /**
7880
+ * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
7881
+ */
7882
+ id?: string | string[];
7883
+
7884
+ /**
7885
+ * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
7886
+ * will return false
7887
+ * Default: true
7888
+ */
7889
+ isClosable?: boolean;
7890
+
7891
+ /**
7892
+ * The title of the item as displayed on its tab and on popout windows
7893
+ * Default: componentName or ''
7894
+ */
7895
+ title?: string;
7896
+ }
7897
+
7898
+ declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
7899
+
7900
+ declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
7901
+
7110
7902
  /**
7111
7903
  * @interface
7112
7904
  */
@@ -7164,6 +7956,32 @@ declare type JumpListTask = {
7164
7956
  iconIndex?: number;
7165
7957
  };
7166
7958
 
7959
+ declare interface Labels {
7960
+ /**
7961
+ * The tooltip text that appears when hovering over the close icon.
7962
+ * Default: 'close'
7963
+ */
7964
+ close?: string;
7965
+
7966
+ /**
7967
+ * The tooltip text that appears when hovering over the maximise icon.
7968
+ * Default: 'maximise'
7969
+ */
7970
+ maximise?: string;
7971
+
7972
+ /**
7973
+ * The tooltip text that appears when hovering over the minimise icon.
7974
+ * Default: 'minimise'
7975
+ */
7976
+ minimise?: string;
7977
+
7978
+ /**
7979
+ * The tooltip text that appears when hovering over the popout icon.
7980
+ * Default: 'open in new window'
7981
+ */
7982
+ popout?: string;
7983
+ }
7984
+
7167
7985
  export declare function launch(config: ConnectConfig): Promise<number>;
7168
7986
 
7169
7987
  /**
@@ -7405,6 +8223,16 @@ declare class Layout extends Base {
7405
8223
  * ```
7406
8224
  */
7407
8225
  getConfig(): Promise<any>;
8226
+ /**
8227
+ * Retrieves the attached views in current window layout.
8228
+ *
8229
+ * @example
8230
+ * ```js
8231
+ * const layout = fin.Platform.Layout.getCurrentSync();
8232
+ * const views = await layout.getCurrentViews();
8233
+ * ```
8234
+ */
8235
+ getCurrentViews(): Promise<OpenFin.View[]>;
7408
8236
  /**
7409
8237
  * Replaces a Platform window's layout with a new layout.
7410
8238
  *
@@ -7793,6 +8621,7 @@ declare class LayoutManager {
7793
8621
  private setBackgroundImage;
7794
8622
  private setBackgroundImages;
7795
8623
  private getFrameSnapshot;
8624
+ private getCurrentViews;
7796
8625
  private addView;
7797
8626
  private replaceView;
7798
8627
  private removeView;
@@ -8976,6 +9805,10 @@ declare type Opacity = TransitionBase & {
8976
9805
  opacity: number;
8977
9806
  };
8978
9807
 
9808
+ declare type OpenExternalPermission = VerboseWebPermission & {
9809
+ protocols: string[];
9810
+ };
9811
+
8979
9812
  declare namespace OpenFin {
8980
9813
  export {
8981
9814
  FinApi,
@@ -9095,6 +9928,8 @@ declare namespace OpenFin {
9095
9928
  LaunchExternalProcessRule,
9096
9929
  SystemPermissions,
9097
9930
  WebPermission,
9931
+ VerboseWebPermission,
9932
+ OpenExternalPermission,
9098
9933
  Permissions_2 as Permissions,
9099
9934
  PlatformWindowCreationOptions,
9100
9935
  PlatformWindowOptions,
@@ -11578,6 +12413,18 @@ declare type QueryPermissionResult = {
11578
12413
  rawValue?: unknown;
11579
12414
  };
11580
12415
 
12416
+ declare interface ReactComponentConfig extends ItemConfig {
12417
+ /**
12418
+ * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
12419
+ */
12420
+ component: string;
12421
+
12422
+ /**
12423
+ * Properties that will be passed to the component and accessible using this.props.
12424
+ */
12425
+ props?: any;
12426
+ }
12427
+
11581
12428
  /**
11582
12429
  * @interface
11583
12430
  */
@@ -12055,6 +12902,97 @@ declare type SessionContextGroup = {
12055
12902
  }>;
12056
12903
  };
12057
12904
 
12905
+ declare interface Settings {
12906
+ preventSplitterResize?: boolean;
12907
+
12908
+ newTabButton?: {
12909
+ url?: string;
12910
+ };
12911
+
12912
+ /**
12913
+ * If true, tabs can't be dragged into the window.
12914
+ * Default: false
12915
+ */
12916
+ preventDragIn?: boolean;
12917
+
12918
+ /**
12919
+ * If true, tabs can't be dragged out of the window.
12920
+ * Default: false
12921
+ */
12922
+ preventDragOut?: boolean;
12923
+
12924
+ /**
12925
+ * If true, stack headers are the only areas where tabs can be dropped.
12926
+ * Default: false
12927
+ */
12928
+ constrainDragToHeaders?: boolean;
12929
+ /**
12930
+ * Turns headers on or off. If false, the layout will be displayed with splitters only.
12931
+ * Default: true
12932
+ */
12933
+ hasHeaders?: boolean;
12934
+
12935
+ /**
12936
+ * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
12937
+ * automatically when layout.createDragSource() is called.
12938
+ * Default: true
12939
+ */
12940
+ constrainDragToContainer?: boolean;
12941
+
12942
+ /**
12943
+ * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
12944
+ * Default: true
12945
+ */
12946
+ reorderEnabled?: boolean;
12947
+
12948
+ /**
12949
+ * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
12950
+ * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
12951
+ * Default: false
12952
+ */
12953
+ selectionEnabled?: boolean;
12954
+
12955
+ /**
12956
+ * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
12957
+ * be transferred to the new window, if false only the active component will be opened.
12958
+ * Default: false
12959
+ */
12960
+ popoutWholeStack?: boolean;
12961
+
12962
+ /**
12963
+ * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
12964
+ * If false, the popout call will fail silently.
12965
+ * Default: true
12966
+ */
12967
+ blockedPopoutsThrowError?: boolean;
12968
+
12969
+ /**
12970
+ * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
12971
+ * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
12972
+ * addition, any changes made to popouts won't be stored after the parent is closed.
12973
+ * Default: true
12974
+ */
12975
+ closePopoutsOnUnload?: boolean;
12976
+
12977
+ /**
12978
+ * Specifies if the popout icon should be displayed in the header-bar.
12979
+ * Default: true
12980
+ */
12981
+ showPopoutIcon?: boolean;
12982
+
12983
+ /**
12984
+ * Specifies if the maximise icon should be displayed in the header-bar.
12985
+ * Default: true
12986
+ */
12987
+ showMaximiseIcon?: boolean;
12988
+
12989
+ /**
12990
+ * Specifies if the close icon should be displayed in the header-bar.
12991
+ * Default: true
12992
+ */
12993
+ showCloseIcon?: boolean;
12994
+ }
12995
+
12058
12996
  /**
12059
12997
  * @interface
12060
12998
  */
@@ -13900,6 +14838,52 @@ declare type SystemShutdownHandler = (shutdownEvent: {
13900
14838
  proceed: () => void;
13901
14839
  }) => void;
13902
14840
 
14841
+ declare interface Tab {
14842
+ _dragListener: EventEmitter_2;
14843
+
14844
+ /**
14845
+ * True if this tab is the selected tab
14846
+ */
14847
+ isActive: boolean;
14848
+
14849
+ /**
14850
+ * A reference to the header this tab is a child of
14851
+ */
14852
+ header: Header;
14853
+
14854
+ /**
14855
+ * A reference to the content item this tab relates to
14856
+ */
14857
+ contentItem: ContentItem;
14858
+
14859
+ /**
14860
+ * The tabs outer (jQuery) DOM element
14861
+ */
14862
+ element: JQuery;
14863
+
14864
+ /**
14865
+ * The (jQuery) DOM element containing the title
14866
+ */
14867
+ titleElement: JQuery;
14868
+
14869
+ /**
14870
+ * The (jQuery) DOM element that closes the tab
14871
+ */
14872
+ closeElement: JQuery;
14873
+
14874
+ /**
14875
+ * Sets the tab's title. Does not affect the contentItem's title!
14876
+ * @param title The new title
14877
+ */
14878
+ setTitle(title: string): void;
14879
+
14880
+ /**
14881
+ * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
14882
+ * @param isActive Whether the tab is active
14883
+ */
14884
+ setActive(isActive: boolean): void;
14885
+ }
14886
+
13903
14887
  /**
13904
14888
  * Set of apis used to facilitate tab drag interactions without needing to hide views.
13905
14889
  * @ignore
@@ -14457,6 +15441,11 @@ declare namespace v2 {
14457
15441
  }
14458
15442
  }
14459
15443
 
15444
+ declare type VerboseWebPermission = {
15445
+ api: string;
15446
+ enabled: boolean;
15447
+ };
15448
+
14460
15449
  declare type View = OpenFin.View;
14461
15450
 
14462
15451
  /**
@@ -16340,7 +17329,7 @@ declare namespace WebContentsEvents {
16340
17329
  * `clipboard-read`: Request access to read from the clipboard.<br>
16341
17330
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
16342
17331
  */
16343
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write';
17332
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
16344
17333
 
16345
17334
  /**
16346
17335
  * Object representing headers and their values, where the