@openfin/core 37.81.19 → 37.81.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/out/mock.d.ts CHANGED
@@ -940,7 +940,7 @@ declare type ApplicationIdentity_2 = {
940
940
  * @interface
941
941
  */
942
942
  declare type ApplicationInfo = {
943
- initialOptions: ApplicationCreationOptions | PlatformOptions;
943
+ initialOptions: WithUserAppConfigArgs & (ApplicationCreationOptions | PlatformOptions);
944
944
  launchMode: string;
945
945
  manifest: Manifest & {
946
946
  [key: string]: any;
@@ -1167,9 +1167,14 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1167
1167
  */
1168
1168
  mainWindowOptions: WindowCreationOptions;
1169
1169
  /**
1170
- * The name of the application (and the application's main window).
1170
+ * The name of the application.
1171
1171
  *
1172
- * If provided, _must_ match `uuid`.
1172
+ * @remarks
1173
+ * This property is only used for naming the application logging folder, which will be sanitized to remove
1174
+ * any special characters, spaces or international characters. Otherwise it's not used and it will be overwritten
1175
+ * during startup with the UUID of the application.
1176
+ *
1177
+ * This property will be deprecated in the future.
1173
1178
  */
1174
1179
  name: string;
1175
1180
  /**
@@ -1199,9 +1204,7 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1199
1204
  url: string;
1200
1205
  /**
1201
1206
  * 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.
1207
+ * running in the OpenFin Runtime.
1205
1208
  */
1206
1209
  uuid: string;
1207
1210
  /**
@@ -1936,48 +1939,6 @@ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1936
1939
  behavior: 'browser';
1937
1940
  };
1938
1941
 
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
1942
  /**
1982
1943
  * Extracts a single event type matching the given key from the View {@link Event} union.
1983
1944
  *
@@ -3376,31 +3337,6 @@ declare class ColumnOrRow extends LayoutNode {
3376
3337
  getContent: () => Promise<(ColumnOrRow | TabStack)[]>;
3377
3338
  }
3378
3339
 
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
3340
  declare type ConfigWithRuntime = BaseConfig & {
3405
3341
  runtime: RuntimeConfig;
3406
3342
  };
@@ -3778,103 +3714,6 @@ declare type ConstWindowOptions = {
3778
3714
  inheritance?: Partial<InheritableOptions>;
3779
3715
  };
3780
3716
 
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
3717
  /**
3879
3718
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3880
3719
  */
@@ -3948,218 +3787,6 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3948
3787
  disposition: string;
3949
3788
  };
3950
3789
 
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
3790
  /**
4164
3791
  * Restrict navigation to URLs that match an allowed pattern.
4165
3792
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -4587,46 +4214,6 @@ declare type DidFinishLoadEvent = NamedEvent & {
4587
4214
  type: 'did-finish-load';
4588
4215
  };
4589
4216
 
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
4217
  /**
4631
4218
  * @interface
4632
4219
  */
@@ -4876,8 +4463,6 @@ declare type Dpi = {
4876
4463
  vertical?: number;
4877
4464
  };
4878
4465
 
4879
- declare interface DragSource {}
4880
-
4881
4466
  /**
4882
4467
  * Generated when a window has been embedded.
4883
4468
  * @interface
@@ -5188,43 +4773,6 @@ declare class EventAggregator extends EmitterMap {
5188
4773
  dispatchEvent: (message: Message<any>) => boolean;
5189
4774
  }
5190
4775
 
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
4776
  /**
5229
4777
  * Handler for an event on an EventEmitter.
5230
4778
  * @remarks Selects the correct type for the event
@@ -5995,343 +5543,96 @@ declare class GlobalHotkey extends EmitterBase<OpenFin_2.GlobalHotkeyEvent> {
5995
5543
  * .then(() => {
5996
5544
  * console.log('Success');
5997
5545
  * })
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
5546
+ * .catch(err => {
5547
+ * console.log('Error registering the hotkey', err);
5548
+ * });
5549
+ * ```
6292
5550
  */
6293
- static unminifyConfig(minifiedConfig: any): any;
6294
-
5551
+ register(hotkey: string, listener: (...args: any[]) => void): Promise<void>;
6295
5552
  /**
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
5553
+ * Unregisters a global hotkey with the operating system.
5554
+ * @param hotkey a hotkey string
5555
+ *
5556
+ * @remarks This method will unregister all existing registrations of the hotkey within the application.
5557
+ * Raises the `unregistered` event.
5558
+ *
5559
+ * @example
5560
+ * ```js
5561
+ * const hotkey = 'CommandOrControl+X';
5562
+ *
5563
+ * fin.GlobalHotkey.unregister(hotkey)
5564
+ * .then(() => {
5565
+ * console.log('Success');
5566
+ * })
5567
+ * .catch(err => {
5568
+ * console.log('Error unregistering the hotkey', err);
5569
+ * });
5570
+ * ```
6300
5571
  */
6301
- on(eventName: string, callback: Function, context?: any): void;
6302
-
5572
+ unregister(hotkey: string): Promise<void>;
6303
5573
  /**
6304
- * Notify listeners of an event and pass arguments along
6305
- * @param eventName The name of the event to emit
5574
+ * Unregisters all global hotkeys for the current application.
5575
+ *
5576
+ * @remarks Raises the `unregistered` event for each hotkey unregistered.
5577
+ *
5578
+ * @example
5579
+ * ```js
5580
+ * fin.GlobalHotkey.unregisterAll()
5581
+ * .then(() => {
5582
+ * console.log('Success');
5583
+ * })
5584
+ * .catch(err => {
5585
+ * console.log('Error unregistering all hotkeys for this application', err);
5586
+ * });
5587
+ * ```
6306
5588
  */
6307
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6308
-
5589
+ unregisterAll(): Promise<void>;
6309
5590
  /**
6310
- * Alias for emit
5591
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5592
+ * @param hotkey a hotkey string
5593
+ *
5594
+ * @example
5595
+ * ```js
5596
+ * const hotkey = 'CommandOrControl+X';
5597
+ *
5598
+ * fin.GlobalHotkey.isRegistered(hotkey)
5599
+ * .then((registered) => {
5600
+ * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
5601
+ * })
5602
+ * .catch(err => {
5603
+ * console.log('Error unregistering the hotkey', err);
5604
+ * });
5605
+ * ```
6311
5606
  */
6312
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5607
+ isRegistered(hotkey: string): Promise<boolean>;
5608
+ }
6313
5609
 
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;
5610
+ /**
5611
+ * @deprecated Renamed to {@link Event}.
5612
+ */
5613
+ declare type GlobalHotkeyEvent = Event_9;
6323
5614
 
6324
- /**
6325
- * Alias for unbind
6326
- */
6327
- off(eventName: string, callback?: Function, context?: any): void;
5615
+ declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6328
5616
 
6329
- /**
6330
- * Internal method that create drop areas on the far edges of window, e.g. far-right of window
6331
- */
6332
- _$createRootItemAreas(): void;
5617
+ declare namespace GlobalHotkeyEvents {
5618
+ export {
5619
+ BaseEvent_8 as BaseEvent,
5620
+ RegisteredEvent,
5621
+ UnregisteredEvent,
5622
+ Event_9 as Event,
5623
+ GlobalHotkeyEvent,
5624
+ EventType_6 as EventType,
5625
+ GlobalHotkeyEventType,
5626
+ Payload_7 as Payload,
5627
+ ByType_6 as ByType
5628
+ }
6333
5629
  }
6334
5630
 
5631
+ /**
5632
+ * @deprecated Renamed to {@link EventType}.
5633
+ */
5634
+ declare type GlobalHotkeyEventType = EventType_6;
5635
+
6335
5636
  /**
6336
5637
  * @interface
6337
5638
  */
@@ -6339,62 +5640,6 @@ declare type GpuInfo = {
6339
5640
  name: string;
6340
5641
  };
6341
5642
 
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
5643
  /**
6399
5644
  * Generated when a View is hidden.
6400
5645
  * @interface
@@ -7620,9 +6865,7 @@ declare class InteropClient extends Base {
7620
6865
  * ```
7621
6866
  *
7622
6867
  *
7623
- * We are also testing the ability to add a context handler for specific contexts. If you would like to use
7624
- * this, please make sure you add your context handlers at the top level of your application, on a page that
7625
- * does not navigate/reload/re-render, to avoid memory leaks. This feature is experimental:
6868
+ * Passing in a context type as the second parameter will cause the handler to only be invoked with that context type.
7626
6869
  *
7627
6870
  * ```js
7628
6871
  * function handleInstrumentContext(contextInfo) {
@@ -8009,50 +7252,6 @@ declare class InteropModule extends Base {
8009
7252
  connectSync(name: string, interopConfig?: OpenFin_2.InteropConfig): InteropClient;
8010
7253
  }
8011
7254
 
8012
- declare interface ItemConfig {
8013
- /**
8014
- * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
8015
- */
8016
- type: ItemType;
8017
-
8018
- /**
8019
- * An array of configurations for items that will be created as children of this item.
8020
- */
8021
- content?: ItemConfigType[];
8022
-
8023
- /**
8024
- * The width of this item, relative to the other children of its parent in percent
8025
- */
8026
- width?: number;
8027
-
8028
- /**
8029
- * The height of this item, relative to the other children of its parent in percent
8030
- */
8031
- height?: number;
8032
-
8033
- /**
8034
- * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
8035
- */
8036
- id?: string | string[];
8037
-
8038
- /**
8039
- * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
8040
- * will return false
8041
- * Default: true
8042
- */
8043
- isClosable?: boolean;
8044
-
8045
- /**
8046
- * The title of the item as displayed on its tab and on popout windows
8047
- * Default: componentName or ''
8048
- */
8049
- title?: string;
8050
- }
8051
-
8052
- declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
8053
-
8054
- declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
8055
-
8056
7255
  /**
8057
7256
  * @interface
8058
7257
  */
