@openfin/core 37.81.20 → 37.81.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.
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.
@@ -1167,9 +1170,14 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1167
1170
  */
1168
1171
  mainWindowOptions: WindowCreationOptions;
1169
1172
  /**
1170
- * The name of the application (and the application's main window).
1173
+ * The name of the application.
1171
1174
  *
1172
- * If provided, _must_ match `uuid`.
1175
+ * @remarks
1176
+ * This property is only used for naming the application logging folder, which will be sanitized to remove
1177
+ * any special characters, spaces or international characters. Otherwise it's not used and it will be overwritten
1178
+ * during startup with the UUID of the application.
1179
+ *
1180
+ * This property will be deprecated in the future.
1173
1181
  */
1174
1182
  name: string;
1175
1183
  /**
@@ -1199,9 +1207,7 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1199
1207
  url: string;
1200
1208
  /**
1201
1209
  * The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
1202
- * running in the OpenFin Runtime.
1203
- *
1204
- * Note that `name` and `uuid` must match.
1210
+ * running in the OpenFin Runtime.
1205
1211
  */
1206
1212
  uuid: string;
1207
1213
  /**
@@ -1936,48 +1942,6 @@ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1936
1942
  behavior: 'browser';
1937
1943
  };
1938
1944
 
1939
- declare interface BrowserWindow {
1940
- /**
1941
- * True if the window has been opened and its GoldenLayout instance initialised.
1942
- */
1943
- isInitialised: boolean;
1944
-
1945
- /**
1946
- * Creates a window configuration object from the Popout.
1947
- */
1948
- toConfig(): {
1949
- dimensions: {
1950
- width: number;
1951
- height: number;
1952
- left: number;
1953
- top: number;
1954
- };
1955
- content: Config;
1956
- parentId: string;
1957
- indexInParent: number;
1958
- };
1959
-
1960
- /**
1961
- * Returns the GoldenLayout instance from the child window
1962
- */
1963
- getGlInstance(): GoldenLayout_2;
1964
-
1965
- /**
1966
- * Returns the native Window object
1967
- */
1968
- getWindow(): Window;
1969
-
1970
- /**
1971
- * Closes the popout
1972
- */
1973
- close(): void;
1974
-
1975
- /**
1976
- * Returns the popout to its original position as specified in parentId and indexInParent
1977
- */
1978
- popIn(): void;
1979
- }
1980
-
1981
1945
  /**
1982
1946
  * Extracts a single event type matching the given key from the View {@link Event} union.
1983
1947
  *
@@ -3376,31 +3340,6 @@ declare class ColumnOrRow extends LayoutNode {
3376
3340
  getContent: () => Promise<(ColumnOrRow | TabStack)[]>;
3377
3341
  }
3378
3342
 
3379
- declare interface ComponentConfig extends ItemConfig {
3380
- /**
3381
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
3382
- */
3383
- componentName: string;
3384
-
3385
- /**
3386
- * A serialisable object. Will be passed to the component constructor function and will be the value returned by
3387
- * container.getState().
3388
- */
3389
- componentState?: any;
3390
- }
3391
-
3392
- declare interface Config {
3393
- settings?: Settings;
3394
- dimensions?: Dimensions;
3395
- labels?: Labels;
3396
- content?: ItemConfigType[];
3397
- /**
3398
- * (Only on layout config object)
3399
- * Id of the currently maximised content item
3400
- */
3401
- maximisedItemId?: string;
3402
- }
3403
-
3404
3343
  declare type ConfigWithRuntime = BaseConfig & {
3405
3344
  runtime: RuntimeConfig;
3406
3345
  };
@@ -3778,103 +3717,6 @@ declare type ConstWindowOptions = {
3778
3717
  inheritance?: Partial<InheritableOptions>;
3779
3718
  };
3780
3719
 
3781
- declare interface Container extends EventEmitter_2 {
3782
- /**
3783
- * The current width of the container in pixel
3784
- */
3785
- width: number;
3786
-
3787
- /**
3788
- * The current height of the container in pixel
3789
- */
3790
- height: number;
3791
-
3792
- /**
3793
- * A reference to the component-item that controls this container
3794
- */
3795
- parent: ContentItem;
3796
-
3797
- /**
3798
- * A reference to the tab that controls this container. Will initially be null
3799
- * (and populated once a tab event has been fired).
3800
- */
3801
- tab: Tab;
3802
-
3803
- /**
3804
- * The current title of the container
3805
- */
3806
- title: string;
3807
-
3808
- /*
3809
- * A reference to the GoldenLayout instance this container belongs to
3810
- */
3811
- layoutManager: GoldenLayout_2;
3812
-
3813
- /**
3814
- * True if the item is currently hidden
3815
- */
3816
- isHidden: boolean;
3817
-
3818
- /**
3819
- * Overwrites the components state with the provided value. To only change parts of the componentState see
3820
- * extendState below. This is the main mechanism for saving the state of a component. This state will be the
3821
- * value of componentState when layout.toConfig() is called and will be passed back to the component's
3822
- * constructor function. It will also be used when the component is opened in a new window.
3823
- * @param state A serialisable object
3824
- */
3825
- setState(state: any): void;
3826
-
3827
- /**
3828
- * The same as setState but does not emit 'stateChanged' event
3829
- * @param {serialisable} state
3830
- */
3831
- setStateSkipEvent(state: any): void;
3832
-
3833
- /**
3834
- * This is similar to setState, but merges the provided state into the current one, rather than overwriting it.
3835
- * @param state A serialisable object
3836
- */
3837
- extendState(state: any): void;
3838
-
3839
- /**
3840
- * Returns the current state.
3841
- */
3842
- getState(): any;
3843
-
3844
- /**
3845
- * Returns the container's inner element as a jQuery element
3846
- */
3847
- getElement(): JQuery;
3848
-
3849
- /**
3850
- * hides the container or returns false if hiding it is not possible
3851
- */
3852
- hide(): boolean;
3853
-
3854
- /**
3855
- * shows the container or returns false if showing it is not possible
3856
- */
3857
- show(): boolean;
3858
-
3859
- /**
3860
- * Sets the container to the specified size or returns false if that's not possible
3861
- * @param width the new width in pixel
3862
- * @param height the new height in pixel
3863
- */
3864
- setSize(width: number, height: number): boolean;
3865
-
3866
- /**
3867
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3868
- * @param title the new title
3869
- */
3870
- setTitle(title: string): void;
3871
-
3872
- /**
3873
- * Closes the container or returns false if that is not possible
3874
- */
3875
- close(): boolean;
3876
- }
3877
-
3878
3720
  /**
3879
3721
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3880
3722
  */
