@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.
@@ -1821,6 +1820,48 @@ declare type BoundsChangingEvent = BoundsChangeEvent & {
1821
1820
  type: 'bounds-changing';
1822
1821
  };
1823
1822
 
1823
+ declare interface BrowserWindow {
1824
+ /**
1825
+ * True if the window has been opened and its GoldenLayout instance initialised.
1826
+ */
1827
+ isInitialised: boolean;
1828
+
1829
+ /**
1830
+ * Creates a window configuration object from the Popout.
1831
+ */
1832
+ toConfig(): {
1833
+ dimensions: {
1834
+ width: number;
1835
+ height: number;
1836
+ left: number;
1837
+ top: number;
1838
+ };
1839
+ content: Config;
1840
+ parentId: string;
1841
+ indexInParent: number;
1842
+ };
1843
+
1844
+ /**
1845
+ * Returns the GoldenLayout instance from the child window
1846
+ */
1847
+ getGlInstance(): GoldenLayout_2;
1848
+
1849
+ /**
1850
+ * Returns the native Window object
1851
+ */
1852
+ getWindow(): Window;
1853
+
1854
+ /**
1855
+ * Closes the popout
1856
+ */
1857
+ close(): void;
1858
+
1859
+ /**
1860
+ * Returns the popout to its original position as specified in parentId and indexInParent
1861
+ */
1862
+ popIn(): void;
1863
+ }
1864
+
1824
1865
  /**
1825
1866
  * Configuration for page capture.
1826
1867
  *
@@ -3159,6 +3200,31 @@ declare class CombinedStrategy<A, B> implements ChannelStrategy<OnlyIfCompatible
3159
3200
  close(): Promise<void>;
3160
3201
  }
3161
3202
 
3203
+ declare interface ComponentConfig extends ItemConfig {
3204
+ /**
3205
+ * The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
3206
+ */
3207
+ componentName: string;
3208
+
3209
+ /**
3210
+ * A serialisable object. Will be passed to the component constructor function and will be the value returned by
3211
+ * container.getState().
3212
+ */
3213
+ componentState?: any;
3214
+ }
3215
+
3216
+ declare interface Config {
3217
+ settings?: Settings;
3218
+ dimensions?: Dimensions;
3219
+ labels?: Labels;
3220
+ content?: ItemConfigType[];
3221
+ /**
3222
+ * (Only on layout config object)
3223
+ * Id of the currently maximised content item
3224
+ */
3225
+ maximisedItemId?: string;
3226
+ }
3227
+
3162
3228
  declare type ConfigWithRuntime = BaseConfig & {
3163
3229
  runtime: RuntimeConfig;
3164
3230
  };
@@ -3453,6 +3519,103 @@ declare type ConstWindowOptions = {
3453
3519
  viewVisibility?: ViewVisibilityOptions;
3454
3520
  };
3455
3521
 
3522
+ declare interface Container extends EventEmitter_2 {
3523
+ /**
3524
+ * The current width of the container in pixel
3525
+ */
3526
+ width: number;
3527
+
3528
+ /**
3529
+ * The current height of the container in pixel
3530
+ */
3531
+ height: number;
3532
+
3533
+ /**
3534
+ * A reference to the component-item that controls this container
3535
+ */
3536
+ parent: ContentItem;
3537
+
3538
+ /**
3539
+ * A reference to the tab that controls this container. Will initially be null
3540
+ * (and populated once a tab event has been fired).
3541
+ */
3542
+ tab: Tab;
3543
+
3544
+ /**
3545
+ * The current title of the container
3546
+ */
3547
+ title: string;
3548
+
3549
+ /*
3550
+ * A reference to the GoldenLayout instance this container belongs to
3551
+ */
3552
+ layoutManager: GoldenLayout_2;
3553
+
3554
+ /**
3555
+ * True if the item is currently hidden
3556
+ */
3557
+ isHidden: boolean;
3558
+
3559
+ /**
3560
+ * Overwrites the components state with the provided value. To only change parts of the componentState see
3561
+ * extendState below. This is the main mechanism for saving the state of a component. This state will be the
3562
+ * value of componentState when layout.toConfig() is called and will be passed back to the component's
3563
+ * constructor function. It will also be used when the component is opened in a new window.
3564
+ * @param state A serialisable object
3565
+ */
3566
+ setState(state: any): void;
3567
+
3568
+ /**
3569
+ * The same as setState but does not emit 'stateChanged' event
3570
+ * @param {serialisable} state
3571
+ */
3572
+ setStateSkipEvent(state: any): void;
3573
+
3574
+ /**
3575
+ * This is similar to setState, but merges the provided state into the current one, rather than overwriting it.
3576
+ * @param state A serialisable object
3577
+ */
3578
+ extendState(state: any): void;
3579
+
3580
+ /**
3581
+ * Returns the current state.
3582
+ */
3583
+ getState(): any;
3584
+
3585
+ /**
3586
+ * Returns the container's inner element as a jQuery element
3587
+ */
3588
+ getElement(): JQuery;
3589
+
3590
+ /**
3591
+ * hides the container or returns false if hiding it is not possible
3592
+ */
3593
+ hide(): boolean;
3594
+
3595
+ /**
3596
+ * shows the container or returns false if showing it is not possible
3597
+ */
3598
+ show(): boolean;
3599
+
3600
+ /**
3601
+ * Sets the container to the specified size or returns false if that's not possible
3602
+ * @param width the new width in pixel
3603
+ * @param height the new height in pixel
3604
+ */
3605
+ setSize(width: number, height: number): boolean;
3606
+
3607
+ /**
3608
+ * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3609
+ * @param title the new title
3610
+ */
3611
+ setTitle(title: string): void;
3612
+
3613
+ /**
3614
+ * Closes the container or returns false if that is not possible
3615
+ */
3616
+ close(): boolean;
3617
+ }
3618
+
3456
3619
  declare type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
