@openfin/core 38.81.32 → 38.81.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
 
3
3
  import { EventEmitter } from 'events';
4
+ import { v1_2 } from '@openfin/fdc3';
5
+ import { v2_0 } from '@openfin/fdc3';
6
+ import { Version } from '@openfin/fdc3';
4
7
 
5
8
  /**
6
9
  * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
@@ -1907,48 +1910,6 @@ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1907
1910
  behavior: 'browser';
1908
1911
  };
1909
1912
 
1910
- declare interface BrowserWindow {
1911
- /**
1912
- * True if the window has been opened and its GoldenLayout instance initialised.
1913
- */
1914
- isInitialised: boolean;
1915
-
1916
- /**
1917
- * Creates a window configuration object from the Popout.
1918
- */
1919
- toConfig(): {
1920
- dimensions: {
1921
- width: number;
1922
- height: number;
1923
- left: number;
1924
- top: number;
1925
- };
1926
- content: Config;
1927
- parentId: string;
1928
- indexInParent: number;
1929
- };
1930
-
1931
- /**
1932
- * Returns the GoldenLayout instance from the child window
1933
- */
1934
- getGlInstance(): GoldenLayout_2;
1935
-
1936
- /**
1937
- * Returns the native Window object
1938
- */
1939
- getWindow(): Window;
1940
-
1941
- /**
1942
- * Closes the popout
1943
- */
1944
- close(): void;
1945
-
1946
- /**
1947
- * Returns the popout to its original position as specified in parentId and indexInParent
1948
- */
1949
- popIn(): void;
1950
- }
1951
-
1952
1913
  /**
1953
1914
  * Extracts a single event type matching the given key from the View {@link Event} union.
1954
1915
  *
@@ -3329,31 +3290,6 @@ declare class ColumnOrRow extends LayoutNode {
3329
3290
  getContent: () => Promise<(ColumnOrRow | TabStack)[]>;
3330
3291
  }
3331
3292
 
3332
- declare interface ComponentConfig extends ItemConfig {
3333
- /**
3334
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
3335
- */
3336
- componentName: string;
3337
-
3338
- /**
3339
- * A serialisable object. Will be passed to the component constructor function and will be the value returned by
3340
- * container.getState().
3341
- */
3342
- componentState?: any;
3343
- }
3344
-
3345
- declare interface Config {
3346
- settings?: Settings;
3347
- dimensions?: Dimensions;
3348
- labels?: Labels;
3349
- content?: ItemConfigType[];
3350
- /**
3351
- * (Only on layout config object)
3352
- * Id of the currently maximised content item
3353
- */
3354
- maximisedItemId?: string;
3355
- }
3356
-
3357
3293
  declare type ConfigWithRuntime = BaseConfig & {
3358
3294
  runtime: RuntimeConfig;
3359
3295
  };
@@ -3745,103 +3681,6 @@ declare type ConstWindowOptions = {
3745
3681
  inheritance?: Partial<InheritableOptions>;
3746
3682
  };
3747
3683
 