@@ -8110,32 +7309,6 @@ declare type JumpListTask = {
8110
7309
  iconIndex?: number;
8111
7310
  };
8112
7311
 
8113
- declare interface Labels {
8114
- /**
8115
- * The tooltip text that appears when hovering over the close icon.
8116
- * Default: 'close'
8117
- */
8118
- close?: string;
8119
-
8120
- /**
8121
- * The tooltip text that appears when hovering over the maximise icon.
8122
- * Default: 'maximise'
8123
- */
8124
- maximise?: string;
8125
-
8126
- /**
8127
- * The tooltip text that appears when hovering over the minimise icon.
8128
- * Default: 'minimise'
8129
- */
8130
- minimise?: string;
8131
-
8132
- /**
8133
- * The tooltip text that appears when hovering over the popout icon.
8134
- * Default: 'open in new window'
8135
- */
8136
- popout?: string;
8137
- }
8138
-
8139
7312
  /**
8140
7313
  * The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
8141
7314
  *
@@ -8567,7 +7740,7 @@ declare type LayoutEntityDefinition<TLayoutEntityType extends LayoutEntityTypes
8567
7740
  entityId: string;
8568
7741
  };
8569
7742
 
8570
- declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'root'>;
7743
+ declare type LayoutEntityTypes = 'column' | 'row' | 'stack';
8571
7744
 
8572
7745
  /**
8573
7746
  * @interface
@@ -10133,6 +9306,7 @@ declare namespace OpenFin_2 {
10133
9306
  AppVersionError,
10134
9307
  AppVersionRuntimeInfo,
10135
9308
  LaunchEmitter,
9309
+ UserAppConfigArgs,
10136
9310
  RvmLaunchOptions,
10137
9311
  ShortCutConfig,
10138
9312
  TerminateExternalRequestType,
@@ -12744,18 +11918,6 @@ declare type QueryPermissionResult = {
12744
11918
  rawValue?: unknown;
12745
11919
  };
12746
11920
 
12747
- declare interface ReactComponentConfig extends ItemConfig {
12748
- /**
12749
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
12750
- */
12751
- component: string;
12752
-
12753
- /**
12754
- * Properties that will be passed to the component and accessible using this.props.
12755
- */
12756
- props?: any;
12757
- }
12758
-
12759
11921
  /**
12760
11922
  * @interface
12761
11923
  */