@@ -3948,218 +3790,6 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3948
3790
  disposition: string;
3949
3791
  };
3950
3792
 
3951
- declare interface ContentItem extends EventEmitter_2 {
3952
- instance: any;
3953
- header: any;
3954
- _splitter: any;
3955
- /**
3956
- * This items configuration in its current state
3957
- */
3958
- config: ItemConfigType;
3959
-
3960
- /**
3961
- * The type of the item. Can be row, column, stack, component or root
3962
- */
3963
- type: ItemType;
3964
-
3965
- /**
3966
- * An array of items that are children of this item
3967
- */
3968
- contentItems: ContentItem[];
3969
-
3970
- container: Container;
3971
- /**
3972
- * The item that is this item's parent (or null if the item is root)
3973
- */
3974
- parent: ContentItem;
3975
-
3976
- /**
3977
- * A String or array of identifiers if provided in the configuration
3978
- */
3979
- id: string;
3980
-
3981
- /**
3982
- * True if the item had been initialised
3983
- */
3984
- isInitialised: boolean;
3985
-
3986
- /**
3987
- * True if the item is maximised
3988
- */
3989
- isMaximised: boolean;
3990
-
3991
- /**
3992
- * True if the item is the layout's root item
3993
- */
3994
- isRoot: boolean;
3995
-
3996
- /**
3997
- * True if the item is a row
3998
- */
3999
- isRow: boolean;
4000
-
4001
- /**
4002
- * True if the item is a column
4003
- */
4004
- isColumn: boolean;
4005
-
4006
- /**
4007
- * True if the item is a stack
4008
- */
4009
- isStack: boolean;
4010
-
4011
- /**
4012
- * True if the item is a component
4013
- */
4014
- isComponent: boolean;
4015
-
4016
- /**
4017
- * A reference to the layoutManager that controls this item
4018
- */
4019
- layoutManager: any;
4020
-
4021
- /**
4022
- * The item's outer element
4023
- */
4024
- element: JQuery;
4025
-
4026
- /**
4027
- * The item's inner element. Can be the same as the outer element.
4028
- */
4029
- childElementContainer: Container;
4030
-
4031
- /**
4032
- * Adds an item as a child to this item. If the item is already a part of a layout it will be removed
4033
- * from its original position before adding it to this item.
4034
- * @param itemOrItemConfig A content item (or tree of content items) or an ItemConfiguration to create the item from
4035
- * @param index last index An optional index that determines at which position the new item should be added. Default: last index.
4036
- */
4037
- addChild(itemOrItemConfig: ContentItem | ItemConfigType, index?: number): void;
4038
-
4039
- /**
4040
- * Destroys the item and all it's children
4041
- * @param contentItem The contentItem that should be removed
4042
- * @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.
4043
- */
4044
- removeChild(contentItem: ContentItem, keepChild?: boolean): void;
4045
-
4046
- /**
4047
- * The contentItem that should be removed
4048
- * @param oldChild ContentItem The contentItem that should be removed
4049
- * @param newChild A content item (or tree of content items) or an ItemConfiguration to create the item from
4050
- */
4051
- replaceChild(oldChild: ContentItem, newChild: ContentItem | ItemConfigType): void;
4052
-
4053
- /**
4054
- * Updates the items size. To actually assign a new size from within a component, use container.setSize( width, height )
4055
- */
4056
- setSize(): void;
4057
-
4058
- /**
4059
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
4060
- * @param title the new title
4061
- */
4062
- setTitle(title: string): void;
4063
-
4064
- /**
4065
- * A powerful, yet admittedly confusing method to recursively call methods on items in a tree. Usually you wouldn't need
4066
- * to use it directly, but it's used internally to setSizes, destroy parts of the item tree etc.
4067
- * @param functionName The name of the method to invoke
4068
- * @param functionArguments An array of arguments to pass to every function
4069
- * @param bottomUp If true, the method is invoked on the lowest parts of the tree first and then bubbles upwards. Default: false
4070
- * @param skipSelf If true, the method will only be invoked on the item's children, but not on the item itself. Default: false
4071
- */
4072
- callDownwards(functionName: string, functionArguments?: any[], bottomUp?: boolean, skipSelf?: boolean): void;
4073
-
4074
- /**
4075
- * 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.
4076
- */
4077
- emitBubblingEvent(name: string): void;
4078
-
4079
- /**
4080
- * Convenience method for item.parent.removeChild( item )
4081
- */
4082
- remove(): void;
4083
-
4084
- /**
4085
- * Removes the item from its current position in the layout and opens it in a window
4086
- */
4087
- popout(): BrowserWindow;
4088
-
4089
- /**
4090
- * Maximises the item or minimises it if it's already maximised
4091
- */
4092
- toggleMaximise(): void;
4093
-
4094
- /**
4095
- * Selects the item. Only relevant if settings.selectionEnabled is set to true
4096
- */
4097
- select(): void;
4098
-
4099
- /**
4100
- * Unselects the item. Only relevant if settings.selectionEnabled is set to true
4101
- */
4102
- deselect(): void;
4103
-
4104
- /**
4105
- * Returns true if the item has the specified id or false if not
4106
- * @param id An id to check for
4107
- */
4108
- hasId(id: string): boolean;
4109
-
4110
- /**
4111
- * Only Stacks have this method! It's the programmatical equivalent of clicking a tab.
4112
- * @param contentItem The new active content item
4113
- * @param preventFocus [OpenFin Custom] Indicates to openfin that the view should not be focused when activated.
4114
- */
4115
- // (CORE-198)[../docs/golden-layout-changelog.md#CORE-198 stack.setActiveView]
4116
- setActiveContentItem(contentItem: ContentItem, preventFocus?: boolean): void;
4117
-
4118
- /**
4119
- * Only Stacks have this method! Returns the currently selected contentItem.
4120
- */
4121
- getActiveContentItem(): ContentItem;
4122
-
4123
- /**
4124
- * Adds an id to an item or does nothing if the id is already present
4125
- * @param id The id to be added
4126
- */
4127
- addId(id: string): void;
4128
-
4129
- /**
4130
- * Removes an id from an item or throws an error if the id couldn't be found
4131
- * @param id The id to be removed
4132
- */
4133
- removeId(id: string): void;
4134
-
4135
- /**
4136
- * Calls filterFunction recursively for every item in the tree. If the function returns true the item is added to the resulting array
4137
- * @param filterFunction A function that determines whether an item matches certain criteria
4138
- */
4139
- getItemsByFilter(filterFunction: (contentItem: ContentItem) => boolean): ContentItem[];
4140
-
4141
- /**
4142
- * Returns all items with the specified id.
4143
- * @param id An id specified in the itemConfig
4144
- */
4145
- getItemsById(id: string | string[]): ContentItem[];
4146
-
4147
- /**
4148
- * Returns all items with the specified type
4149
- * @param type 'row', 'column', 'stack', 'component' or 'root'
4150
- */
4151
- getItemsByType(type: string): ContentItem[];
4152
-
4153
- /**
4154
- * Returns all instances of the component with the specified componentName
4155
- * @param componentName a componentName as specified in the itemConfig
4156
- */
4157
- getComponentsByName(componentName: string): any;
4158
-
4159
- _contentAreaDimensions: any;
4160
- _$getArea: () => any;
4161
- }
4162
-
4163
3793
  /**
4164
3794
  * Restrict navigation to URLs that match an allowed pattern.
4165
3795
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -4587,46 +4217,6 @@ declare type DidFinishLoadEvent = NamedEvent & {
4587
4217
  type: 'did-finish-load';
4588
4218
  };
4589
4219
 
4590
- declare interface Dimensions {
4591
- /**
4592
- * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
4593
- * than the visible one, making it safe to set this to small values without affecting usability.
4594
- * Default: 5
4595
- */
4596
- borderWidth?: number;
4597
-
4598
- /**
4599
- * The minimum height an item can be resized to (in pixel).
4600
- * Default: 10
4601
- */
4602
- minItemHeight?: number;
4603
-
4604
- /**
4605
- * The minimum width an item can be resized to (in pixel).
4606
- * Default: 10
4607
- */
4608
- minItemWidth?: number;
4609
-
4610
- /**
4611
- * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
4612
- * adjusted accordingly.
4613
- * Default: 20
4614
- */
4615
- headerHeight?: number;
4616
-
4617
- /**
4618
- * The width of the element that appears when an item is dragged (in pixel).
4619
- * Default: 300
4620
- */
4621
- dragProxyWidth?: number;
4622
-
4623
- /**
4624
- * The height of the element that appears when an item is dragged (in pixel).
4625
- * Default: 200
4626
- */
4627
- dragProxyHeight?: number;
4628
- }
4629
-
4630
4220
  /**
4631
4221
  * @interface
4632
4222
  */