3748
- declare interface Container extends EventEmitter_2 {
3749
- /**
3750
- * The current width of the container in pixel
3751
- */
3752
- width: number;
3753
-
3754
- /**
3755
- * The current height of the container in pixel
3756
- */
3757
- height: number;
3758
-
3759
- /**
3760
- * A reference to the component-item that controls this container
3761
- */
3762
- parent: ContentItem;
3763
-
3764
- /**
3765
- * A reference to the tab that controls this container. Will initially be null
3766
- * (and populated once a tab event has been fired).
3767
- */
3768
- tab: Tab;
3769
-
3770
- /**
3771
- * The current title of the container
3772
- */
3773
- title: string;
3774
-
3775
- /*
3776
- * A reference to the GoldenLayout instance this container belongs to
3777
- */
3778
- layoutManager: GoldenLayout_2;
3779
-
3780
- /**
3781
- * True if the item is currently hidden
3782
- */
3783
- isHidden: boolean;
3784
-
3785
- /**
3786
- * Overwrites the components state with the provided value. To only change parts of the componentState see
3787
- * extendState below. This is the main mechanism for saving the state of a component. This state will be the
3788
- * value of componentState when layout.toConfig() is called and will be passed back to the component's
3789
- * constructor function. It will also be used when the component is opened in a new window.
3790
- * @param state A serialisable object
3791
- */
3792
- setState(state: any): void;
3793
-
3794
- /**
3795
- * The same as setState but does not emit 'stateChanged' event
3796
- * @param {serialisable} state
3797
- */
3798
- setStateSkipEvent(state: any): void;
3799
-
3800
- /**
3801
- * This is similar to setState, but merges the provided state into the current one, rather than overwriting it.
3802
- * @param state A serialisable object
3803
- */
3804
- extendState(state: any): void;
3805
-
3806
- /**
3807
- * Returns the current state.
3808
- */
3809
- getState(): any;
3810
-
3811
- /**
3812
- * Returns the container's inner element as a jQuery element
3813
- */
3814
- getElement(): JQuery;
3815
-
3816
- /**
3817
- * hides the container or returns false if hiding it is not possible
3818
- */
3819
- hide(): boolean;
3820
-
3821
- /**
3822
- * shows the container or returns false if showing it is not possible
3823
- */
3824
- show(): boolean;
3825
-
3826
- /**
3827
- * Sets the container to the specified size or returns false if that's not possible
3828
- * @param width the new width in pixel
3829
- * @param height the new height in pixel
3830
- */
3831
- setSize(width: number, height: number): boolean;
3832
-
3833
- /**
3834
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3835
- * @param title the new title
3836
- */
3837
- setTitle(title: string): void;
3838
-
3839
- /**
3840
- * Closes the container or returns false if that is not possible
3841
- */
3842
- close(): boolean;
3843
- }
3844
-
3845
3684
  /**
3846
3685
  * Generated when a Layout Container Component was created.
3847
3686
  * @interface
@@ -3923,218 +3762,6 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3923
3762
  disposition: string;
3924
3763
  };
3925
3764
 
3926
- declare interface ContentItem extends EventEmitter_2 {
3927
- instance: any;
3928
- header: any;
3929
- _splitter: any;
3930
- /**
3931
- * This items configuration in its current state
3932
- */
3933
- config: ItemConfigType;
3934
-
3935
- /**
3936
- * The type of the item. Can be row, column, stack, component or root
3937
- */
3938
- type: ItemType;
3939
-
3940
- /**
3941
- * An array of items that are children of this item
3942
- */
3943
- contentItems: ContentItem[];
3944
-
3945
- container: Container;
3946
- /**
3947
- * The item that is this item's parent (or null if the item is root)
3948
- */
3949
- parent: ContentItem;
3950
-
3951
- /**
3952
- * A String or array of identifiers if provided in the configuration
3953
- */
3954
- id: string;
3955
-
3956
- /**
3957
- * True if the item had been initialised
3958
- */
3959
- isInitialised: boolean;
3960
-
3961
- /**
3962
- * True if the item is maximised
3963
- */
3964
- isMaximised: boolean;
3965
-
3966
- /**
3967
- * True if the item is the layout's root item
3968
- */
3969
- isRoot: boolean;
3970
-
3971
- /**
3972
- * True if the item is a row
3973
- */
3974
- isRow: boolean;
3975
-
3976
- /**
3977
- * True if the item is a column
3978
- */
3979
- isColumn: boolean;
3980
-
3981
- /**
3982
- * True if the item is a stack
3983
- */
3984
- isStack: boolean;
3985
-
3986
- /**
3987
- * True if the item is a component
3988
- */
3989
- isComponent: boolean;
3990
-
3991
- /**
3992
- * A reference to the layoutManager that controls this item
3993
- */
3994
- layoutManager: any;
3995
-
3996
- /**
3997
- * The item's outer element
3998
- */
3999
- element: JQuery;
4000
-
4001
- /**
4002
- * The item's inner element. Can be the same as the outer element.
4003
- */
4004
- childElementContainer: Container;
4005
-
4006
- /**
4007
- * Adds an item as a child to this item. If the item is already a part of a layout it will be removed
4008
- * from its original position before adding it to this item.
4009
- * @param itemOrItemConfig A content item (or tree of content items) or an ItemConfiguration to create the item from
4010
- * @param index last index An optional index that determines at which position the new item should be added. Default: last index.
4011
- */
4012
- addChild(itemOrItemConfig: ContentItem | ItemConfigType, index?: number): void;
4013
-
4014
- /**
4015
- * Destroys the item and all it's children
4016
- * @param contentItem The contentItem that should be removed
4017
- * @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.
4018
- */
4019
- removeChild(contentItem: ContentItem, keepChild?: boolean): void;
4020
-
4021
- /**
4022
- * The contentItem that should be removed
4023
- * @param oldChild ContentItem The contentItem that should be removed
4024
- * @param newChild A content item (or tree of content items) or an ItemConfiguration to create the item from
4025
- */
4026
- replaceChild(oldChild: ContentItem, newChild: ContentItem | ItemConfigType): void;
4027
-
4028
- /**
4029
- * Updates the items size. To actually assign a new size from within a component, use container.setSize( width, height )
4030
- */
4031
- setSize(): void;
4032
-
4033
- /**
4034
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
4035
- * @param title the new title
4036
- */
4037
- setTitle(title: string): void;
4038
-
4039
- /**
4040
- * A powerful, yet admittedly confusing method to recursively call methods on items in a tree. Usually you wouldn't need
4041
- * to use it directly, but it's used internally to setSizes, destroy parts of the item tree etc.
4042
- * @param functionName The name of the method to invoke
4043
- * @param functionArguments An array of arguments to pass to every function
4044
- * @param bottomUp If true, the method is invoked on the lowest parts of the tree first and then bubbles upwards. Default: false
4045
- * @param skipSelf If true, the method will only be invoked on the item's children, but not on the item itself. Default: false
4046
- */
4047
- callDownwards(functionName: string, functionArguments?: any[], bottomUp?: boolean, skipSelf?: boolean): void;
4048
-
4049
- /**
4050
- * 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.
4051
- */
4052
- emitBubblingEvent(name: string): void;
4053
-
4054
- /**
4055
- * Convenience method for item.parent.removeChild( item )
4056
- */
4057
- remove(): void;
4058
-
4059
- /**
4060
- * Removes the item from its current position in the layout and opens it in a window
4061
- */
4062
- popout(): BrowserWindow;
4063
-
4064
- /**
4065
- * Maximises the item or minimises it if it's already maximised
4066
- */
4067
- toggleMaximise(): void;
4068
-
4069
- /**
4070
- * Selects the item. Only relevant if settings.selectionEnabled is set to true
4071
- */
4072
- select(): void;
4073
-
4074
- /**
4075
- * Unselects the item. Only relevant if settings.selectionEnabled is set to true
4076
- */
4077
- deselect(): void;
4078
-
4079
- /**
4080
- * Returns true if the item has the specified id or false if not
4081
- * @param id An id to check for
4082
- */
4083
- hasId(id: string): boolean;
4084
-
4085
- /**
4086
- * Only Stacks have this method! It's the programmatical equivalent of clicking a tab.
4087
- * @param contentItem The new active content item
4088
- * @param preventFocus [OpenFin Custom] Indicates to openfin that the view should not be focused when activated.
4089
- */
4090
- // (CORE-198)[../docs/golden-layout-changelog.md#CORE-198 stack.setActiveView]
4091
- setActiveContentItem(contentItem: ContentItem, preventFocus?: boolean): void;
4092
-
4093
- /**
4094
- * Only Stacks have this method! Returns the currently selected contentItem.
4095
- */
4096
- getActiveContentItem(): ContentItem;
4097
-
4098
- /**
4099
- * Adds an id to an item or does nothing if the id is already present
4100
- * @param id The id to be added
4101
- */
4102
- addId(id: string): void;
4103
-
4104
- /**
4105
- * Removes an id from an item or throws an error if the id couldn't be found
4106
- * @param id The id to be removed
4107
- */
4108
- removeId(id: string): void;
4109
-
4110
- /**
4111
- * Calls filterFunction recursively for every item in the tree. If the function returns true the item is added to the resulting array
4112
- * @param filterFunction A function that determines whether an item matches certain criteria
4113
- */
4114
- getItemsByFilter(filterFunction: (contentItem: ContentItem) => boolean): ContentItem[];
4115
-
4116
- /**
4117
- * Returns all items with the specified id.
4118
- * @param id An id specified in the itemConfig
4119
- */
4120
- getItemsById(id: string | string[]): ContentItem[];
4121
-
4122
- /**
4123
- * Returns all items with the specified type
4124
- * @param type 'row', 'column', 'stack', 'component' or 'root'
4125
- */
4126
- getItemsByType(type: string): ContentItem[];
4127
-
4128
- /**
4129
- * Returns all instances of the component with the specified componentName
4130
- * @param componentName a componentName as specified in the itemConfig
4131
- */
4132
- getComponentsByName(componentName: string): any;
4133
-
4134
- _contentAreaDimensions: any;
4135
- _$getArea: () => any;
4136
- }
4137
-
4138
3765
  /**
4139
3766
  * Restrict navigation to URLs that match an allowed pattern.
4140
3767
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -4573,46 +4200,6 @@ declare type DidFinishLoadEvent = NamedEvent & {
4573
4200
  type: 'did-finish-load';
4574
4201
  };
4575
4202
 
4576
- declare interface Dimensions {
4577
- /**
4578
- * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
4579
- * than the visible one, making it safe to set this to small values without affecting usability.
4580
- * Default: 5
4581
- */
4582
- borderWidth?: number;
4583
-
4584
- /**
4585
- * The minimum height an item can be resized to (in pixel).
4586
- * Default: 10
4587
- */
4588
- minItemHeight?: number;
4589
-
4590
- /**
4591
- * The minimum width an item can be resized to (in pixel).
4592
- * Default: 10
4593
- */
4594
- minItemWidth?: number;
4595
-
4596
- /**
4597
- * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
4598
- * adjusted accordingly.
4599
- * Default: 20
4600
- */
4601
- headerHeight?: number;
4602
-
4603
- /**
4604
- * The width of the element that appears when an item is dragged (in pixel).
4605
- * Default: 300
4606
- */
4607
- dragProxyWidth?: number;
4608
-
4609
- /**
4610
- * The height of the element that appears when an item is dragged (in pixel).
4611
- * Default: 200
4612
- */
4613
- dragProxyHeight?: number;
4614
- }
4615
-
4616
4203
  /**
4617
4204
  * @interface
4618
4205
  */