3457
3620
 
3458
3621
  /**
@@ -3523,6 +3686,218 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3523
3686
  disposition: string;
3524
3687
  };
3525
3688
 
3689
+ declare interface ContentItem extends EventEmitter_2 {
3690
+ instance: any;
3691
+ header: any;
3692
+ _splitter: any;
3693
+ /**
3694
+ * This items configuration in its current state
3695
+ */
3696
+ config: ItemConfigType;
3697
+
3698
+ /**
3699
+ * The type of the item. Can be row, column, stack, component or root
3700
+ */
3701
+ type: ItemType;
3702
+
3703
+ /**
3704
+ * An array of items that are children of this item
3705
+ */
3706
+ contentItems: ContentItem[];
3707
+
3708
+ container: Container;
3709
+ /**
3710
+ * The item that is this item's parent (or null if the item is root)
3711
+ */
3712
+ parent: ContentItem;
3713
+
3714
+ /**
3715
+ * A String or array of identifiers if provided in the configuration
3716
+ */
3717
+ id: string;
3718
+
3719
+ /**
3720
+ * True if the item had been initialised
3721
+ */
3722
+ isInitialised: boolean;
3723
+
3724
+ /**
3725
+ * True if the item is maximised
3726
+ */
3727
+ isMaximised: boolean;
3728
+
3729
+ /**
3730
+ * True if the item is the layout's root item
3731
+ */
3732
+ isRoot: boolean;
3733
+
3734
+ /**
3735
+ * True if the item is a row
3736
+ */
3737
+ isRow: boolean;
3738
+
3739
+ /**
3740
+ * True if the item is a column
3741
+ */
3742
+ isColumn: boolean;
3743
+
3744
+ /**
3745
+ * True if the item is a stack
3746
+ */
3747
+ isStack: boolean;
3748
+
3749
+ /**
3750
+ * True if the item is a component
3751
+ */
3752
+ isComponent: boolean;
3753
+
3754
+ /**
3755
+ * A reference to the layoutManager that controls this item
3756
+ */
3757
+ layoutManager: any;
3758
+
3759
+ /**
3760
+ * The item's outer element
3761
+ */
3762
+ element: JQuery;
3763
+
3764
+ /**
3765
+ * The item's inner element. Can be the same as the outer element.
3766
+ */
3767
+ childElementContainer: Container;
3768
+
3769
+ /**
3770
+ * Adds an item as a child to this item. If the item is already a part of a layout it will be removed
3771
+ * from its original position before adding it to this item.
3772
+ * @param itemOrItemConfig A content item (or tree of content items) or an ItemConfiguration to create the item from
3773
+ * @param index last index An optional index that determines at which position the new item should be added. Default: last index.
3774
+ */
3775
+ addChild(itemOrItemConfig: ContentItem | ItemConfigType, index?: number): void;
3776
+
3777
+ /**
3778
+ * Destroys the item and all it's children
3779
+ * @param contentItem The contentItem that should be removed
3780
+ * @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.
3781
+ */
3782
+ removeChild(contentItem: ContentItem, keepChild?: boolean): void;
3783
+
3784
+ /**
3785
+ * The contentItem that should be removed
3786
+ * @param oldChild ContentItem The contentItem that should be removed
3787
+ * @param newChild A content item (or tree of content items) or an ItemConfiguration to create the item from
3788
+ */
3789
+ replaceChild(oldChild: ContentItem, newChild: ContentItem | ItemConfigType): void;
3790
+
3791
+ /**
3792
+ * Updates the items size. To actually assign a new size from within a component, use container.setSize( width, height )
3793
+ */
3794
+ setSize(): void;
3795
+
3796
+ /**
3797
+ * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3798
+ * @param title the new title
3799
+ */
3800
+ setTitle(title: string): void;
3801
+
3802
+ /**
3803
+ * A powerful, yet admittedly confusing method to recursively call methods on items in a tree. Usually you wouldn't need
3804
+ * to use it directly, but it's used internally to setSizes, destroy parts of the item tree etc.
3805
+ * @param functionName The name of the method to invoke
3806
+ * @param functionArguments An array of arguments to pass to every function
3807
+ * @param bottomUp If true, the method is invoked on the lowest parts of the tree first and then bubbles upwards. Default: false
3808
+ * @param skipSelf If true, the method will only be invoked on the item's children, but not on the item itself. Default: false
3809
+ */
3810
+ callDownwards(functionName: string, functionArguments?: any[], bottomUp?: boolean, skipSelf?: boolean): void;
3811
+
3812
+ /**
3813
+ * 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.
3814
+ */
3815
+ emitBubblingEvent(name: string): void;
3816
+
3817
+ /**
3818
+ * Convenience method for item.parent.removeChild( item )
3819
+ */
3820
+ remove(): void;
3821
+
3822
+ /**
3823
+ * Removes the item from its current position in the layout and opens it in a window
3824
+ */
3825
+ popout(): BrowserWindow;
3826
+
3827
+ /**
3828
+ * Maximises the item or minimises it if it's already maximised
3829
+ */
3830
+ toggleMaximise(): void;
3831
+
3832
+ /**
3833
+ * Selects the item. Only relevant if settings.selectionEnabled is set to true
3834
+ */
3835
+ select(): void;
3836
+
3837
+ /**
3838
+ * Unselects the item. Only relevant if settings.selectionEnabled is set to true
3839
+ */
3840
+ deselect(): void;
3841
+
3842
+ /**
3843
+ * Returns true if the item has the specified id or false if not
3844
+ * @param id An id to check for
3845
+ */
3846
+ hasId(id: string): boolean;
3847
+
3848
+ /**
3849
+ * Only Stacks have this method! It's the programmatical equivalent of clicking a tab.
3850
+ * @param contentItem The new active content item
3851
+ * @param preventFocus [OpenFin Custom] Indicates to openfin that the view should not be focused when activated.
3852
+ */
3853
+ // (CORE-198)[../docs/golden-layout-changelog.md#CORE-198 stack.setActiveView]
3854
+ setActiveContentItem(contentItem: ContentItem, preventFocus?: boolean): void;
3855
+
3856
+ /**
3857
+ * Only Stacks have this method! Returns the currently selected contentItem.
3858
+ */
3859
+ getActiveContentItem(): ContentItem;
3860
+
3861
+ /**
3862
+ * Adds an id to an item or does nothing if the id is already present
3863
+ * @param id The id to be added
3864
+ */
3865
+ addId(id: string): void;
3866
+
3867
+ /**
3868
+ * Removes an id from an item or throws an error if the id couldn't be found
3869
+ * @param id The id to be removed
3870
+ */
3871
+ removeId(id: string): void;
3872
+
3873
+ /**
3874
+ * Calls filterFunction recursively for every item in the tree. If the function returns true the item is added to the resulting array
3875
+ * @param filterFunction A function that determines whether an item matches certain criteria
3876
+ */
3877
+ getItemsByFilter(filterFunction: (contentItem: ContentItem) => boolean): ContentItem[];
3878
+
3879
+ /**
3880
+ * Returns all items with the specified id.
3881
+ * @param id An id specified in the itemConfig
3882
+ */
3883
+ getItemsById(id: string | string[]): ContentItem[];
3884
+
3885
+ /**
3886
+ * Returns all items with the specified type
3887
+ * @param type 'row', 'column', 'stack', 'component' or 'root'
3888
+ */
3889
+ getItemsByType(type: string): ContentItem[];
3890
+
3891
+ /**
3892
+ * Returns all instances of the component with the specified componentName
3893
+ * @param componentName a componentName as specified in the itemConfig
3894
+ */
3895
+ getComponentsByName(componentName: string): any;
3896
+
3897
+ _contentAreaDimensions: any;
3898
+ _$getArea: () => any;
3899
+ }
3900
+
3526
3901
  /**
3527
3902
  * Restrict navigation to URLs that match an allowed pattern.
3528
3903
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -3906,6 +4281,46 @@ declare type DidFinishLoadEvent = NamedEvent & {
3906
4281
  type: 'did-finish-load';
3907
4282
  };
3908
4283
 
4284
+ declare interface Dimensions {
4285
+ /**
4286
+ * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
4287
+ * than the visible one, making it safe to set this to small values without affecting usability.
4288
+ * Default: 5
4289
+ */
4290
+ borderWidth?: number;
4291
+
4292
+ /**
4293
+ * The minimum height an item can be resized to (in pixel).
4294
+ * Default: 10
4295
+ */
4296
+ minItemHeight?: number;
4297
+
4298
+ /**
4299
+ * The minimum width an item can be resized to (in pixel).
4300
+ * Default: 10
4301
+ */
4302
+ minItemWidth?: number;
4303
+
4304
+ /**
4305
+ * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
4306
+ * adjusted accordingly.
4307
+ * Default: 20
4308
+ */
4309
+ headerHeight?: number;
4310
+
4311
+ /**
4312
+ * The width of the element that appears when an item is dragged (in pixel).
4313
+ * Default: 300
4314
+ */
4315
+ dragProxyWidth?: number;
4316
+
4317
+ /**
4318
+ * The height of the element that appears when an item is dragged (in pixel).
4319
+ * Default: 200
4320
+ */
4321
+ dragProxyHeight?: number;
4322
+ }
4323
+
3909
4324
  /**
3910
4325
  * @interface
3911
4326
  */
