@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.
package/out/mock.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  /// <reference types="node" />
2
2
 
3
3
  import { EventEmitter } from 'events';
4
+ import { v1_2 } from './fdc3';
5
+ import { v2_0 } from './fdc3';
6
+ import { Version } from './fdc3';
4
7
 
5
8
  /**
6
9
  * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
@@ -1939,48 +1942,6 @@ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1939
1942
  behavior: 'browser';
1940
1943
  };
1941
1944
 
1942
- declare interface BrowserWindow {
1943
- /**
1944
- * True if the window has been opened and its GoldenLayout instance initialised.
1945
- */
1946
- isInitialised: boolean;
1947
-
1948
- /**
1949
- * Creates a window configuration object from the Popout.
1950
- */
1951
- toConfig(): {
1952
- dimensions: {
1953
- width: number;
1954
- height: number;
1955
- left: number;
1956
- top: number;
1957
- };
1958
- content: Config;
1959
- parentId: string;
1960
- indexInParent: number;
1961
- };
1962
-
1963
- /**
1964
- * Returns the GoldenLayout instance from the child window
1965
- */
1966
- getGlInstance(): GoldenLayout_2;
1967
-
1968
- /**
1969
- * Returns the native Window object
1970
- */
1971
- getWindow(): Window;
1972
-
1973
- /**
1974
- * Closes the popout
1975
- */
1976
- close(): void;
1977
-
1978
- /**
1979
- * Returns the popout to its original position as specified in parentId and indexInParent
1980
- */
1981
- popIn(): void;
1982
- }
1983
-
1984
1945
  /**
1985
1946
  * Extracts a single event type matching the given key from the View {@link Event} union.
1986
1947
  *
@@ -3388,31 +3349,6 @@ declare class ColumnOrRow extends LayoutNode {
3388
3349
  getContent: () => Promise<(ColumnOrRow | TabStack)[]>;
3389
3350
  }
3390
3351
 
3391
- declare interface ComponentConfig extends ItemConfig {
3392
- /**
3393
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
3394
- */
3395
- componentName: string;
3396
-
3397
- /**
3398
- * A serialisable object. Will be passed to the component constructor function and will be the value returned by
3399
- * container.getState().
3400
- */
3401
- componentState?: any;
3402
- }
3403
-
3404
- declare interface Config {
3405
- settings?: Settings;
3406
- dimensions?: Dimensions;
3407
- labels?: Labels;
3408
- content?: ItemConfigType[];
3409
- /**
3410
- * (Only on layout config object)
3411
- * Id of the currently maximised content item
3412
- */
3413
- maximisedItemId?: string;
3414
- }
3415
-
3416
3352
  declare type ConfigWithRuntime = BaseConfig & {
3417
3353
  runtime: RuntimeConfig;
3418
3354
  };
@@ -3804,103 +3740,6 @@ declare type ConstWindowOptions = {
3804
3740
  inheritance?: Partial<InheritableOptions>;
3805
3741
  };
3806
3742
 