@@ -4876,8 +4466,6 @@ declare type Dpi = {
4876
4466
  vertical?: number;
4877
4467
  };
4878
4468
 
4879
- declare interface DragSource {}
4880
-
4881
4469
  /**
4882
4470
  * Generated when a window has been embedded.
4883
4471
  * @interface
@@ -5188,43 +4776,6 @@ declare class EventAggregator extends EmitterMap {
5188
4776
  dispatchEvent: (message: Message<any>) => boolean;
5189
4777
  }
5190
4778
 
5191
- declare interface EventEmitter_2 {
5192
- [x: string]: any;
5193
- /**
5194
- * Subscribe to an event
5195
- * @param eventName The name of the event to describe to
5196
- * @param callback The function that should be invoked when the event occurs
5197
- * @param context The value of the this pointer in the callback function
5198
- */
5199
- on(eventName: string, callback: Function, context?: any): void;
5200
-
5201
- /**
5202
- * Notify listeners of an event and pass arguments along
5203
- * @param eventName The name of the event to emit
5204
- */
5205
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5206
-
5207
- /**
5208
- * Alias for emit
5209
- */
5210
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5211
-
5212
- /**
5213
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
5214
- * eventName and callback or just a specific callback with a specific context if invoked with all three
5215
- * arguments.
5216
- * @param eventName The name of the event to unsubscribe from
5217
- * @param callback The function that should be invoked when the event occurs
5218
- * @param context The value of the this pointer in the callback function
5219
- */
5220
- unbind(eventName: string, callback?: Function, context?: any): void;
5221
-
5222
- /**
5223
- * Alias for unbind
5224
- */
5225
- off(eventName: string, callback?: Function, context?: any): void;
5226
- }
5227
-
5228
4779
  /**
5229
4780
  * Handler for an event on an EventEmitter.
5230
4781
  * @remarks Selects the correct type for the event
@@ -5994,344 +5545,97 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5994
5545
  * })
5995
5546
  * .then(() => {
5996
5547
  * console.log('Success');
5997
- * })
5998
- * .catch(err => {
5999
- * console.log('Error registering the hotkey', err);
6000
- * });
6001
- * ```
6002
- */
6003
- register(hotkey: string, listener: (...args: any[]) => void): Promise<void>;
6004
- /**
6005
- * Unregisters a global hotkey with the operating system.
6006
- * @param hotkey a hotkey string
6007
- *
6008
- * @remarks This method will unregister all existing registrations of the hotkey within the application.
6009
- * Raises the `unregistered` event.
6010
- *
6011
- * @example
6012
- * ```js
6013
- * const hotkey = 'CommandOrControl+X';
6014
- *
6015
- * fin.GlobalHotkey.unregister(hotkey)
6016
- * .then(() => {
6017
- * console.log('Success');
6018
- * })
6019
- * .catch(err => {
6020
- * console.log('Error unregistering the hotkey', err);
6021
- * });
6022
- * ```
6023
- */
6024
- unregister(hotkey: string): Promise<void>;
6025
- /**
6026
- * Unregisters all global hotkeys for the current application.
6027
- *
6028
- * @remarks Raises the `unregistered` event for each hotkey unregistered.
6029
- *
6030
- * @example
6031
- * ```js
6032
- * fin.GlobalHotkey.unregisterAll()
6033
- * .then(() => {
6034
- * console.log('Success');
6035
- * })
6036
- * .catch(err => {
6037
- * console.log('Error unregistering all hotkeys for this application', err);
6038
- * });
6039
- * ```
6040
- */
6041
- unregisterAll(): Promise<void>;
6042
- /**
6043
- * Checks if a given hotkey has been registered by an application within the current runtime.
6044
- * @param hotkey a hotkey string
6045
- *
6046
- * @example
6047
- * ```js
6048
- * const hotkey = 'CommandOrControl+X';
6049
- *
6050
- * fin.GlobalHotkey.isRegistered(hotkey)
6051
- * .then((registered) => {
6052
- * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
6053
- * })
6054
- * .catch(err => {
6055
- * console.log('Error unregistering the hotkey', err);
6056
- * });
6057
- * ```
6058
- */
6059
- isRegistered(hotkey: string): Promise<boolean>;
6060
- }
6061
-
6062
- /**
6063
- * @deprecated Renamed to {@link Event}.
6064
- */
6065
- declare type GlobalHotkeyEvent = Event_9;
6066
-
6067
- declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6068
-
6069
- declare namespace GlobalHotkeyEvents {
6070
- export {
6071
- BaseEvent_8 as BaseEvent,
6072
- RegisteredEvent,
6073
- UnregisteredEvent,
6074
- Event_9 as Event,
6075
- GlobalHotkeyEvent,
6076
- EventType_6 as EventType,
6077
- GlobalHotkeyEventType,
6078
- Payload_7 as Payload,
6079
- ByType_6 as ByType
6080
- }
6081
- }
6082
-
6083
- /**
6084
- * @deprecated Renamed to {@link EventType}.
6085
- */
6086
- declare type GlobalHotkeyEventType = EventType_6;
6087
-
6088
- declare namespace GoldenLayout {
6089
- export {
6090
- GoldenLayout_2 as GoldenLayout,
6091
- ItemConfigType,
6092
- Settings,
6093
- Dimensions,
6094
- Labels,
6095
- ItemType,
6096
- ItemConfig,
6097
- ComponentConfig,
6098
- ReactComponentConfig,
6099
- Config,
6100
- ContentItem,
6101
- Container,
6102
- DragSource,
6103
- BrowserWindow,
6104
- Header,
6105
- TabDragListener,
6106
- Tab,
6107
- EventEmitter_2 as EventEmitter
6108
- }
6109
- }
6110
-
6111
- declare class GoldenLayout_2 implements EventEmitter_2 {
6112
- /**
6113
- * The topmost item in the layout item tree. In browser terms: Think of the GoldenLayout instance as window
6114
- * object and of goldenLayout.root as the document.
6115
- */
6116
- root: ContentItem;
6117
-
6118
- /**
6119
- * A reference to the (jQuery) DOM element containing the layout
6120
- */
6121
- container: JQuery;
6122
-
6123
- /**
6124
- * True once the layout item tree has been created and the initialised event has been fired
6125
- */
6126
- isInitialised: boolean;
6127
-
6128
- /**
6129
- * A reference to the current, extended top level config.
6130
- *
6131
- * Don't rely on this object for state saving / serialisation. Use layout.toConfig() instead.
6132
- */
6133
- config: Config;
6134
-
6135
- /**
6136
- * The currently selected item or null if no item is selected. Only relevant if settings.selectionEnabled is set
6137
- * to true.
6138
- */
6139
- selectedItem: ContentItem;
6140
-
6141
- /**
6142
- * The current outer width of the layout in pixels.
6143
- */
6144
- width: number;
6145
-
6146
- /**
6147
- * The current outer height of the layout in pixels.
6148
- */
6149
- height: number;
6150
-
6151
- /**
6152
- * An array of BrowserWindow instances
6153
- */
6154
- openPopouts: BrowserWindow[];
6155
-
6156
- /**
6157
- * True if the layout has been opened as a popout by another layout.
6158
- */
6159
- isSubWindow: boolean;
6160
-
6161
- /**
6162
- * A singleton instance of EventEmitter that works across windows
6163
- */
6164
- eventHub: EventEmitter_2;
6165
-
6166
- _dragProxy: any;
6167
-
6168
- dropTargetIndicator: any;
6169
-
6170
- _isFullPage: boolean;
6171
-
6172
- _onUnload: any;
6173
-
6174
- tabDropPlaceholder: any;
6175
-
6176
- transitionIndicator: any;
6177
-
6178
- _dragSources: any;
6179
-
6180
- _resizeFunction: any;
6181
-
6182
- _unloadFunction: any;
6183
-
6184
- /**
6185
- * @param config A GoldenLayout configuration object
6186
- * @param container The DOM element the layout will be initialised in. Default: document.body
6187
- */
6188
- constructor(configuration: Config, container?: Element | HTMLElement | JQuery);
6189
-
6190
- /*
6191
- * @param name The name of the component, as referred to by componentName in the component configuration.
6192
- * @param component A constructor or factory function. Will be invoked with new and two arguments, a
6193
- * containerobject and a component state
6194
- */
6195
- registerComponent(name: String, component: any): void;
6196
-
6197
- /**
6198
- * Renders the layout into the container. If init() is called before the document is ready it attaches itself as
6199
- * a listener to the document and executes once it becomes ready.
6200
- */
6201
- init(): void;
6202
-
6203
- /**
6204
- * Returns the current state of the layout and its components as a serialisable object.
6205
- */
6206
- toConfig(): Config;
6207
-
6208
- /**
6209
- * Returns a component that was previously registered with layout.registerComponent().
6210
- * @param name The name of a previously registered component
6211
- */
6212
- getComponent(name: string): any;
6213
-
6214
- /**
6215
- * Resizes the layout. If no arguments are provided GoldenLayout measures its container and resizes accordingly.
6216
- * @param width The outer width the layout should be resized to. Default: The container elements width
6217
- * @param height The outer height the layout should be resized to. Default: The container elements height
6218
- */
6219
- updateSize(width?: number, height?: number): void;
6220
-
6221
- /**
6222
- * Destroys the layout. Recursively calls destroy on all components and content items, removes all event
6223
- * listeners and finally removes itself from the DOM.
6224
- */
6225
- destroy(): void;
6226
-
6227
- /**
6228
- * Creates a new content item or tree of content items from configuration. Usually you wouldn't call this
6229
- * directly, but instead use methods like layout.createDragSource(), item.addChild() or item.replaceChild() that
6230
- * all call this method implicitly.
6231
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6232
- * @param parent A parent item
6233
- */
6234
- createContentItem(itemConfiguration?: ItemConfigType, parent?: ContentItem): ContentItem;
6235
-
6236
- /**
6237
- * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
6238
- * @param configOrContentItem The content item or config that will be created in the new window. If a item is
6239
- * provided its config will be read, if config is provided, only the content key
6240
- * will be used
6241
- * @param dimensions A map containing the keys left, top, width and height. Left and top can be negative to
6242
- * place the window in another screen.
6243
- * @param parentId The id of the item within the current layout the child window's content will be appended to
6244
- * when popIn is clicked
6245
- * @param indexInParent The index at which the child window's contents will be appended to. Default: null
6246
- */
6247
- createPopout(
6248
- configOrContentItem: ItemConfigType | ContentItem,
6249
- dimensions: {
6250
- width: number;
6251
- height: number;
6252
- left: number;
6253
- top: number;
6254
- },
6255
- parentId?: string,
6256
- indexInParent?: number
6257
- ): void;
6258
-
6259
- /**
6260
- * Turns a DOM element into a dragSource, meaning that the user can drag the element directly onto the layout
6261
- * where it turns into a contentItem.
6262
- * @param element The DOM element that will be turned into a dragSource
6263
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6264
- * @return the dragSource that was created. This can be used to remove the
6265
- * dragSource from the layout later.
6266
- */
6267
- createDragSource(element: HTMLElement | JQuery, itemConfiguration: ItemConfigType): DragSource;
6268
-
6269
- /**
6270
- * Removes a dragSource from the layout.
6271
- *
6272
- * @param dragSource The dragSource to remove
6273
- */
6274
- removeDragSource(dragSource: DragSource): void;
6275
-
6276
- /**
6277
- * If settings.selectionEnabled is set to true, this allows to select items programmatically.
6278
- * @param contentItem A ContentItem instance
6279
- */
6280
- selectItem(contentItem: ContentItem): void;
6281
-
6282
- /**
6283
- * Static method on the GoldenLayout constructor! This method will iterate through a GoldenLayout config object
6284
- * and replace frequent keys and values with single letter substitutes.
6285
- * @param config A GoldenLayout configuration object
6286
- */
6287
- static minifyConfig(config: any): any;
6288
-
6289
- /**
6290
- * Static method on the GoldenLayout constructor! This method will reverse the minifications of minifyConfig.
6291
- * @param minifiedConfig A minified GoldenLayout configuration object
5548
+ * })
5549
+ * .catch(err => {
5550
+ * console.log('Error registering the hotkey', err);
5551
+ * });
5552
+ * ```
6292
5553
  */
6293
- static unminifyConfig(minifiedConfig: any): any;
6294
-
5554
+ register(hotkey: string, listener: (...args: any[]) => void): Promise<void>;
6295
5555
  /**
6296
- * Subscribe to an event
6297
- * @param eventName The name of the event to describe to
6298
- * @param callback The function that should be invoked when the event occurs
6299
- * @param context The value of the this pointer in the callback function
5556
+ * Unregisters a global hotkey with the operating system.
5557
+ * @param hotkey a hotkey string
5558
+ *
5559
+ * @remarks This method will unregister all existing registrations of the hotkey within the application.
5560
+ * Raises the `unregistered` event.
5561
+ *
5562
+ * @example
5563
+ * ```js
5564
+ * const hotkey = 'CommandOrControl+X';
5565
+ *
5566
+ * fin.GlobalHotkey.unregister(hotkey)
5567
+ * .then(() => {
5568
+ * console.log('Success');
5569
+ * })
5570
+ * .catch(err => {
5571
+ * console.log('Error unregistering the hotkey', err);
5572
+ * });
5573
+ * ```
6300
5574
  */
6301
- on(eventName: string, callback: Function, context?: any): void;
6302
-
5575
+ unregister(hotkey: string): Promise<void>;
6303
5576
  /**
6304
- * Notify listeners of an event and pass arguments along
6305
- * @param eventName The name of the event to emit
5577
+ * Unregisters all global hotkeys for the current application.
5578
+ *
5579
+ * @remarks Raises the `unregistered` event for each hotkey unregistered.
5580
+ *
5581
+ * @example
5582
+ * ```js
5583
+ * fin.GlobalHotkey.unregisterAll()
5584
+ * .then(() => {
5585
+ * console.log('Success');
5586
+ * })
5587
+ * .catch(err => {
5588
+ * console.log('Error unregistering all hotkeys for this application', err);
5589
+ * });
5590
+ * ```
6306
5591
  */
6307
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6308
-
5592
+ unregisterAll(): Promise<void>;
6309
5593
  /**
6310
- * Alias for emit
5594
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5595
+ * @param hotkey a hotkey string
5596
+ *
5597
+ * @example
5598
+ * ```js
5599
+ * const hotkey = 'CommandOrControl+X';
5600
+ *
5601
+ * fin.GlobalHotkey.isRegistered(hotkey)
5602
+ * .then((registered) => {
5603
+ * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
5604
+ * })
5605
+ * .catch(err => {
5606
+ * console.log('Error unregistering the hotkey', err);
5607
+ * });
5608
+ * ```
6311
5609
  */
6312
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5610
+ isRegistered(hotkey: string): Promise<boolean>;
5611
+ }
6313
5612
 
