@openfin/fdc3-api 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.
@@ -934,7 +934,7 @@ declare type ApplicationIdentity_2 = {
934
934
  * @interface
935
935
  */
936
936
  declare type ApplicationInfo = {
937
- initialOptions: ApplicationCreationOptions | PlatformOptions;
937
+ initialOptions: WithUserAppConfigArgs & (ApplicationCreationOptions | PlatformOptions);
938
938
  launchMode: string;
939
939
  manifest: Manifest & {
940
940
  [key: string]: any;
@@ -1161,9 +1161,14 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1161
1161
  */
1162
1162
  mainWindowOptions: WindowCreationOptions;
1163
1163
  /**
1164
- * The name of the application (and the application's main window).
1164
+ * The name of the application.
1165
1165
  *
1166
- * If provided, _must_ match `uuid`.
1166
+ * @remarks
1167
+ * This property is only used for naming the application logging folder, which will be sanitized to remove
1168
+ * any special characters, spaces or international characters. Otherwise it's not used and it will be overwritten
1169
+ * during startup with the UUID of the application.
1170
+ *
1171
+ * This property will be deprecated in the future.
1167
1172
  */
1168
1173
  name: string;
1169
1174
  /**
@@ -1193,9 +1198,7 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1193
1198
  url: string;
1194
1199
  /**
1195
1200
  * The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
1196
- * running in the OpenFin Runtime.
1197
- *
1198
- * Note that `name` and `uuid` must match.
1201
+ * running in the OpenFin Runtime.
1199
1202
  */
1200
1203
  uuid: string;
1201
1204
  /**
@@ -1904,48 +1907,6 @@ declare type BrowserContentCreationRule = BaseContentCreationRule & {
1904
1907
  behavior: 'browser';
1905
1908
  };
1906
1909
 
1907
- declare interface BrowserWindow {
1908
- /**
1909
- * True if the window has been opened and its GoldenLayout instance initialised.
1910
- */
1911
- isInitialised: boolean;
1912
-
1913
- /**
1914
- * Creates a window configuration object from the Popout.
1915
- */
1916
- toConfig(): {
1917
- dimensions: {
1918
- width: number;
1919
- height: number;
1920
- left: number;
1921
- top: number;
1922
- };
1923
- content: Config;
1924
- parentId: string;
1925
- indexInParent: number;
1926
- };
1927
-
1928
- /**
1929
- * Returns the GoldenLayout instance from the child window
1930
- */
1931
- getGlInstance(): GoldenLayout_2;
1932
-
1933
- /**
1934
- * Returns the native Window object
1935
- */
1936
- getWindow(): Window;
1937
-
1938
- /**
1939
- * Closes the popout
1940
- */
1941
- close(): void;
1942
-
1943
- /**
1944
- * Returns the popout to its original position as specified in parentId and indexInParent
1945
- */
1946
- popIn(): void;
1947
- }
1948
-
1949
1910
  /**
1950
1911
  * Extracts a single event type matching the given key from the View {@link Event} union.
1951
1912
  *
@@ -3317,31 +3278,6 @@ declare class ColumnOrRow extends LayoutNode {
3317
3278
  getContent: () => Promise<(ColumnOrRow | TabStack)[]>;
3318
3279
  }
3319
3280
 
3320
- declare interface ComponentConfig extends ItemConfig {
3321
- /**
3322
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'component'.
3323
- */
3324
- componentName: string;
3325
-
3326
- /**
3327
- * A serialisable object. Will be passed to the component constructor function and will be the value returned by
3328
- * container.getState().
3329
- */
3330
- componentState?: any;
3331
- }
3332
-
3333
- declare interface Config {
3334
- settings?: Settings;
3335
- dimensions?: Dimensions;
3336
- labels?: Labels;
3337
- content?: ItemConfigType[];
3338
- /**
3339
- * (Only on layout config object)
3340
- * Id of the currently maximised content item
3341
- */
3342
- maximisedItemId?: string;
3343
- }
3344
-
3345
3281
  declare type ConfigWithRuntime = BaseConfig & {
3346
3282
  runtime: RuntimeConfig;
3347
3283
  };
@@ -3719,103 +3655,6 @@ declare type ConstWindowOptions = {
3719
3655
  inheritance?: Partial<InheritableOptions>;
3720
3656
  };
3721
3657
 
3722
- declare interface Container extends EventEmitter_2 {
3723
- /**
3724
- * The current width of the container in pixel
3725
- */
3726
- width: number;
3727
-
3728
- /**
3729
- * The current height of the container in pixel
3730
- */
3731
- height: number;
3732
-
3733
- /**
3734
- * A reference to the component-item that controls this container
3735
- */
3736
- parent: ContentItem;
3737
-
3738
- /**
3739
- * A reference to the tab that controls this container. Will initially be null
3740
- * (and populated once a tab event has been fired).
3741
- */
3742
- tab: Tab;
3743
-
3744
- /**
3745
- * The current title of the container
3746
- */
3747
- title: string;
3748
-
3749
- /*
3750
- * A reference to the GoldenLayout instance this container belongs to
3751
- */
3752
- layoutManager: GoldenLayout_2;
3753
-
3754
- /**
3755
- * True if the item is currently hidden
3756
- */
3757
- isHidden: boolean;
3758
-
3759
- /**
3760
- * Overwrites the components state with the provided value. To only change parts of the componentState see
3761
- * extendState below. This is the main mechanism for saving the state of a component. This state will be the
3762
- * value of componentState when layout.toConfig() is called and will be passed back to the component's
3763
- * constructor function. It will also be used when the component is opened in a new window.
3764
- * @param state A serialisable object
3765
- */
3766
- setState(state: any): void;
3767
-
3768
- /**
3769
- * The same as setState but does not emit 'stateChanged' event
3770
- * @param {serialisable} state
3771
- */
3772
- setStateSkipEvent(state: any): void;
3773
-
3774
- /**
3775
- * This is similar to setState, but merges the provided state into the current one, rather than overwriting it.
3776
- * @param state A serialisable object
3777
- */
3778
- extendState(state: any): void;
3779
-
3780
- /**
3781
- * Returns the current state.
3782
- */
3783
- getState(): any;
3784
-
3785
- /**
3786
- * Returns the container's inner element as a jQuery element
3787
- */
3788
- getElement(): JQuery;
3789
-
3790
- /**
3791
- * hides the container or returns false if hiding it is not possible
3792
- */
3793
- hide(): boolean;
3794
-
3795
- /**
3796
- * shows the container or returns false if showing it is not possible
3797
- */
3798
- show(): boolean;
3799
-
3800
- /**
3801
- * Sets the container to the specified size or returns false if that's not possible
3802
- * @param width the new width in pixel
3803
- * @param height the new height in pixel
3804
- */
3805
- setSize(width: number, height: number): boolean;
3806
-
3807
- /**
3808
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
3809
- * @param title the new title
3810
- */
3811
- setTitle(title: string): void;
3812
-
3813
- /**
3814
- * Closes the container or returns false if that is not possible
3815
- */
3816
- close(): boolean;
3817
- }
3818
-
3819
3658
  /**
3820
3659
  * Generated when content navigation or redirection is blocked by {@link OpenFin.DomainSettings}.
3821
3660
  */
@@ -3889,218 +3728,6 @@ declare type ContentCreationRulesEvent = NamedEvent & {
3889
3728
  disposition: string;
3890
3729
  };
3891
3730
 
3892
- declare interface ContentItem extends EventEmitter_2 {
3893
- instance: any;
3894
- header: any;
3895
- _splitter: any;
3896
- /**
3897
- * This items configuration in its current state
3898
- */
3899
- config: ItemConfigType;
3900
-
3901
- /**
3902
- * The type of the item. Can be row, column, stack, component or root
3903
- */
3904
- type: ItemType;
3905
-
3906
- /**
3907
- * An array of items that are children of this item
3908
- */
3909
- contentItems: ContentItem[];
3910
-
3911
- container: Container;
3912
- /**
3913
- * The item that is this item's parent (or null if the item is root)
3914
- */
3915
- parent: ContentItem;
3916
-
3917
- /**
3918
- * A String or array of identifiers if provided in the configuration
3919
- */
3920
- id: string;
3921
-
3922
- /**
3923
- * True if the item had been initialised
3924
- */
3925
- isInitialised: boolean;
3926
-
3927
- /**
3928
- * True if the item is maximised
3929
- */
3930
- isMaximised: boolean;
3931
-
3932
- /**
3933
- * True if the item is the layout's root item
3934
- */
3935
- isRoot: boolean;
3936
-
3937
- /**
3938
- * True if the item is a row
3939
- */
3940
- isRow: boolean;
3941
-
3942
- /**
3943
- * True if the item is a column
3944
- */
3945
- isColumn: boolean;
3946
-
3947
- /**
3948
- * True if the item is a stack
3949
- */
3950
- isStack: boolean;
3951
-
3952
- /**
3953
- * True if the item is a component
3954
- */
3955
- isComponent: boolean;
3956
-
3957
- /**
3958
- * A reference to the layoutManager that controls this item
3959
- */
3960
- layoutManager: any;
3961
-
3962
- /**
3963
- * The item's outer element
3964
- */
3965
- element: JQuery;
3966
-
3967
- /**
3968
- * The item's inner element. Can be the same as the outer element.
3969
- */
3970
- childElementContainer: Container;
3971
-
3972
- /**
3973
- * Adds an item as a child to this item. If the item is already a part of a layout it will be removed
3974
- * from its original position before adding it to this item.
3975
- * @param itemOrItemConfig A content item (or tree of content items) or an ItemConfiguration to create the item from
3976
- * @param index last index An optional index that determines at which position the new item should be added. Default: last index.
3977
- */
3978
- addChild(itemOrItemConfig: ContentItem | ItemConfigType, index?: number): void;
3979
-
3980
- /**
3981
- * Destroys the item and all it's children
3982
- * @param contentItem The contentItem that should be removed
3983
- * @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.
3984
- */
3985
- removeChild(contentItem: ContentItem, keepChild?: boolean): void;
3986
-
3987
- /**
3988
- * The contentItem that should be removed
3989
- * @param oldChild ContentItem The contentItem that should be removed
3990
- * @param newChild A content item (or tree of content items) or an ItemConfiguration to create the item from
3991
- */
3992
- replaceChild(oldChild: ContentItem, newChild: ContentItem | ItemConfigType): void;
3993
-
3994
- /**
3995
- * Updates the items size. To actually assign a new size from within a component, use container.setSize( width, height )
3996
- */
3997
- setSize(): void;
3998
-
3999
- /**
4000
- * Sets the item's title to the provided value. Triggers titleChanged and stateChanged events
4001
- * @param title the new title
4002
- */
4003
- setTitle(title: string): void;
4004
-
4005
- /**
4006
- * A powerful, yet admittedly confusing method to recursively call methods on items in a tree. Usually you wouldn't need
4007
- * to use it directly, but it's used internally to setSizes, destroy parts of the item tree etc.
4008
- * @param functionName The name of the method to invoke
4009
- * @param functionArguments An array of arguments to pass to every function
4010
- * @param bottomUp If true, the method is invoked on the lowest parts of the tree first and then bubbles upwards. Default: false
4011
- * @param skipSelf If true, the method will only be invoked on the item's children, but not on the item itself. Default: false
4012
- */
4013
- callDownwards(functionName: string, functionArguments?: any[], bottomUp?: boolean, skipSelf?: boolean): void;
4014
-
4015
- /**
4016
- * 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.
4017
- */
4018
- emitBubblingEvent(name: string): void;
4019
-
4020
- /**
4021
- * Convenience method for item.parent.removeChild( item )
4022
- */
4023
- remove(): void;
4024
-
4025
- /**
4026
- * Removes the item from its current position in the layout and opens it in a window
4027
- */
4028
- popout(): BrowserWindow;
4029
-
4030
- /**
4031
- * Maximises the item or minimises it if it's already maximised
4032
- */
4033
- toggleMaximise(): void;
4034
-
4035
- /**
4036
- * Selects the item. Only relevant if settings.selectionEnabled is set to true
4037
- */
4038
- select(): void;
4039
-
4040
- /**
4041
- * Unselects the item. Only relevant if settings.selectionEnabled is set to true
4042
- */
4043
- deselect(): void;
4044
-
4045
- /**
4046
- * Returns true if the item has the specified id or false if not
4047
- * @param id An id to check for
4048
- */
4049
- hasId(id: string): boolean;
4050
-
4051
- /**
4052
- * Only Stacks have this method! It's the programmatical equivalent of clicking a tab.
4053
- * @param contentItem The new active content item
4054
- * @param preventFocus [OpenFin Custom] Indicates to openfin that the view should not be focused when activated.
4055
- */
4056
- // (CORE-198)[../docs/golden-layout-changelog.md#CORE-198 stack.setActiveView]
4057
- setActiveContentItem(contentItem: ContentItem, preventFocus?: boolean): void;
4058
-
4059
- /**
4060
- * Only Stacks have this method! Returns the currently selected contentItem.
4061
- */
4062
- getActiveContentItem(): ContentItem;
4063
-
4064
- /**
4065
- * Adds an id to an item or does nothing if the id is already present
4066
- * @param id The id to be added
4067
- */
4068
- addId(id: string): void;
4069
-
4070
- /**
4071
- * Removes an id from an item or throws an error if the id couldn't be found
4072
- * @param id The id to be removed
4073
- */
4074
- removeId(id: string): void;
4075
-
4076
- /**
4077
- * Calls filterFunction recursively for every item in the tree. If the function returns true the item is added to the resulting array
4078
- * @param filterFunction A function that determines whether an item matches certain criteria
4079
- */
4080
- getItemsByFilter(filterFunction: (contentItem: ContentItem) => boolean): ContentItem[];
4081
-
4082
- /**
4083
- * Returns all items with the specified id.
4084
- * @param id An id specified in the itemConfig
4085
- */
4086
- getItemsById(id: string | string[]): ContentItem[];
4087
-
4088
- /**
4089
- * Returns all items with the specified type
4090
- * @param type 'row', 'column', 'stack', 'component' or 'root'
4091
- */
4092
- getItemsByType(type: string): ContentItem[];
4093
-
4094
- /**
4095
- * Returns all instances of the component with the specified componentName
4096
- * @param componentName a componentName as specified in the itemConfig
4097
- */
4098
- getComponentsByName(componentName: string): any;
4099
-
4100
- _contentAreaDimensions: any;
4101
- _$getArea: () => any;
4102
- }
4103
-
4104
3731
  /**
4105
3732
  * Restrict navigation to URLs that match an allowed pattern.
4106
3733
  * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
@@ -4528,46 +4155,6 @@ declare type DidFinishLoadEvent = NamedEvent & {
4528
4155
  type: 'did-finish-load';
4529
4156
  };
4530
4157
 
4531
- declare interface Dimensions {
4532
- /**
4533
- * The width of the borders between the layout items in pixel. Please note: The actual draggable area is wider
4534
- * than the visible one, making it safe to set this to small values without affecting usability.
4535
- * Default: 5
4536
- */
4537
- borderWidth?: number;
4538
-
4539
- /**
4540
- * The minimum height an item can be resized to (in pixel).
4541
- * Default: 10
4542
- */
4543
- minItemHeight?: number;
4544
-
4545
- /**
4546
- * The minimum width an item can be resized to (in pixel).
4547
- * Default: 10
4548
- */
4549
- minItemWidth?: number;
4550
-
4551
- /**
4552
- * The height of the header elements in pixel. This can be changed, but your theme's header css needs to be
4553
- * adjusted accordingly.
4554
- * Default: 20
4555
- */
4556
- headerHeight?: number;
4557
-
4558
- /**
4559
- * The width of the element that appears when an item is dragged (in pixel).
4560
- * Default: 300
4561
- */
4562
- dragProxyWidth?: number;
4563
-
4564
- /**
4565
- * The height of the element that appears when an item is dragged (in pixel).
4566
- * Default: 200
4567
- */
4568
- dragProxyHeight?: number;
4569
- }
4570
-
4571
4158
  /**
4572
4159
  * @interface
4573
4160
  */