3807
- declare interface Container extends EventEmitter_2 {
3808
- /**
3809
- * The current width of the container in pixel
3810
- */
3811
- width: number;
3812
-
3813
- /**
3814
- * The current height of the container in pixel
3815
- */
3816
- height: number;
3817
-
3818
- /**
3819
- * A reference to the component-item that controls this container
3820
- */
3821
- parent: ContentItem;
3822
-
3823
- /**
3824
- * A reference to the tab that controls this container. Will initially be null
3825
- * (and populated once a tab event has been fired).
3826
- */
3827
- tab: Tab;
3828
-
3829
- /**
3830
- * The current title of the container
3831
- */
3832
- title: string;
3833
-
3834
- /*
3835
- * A reference to the GoldenLayout instance this container belongs to
3836
- */
3837
- layoutManager: GoldenLayout_2;
3838
-
3839
- /**
3840
- * True if the item is currently hidden
3841
- */
3842
- isHidden: boolean;
3843
-
3844
- /**
3845
- * Overwrites the components state with the provided value. To only change parts of the componentState see
3846
- * extendState below. This is the main mechanism for saving the state of a component. This state will be the
3847
- * value of componentState when layout.toConfig() is called and will be passed back to the component's
3848
- * constructor function. It will also be used when the component is opened in a new window.
3849
- * @param state A serialisable object
3850
- */
3851
- setState(state: any): void;
3852
-
3853
- /**
3854
- * The same as setState but does not emit 'stateChanged' event
3855
- * @param {serialisable} state
3856
- */
3857
- setStateSkipEvent(state: any): void;
3858
-
3859
- /**
3860
- * This is similar to setState, but merges the provided state into the current one, rather than overwriting it.
3861
- * @param state A serialisable object
3862
- */
3863
- extendState(state: any): void;
3864
-
3865
- /**
3866
- * Returns the current state.
3867
- */
3868
- getState(): any;
3869
-
3870
- /**
3871
- * Returns the container's inner element as a jQuery element
3872
- */
3873
- getElement(): JQuery;
3874
-
3875
- /**
3876
- * hides the container or returns false if hiding it is not possible
3877
- */
3878
- hide(): boolean;
3879
-
3880
- /**
3881
- * shows the container or returns false if showing it is not possible
3882
- */
3883
- show(): boolean;
3884
-
3885
- /**
3886
- * Sets the container to the specified size or returns false if that's not possible
3887
- * @param width the new width in pixel
3888
- * @param height the new height in pixel
3889
- */
3890
- setSize(width: number, height: number): boolean;
3891
-
3892
- /**
3893
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3894
- * @param title the new title
3895
- */
3896
- setTitle(title: string): void;
3897
-
3898
- /**
3899
- * Closes the container or returns false if that is not possible
3900
- */
3901
- close(): boolean;
3902
- }
3903
-
3904
3743
  /**
3905
3744
  * Generated when a Layout Container Component was created.
3906
3745
  * @interface
@@ -3982,218 +3821,6 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3982
3821
  disposition: string;
3983
3822
  };
3984
3823
 
3985
- declare interface ContentItem extends EventEmitter_2 {
3986
- instance: any;
3987
- header: any;
3988
- _splitter: any;
3989
- /**
3990
- * This items configuration in its current state
3991
- */
3992
- config: ItemConfigType;
3993
-
3994
- /**
3995
- * The type of the item. Can be row, column, stack, component or root
3996
- */
3997
- type: ItemType;
3998
-
3999
- /**
4000
- * An array of items that are children of this item
4001
- */
4002
- contentItems: ContentItem[];
4003
-
4004
- container: Container;
4005
- /**
4006
- * The item that is this item's parent (or null if the item is root)
4007
- */
4008
- parent: ContentItem;
4009
-
4010
- /**
4011
- * A String or array of identifiers if provided in the configuration
4012
- */
4013
- id: string;
4014
-
4015
- /**
4016
- * True if the item had been initialised
4017
- */
4018
- isInitialised: boolean;
4019
-
4020
- /**
4021
- * True if the item is maximised
4022
- */
4023
- isMaximised: boolean;
4024
-
4025
- /**
4026
- * True if the item is the layout's root item
4027
- */
4028
- isRoot: boolean;
4029
-
4030
- /**
4031
- * True if the item is a row
4032
- */
4033
- isRow: boolean;
4034
-
4035
- /**
4036
- * True if the item is a column
4037
- */
4038
- isColumn: boolean;
4039
-
4040
- /**
4041
- * True if the item is a stack
4042
- */
4043
- isStack: boolean;
4044
-
4045
- /**
4046
- * True if the item is a component
4047
- */
4048
- isComponent: boolean;
4049
-
4050
- /**
4051
- * A reference to the layoutManager that controls this item
4052
- */
4053
- layoutManager: any;
4054
-
4055
- /**
4056
- * The item's outer element
4057
- */
4058
- element: JQuery;
4059
-
4060
- /**
4061
- * The item's inner element. Can be the same as the outer element.
4062
- */
4063
- childElementContainer: Container;
4064
-
4065
- /**
4066
- * Adds an item as a child to this item. If the item is already a part of a layout it will be removed
4067
- * from its original position before adding it to this item.
4068
- * @param itemOrItemConfig A content item (or tree of content items) or an ItemConfiguration to create the item from
4069
- * @param index last index An optional index that determines at which position the new item should be added. Default: last index.
4070
- */
4071
- addChild(itemOrItemConfig: ContentItem | ItemConfigType, index?: number): void;
4072
-
4073
- /**
4074
- * Destroys the item and all it's children
4075
- * @param contentItem The contentItem that should be removed
4076
- * @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.
4077
- */
4078
- removeChild(contentItem: ContentItem, keepChild?: boolean): void;
4079
-
4080
- /**
4081
- * The contentItem that should be removed
4082
- * @param oldChild ContentItem The contentItem that should be removed
4083
- * @param newChild A content item (or tree of content items) or an ItemConfiguration to create the item from
4084
- */
4085
- replaceChild(oldChild: ContentItem, newChild: ContentItem | ItemConfigType): void;
4086
-
4087
- /**
4088
- * Updates the items size. To actually assign a new size from within a component, use container.setSize( width, height )
4089
- */
4090
- setSize(): void;
4091
-
4092
- /**
4093
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
4094
- * @param title the new title
4095
- */
4096
- setTitle(title: string): void;
4097
-
4098
- /**
4099
- * A powerful, yet admittedly confusing method to recursively call methods on items in a tree. Usually you wouldn't need
4100
- * to use it directly, but it's used internally to setSizes, destroy parts of the item tree etc.
4101
- * @param functionName The name of the method to invoke
4102
- * @param functionArguments An array of arguments to pass to every function
4103
- * @param bottomUp If true, the method is invoked on the lowest parts of the tree first and then bubbles upwards. Default: false
4104
- * @param skipSelf If true, the method will only be invoked on the item's children, but not on the item itself. Default: false
4105
- */
4106
- callDownwards(functionName: string, functionArguments?: any[], bottomUp?: boolean, skipSelf?: boolean): void;
4107
-
4108
- /**
4109
- * 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.
4110
- */
4111
- emitBubblingEvent(name: string): void;
4112
-
4113
- /**
4114
- * Convenience method for item.parent.removeChild( item )
4115
- */
4116
- remove(): void;
4117
-
4118
- /**
4119
- * Removes the item from its current position in the layout and opens it in a window
4120
- */
4121
- popout(): BrowserWindow;
4122
-
4123
- /**
4124
- * Maximises the item or minimises it if it's already maximised
4125
- */
4126
- toggleMaximise(): void;
4127
-
4128
- /**
4129
- * Selects the item. Only relevant if settings.selectionEnabled is set to true
4130
- */
4131
- select(): void;
4132
-
4133
- /**
4134
- * Unselects the item. Only relevant if settings.selectionEnabled is set to true
4135
- */
4136
- deselect(): void;
4137
-
4138
- /**
4139
- * Returns true if the item has the specified id or false if not
4140
- * @param id An id to check for
4141
- */
4142
- hasId(id: string): boolean;
4143
-
4144
- /**
4145
- * Only Stacks have this method! It's the programmatical equivalent of clicking a tab.
4146
- * @param contentItem The new active content item
4147
- * @param preventFocus [OpenFin Custom] Indicates to openfin that the view should not be focused when activated.
4148
- */
4149
- // (CORE-198)[../docs/golden-layout-changelog.md#CORE-198 stack.setActiveView]
4150
- setActiveContentItem(contentItem: ContentItem, preventFocus?: boolean): void;
4151
-
4152
- /**
4153
- * Only Stacks have this method! Returns the currently selected contentItem.
4154
- */
4155
- getActiveContentItem(): ContentItem;
4156
-
4157
- /**
4158
- * Adds an id to an item or does nothing if the id is already present
4159
- * @param id The id to be added
4160
- */
4161
- addId(id: string): void;
4162
-
4163
- /**
4164
- * Removes an id from an item or throws an error if the id couldn't be found
4165
- * @param id The id to be removed
4166
- */
4167
- removeId(id: string): void;
4168
-
4169
- /**
4170
- * Calls filterFunction recursively for every item in the tree. If the function returns true the item is added to the resulting array
4171
- * @param filterFunction A function that determines whether an item matches certain criteria
4172
- */
4173
- getItemsByFilter(filterFunction: (contentItem: ContentItem) => boolean): ContentItem[];
4174
-
4175
- /**
4176
- * Returns all items with the specified id.
4177
- * @param id An id specified in the itemConfig
4178
- */
4179
- getItemsById(id: string | string[]): ContentItem[];
4180
-
4181
- /**
4182
- * Returns all items with the specified type
4183
- * @param type 'row', 'column', 'stack', 'component' or 'root'
4184
- */
4185
- getItemsByType(type: string): ContentItem[];
4186
-
4187
- /**
4188
- * Returns all instances of the component with the specified componentName
4189
- * @param componentName a componentName as specified in the itemConfig
4190
- */
4191
- getComponentsByName(componentName: string): any;
4192
-
4193
- _contentAreaDimensions: any;
4194
- _$getArea: () => any;
4195
- }
4196
-
4197
3824
  /**
4198
3825
  * Restrict navigation to URLs that match an allowed pattern.
4199
3826
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -4632,46 +4259,6 @@ declare type DidFinishLoadEvent = NamedEvent & {
4632
4259
  type: 'did-finish-load';
4633
4260
  };
4634
4261
 
4635
- declare interface Dimensions {
4636
- /**
4637
- * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
4638
- * than the visible one, making it safe to set this to small values without affecting usability.
4639
- * Default: 5
4640
- */
4641
- borderWidth?: number;
4642
-
4643
- /**
4644
- * The minimum height an item can be resized to (in pixel).
4645
- * Default: 10
4646
- */
4647
- minItemHeight?: number;
4648
-
4649
- /**
4650
- * The minimum width an item can be resized to (in pixel).
4651
- * Default: 10
4652
- */
4653
- minItemWidth?: number;
4654
-
4655
- /**
4656
- * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
4657
- * adjusted accordingly.
4658
- * Default: 20
4659
- */
4660
- headerHeight?: number;
4661
-
4662
- /**
4663
- * The width of the element that appears when an item is dragged (in pixel).
4664
- * Default: 300
4665
- */
4666
- dragProxyWidth?: number;
4667
-
4668
- /**
4669
- * The height of the element that appears when an item is dragged (in pixel).
4670
- * Default: 200
4671
- */
4672
- dragProxyHeight?: number;
4673
- }
4674
-
4675
4262
  /**
4676
4263
  * @interface
4677
4264
  */