@@ -4054,6 +4469,8 @@ declare type Dpi = {
4054
4469
  vertical?: number;
4055
4470
  };
4056
4471
 
4472
+ declare interface DragSource {}
4473
+
4057
4474
  /**
4058
4475
  * Generated when a window has been embedded.
4059
4476
  * @interface
@@ -4276,6 +4693,43 @@ declare class EventAggregator extends EmitterMap {
4276
4693
  dispatchEvent: (message: Message<any>) => boolean;
4277
4694
  }
4278
4695
 
4696
+ declare interface EventEmitter_2 {
4697
+ [x: string]: any;
4698
+ /**
4699
+ * Subscribe to an event
4700
+ * @param eventName The name of the event to describe to
4701
+ * @param callback The function that should be invoked when the event occurs
4702
+ * @param context The value of the this pointer in the callback function
4703
+ */
4704
+ on(eventName: string, callback: Function, context?: any): void;
4705
+
4706
+ /**
4707
+ * Notify listeners of an event and pass arguments along
4708
+ * @param eventName The name of the event to emit
4709
+ */
4710
+ emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
4711
+
4712
+ /**
4713
+ * Alias for emit
4714
+ */
4715
+ trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
4716
+
4717
+ /**
4718
+ * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
4719
+ * eventName and callback or just a specific callback with a specific context if invoked with all three
4720
+ * arguments.
4721
+ * @param eventName The name of the event to unsubscribe from
4722
+ * @param callback The function that should be invoked when the event occurs
4723
+ * @param context The value of the this pointer in the callback function
4724
+ */
4725
+ unbind(eventName: string, callback?: Function, context?: any): void;
4726
+
4727
+ /**
4728
+ * Alias for unbind
4729
+ */
4730
+ off(eventName: string, callback?: Function, context?: any): void;
4731
+ }
4732
+
4279
4733
  /**
4280
4734
  * Handler for an event on an EventEmitter.
4281
4735
  * @remarks Selects the correct type for the event
@@ -5206,6 +5660,244 @@ declare namespace GlobalHotkeyEvents {
5206
5660
  }
5207
5661
  }
5208
5662
 
5663
+ declare namespace GoldenLayout {
5664
+ export {
5665
+ GoldenLayout_2 as GoldenLayout,
5666
+ ItemConfigType,
5667
+ Settings,
5668
+ Dimensions,
5669
+ Labels,
5670
+ ItemType,
5671
+ ItemConfig,
5672
+ ComponentConfig,
5673
+ ReactComponentConfig,
5674
+ Config,
5675
+ ContentItem,
5676
+ Container,
5677
+ DragSource,
5678
+ BrowserWindow,
5679
+ Header,
5680
+ Tab,
5681
+ EventEmitter_2 as EventEmitter
5682
+ }
5683
+ }
5684
+
5685
+ declare class GoldenLayout_2 implements EventEmitter_2 {
5686
+ /**
5687
+ * The topmost item in the layout item tree. In browser terms: Think of the GoldenLayout instance as window
5688
+ * object and of goldenLayout.root as the document.
5689
+ */
5690
+ root: ContentItem;
5691
+
5692
+ /**
5693
+ * A reference to the (jQuery) DOM element containing the layout
5694
+ */
5695
+ container: JQuery;
5696
+
5697
+ /**
5698
+ * True once the layout item tree has been created and the initialised event has been fired
5699
+ */
5700
+ isInitialised: boolean;
5701
+
5702
+ /**
5703
+ * A reference to the current, extended top level config.
5704
+ *
5705
+ * Don't rely on this object for state saving / serialisation. Use layout.toConfig() instead.
5706
+ */
5707
+ config: Config;
5708
+
5709
+ /**
5710
+ * The currently selected item or null if no item is selected. Only relevant if settings.selectionEnabled is set
5711
+ * to true.
5712
+ */
5713
+ selectedItem: ContentItem;
5714
+
5715
+ /**
5716
+ * The current outer width of the layout in pixels.
5717
+ */
5718
+ width: number;
5719
+
5720
+ /**
5721
+ * The current outer height of the layout in pixels.
5722
+ */
5723
+ height: number;
5724
+
5725
+ /**
5726
+ * An array of BrowserWindow instances
5727
+ */
5728
+ openPopouts: BrowserWindow[];
5729
+
5730
+ /**
5731
+ * True if the layout has been opened as a popout by another layout.
5732
+ */
5733
+ isSubWindow: boolean;
5734
+
5735
+ /**
5736
+ * A singleton instance of EventEmitter that works across windows
5737
+ */
5738
+ eventHub: EventEmitter_2;
5739
+
5740
+ _dragProxy: any;
5741
+
5742
+ dropTargetIndicator: any;
5743
+
5744
+ /**
5745
+ * @param config A GoldenLayout configuration object
5746
+ * @param container The DOM element the layout will be initialised in. Default: document.body
5747
+ */
5748
+ constructor(configuration: Config, container?: Element | HTMLElement | JQuery);
5749
+
5750
+ /*
5751
+ * @param name The name of the component, as referred to by componentName in the component configuration.
5752
+ * @param component A constructor or factory function. Will be invoked with new and two arguments, a
5753
+ * containerobject and a component state
5754
+ */
5755
+ registerComponent(name: String, component: any): void;
5756
+
5757
+ /**
5758
+ * Renders the layout into the container. If init() is called before the document is ready it attaches itself as
5759
+ * a listener to the document and executes once it becomes ready.
5760
+ */
5761
+ init(): void;
5762
+
5763
+ /**
5764
+ * Returns the current state of the layout and its components as a serialisable object.
5765
+ */
5766
+ toConfig(): Config;
5767
+
5768
+ /**
5769
+ * Returns a component that was previously registered with layout.registerComponent().
5770
+ * @param name The name of a previously registered component
5771
+ */
5772
+ getComponent(name: string): any;
5773
+
5774
+ /**
5775
+ * Resizes the layout. If no arguments are provided GoldenLayout measures its container and resizes accordingly.
5776
+ * @param width The outer width the layout should be resized to. Default: The container elements width
5777
+ * @param height The outer height the layout should be resized to. Default: The container elements height
5778
+ */
5779
+ updateSize(width?: number, height?: number): void;
5780
+
5781
+ /**
5782
+ * Destroys the layout. Recursively calls destroy on all components and content items, removes all event
5783
+ * listeners and finally removes itself from the DOM.
5784
+ */
5785
+ destroy(): void;
5786
+
5787
+ /**
5788
+ * Creates a new content item or tree of content items from configuration. Usually you wouldn't call this
5789
+ * directly, but instead use methods like layout.createDragSource(), item.addChild() or item.replaceChild() that
5790
+ * all call this method implicitly.
5791
+ * @param itemConfiguration An item configuration (can be an entire tree of items)
5792
+ * @param parent A parent item
5793
+ */
5794
+ createContentItem(
5795
+ itemConfiguration?: ItemConfigType,
5796
+ parent?: ContentItem
5797
+ ): ContentItem;
5798
+
5799
+ /**
5800
+ * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
5801
+ * @param configOrContentItem The content item or config that will be created in the new window. If a item is
5802
+ * provided its config will be read, if config is provided, only the content key
5803
+ * will be used
5804
+ * @param dimensions A map containing the keys left, top, width and height. Left and top can be negative to
5805
+ * place the window in another screen.
5806
+ * @param parentId The id of the item within the current layout the child window's content will be appended to
5807
+ * when popIn is clicked
5808
+ * @param indexInParent The index at which the child window's contents will be appended to. Default: null
5809
+ */
5810
+ createPopout(
5811
+ configOrContentItem: ItemConfigType | ContentItem,
5812
+ dimensions: {
5813
+ width: number;
5814
+ height: number;
5815
+ left: number;
5816
+ top: number;
5817
+ },
5818
+ parentId?: string,
5819
+ indexInParent?: number
5820
+ ): void;
5821
+
5822
+ /**
5823
+ * Turns a DOM element into a dragSource, meaning that the user can drag the element directly onto the layout
5824
+ * where it turns into a contentItem.
5825
+ * @param element The DOM element that will be turned into a dragSource
5826
+ * @param itemConfiguration An item configuration (can be an entire tree of items)
5827
+ * @return the dragSource that was created. This can be used to remove the
5828
+ * dragSource from the layout later.
5829
+ */
5830
+ createDragSource(
5831
+ element: HTMLElement | JQuery,
5832
+ itemConfiguration: ItemConfigType
5833
+ ): DragSource;
5834
+
5835
+ /**
5836
+ * Removes a dragSource from the layout.
5837
+ *
5838
+ * @param dragSource The dragSource to remove
5839
+ */
5840
+ removeDragSource(dragSource: DragSource): void;
5841
+
5842
+ /**
5843
+ * If settings.selectionEnabled is set to true, this allows to select items programmatically.
5844
+ * @param contentItem A ContentItem instance
5845
+ */
5846
+ selectItem(contentItem: ContentItem): void;
5847
+
5848
+ /**
5849
+ * Static method on the GoldenLayout constructor! This method will iterate through a GoldenLayout config object
5850
+ * and replace frequent keys and values with single letter substitutes.
5851
+ * @param config A GoldenLayout configuration object
5852
+ */
5853
+ static minifyConfig(config: any): any;
5854
+
5855
+ /**
5856
+ * Static method on the GoldenLayout constructor! This method will reverse the minifications of minifyConfig.
5857
+ * @param minifiedConfig A minified GoldenLayout configuration object
5858
+ */
5859
+ static unminifyConfig(minifiedConfig: any): any;
5860
+
5861
+ /**
5862
+ * Subscribe to an event
5863
+ * @param eventName The name of the event to describe to
5864
+ * @param callback The function that should be invoked when the event occurs
5865
+ * @param context The value of the this pointer in the callback function
5866
+ */
5867
+ on(eventName: string, callback: Function, context?: any): void;
5868
+
5869
+ /**
5870
+ * Notify listeners of an event and pass arguments along
5871
+ * @param eventName The name of the event to emit
5872
+ */
5873
+ emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5874
+
5875
+ /**
5876
+ * Alias for emit
5877
+ */
5878
+ trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5879
+
5880
+ /**
5881
+ * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
5882
+ * eventName and callback or just a specific callback with a specific context if invoked with all three
5883
+ * arguments.
5884
+ * @param eventName The name of the event to unsubscribe from
5885
+ * @param callback The function that should be invoked when the event occurs
5886
+ * @param context The value of the this pointer in the callback function
5887
+ */
5888
+ unbind(eventName: string, callback?: Function, context?: any): void;
5889
+
5890
+ /**
5891
+ * Alias for unbind
5892
+ */
5893
+ off(eventName: string, callback?: Function, context?: any): void;
5894
+
5895
+ /**
5896
+ * Internal method that create drop areas on the far edges of window, e.g. far-right of window
5897
+ */
5898
+ _$createRootItemAreas(): void;
5899
+ }
5900
+
5209
5901
  /**
5210
5902
  * @interface
5211
5903
  */