@@ -4817,8 +4404,6 @@ declare type Dpi = {
4817
4404
  vertical?: number;
4818
4405
  };
4819
4406
 
4820
- declare interface DragSource {}
4821
-
4822
4407
  /**
4823
4408
  * Generated when a window has been embedded.
4824
4409
  * @interface
@@ -5124,43 +4709,6 @@ declare class EventAggregator extends EmitterMap {
5124
4709
  dispatchEvent: (message: Message<any>) => boolean;
5125
4710
  }
5126
4711
 
5127
- declare interface EventEmitter_2 {
5128
- [x: string]: any;
5129
- /**
5130
- * Subscribe to an event
5131
- * @param eventName The name of the event to describe to
5132
- * @param callback The function that should be invoked when the event occurs
5133
- * @param context The value of the this pointer in the callback function
5134
- */
5135
- on(eventName: string, callback: Function, context?: any): void;
5136
-
5137
- /**
5138
- * Notify listeners of an event and pass arguments along
5139
- * @param eventName The name of the event to emit
5140
- */
5141
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5142
-
5143
- /**
5144
- * Alias for emit
5145
- */
5146
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5147
-
5148
- /**
5149
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
5150
- * eventName and callback or just a specific callback with a specific context if invoked with all three
5151
- * arguments.
5152
- * @param eventName The name of the event to unsubscribe from
5153
- * @param callback The function that should be invoked when the event occurs
5154
- * @param context The value of the this pointer in the callback function
5155
- */
5156
- unbind(eventName: string, callback?: Function, context?: any): void;
5157
-
5158
- /**
5159
- * Alias for unbind
5160
- */
5161
- off(eventName: string, callback?: Function, context?: any): void;
5162
- }
5163
-
5164
4712
  /**
5165
4713
  * Handler for an event on an EventEmitter.
5166
4714
  * @remarks Selects the correct type for the event
@@ -6248,343 +5796,96 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
6248
5796
  * .then(() => {
6249
5797
  * console.log('Success');
6250
5798
  * })
6251
- * .catch(err => {
6252
- * console.log('Error registering the hotkey', err);
6253
- * });
6254
- * ```
6255
- */
6256
- register(hotkey: string, listener: (...args: any[]) => void): Promise<void>;
6257
- /**
6258
- * Unregisters a global hotkey with the operating system.
6259
- * @param hotkey a hotkey string
6260
- *
6261
- * @remarks This method will unregister all existing registrations of the hotkey within the application.
6262
- * Raises the `unregistered` event.
6263
- *
6264
- * @example
6265
- * ```js
6266
- * const hotkey = 'CommandOrControl+X';
6267
- *
6268
- * fin.GlobalHotkey.unregister(hotkey)
6269
- * .then(() => {
6270
- * console.log('Success');
6271
- * })
6272
- * .catch(err => {
6273
- * console.log('Error unregistering the hotkey', err);
6274
- * });
6275
- * ```
6276
- */
6277
- unregister(hotkey: string): Promise<void>;
6278
- /**
6279
- * Unregisters all global hotkeys for the current application.
6280
- *
6281
- * @remarks Raises the `unregistered` event for each hotkey unregistered.
6282
- *
6283
- * @example
6284
- * ```js
6285
- * fin.GlobalHotkey.unregisterAll()
6286
- * .then(() => {
6287
- * console.log('Success');
6288
- * })
6289
- * .catch(err => {
6290
- * console.log('Error unregistering all hotkeys for this application', err);
6291
- * });
6292
- * ```
6293
- */
6294
- unregisterAll(): Promise<void>;
6295
- /**
6296
- * Checks if a given hotkey has been registered by an application within the current runtime.
6297
- * @param hotkey a hotkey string
6298
- *
6299
- * @example
6300
- * ```js
6301
- * const hotkey = 'CommandOrControl+X';
6302
- *
6303
- * fin.GlobalHotkey.isRegistered(hotkey)
6304
- * .then((registered) => {
6305
- * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
6306
- * })
6307
- * .catch(err => {
6308
- * console.log('Error unregistering the hotkey', err);
6309
- * });
6310
- * ```
6311
- */
6312
- isRegistered(hotkey: string): Promise<boolean>;
6313
- }
6314
-
6315
- /**
6316
- * @deprecated Renamed to {@link Event}.
6317
- */
6318
- declare type GlobalHotkeyEvent = Event_9;
6319
-
6320
- declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6321
-
6322
- declare namespace GlobalHotkeyEvents {
6323
- export {
6324
- BaseEvent_8 as BaseEvent,
6325
- RegisteredEvent,
6326
- UnregisteredEvent,
6327
- Event_9 as Event,
6328
- GlobalHotkeyEvent,
6329
- EventType_6 as EventType,
6330
- GlobalHotkeyEventType,
6331
- Payload_7 as Payload,
6332
- ByType_6 as ByType
6333
- }
6334
- }
6335
-
6336
- /**
6337
- * @deprecated Renamed to {@link EventType}.
6338
- */
6339
- declare type GlobalHotkeyEventType = EventType_6;
6340
-
6341
- declare namespace GoldenLayout {
6342
- export {
6343
- GoldenLayout_2 as GoldenLayout,
6344
- ItemConfigType,
6345
- Settings,
6346
- Dimensions,
6347
- Labels,
6348
- ItemType,
6349
- ItemConfig,
6350
- ComponentConfig,
6351
- ReactComponentConfig,
6352
- Config,
6353
- ContentItem,
6354
- Container,
6355
- DragSource,
6356
- BrowserWindow,
6357
- Header,
6358
- TabDragListener,
6359
- Tab,
6360
- EventEmitter_2 as EventEmitter
6361
- }
6362
- }
6363
-
6364
- declare class GoldenLayout_2 implements EventEmitter_2 {
6365
- /**
6366
- * The topmost item in the layout item tree. In browser terms: Think of the GoldenLayout instance as window
6367
- * object and of goldenLayout.root as the document.
6368
- */
6369
- root: ContentItem;
6370
-
6371
- /**
6372
- * A reference to the (jQuery) DOM element containing the layout
6373
- */
6374
- container: JQuery;
6375
-
6376
- /**
6377
- * True once the layout item tree has been created and the initialised event has been fired
6378
- */
6379
- isInitialised: boolean;
6380
-
6381
- /**
6382
- * A reference to the current, extended top level config.
6383
- *
6384
- * Don't rely on this object for state saving / serialisation. Use layout.toConfig() instead.
6385
- */
6386
- config: Config;
6387
-
6388
- /**
6389
- * The currently selected item or null if no item is selected. Only relevant if settings.selectionEnabled is set
6390
- * to true.
6391
- */
6392
- selectedItem: ContentItem;
6393
-
6394
- /**
6395
- * The current outer width of the layout in pixels.
6396
- */
6397
- width: number;
6398
-
6399
- /**
6400
- * The current outer height of the layout in pixels.
6401
- */
6402
- height: number;
6403
-
6404
- /**
6405
- * An array of BrowserWindow instances
6406
- */
6407
- openPopouts: BrowserWindow[];
6408
-
6409
- /**
6410
- * True if the layout has been opened as a popout by another layout.
6411
- */
6412
- isSubWindow: boolean;
6413
-
6414
- /**
6415
- * A singleton instance of EventEmitter that works across windows
6416
- */
6417
- eventHub: EventEmitter_2;
6418
-
6419
- _dragProxy: any;
6420
-
6421
- dropTargetIndicator: any;
6422
-
6423
- _isFullPage: boolean;
6424
-
6425
- _onUnload: any;
6426
-
6427
- tabDropPlaceholder: any;
6428
-
6429
- transitionIndicator: any;
6430
-
6431
- _dragSources: any;
6432
-
6433
- _resizeFunction: any;
6434
-
6435
- _unloadFunction: any;
6436
-
6437
- /**
6438
- * @param config A GoldenLayout configuration object
6439
- * @param container The DOM element the layout will be initialised in. Default: document.body
6440
- */
6441
- constructor(configuration: Config, container?: Element | HTMLElement | JQuery);
6442
-
6443
- /*
6444
- * @param name The name of the component, as referred to by componentName in the component configuration.
6445
- * @param component A constructor or factory function. Will be invoked with new and two arguments, a
6446
- * containerobject and a component state
6447
- */
6448
- registerComponent(name: String, component: any): void;
6449
-
6450
- /**
6451
- * Renders the layout into the container. If init() is called before the document is ready it attaches itself as
6452
- * a listener to the document and executes once it becomes ready.
6453
- */
6454
- init(): void;
6455
-
6456
- /**
6457
- * Returns the current state of the layout and its components as a serialisable object.
6458
- */
6459
- toConfig(): Config;
6460
-
6461
- /**
6462
- * Returns a component that was previously registered with layout.registerComponent().
6463
- * @param name The name of a previously registered component
6464
- */
6465
- getComponent(name: string): any;
6466
-
6467
- /**
6468
- * Resizes the layout. If no arguments are provided GoldenLayout measures its container and resizes accordingly.
6469
- * @param width The outer width the layout should be resized to. Default: The container elements width
6470
- * @param height The outer height the layout should be resized to. Default: The container elements height
6471
- */
6472
- updateSize(width?: number, height?: number): void;
6473
-
6474
- /**
6475
- * Destroys the layout. Recursively calls destroy on all components and content items, removes all event
6476
- * listeners and finally removes itself from the DOM.
6477
- */
6478
- destroy(): void;
6479
-
6480
- /**
6481
- * Creates a new content item or tree of content items from configuration. Usually you wouldn't call this
6482
- * directly, but instead use methods like layout.createDragSource(), item.addChild() or item.replaceChild() that
6483
- * all call this method implicitly.
6484
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6485
- * @param parent A parent item
6486
- */
6487
- createContentItem(itemConfiguration?: ItemConfigType, parent?: ContentItem): ContentItem;
6488
-
6489
- /**
6490
- * Creates a new popout window with configOrContentItem as contents at the position specified in dimensions
6491
- * @param configOrContentItem The content item or config that will be created in the new window. If a item is
6492
- * provided its config will be read, if config is provided, only the content key
6493
- * will be used
6494
- * @param dimensions A map containing the keys left, top, width and height. Left and top can be negative to
6495
- * place the window in another screen.
6496
- * @param parentId The id of the item within the current layout the child window's content will be appended to
6497
- * when popIn is clicked
6498
- * @param indexInParent The index at which the child window's contents will be appended to. Default: null
6499
- */
6500
- createPopout(
6501
- configOrContentItem: ItemConfigType | ContentItem,
6502
- dimensions: {
6503
- width: number;
6504
- height: number;
6505
- left: number;
6506
- top: number;
6507
- },
6508
- parentId?: string,
6509
- indexInParent?: number
6510
- ): void;
6511
-
6512
- /**
6513
- * Turns a DOM element into a dragSource, meaning that the user can drag the element directly onto the layout
6514
- * where it turns into a contentItem.
6515
- * @param element The DOM element that will be turned into a dragSource
6516
- * @param itemConfiguration An item configuration (can be an entire tree of items)
6517
- * @return the dragSource that was created. This can be used to remove the
6518
- * dragSource from the layout later.
6519
- */
6520
- createDragSource(element: HTMLElement | JQuery, itemConfiguration: ItemConfigType): DragSource;
6521
-
6522
- /**
6523
- * Removes a dragSource from the layout.
6524
- *
6525
- * @param dragSource The dragSource to remove
6526
- */
6527
- removeDragSource(dragSource: DragSource): void;
6528
-
6529
- /**
6530
- * If settings.selectionEnabled is set to true, this allows to select items programmatically.
6531
- * @param contentItem A ContentItem instance
6532
- */
6533
- selectItem(contentItem: ContentItem): void;
6534
-
6535
- /**
6536
- * Static method on the GoldenLayout constructor! This method will iterate through a GoldenLayout config object
6537
- * and replace frequent keys and values with single letter substitutes.
6538
- * @param config A GoldenLayout configuration object
6539
- */
6540
- static minifyConfig(config: any): any;
6541
-
6542
- /**
6543
- * Static method on the GoldenLayout constructor! This method will reverse the minifications of minifyConfig.
6544
- * @param minifiedConfig A minified GoldenLayout configuration object
5799
+ * .catch(err => {
5800
+ * console.log('Error registering the hotkey', err);
5801
+ * });
5802
+ * ```
6545
5803
  */
6546
- static unminifyConfig(minifiedConfig: any): any;
6547
-
5804
+ register(hotkey: string, listener: (...args: any[]) => void): Promise<void>;
6548
5805
  /**
6549
- * Subscribe to an event
6550
- * @param eventName The name of the event to describe to
6551
- * @param callback The function that should be invoked when the event occurs
6552
- * @param context The value of the this pointer in the callback function
5806
+ * Unregisters a global hotkey with the operating system.
5807
+ * @param hotkey a hotkey string
5808
+ *
5809
+ * @remarks This method will unregister all existing registrations of the hotkey within the application.
5810
+ * Raises the `unregistered` event.
5811
+ *
5812
+ * @example
5813
+ * ```js
5814
+ * const hotkey = 'CommandOrControl+X';
5815
+ *
5816
+ * fin.GlobalHotkey.unregister(hotkey)
5817
+ * .then(() => {
5818
+ * console.log('Success');
5819
+ * })
5820
+ * .catch(err => {
5821
+ * console.log('Error unregistering the hotkey', err);
5822
+ * });
5823
+ * ```
6553
5824
  */
6554
- on(eventName: string, callback: Function, context?: any): void;
6555
-
5825
+ unregister(hotkey: string): Promise<void>;
6556
5826
  /**
6557
- * Notify listeners of an event and pass arguments along
6558
- * @param eventName The name of the event to emit
5827
+ * Unregisters all global hotkeys for the current application.
5828
+ *
5829
+ * @remarks Raises the `unregistered` event for each hotkey unregistered.
5830
+ *
5831
+ * @example
5832
+ * ```js
5833
+ * fin.GlobalHotkey.unregisterAll()
5834
+ * .then(() => {
5835
+ * console.log('Success');
5836
+ * })
5837
+ * .catch(err => {
5838
+ * console.log('Error unregistering all hotkeys for this application', err);
5839
+ * });
5840
+ * ```
6559
5841
  */
6560
- emit(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
6561
-
5842
+ unregisterAll(): Promise<void>;
6562
5843
  /**
6563
- * Alias for emit
5844
+ * Checks if a given hotkey has been registered by an application within the current runtime.
5845
+ * @param hotkey a hotkey string
5846
+ *
5847
+ * @example
5848
+ * ```js
5849
+ * const hotkey = 'CommandOrControl+X';
5850
+ *
5851
+ * fin.GlobalHotkey.isRegistered(hotkey)
5852
+ * .then((registered) => {
5853
+ * console.log(`hotkey ${hotkey} is registered ? ${registered}`);
5854
+ * })
5855
+ * .catch(err => {
5856
+ * console.log('Error unregistering the hotkey', err);
5857
+ * });
5858
+ * ```
6564
5859
  */
6565
- trigger(eventName: string, arg1?: any, arg2?: any, ...argN: any[]): void;
5860
+ isRegistered(hotkey: string): Promise<boolean>;
5861
+ }
6566
5862
 
6567
- /**
6568
- * Unsubscribes either all listeners if just an eventName is provided, just a specific callback if invoked with
6569
- * eventName and callback or just a specific callback with a specific context if invoked with all three
6570
- * arguments.
6571
- * @param eventName The name of the event to unsubscribe from
6572
- * @param callback The function that should be invoked when the event occurs
6573
- * @param context The value of the this pointer in the callback function
6574
- */
6575
- unbind(eventName: string, callback?: Function, context?: any): void;
5863
+ /**
5864
+ * @deprecated Renamed to {@link Event}.
5865
+ */
5866
+ declare type GlobalHotkeyEvent = Event_9;
6576
5867
 
6577
- /**
6578
- * Alias for unbind
6579
- */
6580
- off(eventName: string, callback?: Function, context?: any): void;
5868
+ declare type GlobalHotkeyEvent_2 = Events.GlobalHotkeyEvents.GlobalHotkeyEvent;
6581
5869
 
6582
- /**
6583
- * Internal method that create drop areas on the far edges of window, e.g. far-right of window
6584
- */
6585
- _$createRootItemAreas(): void;
5870
+ declare namespace GlobalHotkeyEvents {
5871
+ export {
5872
+ BaseEvent_8 as BaseEvent,
5873
+ RegisteredEvent,
5874
+ UnregisteredEvent,
5875
+ Event_9 as Event,
5876
+ GlobalHotkeyEvent,
5877
+ EventType_6 as EventType,
5878
+ GlobalHotkeyEventType,
5879
+ Payload_7 as Payload,
5880
+ ByType_6 as ByType
5881
+ }
6586
5882
  }
6587
5883
 
5884
+ /**
5885
+ * @deprecated Renamed to {@link EventType}.
5886
+ */
5887
+ declare type GlobalHotkeyEventType = EventType_6;
5888
+
6588
5889
  /**
6589
5890
  * @interface
6590
5891
  */
@@ -6592,62 +5893,6 @@ declare type GpuInfo = {
6592
5893
  name: string;
6593
5894
  };
6594
5895
 
6595
- declare interface Header {
6596
- /**
6597
- * A reference to the LayoutManager instance
6598
- */
6599
- layoutManager: GoldenLayout_2;
6600
-
6601
- /**
6602
- * A reference to the Stack this Header belongs to
6603
- */
6604
- parent: ContentItem;
6605
-
6606
- /**
6607
- * An array of the Tabs within this header
6608
- */
6609
- tabs: Tab[];
6610
-
6611
- /**
6612
- * The currently selected activeContentItem
6613
- */
6614
- activeContentItem: ContentItem;
6615
-
6616
- /**
6617
- * The outer (jQuery) DOM element of this Header
6618
- */
6619
- element: JQuery;
6620
-
6621
- /**
6622
- * The (jQuery) DOM element containing the tabs
6623
- */
6624
- tabsContainer: JQuery;
6625
-
6626
- /**
6627
- * The (jQuery) DOM element containing the close, maximise and popout button
6628
- */
6629
- controlsContainer: JQuery;
6630
-
6631
- /**
6632
- * Hides the currently selected contentItem, shows the specified one and highlights its tab.
6633
- * @param contentItem The content item that will be selected
6634
- */
6635
- setActiveContentItem(contentItem: ContentItem): void;
6636
-
6637
- /**
6638
- * Creates a new tab and associates it with a content item
6639
- * @param contentItem The content item the tab will be associated with
6640
- * @param index A zero based index, specifying the position of the new tab
6641
- */
6642
- createTab(contentItem: ContentItem, index?: number): void;
6643
-
6644
- /**
6645
- * Finds a tab by its contentItem and removes it
6646
- * @param contentItem The content item the tab is associated with
6647
- */
6648
- removeTab(contentItem: ContentItem): void;
6649
- }
6650
-
6651
5896
  /**
6652
5897
  * Generated when a View is hidden.
6653
5898
  * @interface
@@ -7852,9 +7097,7 @@ declare class InteropClient extends Base {
7852
7097
  * ```
7853
7098
  *
7854
7099
  *
7855
- * We are also testing the ability to add a context handler for specific contexts. If you would like to use
7856
- * this, please make sure you add your context handlers at the top level of your application, on a page that
7857
- * does not navigate/reload/re-render, to avoid memory leaks. This feature is experimental:
7100
+ * Passing in a context type as the second parameter will cause the handler to only be invoked with that context type.
7858
7101
  *
7859
7102
  * ```js
7860
7103
  * function handleInstrumentContext(contextInfo) {
@@ -8236,50 +7479,6 @@ declare class InteropModule extends Base {
8236
7479
  connectSync(name: string, interopConfig?: OpenFin.InteropConfig): InteropClient;
8237
7480
  }
8238
7481
 
8239
- declare interface ItemConfig {
8240
- /**
8241
- * The type of the item. Possible values are 'row', 'column', 'stack', 'component' and 'react-component'.
8242
- */
8243
- type: ItemType;
8244
-
8245
- /**
8246
- * An array of configurations for items that will be created as children of this item.
8247
- */
8248
- content?: ItemConfigType[];
8249
-
8250
- /**
8251
- * The width of this item, relative to the other children of its parent in percent
8252
- */
8253
- width?: number;
8254
-
8255
- /**
8256
- * The height of this item, relative to the other children of its parent in percent
8257
- */
8258
- height?: number;
8259
-
8260
- /**
8261
- * A String or an Array of Strings. Used to retrieve the item using item.getItemsById()
8262
- */
8263
- id?: string | string[];
8264
-
8265
- /**
8266
- * Determines if the item is closable. If false, the x on the items tab will be hidden and container.close()
8267
- * will return false
8268
- * Default: true
8269
- */
8270
- isClosable?: boolean;
8271
-
8272
- /**
8273
- * The title of the item as displayed on its tab and on popout windows
8274
- * Default: componentName or ''
8275
- */
8276
- title?: string;
8277
- }
8278
-
8279
- declare type ItemConfigType = ItemConfig | ComponentConfig | ReactComponentConfig;
8280
-
8281
- declare type ItemType = 'row' | 'column' | 'stack' | 'root' | 'component';
8282
-
8283
7482
  /**
8284
7483
  * @interface
8285
7484
  */