@@ -4932,8 +4519,6 @@ declare type Dpi = {
4932
4519
  vertical?: number;
4933
4520
  };
4934
4521
 
4935
- declare interface DragSource {}
4936
-
4937
4522
  /**
4938
4523
  * Generated when a window has been embedded.
4939
4524
  * @interface
@@ -5251,43 +4836,6 @@ declare class EventAggregator extends EmitterMap {
5251
4836
  dispatchEvent: (message: Message<any>) => boolean;
5252
4837
  }
5253
4838
 
5254
- declare interface EventEmitter_2 {
5255
- [x: string]: any;
5256
- /**
5257
- * Subscribe to an event
5258
- * @param eventName The name of the event to describe to
5259
- * @param callback The function that should be invoked when the event occurs
5260
- * @param context The value of the this pointer in the callback function
5261
- */
5262
- on(eventName: string, callback: Function, context?: any): void;
5263
-
5264
- /**
5265
- * Notify listeners of an event and pass arguments along
5266
- * @param eventName The name of the event to emit
5267
- */
5268
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5269
-
5270
- /**
5271
- * Alias for emit
5272
- */
5273
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5274
-
5275
- /**
5276
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
5277
- * eventName and callback or just a specific callback with a specific context if invoked with all three
5278
- * arguments.
5279
- * @param eventName The name of the event to unsubscribe from
5280
- * @param callback The function that should be invoked when the event occurs
5281
- * @param context The value of the this pointer in the callback function
5282
- */
5283
- unbind(eventName: string, callback?: Function, context?: any): void;
5284
-
5285
- /**
5286
- * Alias for unbind
5287
- */
5288
- off(eventName: string, callback?: Function, context?: any): void;
5289
- }
5290
-
5291
4839
  /**
5292
4840
  * Handler for an event on an EventEmitter.
5293
4841
  * @remarks Selects the correct type for the event
@@ -6087,319 +5635,72 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
6087
5635
  * .catch(err => {
6088
5636
  * console.log('Error unregistering the hotkey', err);
6089
5637
  * });
6090
- * ```
6091
- */
6092
- unregister(hotkey: string): Promise<void>;
6093
- /**
6094
- * Unregisters all global hotkeys for the current application.
6095
- *
6096
- * @remarks Raises the `unregistered` event for each hotkey unregistered.
6097
- *
6098
- * @example
6099
- * ```js
6100
- * fin.GlobalHotkey.unregisterAll()
6101
- * .then(() => {
6102
- * console.log('Success');
6103
- * })
6104
- * .catch(err => {
6105
- * console.log('Error unregistering all hotkeys for this application', err);
6106
- * });
6107
- * ```
6108
- */
6109
- unregisterAll(): Promise<void>;
6110
- /**
6111
- * Checks if a given hotkey has been registered by an application within the current runtime.
6112
- * @param hotkey a hotkey string
6113
- *
6114
- * @example
6115
- * ```js
6116
- * const hotkey = 'CommandOrControl+X';
6117
- *
6118
- * fin.GlobalHotkey.isRegistered(hotkey)
6119
- * .then((registered) => {
6120
- * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
6121
- * })
6122
- * .catch(err => {
6123
- * console.log('Error unregistering the hotkey', err);
6124
- * });
6125
- * ```
6126
- */
6127
- isRegistered(hotkey: string): Promise<boolean>;
6128
- }
6129
-
6130
- /**
6131
- * @deprecated Renamed to {@link Event}.
6132
- */
6133
- declare type GlobalHotkeyEvent = Event_9;
6134
-
6135
- declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6136
-
6137
- declare namespace GlobalHotkeyEvents {
6138
- export {
6139
- BaseEvent_8 as BaseEvent,
6140
- RegisteredEvent,
6141
- UnregisteredEvent,
6142
- Event_9 as Event,
6143
- GlobalHotkeyEvent,
6144
- EventType_6 as EventType,
6145
- GlobalHotkeyEventType,
6146
- Payload_7 as Payload,
6147
- ByType_6 as ByType
6148
- }
6149
- }
6150
-
6151
- /**
6152
- * @deprecated Renamed to {@link EventType}.
6153
- */
6154
- declare type GlobalHotkeyEventType = EventType_6;
6155
-
6156
- declare namespace GoldenLayout {
6157
- export {
6158
- GoldenLayout_2 as GoldenLayout,
6159
- ItemConfigType,
6160
- Settings,
6161
- Dimensions,
6162
- Labels,
6163
- ItemType,
6164
- ItemConfig,
6165
- ComponentConfig,
6166
- ReactComponentConfig,
6167
- Config,
6168
- ContentItem,
6169
- Container,
6170
- DragSource,
6171
- BrowserWindow,
6172
- Header,
6173
- TabDragListener,
6174
- Tab,
6175
- EventEmitter_2 as EventEmitter
6176
- }
6177
- }
6178
-
6179
- declare class GoldenLayout_2 implements EventEmitter_2 {
6180
- /**
6181
- * The topmost item in the layout item tree. In browser terms: Think of the GoldenLayout instance as window
6182
- * object and of goldenLayout.root as the document.
6183
- */
6184
- root: ContentItem;
6185
-
6186
- /**
6187
- * A reference to the (jQuery) DOM element containing the layout
6188
- */
6189
- container: JQuery;
6190
-
6191
- /**
6192
- * True once the layout item tree has been created and the initialised event has been fired
6193
- */
6194
- isInitialised: boolean;
6195
-
6196
- /**
6197
- * A reference to the current, extended top level config.
6198
- *
6199
- * Don't rely on this object for state saving / serialisation. Use layout.toConfig() instead.
6200
- */
6201
- config: Config;
6202
-
6203
- /**
6204
- * The currently selected item or null if no item is selected. Only relevant if settings.selectionEnabled is set
6205
- * to true.
6206
- */
6207
- selectedItem: ContentItem;
6208
-
6209
- /**
6210
- * The current outer width of the layout in pixels.
6211
- */
6212
- width: number;
6213
-
6214
- /**
6215
- * The current outer height of the layout in pixels.
6216
- */
6217
- height: number;
6218
-
6219
- /**
6220
- * An array of BrowserWindow instances
6221
- */
6222
- openPopouts: BrowserWindow[];
6223
-
6224
- /**
6225
- * True if the layout has been opened as a popout by another layout.
6226
- */
6227
- isSubWindow: boolean;
6228
-
6229
- /**
6230
- * A singleton instance of EventEmitter that works across windows
6231
- */
6232
- eventHub: EventEmitter_2;
6233
-
6234
- _dragProxy: any;
6235
-
6236
- dropTargetIndicator: any;
6237
-
6238
- _isFullPage: boolean;
6239
-
6240
- _onUnload: any;
6241
-
6242
- tabDropPlaceholder: any;
6243
-
6244
- transitionIndicator: any;
6245
-
6246
- _dragSources: any;
6247
-
6248
- _resizeFunction: any;
6249
-
6250
- _unloadFunction: any;
6251
-
6252
- /**
6253
- * @param config A GoldenLayout configuration object
6254
- * @param container The DOM element the layout will be initialised in. Default: document.body
6255
- */
6256
- constructor(configuration: Config, container?: Element | HTMLElement | JQuery);
6257
-
6258
- /*
6259
- * @param name The name of the component, as referred to by componentName in the component configuration.
6260
- * @param component A constructor or factory function. Will be invoked with new and two arguments, a
6261
- * containerobject and a component state
6262
- */
6263
- registerComponent(name: String, component: any): void;
6264
-
6265
- /**
6266
- * Renders the layout into the container. If init() is called before the document is ready it attaches itself as
6267
- * a listener to the document and executes once it becomes ready.
6268
- */
6269
- init(): void;
6270
-
6271
- /**
6272
- * Returns the current state of the layout and its components as a serialisable object.
6273
- */
6274
- toConfig(): Config;
6275
-
6276
- /**
6277
- * Returns a component that was previously registered with layout.registerComponent().
6278
- * @param name The name of a previously registered component
6279
- */
6280
- getComponent(name: string): any;
6281
-
6282
- /**
6283
- * Resizes the layout. If no arguments are provided GoldenLayout measures its container and resizes accordingly.
6284
- * @param width The outer width the layout should be resized to. Default: The container elements width
6285
- * @param height The outer height the layout should be resized to. Default: The container elements height
6286
- */
6287
- updateSize(width?: number, height?: number): void;
6288
-
6289
- /**
6290
- * Destroys the layout. Recursively calls destroy on all components and content items, removes all event
6291
- * listeners and finally removes itself from the DOM.
6292
- */
6293
- destroy(): void;
6294
-
6295
- /**
6296
- * Creates a new content item or tree of content items from configuration. Usually you wouldn't call this
6297
- * directly, but instead use methods like layout.createDragSource(), item.addChild() or item.replaceChild() that
6298
- * all call this method implicitly.
6299
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6300
- * @param parent A parent item
6301
- */
6302
- createContentItem(itemConfiguration?: ItemConfigType, parent?: ContentItem): ContentItem;
6303
-
6304
- /**
6305
- * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
6306
- * @param configOrContentItem The content item or config that will be created in the new window. If a item is
6307
- * provided its config will be read, if config is provided, only the content key
6308
- * will be used
6309
- * @param dimensions A map containing the keys left, top, width and height. Left and top can be negative to
6310
- * place the window in another screen.
6311
- * @param parentId The id of the item within the current layout the child window's content will be appended to
6312
- * when popIn is clicked
6313
- * @param indexInParent The index at which the child window's contents will be appended to. Default: null
6314
- */
6315
- createPopout(
6316
- configOrContentItem: ItemConfigType | ContentItem,
6317
- dimensions: {
6318
- width: number;
6319
- height: number;
6320
- left: number;
6321
- top: number;
6322
- },
6323
- parentId?: string,
6324
- indexInParent?: number
6325
- ): void;
6326
-
6327
- /**
6328
- * Turns a DOM element into a dragSource, meaning that the user can drag the element directly onto the layout
6329
- * where it turns into a contentItem.
6330
- * @param element The DOM element that will be turned into a dragSource
6331
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6332
- * @return the dragSource that was created. This can be used to remove the
6333
- * dragSource from the layout later.
5638
+ * ```
6334
5639
  */
6335
- createDragSource(element: HTMLElement | JQuery, itemConfiguration: ItemConfigType): DragSource;
6336
-
5640
+ unregister(hotkey: string): Promise<void>;
6337
5641
  /**
6338
- * Removes a dragSource from the layout.
5642
+ * Unregisters all global hotkeys for the current application.
6339
5643
  *
6340
- * @param dragSource The dragSource to remove
6341
- */
6342
- removeDragSource(dragSource: DragSource): void;
6343
-
6344
- /**
6345
- * If settings.selectionEnabled is set to true, this allows to select items programmatically.
6346
- * @param contentItem A ContentItem instance
6347
- */
6348
- selectItem(contentItem: ContentItem): void;
6349
-
6350
- /**
6351
- * Static method on the GoldenLayout constructor! This method will iterate through a GoldenLayout config object
6352
- * and replace frequent keys and values with single letter substitutes.
6353
- * @param config A GoldenLayout configuration object
6354
- */
6355
- static minifyConfig(config: any): any;
6356
-
6357
- /**
6358
- * Static method on the GoldenLayout constructor! This method will reverse the minifications of minifyConfig.
6359
- * @param minifiedConfig A minified GoldenLayout configuration object
6360
- */
6361
- static unminifyConfig(minifiedConfig: any): any;
6362
-
6363
- /**
6364
- * Subscribe to an event
6365
- * @param eventName The name of the event to describe to
6366
- * @param callback The function that should be invoked when the event occurs
6367
- * @param context The value of the this pointer in the callback function
6368
- */
6369
- on(eventName: string, callback: Function, context?: any): void;
6370
-
6371
- /**
6372
- * Notify listeners of an event and pass arguments along
6373
- * @param eventName The name of the event to emit
5644
+ * @remarks Raises the `unregistered` event for each hotkey unregistered.
5645
+ *
5646
+ * @example
5647
+ * ```js
5648
+ * fin.GlobalHotkey.unregisterAll()
5649
+ * .then(() => {
5650
+ * console.log('Success');
5651
+ * })
5652
+ * .catch(err => {
5653
+ * console.log('Error unregistering all hotkeys for this application', err);
5654
+ * });
5655
+ * ```
6374
5656
  */
6375
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6376
-
5657
+ unregisterAll(): Promise<void>;
6377
5658
  /**
6378
- * Alias for emit
5659
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5660
+ * @param hotkey a hotkey string
5661
+ *
5662
+ * @example
5663
+ * ```js
5664
+ * const hotkey = 'CommandOrControl+X';
5665
+ *
5666
+ * fin.GlobalHotkey.isRegistered(hotkey)
5667
+ * .then((registered) => {
5668
+ * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
5669
+ * })
5670
+ * .catch(err => {
5671
+ * console.log('Error unregistering the hotkey', err);
5672
+ * });
5673
+ * ```
6379
5674
  */
6380
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5675
+ isRegistered(hotkey: string): Promise<boolean>;
5676
+ }
6381
5677
 