6314
- /**
6315
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
6316
- * eventName and callback or just a specific callback with a specific context if invoked with all three
6317
- * arguments.
6318
- * @param eventName The name of the event to unsubscribe from
6319
- * @param callback The function that should be invoked when the event occurs
6320
- * @param context The value of the this pointer in the callback function
6321
- */
6322
- unbind(eventName: string, callback?: Function, context?: any): void;
5613
+ /**
5614
+ * @deprecated Renamed to {@link Event}.
5615
+ */
5616
+ declare type GlobalHotkeyEvent = Event_9;
6323
5617
 
6324
- /**
6325
- * Alias for unbind
6326
- */
6327
- off(eventName: string, callback?: Function, context?: any): void;
5618
+ declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6328
5619
 
6329
- /**
6330
- * Internal method that create drop areas on the far edges of window, e.g. far-right of window
6331
- */
6332
- _$createRootItemAreas(): void;
5620
+ declare namespace GlobalHotkeyEvents {
5621
+ export {
5622
+ BaseEvent_8 as BaseEvent,
5623
+ RegisteredEvent,
5624
+ UnregisteredEvent,
5625
+ Event_9 as Event,
5626
+ GlobalHotkeyEvent,
5627
+ EventType_6 as EventType,
5628
+ GlobalHotkeyEventType,
5629
+ Payload_7 as Payload,
5630
+ ByType_6 as ByType
5631
+ }
6333
5632
  }
