@openfin/node-adapter 34.78.20 → 34.78.22

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