6382
- /**
6383
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
6384
- * eventName and callback or just a specific callback with a specific context if invoked with all three
6385
- * arguments.
6386
- * @param eventName The name of the event to unsubscribe from
6387
- * @param callback The function that should be invoked when the event occurs
6388
- * @param context The value of the this pointer in the callback function
6389
- */
6390
- unbind(eventName: string, callback?: Function, context?: any): void;
5678
+ /**
5679
+ * @deprecated Renamed to {@link Event}.
5680
+ */
5681
+ declare type GlobalHotkeyEvent = Event_9;
6391
5682
 
6392
- /**
6393
- * Alias for unbind
6394
- */
6395
- off(eventName: string, callback?: Function, context?: any): void;
5683
+ declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6396
5684
 
6397
- /**
6398
- * Internal method that create drop areas on the far edges of window, e.g. far-right of window
6399
- */
6400
- _$createRootItemAreas(): void;
5685
+ declare namespace GlobalHotkeyEvents {
5686
+ export {
5687
+ BaseEvent_8 as BaseEvent,
5688
+ RegisteredEvent,
5689
+ UnregisteredEvent,
5690
+ Event_9 as Event,
5691
+ GlobalHotkeyEvent,
5692
+ EventType_6 as EventType,
5693
+ GlobalHotkeyEventType,
5694
+ Payload_7 as Payload,
5695
+ ByType_6 as ByType
5696
+ }
6401
5697
  }