@@ -4873,8 +4460,6 @@ declare type Dpi = {
4873
4460
  vertical?: number;
4874
4461
  };
4875
4462
 
4876
- declare interface DragSource {}
4877
-
4878
4463
  /**
4879
4464
  * Generated when a window has been embedded.
4880
4465
  * @interface
@@ -5187,43 +4772,6 @@ declare class EventAggregator extends EmitterMap {
5187
4772
  dispatchEvent: (message: Message<any>) => boolean;
5188
4773
  }
5189
4774
 
5190
- declare interface EventEmitter_2 {
5191
- [x: string]: any;
5192
- /**
5193
- * Subscribe to an event
5194
- * @param eventName The name of the event to describe to
5195
- * @param callback The function that should be invoked when the event occurs
5196
- * @param context The value of the this pointer in the callback function
5197
- */
5198
- on(eventName: string, callback: Function, context?: any): void;
5199
-
5200
- /**
5201
- * Notify listeners of an event and pass arguments along
5202
- * @param eventName The name of the event to emit
5203
- */
5204
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5205
-
5206
- /**
5207
- * Alias for emit
5208
- */
5209
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5210
-
5211
- /**
5212
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
5213
- * eventName and callback or just a specific callback with a specific context if invoked with all three
5214
- * arguments.
5215
- * @param eventName The name of the event to unsubscribe from
5216
- * @param callback The function that should be invoked when the event occurs
5217
- * @param context The value of the this pointer in the callback function
5218
- */
5219
- unbind(eventName: string, callback?: Function, context?: any): void;
5220
-
5221
- /**
5222
- * Alias for unbind
5223
- */
5224
- off(eventName: string, callback?: Function, context?: any): void;
5225
- }
5226
-
5227
4775
  /**
5228
4776
  * Handler for an event on an EventEmitter.
5229
4777
  * @remarks Selects the correct type for the event
@@ -5996,319 +5544,72 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5996
5544
  * .catch(err => {
5997
5545
  * console.log('Error unregistering the hotkey', err);
5998
5546
  * });
5999
- * ```
6000
- */
6001
- unregister(hotkey: string): Promise<void>;
6002
- /**
6003
- * Unregisters all global hotkeys for the current application.
6004
- *
6005
- * @remarks Raises the `unregistered` event for each hotkey unregistered.
6006
- *
6007
- * @example
6008
- * ```js
6009
- * fin.GlobalHotkey.unregisterAll()
6010
- * .then(() => {
6011
- * console.log('Success');
6012
- * })
6013
- * .catch(err => {
6014
- * console.log('Error unregistering all hotkeys for this application', err);
6015
- * });
6016
- * ```
6017
- */
6018
- unregisterAll(): Promise<void>;
6019
- /**
6020
- * Checks if a given hotkey has been registered by an application within the current runtime.
6021
- * @param hotkey a hotkey string
6022
- *
6023
- * @example
6024
- * ```js
6025
- * const hotkey = 'CommandOrControl+X';
6026
- *
6027
- * fin.GlobalHotkey.isRegistered(hotkey)
6028
- * .then((registered) => {
6029
- * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
6030
- * })
6031
- * .catch(err => {
6032
- * console.log('Error unregistering the hotkey', err);
6033
- * });
6034
- * ```
6035
- */
6036
- isRegistered(hotkey: string): Promise<boolean>;
6037
- }
6038
-
6039
- /**
6040
- * @deprecated Renamed to {@link Event}.
6041
- */
6042
- declare type GlobalHotkeyEvent = Event_9;
6043
-
6044
- declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6045
-
6046
- declare namespace GlobalHotkeyEvents {
6047
- export {
6048
- BaseEvent_8 as BaseEvent,
6049
- RegisteredEvent,
6050
- UnregisteredEvent,
6051
- Event_9 as Event,
6052
- GlobalHotkeyEvent,
6053
- EventType_6 as EventType,
6054
- GlobalHotkeyEventType,
6055
- Payload_7 as Payload,
6056
- ByType_6 as ByType
6057
- }
6058
- }
6059
-
6060
- /**
6061
- * @deprecated Renamed to {@link EventType}.
6062
- */
6063
- declare type GlobalHotkeyEventType = EventType_6;
6064
-
6065
- declare namespace GoldenLayout {
6066
- export {
6067
- GoldenLayout_2 as GoldenLayout,
6068
- ItemConfigType,
6069
- Settings,
6070
- Dimensions,
6071
- Labels,
6072
- ItemType,
6073
- ItemConfig,
6074
- ComponentConfig,
6075
- ReactComponentConfig,
6076
- Config,
6077
- ContentItem,
6078
- Container,
6079
- DragSource,
6080
- BrowserWindow,
6081
- Header,
6082
- TabDragListener,
6083
- Tab,
6084
- EventEmitter_2 as EventEmitter
6085
- }
6086
- }
6087
-
6088
- declare class GoldenLayout_2 implements EventEmitter_2 {
6089
- /**
6090
- * The topmost item in the layout item tree. In browser terms: Think of the GoldenLayout instance as window
6091
- * object and of goldenLayout.root as the document.
6092
- */
6093
- root: ContentItem;
6094
-
6095
- /**
6096
- * A reference to the (jQuery) DOM element containing the layout
6097
- */
6098
- container: JQuery;
6099
-
6100
- /**
6101
- * True once the layout item tree has been created and the initialised event has been fired
6102
- */
6103
- isInitialised: boolean;
6104
-
6105
- /**
6106
- * A reference to the current, extended top level config.
6107
- *
6108
- * Don't rely on this object for state saving / serialisation. Use layout.toConfig() instead.
6109
- */
6110
- config: Config;
6111
-
6112
- /**
6113
- * The currently selected item or null if no item is selected. Only relevant if settings.selectionEnabled is set
6114
- * to true.
6115
- */
6116
- selectedItem: ContentItem;
6117
-
6118
- /**
6119
- * The current outer width of the layout in pixels.
6120
- */
6121
- width: number;
6122
-
6123
- /**
6124
- * The current outer height of the layout in pixels.
6125
- */
6126
- height: number;
6127
-
6128
- /**
6129
- * An array of BrowserWindow instances
6130
- */
6131
- openPopouts: BrowserWindow[];
6132
-
6133
- /**
6134
- * True if the layout has been opened as a popout by another layout.
6135
- */
6136
- isSubWindow: boolean;
6137
-
6138
- /**
6139
- * A singleton instance of EventEmitter that works across windows
6140
- */
6141
- eventHub: EventEmitter_2;
6142
-
6143
- _dragProxy: any;
6144
-
6145
- dropTargetIndicator: any;
6146
-
6147
- _isFullPage: boolean;
6148
-
6149
- _onUnload: any;
6150
-
6151
- tabDropPlaceholder: any;
6152
-
6153
- transitionIndicator: any;
6154
-
6155
- _dragSources: any;
6156
-
6157
- _resizeFunction: any;
6158
-
6159
- _unloadFunction: any;
6160
-
6161
- /**
6162
- * @param config A GoldenLayout configuration object
6163
- * @param container The DOM element the layout will be initialised in. Default: document.body
6164
- */
6165
- constructor(configuration: Config, container?: Element | HTMLElement | JQuery);
6166
-
6167
- /*
6168
- * @param name The name of the component, as referred to by componentName in the component configuration.
6169
- * @param component A constructor or factory function. Will be invoked with new and two arguments, a
6170
- * containerobject and a component state
6171
- */
6172
- registerComponent(name: String, component: any): void;
6173
-
6174
- /**
6175
- * Renders the layout into the container. If init() is called before the document is ready it attaches itself as
6176
- * a listener to the document and executes once it becomes ready.
6177
- */
6178
- init(): void;
6179
-
6180
- /**
6181
- * Returns the current state of the layout and its components as a serialisable object.
6182
- */
6183
- toConfig(): Config;
6184
-
6185
- /**
6186
- * Returns a component that was previously registered with layout.registerComponent().
6187
- * @param name The name of a previously registered component
6188
- */
6189
- getComponent(name: string): any;
6190
-
6191
- /**
6192
- * Resizes the layout. If no arguments are provided GoldenLayout measures its container and resizes accordingly.
6193
- * @param width The outer width the layout should be resized to. Default: The container elements width
6194
- * @param height The outer height the layout should be resized to. Default: The container elements height
6195
- */
6196
- updateSize(width?: number, height?: number): void;
6197
-
6198
- /**
6199
- * Destroys the layout. Recursively calls destroy on all components and content items, removes all event
6200
- * listeners and finally removes itself from the DOM.
6201
- */
6202
- destroy(): void;
6203
-
6204
- /**
6205
- * Creates a new content item or tree of content items from configuration. Usually you wouldn't call this
6206
- * directly, but instead use methods like layout.createDragSource(), item.addChild() or item.replaceChild() that
6207
- * all call this method implicitly.
6208
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6209
- * @param parent A parent item
6210
- */
6211
- createContentItem(itemConfiguration?: ItemConfigType, parent?: ContentItem): ContentItem;
6212
-
6213
- /**
6214
- * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
6215
- * @param configOrContentItem The content item or config that will be created in the new window. If a item is
6216
- * provided its config will be read, if config is provided, only the content key
6217
- * will be used
6218
- * @param dimensions A map containing the keys left, top, width and height. Left and top can be negative to
6219
- * place the window in another screen.
6220
- * @param parentId The id of the item within the current layout the child window's content will be appended to
6221
- * when popIn is clicked
6222
- * @param indexInParent The index at which the child window's contents will be appended to. Default: null
6223
- */
6224
- createPopout(
6225
- configOrContentItem: ItemConfigType | ContentItem,
6226
- dimensions: {
6227
- width: number;
6228
- height: number;
6229
- left: number;
6230
- top: number;
6231
- },
6232
- parentId?: string,
6233
- indexInParent?: number
6234
- ): void;
6235
-
6236
- /**
6237
- * Turns a DOM element into a dragSource, meaning that the user can drag the element directly onto the layout
6238
- * where it turns into a contentItem.
6239
- * @param element The DOM element that will be turned into a dragSource
6240
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6241
- * @return the dragSource that was created. This can be used to remove the
6242
- * dragSource from the layout later.
5547
+ * ```
6243
5548
  */
6244
- createDragSource(element: HTMLElement | JQuery, itemConfiguration: ItemConfigType): DragSource;
6245
-
5549
+ unregister(hotkey: string): Promise<void>;
6246
5550
  /**
6247
- * Removes a dragSource from the layout.
5551
+ * Unregisters all global hotkeys for the current application.
6248
5552
  *
6249
- * @param dragSource The dragSource to remove
6250
- */
6251
- removeDragSource(dragSource: DragSource): void;
6252
-
6253
- /**
6254
- * If settings.selectionEnabled is set to true, this allows to select items programmatically.
6255
- * @param contentItem A ContentItem instance
6256
- */
6257
- selectItem(contentItem: ContentItem): void;
6258
-
6259
- /**
6260
- * Static method on the GoldenLayout constructor! This method will iterate through a GoldenLayout config object
6261
- * and replace frequent keys and values with single letter substitutes.
6262
- * @param config A GoldenLayout configuration object
6263
- */
6264
- static minifyConfig(config: any): any;
6265
-
6266
- /**
6267
- * Static method on the GoldenLayout constructor! This method will reverse the minifications of minifyConfig.
6268
- * @param minifiedConfig A minified GoldenLayout configuration object
6269
- */
6270
- static unminifyConfig(minifiedConfig: any): any;
6271
-
6272
- /**
6273
- * Subscribe to an event
6274
- * @param eventName The name of the event to describe to
6275
- * @param callback The function that should be invoked when the event occurs
6276
- * @param context The value of the this pointer in the callback function
6277
- */
6278
- on(eventName: string, callback: Function, context?: any): void;
6279
-
6280
- /**
6281
- * Notify listeners of an event and pass arguments along
6282
- * @param eventName The name of the event to emit
5553
+ * @remarks Raises the `unregistered` event for each hotkey unregistered.
5554
+ *
5555
+ * @example
5556
+ * ```js
5557
+ * fin.GlobalHotkey.unregisterAll()
5558
+ * .then(() => {
5559
+ * console.log('Success');
5560
+ * })
5561
+ * .catch(err => {
5562
+ * console.log('Error unregistering all hotkeys for this application', err);
5563
+ * });
5564
+ * ```
6283
5565
  */
6284
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6285
-
5566
+ unregisterAll(): Promise<void>;
6286
5567
  /**
6287
- * Alias for emit
5568
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5569
+ * @param hotkey a hotkey string
5570
+ *
5571
+ * @example
5572
+ * ```js
5573
+ * const hotkey = 'CommandOrControl+X';
5574
+ *
5575
+ * fin.GlobalHotkey.isRegistered(hotkey)
5576
+ * .then((registered) => {
5577
+ * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
5578
+ * })
5579
+ * .catch(err => {
5580
+ * console.log('Error unregistering the hotkey', err);
5581
+ * });
5582
+ * ```
6288
5583
  */
6289
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5584
+ isRegistered(hotkey: string): Promise<boolean>;
5585
+ }
6290
5586
 