@@ -5213,6 +5905,62 @@ declare type GpuInfo = {
5213
5905
  name: string;
5214
5906
  };
5215
5907
 
5908
+ declare interface Header {
5909
+ /**
5910
+ * A reference to the LayoutManager instance
5911
+ */
5912
+ layoutManager: GoldenLayout_2;
5913
+
5914
+ /**
5915
+ * A reference to the Stack this Header belongs to
5916
+ */
5917
+ parent: ContentItem;
5918
+
5919
+ /**
5920
+ * An array of the Tabs within this header
5921
+ */
5922
+ tabs: Tab[];
5923
+
5924
+ /**
5925
+ * The currently selected activeContentItem
5926
+ */
5927
+ activeContentItem: ContentItem;
5928
+
5929
+ /**
5930
+ * The outer (jQuery) DOM element of this Header
5931
+ */
5932
+ element: JQuery;
5933
+
5934
+ /**
5935
+ * The (jQuery) DOM element containing the tabs
5936
+ */
5937
+ tabsContainer: JQuery;
5938
+
5939
+ /**
5940
+ * The (jQuery) DOM element containing the close, maximise and popout button
5941
+ */
5942
+ controlsContainer: JQuery;
5943
+
5944
+ /**
5945
+ * Hides the currently selected contentItem, shows the specified one and highlights its tab.
5946
+ * @param contentItem The content item that will be selected
5947
+ */
5948
+ setActiveContentItem(contentItem: ContentItem): void;
5949
+
5950
+ /**
5951
+ * Creates a new tab and associates it with a content item
5952
+ * @param contentItem The content item the tab will be associated with
5953
+ * @param index A zero based index, specifying the position of the new tab
5954
+ */
5955
+ createTab(contentItem: ContentItem, index?: number): void;
5956
+
5957
+ /**
5958
+ * Finds a tab by its contentItem and removes it
5959
+ * @param contentItem The content item the tab is associated with
5960
+ */
5961
+ removeTab(contentItem: ContentItem): void;
5962
+ }
5963
+
5216
5964
  /**
5217
5965
  * Generated when a View is hidden.
5218
5966
  * @interface
@@ -6940,6 +7688,50 @@ declare class InteropModule extends Base {
6940
7688
  connectSync(name: string, interopConfig?: OpenFin.InteropConfig): InteropClient;
6941
7689
  }
6942
7690
 
7691
+ declare interface ItemConfig {
7692
+ /**
7693
+ * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
7694
+ */
7695
+ type: ItemType;
7696
+
7697
+ /**
7698
+ * An array of configurations for items that will be created as children of this item.
7699
+ */
7700
+ content?: ItemConfigType[];
7701
+
7702
+ /**
7703
+ * The width of this item, relative to the other children of its parent in percent
7704
+ */
7705
+ width?: number;
7706
+
7707
+ /**
7708
+ * The height of this item, relative to the other children of its parent in percent
7709
+ */
7710
+ height?: number;
7711
+
7712
+ /**
7713
+ * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
7714
+ */
7715
+ id?: string | string[];
7716
+
7717
+ /**
7718
+ * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
7719
+ * will return false
7720
+ * Default: true
7721
+ */
7722
+ isClosable?: boolean;
7723
+
7724
+ /**
7725
+ * The title of the item as displayed on its tab and on popout windows
7726
+ * Default: componentName or ''
7727
+ */
7728
+ title?: string;
7729
+ }
7730
+
7731
+ declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
7732
+
7733
+ declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
7734
+
6943
7735
  /**
6944
7736
  * @interface
6945
7737
  */