6402
5698
 
5699
+ /**
5700
+ * @deprecated Renamed to {@link EventType}.
5701
+ */
5702
+ declare type GlobalHotkeyEventType = EventType_6;
5703
+
6403
5704
  /**
6404
5705
  * @interface
6405
5706
  */
@@ -6407,64 +5708,15 @@ declare type GpuInfo = {
6407
5708
  name: string;
6408
5709
  };
6409
5710
 
6410
- declare interface Header {
6411
- /**
6412
- * A reference to the LayoutManager instance
6413
- */
6414
- layoutManager: GoldenLayout_2;
6415
-
6416
- /**
6417
- * A reference to the Stack this Header belongs to
6418
- */
6419
- parent: ContentItem;
6420
-
6421
- /**
6422
- * An array of the Tabs within this header
6423
- */
6424
- tabs: Tab[];
6425
-
6426
- /**
6427
- * The currently selected activeContentItem
6428
- */
6429
- activeContentItem: ContentItem;
6430
-
6431
- /**
6432
- * The outer (jQuery) DOM element of this Header
6433
- */
6434
- element: JQuery;
6435
-
6436
- /**
6437
- * The (jQuery) DOM element containing the tabs
6438
- */
6439
- tabsContainer: JQuery;
6440
-
6441
- /**
6442
- * The (jQuery) DOM element containing the close, maximise and popout button
6443
- */
6444
- controlsContainer: JQuery;
6445
-
6446
- /**
6447
- * Hides the currently selected contentItem, shows the specified one and highlights its tab.
6448
- * @param contentItem The content item that will be selected
6449
- */
6450
- setActiveContentItem(contentItem: ContentItem): void;
6451
-
6452
- /**
6453
- * Creates a new tab and associates it with a content item
6454
- * @param contentItem The content item the tab will be associated with
6455
- * @param index A zero based index, specifying the position of the new tab
6456
- */
6457
- createTab(contentItem: ContentItem, index?: number): void;
6458
-
6459
- /**
6460
- * Finds a tab by its contentItem and removes it
6461
- * @param contentItem The content item the tab is associated with
6462
- */
6463
- removeTab(contentItem: ContentItem): void;
6464
- }
6465
-
6466
5711
  /**
6467
5712
  * Generated when a View is hidden.
5713
+ *
5714
+ * @remarks
5715
+ * An OpenFin View's `hidden` event is only emitted when a specific View API is called.
5716
+ * This event can fire when calling:
5717
+ *
5718
+ * * `view.hide()` - If a View is previously shown, a `hidden` event will be fired.
5719
+ *
6468
5720
  * @interface
6469
5721
  */