6291
- /**
6292
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
6293
- * eventName and callback or just a specific callback with a specific context if invoked with all three
6294
- * arguments.
6295
- * @param eventName The name of the event to unsubscribe from
6296
- * @param callback The function that should be invoked when the event occurs
6297
- * @param context The value of the this pointer in the callback function
6298
- */
6299
- unbind(eventName: string, callback?: Function, context?: any): void;
5587
+ /**
5588
+ * @deprecated Renamed to {@link Event}.
5589
+ */
5590
+ declare type GlobalHotkeyEvent = Event_9;
6300
5591
 
6301
- /**
6302
- * Alias for unbind
6303
- */
6304
- off(eventName: string, callback?: Function, context?: any): void;
5592
+ declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6305
5593
 
6306
- /**
6307
- * Internal method that create drop areas on the far edges of window, e.g. far-right of window
6308
- */
6309
- _$createRootItemAreas(): void;
5594
+ declare namespace GlobalHotkeyEvents {
5595
+ export {
5596
+ BaseEvent_8 as BaseEvent,
5597
+ RegisteredEvent,
5598
+ UnregisteredEvent,
5599
+ Event_9 as Event,
5600
+ GlobalHotkeyEvent,
5601
+ EventType_6 as EventType,
5602
+ GlobalHotkeyEventType,
5603
+ Payload_7 as Payload,
5604
+ ByType_6 as ByType
5605
+ }
6310
5606
  }