6334
5633
 
5634
+ /**
5635
+ * @deprecated Renamed to {@link EventType}.
5636
+ */
5637
+ declare type GlobalHotkeyEventType = EventType_6;
5638
+
6335
5639
  /**
6336
5640
  * @interface
6337
5641
  */
@@ -6339,62 +5643,6 @@ declare type GpuInfo = {
6339
5643
  name: string;
6340
5644
  };
6341
5645
 
6342
- declare interface Header {
6343
- /**
6344
- * A reference to the LayoutManager instance
6345
- */
6346
- layoutManager: GoldenLayout_2;
6347
-
6348
- /**
6349
- * A reference to the Stack this Header belongs to
6350
- */
6351
- parent: ContentItem;
6352
-
6353
- /**
6354
- * An array of the Tabs within this header
6355
- */
6356
- tabs: Tab[];
6357
-
6358
- /**
6359
- * The currently selected activeContentItem
6360
- */
6361
- activeContentItem: ContentItem;
6362
-
6363
- /**
6364
- * The outer (jQuery) DOM element of this Header
6365
- */
6366
- element: JQuery;
6367
-
6368
- /**
6369
- * The (jQuery) DOM element containing the tabs
6370
- */
6371
- tabsContainer: JQuery;
6372
-
6373
- /**
6374
- * The (jQuery) DOM element containing the close, maximise and popout button
6375
- */
6376
- controlsContainer: JQuery;
6377
-
6378
- /**
6379
- * Hides the currently selected contentItem, shows the specified one and highlights its tab.
6380
- * @param contentItem The content item that will be selected
6381
- */
6382
- setActiveContentItem(contentItem: ContentItem): void;
6383
-
6384
- /**
6385
- * Creates a new tab and associates it with a content item
6386
- * @param contentItem The content item the tab will be associated with
6387
- * @param index A zero based index, specifying the position of the new tab
6388
- */
6389
- createTab(contentItem: ContentItem, index?: number): void;
6390
-
6391
- /**
6392
- * Finds a tab by its contentItem and removes it
6393
- * @param contentItem The content item the tab is associated with
6394
- */
6395
- removeTab(contentItem: ContentItem): void;
6396
- }
6397
-
6398
5646
  /**
6399
5647
  * Generated when a View is hidden.
6400
5648
  * @interface
@@ -8007,50 +7255,6 @@ declare class InteropModule extends Base {
8007
7255
  connectSync(name: string, interopConfig?: OpenFin_2.InteropConfig): InteropClient;
8008
7256
  }
8009
7257
 
8010
- declare interface ItemConfig {
8011
- /**
8012
- * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
8013
- */
8014
- type: ItemType;
8015
-
8016
- /**
8017
- * An array of configurations for items that will be created as children of this item.
8018
- */
8019
- content?: ItemConfigType[];
8020
-
8021
- /**
8022
- * The width of this item, relative to the other children of its parent in percent
8023
- */
8024
- width?: number;
8025
-
8026
- /**
8027
- * The height of this item, relative to the other children of its parent in percent
8028
- */
8029
- height?: number;
8030
-
8031
- /**
8032
- * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
8033
- */
8034
- id?: string | string[];
8035
-
8036
- /**
8037
- * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
8038
- * will return false
8039
- * Default: true
8040
- */
8041
- isClosable?: boolean;
8042
-
8043
- /**
8044
- * The title of the item as displayed on its tab and on popout windows
8045
- * Default: componentName or ''
8046
- */
8047
- title?: string;
8048
- }
8049
-
8050
- declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
8051
-
8052
- declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
8053
-
8054
7258
  /**
8055
7259
  * @interface
8056
7260
  */