@@ -8337,32 +7536,6 @@ declare type JumpListTask = {
8337
7536
  iconIndex?: number;
8338
7537
  };
8339
7538
 
8340
- declare interface Labels {
8341
- /**
8342
- * The tooltip text that appears when hovering over the close icon.
8343
- * Default: 'close'
8344
- */
8345
- close?: string;
8346
-
8347
- /**
8348
- * The tooltip text that appears when hovering over the maximise icon.
8349
- * Default: 'maximise'
8350
- */
8351
- maximise?: string;
8352
-
8353
- /**
8354
- * The tooltip text that appears when hovering over the minimise icon.
8355
- * Default: 'minimise'
8356
- */
8357
- minimise?: string;
8358
-
8359
- /**
8360
- * The tooltip text that appears when hovering over the popout icon.
8361
- * Default: 'open in new window'
8362
- */
8363
- popout?: string;
8364
- }
8365
-
8366
7539
  /**
8367
7540
  * The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
8368
7541
  *
@@ -8788,7 +7961,7 @@ declare type LayoutEntityDefinition<TLayoutEntityType extends LayoutEntityTypes
8788
7961
  entityId: string;
8789
7962
  };
8790
7963
 
8791
- declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'root'>;
7964
+ declare type LayoutEntityTypes = 'column' | 'row' | 'stack';
8792
7965
 
8793
7966
  /**
8794
7967
  * @interface
@@ -10162,6 +9335,7 @@ declare namespace OpenFin {
10162
9335
  AppVersionError,
10163
9336
  AppVersionRuntimeInfo,
10164
9337
  LaunchEmitter,
9338
+ UserAppConfigArgs,
10165
9339
  RvmLaunchOptions,
10166
9340
  ShortCutConfig,
10167
9341
  TerminateExternalRequestType,
@@ -12694,18 +11868,6 @@ declare type QueryPermissionResult = {
12694
11868
  rawValue?: unknown;
12695
11869
  };
12696
11870
 
12697
- declare interface ReactComponentConfig extends ItemConfig {
12698
- /**
12699
- * The name of the component as specified in layout.registerComponent. Mandatory if type is 'react-component'
12700
- */
12701
- component: string;
12702
-
12703
- /**
12704
- * Properties that will be passed to the component and accessible using this.props.
12705
- */
12706
- props?: any;
12707
- }
12708
-
12709
11871
  /**
12710
11872
  * @interface
12711
11873
  */