6311
5607
 
5608
+ /**
5609
+ * @deprecated Renamed to {@link EventType}.
5610
+ */
5611
+ declare type GlobalHotkeyEventType = EventType_6;
5612
+
6312
5613
  /**
6313
5614
  * @interface
6314
5615
  */
@@ -6316,64 +5617,15 @@ declare type GpuInfo = {
6316
5617
  name: string;
6317
5618
  };
6318
5619
 
6319
- declare interface Header {
6320
- /**
6321
- * A reference to the LayoutManager instance
6322
- */
6323
- layoutManager: GoldenLayout_2;
6324
-
6325
- /**
6326
- * A reference to the Stack this Header belongs to
6327
- */
6328
- parent: ContentItem;
6329
-
6330
- /**
6331
- * An array of the Tabs within this header
6332
- */
6333
- tabs: Tab[];
6334
-
6335
- /**
6336
- * The currently selected activeContentItem
6337
- */
6338
- activeContentItem: ContentItem;
6339
-
6340
- /**
6341
- * The outer (jQuery) DOM element of this Header
6342
- */
6343
- element: JQuery;
6344
-
6345
- /**
6346
- * The (jQuery) DOM element containing the tabs
6347
- */
6348
- tabsContainer: JQuery;
6349
-
6350
- /**
6351
- * The (jQuery) DOM element containing the close, maximise and popout button
6352
- */
6353
- controlsContainer: JQuery;
6354
-
6355
- /**
6356
- * Hides the currently selected contentItem, shows the specified one and highlights its tab.
6357
- * @param contentItem The content item that will be selected
6358
- */
6359
- setActiveContentItem(contentItem: ContentItem): void;
6360
-
6361
- /**
6362
- * Creates a new tab and associates it with a content item
6363
- * @param contentItem The content item the tab will be associated with
6364
- * @param index A zero based index, specifying the position of the new tab
6365
- */
6366
- createTab(contentItem: ContentItem, index?: number): void;
6367
-
6368
- /**
6369
- * Finds a tab by its contentItem and removes it
6370
- * @param contentItem The content item the tab is associated with
6371
- */
6372
- removeTab(contentItem: ContentItem): void;
6373
- }
6374
-
6375
5620
  /**
6376
5621
  * Generated when a View is hidden.
5622
+ *
5623
+ * @remarks
5624
+ * An OpenFin View's `hidden` event is only emitted when a specific View API is called.
5625
+ * This event can fire when calling:
5626
+ *
5627
+ * * `view.hide()` - If a View is previously shown, a `hidden` event will be fired.
5628
+ *
6377
5629
  * @interface
6378
5630
  */