@@ -13018,7 +12180,7 @@ declare type RunRequestedEvent = OpenFin_2.ApplicationEvents.RunRequestedEvent;
13018
12180
  declare type RunRequestedEvent_2 = BaseEvents.IdentityEvent & {
13019
12181
  topic: 'application';
13020
12182
  type: 'run-requested';
13021
- userAppConfigArgs: Record<string, any>;
12183
+ userAppConfigArgs: OpenFin_2.UserAppConfigArgs;
13022
12184
  manifest: OpenFin_2.Manifest;
13023
12185
  };
13024
12186
 
@@ -13133,7 +12295,7 @@ declare type RvmLaunchOptions = {
13133
12295
  * True if no UI when launching
13134
12296
  */
13135
12297
  noUi?: boolean;
13136
- userAppConfigArgs?: object;
12298
+ userAppConfigArgs?: UserAppConfigArgs;
13137
12299
  /**
13138
12300
  * Timeout in seconds until RVM launch request expires.
13139
12301
  */
@@ -13232,97 +12394,6 @@ declare type SessionContextGroup = {
13232
12394
  }>;
13233
12395
  };
13234
12396
 
13235
- declare interface Settings {
13236
- preventSplitterResize?: boolean;
13237
-
13238
- newTabButton?: {
13239
- url?: string;
13240
- };
13241
-
13242
- /**
13243
- * If true, tabs can't be dragged into the window.
13244
- * Default: false
13245
- */
13246
- preventDragIn?: boolean;
13247
-
13248
- /**
13249
- * If true, tabs can't be dragged out of the window.
13250
- * Default: false
13251
- */
13252
- preventDragOut?: boolean;
13253
-
13254
- /**
13255
- * If true, stack headers are the only areas where tabs can be dropped.
13256
- * Default: false
13257
- */
13258
- constrainDragToHeaders?: boolean;
13259
- /**
13260
- * Turns headers on or off. If false, the layout will be displayed with splitters only.
13261
- * Default: true
13262
- */
13263
- hasHeaders?: boolean;
13264
-
13265
- /**
13266
- * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
13267
- * automatically when layout.createDragSource() is called.
13268
- * Default: true
13269
- */
13270
- constrainDragToContainer?: boolean;
13271
-
13272
- /**
13273
- * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
13274
- * Default: true
13275
- */
13276
- reorderEnabled?: boolean;
13277
-
13278
- /**
13279
- * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
13280
- * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
13281
- * Default: false
13282
- */
13283
- selectionEnabled?: boolean;
13284
-
13285
- /**
13286
- * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
13287
- * be transferred to the new window, if false only the active component will be opened.
13288
- * Default: false
13289
- */
13290
- popoutWholeStack?: boolean;
13291
-
13292
- /**
13293
- * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
13294
- * If false, the popout call will fail silently.
13295
- * Default: true
13296
- */
13297
- blockedPopoutsThrowError?: boolean;
13298
-
13299
- /**
13300
- * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
13301
- * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
13302
- * addition, any changes made to popouts won't be stored after the parent is closed.
13303
- * Default: true
13304
- */
13305
- closePopoutsOnUnload?: boolean;
13306
-
13307
- /**
13308
- * Specifies if the popout icon should be displayed in the header-bar.
13309
- * Default: true
13310
- */
13311
- showPopoutIcon?: boolean;
13312
-
13313
- /**
13314
- * Specifies if the maximise icon should be displayed in the header-bar.
13315
- * Default: true
13316
- */
13317
- showMaximiseIcon?: boolean;
13318
-
13319
- /**
13320
- * Specifies if the close icon should be displayed in the header-bar.
13321
- * Default: true
13322
- */
13323
- showCloseIcon?: boolean;
13324
- }
13325
-
13326
12397
  /**
13327
12398
  * @interface
13328
12399
  */