6470
5722
  declare type HiddenEvent = BaseEvent_4 & {
@@ -8075,50 +7327,6 @@ declare class InteropModule extends Base {
8075
7327
  connectSync(name: string, interopConfig?: OpenFin_2.InteropConfig): InteropClient;
8076
7328
  }
8077
7329
 
8078
- declare interface ItemConfig {
8079
- /**
8080
- * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
8081
- */
8082
- type: ItemType;
8083
-
8084
- /**
8085
- * An array of configurations for items that will be created as children of this item.
8086
- */
8087
- content?: ItemConfigType[];
8088
-
8089
- /**
8090
- * The width of this item, relative to the other children of its parent in percent
8091
- */
8092
- width?: number;
8093
-
8094
- /**
8095
- * The height of this item, relative to the other children of its parent in percent
8096
- */
8097
- height?: number;
8098
-
8099
- /**
8100
- * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
8101
- */
8102
- id?: string | string[];
8103
-
8104
- /**
8105
- * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
8106
- * will return false
8107
- * Default: true
8108
- */
8109
- isClosable?: boolean;
8110
-
8111
- /**
8112
- * The title of the item as displayed on its tab and on popout windows
8113
- * Default: componentName or ''
8114
- */
8115
- title?: string;
8116
- }
8117
-
8118
- declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
8119
-
8120
- declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
8121
-
8122
7330
  /**
8123
7331
  * @interface
8124
7332
  */
@@ -8176,32 +7384,6 @@ declare type JumpListTask = {
8176
7384
  iconIndex?: number;
8177
7385
  };
8178
7386
 
8179
- declare interface Labels {
8180
- /**
8181
- * The tooltip text that appears when hovering over the close icon.
8182
- * Default: 'close'
8183
- */
8184
- close?: string;
8185
-
8186
- /**
8187
- * The tooltip text that appears when hovering over the maximise icon.
8188
- * Default: 'maximise'
8189
- */
8190
- maximise?: string;
8191
-
8192
- /**
8193
- * The tooltip text that appears when hovering over the minimise icon.
8194
- * Default: 'minimise'
8195
- */
8196
- minimise?: string;
8197
-
8198
- /**
8199
- * The tooltip text that appears when hovering over the popout icon.
8200
- * Default: 'open in new window'
8201
- */
8202
- popout?: string;
8203
- }
8204
-
8205
7387
  /**
8206
7388
  * The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
8207
7389
  *
@@ -8659,7 +7841,7 @@ declare type LayoutEntityDefinition<TLayoutEntityType extends LayoutEntityTypes
8659
7841
  entityId: string;
8660
7842
  };
8661
7843
 
8662
- declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'root'>;
7844
+ declare type LayoutEntityTypes = 'column' | 'row' | 'stack';
8663
7845
 
8664
7846
  /**
8665
7847
  * @interface
@@ -12866,18 +12048,6 @@ declare type QueryPermissionResult = {
12866
12048
  rawValue?: unknown;
12867
12049
  };
12868
12050
 
12869
- declare interface ReactComponentConfig extends ItemConfig {
12870
- /**
12871
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
12872
- */
12873
- component: string;
12874
-
12875
- /**
12876
- * Properties that will be passed to the component and accessible using this.props.
12877
- */
12878
- props?: any;
12879
- }
12880
-
12881
12051
  /**
12882
12052
  * @interface
12883
12053
  */