6379
5631
  declare type HiddenEvent = BaseEvent_4 & {
@@ -7958,50 +7210,6 @@ declare class InteropModule extends Base {
7958
7210
  connectSync(name: string, interopConfig?: OpenFin_2.InteropConfig): InteropClient;
7959
7211
  }
7960
7212
 
7961
- declare interface ItemConfig {
7962
- /**
7963
- * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
7964
- */
7965
- type: ItemType;
7966
-
7967
- /**
7968
- * An array of configurations for items that will be created as children of this item.
7969
- */
7970
- content?: ItemConfigType[];
7971
-
7972
- /**
7973
- * The width of this item, relative to the other children of its parent in percent
7974
- */
7975
- width?: number;
7976
-
7977
- /**
7978
- * The height of this item, relative to the other children of its parent in percent
7979
- */
7980
- height?: number;
7981
-
7982
- /**
7983
- * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
7984
- */
7985
- id?: string | string[];
7986
-
7987
- /**
7988
- * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
7989
- * will return false
7990
- * Default: true
7991
- */
7992
- isClosable?: boolean;
7993
-
7994
- /**
7995
- * The title of the item as displayed on its tab and on popout windows
7996
- * Default: componentName or ''
7997
- */
7998
- title?: string;
7999
- }
8000
-
8001
- declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
8002
-
8003
- declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
8004
-
8005
7213
  /**
8006
7214
  * @interface
8007
7215
  */
@@ -8059,32 +7267,6 @@ declare type JumpListTask = {
8059
7267
  iconIndex?: number;
8060
7268
  };
8061
7269
 
8062
- declare interface Labels {
8063
- /**
8064
- * The tooltip text that appears when hovering over the close icon.
8065
- * Default: 'close'
8066
- */
8067
- close?: string;
8068
-
8069
- /**
8070
- * The tooltip text that appears when hovering over the maximise icon.
8071
- * Default: 'maximise'
8072
- */
8073
- maximise?: string;
8074
-
8075
- /**
8076
- * The tooltip text that appears when hovering over the minimise icon.
8077
- * Default: 'minimise'
8078
- */
8079
- minimise?: string;
8080
-
8081
- /**
8082
- * The tooltip text that appears when hovering over the popout icon.
8083
- * Default: 'open in new window'
8084
- */
8085
- popout?: string;
8086
- }
8087
-
8088
7270
  /**
8089
7271
  * The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
8090
7272
  *
@@ -8536,7 +7718,7 @@ declare type LayoutEntityDefinition<TLayoutEntityType extends LayoutEntityTypes
8536
7718
  entityId: string;
8537
7719
  };
8538
7720
 
8539
- declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'root'>;
7721
+ declare type LayoutEntityTypes = 'column' | 'row' | 'stack';
8540
7722
 
8541
7723
  /**
8542
7724
  * @interface
@@ -12473,18 +11655,6 @@ declare type QueryPermissionResult = {
12473
11655
  rawValue?: unknown;
12474
11656
  };
12475
11657
 
12476
- declare interface ReactComponentConfig extends ItemConfig {
12477
- /**
12478
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
12479
- */
12480
- component: string;
12481
-
12482
- /**
12483
- * Properties that will be passed to the component and accessible using this.props.
12484
- */
12485
- props?: any;
12486
- }
12487
-
12488
11658
  /**
12489
11659
  * @interface
12490
11660
  */