@@ -12968,7 +12130,7 @@ declare type RunRequestedEvent = OpenFin.ApplicationEvents.RunRequestedEvent;
12968
12130
  declare type RunRequestedEvent_2 = BaseEvents.IdentityEvent & {
12969
12131
  topic: 'application';
12970
12132
  type: 'run-requested';
12971
- userAppConfigArgs: Record<string, any>;
12133
+ userAppConfigArgs: OpenFin.UserAppConfigArgs;
12972
12134
  manifest: OpenFin.Manifest;
12973
12135
  };
12974
12136
 
@@ -13083,7 +12245,7 @@ declare type RvmLaunchOptions = {
13083
12245
  * True if no UI when launching
13084
12246
  */
13085
12247
  noUi?: boolean;
13086
- userAppConfigArgs?: object;
12248
+ userAppConfigArgs?: UserAppConfigArgs;
13087
12249
  /**
13088
12250
  * Timeout in seconds until RVM launch request expires.
13089
12251
  */
@@ -13182,97 +12344,6 @@ declare type SessionContextGroup = {
13182
12344
  }>;
13183
12345
  };
13184
12346
 
13185
- declare interface Settings {
13186
- preventSplitterResize?: boolean;
13187
-
13188
- newTabButton?: {
13189
- url?: string;
13190
- };
13191
-
13192
- /**
13193
- * If true, tabs can't be dragged into the window.
13194
- * Default: false
13195
- */
13196
- preventDragIn?: boolean;
13197
-
13198
- /**
13199
- * If true, tabs can't be dragged out of the window.
13200
- * Default: false
13201
- */
13202
- preventDragOut?: boolean;
13203
-
13204
- /**
13205
- * If true, stack headers are the only areas where tabs can be dropped.
13206
- * Default: false
13207
- */
13208
- constrainDragToHeaders?: boolean;
13209
- /**
13210
- * Turns headers on or off. If false, the layout will be displayed with splitters only.
13211
- * Default: true
13212
- */
13213
- hasHeaders?: boolean;
13214
-
13215
- /**
13216
- * (Unused in Openfin Platform) Constrains the area in which items can be dragged to the layout's container. Will be set to false
13217
- * automatically when layout.createDragSource() is called.
13218
- * Default: true
13219
- */
13220
- constrainDragToContainer?: boolean;
13221
-
13222
- /**
13223
- * If true, the user can re-arrange the layout by dragging items by their tabs to the desired location.
13224
- * Default: true
13225
- */
13226
- reorderEnabled?: boolean;
13227
-
13228
- /**
13229
- * If true, the user can select items by clicking on their header. This sets the value of layout.selectedItem to
13230
- * the clicked item, highlights its header and the layout emits a 'selectionChanged' event.
13231
- * Default: false
13232
- */
13233
- selectionEnabled?: boolean;
13234
-
13235
- /**
13236
- * Decides what will be opened in a new window if the user clicks the popout icon. If true the entire stack will
13237
- * be transferred to the new window, if false only the active component will be opened.
13238
- * Default: false
13239
- */
13240
- popoutWholeStack?: boolean;
13241
-
13242
- /**
13243
- * Specifies if an error is thrown when a popout is blocked by the browser (e.g. by opening it programmatically).
13244
- * If false, the popout call will fail silently.
13245
- * Default: true
13246
- */
13247
- blockedPopoutsThrowError?: boolean;
13248
-
13249
- /**
13250
- * Specifies if all popouts should be closed when the page that created them is closed. Popouts don't have a
13251
- * strong dependency on their parent and can exist on their own, but can be quite annoying to close by hand. In
13252
- * addition, any changes made to popouts won't be stored after the parent is closed.
13253
- * Default: true
13254
- */
13255
- closePopoutsOnUnload?: boolean;
13256
-
13257
- /**
13258
- * Specifies if the popout icon should be displayed in the header-bar.
13259
- * Default: true
13260
- */
13261
- showPopoutIcon?: boolean;
13262
-
13263
- /**
13264
- * Specifies if the maximise icon should be displayed in the header-bar.
13265
- * Default: true
13266
- */
13267
- showMaximiseIcon?: boolean;
13268
-
13269
- /**
13270
- * Specifies if the close icon should be displayed in the header-bar.
13271
- * Default: true
13272
- */
13273
- showCloseIcon?: boolean;
13274
- }
13275
-
13276
12347
  /**
13277
12348
  * @interface
13278
12349
  */