@@ -8108,32 +7312,6 @@ declare type JumpListTask = {
8108
7312
  iconIndex?: number;
8109
7313
  };
8110
7314
 
8111
- declare interface Labels {
8112
- /**
8113
- * The tooltip text that appears when hovering over the close icon.
8114
- * Default: 'close'
8115
- */
8116
- close?: string;
8117
-
8118
- /**
8119
- * The tooltip text that appears when hovering over the maximise icon.
8120
- * Default: 'maximise'
8121
- */
8122
- maximise?: string;
8123
-
8124
- /**
8125
- * The tooltip text that appears when hovering over the minimise icon.
8126
- * Default: 'minimise'
8127
- */
8128
- minimise?: string;
8129
-
8130
- /**
8131
- * The tooltip text that appears when hovering over the popout icon.
8132
- * Default: 'open in new window'
8133
- */
8134
- popout?: string;
8135
- }
8136
-
8137
7315
  /**
8138
7316
  * The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
8139
7317
  *
@@ -8565,7 +7743,7 @@ declare type LayoutEntityDefinition<TLayoutEntityType extends LayoutEntityTypes
8565
7743
  entityId: string;
8566
7744
  };
8567
7745
 
8568
- declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'root'>;
7746
+ declare type LayoutEntityTypes = 'column' | 'row' | 'stack';
8569
7747
 
8570
7748
  /**
8571
7749
  * @interface
@@ -12743,18 +11921,6 @@ declare type QueryPermissionResult = {
12743
11921
  rawValue?: unknown;
12744
11922
  };
12745
11923
 
12746
- declare interface ReactComponentConfig extends ItemConfig {
12747
- /**
12748
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
12749
- */
12750
- component: string;
12751
-
12752
- /**
12753
- * Properties that will be passed to the component and accessible using this.props.
12754
- */
12755
- props?: any;
12756
- }
12757
-
12758
11924
  /**
12759
11925
  * @interface
12760
11926
  */