@@ -12961,97 +12131,6 @@ declare type SessionContextGroup = {
12961
12131
  }>;
12962
12132
  };
12963
12133
 
12964
- declare interface Settings {
12965
- preventSplitterResize?: boolean;
12966
-
12967
- newTabButton?: {
12968
- url?: string;
12969
- };
12970
-
12971
- /**
12972
- * If true, tabs can't be dragged into the window.
12973
- * Default: false
12974
- */
12975
- preventDragIn?: boolean;
12976
-
12977
- /**
12978
- * If true, tabs can't be dragged out of the window.
12979
- * Default: false
12980
- */
12981
- preventDragOut?: boolean;
12982
-
12983
- /**
12984
- * If true, stack headers are the only areas where tabs can be dropped.
12985
- * Default: false
12986
- */
12987
- constrainDragToHeaders?: boolean;
12988
- /**
12989
- * Turns headers on or off. If false, the layout will be displayed with splitters only.
12990
- * Default: true
12991
- */
12992
- hasHeaders?: boolean;
12993
-
12994
- /**
12995
- * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
12996
- * automatically when layout.createDragSource() is called.
12997
- * Default: true
12998
- */
12999
- constrainDragToContainer?: boolean;
13000
-
13001
- /**
13002
- * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
13003
- * Default: true
13004
- */
13005
- reorderEnabled?: boolean;
13006
-
13007
- /**
13008
- * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
13009
- * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
13010
- * Default: false
13011
- */
13012
- selectionEnabled?: boolean;
13013
-
13014
- /**
13015
- * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
13016
- * be transferred to the new window, if false only the active component will be opened.
13017
- * Default: false
13018
- */
13019
- popoutWholeStack?: boolean;
13020
-
13021
- /**
13022
- * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
13023
- * If false, the popout call will fail silently.
13024
- * Default: true
13025
- */
13026
- blockedPopoutsThrowError?: boolean;
13027
-
13028
- /**
13029
- * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
13030
- * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
13031
- * addition, any changes made to popouts won't be stored after the parent is closed.
13032
- * Default: true
13033
- */
13034
- closePopoutsOnUnload?: boolean;
13035
-
13036
- /**
13037
- * Specifies if the popout icon should be displayed in the header-bar.
13038
- * Default: true
13039
- */
13040
- showPopoutIcon?: boolean;
13041
-
13042
- /**
13043
- * Specifies if the maximise icon should be displayed in the header-bar.
13044
- * Default: true
13045
- */
13046
- showMaximiseIcon?: boolean;
13047
-
13048
- /**
13049
- * Specifies if the close icon should be displayed in the header-bar.
13050
- * Default: true
13051
- */
13052
- showCloseIcon?: boolean;
13053
- }
13054
-
13055
12134
  /**
13056
12135
  * @interface
13057
12136
  */
@@ -13153,7 +12232,18 @@ declare type ShowAllDownloadsEvent = BaseEvent_5 & {
13153
12232
  };
13154
12233
 
13155
12234
  /**
13156
- * Generated when a View is shown. This event will fire during creation of a View.
12235
+ * Generated when a View is shown.
12236
+ *
12237
+ * @remarks
12238
+ * An OpenFin View's `shown` event is only emitted when specific View APIs are called.
12239
+ * This event can fire when calling:
12240
+ *
12241
+ * * `view.show()` or `view.showAt()` - If a View is previously hidden, a `shown` event will be fired.
12242
+ *
12243
+ * * `view.attach()` - If a View is hidden and attached to a new Window, it will be shown and the `shown` event will be fired.
12244
+ *
12245
+ * * `view.create()` - A View `shown` event will be fired. (Internally the `attach` method is called when calling the `create` method, which fires the `shown` event.)
12246
+ *
13157
12247
  * @interface
13158
12248
  */