@@ -6997,6 +7789,32 @@ declare type JumpListTask = {
6997
7789
  iconIndex?: number;
6998
7790
  };
6999
7791
 
7792
+ declare interface Labels {
7793
+ /**
7794
+ * The tooltip text that appears when hovering over the close icon.
7795
+ * Default: 'close'
7796
+ */
7797
+ close?: string;
7798
+
7799
+ /**
7800
+ * The tooltip text that appears when hovering over the maximise icon.
7801
+ * Default: 'maximise'
7802
+ */
7803
+ maximise?: string;
7804
+
7805
+ /**
7806
+ * The tooltip text that appears when hovering over the minimise icon.
7807
+ * Default: 'minimise'
7808
+ */
7809
+ minimise?: string;
7810
+
7811
+ /**
7812
+ * The tooltip text that appears when hovering over the popout icon.
7813
+ * Default: 'open in new window'
7814
+ */
7815
+ popout?: string;
7816
+ }
7817
+
7000
7818
  export declare function launch(config: ConnectConfig): Promise<number>;
7001
7819
 
7002
7820
  /**
@@ -7232,6 +8050,16 @@ declare class Layout extends Base {
7232
8050
  * ```
7233
8051
  */
7234
8052
  getConfig(): Promise<any>;
8053
+ /**
8054
+ * Retrieves the attached views in current window layout.
8055
+ *
8056
+ * @example
8057
+ * ```js
8058
+ * const layout = fin.Platform.Layout.getCurrentSync();
8059
+ * const views = await layout.getCurrentViews();
8060
+ * ```
8061
+ */
8062
+ getCurrentViews(): Promise<OpenFin.View[]>;
7235
8063
  /**
7236
8064
  * Replaces a Platform window's layout with a new layout.
7237
8065
  *
@@ -7502,6 +8330,7 @@ declare class LayoutManager {
7502
8330
  private setBackgroundImage;
7503
8331
  private setBackgroundImages;
7504
8332
  private getFrameSnapshot;
8333
+ private getCurrentViews;
7505
8334
  private addView;
7506
8335
  private replaceView;
7507
8336
  private removeView;
@@ -8517,6 +9346,10 @@ declare type Opacity = TransitionBase & {
8517
9346
  opacity: number;
8518
9347
  };
8519
9348
 
9349
+ declare type OpenExternalPermission = VerboseWebPermission & {
9350
+ protocols: string[];
9351
+ };
9352
+
8520
9353
  declare namespace OpenFin {
8521
9354
  export {
8522
9355
  FinApi,
@@ -8636,6 +9469,8 @@ declare namespace OpenFin {
8636
9469
  LaunchExternalProcessRule,
8637
9470
  SystemPermissions,
8638
9471
  WebPermission,
9472
+ VerboseWebPermission,
9473
+ OpenExternalPermission,
8639
9474
  Permissions_2 as Permissions,
8640
9475
  PlatformWindowCreationOptions,
8641
9476
  PlatformWindowOptions,
@@ -11050,6 +11885,18 @@ declare type QueryPermissionResult = {
11050
11885
  rawValue?: unknown;
11051
11886
  };
11052
11887
 
11888
+ declare interface ReactComponentConfig extends ItemConfig {
11889
+ /**
11890
+ * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
11891
+ */
11892
+ component: string;
11893
+
11894
+ /**
11895
+ * Properties that will be passed to the component and accessible using this.props.
11896
+ */
11897
+ props?: any;
11898
+ }
11899
+
11053
11900
  /**
11054
11901
  * @interface
11055
11902
  */