@@ -13231,97 +12397,6 @@ declare type SessionContextGroup = {
13231
12397
  }>;
13232
12398
  };
13233
12399
 
13234
- declare interface Settings {
13235
- preventSplitterResize?: boolean;
13236
-
13237
- newTabButton?: {
13238
- url?: string;
13239
- };
13240
-
13241
- /**
13242
- * If true, tabs can't be dragged into the window.
13243
- * Default: false
13244
- */
13245
- preventDragIn?: boolean;
13246
-
13247
- /**
13248
- * If true, tabs can't be dragged out of the window.
13249
- * Default: false
13250
- */
13251
- preventDragOut?: boolean;
13252
-
13253
- /**
13254
- * If true, stack headers are the only areas where tabs can be dropped.
13255
- * Default: false
13256
- */
13257
- constrainDragToHeaders?: boolean;
13258
- /**
13259
- * Turns headers on or off. If false, the layout will be displayed with splitters only.
13260
- * Default: true
13261
- */
13262
- hasHeaders?: boolean;
13263
-
13264
- /**
13265
- * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
13266
- * automatically when layout.createDragSource() is called.
13267
- * Default: true
13268
- */
13269
- constrainDragToContainer?: boolean;
13270
-
13271
- /**
13272
- * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
13273
- * Default: true
13274
- */
13275
- reorderEnabled?: boolean;
13276
-
13277
- /**
13278
- * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
13279
- * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
13280
- * Default: false
13281
- */
13282
- selectionEnabled?: boolean;
13283
-
13284
- /**
13285
- * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
13286
- * be transferred to the new window, if false only the active component will be opened.
13287
- * Default: false
13288
- */
13289
- popoutWholeStack?: boolean;
13290
-
13291
- /**
13292
- * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
13293
- * If false, the popout call will fail silently.
13294
- * Default: true
13295
- */
13296
- blockedPopoutsThrowError?: boolean;
13297
-
13298
- /**
13299
- * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
13300
- * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
13301
- * addition, any changes made to popouts won't be stored after the parent is closed.
13302
- * Default: true
13303
- */
13304
- closePopoutsOnUnload?: boolean;
13305
-
13306
- /**
13307
- * Specifies if the popout icon should be displayed in the header-bar.
13308
- * Default: true
13309
- */
13310
- showPopoutIcon?: boolean;
13311
-
13312
- /**
13313
- * Specifies if the maximise icon should be displayed in the header-bar.
13314
- * Default: true
13315
- */
13316
- showMaximiseIcon?: boolean;
13317
-
13318
- /**
13319
- * Specifies if the close icon should be displayed in the header-bar.
13320
- * Default: true
13321
- */
13322
- showCloseIcon?: boolean;
13323
- }
13324
-
13325
12400
  /**
13326
12401
  * @interface
13327
12402
  */