13159
12249
  declare type ShownEvent = BaseEvent_4 & {
@@ -14947,52 +14037,6 @@ declare type SystemShutdownHandler = (shutdownEvent: {
14947
14037
  proceed: () => void;
14948
14038
  }) => void;
14949
14039
 
14950
- declare interface Tab {
14951
- _dragListener: TabDragListener;
14952
-
14953
- /**
14954
- * True if this tab is the selected tab
14955
- */
14956
- isActive: boolean;
14957
-
14958
- /**
14959
- * A reference to the header this tab is a child of
14960
- */
14961
- header: Header;
14962
-
14963
- /**
14964
- * A reference to the content item this tab relates to
14965
- */
14966
- contentItem: ContentItem;
14967
-
14968
- /**
14969
- * The tabs outer (jQuery) DOM element
14970
- */
14971
- element: JQuery;
14972
-
14973
- /**
14974
- * The (jQuery) DOM element containing the title
14975
- */
14976
- titleElement: JQuery;
14977
-
14978
- /**
14979
- * The (jQuery) DOM element that closes the tab
14980
- */
14981
- closeElement: JQuery;
14982
-
14983
- /**
14984
- * Sets the tab's title. Does not affect the contentItem's title!
14985
- * @param title The new title
14986
- */
14987
- setTitle(title: string): void;
14988
-
14989
- /**
14990
- * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
14991
- * @param isActive Whether the tab is active
14992
- */
14993
- setActive(isActive: boolean): void;
14994
- }
14995
-
14996
14040
  /**
14997
14041
  * Generated when a Layout Tab Component was closed.
14998
14042
  * @interface
@@ -15010,13 +14054,6 @@ declare type TabCreatedEvent = LayoutDOMEvent & {
15010
14054
  type: 'tab-created';
15011
14055
  };
15012
14056
 
15013
- declare interface TabDragListener extends EventEmitter_2 {
15014
- /**
15015
- * A reference to the content item this tab relates to
15016
- */
15017
- contentItem: ContentItem;
15018
- }
15019
-
15020
14057
  /**
15021
14058
  * Generated when a Layout Tab Component was dropped.
15022
14059
  * @interface
@@ -15424,117 +14461,11 @@ declare type UserMovementEnabledEvent = BaseEvent_5 & {
15424
14461
  type: 'user-movement-enabled';
15425
14462
  };
15426
14463
 
15427
- declare namespace v1_2 {
15428
- {
15429
- AppIntent,
15430
- AppMetadata,
15431
- DisplayMetadata,
15432
- OpenError,
15433
- ResolveError,
15434
- ChannelError,
15435
- ImplementationMetadata,
15436
- IntentMetadata,
15437
- Listener,
15438
- ContextTypes,
15439
- ContextType,
15440
- Context,
15441
- ContactList,
15442
- Contact,
15443
- ContactID,
15444
- InstrumentList,
15445
- Instrument,
15446
- InstrumentID,
15447
- Country,
15448
- CountryID,
15449
- Organization,
15450
- OrganizationID,
15451
- Portfolio,
15452
- Position,
15453
- Convert,
15454
- Intents,
15455
- Channel,
15456
- DesktopAgent,
15457
- IntentResolution,
15458
- TargetApp,
15459
- ContextHandler
15460
- }
15461
- }
15462
-
15463
- declare namespace v2_0 {
15464
- {
15465
- AppIdentifier,
15466
- AppIntent_2 as AppIntent,
15467
- AppMetadata_2 as AppMetadata,
15468
- ContextMetadata,
15469
- DisplayMetadata_2 as DisplayMetadata,
15470
- OpenError_2 as OpenError,
15471
- ResolveError_2 as ResolveError,
15472
- ResultError,
15473
- ChannelError_2 as ChannelError,
15474
- Icon,
15475
- Image_2 as Image,
15476
- ImplementationMetadata_2 as ImplementationMetadata,
15477
- IntentMetadata_2 as IntentMetadata,
15478
- Listener_2 as Listener,
15479
- ContextTypes_2 as ContextTypes,
15480
- ContextType_2 as ContextType,
15481
- Chart,
15482
- InstrumentElement,
15483
- PurpleID,
15484
- PurpleMarket,
15485
- TimeRangeObject,
15486
- Style,
15487
- ChatInitSettings,
15488
- ContactListObject,
15489
- ContactElement,
15490
- FluffyID,
15491
- Contact_2 as Contact,
15492
- TentacledID,
15493
- ContactList_2 as ContactList,
15494
- Context_2 as Context,
15495
- Country_2 as Country,
15496
- CountryID_2 as CountryID,
15497
- Currency,
15498
- CurrencyID,
15499
- Email,
15500
- RecipientsObject,
15501
- RecipientsID,
15502
- Instrument_2 as Instrument,
15503
- StickyID,
15504
- FluffyMarket,
15505
- InstrumentList_2 as InstrumentList,
15506
- Nothing,
15507
- Organization_2 as Organization,
15508
- OrganizationID_2 as OrganizationID,
15509
- Portfolio_2 as Portfolio,
15510
- PositionElement,
15511
- Position_2 as Position,
15512
- TimeRange,
15513
- Valuation,
15514
- Convert_2 as Convert,
15515
- Intents_2 as Intents,
15516
- Channel_2 as Channel,
15517
- DesktopAgent_2 as DesktopAgent,
15518
- IntentResolution_2 as IntentResolution,
15519
- PrivateChannel,
15520
- ContextHandler_2 as ContextHandler,
15521
- IntentResult,
15522
- IntentHandler
15523
- }
15524
- }
15525
-
15526
14464
  declare type VerboseWebPermission = {
15527
14465
  api: string;
15528
14466
  enabled: boolean;
15529
14467
  };
15530
14468
 
15531
- declare type Version = (typeof versions)[keyof typeof versions];
15532
-
15533
- declare const versions: {
15534
- readonly v1_2: "1.2";
15535
- readonly v2_0: "2.0";
15536
- };
15537
-
15538
14469
  declare type View = OpenFin_2.View;
15539
14470
 
15540
14471
  /**