@@ -15225,59 +14296,6 @@ declare type SystemShutdownHandler = (shutdownEvent: {
15225
14296
  proceed: () => void;
15226
14297
  }) => void;
15227
14298
 
15228
- declare interface Tab {
15229
- _dragListener: TabDragListener;
15230
-
15231
- /**
15232
- * True if this tab is the selected tab
15233
- */
15234
- isActive: boolean;
15235
-
15236
- /**
15237
- * A reference to the header this tab is a child of
15238
- */
15239
- header: Header;
15240
-
15241
- /**
15242
- * A reference to the content item this tab relates to
15243
- */
15244
- contentItem: ContentItem;
15245
-
15246
- /**
15247
- * The tabs outer (jQuery) DOM element
15248
- */
15249
- element: JQuery;
15250
-
15251
- /**
15252
- * The (jQuery) DOM element containing the title
15253
- */
15254
- titleElement: JQuery;
15255
-
15256
- /**
15257
- * The (jQuery) DOM element that closes the tab
15258
- */
15259
- closeElement: JQuery;
15260
-
15261
- /**
15262
- * Sets the tab's title. Does not affect the contentItem's title!
15263
- * @param title The new title
15264
- */
15265
- setTitle(title: string): void;
15266
-
15267
- /**
15268
- * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
15269
- * @param isActive Whether the tab is active
15270
- */
15271
- setActive(isActive: boolean): void;
15272
- }
15273
-
15274
- declare interface TabDragListener extends EventEmitter_2 {
15275
- /**
15276
- * A reference to the content item this tab relates to
15277
- */
15278
- contentItem: ContentItem;
15279
- }
15280
-
15281
14299
  /**
15282
14300
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15283
14301
  */