@@ -13354,97 +12524,6 @@ declare type SessionContextGroup = {
13354
12524
  }>;
13355
12525
  };
13356
12526
 
13357
- declare interface Settings {
13358
- preventSplitterResize?: boolean;
13359
-
13360
- newTabButton?: {
13361
- url?: string;
13362
- };
13363
-
13364
- /**
13365
- * If true, tabs can't be dragged into the window.
13366
- * Default: false
13367
- */
13368
- preventDragIn?: boolean;
13369
-
13370
- /**
13371
- * If true, tabs can't be dragged out of the window.
13372
- * Default: false
13373
- */
13374
- preventDragOut?: boolean;
13375
-
13376
- /**
13377
- * If true, stack headers are the only areas where tabs can be dropped.
13378
- * Default: false
13379
- */
13380
- constrainDragToHeaders?: boolean;
13381
- /**
13382
- * Turns headers on or off. If false, the layout will be displayed with splitters only.
13383
- * Default: true
13384
- */
13385
- hasHeaders?: boolean;
13386
-
13387
- /**
13388
- * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
13389
- * automatically when layout.createDragSource() is called.
13390
- * Default: true
13391
- */
13392
- constrainDragToContainer?: boolean;
13393
-
13394
- /**
13395
- * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
13396
- * Default: true
13397
- */
13398
- reorderEnabled?: boolean;
13399
-
13400
- /**
13401
- * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
13402
- * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
13403
- * Default: false
13404
- */
13405
- selectionEnabled?: boolean;
13406
-
13407
- /**
13408
- * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
13409
- * be transferred to the new window, if false only the active component will be opened.
13410
- * Default: false
13411
- */
13412
- popoutWholeStack?: boolean;
13413
-
13414
- /**
13415
- * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
13416
- * If false, the popout call will fail silently.
13417
- * Default: true
13418
- */
13419
- blockedPopoutsThrowError?: boolean;
13420
-
13421
- /**
13422
- * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
13423
- * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
13424
- * addition, any changes made to popouts won't be stored after the parent is closed.
13425
- * Default: true
13426
- */
13427
- closePopoutsOnUnload?: boolean;
13428
-
13429
- /**
13430
- * Specifies if the popout icon should be displayed in the header-bar.
13431
- * Default: true
13432
- */
13433
- showPopoutIcon?: boolean;
13434
-
13435
- /**
13436
- * Specifies if the maximise icon should be displayed in the header-bar.
13437
- * Default: true
13438
- */
13439
- showMaximiseIcon?: boolean;
13440
-
13441
- /**
13442
- * Specifies if the close icon should be displayed in the header-bar.
13443
- * Default: true
13444
- */
13445
- showCloseIcon?: boolean;
13446
- }
13447
-
13448
12527
  /**
13449
12528
  * @interface
13450
12529
  */
@@ -13546,7 +12625,18 @@ declare type ShowAllDownloadsEvent = BaseEvent_5 & {
13546
12625
  };
13547
12626
 
13548
12627
  /**
13549
- * Generated when a View is shown. This event will fire during creation of a View.
12628
+ * Generated when a View is shown.
12629
+ *
12630
+ * @remarks
12631
+ * An OpenFin View's `shown` event is only emitted when specific View APIs are called.
12632
+ * This event can fire when calling:
12633
+ *
12634
+ * * `view.show()` or `view.showAt()` - If a View is previously hidden, a `shown` event will be fired.
12635
+ *
12636
+ * * `view.attach()` - If a View is hidden and attached to a new Window, it will be shown and the `shown` event will be fired.
12637
+ *
12638
+ * * `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.)
12639
+ *
13550
12640
  * @interface
13551
12641
  */