@@ -15163,59 +14234,6 @@ declare type SystemShutdownHandler = (shutdownEvent: {
15163
14234
  proceed: () => void;
15164
14235
  }) => void;
15165
14236
 
15166
- declare interface Tab {
15167
- _dragListener: TabDragListener;
15168
-
15169
- /**
15170
- * True if this tab is the selected tab
15171
- */
15172
- isActive: boolean;
15173
-
15174
- /**
15175
- * A reference to the header this tab is a child of
15176
- */
15177
- header: Header;
15178
-
15179
- /**
15180
- * A reference to the content item this tab relates to
15181
- */
15182
- contentItem: ContentItem;
15183
-
15184
- /**
15185
- * The tabs outer (jQuery) DOM element
15186
- */
15187
- element: JQuery;
15188
-
15189
- /**
15190
- * The (jQuery) DOM element containing the title
15191
- */
15192
- titleElement: JQuery;
15193
-
15194
- /**
15195
- * The (jQuery) DOM element that closes the tab
15196
- */
15197
- closeElement: JQuery;
15198
-
15199
- /**
15200
- * Sets the tab's title. Does not affect the contentItem's title!
15201
- * @param title The new title
15202
- */
15203
- setTitle(title: string): void;
15204
-
15205
- /**
15206
- * Sets this tab's active state. To programmatically switch tabs, use header.setActiveContentItem( item ) instead.
15207
- * @param isActive Whether the tab is active
15208
- */
15209
- setActive(isActive: boolean): void;
15210
- }
15211
-
15212
- declare interface TabDragListener extends EventEmitter_2 {
15213
- /**
15214
- * A reference to the content item this tab relates to
15215
- */
15216
- contentItem: ContentItem;
15217
- }
15218
-
15219
14237
  /**
15220
14238
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15221
14239
  */
