@openfin/node-adapter 34.78.4 → 34.78.6
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/README.md +11 -11
- package/out/node-adapter-alpha.d.ts +84 -23
- package/out/node-adapter-beta.d.ts +84 -23
- package/out/node-adapter-public.d.ts +84 -23
- package/out/node-adapter.d.ts +97 -24
- package/out/node-adapter.js +35 -9
- package/package.json +1 -1
package/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# OpenFin Node.js adapter
|
2
2
|
|
3
|
-
Allows the use of the OpenFin API from node.js. Please note the launch and connect methods are specific to a node environment.
|
3
|
+
Allows the use of the OpenFin API from node.js. Please note that the `launch` and `connect` methods are specific to a node environment.
|
4
4
|
|
5
|
-
##
|
5
|
+
## Prerequisites
|
6
6
|
|
7
7
|
- Node.js 16 or greater
|
8
8
|
|
@@ -12,11 +12,11 @@ Allows the use of the OpenFin API from node.js. Please note the launch and conne
|
|
12
12
|
|
13
13
|
`connect` can be used to establish a connection to an OpenFin runtime from node.
|
14
14
|
|
15
|
-
A uuid must be provided to identify the connection. Multiple connections
|
15
|
+
A `uuid` value must be provided to identify the connection. Multiple connections require distinct `uuid` values.
|
16
16
|
|
17
|
-
A
|
17
|
+
A Runtime version or manifest URL must also be specified.
|
18
18
|
|
19
|
-
Note
|
19
|
+
> Note: `connect` instantiates a Runtime instance if one does not exist for the given configuration. If a Runtime is already running, `connect` simply establishes a new connection.
|
20
20
|
|
21
21
|
### Connecting via Runtime Version
|
22
22
|
|
@@ -34,7 +34,7 @@ import { connect } from '@openfin/node-adapter';
|
|
34
34
|
})();
|
35
35
|
```
|
36
36
|
|
37
|
-
### Connecting via Manifest
|
37
|
+
### Connecting via Manifest URL
|
38
38
|
|
39
39
|
```javascript
|
40
40
|
import { connect } from '@openfin/node-adapter';
|
@@ -53,9 +53,9 @@ import { connect } from '@openfin/node-adapter';
|
|
53
53
|
|
54
54
|
Unlike `connect`, `launch` starts an OpenFin application if not running and returns a port number instead of a `fin` object.
|
55
55
|
|
56
|
-
This can be provided to connect to create a `fin` object for the
|
56
|
+
This port number can be provided to connect to create a `fin` object for the Runtime that has been created on the specific port.
|
57
57
|
|
58
|
-
`launch` can be called multiple times for a given application
|
58
|
+
`launch` can be called multiple times for a given application; however launches for an application that is already running result in a [run-requested](https://developer.openfin.co/jsdocs/stable/tutorial-application.addEventListener.html#run-requested) event being triggered instead of a relaunch. If the application is an OpenFin platform, this scenario results in the layout windows reloading.
|
59
59
|
|
60
60
|
### Launching and Connecting via Port
|
61
61
|
|
@@ -80,9 +80,9 @@ import { launch, connect } from '@openfin/node-adapter';
|
|
80
80
|
|
81
81
|
## Types
|
82
82
|
|
83
|
-
`@openfin/node-adapter` comes bundled with its own types
|
83
|
+
`@openfin/node-adapter` comes bundled with its own types.
|
84
84
|
|
85
|
-
If you wish to explicitly reference OpenFin types, the `OpenFin` namespace export
|
85
|
+
If you wish to explicitly reference OpenFin types, the `OpenFin` namespace export can be used as follows:
|
86
86
|
|
87
87
|
### Type Usage Example
|
88
88
|
|
@@ -105,7 +105,7 @@ import OpenFin, { connect } from '@openfin/node-adapter';
|
|
105
105
|
|
106
106
|
For users of the `connect` and `launch` functions in `openfin-adapter`, no changes are necessary, other than updating the dependency name.
|
107
107
|
|
108
|
-
If using the exported types from `openfin-adapter`,
|
108
|
+
If you are using the exported types from `openfin-adapter`, you can now use the `OpenFin` export that encapsualates them.
|
109
109
|
|
110
110
|
### Before
|
111
111
|
|
@@ -3451,6 +3451,15 @@ declare type ConstViewOptions = {
|
|
3451
3451
|
* 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
|
3452
3452
|
*/
|
3453
3453
|
closeBehavior: 'hide' | 'detach' | 'destroy';
|
3454
|
+
/**
|
3455
|
+
* Controls interaction of the view with its parent window's download shelf.
|
3456
|
+
*/
|
3457
|
+
downloadShelf: {
|
3458
|
+
/**
|
3459
|
+
* Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
|
3460
|
+
*/
|
3461
|
+
enabled: boolean;
|
3462
|
+
};
|
3454
3463
|
};
|
3455
3464
|
|
3456
3465
|
/**
|
@@ -3562,8 +3571,16 @@ declare type ConstWindowOptions = {
|
|
3562
3571
|
* launches in favor of the cached value.
|
3563
3572
|
*/
|
3564
3573
|
defaultWidth: number;
|
3574
|
+
downloadShelf: DownloadShelfOptions;
|
3565
3575
|
height: number;
|
3566
3576
|
layout: any;
|
3577
|
+
/**
|
3578
|
+
* @experimental
|
3579
|
+
*
|
3580
|
+
* The collection of layouts to load when the window is created. When launching multiple layouts, manage
|
3581
|
+
* the lifecycle via fin.Platform.Layout.create()/destroy() methods.
|
3582
|
+
*/
|
3583
|
+
layoutSnapshot: LayoutSnapshot;
|
3567
3584
|
/**
|
3568
3585
|
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
3569
3586
|
*/
|
@@ -4331,7 +4348,7 @@ declare type CreateViewPayload = {
|
|
4331
4348
|
/**
|
4332
4349
|
* @interface
|
4333
4350
|
*/
|
4334
|
-
declare type CreateViewTarget =
|
4351
|
+
declare type CreateViewTarget = LayoutIdentity & {
|
4335
4352
|
/**
|
4336
4353
|
* If specified, view creation will not attach to a window and caller must
|
4337
4354
|
* insert the view into the layout explicitly
|
@@ -4627,6 +4644,34 @@ declare type DownloadRule = {
|
|
4627
4644
|
match: string[];
|
4628
4645
|
};
|
4629
4646
|
|
4647
|
+
/**
|
4648
|
+
* @interface
|
4649
|
+
*
|
4650
|
+
* Controls the styling and behavior of the window download shelf.
|
4651
|
+
*/
|
4652
|
+
declare type DownloadShelfOptions = {
|
4653
|
+
/**
|
4654
|
+
* Whether downloads in this window trigger opening the download shelf.
|
4655
|
+
*/
|
4656
|
+
enabled: boolean;
|
4657
|
+
/**
|
4658
|
+
* Styling options for the download shelf border.
|
4659
|
+
*/
|
4660
|
+
border: {
|
4661
|
+
/**
|
4662
|
+
* Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
|
4663
|
+
*
|
4664
|
+
* @remarks The top border is fixed to 1 pixel regardless of this setting.
|
4665
|
+
*/
|
4666
|
+
size?: number;
|
4667
|
+
/**
|
4668
|
+
* Color of the border, either a string name or a hex code. Defaults to chromium theme
|
4669
|
+
* if absent.
|
4670
|
+
*/
|
4671
|
+
color?: string;
|
4672
|
+
};
|
4673
|
+
};
|
4674
|
+
|
4630
4675
|
/**
|
4631
4676
|
* DPI (dots per inch) configuration for printing.
|
4632
4677
|
*
|
@@ -4826,9 +4871,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
4826
4871
|
} : never;
|
4827
4872
|
|
4828
4873
|
declare interface Environment {
|
4829
|
-
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport,
|
4874
|
+
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
|
4830
4875
|
initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
|
4831
|
-
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (
|
4876
|
+
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
4832
4877
|
writeToken(path: string, token: string): Promise<string>;
|
4833
4878
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
4834
4879
|
getNextMessageId(): any;
|
@@ -5732,6 +5777,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5732
5777
|
* Registers a global hotkey with the operating system.
|
5733
5778
|
* @param hotkey a hotkey string
|
5734
5779
|
* @param listener called when the registered hotkey is pressed by the user.
|
5780
|
+
* @throws If the `hotkey` is reserved, see list below.
|
5781
|
+
* @throws if the `hotkey` is already registered by another application.
|
5735
5782
|
*
|
5736
5783
|
* @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
|
5737
5784
|
* If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
|
@@ -5804,7 +5851,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5804
5851
|
*/
|
5805
5852
|
unregisterAll(): Promise<void>;
|
5806
5853
|
/**
|
5807
|
-
* Checks if a given hotkey has been registered
|
5854
|
+
* Checks if a given hotkey has been registered by an application within the current runtime.
|
5808
5855
|
* @param hotkey a hotkey string
|
5809
5856
|
*
|
5810
5857
|
* @example
|
@@ -6389,19 +6436,21 @@ declare type InitializedEvent = IdentityEvent & {
|
|
6389
6436
|
type: 'initialized';
|
6390
6437
|
};
|
6391
6438
|
|
6392
|
-
declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
|
6393
|
-
|
6394
|
-
declare type InitLayoutOptions_2 = OpenFin.InitLayoutOptions;
|
6395
|
-
|
6396
6439
|
/**
|
6397
6440
|
* @interface
|
6398
6441
|
*/
|
6399
|
-
declare type
|
6442
|
+
declare type InitLayoutOptions = {
|
6400
6443
|
/**
|
6444
|
+
* @deprecated use container HTMLElement instead
|
6445
|
+
*
|
6401
6446
|
* The id attribute of the container where the window's Layout should be initialized. If not provided
|
6402
6447
|
* then an element with id `layout-container` is used. We recommend using a div element.
|
6403
6448
|
*/
|
6404
6449
|
containerId?: string;
|
6450
|
+
/**
|
6451
|
+
* The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
|
6452
|
+
*/
|
6453
|
+
container?: HTMLElement;
|
6405
6454
|
};
|
6406
6455
|
|
6407
6456
|
/**
|
@@ -8537,7 +8586,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
8537
8586
|
* @param layoutIdentity
|
8538
8587
|
* @returns
|
8539
8588
|
*/
|
8540
|
-
resolveLayout: ({ layoutName }
|
8589
|
+
resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
|
8541
8590
|
/**
|
8542
8591
|
* @experimental
|
8543
8592
|
*
|
@@ -8672,7 +8721,8 @@ declare class LayoutModule extends Base {
|
|
8672
8721
|
* const layout = await fin.Platform.Layout.init({ containerId });
|
8673
8722
|
* ```
|
8674
8723
|
*/
|
8675
|
-
init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8724
|
+
init: (options?: OpenFin.InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8725
|
+
getCurrentLayoutManagerSync: <T extends OpenFin.LayoutSnapshot>() => OpenFin.LayoutManager<T>;
|
8676
8726
|
}
|
8677
8727
|
|
8678
8728
|
declare type LayoutModule_2 = OpenFin.Fin['Platform']['Layout'];
|
@@ -9846,7 +9896,7 @@ declare namespace OpenFin {
|
|
9846
9896
|
LayoutPresetType,
|
9847
9897
|
LayoutIdentity,
|
9848
9898
|
LayoutSnapshot,
|
9849
|
-
|
9899
|
+
InitLayoutOptions,
|
9850
9900
|
LayoutInstance,
|
9851
9901
|
LayoutManager,
|
9852
9902
|
AddLayoutInstanceOptions,
|
@@ -9891,6 +9941,7 @@ declare namespace OpenFin {
|
|
9891
9941
|
ChannelClientDisconnectionListener,
|
9892
9942
|
ChannelProviderDisconnectionListener,
|
9893
9943
|
RoutingInfo,
|
9944
|
+
DownloadShelfOptions,
|
9894
9945
|
ApplicationEvents,
|
9895
9946
|
BaseEvents,
|
9896
9947
|
ExternalApplicationEvents,
|
@@ -10932,6 +10983,7 @@ declare interface PlatformProvider {
|
|
10932
10983
|
* ```
|
10933
10984
|
*/
|
10934
10985
|
getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
|
10986
|
+
/* Excluded from this release type: createViewsForLayout */
|
10935
10987
|
/* Excluded from this release type: getViewSnapshot */
|
10936
10988
|
/**
|
10937
10989
|
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
@@ -12302,19 +12354,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
|
|
12302
12354
|
/**
|
12303
12355
|
* @interface
|
12304
12356
|
*/
|
12305
|
-
declare type ReplaceLayoutOptions =
|
12357
|
+
declare type ReplaceLayoutOptions = {
|
12358
|
+
/**
|
12359
|
+
* Layout config to be applied.
|
12360
|
+
*/
|
12361
|
+
layout: LayoutOptions;
|
12362
|
+
};
|
12306
12363
|
|
12307
12364
|
/**
|
12308
12365
|
* @interface
|
12309
12366
|
*
|
12310
12367
|
* @deprecated use ReplaceLayoutOptions instead
|
12311
12368
|
*/
|
12312
|
-
declare type ReplaceLayoutOpts =
|
12313
|
-
/**
|
12314
|
-
* Layout config to be applied.
|
12315
|
-
*/
|
12316
|
-
layout: LayoutOptions;
|
12317
|
-
};
|
12369
|
+
declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
|
12318
12370
|
|
12319
12371
|
/**
|
12320
12372
|
* @interface
|
@@ -12325,9 +12377,9 @@ declare type ReplaceLayoutPayload = {
|
|
12325
12377
|
*/
|
12326
12378
|
opts: ReplaceLayoutOptions;
|
12327
12379
|
/**
|
12328
|
-
* Identity of the window whose layout will be
|
12380
|
+
* Identity of the window whose layout will be replaced.
|
12329
12381
|
*/
|
12330
|
-
target:
|
12382
|
+
target: LayoutIdentity;
|
12331
12383
|
};
|
12332
12384
|
|
12333
12385
|
/**
|
@@ -12346,7 +12398,7 @@ declare type ReplaceViewPayload = {
|
|
12346
12398
|
viewToReplace: Identity_5;
|
12347
12399
|
newView: Partial<ViewOptions>;
|
12348
12400
|
};
|
12349
|
-
target:
|
12401
|
+
target: LayoutIdentity;
|
12350
12402
|
};
|
12351
12403
|
|
12352
12404
|
/**
|
@@ -12858,6 +12910,14 @@ declare type ShortcutOverride = Hotkey & {
|
|
12858
12910
|
command: string;
|
12859
12911
|
};
|
12860
12912
|
|
12913
|
+
/**
|
12914
|
+
* Generated when the Download Shelf 'Show All' button is clicked.
|
12915
|
+
* @interface
|
12916
|
+
*/
|
12917
|
+
declare type ShowAllDownloadsEvent = BaseWindowEvent & {
|
12918
|
+
type: 'show-all-downloads';
|
12919
|
+
};
|
12920
|
+
|
12861
12921
|
/**
|
12862
12922
|
* Generated when a View is shown. This event will fire during creation of a View.
|
12863
12923
|
* @interface
|
@@ -18739,6 +18799,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
18739
18799
|
WillMoveEvent,
|
18740
18800
|
WillResizeEvent,
|
18741
18801
|
NonPropagatedWindowEvent,
|
18802
|
+
ShowAllDownloadsEvent,
|
18742
18803
|
WindowSourcedEvent,
|
18743
18804
|
WillPropagateWindowEvent,
|
18744
18805
|
WindowEvent,
|
@@ -18958,7 +19019,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
18958
19019
|
* A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
|
18959
19020
|
* from {@link OpenFin.ViewEvents}.
|
18960
19021
|
*/
|
18961
|
-
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
|
19022
|
+
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
|
18962
19023
|
|
18963
19024
|
/**
|
18964
19025
|
* Generated when a child window starts loading.
|
@@ -3451,6 +3451,15 @@ declare type ConstViewOptions = {
|
|
3451
3451
|
* 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
|
3452
3452
|
*/
|
3453
3453
|
closeBehavior: 'hide' | 'detach' | 'destroy';
|
3454
|
+
/**
|
3455
|
+
* Controls interaction of the view with its parent window's download shelf.
|
3456
|
+
*/
|
3457
|
+
downloadShelf: {
|
3458
|
+
/**
|
3459
|
+
* Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
|
3460
|
+
*/
|
3461
|
+
enabled: boolean;
|
3462
|
+
};
|
3454
3463
|
};
|
3455
3464
|
|
3456
3465
|
/**
|
@@ -3562,8 +3571,16 @@ declare type ConstWindowOptions = {
|
|
3562
3571
|
* launches in favor of the cached value.
|
3563
3572
|
*/
|
3564
3573
|
defaultWidth: number;
|
3574
|
+
downloadShelf: DownloadShelfOptions;
|
3565
3575
|
height: number;
|
3566
3576
|
layout: any;
|
3577
|
+
/**
|
3578
|
+
* @experimental
|
3579
|
+
*
|
3580
|
+
* The collection of layouts to load when the window is created. When launching multiple layouts, manage
|
3581
|
+
* the lifecycle via fin.Platform.Layout.create()/destroy() methods.
|
3582
|
+
*/
|
3583
|
+
layoutSnapshot: LayoutSnapshot;
|
3567
3584
|
/**
|
3568
3585
|
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
3569
3586
|
*/
|
@@ -4331,7 +4348,7 @@ declare type CreateViewPayload = {
|
|
4331
4348
|
/**
|
4332
4349
|
* @interface
|
4333
4350
|
*/
|
4334
|
-
declare type CreateViewTarget =
|
4351
|
+
declare type CreateViewTarget = LayoutIdentity & {
|
4335
4352
|
/**
|
4336
4353
|
* If specified, view creation will not attach to a window and caller must
|
4337
4354
|
* insert the view into the layout explicitly
|
@@ -4627,6 +4644,34 @@ declare type DownloadRule = {
|
|
4627
4644
|
match: string[];
|
4628
4645
|
};
|
4629
4646
|
|
4647
|
+
/**
|
4648
|
+
* @interface
|
4649
|
+
*
|
4650
|
+
* Controls the styling and behavior of the window download shelf.
|
4651
|
+
*/
|
4652
|
+
declare type DownloadShelfOptions = {
|
4653
|
+
/**
|
4654
|
+
* Whether downloads in this window trigger opening the download shelf.
|
4655
|
+
*/
|
4656
|
+
enabled: boolean;
|
4657
|
+
/**
|
4658
|
+
* Styling options for the download shelf border.
|
4659
|
+
*/
|
4660
|
+
border: {
|
4661
|
+
/**
|
4662
|
+
* Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
|
4663
|
+
*
|
4664
|
+
* @remarks The top border is fixed to 1 pixel regardless of this setting.
|
4665
|
+
*/
|
4666
|
+
size?: number;
|
4667
|
+
/**
|
4668
|
+
* Color of the border, either a string name or a hex code. Defaults to chromium theme
|
4669
|
+
* if absent.
|
4670
|
+
*/
|
4671
|
+
color?: string;
|
4672
|
+
};
|
4673
|
+
};
|
4674
|
+
|
4630
4675
|
/**
|
4631
4676
|
* DPI (dots per inch) configuration for printing.
|
4632
4677
|
*
|
@@ -4826,9 +4871,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
4826
4871
|
} : never;
|
4827
4872
|
|
4828
4873
|
declare interface Environment {
|
4829
|
-
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport,
|
4874
|
+
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
|
4830
4875
|
initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
|
4831
|
-
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (
|
4876
|
+
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
4832
4877
|
writeToken(path: string, token: string): Promise<string>;
|
4833
4878
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
4834
4879
|
getNextMessageId(): any;
|
@@ -5732,6 +5777,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5732
5777
|
* Registers a global hotkey with the operating system.
|
5733
5778
|
* @param hotkey a hotkey string
|
5734
5779
|
* @param listener called when the registered hotkey is pressed by the user.
|
5780
|
+
* @throws If the `hotkey` is reserved, see list below.
|
5781
|
+
* @throws if the `hotkey` is already registered by another application.
|
5735
5782
|
*
|
5736
5783
|
* @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
|
5737
5784
|
* If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
|
@@ -5804,7 +5851,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5804
5851
|
*/
|
5805
5852
|
unregisterAll(): Promise<void>;
|
5806
5853
|
/**
|
5807
|
-
* Checks if a given hotkey has been registered
|
5854
|
+
* Checks if a given hotkey has been registered by an application within the current runtime.
|
5808
5855
|
* @param hotkey a hotkey string
|
5809
5856
|
*
|
5810
5857
|
* @example
|
@@ -6389,19 +6436,21 @@ declare type InitializedEvent = IdentityEvent & {
|
|
6389
6436
|
type: 'initialized';
|
6390
6437
|
};
|
6391
6438
|
|
6392
|
-
declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
|
6393
|
-
|
6394
|
-
declare type InitLayoutOptions_2 = OpenFin.InitLayoutOptions;
|
6395
|
-
|
6396
6439
|
/**
|
6397
6440
|
* @interface
|
6398
6441
|
*/
|
6399
|
-
declare type
|
6442
|
+
declare type InitLayoutOptions = {
|
6400
6443
|
/**
|
6444
|
+
* @deprecated use container HTMLElement instead
|
6445
|
+
*
|
6401
6446
|
* The id attribute of the container where the window's Layout should be initialized. If not provided
|
6402
6447
|
* then an element with id `layout-container` is used. We recommend using a div element.
|
6403
6448
|
*/
|
6404
6449
|
containerId?: string;
|
6450
|
+
/**
|
6451
|
+
* The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
|
6452
|
+
*/
|
6453
|
+
container?: HTMLElement;
|
6405
6454
|
};
|
6406
6455
|
|
6407
6456
|
/**
|
@@ -8537,7 +8586,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
8537
8586
|
* @param layoutIdentity
|
8538
8587
|
* @returns
|
8539
8588
|
*/
|
8540
|
-
resolveLayout: ({ layoutName }
|
8589
|
+
resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
|
8541
8590
|
/**
|
8542
8591
|
* @experimental
|
8543
8592
|
*
|
@@ -8672,7 +8721,8 @@ declare class LayoutModule extends Base {
|
|
8672
8721
|
* const layout = await fin.Platform.Layout.init({ containerId });
|
8673
8722
|
* ```
|
8674
8723
|
*/
|
8675
|
-
init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8724
|
+
init: (options?: OpenFin.InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8725
|
+
getCurrentLayoutManagerSync: <T extends OpenFin.LayoutSnapshot>() => OpenFin.LayoutManager<T>;
|
8676
8726
|
}
|
8677
8727
|
|
8678
8728
|
declare type LayoutModule_2 = OpenFin.Fin['Platform']['Layout'];
|
@@ -9846,7 +9896,7 @@ declare namespace OpenFin {
|
|
9846
9896
|
LayoutPresetType,
|
9847
9897
|
LayoutIdentity,
|
9848
9898
|
LayoutSnapshot,
|
9849
|
-
|
9899
|
+
InitLayoutOptions,
|
9850
9900
|
LayoutInstance,
|
9851
9901
|
LayoutManager,
|
9852
9902
|
AddLayoutInstanceOptions,
|
@@ -9891,6 +9941,7 @@ declare namespace OpenFin {
|
|
9891
9941
|
ChannelClientDisconnectionListener,
|
9892
9942
|
ChannelProviderDisconnectionListener,
|
9893
9943
|
RoutingInfo,
|
9944
|
+
DownloadShelfOptions,
|
9894
9945
|
ApplicationEvents,
|
9895
9946
|
BaseEvents,
|
9896
9947
|
ExternalApplicationEvents,
|
@@ -10932,6 +10983,7 @@ declare interface PlatformProvider {
|
|
10932
10983
|
* ```
|
10933
10984
|
*/
|
10934
10985
|
getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
|
10986
|
+
/* Excluded from this release type: createViewsForLayout */
|
10935
10987
|
/* Excluded from this release type: getViewSnapshot */
|
10936
10988
|
/**
|
10937
10989
|
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
@@ -12302,19 +12354,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
|
|
12302
12354
|
/**
|
12303
12355
|
* @interface
|
12304
12356
|
*/
|
12305
|
-
declare type ReplaceLayoutOptions =
|
12357
|
+
declare type ReplaceLayoutOptions = {
|
12358
|
+
/**
|
12359
|
+
* Layout config to be applied.
|
12360
|
+
*/
|
12361
|
+
layout: LayoutOptions;
|
12362
|
+
};
|
12306
12363
|
|
12307
12364
|
/**
|
12308
12365
|
* @interface
|
12309
12366
|
*
|
12310
12367
|
* @deprecated use ReplaceLayoutOptions instead
|
12311
12368
|
*/
|
12312
|
-
declare type ReplaceLayoutOpts =
|
12313
|
-
/**
|
12314
|
-
* Layout config to be applied.
|
12315
|
-
*/
|
12316
|
-
layout: LayoutOptions;
|
12317
|
-
};
|
12369
|
+
declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
|
12318
12370
|
|
12319
12371
|
/**
|
12320
12372
|
* @interface
|
@@ -12325,9 +12377,9 @@ declare type ReplaceLayoutPayload = {
|
|
12325
12377
|
*/
|
12326
12378
|
opts: ReplaceLayoutOptions;
|
12327
12379
|
/**
|
12328
|
-
* Identity of the window whose layout will be
|
12380
|
+
* Identity of the window whose layout will be replaced.
|
12329
12381
|
*/
|
12330
|
-
target:
|
12382
|
+
target: LayoutIdentity;
|
12331
12383
|
};
|
12332
12384
|
|
12333
12385
|
/**
|
@@ -12346,7 +12398,7 @@ declare type ReplaceViewPayload = {
|
|
12346
12398
|
viewToReplace: Identity_5;
|
12347
12399
|
newView: Partial<ViewOptions>;
|
12348
12400
|
};
|
12349
|
-
target:
|
12401
|
+
target: LayoutIdentity;
|
12350
12402
|
};
|
12351
12403
|
|
12352
12404
|
/**
|
@@ -12858,6 +12910,14 @@ declare type ShortcutOverride = Hotkey & {
|
|
12858
12910
|
command: string;
|
12859
12911
|
};
|
12860
12912
|
|
12913
|
+
/**
|
12914
|
+
* Generated when the Download Shelf 'Show All' button is clicked.
|
12915
|
+
* @interface
|
12916
|
+
*/
|
12917
|
+
declare type ShowAllDownloadsEvent = BaseWindowEvent & {
|
12918
|
+
type: 'show-all-downloads';
|
12919
|
+
};
|
12920
|
+
|
12861
12921
|
/**
|
12862
12922
|
* Generated when a View is shown. This event will fire during creation of a View.
|
12863
12923
|
* @interface
|
@@ -18739,6 +18799,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
18739
18799
|
WillMoveEvent,
|
18740
18800
|
WillResizeEvent,
|
18741
18801
|
NonPropagatedWindowEvent,
|
18802
|
+
ShowAllDownloadsEvent,
|
18742
18803
|
WindowSourcedEvent,
|
18743
18804
|
WillPropagateWindowEvent,
|
18744
18805
|
WindowEvent,
|
@@ -18958,7 +19019,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
18958
19019
|
* A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
|
18959
19020
|
* from {@link OpenFin.ViewEvents}.
|
18960
19021
|
*/
|
18961
|
-
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
|
19022
|
+
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
|
18962
19023
|
|
18963
19024
|
/**
|
18964
19025
|
* Generated when a child window starts loading.
|
@@ -3451,6 +3451,15 @@ declare type ConstViewOptions = {
|
|
3451
3451
|
* 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
|
3452
3452
|
*/
|
3453
3453
|
closeBehavior: 'hide' | 'detach' | 'destroy';
|
3454
|
+
/**
|
3455
|
+
* Controls interaction of the view with its parent window's download shelf.
|
3456
|
+
*/
|
3457
|
+
downloadShelf: {
|
3458
|
+
/**
|
3459
|
+
* Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
|
3460
|
+
*/
|
3461
|
+
enabled: boolean;
|
3462
|
+
};
|
3454
3463
|
};
|
3455
3464
|
|
3456
3465
|
/**
|
@@ -3562,8 +3571,16 @@ declare type ConstWindowOptions = {
|
|
3562
3571
|
* launches in favor of the cached value.
|
3563
3572
|
*/
|
3564
3573
|
defaultWidth: number;
|
3574
|
+
downloadShelf: DownloadShelfOptions;
|
3565
3575
|
height: number;
|
3566
3576
|
layout: any;
|
3577
|
+
/**
|
3578
|
+
* @experimental
|
3579
|
+
*
|
3580
|
+
* The collection of layouts to load when the window is created. When launching multiple layouts, manage
|
3581
|
+
* the lifecycle via fin.Platform.Layout.create()/destroy() methods.
|
3582
|
+
*/
|
3583
|
+
layoutSnapshot: LayoutSnapshot;
|
3567
3584
|
/**
|
3568
3585
|
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
3569
3586
|
*/
|
@@ -4331,7 +4348,7 @@ declare type CreateViewPayload = {
|
|
4331
4348
|
/**
|
4332
4349
|
* @interface
|
4333
4350
|
*/
|
4334
|
-
declare type CreateViewTarget =
|
4351
|
+
declare type CreateViewTarget = LayoutIdentity & {
|
4335
4352
|
/**
|
4336
4353
|
* If specified, view creation will not attach to a window and caller must
|
4337
4354
|
* insert the view into the layout explicitly
|
@@ -4627,6 +4644,34 @@ declare type DownloadRule = {
|
|
4627
4644
|
match: string[];
|
4628
4645
|
};
|
4629
4646
|
|
4647
|
+
/**
|
4648
|
+
* @interface
|
4649
|
+
*
|
4650
|
+
* Controls the styling and behavior of the window download shelf.
|
4651
|
+
*/
|
4652
|
+
declare type DownloadShelfOptions = {
|
4653
|
+
/**
|
4654
|
+
* Whether downloads in this window trigger opening the download shelf.
|
4655
|
+
*/
|
4656
|
+
enabled: boolean;
|
4657
|
+
/**
|
4658
|
+
* Styling options for the download shelf border.
|
4659
|
+
*/
|
4660
|
+
border: {
|
4661
|
+
/**
|
4662
|
+
* Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
|
4663
|
+
*
|
4664
|
+
* @remarks The top border is fixed to 1 pixel regardless of this setting.
|
4665
|
+
*/
|
4666
|
+
size?: number;
|
4667
|
+
/**
|
4668
|
+
* Color of the border, either a string name or a hex code. Defaults to chromium theme
|
4669
|
+
* if absent.
|
4670
|
+
*/
|
4671
|
+
color?: string;
|
4672
|
+
};
|
4673
|
+
};
|
4674
|
+
|
4630
4675
|
/**
|
4631
4676
|
* DPI (dots per inch) configuration for printing.
|
4632
4677
|
*
|
@@ -4826,9 +4871,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
4826
4871
|
} : never;
|
4827
4872
|
|
4828
4873
|
declare interface Environment {
|
4829
|
-
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport,
|
4874
|
+
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
|
4830
4875
|
initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
|
4831
|
-
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (
|
4876
|
+
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
4832
4877
|
writeToken(path: string, token: string): Promise<string>;
|
4833
4878
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
4834
4879
|
getNextMessageId(): any;
|
@@ -5732,6 +5777,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5732
5777
|
* Registers a global hotkey with the operating system.
|
5733
5778
|
* @param hotkey a hotkey string
|
5734
5779
|
* @param listener called when the registered hotkey is pressed by the user.
|
5780
|
+
* @throws If the `hotkey` is reserved, see list below.
|
5781
|
+
* @throws if the `hotkey` is already registered by another application.
|
5735
5782
|
*
|
5736
5783
|
* @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
|
5737
5784
|
* If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
|
@@ -5804,7 +5851,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5804
5851
|
*/
|
5805
5852
|
unregisterAll(): Promise<void>;
|
5806
5853
|
/**
|
5807
|
-
* Checks if a given hotkey has been registered
|
5854
|
+
* Checks if a given hotkey has been registered by an application within the current runtime.
|
5808
5855
|
* @param hotkey a hotkey string
|
5809
5856
|
*
|
5810
5857
|
* @example
|
@@ -6389,19 +6436,21 @@ declare type InitializedEvent = IdentityEvent & {
|
|
6389
6436
|
type: 'initialized';
|
6390
6437
|
};
|
6391
6438
|
|
6392
|
-
declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
|
6393
|
-
|
6394
|
-
declare type InitLayoutOptions_2 = OpenFin.InitLayoutOptions;
|
6395
|
-
|
6396
6439
|
/**
|
6397
6440
|
* @interface
|
6398
6441
|
*/
|
6399
|
-
declare type
|
6442
|
+
declare type InitLayoutOptions = {
|
6400
6443
|
/**
|
6444
|
+
* @deprecated use container HTMLElement instead
|
6445
|
+
*
|
6401
6446
|
* The id attribute of the container where the window's Layout should be initialized. If not provided
|
6402
6447
|
* then an element with id `layout-container` is used. We recommend using a div element.
|
6403
6448
|
*/
|
6404
6449
|
containerId?: string;
|
6450
|
+
/**
|
6451
|
+
* The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
|
6452
|
+
*/
|
6453
|
+
container?: HTMLElement;
|
6405
6454
|
};
|
6406
6455
|
|
6407
6456
|
/**
|
@@ -8537,7 +8586,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
8537
8586
|
* @param layoutIdentity
|
8538
8587
|
* @returns
|
8539
8588
|
*/
|
8540
|
-
resolveLayout: ({ layoutName }
|
8589
|
+
resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
|
8541
8590
|
/**
|
8542
8591
|
* @experimental
|
8543
8592
|
*
|
@@ -8672,7 +8721,8 @@ declare class LayoutModule extends Base {
|
|
8672
8721
|
* const layout = await fin.Platform.Layout.init({ containerId });
|
8673
8722
|
* ```
|
8674
8723
|
*/
|
8675
|
-
init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8724
|
+
init: (options?: OpenFin.InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8725
|
+
getCurrentLayoutManagerSync: <T extends OpenFin.LayoutSnapshot>() => OpenFin.LayoutManager<T>;
|
8676
8726
|
}
|
8677
8727
|
|
8678
8728
|
declare type LayoutModule_2 = OpenFin.Fin['Platform']['Layout'];
|
@@ -9846,7 +9896,7 @@ declare namespace OpenFin {
|
|
9846
9896
|
LayoutPresetType,
|
9847
9897
|
LayoutIdentity,
|
9848
9898
|
LayoutSnapshot,
|
9849
|
-
|
9899
|
+
InitLayoutOptions,
|
9850
9900
|
LayoutInstance,
|
9851
9901
|
LayoutManager,
|
9852
9902
|
AddLayoutInstanceOptions,
|
@@ -9891,6 +9941,7 @@ declare namespace OpenFin {
|
|
9891
9941
|
ChannelClientDisconnectionListener,
|
9892
9942
|
ChannelProviderDisconnectionListener,
|
9893
9943
|
RoutingInfo,
|
9944
|
+
DownloadShelfOptions,
|
9894
9945
|
ApplicationEvents,
|
9895
9946
|
BaseEvents,
|
9896
9947
|
ExternalApplicationEvents,
|
@@ -10932,6 +10983,7 @@ declare interface PlatformProvider {
|
|
10932
10983
|
* ```
|
10933
10984
|
*/
|
10934
10985
|
getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
|
10986
|
+
/* Excluded from this release type: createViewsForLayout */
|
10935
10987
|
/* Excluded from this release type: getViewSnapshot */
|
10936
10988
|
/**
|
10937
10989
|
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
@@ -12302,19 +12354,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
|
|
12302
12354
|
/**
|
12303
12355
|
* @interface
|
12304
12356
|
*/
|
12305
|
-
declare type ReplaceLayoutOptions =
|
12357
|
+
declare type ReplaceLayoutOptions = {
|
12358
|
+
/**
|
12359
|
+
* Layout config to be applied.
|
12360
|
+
*/
|
12361
|
+
layout: LayoutOptions;
|
12362
|
+
};
|
12306
12363
|
|
12307
12364
|
/**
|
12308
12365
|
* @interface
|
12309
12366
|
*
|
12310
12367
|
* @deprecated use ReplaceLayoutOptions instead
|
12311
12368
|
*/
|
12312
|
-
declare type ReplaceLayoutOpts =
|
12313
|
-
/**
|
12314
|
-
* Layout config to be applied.
|
12315
|
-
*/
|
12316
|
-
layout: LayoutOptions;
|
12317
|
-
};
|
12369
|
+
declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
|
12318
12370
|
|
12319
12371
|
/**
|
12320
12372
|
* @interface
|
@@ -12325,9 +12377,9 @@ declare type ReplaceLayoutPayload = {
|
|
12325
12377
|
*/
|
12326
12378
|
opts: ReplaceLayoutOptions;
|
12327
12379
|
/**
|
12328
|
-
* Identity of the window whose layout will be
|
12380
|
+
* Identity of the window whose layout will be replaced.
|
12329
12381
|
*/
|
12330
|
-
target:
|
12382
|
+
target: LayoutIdentity;
|
12331
12383
|
};
|
12332
12384
|
|
12333
12385
|
/**
|
@@ -12346,7 +12398,7 @@ declare type ReplaceViewPayload = {
|
|
12346
12398
|
viewToReplace: Identity_5;
|
12347
12399
|
newView: Partial<ViewOptions>;
|
12348
12400
|
};
|
12349
|
-
target:
|
12401
|
+
target: LayoutIdentity;
|
12350
12402
|
};
|
12351
12403
|
|
12352
12404
|
/**
|
@@ -12858,6 +12910,14 @@ declare type ShortcutOverride = Hotkey & {
|
|
12858
12910
|
command: string;
|
12859
12911
|
};
|
12860
12912
|
|
12913
|
+
/**
|
12914
|
+
* Generated when the Download Shelf 'Show All' button is clicked.
|
12915
|
+
* @interface
|
12916
|
+
*/
|
12917
|
+
declare type ShowAllDownloadsEvent = BaseWindowEvent & {
|
12918
|
+
type: 'show-all-downloads';
|
12919
|
+
};
|
12920
|
+
|
12861
12921
|
/**
|
12862
12922
|
* Generated when a View is shown. This event will fire during creation of a View.
|
12863
12923
|
* @interface
|
@@ -18739,6 +18799,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
18739
18799
|
WillMoveEvent,
|
18740
18800
|
WillResizeEvent,
|
18741
18801
|
NonPropagatedWindowEvent,
|
18802
|
+
ShowAllDownloadsEvent,
|
18742
18803
|
WindowSourcedEvent,
|
18743
18804
|
WillPropagateWindowEvent,
|
18744
18805
|
WindowEvent,
|
@@ -18958,7 +19019,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
18958
19019
|
* A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
|
18959
19020
|
* from {@link OpenFin.ViewEvents}.
|
18960
19021
|
*/
|
18961
|
-
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
|
19022
|
+
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
|
18962
19023
|
|
18963
19024
|
/**
|
18964
19025
|
* Generated when a child window starts loading.
|
package/out/node-adapter.d.ts
CHANGED
@@ -3545,6 +3545,15 @@ declare type ConstViewOptions = {
|
|
3545
3545
|
* 'destroy' is the default behavior as long as 'detachOnClose' is not set. It destroys the view.
|
3546
3546
|
*/
|
3547
3547
|
closeBehavior: 'hide' | 'detach' | 'destroy';
|
3548
|
+
/**
|
3549
|
+
* Controls interaction of the view with its parent window's download shelf.
|
3550
|
+
*/
|
3551
|
+
downloadShelf: {
|
3552
|
+
/**
|
3553
|
+
* Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
|
3554
|
+
*/
|
3555
|
+
enabled: boolean;
|
3556
|
+
};
|
3548
3557
|
};
|
3549
3558
|
|
3550
3559
|
/**
|
@@ -3656,8 +3665,16 @@ declare type ConstWindowOptions = {
|
|
3656
3665
|
* launches in favor of the cached value.
|
3657
3666
|
*/
|
3658
3667
|
defaultWidth: number;
|
3668
|
+
downloadShelf: DownloadShelfOptions;
|
3659
3669
|
height: number;
|
3660
3670
|
layout: any;
|
3671
|
+
/**
|
3672
|
+
* @experimental
|
3673
|
+
*
|
3674
|
+
* The collection of layouts to load when the window is created. When launching multiple layouts, manage
|
3675
|
+
* the lifecycle via fin.Platform.Layout.create()/destroy() methods.
|
3676
|
+
*/
|
3677
|
+
layoutSnapshot: LayoutSnapshot;
|
3661
3678
|
/**
|
3662
3679
|
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
3663
3680
|
*/
|
@@ -4425,7 +4442,7 @@ declare type CreateViewPayload = {
|
|
4425
4442
|
/**
|
4426
4443
|
* @interface
|
4427
4444
|
*/
|
4428
|
-
declare type CreateViewTarget =
|
4445
|
+
declare type CreateViewTarget = LayoutIdentity & {
|
4429
4446
|
/**
|
4430
4447
|
* If specified, view creation will not attach to a window and caller must
|
4431
4448
|
* insert the view into the layout explicitly
|
@@ -4721,6 +4738,34 @@ declare type DownloadRule = {
|
|
4721
4738
|
match: string[];
|
4722
4739
|
};
|
4723
4740
|
|
4741
|
+
/**
|
4742
|
+
* @interface
|
4743
|
+
*
|
4744
|
+
* Controls the styling and behavior of the window download shelf.
|
4745
|
+
*/
|
4746
|
+
declare type DownloadShelfOptions = {
|
4747
|
+
/**
|
4748
|
+
* Whether downloads in this window trigger opening the download shelf.
|
4749
|
+
*/
|
4750
|
+
enabled: boolean;
|
4751
|
+
/**
|
4752
|
+
* Styling options for the download shelf border.
|
4753
|
+
*/
|
4754
|
+
border: {
|
4755
|
+
/**
|
4756
|
+
* Thickness of the border in pixels. Default 1 pixel. Used only for frameless windows.
|
4757
|
+
*
|
4758
|
+
* @remarks The top border is fixed to 1 pixel regardless of this setting.
|
4759
|
+
*/
|
4760
|
+
size?: number;
|
4761
|
+
/**
|
4762
|
+
* Color of the border, either a string name or a hex code. Defaults to chromium theme
|
4763
|
+
* if absent.
|
4764
|
+
*/
|
4765
|
+
color?: string;
|
4766
|
+
};
|
4767
|
+
};
|
4768
|
+
|
4724
4769
|
/**
|
4725
4770
|
* DPI (dots per inch) configuration for printing.
|
4726
4771
|
*
|
@@ -4925,9 +4970,9 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
4925
4970
|
} : never;
|
4926
4971
|
|
4927
4972
|
declare interface Environment {
|
4928
|
-
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport,
|
4973
|
+
initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
|
4929
4974
|
initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
|
4930
|
-
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): (
|
4975
|
+
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
4931
4976
|
writeToken(path: string, token: string): Promise<string>;
|
4932
4977
|
retrievePort(config: NewConnectConfig): Promise<number>;
|
4933
4978
|
getNextMessageId(): any;
|
@@ -5878,6 +5923,8 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5878
5923
|
* Registers a global hotkey with the operating system.
|
5879
5924
|
* @param hotkey a hotkey string
|
5880
5925
|
* @param listener called when the registered hotkey is pressed by the user.
|
5926
|
+
* @throws If the `hotkey` is reserved, see list below.
|
5927
|
+
* @throws if the `hotkey` is already registered by another application.
|
5881
5928
|
*
|
5882
5929
|
* @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
|
5883
5930
|
* If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
|
@@ -5950,7 +5997,7 @@ declare class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
|
|
5950
5997
|
*/
|
5951
5998
|
unregisterAll(): Promise<void>;
|
5952
5999
|
/**
|
5953
|
-
* Checks if a given hotkey has been registered
|
6000
|
+
* Checks if a given hotkey has been registered by an application within the current runtime.
|
5954
6001
|
* @param hotkey a hotkey string
|
5955
6002
|
*
|
5956
6003
|
* @example
|
@@ -6538,19 +6585,21 @@ declare type InitializedEvent = IdentityEvent & {
|
|
6538
6585
|
type: 'initialized';
|
6539
6586
|
};
|
6540
6587
|
|
6541
|
-
declare type InitLayoutOptions = OpenFin.InitLayoutOptions;
|
6542
|
-
|
6543
|
-
declare type InitLayoutOptions_2 = OpenFin.InitLayoutOptions;
|
6544
|
-
|
6545
6588
|
/**
|
6546
6589
|
* @interface
|
6547
6590
|
*/
|
6548
|
-
declare type
|
6591
|
+
declare type InitLayoutOptions = {
|
6549
6592
|
/**
|
6593
|
+
* @deprecated use container HTMLElement instead
|
6594
|
+
*
|
6550
6595
|
* The id attribute of the container where the window's Layout should be initialized. If not provided
|
6551
6596
|
* then an element with id `layout-container` is used. We recommend using a div element.
|
6552
6597
|
*/
|
6553
6598
|
containerId?: string;
|
6599
|
+
/**
|
6600
|
+
* The HTMLElement where the window's Layout should be initialized. We recommend using a div element.
|
6601
|
+
*/
|
6602
|
+
container?: HTMLElement;
|
6554
6603
|
};
|
6555
6604
|
|
6556
6605
|
/**
|
@@ -8400,7 +8449,7 @@ declare class Layout extends Base {
|
|
8400
8449
|
/**
|
8401
8450
|
* @internal
|
8402
8451
|
*/
|
8403
|
-
init: (options?:
|
8452
|
+
init: (options?: OpenFin.InitLayoutOptions) => Promise<Layout>;
|
8404
8453
|
identity: OpenFin.LayoutIdentity;
|
8405
8454
|
private platform;
|
8406
8455
|
wire: Transport;
|
@@ -8730,7 +8779,7 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
8730
8779
|
* @param layoutIdentity
|
8731
8780
|
* @returns
|
8732
8781
|
*/
|
8733
|
-
resolveLayout: ({ layoutName }
|
8782
|
+
resolveLayout: ({ layoutName }?: LayoutIdentity) => Promise<LayoutInstance>;
|
8734
8783
|
/**
|
8735
8784
|
* @experimental
|
8736
8785
|
*
|
@@ -8865,7 +8914,8 @@ declare class LayoutModule extends Base {
|
|
8865
8914
|
* const layout = await fin.Platform.Layout.init({ containerId });
|
8866
8915
|
* ```
|
8867
8916
|
*/
|
8868
|
-
init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8917
|
+
init: (options?: OpenFin.InitLayoutOptions) => Promise<OpenFin.Layout>;
|
8918
|
+
getCurrentLayoutManagerSync: <T extends OpenFin.LayoutSnapshot>() => OpenFin.LayoutManager<T>;
|
8869
8919
|
}
|
8870
8920
|
|
8871
8921
|
declare type LayoutModule_2 = OpenFin.Fin['Platform']['Layout'];
|
@@ -10207,7 +10257,7 @@ declare namespace OpenFin {
|
|
10207
10257
|
LayoutPresetType,
|
10208
10258
|
LayoutIdentity,
|
10209
10259
|
LayoutSnapshot,
|
10210
|
-
|
10260
|
+
InitLayoutOptions,
|
10211
10261
|
LayoutInstance,
|
10212
10262
|
LayoutManager,
|
10213
10263
|
AddLayoutInstanceOptions,
|
@@ -10252,6 +10302,7 @@ declare namespace OpenFin {
|
|
10252
10302
|
ChannelClientDisconnectionListener,
|
10253
10303
|
ChannelProviderDisconnectionListener,
|
10254
10304
|
RoutingInfo,
|
10305
|
+
DownloadShelfOptions,
|
10255
10306
|
ApplicationEvents,
|
10256
10307
|
BaseEvents,
|
10257
10308
|
ExternalApplicationEvents,
|
@@ -11326,6 +11377,19 @@ declare interface PlatformProvider {
|
|
11326
11377
|
* ```
|
11327
11378
|
*/
|
11328
11379
|
getSnapshot(payload: undefined, identity: OpenFin.Identity): Promise<OpenFin.Snapshot>;
|
11380
|
+
/**
|
11381
|
+
* @experimental @internal
|
11382
|
+
*
|
11383
|
+
* **NOTE**: Internal use only. This method is reserved for Workspace Browser implementation.
|
11384
|
+
*
|
11385
|
+
* Calls platform.createView for every view in the given layout. Returns an array of promises
|
11386
|
+
* one promise for each view create call
|
11387
|
+
*
|
11388
|
+
* @param layout
|
11389
|
+
* @param target
|
11390
|
+
* @returns an array of promises
|
11391
|
+
*/
|
11392
|
+
createViewsForLayout(layout: GoldenLayout.Config, target: OpenFin.Identity): Promise<OpenFin.View>[];
|
11329
11393
|
/**
|
11330
11394
|
* **NOTE**: Internal use only. It is not recommended to manage the state of individual views.
|
11331
11395
|
* Gets the current state of a single view and returns an object with the options needed to restore that view as part of a snapshot.
|
@@ -12732,19 +12796,19 @@ declare interface RemoteConfig extends ExistingConnectConfig {
|
|
12732
12796
|
/**
|
12733
12797
|
* @interface
|
12734
12798
|
*/
|
12735
|
-
declare type ReplaceLayoutOptions =
|
12799
|
+
declare type ReplaceLayoutOptions = {
|
12800
|
+
/**
|
12801
|
+
* Layout config to be applied.
|
12802
|
+
*/
|
12803
|
+
layout: LayoutOptions;
|
12804
|
+
};
|
12736
12805
|
|
12737
12806
|
/**
|
12738
12807
|
* @interface
|
12739
12808
|
*
|
12740
12809
|
* @deprecated use ReplaceLayoutOptions instead
|
12741
12810
|
*/
|
12742
|
-
declare type ReplaceLayoutOpts =
|
12743
|
-
/**
|
12744
|
-
* Layout config to be applied.
|
12745
|
-
*/
|
12746
|
-
layout: LayoutOptions;
|
12747
|
-
};
|
12811
|
+
declare type ReplaceLayoutOpts = ReplaceLayoutOptions;
|
12748
12812
|
|
12749
12813
|
/**
|
12750
12814
|
* @interface
|
@@ -12755,9 +12819,9 @@ declare type ReplaceLayoutPayload = {
|
|
12755
12819
|
*/
|
12756
12820
|
opts: ReplaceLayoutOptions;
|
12757
12821
|
/**
|
12758
|
-
* Identity of the window whose layout will be
|
12822
|
+
* Identity of the window whose layout will be replaced.
|
12759
12823
|
*/
|
12760
|
-
target:
|
12824
|
+
target: LayoutIdentity;
|
12761
12825
|
};
|
12762
12826
|
|
12763
12827
|
/**
|
@@ -12776,7 +12840,7 @@ declare type ReplaceViewPayload = {
|
|
12776
12840
|
viewToReplace: Identity_5;
|
12777
12841
|
newView: Partial<ViewOptions>;
|
12778
12842
|
};
|
12779
|
-
target:
|
12843
|
+
target: LayoutIdentity;
|
12780
12844
|
};
|
12781
12845
|
|
12782
12846
|
/**
|
@@ -13288,6 +13352,14 @@ declare type ShortcutOverride = Hotkey & {
|
|
13288
13352
|
command: string;
|
13289
13353
|
};
|
13290
13354
|
|
13355
|
+
/**
|
13356
|
+
* Generated when the Download Shelf 'Show All' button is clicked.
|
13357
|
+
* @interface
|
13358
|
+
*/
|
13359
|
+
declare type ShowAllDownloadsEvent = BaseWindowEvent & {
|
13360
|
+
type: 'show-all-downloads';
|
13361
|
+
};
|
13362
|
+
|
13291
13363
|
/**
|
13292
13364
|
* Generated when a View is shown. This event will fire during creation of a View.
|
13293
13365
|
* @interface
|
@@ -19353,6 +19425,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
19353
19425
|
WillMoveEvent,
|
19354
19426
|
WillResizeEvent,
|
19355
19427
|
NonPropagatedWindowEvent,
|
19428
|
+
ShowAllDownloadsEvent,
|
19356
19429
|
WindowSourcedEvent,
|
19357
19430
|
WillPropagateWindowEvent,
|
19358
19431
|
WindowEvent,
|
@@ -19572,7 +19645,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
19572
19645
|
* A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
|
19573
19646
|
* from {@link OpenFin.ViewEvents}.
|
19574
19647
|
*/
|
19575
|
-
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent;
|
19648
|
+
declare type WindowSourcedEvent = WebContentsEvent<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | WindowCloseRequestedEvent | WindowClosedEvent | WindowClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | WindowHiddenEvent | WindowHotkeyEvent | WindowInitializedEvent | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | WindowOptionsChangedEvent_2 | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | WindowRestoredEvent | WindowShowRequestedEvent | WindowShownEvent | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent;
|
19576
19649
|
|
19577
19650
|
/**
|
19578
19651
|
* Generated when a child window starts loading.
|
package/out/node-adapter.js
CHANGED
@@ -2988,10 +2988,23 @@ function requireInstance$2 () {
|
|
2988
2988
|
// don't expose
|
2989
2989
|
});
|
2990
2990
|
const layoutWindow = await this.getCurrentWindow();
|
2991
|
-
|
2992
|
-
|
2993
|
-
|
2994
|
-
|
2991
|
+
try {
|
2992
|
+
const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
|
2993
|
+
const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
|
2994
|
+
const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
|
2995
|
+
return this.fin.Platform.Layout.wrap(layoutIdentity);
|
2996
|
+
}
|
2997
|
+
catch (e) {
|
2998
|
+
const allowedErrors = [
|
2999
|
+
'No action registered at target for',
|
3000
|
+
'getLayoutIdentityForViewOrThrow is not a function'
|
3001
|
+
];
|
3002
|
+
if (!allowedErrors.some((m) => e.message.includes(m))) {
|
3003
|
+
throw e;
|
3004
|
+
}
|
3005
|
+
// fallback logic for missing endpoint
|
3006
|
+
return this.fin.Platform.Layout.wrap(layoutWindow.identity);
|
3007
|
+
}
|
2995
3008
|
};
|
2996
3009
|
/**
|
2997
3010
|
* Gets the View's options.
|
@@ -5428,7 +5441,7 @@ function requireInstance () {
|
|
5428
5441
|
// don't expose
|
5429
5442
|
});
|
5430
5443
|
const opts = await this.getOptions();
|
5431
|
-
if (!opts.layout
|
5444
|
+
if (!opts.layout || !opts.layoutSnapshot) {
|
5432
5445
|
throw new Error('Window does not have a Layout');
|
5433
5446
|
}
|
5434
5447
|
return this.fin.Platform.Layout.wrap(layoutIdentity ?? this.identity);
|
@@ -11406,6 +11419,8 @@ class GlobalHotkey extends base_1$8.EmitterBase {
|
|
11406
11419
|
* Registers a global hotkey with the operating system.
|
11407
11420
|
* @param hotkey a hotkey string
|
11408
11421
|
* @param listener called when the registered hotkey is pressed by the user.
|
11422
|
+
* @throws If the `hotkey` is reserved, see list below.
|
11423
|
+
* @throws if the `hotkey` is already registered by another application.
|
11409
11424
|
*
|
11410
11425
|
* @remarks The `hotkey` parameter expects an electron compatible [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) and the `listener` will be called if the `hotkey` is pressed by the user.
|
11411
11426
|
* If successfull, the hotkey will be 'claimed' by the application, meaning that this register call can be called multiple times from within the same application but will fail if another application has registered the hotkey.
|
@@ -11498,7 +11513,7 @@ class GlobalHotkey extends base_1$8.EmitterBase {
|
|
11498
11513
|
return undefined;
|
11499
11514
|
}
|
11500
11515
|
/**
|
11501
|
-
* Checks if a given hotkey has been registered
|
11516
|
+
* Checks if a given hotkey has been registered by an application within the current runtime.
|
11502
11517
|
* @param hotkey a hotkey string
|
11503
11518
|
*
|
11504
11519
|
* @example
|
@@ -12704,6 +12719,7 @@ class Layout extends base_1$6.Base {
|
|
12704
12719
|
// don't expose
|
12705
12720
|
});
|
12706
12721
|
const client = await this.platform.getClient();
|
12722
|
+
console.log(`Layout::toConfig() called!`);
|
12707
12723
|
return client.dispatch('get-frame-snapshot', {
|
12708
12724
|
target: this.identity
|
12709
12725
|
});
|
@@ -12771,7 +12787,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
12771
12787
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
12772
12788
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
12773
12789
|
};
|
12774
|
-
var _LayoutModule_layoutInitializationAttempted;
|
12790
|
+
var _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager;
|
12775
12791
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
12776
12792
|
Factory$2.LayoutModule = void 0;
|
12777
12793
|
/* eslint-disable no-undef, import/prefer-default-export */
|
@@ -12784,6 +12800,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12784
12800
|
constructor() {
|
12785
12801
|
super(...arguments);
|
12786
12802
|
_LayoutModule_layoutInitializationAttempted.set(this, false);
|
12803
|
+
_LayoutModule_layoutManager.set(this, null);
|
12787
12804
|
/**
|
12788
12805
|
* Initialize the window's Layout.
|
12789
12806
|
*
|
@@ -12834,7 +12851,16 @@ class LayoutModule extends base_1$5.Base {
|
|
12834
12851
|
}
|
12835
12852
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
12836
12853
|
// TODO: remove this.wire and always use this.fin
|
12837
|
-
|
12854
|
+
__classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayout(this.fin, this.wire, options), "f");
|
12855
|
+
// TODO: if create() wasn't called, warn!! aka, if lm.getLayouts().length === 0
|
12856
|
+
const layoutInstance = await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").resolveLayout();
|
12857
|
+
const layout = this.wrapSync(layoutInstance.identity);
|
12858
|
+
// Adding this to the returned instance undocumented/typed for Browser
|
12859
|
+
// TODO: if not overridden, then return layoutManager: layoutInstance
|
12860
|
+
return Object.assign(layout, { layoutManager: layoutInstance });
|
12861
|
+
};
|
12862
|
+
this.getCurrentLayoutManagerSync = () => {
|
12863
|
+
return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
|
12838
12864
|
};
|
12839
12865
|
}
|
12840
12866
|
/**
|
@@ -12932,7 +12958,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12932
12958
|
}
|
12933
12959
|
}
|
12934
12960
|
Factory$2.LayoutModule = LayoutModule;
|
12935
|
-
_LayoutModule_layoutInitializationAttempted = new WeakMap();
|
12961
|
+
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap();
|
12936
12962
|
|
12937
12963
|
(function (exports) {
|
12938
12964
|
/**
|