13552
12642
  declare type ShownEvent = BaseEvent_4 & {
@@ -15352,52 +14442,6 @@ declare type SystemShutdownHandler = (shutdownEvent: {
15352
14442
  proceed: () => void;
15353
14443
  }) => void;
15354
14444
 
15355
- declare interface Tab {
15356
- _dragListener: TabDragListener;
15357
-
15358
- /**
15359
- * True if this tab is the selected tab
15360
- */
15361
- isActive: boolean;
15362
-
15363
- /**
15364
- * A reference to the header this tab is a child of
15365
- */
15366
- header: Header;
15367
-
15368
- /**
15369
- * A reference to the content item this tab relates to
15370
- */
15371
- contentItem: ContentItem;
15372
-
15373
- /**
15374
- * The tabs outer (jQuery) DOM element
15375
- */
15376
- element: JQuery;
15377
-
15378
- /**
15379
- * The (jQuery) DOM element containing the title
15380
- */
15381
- titleElement: JQuery;
15382
-
15383
- /**
15384
- * The (jQuery) DOM element that closes the tab
15385
- */
15386
- closeElement: JQuery;
15387
-
15388
- /**
15389
- * Sets the tab's title. Does not affect the contentItem's title!
15390
- * @param title The new title
15391
- */
15392
- setTitle(title: string): void;
15393
-
15394
- /**
15395
- * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
15396
- * @param isActive Whether the tab is active
15397
- */
15398
- setActive(isActive: boolean): void;
15399
- }
15400
-
15401
14445
  /**
15402
14446
  * Generated when a Layout Tab Component was closed.
15403
14447
  * @interface
@@ -15415,13 +14459,6 @@ declare type TabCreatedEvent = LayoutDOMEvent & {
15415
14459
  type: 'tab-created';
15416
14460
  };
15417
14461
 
15418
- declare interface TabDragListener extends EventEmitter_2 {
15419
- /**
15420
- * A reference to the content item this tab relates to
15421
- */
15422
- contentItem: ContentItem;
15423
- }
15424
-
15425
14462
  /**
15426
14463
  * Generated when a Layout Tab Component was dropped.
15427
14464
  * @interface
@@ -15830,117 +14867,11 @@ declare type UserMovementEnabledEvent = BaseEvent_5 & {
15830
14867
  type: 'user-movement-enabled';
15831
14868
  };
15832
14869
 
15833
- declare namespace v1_2 {
15834
- {
15835
- AppIntent,
15836
- AppMetadata,
15837
- DisplayMetadata,
15838
- OpenError,
15839
- ResolveError,
15840
- ChannelError,
15841
- ImplementationMetadata,
15842
- IntentMetadata,
15843
- Listener,
15844
- ContextTypes,
15845
- ContextType,
15846
- Context,
15847
- ContactList,
15848
- Contact,
15849
- ContactID,
15850
- InstrumentList,
15851
- Instrument,
15852
- InstrumentID,
15853
- Country,
15854
- CountryID,
15855
- Organization,
15856
- OrganizationID,
15857
- Portfolio,
15858
- Position,
15859
- Convert,
15860
- Intents,
15861
- Channel,
15862
- DesktopAgent,
15863
- IntentResolution,
15864
- TargetApp,
15865
- ContextHandler
15866
- }
15867
- }
15868
-
15869
- declare namespace v2_0 {
15870
- {
15871
- AppIdentifier,
15872
- AppIntent_2 as AppIntent,
15873
- AppMetadata_2 as AppMetadata,
15874
- ContextMetadata,
15875
- DisplayMetadata_2 as DisplayMetadata,
15876
- OpenError_2 as OpenError,
15877
- ResolveError_2 as ResolveError,
15878
- ResultError,
15879
- ChannelError_2 as ChannelError,
15880
- Icon,
15881
- Image_2 as Image,
15882
- ImplementationMetadata_2 as ImplementationMetadata,
15883
- IntentMetadata_2 as IntentMetadata,
15884
- Listener_2 as Listener,
15885
- ContextTypes_2 as ContextTypes,
15886
- ContextType_2 as ContextType,
15887
- Chart,
15888
- InstrumentElement,
15889
- PurpleID,
15890
- PurpleMarket,
15891
- TimeRangeObject,
15892
- Style,
15893
- ChatInitSettings,
15894
- ContactListObject,
15895
- ContactElement,
15896
- FluffyID,
15897
- Contact_2 as Contact,
15898
- TentacledID,
15899
- ContactList_2 as ContactList,
15900
- Context_2 as Context,
15901
- Country_2 as Country,
15902
- CountryID_2 as CountryID,
15903
- Currency,
15904
- CurrencyID,
15905
- Email,
15906
- RecipientsObject,
15907
- RecipientsID,
15908
- Instrument_2 as Instrument,
15909
- StickyID,
15910
- FluffyMarket,
15911
- InstrumentList_2 as InstrumentList,
15912
- Nothing,
15913
- Organization_2 as Organization,
15914
- OrganizationID_2 as OrganizationID,
15915
- Portfolio_2 as Portfolio,
15916
- PositionElement,
15917
- Position_2 as Position,
15918
- TimeRange,
15919
- Valuation,
15920
- Convert_2 as Convert,
15921
- Intents_2 as Intents,
15922
- Channel_2 as Channel,
15923
- DesktopAgent_2 as DesktopAgent,
15924
- IntentResolution_2 as IntentResolution,
15925
- PrivateChannel,
15926
- ContextHandler_2 as ContextHandler,
15927
- IntentResult,
15928
- IntentHandler
15929
- }
15930
- }
15931
-
15932
14870
  declare type VerboseWebPermission = {
15933
14871
  api: string;
15934
14872
  enabled: boolean;
15935
14873
  };
15936
14874
 
15937
- declare type Version = (typeof versions)[keyof typeof versions];
15938
-
15939
- declare const versions: {
15940
- readonly v1_2: "1.2";
15941
- readonly v2_0: "2.0";
15942
- };
15943
-
15944
14875
  declare type View = OpenFin_2.View;
15945
14876
 
15946
14877
  /**