@@ -15224,59 +14299,6 @@ declare type SystemShutdownHandler = (shutdownEvent: {
15224
14299
  proceed: () => void;
15225
14300
  }) => void;
15226
14301
 
15227
- declare interface Tab {
15228
- _dragListener: TabDragListener;
15229
-
15230
- /**
15231
- * True if this tab is the selected tab
15232
- */
15233
- isActive: boolean;
15234
-
15235
- /**
15236
- * A reference to the header this tab is a child of
15237
- */
15238
- header: Header;
15239
-
15240
- /**
15241
- * A reference to the content item this tab relates to
15242
- */
15243
- contentItem: ContentItem;
15244
-
15245
- /**
15246
- * The tabs outer (jQuery) DOM element
15247
- */
15248
- element: JQuery;
15249
-
15250
- /**
15251
- * The (jQuery) DOM element containing the title
15252
- */
15253
- titleElement: JQuery;
15254
-
15255
- /**
15256
- * The (jQuery) DOM element that closes the tab
15257
- */
15258
- closeElement: JQuery;
15259
-
15260
- /**
15261
- * Sets the tab's title. Does not affect the contentItem's title!
15262
- * @param title The new title
15263
- */
15264
- setTitle(title: string): void;
15265
-
15266
- /**
15267
- * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
15268
- * @param isActive Whether the tab is active
15269
- */
15270
- setActive(isActive: boolean): void;
15271
- }
15272
-
15273
- declare interface TabDragListener extends EventEmitter_2 {
15274
- /**
15275
- * A reference to the content item this tab relates to
15276
- */
15277
- contentItem: ContentItem;
15278
- }
15279
-
15280
14302
  /**
15281
14303
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15282
14304
  */
@@ -15676,117 +14698,11 @@ declare type UserMovementEnabledEvent = BaseEvent_5 & {
15676
14698
  type: 'user-movement-enabled';
15677
14699
  };
15678
14700
 
15679
- declare namespace v1_2 {
15680
- {
15681
- AppIntent,
15682
- AppMetadata,
15683
- DisplayMetadata,
15684
- OpenError,
15685
- ResolveError,
15686
- ChannelError,
15687
- ImplementationMetadata,
15688
- IntentMetadata,
15689
- Listener,
15690
- ContextTypes,
15691
- ContextType,
15692
- Context,
15693
- ContactList,
15694
- Contact,
15695
- ContactID,
15696
- InstrumentList,
15697
- Instrument,
15698
- InstrumentID,
15699
- Country,
15700
- CountryID,
15701
- Organization,
15702
- OrganizationID,
15703
- Portfolio,
15704
- Position,
15705
- Convert,
15706
- Intents,
15707
- Channel,
15708
- DesktopAgent,
15709
- IntentResolution,
15710
- TargetApp,
15711
- ContextHandler
15712
- }
15713
- }
15714
-
15715
- declare namespace v2_0 {
15716
- {
15717
- AppIdentifier,
15718
- AppIntent_2 as AppIntent,
15719
- AppMetadata_2 as AppMetadata,
15720
- ContextMetadata,
15721
- DisplayMetadata_2 as DisplayMetadata,
15722
- OpenError_2 as OpenError,
15723
- ResolveError_2 as ResolveError,
15724
- ResultError,
15725
- ChannelError_2 as ChannelError,
15726
- Icon,
15727
- Image_2 as Image,
15728
- ImplementationMetadata_2 as ImplementationMetadata,
15729
- IntentMetadata_2 as IntentMetadata,
15730
- Listener_2 as Listener,
15731
- ContextTypes_2 as ContextTypes,
15732
- ContextType_2 as ContextType,
15733
- Chart,
15734
- InstrumentElement,
15735
- PurpleID,
15736
- PurpleMarket,
15737
- TimeRangeObject,
15738
- Style,
15739
- ChatInitSettings,
15740
- ContactListObject,
15741
- ContactElement,
15742
- FluffyID,
15743
- Contact_2 as Contact,
15744
- TentacledID,
15745
- ContactList_2 as ContactList,
15746
- Context_2 as Context,
15747
- Country_2 as Country,
15748
- CountryID_2 as CountryID,
15749
- Currency,
15750
- CurrencyID,
15751
- Email,
15752
- RecipientsObject,
15753
- RecipientsID,
15754
- Instrument_2 as Instrument,
15755
- StickyID,
15756
- FluffyMarket,
15757
- InstrumentList_2 as InstrumentList,
15758
- Nothing,
15759
- Organization_2 as Organization,
15760
- OrganizationID_2 as OrganizationID,
15761
- Portfolio_2 as Portfolio,
15762
- PositionElement,
15763
- Position_2 as Position,
15764
- TimeRange,
15765
- Valuation,
15766
- Convert_2 as Convert,
15767
- Intents_2 as Intents,
15768
- Channel_2 as Channel,
15769
- DesktopAgent_2 as DesktopAgent,
15770
- IntentResolution_2 as IntentResolution,
15771
- PrivateChannel,
15772
- ContextHandler_2 as ContextHandler,
15773
- IntentResult,
15774
- IntentHandler
15775
- }
15776
- }
15777
-
15778
14701
  declare type VerboseWebPermission = {
15779
14702
  api: string;
15780
14703
  enabled: boolean;
15781
14704
  };
15782
14705
 
15783
- declare type Version = (typeof versions)[keyof typeof versions];
15784
-
15785
- declare const versions: {
15786
- readonly v1_2: "1.2";
15787
- readonly v2_0: "2.0";
15788
- };
15789
-
15790
14706
  declare type View = OpenFin_2.View;
15791
14707
 
15792
14708
  /**