@@ -11527,6 +12374,97 @@ declare type SessionContextGroup = {
11527
12374
  }>;
11528
12375
  };
11529
12376
 
12377
+ declare interface Settings {
12378
+ preventSplitterResize?: boolean;
12379
+
12380
+ newTabButton?: {
12381
+ url?: string;
12382
+ };
12383
+
12384
+ /**
12385
+ * If true, tabs can't be dragged into the window.
12386
+ * Default: false
12387
+ */
12388
+ preventDragIn?: boolean;
12389
+
12390
+ /**
12391
+ * If true, tabs can't be dragged out of the window.
12392
+ * Default: false
12393
+ */
12394
+ preventDragOut?: boolean;
12395
+
12396
+ /**
12397
+ * If true, stack headers are the only areas where tabs can be dropped.
12398
+ * Default: false
12399
+ */
12400
+ constrainDragToHeaders?: boolean;
12401
+ /**
12402
+ * Turns headers on or off. If false, the layout will be displayed with splitters only.
12403
+ * Default: true
12404
+ */
12405
+ hasHeaders?: boolean;
12406
+
12407
+ /**
12408
+ * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
12409
+ * automatically when layout.createDragSource() is called.
12410
+ * Default: true
12411
+ */
12412
+ constrainDragToContainer?: boolean;
12413
+
12414
+ /**
12415
+ * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
12416
+ * Default: true
12417
+ */
12418
+ reorderEnabled?: boolean;
12419
+
12420
+ /**
12421
+ * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
12422
+ * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
12423
+ * Default: false
12424
+ */
12425
+ selectionEnabled?: boolean;
12426
+
12427
+ /**
12428
+ * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
12429
+ * be transferred to the new window, if false only the active component will be opened.
12430
+ * Default: false
12431
+ */
12432
+ popoutWholeStack?: boolean;
12433
+
12434
+ /**
12435
+ * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
12436
+ * If false, the popout call will fail silently.
12437
+ * Default: true
12438
+ */
12439
+ blockedPopoutsThrowError?: boolean;
12440
+
12441
+ /**
12442
+ * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
12443
+ * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
12444
+ * addition, any changes made to popouts won't be stored after the parent is closed.
12445
+ * Default: true
12446
+ */
12447
+ closePopoutsOnUnload?: boolean;
12448
+
12449
+ /**
12450
+ * Specifies if the popout icon should be displayed in the header-bar.
12451
+ * Default: true
12452
+ */
12453
+ showPopoutIcon?: boolean;
12454
+
12455
+ /**
12456
+ * Specifies if the maximise icon should be displayed in the header-bar.
12457
+ * Default: true
12458
+ */
12459
+ showMaximiseIcon?: boolean;
12460
+
12461
+ /**
12462
+ * Specifies if the close icon should be displayed in the header-bar.
12463
+ * Default: true
12464
+ */
12465
+ showCloseIcon?: boolean;
12466
+ }
12467
+
11530
12468
  /**
11531
12469
  * @interface
11532
12470
  */