@@ -15581,6 +14599,11 @@ declare type UrlChangedEvent = BaseUrlEvent & ({
15581
14599
  httpStatusText: string;
15582
14600
  });
15583
14601
 
14602
+ /**
14603
+ * @interface
14604
+ */
14605
+ declare type UserAppConfigArgs = Record<string, string | string[]>;
14606
+
15584
14607
  /**
15585
14608
  * A general user bounds change event without event type.
15586
14609
  * @interface
@@ -18967,6 +17990,32 @@ declare type WithPositioningOptions<T extends {} = {}> = T & {
18967
17990
  positioningOptions?: OpenFin.PositioningOptions;
18968
17991
  };
18969
17992
 
17993
+ declare type WithUserAppConfigArgs = {
17994
+ /**
17995
+ * Represents the key-value pairs for the parameters passed into any fin:// or fins:// link
17996
+ * that launches this application.
17997
+ *
17998
+ * @remarks
17999
+ * In the link, user defined parameters are separated by the `$$` delimeter, for example:
18000
+ * `fins://path.to/app/manifest.json?$$use-last-configuration=true`
18001
+ *
18002
+ * Results in the following object:
18003
+ * ```json
18004
+ * {
18005
+ * "use-last-configuration": true"
18006
+ * }
18007
+ * ```
18008
+ *
18009
+ * These args can be accessed via the {@link ApplicationInfo.initialOptions} object:
18010
+ * ```typescript
18011
+ * const appInfo = await fin.Application.getCurrentSync().getInfo();
18012
+ * const { userAppConfigArgs } = appInfo.initialOptions;
18013
+ * console.log(userAppConfigArgs['use-last-configuration']); // 'true'
18014
+ * ```
18015
+ */
18016
+ userAppConfigArgs?: UserAppConfigArgs;
18017
+ };
18018
+
18970
18019
  /* Excluded from this release type: WorkspacePlatformOptions */
18971
18020
 
18972
18021
  /**