@@ -15644,6 +14662,11 @@ declare type UrlChangedEvent = BaseUrlEvent & ({
15644
14662
  httpStatusText: string;
15645
14663
  });
15646
14664
 
14665
+ /**
14666
+ * @interface
14667
+ */
14668
+ declare type UserAppConfigArgs = Record<string, string | string[]>;
14669
+
15647
14670
  /**
15648
14671
  * A general user bounds change event without event type.
15649
14672
  * @interface
@@ -19076,6 +18099,32 @@ declare type WithPositioningOptions<T extends {} = {}> = T & {
19076
18099
  positioningOptions?: OpenFin_2.PositioningOptions;
19077
18100
  };
19078
18101
 
18102
+ declare type WithUserAppConfigArgs = {
18103
+ /**
18104
+ * Represents the key-value pairs for the parameters passed into any fin:// or fins:// link
18105
+ * that launches this application.
18106
+ *
18107
+ * @remarks
18108
+ * In the link, user defined parameters are separated by the `$$` delimeter, for example:
18109
+ * `fins://path.to/app/manifest.json?$$use-last-configuration=true`
18110
+ *
18111
+ * Results in the following object:
18112
+ * ```json
18113
+ * {
18114
+ * "use-last-configuration": true"
18115
+ * }
18116
+ * ```
18117
+ *
18118
+ * These args can be accessed via the {@link ApplicationInfo.initialOptions} object:
18119
+ * ```typescript
18120
+ * const appInfo = await fin.Application.getCurrentSync().getInfo();
18121
+ * const { userAppConfigArgs } = appInfo.initialOptions;
18122
+ * console.log(userAppConfigArgs['use-last-configuration']); // 'true'
18123
+ * ```
18124
+ */
18125
+ userAppConfigArgs?: UserAppConfigArgs;
18126
+ };
18127
+
19079
18128
  /**
19080
18129
  * @internal
19081
18130
  * @interface