@@ -13360,6 +14298,52 @@ declare type SystemShutdownHandler = (shutdownEvent: {
13360
14298
  proceed: () => void;
13361
14299
  }) => void;
13362
14300
 
14301
+ declare interface Tab {
14302
+ _dragListener: EventEmitter_2;
14303
+
14304
+ /**
14305
+ * True if this tab is the selected tab
14306
+ */
14307
+ isActive: boolean;
14308
+
14309
+ /**
14310
+ * A reference to the header this tab is a child of
14311
+ */
14312
+ header: Header;
14313
+
14314
+ /**
14315
+ * A reference to the content item this tab relates to
14316
+ */
14317
+ contentItem: ContentItem;
14318
+
14319
+ /**
14320
+ * The tabs outer (jQuery) DOM element
14321
+ */
14322
+ element: JQuery;
14323
+
14324
+ /**
14325
+ * The (jQuery) DOM element containing the title
14326
+ */
14327
+ titleElement: JQuery;
14328
+
14329
+ /**
14330
+ * The (jQuery) DOM element that closes the tab
14331
+ */
14332
+ closeElement: JQuery;
14333
+
14334
+ /**
14335
+ * Sets the tab's title. Does not affect the contentItem's title!
14336
+ * @param title The new title
14337
+ */
14338
+ setTitle(title: string): void;
14339
+
14340
+ /**
14341
+ * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
14342
+ * @param isActive Whether the tab is active
14343
+ */
14344
+ setActive(isActive: boolean): void;
14345
+ }
14346
+
13363
14347
  /**
13364
14348
  * Set of apis used to facilitate tab drag interactions without needing to hide views.
13365
14349
  * @ignore
@@ -13866,6 +14850,11 @@ declare namespace v2 {
13866
14850
  }
13867
14851
  }
13868
14852
 
14853
+ declare type VerboseWebPermission = {
14854
+ api: string;
14855
+ enabled: boolean;
14856
+ };
14857
+
13869
14858
  declare type View = OpenFin.View;
13870
14859
 
13871
14860
  /**
@@ -15712,7 +16701,7 @@ declare namespace WebContentsEvents {
15712
16701
  * `clipboard-read`: Request access to read from the clipboard.<br>
15713
16702
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
15714
16703
  */
15715
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write';
16704
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
15716
16705
 
15717
16706
  /**
15718
16707
  * Object representing headers and their values, where the