@openfin/core 30.73.27 → 30.74.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/LICENSE.md +4 -0
- package/package.json +2 -2
- package/src/OpenFin.d.ts +1726 -189
- package/src/OpenFin.js +3 -2
- package/src/api/api-exposer/api-consumer.d.ts +28 -0
- package/src/api/api-exposer/api-consumer.js +28 -0
- package/src/api/api-exposer/api-exposer.d.ts +35 -0
- package/src/api/api-exposer/api-exposer.js +38 -0
- package/src/api/api-exposer/decorators.d.ts +10 -0
- package/src/api/api-exposer/decorators.js +18 -0
- package/src/api/api-exposer/index.d.ts +4 -0
- package/src/api/api-exposer/index.js +20 -0
- package/src/api/api-exposer/strategies/index.d.ts +1 -0
- package/src/api/api-exposer/strategies/index.js +17 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +14 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +20 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +20 -0
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +23 -0
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +2 -0
- package/src/api/api-exposer/strategies/openfin-channels/index.js +18 -0
- package/src/api/application/Factory.d.ts +1 -0
- package/src/api/application/Factory.js +1 -0
- package/src/api/application/Instance.d.ts +2 -1
- package/src/api/application/Instance.js +1 -0
- package/src/api/base.d.ts +2 -2
- package/src/api/clipboard/index.d.ts +1 -0
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/base.d.ts +0 -3
- package/src/api/events/platform.d.ts +4 -5
- package/src/api/events/system.d.ts +5 -6
- package/src/api/events/view.d.ts +6 -3
- package/src/api/events/webcontents.d.ts +25 -3
- package/src/api/events/window.d.ts +21 -13
- package/src/api/external-application/Instance.d.ts +1 -1
- package/src/api/fin.d.ts +1 -1
- package/src/api/frame/Instance.d.ts +1 -1
- package/src/api/global-hotkey/index.d.ts +1 -1
- package/src/api/interappbus/channel/channel.d.ts +1 -1
- package/src/api/interappbus/channel/channels-docs.d.ts +7 -0
- package/src/api/interappbus/channel/channels-docs.js +7 -0
- package/src/api/interappbus/channel/client.d.ts +3 -2
- package/src/api/interappbus/channel/client.js +12 -5
- package/src/api/interappbus/channel/connection-manager.d.ts +1 -1
- package/src/api/interappbus/channel/index.d.ts +1 -1
- package/src/api/interappbus/channel/index.js +6 -8
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/index.d.ts +3 -0
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +10 -2
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +1 -1
- package/src/api/interappbus/channel/provider.d.ts +1 -1
- package/src/api/interappbus/index.d.ts +1 -1
- package/src/api/interop/Factory.d.ts +1 -2
- package/src/api/interop/Factory.js +20 -4
- package/src/api/interop/InteropBroker.d.ts +16 -48
- package/src/api/interop/InteropBroker.js +39 -47
- package/src/api/interop/InteropClient.d.ts +10 -9
- package/src/api/interop/InteropClient.js +9 -8
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -1
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +1 -0
- package/src/api/interop/fdc3/PrivateChannelClient.js +15 -7
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +15 -1
- package/src/api/interop/fdc3/PrivateChannelProvider.js +80 -21
- package/src/api/interop/fdc3/fdc3-1.2.js +27 -12
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +13 -12
- package/src/api/interop/fdc3/fdc3-2.0.js +33 -26
- package/src/api/interop/fdc3/fdc3.d.ts +4 -5
- package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
- package/src/api/interop/fdc3/overrideCheck.js +32 -0
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +1 -1
- package/src/api/interop/fdc3/utils.d.ts +17 -0
- package/src/api/interop/fdc3/utils.js +52 -18
- package/src/api/interop/fdc3/versions.d.ts +1 -0
- package/src/api/interop/fdc3/versions.js +2 -0
- package/src/api/me.d.ts +1 -1
- package/src/api/platform/Factory.d.ts +6 -1
- package/src/api/platform/Factory.js +5 -0
- package/src/api/platform/Instance.d.ts +5 -3
- package/src/api/platform/Instance.js +5 -3
- package/src/api/platform/layout/Factory.d.ts +4 -0
- package/src/api/platform/layout/Factory.js +15 -3
- package/src/api/platform/layout/Instance.d.ts +7 -1
- package/src/api/platform/layout/Instance.js +26 -1
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +9 -0
- package/src/api/platform/layout/controllers/layout-content-cache.js +54 -0
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +117 -0
- package/src/api/platform/layout/controllers/layout-entities-controller.js +270 -0
- package/src/api/platform/layout/entities/layout-entities.d.ts +144 -0
- package/src/api/platform/layout/entities/layout-entities.js +216 -0
- package/src/api/platform/layout/entities/shapes.d.ts +6 -0
- package/src/api/platform/layout/entities/shapes.js +2 -0
- package/src/api/platform/layout/layout.constants.d.ts +1 -0
- package/src/api/platform/layout/layout.constants.js +4 -0
- package/src/api/platform/layout/shapes.d.ts +3 -0
- package/src/api/platform/layout/utils/layout-traversal.d.ts +4 -0
- package/src/api/platform/layout/utils/layout-traversal.js +65 -0
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -1
- package/src/api/platform/provider.d.ts +162 -0
- package/src/api/platform/provider.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +1 -0
- package/src/api/snapshot-source/Factory.js +1 -0
- package/src/api/snapshot-source/Instance.d.ts +1 -1
- package/src/api/system/index.d.ts +1 -471
- package/src/api/system/index.js +6 -476
- package/src/api/view/Instance.d.ts +24 -5
- package/src/api/view/Instance.js +53 -8
- package/src/api/webcontents/main.d.ts +18 -4
- package/src/api/window/Instance.d.ts +26 -1
- package/src/api/window/Instance.js +25 -0
- package/src/browser.js +1 -1
- package/src/mock.js +1 -1
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/transport/fin_store.d.ts +1 -1
- package/src/transport/transport-errors.d.ts +6 -1
- package/src/transport/transport-errors.js +1 -2
- package/src/transport/transport.d.ts +9 -6
- package/src/transport/transport.js +11 -2
- package/src/util/channel-api-relay.d.ts +13 -0
- package/src/util/channel-api-relay.js +37 -0
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
- package/src/util/lazy.d.ts +16 -0
- package/src/util/lazy.js +26 -0
- package/src/util/reversible-map.d.ts +11 -0
- package/src/util/reversible-map.js +49 -0
package/src/OpenFin.d.ts
CHANGED
|
@@ -1,43 +1,59 @@
|
|
|
1
|
-
import type { Application } from './api/application';
|
|
2
|
-
import {
|
|
3
|
-
import { ExternalApplicationEvent } from './api/events/externalApplication';
|
|
4
|
-
import { FrameEvent } from './api/events/frame';
|
|
5
|
-
import { GlobalHotkeyEvent } from './api/events/globalHotkey';
|
|
6
|
-
import { PlatformEvent } from './api/events/platform';
|
|
7
|
-
import { AppVersionEvent, SystemEvent } from './api/events/system';
|
|
1
|
+
import type { Application } from './api/application/index';
|
|
2
|
+
import { AppVersionEvent } from './api/events/system';
|
|
8
3
|
import { TypedEventEmitter } from './api/events/typedEventEmitter';
|
|
9
|
-
import {
|
|
10
|
-
import { WindowEvent, WindowOptionsChangedEvent } from './api/events/window';
|
|
11
|
-
import type { ExternalApplication } from './api/external-application';
|
|
4
|
+
import type { ExternalApplication } from './api/external-application/index';
|
|
12
5
|
import { FinApi } from './api/fin';
|
|
13
|
-
import type { _Frame } from './api/frame';
|
|
6
|
+
import type { _Frame } from './api/frame/index';
|
|
14
7
|
import type ChannelClient from './api/interappbus/channel/client';
|
|
15
|
-
import { MessagingProtocols } from './api/interappbus/channel/protocols';
|
|
8
|
+
import { MessagingProtocols } from './api/interappbus/channel/protocols/index';
|
|
16
9
|
import type { ChannelProvider } from './api/interappbus/channel/provider';
|
|
17
|
-
import type { InteropBroker, InteropClient } from './api/interop';
|
|
18
|
-
import type { Platform } from './api/platform';
|
|
19
|
-
import type { Layout } from './api/platform/layout';
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
10
|
+
import type { InteropBroker, InteropClient } from './api/interop/index';
|
|
11
|
+
import type { Platform } from './api/platform/index';
|
|
12
|
+
import type { Layout } from './api/platform/layout/index';
|
|
13
|
+
import { PlatformProvider } from './api/platform/provider';
|
|
14
|
+
import { SnapshotSource } from './api/snapshot-source/index';
|
|
15
|
+
import type { View } from './api/view/index';
|
|
16
|
+
import { _Window } from './api/window/index';
|
|
17
|
+
import { ColumnOrRow, TabStack } from './api/platform/layout/entities/layout-entities';
|
|
23
18
|
export declare type Fin<MeType extends EntityType = 'window' | 'view'> = FinApi<MeType>;
|
|
24
|
-
export type { Application, ExternalApplication, _Frame as Frame, ChannelClient, ChannelProvider, Platform, Layout, View, _Window as Window, InteropClient, InteropBroker, SnapshotSource };
|
|
19
|
+
export type { Application, ExternalApplication, _Frame as Frame, ChannelClient, ChannelProvider, Platform, Layout, View, ColumnOrRow, TabStack, _Window as Window, InteropClient, InteropBroker, SnapshotSource };
|
|
20
|
+
export type { LayoutEntityDefinition, LayoutEntityTypes, LayoutPosition } from './api/platform/layout/entities/shapes';
|
|
25
21
|
export declare type WebContent = View | _Window;
|
|
22
|
+
export type { PlatformProvider };
|
|
26
23
|
export declare type ApplicationIdentity = {
|
|
27
24
|
uuid: string;
|
|
28
25
|
};
|
|
29
26
|
export declare type Identity = {
|
|
27
|
+
/**
|
|
28
|
+
* Universally unique identifier of the compenent
|
|
29
|
+
*/
|
|
30
30
|
uuid: string;
|
|
31
|
+
/**
|
|
32
|
+
* The name of the component
|
|
33
|
+
*/
|
|
31
34
|
name: string;
|
|
32
35
|
};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Identity of a channel client
|
|
38
|
+
*/
|
|
39
|
+
export declare type ClientIdentity = Identity & {
|
|
40
|
+
/**
|
|
41
|
+
* Unique identifier for a client, because there can be multiple clients at one name/uuid entity.
|
|
42
|
+
*/
|
|
36
43
|
endpointId: string;
|
|
37
44
|
isLocalEndpointId: boolean;
|
|
38
45
|
};
|
|
46
|
+
/**
|
|
47
|
+
* Extended channel client information
|
|
48
|
+
*/
|
|
39
49
|
export declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
|
|
50
|
+
/**
|
|
51
|
+
* Indicates if the client belongs to a Window or View
|
|
52
|
+
*/
|
|
40
53
|
entityType: EntityType;
|
|
54
|
+
/**
|
|
55
|
+
* URL of the View or Window at the time of connection to the Channel Provider.
|
|
56
|
+
*/
|
|
41
57
|
connectionUrl: string;
|
|
42
58
|
};
|
|
43
59
|
export declare type ClientIdentityMultiRuntime = ClientIdentity & {
|
|
@@ -62,48 +78,160 @@ export declare type WindowBounds = Bounds & {
|
|
|
62
78
|
bottom: number;
|
|
63
79
|
right: number;
|
|
64
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* A rectangular area on the screen.
|
|
83
|
+
*/
|
|
65
84
|
export declare type Rectangle = {
|
|
85
|
+
/**
|
|
86
|
+
* The x coordinate of the rectangle's origin in pixels
|
|
87
|
+
*/
|
|
66
88
|
x: number;
|
|
89
|
+
/**
|
|
90
|
+
* The y coordinate of the rectangle's origin in pixels
|
|
91
|
+
*/
|
|
67
92
|
y: number;
|
|
93
|
+
/**
|
|
94
|
+
* The width of the rectangle in pixels
|
|
95
|
+
*/
|
|
68
96
|
width: number;
|
|
97
|
+
/**
|
|
98
|
+
* The height of the rectangle in pixels
|
|
99
|
+
*/
|
|
69
100
|
height: number;
|
|
70
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
* The options object required by {@link Application.start Application.start}.
|
|
104
|
+
*
|
|
105
|
+
* The following options are required:
|
|
106
|
+
* * `uuid` is required in the app manifest as well as by {@link Application.start Application.start}
|
|
107
|
+
* * `name` is optional in the app manifest but required by {@link Application.start Application.start}
|
|
108
|
+
* * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given
|
|
109
|
+
* (defaults to `"about:blank"` when omitted).
|
|
110
|
+
*
|
|
111
|
+
* _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._
|
|
112
|
+
*
|
|
113
|
+
* **IMPORTANT NOTE:**
|
|
114
|
+
* This object inherits all the properties of the window creation {@link Window~options options} object,
|
|
115
|
+
* which will take priority over those of the same name that may be provided in `mainWindowOptions`.
|
|
116
|
+
*/
|
|
71
117
|
export declare type ApplicationCreationOptions = Partial<ApplicationOptions> & {
|
|
72
118
|
name: string;
|
|
73
119
|
uuid: string;
|
|
74
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* The complete set of options for an application.
|
|
123
|
+
*/
|
|
75
124
|
export declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
|
|
125
|
+
/**
|
|
126
|
+
* @defaultValue false
|
|
127
|
+
*
|
|
128
|
+
* Disables IAB secure logging for the app.
|
|
129
|
+
*/
|
|
76
130
|
disableIabSecureLogging: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* @defaultValue 'There was an error loading the application.'
|
|
133
|
+
*
|
|
134
|
+
* An error message to display when the application (launched via manifest) fails to load.
|
|
135
|
+
* A dialog box will be launched with the error message just before the runtime exits.
|
|
136
|
+
* Load fails such as failed DNS resolutions or aborted connections as well as cancellations, _e.g.,_ `window.stop()`,
|
|
137
|
+
* will trigger this dialog.
|
|
138
|
+
* Client response codes such as `404 Not Found` are not treated as fails as they are valid server responses.
|
|
139
|
+
*/
|
|
77
140
|
loadErrorMessage: string;
|
|
141
|
+
/**
|
|
142
|
+
* The options of the main window of the application.
|
|
143
|
+
*/
|
|
78
144
|
mainWindowOptions: WindowCreationOptions;
|
|
145
|
+
/**
|
|
146
|
+
* The name of the application (and the application's main window).
|
|
147
|
+
*
|
|
148
|
+
* If provided, _must_ match `uuid`.
|
|
149
|
+
*/
|
|
79
150
|
name: string;
|
|
151
|
+
/**
|
|
152
|
+
* @defaultValue false
|
|
153
|
+
*
|
|
154
|
+
* A flag to configure the application as non-persistent.
|
|
155
|
+
* Runtime exits when there are no persistent apps running.
|
|
156
|
+
*/
|
|
80
157
|
nonPersistent: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* @defaultValue false
|
|
160
|
+
*
|
|
161
|
+
* Enable Flash at the application level.
|
|
162
|
+
*/
|
|
81
163
|
plugins: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* @defaultValue false
|
|
166
|
+
* Enable spell check at the application level.
|
|
167
|
+
*/
|
|
82
168
|
spellCheck: boolean;
|
|
169
|
+
/**
|
|
170
|
+
* @defaultValue 'about:blank'
|
|
171
|
+
* The url to the application (specifically the application's main window).
|
|
172
|
+
*/
|
|
83
173
|
url: string;
|
|
174
|
+
/**
|
|
175
|
+
* The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
|
|
176
|
+
* running in the OpenFin Runtime.
|
|
177
|
+
*
|
|
178
|
+
* Note that `name` and `uuid` must match.
|
|
179
|
+
*/
|
|
84
180
|
uuid: string;
|
|
181
|
+
/**
|
|
182
|
+
* @defaultValue true
|
|
183
|
+
*
|
|
184
|
+
* When set to `false` it will disable the same-origin policy for the app.
|
|
185
|
+
*/
|
|
85
186
|
webSecurity: boolean;
|
|
86
187
|
commands: ShortcutOverride[];
|
|
87
188
|
isPlatformController: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* @defaultValue 1000
|
|
191
|
+
*
|
|
192
|
+
* Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed.
|
|
193
|
+
* If you do not wish for views to be pooled on your platform, set this property to zero.
|
|
194
|
+
*/
|
|
88
195
|
maxViewPoolSize: number;
|
|
89
196
|
defaultWindowOptions: Partial<WindowOptions>;
|
|
90
197
|
defaultViewOptions: Partial<ViewOptions>;
|
|
91
198
|
snapshot: Snapshot;
|
|
199
|
+
/**
|
|
200
|
+
* @defaultValue false
|
|
201
|
+
*
|
|
202
|
+
* Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed.
|
|
203
|
+
* Note: if the Platform Provider is showing, it won't close automatically.
|
|
204
|
+
* If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.
|
|
205
|
+
*/
|
|
92
206
|
preventQuitOnLastWindowClosed: boolean;
|
|
93
207
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
94
208
|
apiDiagnostics: boolean;
|
|
95
209
|
defaultDomainSettings: DefaultDomainSettings;
|
|
210
|
+
/**
|
|
211
|
+
* @defaultValue false
|
|
212
|
+
* Enables the use of the Jumplists API and the 'pin to taskbar' functionality.
|
|
213
|
+
* Only relevant in Windows.
|
|
214
|
+
*/
|
|
96
215
|
enableJumpList: boolean;
|
|
97
216
|
enableBeforeUnload: boolean;
|
|
98
217
|
};
|
|
99
|
-
declare type InteropBrokerOptions = {
|
|
218
|
+
export declare type InteropBrokerOptions = {
|
|
100
219
|
contextGroups?: ContextGroupInfo;
|
|
101
220
|
logging?: InteropLoggingOptions;
|
|
102
221
|
};
|
|
103
222
|
export declare type ContextGroupInfo = {
|
|
223
|
+
/**
|
|
224
|
+
* Name of the context group.
|
|
225
|
+
*/
|
|
104
226
|
id: string;
|
|
227
|
+
/**
|
|
228
|
+
* Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.
|
|
229
|
+
*/
|
|
105
230
|
displayMetadata?: DisplayMetadata;
|
|
106
231
|
};
|
|
232
|
+
/**
|
|
233
|
+
* The display data for a context group.
|
|
234
|
+
*/
|
|
107
235
|
export declare type DisplayMetadata = {
|
|
108
236
|
/**
|
|
109
237
|
* A user-readable name for this context group, e.g: `"Red"`
|
|
@@ -118,7 +246,7 @@ export declare type DisplayMetadata = {
|
|
|
118
246
|
*/
|
|
119
247
|
readonly glyph?: string;
|
|
120
248
|
};
|
|
121
|
-
export declare type LegacyWinOptionsInAppOptions = Pick<WindowCreationOptions, 'accelerator' | 'alwaysOnTop' | 'api' | 'aspectRatio' | 'autoShow' | 'backgroundColor' | 'contentNavigation' | 'contextMenu' | 'cornerRounding' | 'customData' | 'customRequestHeaders' | 'defaultCentered' | 'defaultHeight' | 'defaultLeft' | 'defaultTop' | 'defaultWidth' | 'frame' | 'hideOnClose' | 'icon' | 'maxHeight' | 'maximizable' | 'maxWidth' | 'minHeight' | 'minimizable' | 'minWidth' | 'opacity' | 'preloadScripts' | 'resizable' | 'resizeRegion' | 'saveWindowState' | 'ignoreSavedWindowState' | 'shadow' | 'showTaskbarIcon' | 'smallWindow' | 'state' | 'taskbarIconGroup' | 'waitForPageLoad'>;
|
|
249
|
+
export declare type LegacyWinOptionsInAppOptions = Pick<WindowCreationOptions, 'accelerator' | 'alwaysOnTop' | 'api' | 'aspectRatio' | 'autoplayPolicy' | 'autoShow' | 'backgroundColor' | 'contentNavigation' | 'contextMenu' | 'cornerRounding' | 'customData' | 'customRequestHeaders' | 'defaultCentered' | 'defaultHeight' | 'defaultLeft' | 'defaultTop' | 'defaultWidth' | 'frame' | 'hideOnClose' | 'icon' | 'maxHeight' | 'maximizable' | 'maxWidth' | 'minHeight' | 'minimizable' | 'minWidth' | 'opacity' | 'preloadScripts' | 'resizable' | 'resizeRegion' | 'saveWindowState' | 'ignoreSavedWindowState' | 'shadow' | 'showTaskbarIcon' | 'smallWindow' | 'state' | 'taskbarIconGroup' | 'waitForPageLoad'>;
|
|
122
250
|
export declare type Snapshot = {
|
|
123
251
|
windows: WindowCreationOptions[];
|
|
124
252
|
snapshotDetails?: {
|
|
@@ -135,28 +263,61 @@ export declare type ContextGroupStates = {
|
|
|
135
263
|
[key: string]: Context;
|
|
136
264
|
};
|
|
137
265
|
};
|
|
266
|
+
/**
|
|
267
|
+
* Data passed between entities and applications.
|
|
268
|
+
*/
|
|
138
269
|
export declare type Context = {
|
|
270
|
+
/**
|
|
271
|
+
* An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
|
|
272
|
+
*/
|
|
139
273
|
id?: {
|
|
140
274
|
[key: string]: string;
|
|
141
275
|
};
|
|
276
|
+
/**
|
|
277
|
+
* User-readable name for the incoming context.
|
|
278
|
+
*/
|
|
142
279
|
name?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Conserved type for the context (e.g. `instrument` or `country`).
|
|
282
|
+
*/
|
|
143
283
|
type: string;
|
|
144
284
|
};
|
|
145
285
|
export declare type MonitorInfo = {
|
|
286
|
+
/**
|
|
287
|
+
* The device scale factor.
|
|
288
|
+
*/
|
|
146
289
|
deviceScaleFactor: number;
|
|
147
290
|
dpi: Point;
|
|
148
291
|
nonPrimaryMonitors: MonitorDetails[];
|
|
149
292
|
primaryMonitor: MonitorDetails;
|
|
293
|
+
/**
|
|
294
|
+
* Always "api-query".
|
|
295
|
+
*/
|
|
150
296
|
reason: string;
|
|
151
297
|
taskbar: TaskBar;
|
|
298
|
+
/**
|
|
299
|
+
* The virtual display screen coordinates.
|
|
300
|
+
*/
|
|
152
301
|
virtualScreen: DipRect;
|
|
153
302
|
};
|
|
154
303
|
export declare type Point = {
|
|
304
|
+
/**
|
|
305
|
+
* The mouse x position
|
|
306
|
+
*/
|
|
155
307
|
x: number;
|
|
308
|
+
/**
|
|
309
|
+
* The mouse y position
|
|
310
|
+
*/
|
|
156
311
|
y: number;
|
|
157
312
|
};
|
|
158
313
|
export declare type PointTopLeft = {
|
|
314
|
+
/**
|
|
315
|
+
* The mouse top position in virtual screen coordinates
|
|
316
|
+
*/
|
|
159
317
|
top: number;
|
|
318
|
+
/**
|
|
319
|
+
* The mouse left position in virtual screen coordinates
|
|
320
|
+
*/
|
|
160
321
|
left: number;
|
|
161
322
|
};
|
|
162
323
|
export declare type RectangleByEdgePositions = {
|
|
@@ -166,14 +327,38 @@ export declare type RectangleByEdgePositions = {
|
|
|
166
327
|
right: number;
|
|
167
328
|
};
|
|
168
329
|
export declare type MonitorDetails = {
|
|
330
|
+
/**
|
|
331
|
+
* The available DIP scale coordinates.
|
|
332
|
+
*/
|
|
169
333
|
available: DipScaleRects;
|
|
334
|
+
/**
|
|
335
|
+
* The available monitor coordinates.
|
|
336
|
+
*/
|
|
170
337
|
availableRect: RectangleByEdgePositions;
|
|
338
|
+
/**
|
|
339
|
+
* The device id of the display.
|
|
340
|
+
*/
|
|
171
341
|
deviceId: string | number;
|
|
342
|
+
/**
|
|
343
|
+
* True if the display is active.
|
|
344
|
+
*/
|
|
172
345
|
displayDeviceActive: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* The device scale factor.
|
|
348
|
+
*/
|
|
173
349
|
deviceScaleFactor: number;
|
|
350
|
+
/**
|
|
351
|
+
* The monitor coordinates.
|
|
352
|
+
*/
|
|
174
353
|
monitorRect: RectangleByEdgePositions;
|
|
354
|
+
/**
|
|
355
|
+
* The name of the display.
|
|
356
|
+
*/
|
|
175
357
|
name: string | number;
|
|
176
358
|
dpi: Point;
|
|
359
|
+
/**
|
|
360
|
+
* The monitor coordinates.
|
|
361
|
+
*/
|
|
177
362
|
monitor: DipScaleRects;
|
|
178
363
|
};
|
|
179
364
|
export declare type DipRect = RectangleByEdgePositions & {
|
|
@@ -185,91 +370,438 @@ export declare type DipScaleRects = {
|
|
|
185
370
|
scaledRect: RectangleByEdgePositions;
|
|
186
371
|
};
|
|
187
372
|
export declare type TaskBar = DipScaleRects & {
|
|
373
|
+
/**
|
|
374
|
+
* Which edge of a monitor the taskbar is on
|
|
375
|
+
*/
|
|
188
376
|
edge: string;
|
|
377
|
+
/**
|
|
378
|
+
* The taskbar coordinates.
|
|
379
|
+
*/
|
|
189
380
|
rect: RectangleByEdgePositions;
|
|
190
381
|
};
|
|
382
|
+
/**
|
|
383
|
+
* Options required to create a new window with {@link Window.create Window.create}.
|
|
384
|
+
*
|
|
385
|
+
* Note that `name` is the only required property — albeit the `url` property is usually provided as well
|
|
386
|
+
* (defaults to `"about:blank"` when omitted).
|
|
387
|
+
*/
|
|
191
388
|
export declare type WindowCreationOptions = Partial<WindowOptions> & {
|
|
192
389
|
name: string;
|
|
193
390
|
};
|
|
194
391
|
export declare type UpdatableWindowOptions = Partial<MutableWindowOptions>;
|
|
195
392
|
export declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
|
|
393
|
+
/**
|
|
394
|
+
* Configuration for view visibility settings
|
|
395
|
+
*/
|
|
196
396
|
export declare type ViewVisibilityOption = {
|
|
197
397
|
enabled?: boolean;
|
|
198
398
|
};
|
|
399
|
+
/**
|
|
400
|
+
* _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
401
|
+
*/
|
|
199
402
|
export declare type ShowViewOnWindowResizeOptions = ViewVisibilityOption & {
|
|
403
|
+
/**
|
|
404
|
+
* @defaultValue false
|
|
405
|
+
*
|
|
406
|
+
* Enables showing Views when a Platform Window is being resized.
|
|
407
|
+
*/
|
|
408
|
+
enabled?: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* @defaultValue 0
|
|
411
|
+
*
|
|
412
|
+
* Number of milliseconds to wait between view repaints.
|
|
413
|
+
*/
|
|
200
414
|
paintIntervalMs?: number;
|
|
201
415
|
};
|
|
416
|
+
/**
|
|
417
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
418
|
+
*/
|
|
202
419
|
export declare type ViewVisibilityOptions = {
|
|
420
|
+
/**
|
|
421
|
+
* Enables views to be shown when a Platform Window is being resized by the user.
|
|
422
|
+
*/
|
|
203
423
|
showViewsOnWindowResize?: ShowViewOnWindowResizeOptions;
|
|
424
|
+
/**
|
|
425
|
+
* Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
426
|
+
*/
|
|
204
427
|
showViewsOnSplitterDrag?: ViewVisibilityOption;
|
|
428
|
+
/**
|
|
429
|
+
* _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
|
|
430
|
+
*/
|
|
205
431
|
showViewsOnTabDrag?: ViewVisibilityOption;
|
|
206
432
|
};
|
|
433
|
+
/**
|
|
434
|
+
* Visibility state of a window.
|
|
435
|
+
*/
|
|
207
436
|
export declare type WindowState = 'maximized' | 'minimized' | 'normal';
|
|
437
|
+
/**
|
|
438
|
+
* Autoplay policy to apply to content in the window, can be
|
|
439
|
+
* `no-user-gesture-required`, `user-gesture-required`,
|
|
440
|
+
* `document-user-activation-required`. Defaults to `no-user-gesture-required`.
|
|
441
|
+
*/
|
|
442
|
+
export declare type AutoplayPolicyOptions = 'no-user-gesture-required' | 'user-gesture-required' | 'document-user-activation-required';
|
|
443
|
+
/**
|
|
444
|
+
* Window options that cannot be changed after creation.
|
|
445
|
+
*/
|
|
208
446
|
export declare type ConstWindowOptions = {
|
|
447
|
+
/**
|
|
448
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
449
|
+
*/
|
|
209
450
|
accelerator: Partial<Accelerator>;
|
|
451
|
+
/**
|
|
452
|
+
* Configurations for API injection.
|
|
453
|
+
*/
|
|
210
454
|
api: Api;
|
|
455
|
+
/**
|
|
456
|
+
* @deprecated use `icon` instead.
|
|
457
|
+
*/
|
|
211
458
|
applicationIcon: string;
|
|
459
|
+
/**
|
|
460
|
+
* Autoplay policy to apply to content in the window, can be
|
|
461
|
+
* `no-user-gesture-required`, `user-gesture-required`,
|
|
462
|
+
* `document-user-activation-required`. Defaults to `no-user-gesture-required`.
|
|
463
|
+
*/
|
|
464
|
+
autoplayPolicy: AutoplayPolicyOptions;
|
|
465
|
+
/**
|
|
466
|
+
* Automatically show the window when it is created.
|
|
467
|
+
*/
|
|
212
468
|
autoShow: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* The window’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
|
|
471
|
+
* (`document.body.style.backgroundColor`),
|
|
472
|
+
* this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed
|
|
473
|
+
* areas when growing a window. Setting
|
|
474
|
+
* this value to the anticipated content background color can help improve user experience.
|
|
475
|
+
* Default is white.
|
|
476
|
+
*/
|
|
213
477
|
backgroundColor: string;
|
|
478
|
+
/**
|
|
479
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
480
|
+
*/
|
|
214
481
|
contentCreation: ContentCreationOptions;
|
|
482
|
+
/**
|
|
483
|
+
* Restrict navigation to URLs that match a whitelisted pattern.
|
|
484
|
+
* In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
|
|
485
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
486
|
+
*/
|
|
215
487
|
contentNavigation: ContentNavigation;
|
|
488
|
+
/**
|
|
489
|
+
* Restrict redirects to URLs that match a whitelisted pattern.
|
|
490
|
+
* In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited.
|
|
491
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
492
|
+
*/
|
|
216
493
|
contentRedirect: Partial<ContentRedirect>;
|
|
494
|
+
/**
|
|
495
|
+
* Custom headers for requests sent by the window.
|
|
496
|
+
*/
|
|
217
497
|
customRequestHeaders: CustomRequestHeaders[];
|
|
498
|
+
/**
|
|
499
|
+
* @defaultValue true
|
|
500
|
+
*
|
|
501
|
+
* Toggling off would keep the Window alive even if all its Views were closed.
|
|
502
|
+
* This is meant for advanced users and should be used with caution.
|
|
503
|
+
* Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
|
|
504
|
+
* Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
|
|
505
|
+
* ** note ** - This option is ignored in non-Platforms apps.
|
|
506
|
+
*/
|
|
218
507
|
closeOnLastViewRemoved: boolean;
|
|
508
|
+
/**
|
|
509
|
+
* Centers the window in the primary monitor. This option overrides `defaultLeft` and `defaultTop`. When `saveWindowState` is `true`,
|
|
510
|
+
* this value will be ignored for subsequent launches in favor of the cached value. **NOTE:** On macOS _defaultCenter_ is
|
|
511
|
+
* somewhat above center vertically.
|
|
512
|
+
*/
|
|
219
513
|
defaultCentered: boolean;
|
|
514
|
+
/**
|
|
515
|
+
* @defaultValue 500
|
|
516
|
+
*
|
|
517
|
+
* The default height of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent launches
|
|
518
|
+
* in favor of the cached value.
|
|
519
|
+
*/
|
|
220
520
|
defaultHeight: number;
|
|
521
|
+
/**
|
|
522
|
+
* @defaultValue 100
|
|
523
|
+
*
|
|
524
|
+
* The default left position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
|
|
525
|
+
* launches in favor of the cached value.
|
|
526
|
+
*/
|
|
221
527
|
defaultLeft: number;
|
|
528
|
+
/**
|
|
529
|
+
* @defaultValue 100
|
|
530
|
+
*
|
|
531
|
+
* The default top position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
|
|
532
|
+
* launches in favor of the cached value.
|
|
533
|
+
*/
|
|
222
534
|
defaultTop: number;
|
|
535
|
+
/**
|
|
536
|
+
* @defaultValue 800
|
|
537
|
+
*
|
|
538
|
+
* The default width of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
|
|
539
|
+
* launches in favor of the cached value.
|
|
540
|
+
*/
|
|
223
541
|
defaultWidth: number;
|
|
224
542
|
height: number;
|
|
225
543
|
layout: any;
|
|
544
|
+
/**
|
|
545
|
+
* Parent identity of a modal window. It will create a modal child window when this option is set.
|
|
546
|
+
*/
|
|
226
547
|
modalParentIdentity: Identity;
|
|
548
|
+
/**
|
|
549
|
+
* The name of the window.
|
|
550
|
+
*/
|
|
227
551
|
name: string;
|
|
228
552
|
permissions: Partial<Permissions>;
|
|
553
|
+
/**
|
|
554
|
+
* Scripts that run before page load. When omitted, inherits from the parent application.
|
|
555
|
+
*/
|
|
229
556
|
preloadScripts: PreloadScript[];
|
|
557
|
+
/**
|
|
558
|
+
* String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.
|
|
559
|
+
*/
|
|
230
560
|
processAffinity: string;
|
|
231
|
-
|
|
561
|
+
/**
|
|
562
|
+
* @defaultValue false
|
|
563
|
+
*
|
|
564
|
+
* Displays a shadow on frameless windows.
|
|
565
|
+
* `shadow` and `cornerRounding` are mutually exclusive.
|
|
566
|
+
* On Windows 7, Aero theme is required.
|
|
567
|
+
*/
|
|
232
568
|
shadow: boolean;
|
|
569
|
+
/**
|
|
570
|
+
* @defaultValue true
|
|
571
|
+
*
|
|
572
|
+
* Caches the location of the window.
|
|
573
|
+
* Note: this option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
|
|
574
|
+
*/
|
|
575
|
+
saveWindowState: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* Ignores the cached state of the window.
|
|
578
|
+
* Defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
|
|
579
|
+
*/
|
|
233
580
|
ignoreSavedWindowState: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* @defaultValue false
|
|
583
|
+
*
|
|
584
|
+
* Makes this window a frameless window that can be created and resized to less than 41x36 px (width x height).
|
|
585
|
+
* _Note: Caveats of small windows are no Aero Snap and drag to/from maximize._
|
|
586
|
+
* _Windows 10: Requires `maximizable` to be false. Resizing with the mouse is only possible down to 38x39 px._
|
|
587
|
+
*/
|
|
234
588
|
smallWindow: boolean;
|
|
589
|
+
/**
|
|
590
|
+
* @defaultValue "normal"
|
|
591
|
+
*
|
|
592
|
+
* The visible state of the window on creation.
|
|
593
|
+
* One of:
|
|
594
|
+
* * `"maximized"`
|
|
595
|
+
* * `"minimized"`
|
|
596
|
+
* * `"normal"`
|
|
597
|
+
*/
|
|
235
598
|
state: WindowState;
|
|
599
|
+
/**
|
|
600
|
+
* @Deprecated - use `icon` instead.
|
|
601
|
+
*/
|
|
236
602
|
taskbarIcon: string;
|
|
603
|
+
/**
|
|
604
|
+
* Specify a taskbar group for the window.
|
|
605
|
+
* _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
|
|
606
|
+
*/
|
|
237
607
|
taskbarIconGroup: string;
|
|
608
|
+
/**
|
|
609
|
+
* @defaultValue "about:blank"
|
|
610
|
+
*
|
|
611
|
+
* The URL of the window
|
|
612
|
+
*/
|
|
238
613
|
url: string;
|
|
614
|
+
/**
|
|
615
|
+
* @defaultValue <application UUID>
|
|
616
|
+
*
|
|
617
|
+
* The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
|
|
618
|
+
* If omitted, defaults to the `uuid` of the application spawning the window.
|
|
619
|
+
* If given, must match the `uuid` of the application spawning the window.
|
|
620
|
+
* In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
|
|
621
|
+
* really no need to provide it.
|
|
622
|
+
*/
|
|
239
623
|
uuid: string;
|
|
624
|
+
/**
|
|
625
|
+
* @defaultValue false
|
|
626
|
+
*
|
|
627
|
+
* When set to `true`, the window will not appear until the `window` object's `load` event fires.
|
|
628
|
+
* When set to `false`, the window will appear immediately without waiting for content to be loaded.
|
|
629
|
+
*/
|
|
240
630
|
waitForPageLoad: boolean;
|
|
241
631
|
width: number;
|
|
242
632
|
x: number;
|
|
243
633
|
y: number;
|
|
244
634
|
experimental?: any;
|
|
245
635
|
fdc3InteropApi?: string;
|
|
636
|
+
/**
|
|
637
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
638
|
+
*/
|
|
246
639
|
viewVisibility?: ViewVisibilityOptions;
|
|
247
640
|
};
|
|
641
|
+
/**
|
|
642
|
+
* Window options that can be changed after window creation.
|
|
643
|
+
*/
|
|
248
644
|
export declare type MutableWindowOptions = {
|
|
645
|
+
/**
|
|
646
|
+
* Turns anything of matching RGB value transparent.
|
|
647
|
+
*
|
|
648
|
+
* Caveats:
|
|
649
|
+
* * runtime key --disable-gpu is required. Note: Unclear behavior on remote Desktop support
|
|
650
|
+
* * User cannot click-through transparent regions
|
|
651
|
+
* * Not supported on Mac
|
|
652
|
+
* * Windows Aero must be enabled
|
|
653
|
+
* * Won't make visual sense on Pixel-pushed environments such as Citrix
|
|
654
|
+
* * Not supported on rounded corner windows
|
|
655
|
+
*/
|
|
249
656
|
alphaMask: RGB;
|
|
657
|
+
/**
|
|
658
|
+
* @defaultValue false
|
|
659
|
+
*
|
|
660
|
+
* Always position the window at the top of the window stack.
|
|
661
|
+
*/
|
|
250
662
|
alwaysOnTop: boolean;
|
|
663
|
+
/**
|
|
664
|
+
* @defaultValue 0
|
|
665
|
+
*
|
|
666
|
+
* The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero,
|
|
667
|
+
* an aspect ratio will not be enforced.
|
|
668
|
+
*/
|
|
251
669
|
aspectRatio: number;
|
|
670
|
+
/**
|
|
671
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
672
|
+
*
|
|
673
|
+
* @defaultValue true
|
|
674
|
+
*
|
|
675
|
+
* Show the context menu when right-clicking on the window.
|
|
676
|
+
* Gives access to the devtools for the window.
|
|
677
|
+
*/
|
|
252
678
|
contextMenu: boolean;
|
|
679
|
+
/**
|
|
680
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
681
|
+
*
|
|
682
|
+
* Configure the context menu when right-clicking on a window.
|
|
683
|
+
*/
|
|
253
684
|
contextMenuSettings: ContextMenuSettings;
|
|
685
|
+
/**
|
|
686
|
+
* Configure the context menu when right-clicking on a window.
|
|
687
|
+
*/
|
|
254
688
|
contextMenuOptions: ContextMenuOptions;
|
|
689
|
+
/**
|
|
690
|
+
* Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
|
|
691
|
+
* average of _height_ and _width_.
|
|
692
|
+
*/
|
|
255
693
|
cornerRounding: Partial<CornerRounding>;
|
|
694
|
+
/**
|
|
695
|
+
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
696
|
+
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
697
|
+
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
698
|
+
* _When omitted, _inherits_ from the parent application._
|
|
699
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
700
|
+
*/
|
|
256
701
|
customContext: any;
|
|
702
|
+
/**
|
|
703
|
+
* A field that the user can attach serializable data to be ferried around with the window options.
|
|
704
|
+
* _When omitted, _inherits_ from the parent application._
|
|
705
|
+
*/
|
|
257
706
|
customData: any;
|
|
707
|
+
/**
|
|
708
|
+
* @defaultValue true
|
|
709
|
+
*
|
|
710
|
+
* Show the window's frame.
|
|
711
|
+
*/
|
|
258
712
|
frame: boolean;
|
|
713
|
+
/**
|
|
714
|
+
* @defaultValue false
|
|
715
|
+
*
|
|
716
|
+
* Hides the window instead of closing it when the close button is pressed.
|
|
717
|
+
*/
|
|
259
718
|
hideOnClose: boolean;
|
|
719
|
+
/**
|
|
720
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the window. For usage example see [example]{@tutorial hotkeys}.
|
|
721
|
+
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
|
722
|
+
* [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
|
|
723
|
+
* that can be assigned to a specific hotkey in the platform manifest.
|
|
724
|
+
*/
|
|
260
725
|
hotkeys: Hotkey[];
|
|
726
|
+
/**
|
|
727
|
+
* A URL for the icon to be shown in the window title bar and the taskbar.
|
|
728
|
+
* When omitted, inherits from the parent application._
|
|
729
|
+
* note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
|
|
730
|
+
*/
|
|
261
731
|
icon: string;
|
|
732
|
+
/**
|
|
733
|
+
* @defaultValue true
|
|
734
|
+
*
|
|
735
|
+
* Include window in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with
|
|
736
|
+
* inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.
|
|
737
|
+
*/
|
|
262
738
|
includeInSnapshots: boolean;
|
|
739
|
+
/**
|
|
740
|
+
* @defaultValue -1
|
|
741
|
+
*
|
|
742
|
+
* The maximum height of a window. Will default to the OS defined value if set to -1.
|
|
743
|
+
*/
|
|
263
744
|
maxHeight: number;
|
|
745
|
+
/**
|
|
746
|
+
* @defaultValue true
|
|
747
|
+
*
|
|
748
|
+
* Allows the window to be maximized.
|
|
749
|
+
*/
|
|
264
750
|
maximizable: boolean;
|
|
751
|
+
/**
|
|
752
|
+
* @defaultValue -1
|
|
753
|
+
*
|
|
754
|
+
* The maximum width of a window. Will default to the OS defined value if set to -1.
|
|
755
|
+
*/
|
|
265
756
|
maxWidth: number;
|
|
757
|
+
/**
|
|
758
|
+
* @defaultValue 0
|
|
759
|
+
*
|
|
760
|
+
* The minimum height of the window.
|
|
761
|
+
*/
|
|
266
762
|
minHeight: number;
|
|
763
|
+
/**
|
|
764
|
+
* @defaultValue true
|
|
765
|
+
*
|
|
766
|
+
* Allows the window to be minimized.
|
|
767
|
+
*/
|
|
267
768
|
minimizable: boolean;
|
|
769
|
+
/**
|
|
770
|
+
* @defaultValue true
|
|
771
|
+
*
|
|
772
|
+
* The minimum width of the window.
|
|
773
|
+
*/
|
|
268
774
|
minWidth: number;
|
|
775
|
+
/**
|
|
776
|
+
* @defaultValue 1
|
|
777
|
+
*
|
|
778
|
+
* A flag that specifies how transparent the window will be.
|
|
779
|
+
* Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
|
|
780
|
+
* This value is clamped between `0.0` and `1.0`.
|
|
781
|
+
*/
|
|
269
782
|
opacity: number;
|
|
783
|
+
/**
|
|
784
|
+
* @defaultValue true
|
|
785
|
+
*
|
|
786
|
+
* A flag to allow the user to resize the window.
|
|
787
|
+
*/
|
|
270
788
|
resizable: boolean;
|
|
789
|
+
/**
|
|
790
|
+
* Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
|
|
791
|
+
*/
|
|
271
792
|
resizeRegion: ResizeRegion;
|
|
793
|
+
/**
|
|
794
|
+
* @defaultValue false
|
|
795
|
+
*
|
|
796
|
+
* Platforms Only. If true, will show background images in the layout when the Views are hidden.
|
|
797
|
+
* This occurs when the window is resizing or a tab is being dragged within the layout.
|
|
798
|
+
*/
|
|
272
799
|
showBackgroundImages: boolean;
|
|
800
|
+
/**
|
|
801
|
+
* @defaultValue true
|
|
802
|
+
*
|
|
803
|
+
* Shows the window's icon in the taskbar.
|
|
804
|
+
*/
|
|
273
805
|
showTaskbarIcon: boolean;
|
|
274
806
|
interop: InteropConfig;
|
|
275
807
|
workspacePlatform: WorkspacePlatformOptions;
|
|
@@ -278,11 +810,25 @@ export declare type WorkspacePlatformOptions = {
|
|
|
278
810
|
/** Leaving this as any for now until we figure out what the shape should look like in Workspace */
|
|
279
811
|
[key: string]: any;
|
|
280
812
|
};
|
|
813
|
+
/**
|
|
814
|
+
* Object representing headers and their values, where the
|
|
815
|
+
* object key is the name of header and value key is the value of the header
|
|
816
|
+
*/
|
|
281
817
|
export declare type WebRequestHeader = {
|
|
282
818
|
[key: string]: string;
|
|
283
819
|
};
|
|
820
|
+
/**
|
|
821
|
+
* Custom headers for requests sent by the window.
|
|
822
|
+
*/
|
|
284
823
|
export declare type CustomRequestHeaders = {
|
|
824
|
+
/**
|
|
825
|
+
* The URL patterns for which the headers will be applied.
|
|
826
|
+
*/
|
|
285
827
|
urlPatterns: string[];
|
|
828
|
+
/**
|
|
829
|
+
* Headers for requests sent by window; {key: value} results
|
|
830
|
+
* in a header of `key=value`.
|
|
831
|
+
*/
|
|
286
832
|
headers: WebRequestHeader[];
|
|
287
833
|
};
|
|
288
834
|
export declare type WindowOptionDiff = {
|
|
@@ -291,47 +837,180 @@ export declare type WindowOptionDiff = {
|
|
|
291
837
|
newVal: WindowOptions[key];
|
|
292
838
|
};
|
|
293
839
|
};
|
|
840
|
+
/**
|
|
841
|
+
* Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
|
|
842
|
+
*/
|
|
294
843
|
export declare type ResizeRegion = {
|
|
844
|
+
/**
|
|
845
|
+
* @defaultValue 7
|
|
846
|
+
*
|
|
847
|
+
* The size of the resize region in pixels.
|
|
848
|
+
*/
|
|
295
849
|
size?: number;
|
|
850
|
+
/**
|
|
851
|
+
* @defaultValue 9
|
|
852
|
+
*
|
|
853
|
+
* The size in pixels of an additional square resizable region located at the bottom right corner of a frameless window.
|
|
854
|
+
*/
|
|
296
855
|
bottomRightCorner?: number;
|
|
856
|
+
/**
|
|
857
|
+
* Enables resizing interaction for each side of the window.
|
|
858
|
+
*/
|
|
297
859
|
sides?: {
|
|
860
|
+
/**
|
|
861
|
+
* @defaultValue true
|
|
862
|
+
*
|
|
863
|
+
* Enables resizing from the top of the window.
|
|
864
|
+
*/
|
|
298
865
|
top?: boolean;
|
|
866
|
+
/**
|
|
867
|
+
* @defaultValue true
|
|
868
|
+
*
|
|
869
|
+
* Enables resizing from the bottom of the window.
|
|
870
|
+
*/
|
|
299
871
|
bottom?: boolean;
|
|
872
|
+
/**
|
|
873
|
+
* @defaultValue true
|
|
874
|
+
*
|
|
875
|
+
* Enables resizing from the left side of the window.
|
|
876
|
+
*/
|
|
300
877
|
left?: boolean;
|
|
878
|
+
/**
|
|
879
|
+
* @defaultValue true
|
|
880
|
+
*
|
|
881
|
+
* Enables resizing from the right side of the window.
|
|
882
|
+
*/
|
|
301
883
|
right?: boolean;
|
|
302
884
|
};
|
|
303
885
|
};
|
|
886
|
+
/**
|
|
887
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
888
|
+
*/
|
|
304
889
|
export declare type Accelerator = {
|
|
890
|
+
/**
|
|
891
|
+
* If `true`, enables the devtools keyboard shortcut:<br>
|
|
892
|
+
* `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
|
|
893
|
+
*/
|
|
305
894
|
devtools: boolean;
|
|
895
|
+
/**
|
|
896
|
+
* If `true`, enables the reload keyboard shortcuts:<br>
|
|
897
|
+
* `Ctrl` + `R` _(Windows)_<br>
|
|
898
|
+
* `F5` _(Windows)_<br>
|
|
899
|
+
* `Command` + `R` _(Mac)_
|
|
900
|
+
*/
|
|
306
901
|
reload: boolean;
|
|
902
|
+
/**
|
|
903
|
+
* If `true`, enables the reload-from-source keyboard shortcuts:<br>
|
|
904
|
+
* `Ctrl` + `Shift` + `R` _(Windows)_<br>
|
|
905
|
+
* `Shift` + `F5` _(Windows)_<br>
|
|
906
|
+
* `Command` + `Shift` + `R` _(Mac)_
|
|
907
|
+
*/
|
|
307
908
|
reloadIgnoringCache: boolean;
|
|
909
|
+
/**
|
|
910
|
+
* NOTE: It is not recommended to set this value to true for Windows in Platforms as that may lead to unexpected visual shifts in layout.
|
|
911
|
+
* If `true`, enables the zoom keyboard shortcuts:<br>
|
|
912
|
+
* `Ctrl` + `+` _(Zoom In)_<br>
|
|
913
|
+
* `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
|
|
914
|
+
* `Ctrl` + `NumPad+` _(Zoom In)_<br>
|
|
915
|
+
* `Ctrl` + `-` _(Zoom Out)_<br>
|
|
916
|
+
* `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
|
|
917
|
+
* `Ctrl` + `NumPad-` _(Zoom Out)_<br>
|
|
918
|
+
* `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
|
|
919
|
+
* `Ctrl` + `0` _(Restore to 100%)_
|
|
920
|
+
*/
|
|
308
921
|
zoom: boolean;
|
|
309
922
|
};
|
|
923
|
+
/**
|
|
924
|
+
* Configurations for API injection.
|
|
925
|
+
*/
|
|
310
926
|
export declare type Api = {
|
|
927
|
+
/**
|
|
928
|
+
* Configure injection of OpenFin API into iframes based on domain
|
|
929
|
+
*/
|
|
311
930
|
iframe?: {
|
|
931
|
+
/**
|
|
932
|
+
* Inject OpenFin API into cross-origin iframes
|
|
933
|
+
*/
|
|
312
934
|
crossOriginInjection?: boolean;
|
|
935
|
+
/**
|
|
936
|
+
* Inject OpenFin API into same-origin iframes
|
|
937
|
+
*/
|
|
313
938
|
sameOriginInjection?: boolean;
|
|
314
939
|
enableDeprecatedSharedName?: boolean;
|
|
315
940
|
};
|
|
316
941
|
};
|
|
942
|
+
/**
|
|
943
|
+
* Restrict navigation to URLs that match a whitelisted pattern.
|
|
944
|
+
* In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
|
|
945
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
946
|
+
*/
|
|
317
947
|
export declare type ContentNavigation = {
|
|
948
|
+
/**
|
|
949
|
+
* Allowed URLs for navigation.
|
|
950
|
+
*/
|
|
318
951
|
whitelist?: string[];
|
|
952
|
+
/**
|
|
953
|
+
* Forbidden URLs for navigation.
|
|
954
|
+
*/
|
|
319
955
|
blacklist?: string[];
|
|
320
956
|
};
|
|
957
|
+
/**
|
|
958
|
+
* Restrict redirects to URLs that match a whitelisted pattern.
|
|
959
|
+
* In the lack of a whitelist, redirects to URLs that match a blacklisted pattern would be prohibited.
|
|
960
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
961
|
+
*/
|
|
321
962
|
export declare type ContentRedirect = {
|
|
963
|
+
/**
|
|
964
|
+
* Allowed URLs for redirects.
|
|
965
|
+
*/
|
|
322
966
|
whitelist: string[];
|
|
967
|
+
/**
|
|
968
|
+
* Forbidden URLs for redirects.
|
|
969
|
+
*/
|
|
323
970
|
blacklist: string[];
|
|
324
971
|
};
|
|
972
|
+
/**
|
|
973
|
+
* Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
|
|
974
|
+
* average of _height_ and _width_.
|
|
975
|
+
*/
|
|
325
976
|
export declare type CornerRounding = {
|
|
977
|
+
/**
|
|
978
|
+
* @defaultValue 0
|
|
979
|
+
*
|
|
980
|
+
* The height in pixels.
|
|
981
|
+
*/
|
|
326
982
|
height: number;
|
|
983
|
+
/**
|
|
984
|
+
* @defaultValue 0
|
|
985
|
+
*
|
|
986
|
+
* The width in pixels.
|
|
987
|
+
*/
|
|
327
988
|
width: number;
|
|
328
989
|
};
|
|
990
|
+
/**
|
|
991
|
+
* Options for downloading a preload script.
|
|
992
|
+
*/
|
|
329
993
|
export declare type DownloadPreloadOption = {
|
|
994
|
+
/**
|
|
995
|
+
* URL from which to download the preload script.
|
|
996
|
+
*/
|
|
330
997
|
url: string;
|
|
331
998
|
};
|
|
999
|
+
/**
|
|
1000
|
+
* Metadata returned from a preload script download request.
|
|
1001
|
+
*/
|
|
332
1002
|
export declare type DownloadPreloadInfo = {
|
|
1003
|
+
/**
|
|
1004
|
+
* Whether the download was successful.
|
|
1005
|
+
*/
|
|
333
1006
|
success: boolean;
|
|
1007
|
+
/**
|
|
1008
|
+
* URL from which the preload script should be downloaded.
|
|
1009
|
+
*/
|
|
334
1010
|
url?: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* Error during preload script download.
|
|
1013
|
+
*/
|
|
335
1014
|
error: string;
|
|
336
1015
|
};
|
|
337
1016
|
export declare type RGB = {
|
|
@@ -339,21 +1018,59 @@ export declare type RGB = {
|
|
|
339
1018
|
blue: number;
|
|
340
1019
|
green: number;
|
|
341
1020
|
};
|
|
1021
|
+
/**
|
|
1022
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
1023
|
+
* Configure the context menu when right-clicking on a window.
|
|
1024
|
+
*/
|
|
342
1025
|
export declare type ContextMenuSettings = {
|
|
1026
|
+
/**
|
|
1027
|
+
* Should the context menu display on right click.
|
|
1028
|
+
*/
|
|
343
1029
|
enable: boolean;
|
|
1030
|
+
/**
|
|
1031
|
+
* Should the context menu contain a button for opening devtools.
|
|
1032
|
+
*/
|
|
344
1033
|
devtools?: boolean;
|
|
1034
|
+
/**
|
|
1035
|
+
* Should the context menu contain a button for reloading the page.
|
|
1036
|
+
*/
|
|
345
1037
|
reload?: boolean;
|
|
346
1038
|
};
|
|
1039
|
+
/**
|
|
1040
|
+
* A hotkey binding.
|
|
1041
|
+
*/
|
|
347
1042
|
export declare type Hotkey = {
|
|
1043
|
+
/**
|
|
1044
|
+
* The key combination of the hotkey, i.e. "Ctrl+T".
|
|
1045
|
+
*/
|
|
348
1046
|
keys: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* @defaultValue false
|
|
1049
|
+
*
|
|
1050
|
+
* Prevent default key handling before emitting the event.
|
|
1051
|
+
*/
|
|
349
1052
|
preventDefault?: boolean;
|
|
350
1053
|
};
|
|
351
1054
|
export declare type ShortcutOverride = Hotkey & {
|
|
352
1055
|
command: string;
|
|
353
1056
|
};
|
|
1057
|
+
/**
|
|
1058
|
+
* A script that is run before page load.
|
|
1059
|
+
*/
|
|
354
1060
|
export declare type PreloadScript = {
|
|
1061
|
+
/**
|
|
1062
|
+
* @defaultValue false
|
|
1063
|
+
*
|
|
1064
|
+
* Fail to load the window if this preload script fails
|
|
1065
|
+
*/
|
|
355
1066
|
mandatory?: boolean;
|
|
1067
|
+
/**
|
|
1068
|
+
* Preload script execution state.
|
|
1069
|
+
*/
|
|
356
1070
|
state?: 'load-started' | 'load-failed' | 'load-succeeded' | 'failed' | 'succeeded';
|
|
1071
|
+
/**
|
|
1072
|
+
* The URL from which the script was loaded.
|
|
1073
|
+
*/
|
|
357
1074
|
url: string;
|
|
358
1075
|
};
|
|
359
1076
|
export declare type AutoResizeOptions = {
|
|
@@ -379,7 +1096,13 @@ export declare type AutoResizeOptions = {
|
|
|
379
1096
|
vertical?: boolean;
|
|
380
1097
|
};
|
|
381
1098
|
export declare type InteropConfig = {
|
|
1099
|
+
/**
|
|
1100
|
+
* Context Group for the client. (green, yellow, red, etc.).
|
|
1101
|
+
*/
|
|
382
1102
|
currentContextGroup?: string | null;
|
|
1103
|
+
/**
|
|
1104
|
+
* When provided, automatically connects the client to the specified provider uuid.
|
|
1105
|
+
*/
|
|
383
1106
|
providerId?: string;
|
|
384
1107
|
};
|
|
385
1108
|
export declare type ViewInfo = {
|
|
@@ -390,7 +1113,16 @@ export declare type ViewInfo = {
|
|
|
390
1113
|
url: string;
|
|
391
1114
|
favicons: string[];
|
|
392
1115
|
};
|
|
1116
|
+
/**
|
|
1117
|
+
* View options that can be updated after creation.
|
|
1118
|
+
*/
|
|
393
1119
|
export declare type UpdatableViewOptions = Partial<MutableViewOptions>;
|
|
1120
|
+
/**
|
|
1121
|
+
* The options object required by {@link View.create View.create}.
|
|
1122
|
+
*
|
|
1123
|
+
* Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
|
|
1124
|
+
* (defaults to `"about:blank"` when omitted).
|
|
1125
|
+
*/
|
|
394
1126
|
export declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
395
1127
|
name: string;
|
|
396
1128
|
url: string;
|
|
@@ -398,37 +1130,149 @@ export declare type ViewCreationOptions = Partial<ViewOptions> & {
|
|
|
398
1130
|
};
|
|
399
1131
|
export declare type MutableViewOptions = {
|
|
400
1132
|
autoResize: AutoResizeOptions;
|
|
1133
|
+
/**
|
|
1134
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
1135
|
+
*
|
|
1136
|
+
* @defaultValue true
|
|
1137
|
+
*
|
|
1138
|
+
* Show the context menu when right-clicking on the view.
|
|
1139
|
+
* Gives access to the devtools for the view.
|
|
1140
|
+
*/
|
|
401
1141
|
contextMenu: boolean;
|
|
1142
|
+
/**
|
|
1143
|
+
* @deprecated Superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
1144
|
+
*
|
|
1145
|
+
* Configure the context menu when right-clicking on a window.
|
|
1146
|
+
*/
|
|
402
1147
|
contextMenuSettings: ContextMenuSettings;
|
|
1148
|
+
/**
|
|
1149
|
+
* Configure the context menu when right-clicking on a window.
|
|
1150
|
+
*/
|
|
403
1151
|
contextMenuOptions: ContextMenuOptions;
|
|
1152
|
+
/**
|
|
1153
|
+
* The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
|
|
1154
|
+
* (`document.body.style.backgroundColor`),
|
|
1155
|
+
* this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
|
|
1156
|
+
* areas when growing a view. Setting
|
|
1157
|
+
* this value to the anticipated content background color can help improve user experience.
|
|
1158
|
+
* Default is white.
|
|
1159
|
+
*/
|
|
404
1160
|
backgroundColor: string;
|
|
1161
|
+
/**
|
|
1162
|
+
* A field that the user can attach serializable data to be ferried around with the window options.
|
|
1163
|
+
* _When omitted, _inherits_ from the parent application._
|
|
1164
|
+
*/
|
|
405
1165
|
customData: any;
|
|
1166
|
+
/**
|
|
1167
|
+
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
1168
|
+
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
1169
|
+
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
1170
|
+
* _When omitted, _inherits_ from the parent application._
|
|
1171
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
1172
|
+
*/
|
|
406
1173
|
customContext: any;
|
|
1174
|
+
/**
|
|
1175
|
+
* Configurations for API injection.
|
|
1176
|
+
*/
|
|
407
1177
|
api: Api;
|
|
1178
|
+
/**
|
|
1179
|
+
* Restrict navigation to URLs that match a whitelisted pattern.
|
|
1180
|
+
* In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
|
|
1181
|
+
* See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
|
|
1182
|
+
*/
|
|
408
1183
|
contentNavigation: ContentNavigation;
|
|
1184
|
+
/**
|
|
1185
|
+
* @defaultValue false
|
|
1186
|
+
*
|
|
1187
|
+
* Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
|
|
1188
|
+
* allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
|
|
1189
|
+
*/
|
|
409
1190
|
detachOnClose: boolean;
|
|
1191
|
+
/**
|
|
1192
|
+
* @defaultValue true
|
|
1193
|
+
*
|
|
1194
|
+
* **Platforms Only.** If false, the view will be persistent and can't be closed through
|
|
1195
|
+
* either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
|
|
1196
|
+
* if the view isn't part of the new layout when running `Layout.replace`.
|
|
1197
|
+
*/
|
|
410
1198
|
isClosable: boolean;
|
|
1199
|
+
/**
|
|
1200
|
+
* @defaultValue false
|
|
1201
|
+
*
|
|
1202
|
+
* @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
|
|
1203
|
+
*/
|
|
411
1204
|
preventDragOut: boolean;
|
|
412
1205
|
interop?: InteropConfig;
|
|
413
1206
|
};
|
|
1207
|
+
/**
|
|
1208
|
+
* User-facing options for a view.
|
|
1209
|
+
*/
|
|
414
1210
|
export declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
1211
|
+
/**
|
|
1212
|
+
* View options that cannot be updated after creation.
|
|
1213
|
+
*/
|
|
415
1214
|
export declare type ConstViewOptions = {
|
|
1215
|
+
/**
|
|
1216
|
+
* The name of the view.
|
|
1217
|
+
*/
|
|
416
1218
|
name: string;
|
|
1219
|
+
/**
|
|
1220
|
+
* @defaultValue "about:blank"
|
|
1221
|
+
*
|
|
1222
|
+
* The URL of the window
|
|
1223
|
+
*/
|
|
417
1224
|
url: string;
|
|
1225
|
+
/**
|
|
1226
|
+
* The identity of the window this view should be attached to.
|
|
1227
|
+
*/
|
|
418
1228
|
target: Identity;
|
|
1229
|
+
/**
|
|
1230
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
1231
|
+
*/
|
|
419
1232
|
contentCreation: ContentCreationOptions;
|
|
1233
|
+
/**
|
|
1234
|
+
* Custom headers for requests sent by the view.
|
|
1235
|
+
*/
|
|
420
1236
|
customRequestHeaders: CustomRequestHeaders[];
|
|
1237
|
+
/**
|
|
1238
|
+
* Initial bounds given relative to the window.
|
|
1239
|
+
*/
|
|
421
1240
|
bounds: Bounds;
|
|
422
1241
|
permissions: Partial<Permissions>;
|
|
1242
|
+
/**
|
|
1243
|
+
* String tag that attempts to group like-tagged renderers together. Will only be used if pages are on the same origin.
|
|
1244
|
+
*/
|
|
423
1245
|
processAffinity: string;
|
|
1246
|
+
/**
|
|
1247
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
|
|
1248
|
+
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
|
1249
|
+
* [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
|
|
1250
|
+
* that can be assigned to a specific hotkey in the platform manifest.
|
|
1251
|
+
*/
|
|
424
1252
|
hotkeys: Hotkey[];
|
|
1253
|
+
/**
|
|
1254
|
+
* Scripts that run before page load. When omitted, inherits from the parent application.
|
|
1255
|
+
*/
|
|
425
1256
|
preloadScripts: PreloadScript[];
|
|
1257
|
+
/**
|
|
1258
|
+
* **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
|
|
1259
|
+
* but the properties in the manifest will take precedence if there is any collision.
|
|
1260
|
+
*/
|
|
426
1261
|
manifestUrl: string;
|
|
427
1262
|
zoomLevel: number;
|
|
428
1263
|
experimental: any;
|
|
429
1264
|
fdc3InteropApi?: string;
|
|
430
1265
|
enableBeforeUnload: boolean;
|
|
1266
|
+
/**
|
|
1267
|
+
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
1268
|
+
*/
|
|
431
1269
|
accelerator?: Partial<Accelerator>;
|
|
1270
|
+
/**
|
|
1271
|
+
* Autoplay policy to apply to content in the window, can be
|
|
1272
|
+
* `no-user-gesture-required`, `user-gesture-required`,
|
|
1273
|
+
* `document-user-activation-required`. Defaults to `no-user-gesture-required`.
|
|
1274
|
+
*/
|
|
1275
|
+
autoplayPolicy: AutoplayPolicyOptions;
|
|
432
1276
|
};
|
|
433
1277
|
export declare type ViewState = ViewCreationOptions & {
|
|
434
1278
|
backgroundThrottling: boolean;
|
|
@@ -457,21 +1301,77 @@ declare type CertificatePrincipal = {
|
|
|
457
1301
|
state: string;
|
|
458
1302
|
};
|
|
459
1303
|
export declare type HostContextChangedPayload = {
|
|
1304
|
+
/**
|
|
1305
|
+
* The new context object
|
|
1306
|
+
*/
|
|
460
1307
|
context: any;
|
|
1308
|
+
/**
|
|
1309
|
+
* The reason for the update.
|
|
1310
|
+
*/
|
|
461
1311
|
reason: HostContextChangedReasons;
|
|
462
1312
|
};
|
|
463
1313
|
export declare type ApplySnapshotOptions = {
|
|
1314
|
+
/**
|
|
1315
|
+
* @defaultValue false
|
|
1316
|
+
*
|
|
1317
|
+
* When true, applySnapshot will close existing windows,
|
|
1318
|
+
* replacing current Platform state with the given snapshot.
|
|
1319
|
+
*/
|
|
464
1320
|
closeExistingWindows?: boolean;
|
|
1321
|
+
/**
|
|
1322
|
+
* @defaultValue false
|
|
1323
|
+
*
|
|
1324
|
+
* When true, applySnapshot will close existing includeInSnapshots: true windows,
|
|
1325
|
+
* replacing current Platform state with the given snapshot.
|
|
1326
|
+
*/
|
|
465
1327
|
closeSnapshotWindows?: boolean;
|
|
1328
|
+
/**
|
|
1329
|
+
* @defaultValue false
|
|
1330
|
+
*
|
|
1331
|
+
* When true, applySnapshot will not check whether any windows in a
|
|
1332
|
+
* snapshot are off-screen. By default, such windows will be repositioned to be on-screen,
|
|
1333
|
+
* as defined by {@link PlatformProvider#positionOutOfBoundsWindows PlatformProvider.positionOutOfBoundsWindows}.
|
|
1334
|
+
*/
|
|
466
1335
|
skipOutOfBoundsCheck?: boolean;
|
|
467
1336
|
};
|
|
1337
|
+
/**
|
|
1338
|
+
* Payload sent to Platform Provider when {@link Platform#applySnapshot Platform.applySnapshot} is called.
|
|
1339
|
+
*/
|
|
468
1340
|
export declare type ApplySnapshotPayload = {
|
|
1341
|
+
/**
|
|
1342
|
+
* TThe snapshot to be applied.
|
|
1343
|
+
*/
|
|
469
1344
|
snapshot: Snapshot;
|
|
1345
|
+
/**
|
|
1346
|
+
* Options to customize snapshot application.
|
|
1347
|
+
*/
|
|
470
1348
|
options?: ApplySnapshotOptions;
|
|
471
1349
|
};
|
|
1350
|
+
export declare type AddViewToStackOptions = {
|
|
1351
|
+
/**
|
|
1352
|
+
* Optional index within the stack to insert the view. Defaults to 0
|
|
1353
|
+
*/
|
|
1354
|
+
index?: number;
|
|
1355
|
+
};
|
|
1356
|
+
export declare type CreateViewTarget = Identity & {
|
|
1357
|
+
/**
|
|
1358
|
+
* If specified, view creation will not attach to a window and caller must
|
|
1359
|
+
* insert the view into the layout explicitly
|
|
1360
|
+
*/
|
|
1361
|
+
location?: {
|
|
1362
|
+
id: string;
|
|
1363
|
+
index?: number;
|
|
1364
|
+
};
|
|
1365
|
+
};
|
|
472
1366
|
export declare type CreateViewPayload = {
|
|
1367
|
+
/**
|
|
1368
|
+
* Options for the view to be added.
|
|
1369
|
+
*/
|
|
473
1370
|
opts: Partial<ViewOptions>;
|
|
474
|
-
|
|
1371
|
+
/**
|
|
1372
|
+
* Window the view will be added to. If no target is provided, a new window will be created.
|
|
1373
|
+
*/
|
|
1374
|
+
target?: CreateViewTarget;
|
|
475
1375
|
targetView?: Identity;
|
|
476
1376
|
};
|
|
477
1377
|
export declare type ReplaceViewPayload = {
|
|
@@ -482,28 +1382,58 @@ export declare type ReplaceViewPayload = {
|
|
|
482
1382
|
target: Identity;
|
|
483
1383
|
};
|
|
484
1384
|
export declare type CloseViewPayload = {
|
|
1385
|
+
/**
|
|
1386
|
+
*View to be closed.
|
|
1387
|
+
*/
|
|
485
1388
|
view: Identity;
|
|
486
1389
|
};
|
|
487
1390
|
export declare type FetchManifestPayload = {
|
|
1391
|
+
/**
|
|
1392
|
+
* The URL of the manifest to fetch.
|
|
1393
|
+
*/
|
|
488
1394
|
manifestUrl: string;
|
|
489
1395
|
};
|
|
490
1396
|
export declare type ReplaceLayoutOpts = {
|
|
1397
|
+
/**
|
|
1398
|
+
* Layout config to be applied.
|
|
1399
|
+
*/
|
|
491
1400
|
layout: LayoutOptions;
|
|
492
1401
|
};
|
|
493
1402
|
export declare type ReplaceLayoutPayload = {
|
|
1403
|
+
/**
|
|
1404
|
+
* Object containing the layout to be applied.
|
|
1405
|
+
*/
|
|
494
1406
|
opts: ReplaceLayoutOpts;
|
|
1407
|
+
/**
|
|
1408
|
+
* Identity of the window whose layout will be replace.
|
|
1409
|
+
*/
|
|
495
1410
|
target: Identity;
|
|
496
1411
|
};
|
|
497
1412
|
export declare type SetWindowContextPayload = {
|
|
1413
|
+
/**
|
|
1414
|
+
* The requested context update.
|
|
1415
|
+
*/
|
|
498
1416
|
context: any;
|
|
1417
|
+
/**
|
|
1418
|
+
* Entity type of the target of the context update ('view' or 'window').
|
|
1419
|
+
*/
|
|
499
1420
|
entityType: EntityType;
|
|
1421
|
+
/**
|
|
1422
|
+
* Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
1423
|
+
*/
|
|
500
1424
|
target: Identity;
|
|
501
1425
|
};
|
|
502
1426
|
export declare type LaunchIntoPlatformPayload = {
|
|
503
1427
|
manifest: any;
|
|
504
1428
|
};
|
|
505
1429
|
export declare type GetWindowContextPayload = {
|
|
1430
|
+
/**
|
|
1431
|
+
* Entity type of the target of the context update ('view' or 'window').
|
|
1432
|
+
*/
|
|
506
1433
|
entityType: EntityType;
|
|
1434
|
+
/**
|
|
1435
|
+
* Identity of the entity targeted by the call to {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
1436
|
+
*/
|
|
507
1437
|
target: Identity;
|
|
508
1438
|
};
|
|
509
1439
|
export declare type ApplicationPermissions = {
|
|
@@ -516,14 +1446,15 @@ export declare type LaunchExternalProcessRule = {
|
|
|
516
1446
|
export declare type SystemPermissions = {
|
|
517
1447
|
getAllExternalWindows: boolean;
|
|
518
1448
|
launchExternalProcess: boolean | {
|
|
519
|
-
|
|
1449
|
+
enabled: boolean;
|
|
1450
|
+
assets?: {
|
|
520
1451
|
enabled: boolean;
|
|
521
1452
|
srcRules?: LaunchExternalProcessRule[];
|
|
522
1453
|
};
|
|
523
|
-
downloads
|
|
1454
|
+
downloads?: {
|
|
524
1455
|
enabled: boolean;
|
|
525
1456
|
};
|
|
526
|
-
executables
|
|
1457
|
+
executables?: {
|
|
527
1458
|
enabled: boolean;
|
|
528
1459
|
pathRules?: LaunchExternalProcessRule[];
|
|
529
1460
|
};
|
|
@@ -548,18 +1479,45 @@ export declare type PlatformWindowCreationOptions = Partial<WindowCreationOption
|
|
|
548
1479
|
updateStateIfExists?: boolean;
|
|
549
1480
|
reason?: WindowCreationReason;
|
|
550
1481
|
};
|
|
1482
|
+
/**
|
|
1483
|
+
* Window options apply to all platform windows.
|
|
1484
|
+
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
1485
|
+
* used by default in any window that is created in the current platform's scope.
|
|
1486
|
+
* Individual window options will override these defaults.
|
|
1487
|
+
*/
|
|
551
1488
|
export declare type PlatformWindowOptions = WindowCreationOptions & {
|
|
1489
|
+
/**
|
|
1490
|
+
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
1491
|
+
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
1492
|
+
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
1493
|
+
*/
|
|
552
1494
|
stylesheetUrl: string;
|
|
553
1495
|
};
|
|
554
|
-
export declare type PlatformViewCreationOptions = Partial<ViewOptions
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
1496
|
+
export declare type PlatformViewCreationOptions = Partial<ViewOptions>;
|
|
1497
|
+
/**
|
|
1498
|
+
* Strategy to assign views to process affinity by domain.
|
|
1499
|
+
*
|
|
1500
|
+
* `same`: views in the same domain will have the same process affinity.
|
|
1501
|
+
* `different`: views in the same domain will have different process affinities.
|
|
1502
|
+
*/
|
|
558
1503
|
export declare type ProcessAffinityStrategy = 'same' | 'different';
|
|
1504
|
+
/**
|
|
1505
|
+
* The options object required by {@link Platform#start Platform.start}
|
|
1506
|
+
* Any {@link ApplicationOptions Application option} is also a valid platform option
|
|
1507
|
+
*/
|
|
559
1508
|
export declare type PlatformOptions = ApplicationCreationOptions & {
|
|
1509
|
+
/**
|
|
1510
|
+
* Default window options apply to all platform windows.
|
|
1511
|
+
*/
|
|
560
1512
|
defaultWindowOptions?: Partial<PlatformWindowOptions>;
|
|
1513
|
+
/**
|
|
1514
|
+
* Default view options apply to all platform views.
|
|
1515
|
+
*/
|
|
561
1516
|
defaultViewOptions?: Partial<PlatformViewCreationOptions>;
|
|
562
1517
|
disableDefaultCommands?: boolean;
|
|
1518
|
+
/**
|
|
1519
|
+
* Strategy to assign views to process affinity by domain.
|
|
1520
|
+
*/
|
|
563
1521
|
viewProcessAffinityStrategy?: ProcessAffinityStrategy;
|
|
564
1522
|
providerUrl?: string;
|
|
565
1523
|
permissions?: Partial<Permissions>;
|
|
@@ -620,9 +1578,20 @@ export declare type Manifest = {
|
|
|
620
1578
|
};
|
|
621
1579
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
622
1580
|
};
|
|
623
|
-
export declare type LayoutContent =
|
|
1581
|
+
export declare type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn | LayoutComponent>;
|
|
1582
|
+
/**
|
|
1583
|
+
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
|
1584
|
+
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
|
1585
|
+
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }..
|
|
1586
|
+
*/
|
|
624
1587
|
export declare type LayoutItemConfig = {
|
|
1588
|
+
/**
|
|
1589
|
+
* The type of the item. Possible values are 'row', 'column', 'stack', and 'component'.
|
|
1590
|
+
*/
|
|
625
1591
|
type: string;
|
|
1592
|
+
/**
|
|
1593
|
+
* Array of configurations for items that will be created as children of this item.
|
|
1594
|
+
*/
|
|
626
1595
|
content?: LayoutContent;
|
|
627
1596
|
width?: number;
|
|
628
1597
|
height?: number;
|
|
@@ -641,16 +1610,72 @@ export interface LayoutComponent extends LayoutItemConfig {
|
|
|
641
1610
|
componentState?: Partial<ViewCreationOptions>;
|
|
642
1611
|
}
|
|
643
1612
|
export declare type LayoutOptions = {
|
|
1613
|
+
/**
|
|
1614
|
+
* Represents a potential ways to customize behavior of your Layout
|
|
1615
|
+
*/
|
|
644
1616
|
settings?: {
|
|
1617
|
+
/**
|
|
1618
|
+
* @defaultValue false
|
|
1619
|
+
*
|
|
1620
|
+
* Whether the popout button will only act on the entire stack,
|
|
1621
|
+
* as opposed to only the active tab.
|
|
1622
|
+
*/
|
|
645
1623
|
popoutWholeStack?: boolean;
|
|
1624
|
+
/**
|
|
1625
|
+
* @defaultValue false
|
|
1626
|
+
*
|
|
1627
|
+
* Limits the area to which tabs can be dragged.
|
|
1628
|
+
* If true, stack headers are the only areas where tabs can be dropped.
|
|
1629
|
+
*/
|
|
646
1630
|
constrainDragToContainer?: boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* @defaultValue false
|
|
1633
|
+
*
|
|
1634
|
+
* Whether to show the popout button on stack header.
|
|
1635
|
+
* The button will create a new window with current tab as its content.
|
|
1636
|
+
* In case `popoutWholeStack` is set to true, all tabs in the stack will be in the new window.
|
|
1637
|
+
*/
|
|
647
1638
|
showPopoutIcon?: boolean;
|
|
1639
|
+
/**
|
|
1640
|
+
* @defaultValue false
|
|
1641
|
+
*
|
|
1642
|
+
* Whether to show the maximize button on stack header.
|
|
1643
|
+
* The button will maximize the current tab to fill the entire window.
|
|
1644
|
+
*/
|
|
648
1645
|
showMaximiseIcon?: boolean;
|
|
1646
|
+
/**
|
|
1647
|
+
* @defaultValue false
|
|
1648
|
+
*
|
|
1649
|
+
* Whether to show the close button on stack header
|
|
1650
|
+
* (not to be confused with close button on every tab).
|
|
1651
|
+
*/
|
|
649
1652
|
showCloseIcon?: boolean;
|
|
650
1653
|
constrainDragToHeaders?: boolean;
|
|
1654
|
+
/**
|
|
1655
|
+
* @defaultValue true
|
|
1656
|
+
*
|
|
1657
|
+
* Turns tab headers on or off.
|
|
1658
|
+
* If false, the layout will be displayed with splitters only.
|
|
1659
|
+
*/
|
|
651
1660
|
hasHeaders?: boolean;
|
|
1661
|
+
/**
|
|
1662
|
+
* @defaultValue true
|
|
1663
|
+
*
|
|
1664
|
+
* If true, the user can re-arrange the layout by
|
|
1665
|
+
* dragging items by their tabs to the desired location.
|
|
1666
|
+
*/
|
|
652
1667
|
reorderEnabled?: boolean;
|
|
1668
|
+
/**
|
|
1669
|
+
* @defaultValue false
|
|
1670
|
+
*
|
|
1671
|
+
* If true, tabs can't be dragged out of the window.
|
|
1672
|
+
*/
|
|
653
1673
|
preventDragOut?: boolean;
|
|
1674
|
+
/**
|
|
1675
|
+
* @defaultValue=false
|
|
1676
|
+
*
|
|
1677
|
+
* If true, tabs can't be dragged into the window.
|
|
1678
|
+
*/
|
|
654
1679
|
preventDragIn?: boolean;
|
|
655
1680
|
};
|
|
656
1681
|
content?: LayoutContent;
|
|
@@ -661,179 +1686,69 @@ export declare type LayoutOptions = {
|
|
|
661
1686
|
headerHeight?: number;
|
|
662
1687
|
};
|
|
663
1688
|
};
|
|
664
|
-
export declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T
|
|
665
|
-
export declare type Constructor<T = {}> = new (
|
|
1689
|
+
export declare type OverrideCallback<T extends any = PlatformProvider, U extends T = T> = (arg: Constructor<T>) => U | Promise<U>;
|
|
1690
|
+
export declare type Constructor<T = {}> = new () => T;
|
|
666
1691
|
export declare type HostContextChangedReasons = 'updated' | 'reparented';
|
|
667
1692
|
export declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
|
|
668
|
-
export declare type PlatformProvider = {
|
|
669
|
-
/**
|
|
670
|
-
* Handles requests to create a window in the current platform.
|
|
671
|
-
* @param { WindowOption } payload Window options for the window to be created.
|
|
672
|
-
* @param { Identity } [identity] If {@link Platform#createWindow Platform.createWindow} was called, the identity of the caller will be here.
|
|
673
|
-
* If `createWindow` was called as part of applying a snapshot or creating a view without a target window, `identity` will be undefined.
|
|
674
|
-
*/
|
|
675
|
-
createWindow(options: PlatformWindowCreationOptions, identity?: Identity): Promise<_Window>;
|
|
676
|
-
/**
|
|
677
|
-
* Gets the current state of windows and their views and returns a snapshot object containing that info.
|
|
678
|
-
* @param { undefined } payload Undefined unless you've defined a custom `getSnapshot` protocol.
|
|
679
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#getSnapshot Platform.getSnapshot}.
|
|
680
|
-
* @return { Promise<Snapshot> } Snapshot of current platform state.
|
|
681
|
-
*/
|
|
682
|
-
getSnapshot(payload: undefined, identity: Identity): Promise<Snapshot>;
|
|
683
|
-
/**
|
|
684
|
-
* 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.
|
|
685
|
-
* @param { Identity } payload Identity of the view.
|
|
686
|
-
* @return { Promise<ViewState> }
|
|
687
|
-
*/
|
|
688
|
-
getViewSnapshot(payload: {
|
|
689
|
-
viewIdentity: Identity;
|
|
690
|
-
}): Promise<ViewState>;
|
|
691
|
-
/**
|
|
692
|
-
* Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
|
|
693
|
-
* Returns an array of windows with modified positions, such that any off-screen windows are positioned in the top left
|
|
694
|
-
* corner of the main monitor.
|
|
695
|
-
* @param { Snapshot } snapshot The snapshot to be applied.
|
|
696
|
-
* @param { WindowOptions[] } outOfBoundsWindows An array of WindowOptions for any windows that would be off-screen.
|
|
697
|
-
* @return { Promise<WindowOptions[]> } An array of WindowOptions with their position modified to fit on screen.
|
|
698
|
-
*/
|
|
699
|
-
positionOutOfBoundsWindows(snapshot: Snapshot, outOfBoundsWindows: WindowCreationOptions[]): Promise<WindowCreationOptions[]>;
|
|
700
|
-
/**
|
|
701
|
-
* Handles requests to apply a snapshot to the current Platform.
|
|
702
|
-
* @param { ApplySnapshotPayload } payload Payload containing the snapshot to be applied, as well as any options.
|
|
703
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#applySnapshot Platform.applySnapshot}.
|
|
704
|
-
* Undefined if called internally (e.g. when opening the initial snapshot).
|
|
705
|
-
* @return { Promise<void> }
|
|
706
|
-
*/
|
|
707
|
-
applySnapshot(payload: ApplySnapshotPayload, identity?: Identity): Promise<void>;
|
|
708
|
-
/**
|
|
709
|
-
* Closes the current Platform and all child windows and views.
|
|
710
|
-
* @param { undefined } payload Undefined unless you have implemented a custom quite protocol.
|
|
711
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#quit Platform.quit}.
|
|
712
|
-
* @return { Promise<void> }
|
|
713
|
-
*/
|
|
714
|
-
quit(payload: undefined, identity: Identity): Promise<void>;
|
|
715
|
-
/**
|
|
716
|
-
* Closes a view
|
|
717
|
-
* @param { CloseViewPayload } payload Specifies the `target` view to be closed.
|
|
718
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#closeView Platform.closeView}.
|
|
719
|
-
*/
|
|
720
|
-
closeView(payload: CloseViewPayload, identity?: Identity): Promise<any>;
|
|
721
|
-
/**
|
|
722
|
-
* Creates a new view and attaches it to a specified target window.
|
|
723
|
-
* @param { CreateViewPayload } payload Creation options for the new view.
|
|
724
|
-
* @param { Identity } identity Identity of the entity that called {@link Platform#createView Platform.createView}.
|
|
725
|
-
* @return { Promise<void> }
|
|
726
|
-
*/
|
|
727
|
-
createView(payload: CreateViewPayload, identity: Identity): Promise<View>;
|
|
728
|
-
/** Handles requests to fetch manifests in the current platform.
|
|
729
|
-
* @param { FetchManifestPayload } payload Payload containing the manifestUrl to be fetched.
|
|
730
|
-
* @param { Identity } callerIdentity If {@link Platform#fetchManifest Platform.fetchManifest}
|
|
731
|
-
* was called, the identity of the caller will be here.
|
|
732
|
-
* If `fetchManifest` was called internally, `callerIdentity` will be the provider's identity.
|
|
733
|
-
*/
|
|
734
|
-
fetchManifest(payload: FetchManifestPayload, callerIdentity: Identity): Promise<any>;
|
|
735
|
-
/**
|
|
736
|
-
* Replaces a Platform window's layout with a new layout. Any views that were in the old layout but not the new layout will be destroyed.
|
|
737
|
-
* @param { ReplaceLayoutPayload } payload Contains the `target` window and an `opts` object with a `layout` property to apply.
|
|
738
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#replaceLayout Platform.replaceLayout}.
|
|
739
|
-
* Undefined if `replaceLayout` is called internally (e.g. while applying a snapshot).
|
|
740
|
-
* @return { Promise<void> }
|
|
741
|
-
*/
|
|
742
|
-
replaceLayout(payload: ReplaceLayoutPayload, identity?: Identity): Promise<void>;
|
|
743
|
-
replaceView(payload: ReplaceViewPayload, identity?: Identity): Promise<void>;
|
|
744
|
-
launchIntoPlatform(payload: LaunchIntoPlatformPayload): Promise<void>;
|
|
745
|
-
/**
|
|
746
|
-
* Handles requests to set a window's context. `target` may be a window or a view.
|
|
747
|
-
* If it is a window, that window's `customContext` will be updated.
|
|
748
|
-
* If it is a view, the `customContext` of that view's current host window will be updated.
|
|
749
|
-
* @param { SetWindowContextPayload } payload Object containing the requested `context` update,
|
|
750
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
751
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#setWindowContext Platform.setWindowContext}.
|
|
752
|
-
* Undefined if `setWindowContext` is called internally (e.g. while applying a snapshot).
|
|
753
|
-
* @return { Promise<any> } The new context.
|
|
754
|
-
*/
|
|
755
|
-
setWindowContext(payload: SetWindowContextPayload, identity?: Identity): Promise<any>;
|
|
756
|
-
/**
|
|
757
|
-
* Handles requests to get a window's context. `target` may be a window or a view.
|
|
758
|
-
* If it is a window, that window's `customContext` will be returned.
|
|
759
|
-
* If it is a view, the `customContext` of that view's current host window will be returned.
|
|
760
|
-
* @param { GetWindowContextPayload } payload Object containing the requested `context` update,
|
|
761
|
-
* the `target`'s identity, and the target's `entityType`.
|
|
762
|
-
* @param { Identity } [identity] Identity of the entity that called {@link Platform#getWindowContext Platform.getWindowContext}.
|
|
763
|
-
* Undefined when `getWindowContext` is called internally
|
|
764
|
-
* (e.g. when getting a window's context for the purpose of raising a "host-context-changed" event on a reparented view).
|
|
765
|
-
* @return { Promise<any> } The new context.
|
|
766
|
-
*/
|
|
767
|
-
getWindowContext(payload: GetWindowContextPayload, identity?: Identity): Promise<any>;
|
|
768
|
-
/**
|
|
769
|
-
* Called when a window's `customContext` is updated. Responsible for raising the `host-context-updated` event on that window's child views.
|
|
770
|
-
* @param { WindowOptionsChangedEvent<'window', 'options-changed'> } payload The event payload for the window whose context has changed.
|
|
771
|
-
* The new context will be contained as `payload.diff.customContext.newVal`.
|
|
772
|
-
* @return { Promise<HostContextChangedPayload> } The event that it raised.
|
|
773
|
-
*/
|
|
774
|
-
onWindowContextUpdated(payload: WindowOptionsChangedEvent): Promise<HostContextChangedPayload | undefined>;
|
|
775
|
-
/**
|
|
776
|
-
* Closes a Window.
|
|
777
|
-
* By default it will fire any before unload handler set by a View in the Window.
|
|
778
|
-
* This can be disabled by setting skipBeforeUnload in the options object of the payload.
|
|
779
|
-
* This method is called by {@link Platform#closeWindow Platform.closeWindow}.
|
|
780
|
-
* @param {CloseWindowPayload} payload Object that contains the Window Identity and related options.
|
|
781
|
-
* @param {Identity} callerIdentity
|
|
782
|
-
* @returns {Promise<void>}
|
|
783
|
-
*/
|
|
784
|
-
closeWindow(payload: CloseWindowPayload, callerIdentity: Identity): Promise<void>;
|
|
785
|
-
/**
|
|
786
|
-
* Gets all the Views attached to a Window that should close along with it. This is meant to be overridable
|
|
787
|
-
* in the case where you want to return other Views that may not be attached to the Window that is closing.
|
|
788
|
-
* @param winId Identity of the Window that is closing
|
|
789
|
-
* @returns { Promise<View> }
|
|
790
|
-
*/
|
|
791
|
-
getViewsForWindowClose(windowId: Identity): Promise<View[]>;
|
|
792
|
-
/**
|
|
793
|
-
* It takes in an array of Views and returns an object specifying which of them are trying to prevent an unload and which are not.
|
|
794
|
-
* @param {View[]} views Array of Views
|
|
795
|
-
* @returns { Promise<ViewStatuses> }
|
|
796
|
-
*/
|
|
797
|
-
checkViewsForPreventUnload(views: View[]): Promise<ViewStatuses>;
|
|
798
|
-
/**
|
|
799
|
-
* Handle the decision of whether a Window or specific View should close when trying to prevent an unload. This is meant to be overridden.
|
|
800
|
-
* Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
801
|
-
* Normally you would use this method to show a dialog indicating that there are Views that are trying to prevent an unload.
|
|
802
|
-
* By default it will always return all Views passed into it as meaning to close.
|
|
803
|
-
* @param {ViewsPreventingUnloadPayload} payload
|
|
804
|
-
* @tutorial PlatformProvider.getUserDecisionForBeforeUnload
|
|
805
|
-
* @returns {Promise<BeforeUnloadUserDecision>}
|
|
806
|
-
*/
|
|
807
|
-
getUserDecisionForBeforeUnload(payload: ViewsPreventingUnloadPayload): Promise<BeforeUnloadUserDecision>;
|
|
808
|
-
/**
|
|
809
|
-
* Handles the closing of a Window and/or its Views. Called in {@link PlatformProvider#closeWindow PlatformProvider.closeWindow}.
|
|
810
|
-
* The return of {@link PlatformProvider#getUserDecisionForBeforeUnload PlatformProvider.getUserDecisionForBeforeUnload} is passed into this method.
|
|
811
|
-
* @param {Identity} winId Identity of the Window
|
|
812
|
-
* @param {BeforeUnloadUserDecision} userDecision Decision object
|
|
813
|
-
* @returns {Promise<void>}
|
|
814
|
-
*/
|
|
815
|
-
handleViewsAndWindowClose(windowId: Identity, userDecision: BeforeUnloadUserDecision): Promise<void>;
|
|
816
|
-
};
|
|
817
1693
|
export declare type InitPlatformOptions = {
|
|
818
1694
|
overrideCallback?: OverrideCallback<PlatformProvider>;
|
|
1695
|
+
/**
|
|
1696
|
+
* A callback function that can be used to extend or replace default Provider behavior.
|
|
1697
|
+
*/
|
|
819
1698
|
interopOverride?: OverrideCallback<InteropBroker>;
|
|
820
1699
|
};
|
|
821
1700
|
export declare type ProcessDetails = {
|
|
1701
|
+
/**
|
|
1702
|
+
* The percentage of total CPU usage.
|
|
1703
|
+
*/
|
|
822
1704
|
cpuUsage: number;
|
|
1705
|
+
/**
|
|
1706
|
+
* The current nonpaged pool usage in bytes.
|
|
1707
|
+
*/
|
|
823
1708
|
nonPagedPoolUsage: number;
|
|
824
1709
|
pageFaultCount: number;
|
|
1710
|
+
/**
|
|
1711
|
+
* The current paged pool usage in bytes.
|
|
1712
|
+
*/
|
|
825
1713
|
pagedPoolUsage: number;
|
|
1714
|
+
/**
|
|
1715
|
+
* The total amount of memory in bytes that the memory manager has committed
|
|
1716
|
+
*/
|
|
826
1717
|
pagefileUsage: number;
|
|
1718
|
+
/**
|
|
1719
|
+
* The peak nonpaged pool usage in bytes.
|
|
1720
|
+
*/
|
|
827
1721
|
peakNonPagedPoolUsage: number;
|
|
1722
|
+
/**
|
|
1723
|
+
* The peak paged pool usage in bytes.
|
|
1724
|
+
*/
|
|
828
1725
|
peakPagedPoolUsage: number;
|
|
1726
|
+
/**
|
|
1727
|
+
* The peak value in bytes of pagefileUsage during the lifetime of this process.
|
|
1728
|
+
*/
|
|
829
1729
|
peakPagefileUsage: number;
|
|
1730
|
+
/**
|
|
1731
|
+
* The peak working set size in bytes.
|
|
1732
|
+
*/
|
|
830
1733
|
peakWorkingSetSize: number;
|
|
1734
|
+
/**
|
|
1735
|
+
* The current working set size (both shared and private data) in bytes.
|
|
1736
|
+
*/
|
|
831
1737
|
workingSetSize: number;
|
|
832
1738
|
privateSetSize: number;
|
|
1739
|
+
/**
|
|
1740
|
+
* The native process identifier.
|
|
1741
|
+
*/
|
|
833
1742
|
pid: number;
|
|
834
1743
|
};
|
|
835
1744
|
export declare type FrameProcessDetails = ProcessDetails & {
|
|
1745
|
+
/**
|
|
1746
|
+
* Current URL associated with the process.
|
|
1747
|
+
*/
|
|
836
1748
|
url: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* Type for the frame.
|
|
1751
|
+
*/
|
|
837
1752
|
entityType: string;
|
|
838
1753
|
};
|
|
839
1754
|
export declare type EntityProcessDetails = FrameProcessDetails & {
|
|
@@ -842,7 +1757,13 @@ export declare type EntityProcessDetails = FrameProcessDetails & {
|
|
|
842
1757
|
iframes: FrameProcessDetails[];
|
|
843
1758
|
};
|
|
844
1759
|
export declare type AppProcessInfo = {
|
|
1760
|
+
/**
|
|
1761
|
+
* The uuid of the application.
|
|
1762
|
+
*/
|
|
845
1763
|
uuid: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* Process info for each window and view for the application.
|
|
1766
|
+
*/
|
|
846
1767
|
entities: EntityProcessDetails[];
|
|
847
1768
|
};
|
|
848
1769
|
export declare type NonAppProcessDetails = ProcessDetails & {
|
|
@@ -854,9 +1775,21 @@ export declare type SystemProcessInfo = {
|
|
|
854
1775
|
nonApps: NonAppProcessDetails[];
|
|
855
1776
|
};
|
|
856
1777
|
export declare type ClearCacheOption = {
|
|
1778
|
+
/**
|
|
1779
|
+
* html5 application cache
|
|
1780
|
+
*/
|
|
857
1781
|
appcache?: boolean;
|
|
1782
|
+
/**
|
|
1783
|
+
* browser data cache for html files and images
|
|
1784
|
+
*/
|
|
858
1785
|
cache?: boolean;
|
|
1786
|
+
/**
|
|
1787
|
+
* browser cookies
|
|
1788
|
+
*/
|
|
859
1789
|
cookies?: boolean;
|
|
1790
|
+
/**
|
|
1791
|
+
* browser data that can be used across sessions
|
|
1792
|
+
*/
|
|
860
1793
|
localStorage?: boolean;
|
|
861
1794
|
};
|
|
862
1795
|
export declare type CookieInfo = {
|
|
@@ -868,34 +1801,86 @@ export declare type CookieOption = {
|
|
|
868
1801
|
name: string;
|
|
869
1802
|
};
|
|
870
1803
|
export declare type CrashReporterOptions = {
|
|
1804
|
+
/**
|
|
1805
|
+
* In diagnostics mode the crash reporter will send diagnostic logs to
|
|
1806
|
+
* the OpenFin reporting service on runtime shutdown
|
|
1807
|
+
*/
|
|
871
1808
|
diagnosticsMode: boolean;
|
|
872
1809
|
};
|
|
873
1810
|
export declare type CrashReporterState = CrashReporterOptions & {
|
|
1811
|
+
/**
|
|
1812
|
+
* Whether the crash reporter is running
|
|
1813
|
+
*/
|
|
874
1814
|
isRunning: boolean;
|
|
875
1815
|
diagnosticMode: boolean;
|
|
876
1816
|
};
|
|
877
1817
|
export declare type Time = {
|
|
1818
|
+
/**
|
|
1819
|
+
* The number of milliseconds the CPU has spent in user mode.
|
|
1820
|
+
*/
|
|
878
1821
|
user: number;
|
|
1822
|
+
/**
|
|
1823
|
+
* The number of milliseconds the CPU has spent in nice mode.
|
|
1824
|
+
*/
|
|
879
1825
|
nice: number;
|
|
1826
|
+
/**
|
|
1827
|
+
* The number of milliseconds the CPU has spent in sys mode.
|
|
1828
|
+
*/
|
|
880
1829
|
sys: number;
|
|
1830
|
+
/**
|
|
1831
|
+
* The number of milliseconds the CPU has spent in idle mode.
|
|
1832
|
+
*/
|
|
881
1833
|
idle: number;
|
|
1834
|
+
/**
|
|
1835
|
+
* The number of milliseconds the CPU has spent in irq mode.
|
|
1836
|
+
*/
|
|
882
1837
|
irq: number;
|
|
883
1838
|
};
|
|
884
1839
|
export declare type CpuInfo = {
|
|
1840
|
+
/**
|
|
1841
|
+
* The model of the cpu
|
|
1842
|
+
*/
|
|
885
1843
|
model: string;
|
|
1844
|
+
/**
|
|
1845
|
+
* The CPU clock speed in MHz
|
|
1846
|
+
*/
|
|
886
1847
|
speed: number;
|
|
1848
|
+
/**
|
|
1849
|
+
* The numbers of milliseconds the CPU has spent in different modes.
|
|
1850
|
+
*/
|
|
887
1851
|
times: Time;
|
|
888
1852
|
};
|
|
889
1853
|
export declare type GpuInfo = {
|
|
890
1854
|
name: string;
|
|
891
1855
|
};
|
|
892
1856
|
export declare type HostSpecs = {
|
|
1857
|
+
/**
|
|
1858
|
+
* True if Aero Glass theme is supported on Windows platforms
|
|
1859
|
+
*/
|
|
893
1860
|
aeroGlassEnabled?: boolean;
|
|
1861
|
+
/**
|
|
1862
|
+
* "x86" for 32-bit or "x86_64" for 64-bit
|
|
1863
|
+
*/
|
|
894
1864
|
arch: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* The same payload as Node's os.cpus()
|
|
1867
|
+
*/
|
|
895
1868
|
cpus: CpuInfo[];
|
|
1869
|
+
/**
|
|
1870
|
+
* The graphics card name
|
|
1871
|
+
*/
|
|
896
1872
|
gpu: GpuInfo;
|
|
1873
|
+
/**
|
|
1874
|
+
* The same payload as Node's os.totalmem()
|
|
1875
|
+
*/
|
|
897
1876
|
memory: number;
|
|
1877
|
+
/**
|
|
1878
|
+
* The OS name and version/edition
|
|
1879
|
+
*/
|
|
898
1880
|
name: string;
|
|
1881
|
+
/**
|
|
1882
|
+
* True if screensaver is running. Supported on Windows only.
|
|
1883
|
+
*/
|
|
899
1884
|
screenSaver?: boolean;
|
|
900
1885
|
};
|
|
901
1886
|
export declare type PrinterInfo = {
|
|
@@ -904,34 +1889,109 @@ export declare type PrinterInfo = {
|
|
|
904
1889
|
status: number;
|
|
905
1890
|
isDefault: boolean;
|
|
906
1891
|
};
|
|
1892
|
+
/**
|
|
1893
|
+
* DPI (dots per inch) configuration for printing.
|
|
1894
|
+
*/
|
|
907
1895
|
export declare type Dpi = {
|
|
1896
|
+
/**
|
|
1897
|
+
* DPI (dots per inch) in the horizontal direction.
|
|
1898
|
+
*/
|
|
908
1899
|
horizontal?: number;
|
|
1900
|
+
/**
|
|
1901
|
+
* DPI (dots per inch) in the vertical direction.
|
|
1902
|
+
*/
|
|
909
1903
|
vertical?: number;
|
|
910
1904
|
};
|
|
1905
|
+
/**
|
|
1906
|
+
* Margins configuration for printing.
|
|
1907
|
+
*/
|
|
911
1908
|
export declare type Margins = {
|
|
912
1909
|
marginType?: 'default' | 'none' | 'printableArea' | 'custom';
|
|
1910
|
+
/**
|
|
1911
|
+
* The top margin of the printed webpage, in pixels.
|
|
1912
|
+
*/
|
|
913
1913
|
top?: number;
|
|
1914
|
+
/**
|
|
1915
|
+
* The bottom margin of the printed webpage, in pixels.
|
|
1916
|
+
*/
|
|
914
1917
|
bottom?: number;
|
|
1918
|
+
/**
|
|
1919
|
+
* The left margin of the printed webpage, in pixels.
|
|
1920
|
+
*/
|
|
915
1921
|
left?: number;
|
|
1922
|
+
/**
|
|
1923
|
+
* The right margin of the printed webpage, in pixels.
|
|
1924
|
+
*/
|
|
916
1925
|
right?: number;
|
|
917
1926
|
};
|
|
1927
|
+
/**
|
|
1928
|
+
* Options for printing a webpage in OpenFin.
|
|
1929
|
+
*/
|
|
918
1930
|
export declare type PrintOptions = {
|
|
1931
|
+
/**
|
|
1932
|
+
* Disables prompting the user for print settings.
|
|
1933
|
+
*/
|
|
919
1934
|
silent?: boolean;
|
|
1935
|
+
/**
|
|
1936
|
+
* Includes the webpage background color and image when printing.
|
|
1937
|
+
*/
|
|
920
1938
|
printBackground?: boolean;
|
|
1939
|
+
/**
|
|
1940
|
+
* Name of the printer device to use.
|
|
1941
|
+
*/
|
|
921
1942
|
deviceName?: string;
|
|
1943
|
+
/**
|
|
1944
|
+
* Prints in full color (greyscale otherwise).
|
|
1945
|
+
*/
|
|
922
1946
|
color?: boolean;
|
|
1947
|
+
/**
|
|
1948
|
+
* Margins for printed webpage.
|
|
1949
|
+
*/
|
|
923
1950
|
margins?: Margins;
|
|
1951
|
+
/**
|
|
1952
|
+
* Prints in landscape mode (portrait otherwise).
|
|
1953
|
+
*/
|
|
924
1954
|
landscape?: boolean;
|
|
1955
|
+
/**
|
|
1956
|
+
* Scale factor of the printer webpage.
|
|
1957
|
+
*/
|
|
925
1958
|
scaleFactor?: number;
|
|
1959
|
+
/**
|
|
1960
|
+
* Number of webpage pages to print per printer sheet.
|
|
1961
|
+
*/
|
|
926
1962
|
pagesPerSheet?: number;
|
|
1963
|
+
/**
|
|
1964
|
+
* Collates the webpage before printing.
|
|
1965
|
+
*/
|
|
927
1966
|
collate?: boolean;
|
|
1967
|
+
/**
|
|
1968
|
+
* Number of copies to be printed.
|
|
1969
|
+
*/
|
|
928
1970
|
copies?: number;
|
|
929
|
-
|
|
1971
|
+
/**
|
|
1972
|
+
* Page range to print.
|
|
1973
|
+
*/
|
|
1974
|
+
pageRanges?: Record<'from' | 'to', number>;
|
|
1975
|
+
/**
|
|
1976
|
+
* Duplex mode of the printed webpage.
|
|
1977
|
+
*/
|
|
930
1978
|
duplexMode?: 'simplex' | 'shortEdge' | 'longEdge';
|
|
1979
|
+
/**
|
|
1980
|
+
* Dots per inch of the printed webpage.
|
|
1981
|
+
*/
|
|
931
1982
|
dpi?: Dpi;
|
|
932
1983
|
};
|
|
1984
|
+
/**
|
|
1985
|
+
* A request to write data to the clipboard.
|
|
1986
|
+
*/
|
|
933
1987
|
export declare type WriteRequestType = {
|
|
1988
|
+
/**
|
|
1989
|
+
* Data to write to the clipboard.
|
|
1990
|
+
*/
|
|
934
1991
|
data: string;
|
|
1992
|
+
/**
|
|
1993
|
+
* The type of clipboard to write to.
|
|
1994
|
+
*/
|
|
935
1995
|
type?: string;
|
|
936
1996
|
};
|
|
937
1997
|
export declare type WriteAnyRequestType = {
|
|
@@ -943,6 +2003,9 @@ export declare type WriteAnyRequestType = {
|
|
|
943
2003
|
type?: string;
|
|
944
2004
|
};
|
|
945
2005
|
export declare type SubscriptionOptions = {
|
|
2006
|
+
/**
|
|
2007
|
+
* The event timestamp.
|
|
2008
|
+
*/
|
|
946
2009
|
timestamp?: number;
|
|
947
2010
|
};
|
|
948
2011
|
export declare type SharedWorkerInfo = {
|
|
@@ -950,18 +2013,42 @@ export declare type SharedWorkerInfo = {
|
|
|
950
2013
|
url: string;
|
|
951
2014
|
};
|
|
952
2015
|
export declare type ServiceIdentifier = {
|
|
2016
|
+
/**
|
|
2017
|
+
* The name of the service.
|
|
2018
|
+
*/
|
|
953
2019
|
name: string;
|
|
954
2020
|
};
|
|
955
2021
|
export declare type ServiceConfiguration = {
|
|
956
2022
|
config: object;
|
|
2023
|
+
/**
|
|
2024
|
+
* The name of the service.
|
|
2025
|
+
*/
|
|
957
2026
|
name: string;
|
|
958
2027
|
};
|
|
959
2028
|
export declare type RVMInfo = {
|
|
2029
|
+
/**
|
|
2030
|
+
* The name of action: "get-rvm-info".
|
|
2031
|
+
*/
|
|
960
2032
|
'action': string;
|
|
2033
|
+
/**
|
|
2034
|
+
* The app log directory.
|
|
2035
|
+
*/
|
|
961
2036
|
'appLogDirectory': string;
|
|
2037
|
+
/**
|
|
2038
|
+
* The path of OpenfinRVM.exe.
|
|
2039
|
+
*/
|
|
962
2040
|
'path': string;
|
|
2041
|
+
/**
|
|
2042
|
+
* The start time of RVM.
|
|
2043
|
+
*/
|
|
963
2044
|
'start-time': string;
|
|
2045
|
+
/**
|
|
2046
|
+
* The version of RVM.
|
|
2047
|
+
*/
|
|
964
2048
|
'version': string;
|
|
2049
|
+
/**
|
|
2050
|
+
* The path to the working directory.
|
|
2051
|
+
*/
|
|
965
2052
|
'working-dir': string;
|
|
966
2053
|
};
|
|
967
2054
|
export declare type AppVersionProgress = {
|
|
@@ -982,25 +2069,64 @@ export declare type AppVersionRuntimeInfo = {
|
|
|
982
2069
|
};
|
|
983
2070
|
export declare type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
|
|
984
2071
|
export declare type RvmLaunchOptions = {
|
|
2072
|
+
/**
|
|
2073
|
+
* True if no UI when launching
|
|
2074
|
+
*/
|
|
985
2075
|
noUi?: boolean;
|
|
986
2076
|
userAppConfigArgs?: object;
|
|
2077
|
+
/**
|
|
2078
|
+
* Timeout in seconds until RVM launch request expires.
|
|
2079
|
+
*/
|
|
987
2080
|
timeToLive?: number;
|
|
2081
|
+
/**
|
|
2082
|
+
* Called whenever app version resolver events occur.
|
|
2083
|
+
*/
|
|
988
2084
|
subscribe?: (launch: LaunchEmitter) => void;
|
|
989
2085
|
};
|
|
990
2086
|
export declare type ShortCutConfig = {
|
|
2087
|
+
/**
|
|
2088
|
+
* True if application has a shortcut on the desktop.
|
|
2089
|
+
*/
|
|
991
2090
|
desktop?: boolean;
|
|
2091
|
+
/**
|
|
2092
|
+
* True if application has shortcut in the start menu.
|
|
2093
|
+
*/
|
|
992
2094
|
startMenu?: boolean;
|
|
2095
|
+
/**
|
|
2096
|
+
* True if application will be launched on system startup.
|
|
2097
|
+
*/
|
|
993
2098
|
systemStartup?: boolean;
|
|
994
2099
|
};
|
|
995
2100
|
export declare type TerminateExternalRequestType = {
|
|
2101
|
+
/**
|
|
2102
|
+
* The uuid of the running application.
|
|
2103
|
+
*/
|
|
996
2104
|
uuid: string;
|
|
2105
|
+
/**
|
|
2106
|
+
* Time out period before the running application terminates.
|
|
2107
|
+
*/
|
|
997
2108
|
timeout: number;
|
|
2109
|
+
/**
|
|
2110
|
+
* Value to terminate the running application.
|
|
2111
|
+
*/
|
|
998
2112
|
killTree: boolean;
|
|
999
2113
|
};
|
|
1000
2114
|
export declare type TrayInfo = {
|
|
2115
|
+
/**
|
|
2116
|
+
* The bound of tray icon in virtual screen pixels.
|
|
2117
|
+
*/
|
|
1001
2118
|
bounds: Rectangle;
|
|
2119
|
+
/**
|
|
2120
|
+
* Please see fin.System.getMonitorInfo for more information.
|
|
2121
|
+
*/
|
|
1002
2122
|
monitorInfo: MonitorInfo;
|
|
2123
|
+
/**
|
|
2124
|
+
* Copy of `bounds.x`.
|
|
2125
|
+
*/
|
|
1003
2126
|
x: number;
|
|
2127
|
+
/**
|
|
2128
|
+
* Copy of `bounds.y`.
|
|
2129
|
+
*/
|
|
1004
2130
|
y: number;
|
|
1005
2131
|
};
|
|
1006
2132
|
export declare type Transition = {
|
|
@@ -1009,33 +2135,116 @@ export declare type Transition = {
|
|
|
1009
2135
|
size?: Size;
|
|
1010
2136
|
};
|
|
1011
2137
|
export declare type Size = TransitionBase & {
|
|
2138
|
+
/**
|
|
2139
|
+
* Optional if height is present. Defaults to the window's current width.
|
|
2140
|
+
*/
|
|
1012
2141
|
width: number;
|
|
2142
|
+
/**
|
|
2143
|
+
* Optional if width is present. Defaults to the window's current height.
|
|
2144
|
+
*/
|
|
1013
2145
|
height: number;
|
|
1014
2146
|
};
|
|
1015
2147
|
export declare type Opacity = TransitionBase & {
|
|
2148
|
+
/**
|
|
2149
|
+
* The opacity from 0.0 (transparent) to 1.0 (normal).
|
|
2150
|
+
*/
|
|
1016
2151
|
opacity: number;
|
|
1017
2152
|
};
|
|
2153
|
+
/**
|
|
2154
|
+
* Base configuration options needed for all types of transitions.
|
|
2155
|
+
*/
|
|
1018
2156
|
export declare type TransitionBase = {
|
|
2157
|
+
/**
|
|
2158
|
+
* The total time in milliseconds this transition should take.
|
|
2159
|
+
*/
|
|
1019
2160
|
duration: number;
|
|
2161
|
+
/**
|
|
2162
|
+
* @defaultValue false
|
|
2163
|
+
*
|
|
2164
|
+
* Treats 'opacity' as absolute or as a delta. Defaults to false.
|
|
2165
|
+
*/
|
|
1020
2166
|
relative?: boolean;
|
|
1021
2167
|
};
|
|
1022
2168
|
export declare type Position = TransitionBase & {
|
|
2169
|
+
/**
|
|
2170
|
+
* Defaults to the window's current left position in virtual screen coordinates.
|
|
2171
|
+
*/
|
|
1023
2172
|
left: number;
|
|
2173
|
+
/**
|
|
2174
|
+
* Defaults to the window's current top position in virtual screen coordinates.
|
|
2175
|
+
*/
|
|
1024
2176
|
top: number;
|
|
1025
2177
|
};
|
|
1026
2178
|
export declare type AnchorType = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
2179
|
+
/**
|
|
2180
|
+
* Configuration for transition between windows.
|
|
2181
|
+
*/
|
|
1027
2182
|
export declare type TransitionOptions = {
|
|
2183
|
+
/**
|
|
2184
|
+
* Interrupts the current animation (otherwise, the animation is added to the end of the queue).
|
|
2185
|
+
*/
|
|
1028
2186
|
interrupt: boolean;
|
|
2187
|
+
/**
|
|
2188
|
+
* @defaultValue false
|
|
2189
|
+
*
|
|
2190
|
+
* Treats 'opacity' as absolute or as a delta. Defaults to false.
|
|
2191
|
+
*/
|
|
2192
|
+
relative?: boolean;
|
|
1029
2193
|
tween?: tween;
|
|
1030
2194
|
};
|
|
1031
2195
|
export declare type tween = 'linear' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'ease-in-quad' | 'ease-out-quad' | 'ease-in-out-quad' | 'ease-in-cubic' | 'ease-out-cubic' | 'ease-in-out-cubic' | 'ease-out-bounce' | 'ease-in-back' | 'ease-out-back' | 'ease-in-out-back' | 'ease-in-elastic' | 'ease-out-elastic' | 'ease-in-out-elastic';
|
|
2196
|
+
/**
|
|
2197
|
+
* Configuration for find-in-page requests.
|
|
2198
|
+
*/
|
|
1032
2199
|
export declare type FindInPageOptions = {
|
|
2200
|
+
/**
|
|
2201
|
+
* @defaultValue true
|
|
2202
|
+
*
|
|
2203
|
+
* Searches in the forward direction (backward otherwise)
|
|
2204
|
+
*/
|
|
1033
2205
|
forward?: boolean;
|
|
2206
|
+
/**
|
|
2207
|
+
* @defaultValue false
|
|
2208
|
+
*
|
|
2209
|
+
* Begins a new text-finding session; should be true for first request only, and false on subsequent requests.
|
|
2210
|
+
*/
|
|
1034
2211
|
findNext?: boolean;
|
|
2212
|
+
/**
|
|
2213
|
+
* @defaultValue false
|
|
2214
|
+
*
|
|
2215
|
+
* Enables case-sensitive searching.
|
|
2216
|
+
*/
|
|
1035
2217
|
matchCase?: boolean;
|
|
2218
|
+
/**
|
|
2219
|
+
* @defaultValue false
|
|
2220
|
+
*
|
|
2221
|
+
* Only searches from the start of words.
|
|
2222
|
+
*/
|
|
1036
2223
|
wordStart?: boolean;
|
|
2224
|
+
/**
|
|
2225
|
+
* @defaultValue false
|
|
2226
|
+
*
|
|
2227
|
+
* When combined with wordStart, accepts a match in the middle of a word if the match begins with an uppercase letter followed by a<br>
|
|
2228
|
+
* lowercase or non-letter. Accepts several other intra-word matches.
|
|
2229
|
+
*/
|
|
1037
2230
|
medialCapitalAsWordStart?: boolean;
|
|
1038
2231
|
};
|
|
2232
|
+
export declare type FindInPageResult = {
|
|
2233
|
+
requestId: number;
|
|
2234
|
+
/**
|
|
2235
|
+
* Position of the active match.
|
|
2236
|
+
*/
|
|
2237
|
+
activeMatchOrdinal: number;
|
|
2238
|
+
/**
|
|
2239
|
+
* Number of Matches.
|
|
2240
|
+
*/
|
|
2241
|
+
matches: number;
|
|
2242
|
+
/**
|
|
2243
|
+
* Coordinates of first match region.
|
|
2244
|
+
*/
|
|
2245
|
+
selectionArea: Rectangle;
|
|
2246
|
+
finalUpdate: boolean;
|
|
2247
|
+
};
|
|
1039
2248
|
export declare type FrameInfo = {
|
|
1040
2249
|
name: string;
|
|
1041
2250
|
uuid: string;
|
|
@@ -1046,18 +2255,36 @@ export declare type ExternalApplicationInfo = {
|
|
|
1046
2255
|
parent: Identity;
|
|
1047
2256
|
};
|
|
1048
2257
|
export declare type ExternalConnection = {
|
|
2258
|
+
/**
|
|
2259
|
+
* The token to broker an external connection.
|
|
2260
|
+
*/
|
|
1049
2261
|
token: string;
|
|
2262
|
+
/**
|
|
2263
|
+
* Unique identifier for the connection.
|
|
2264
|
+
*/
|
|
1050
2265
|
uuid: string;
|
|
1051
2266
|
};
|
|
1052
2267
|
export declare type ExternalProcessRequestType = {
|
|
2268
|
+
/**
|
|
2269
|
+
* The file path to where the running application resides.
|
|
2270
|
+
*/
|
|
1053
2271
|
path?: string;
|
|
1054
2272
|
alias?: string;
|
|
2273
|
+
/**
|
|
2274
|
+
* The arguments to pass to the application.
|
|
2275
|
+
*/
|
|
1055
2276
|
arguments?: string;
|
|
1056
2277
|
listener?: LaunchExternalProcessListener;
|
|
1057
2278
|
lifetime?: string;
|
|
1058
2279
|
certificate?: CertificationInfo;
|
|
1059
2280
|
uuid?: string;
|
|
2281
|
+
/**
|
|
2282
|
+
* Initial window state after launching: 'normal' (default), 'minimized', 'maximized'.
|
|
2283
|
+
*/
|
|
1060
2284
|
initialWindowState?: string;
|
|
2285
|
+
/**
|
|
2286
|
+
* Current working directory.
|
|
2287
|
+
*/
|
|
1061
2288
|
cwd?: string;
|
|
1062
2289
|
};
|
|
1063
2290
|
export declare type CertificationInfo = {
|
|
@@ -1080,20 +2307,48 @@ export declare type ExternalProcessInfo = {
|
|
|
1080
2307
|
listener?: LaunchExternalProcessListener;
|
|
1081
2308
|
};
|
|
1082
2309
|
export declare type AppAssetInfo = {
|
|
2310
|
+
/**
|
|
2311
|
+
* The URL to a zip file containing the package files (executables, dlls, etc…)
|
|
2312
|
+
*/
|
|
1083
2313
|
src: string;
|
|
2314
|
+
/**
|
|
2315
|
+
* The name of the asset
|
|
2316
|
+
*/
|
|
1084
2317
|
alias: string;
|
|
2318
|
+
/**
|
|
2319
|
+
* The version of the package
|
|
2320
|
+
*/
|
|
1085
2321
|
version: string;
|
|
2322
|
+
/**
|
|
2323
|
+
* Specify default executable to launch. This option can be overridden in launchExternalProcess
|
|
2324
|
+
*/
|
|
1086
2325
|
target?: string;
|
|
2326
|
+
/**
|
|
2327
|
+
* The default command line arguments for the aforementioned target.
|
|
2328
|
+
*/
|
|
1087
2329
|
args?: string;
|
|
2330
|
+
/**
|
|
2331
|
+
* When set to true, the app will fail to load if the asset cannot be downloaded.
|
|
2332
|
+
* When set to false, the app will continue to load if the asset cannot be downloaded. (Default: true)
|
|
2333
|
+
*/
|
|
1088
2334
|
mandatory?: boolean;
|
|
1089
2335
|
};
|
|
2336
|
+
/**
|
|
2337
|
+
* The options object required by the downloadRuntime function.
|
|
2338
|
+
*/
|
|
1090
2339
|
export declare type RuntimeDownloadOptions = {
|
|
2340
|
+
/**
|
|
2341
|
+
* The given version to download.
|
|
2342
|
+
*/
|
|
1091
2343
|
version: string;
|
|
1092
2344
|
};
|
|
1093
2345
|
export declare type AppAssetRequest = {
|
|
1094
2346
|
alias: string;
|
|
1095
2347
|
};
|
|
1096
2348
|
export declare type RuntimeDownloadProgress = {
|
|
2349
|
+
/**
|
|
2350
|
+
* @property { string } alias The name of the asset
|
|
2351
|
+
*/
|
|
1097
2352
|
downloadedBytes: number;
|
|
1098
2353
|
totalBytes: number;
|
|
1099
2354
|
};
|
|
@@ -1105,16 +2360,44 @@ export declare type CertifiedAppInfo = {
|
|
|
1105
2360
|
isPresentInAppDirectory?: boolean;
|
|
1106
2361
|
};
|
|
1107
2362
|
export declare type JumpListCategory = {
|
|
2363
|
+
/**
|
|
2364
|
+
* The display title for the category.
|
|
2365
|
+
*
|
|
2366
|
+
* If omitted, items in this category will be placed into the standard 'Tasks' category.
|
|
2367
|
+
* There can be only one such category, and it will always be displayed at the bottom of the JumpList.
|
|
2368
|
+
*/
|
|
1108
2369
|
name?: string;
|
|
2370
|
+
/**
|
|
2371
|
+
* The set of tasks that will populate the JumpList.
|
|
2372
|
+
*/
|
|
1109
2373
|
items: Array<JumpListTask | JumpListSeparator>;
|
|
1110
2374
|
};
|
|
1111
2375
|
export declare type JumpListItem = JumpListTask | JumpListSeparator;
|
|
1112
2376
|
export declare type JumpListTask = {
|
|
1113
2377
|
type: 'task';
|
|
2378
|
+
/**
|
|
2379
|
+
* The text to be displayed for the JumpList Item.
|
|
2380
|
+
*/
|
|
1114
2381
|
title: string;
|
|
2382
|
+
/**
|
|
2383
|
+
* Tooltip description of the task (displayed in a tooltip).
|
|
2384
|
+
*/
|
|
1115
2385
|
description: string;
|
|
2386
|
+
/**
|
|
2387
|
+
* @property Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1.
|
|
2388
|
+
* See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
|
|
2389
|
+
*/
|
|
1116
2390
|
deepLink: string;
|
|
2391
|
+
/**
|
|
2392
|
+
* The absolute path to an icon to be displayed for the item, which can be an arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll).
|
|
2393
|
+
*/
|
|
1117
2394
|
iconPath?: string;
|
|
2395
|
+
/**
|
|
2396
|
+
* The index of the icon in the resource file.
|
|
2397
|
+
*
|
|
2398
|
+
* If a resource file contains multiple icons this value can be used to specify the zero-based index of the icon that should be displayed for this task.
|
|
2399
|
+
* If a resource file contains only one icon, this property should be set to zero.
|
|
2400
|
+
*/
|
|
1118
2401
|
iconIndex?: number;
|
|
1119
2402
|
};
|
|
1120
2403
|
export declare type JumpListSeparator = {
|
|
@@ -1133,7 +2416,13 @@ export declare type ApplicationInfo = {
|
|
|
1133
2416
|
};
|
|
1134
2417
|
};
|
|
1135
2418
|
export declare type ManifestInfo = {
|
|
2419
|
+
/**
|
|
2420
|
+
* The uuid of the application.
|
|
2421
|
+
*/
|
|
1136
2422
|
uuid: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* The runtime manifest URL.
|
|
2425
|
+
*/
|
|
1137
2426
|
manifestUrl: string;
|
|
1138
2427
|
};
|
|
1139
2428
|
export declare type ClickedMenuResult = {
|
|
@@ -1187,11 +2476,29 @@ export declare type NativeWindowIntegrationProviderAuthorization = {
|
|
|
1187
2476
|
authorizedUuid: string;
|
|
1188
2477
|
};
|
|
1189
2478
|
export declare type RuntimeInfo = {
|
|
2479
|
+
/**
|
|
2480
|
+
* The runtime build architecture.
|
|
2481
|
+
*/
|
|
1190
2482
|
architecture: string;
|
|
2483
|
+
/**
|
|
2484
|
+
* The runtime manifest URL.
|
|
2485
|
+
*/
|
|
1191
2486
|
manifestUrl: string;
|
|
2487
|
+
/**
|
|
2488
|
+
* The runtime websocket port.
|
|
2489
|
+
*/
|
|
1192
2490
|
port: number;
|
|
2491
|
+
/**
|
|
2492
|
+
* The runtime security realm.
|
|
2493
|
+
*/
|
|
1193
2494
|
securityRealm?: string;
|
|
2495
|
+
/**
|
|
2496
|
+
* The runtime version.
|
|
2497
|
+
*/
|
|
1194
2498
|
version: string;
|
|
2499
|
+
/**
|
|
2500
|
+
* the command line argument used to start the Runtime.
|
|
2501
|
+
*/
|
|
1195
2502
|
args: object;
|
|
1196
2503
|
chromeVersion: string;
|
|
1197
2504
|
electronVersion: string;
|
|
@@ -1215,8 +2522,17 @@ export declare type DownloadRule = {
|
|
|
1215
2522
|
match: string[];
|
|
1216
2523
|
};
|
|
1217
2524
|
export declare type ContextHandler = (context: Context) => void;
|
|
2525
|
+
/**
|
|
2526
|
+
* Combination of an action and a context that is passed to an application for resolution.
|
|
2527
|
+
*/
|
|
1218
2528
|
export declare type Intent<MetadataType = IntentMetadata> = {
|
|
2529
|
+
/**
|
|
2530
|
+
* Name of the intent.
|
|
2531
|
+
*/
|
|
1219
2532
|
name: string;
|
|
2533
|
+
/**
|
|
2534
|
+
* Data associated with the intent.
|
|
2535
|
+
*/
|
|
1220
2536
|
context: Context;
|
|
1221
2537
|
metadata?: MetadataType;
|
|
1222
2538
|
};
|
|
@@ -1227,13 +2543,37 @@ export declare type IntentMetadata<TargetType = any> = {
|
|
|
1227
2543
|
};
|
|
1228
2544
|
export declare type IntentHandler = (intent: Intent) => void;
|
|
1229
2545
|
export declare type ContentCreationBehaviorNames = 'window' | 'view' | 'block' | 'browser';
|
|
1230
|
-
declare type MatchPattern = string;
|
|
2546
|
+
export declare type MatchPattern = string;
|
|
2547
|
+
/**
|
|
2548
|
+
* A rule for creating content in OpenFin; maps a content type to the way in which
|
|
2549
|
+
* newly-opened content of that type will be handled.
|
|
2550
|
+
*
|
|
2551
|
+
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
|
2552
|
+
* @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
|
|
2553
|
+
* @property { object } options Window creation options or View creation options.
|
|
2554
|
+
*/
|
|
1231
2555
|
export declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
|
|
2556
|
+
/**
|
|
2557
|
+
* Behavior to use when opening matched content.
|
|
2558
|
+
*/
|
|
1232
2559
|
behavior: T;
|
|
2560
|
+
/**
|
|
2561
|
+
* List of [match patterns](https://developer.chrome.com/extensions/match_patterns) that indicate the specified
|
|
2562
|
+
* behavior should be used
|
|
2563
|
+
*/
|
|
1233
2564
|
match: MatchPattern[];
|
|
2565
|
+
/**
|
|
2566
|
+
* Options for newly-created view or window (if applicable).
|
|
2567
|
+
*/
|
|
1234
2568
|
options?: T extends 'window' ? Partial<WindowOptions> : T extends 'view' ? Partial<ViewOptions> : never;
|
|
1235
2569
|
};
|
|
2570
|
+
/**
|
|
2571
|
+
* Configures how new content (e,g, from `window.open` or a link) is opened.
|
|
2572
|
+
*/
|
|
1236
2573
|
export declare type ContentCreationOptions = {
|
|
2574
|
+
/**
|
|
2575
|
+
* List of rules for creation of new content.
|
|
2576
|
+
*/
|
|
1237
2577
|
rules: ContentCreationRule[];
|
|
1238
2578
|
};
|
|
1239
2579
|
export declare type SnapshotProvider<T> = {
|
|
@@ -1241,9 +2581,18 @@ export declare type SnapshotProvider<T> = {
|
|
|
1241
2581
|
applySnapshot: (snapshot: T) => Promise<void>;
|
|
1242
2582
|
};
|
|
1243
2583
|
export declare type QueryPermissionResult = {
|
|
2584
|
+
/**
|
|
2585
|
+
* The full name of a secured API.
|
|
2586
|
+
*/
|
|
1244
2587
|
permission: string;
|
|
1245
2588
|
state: PermissionState;
|
|
2589
|
+
/**
|
|
2590
|
+
* True if permission is granted.
|
|
2591
|
+
*/
|
|
1246
2592
|
granted: boolean;
|
|
2593
|
+
/**
|
|
2594
|
+
* The value of permission.
|
|
2595
|
+
*/
|
|
1247
2596
|
rawValue?: unknown;
|
|
1248
2597
|
};
|
|
1249
2598
|
export declare type SessionContextGroup = {
|
|
@@ -1255,17 +2604,38 @@ export declare type SessionContextGroup = {
|
|
|
1255
2604
|
}>;
|
|
1256
2605
|
};
|
|
1257
2606
|
export type { MessagingProtocols };
|
|
2607
|
+
/**
|
|
2608
|
+
* Channel provider creation options.
|
|
2609
|
+
*/
|
|
1258
2610
|
export declare type ChannelCreateOptions = {
|
|
2611
|
+
/**
|
|
2612
|
+
* EXPERIMENTAL: Messaging protocols supported by the channel provider.
|
|
2613
|
+
*/
|
|
1259
2614
|
protocols?: MessagingProtocols[];
|
|
1260
2615
|
};
|
|
2616
|
+
/**
|
|
2617
|
+
* Options provided on a client connection to a channel.
|
|
2618
|
+
*
|
|
2619
|
+
*/
|
|
1261
2620
|
export declare type ChannelConnectOptions = ChannelCreateOptions & {
|
|
2621
|
+
/**
|
|
2622
|
+
* @defaultValue true
|
|
2623
|
+
*
|
|
2624
|
+
* If true will wait for ChannelProvider to connect. If false will fail if ChannelProvider is not found.
|
|
2625
|
+
*/
|
|
1262
2626
|
wait?: boolean;
|
|
2627
|
+
/**
|
|
2628
|
+
* Payload to pass to ChannelProvider onConnection action.
|
|
2629
|
+
*/
|
|
1263
2630
|
payload?: any;
|
|
1264
2631
|
};
|
|
1265
2632
|
export declare type ContextForIntent<MetadataType = any> = Context & {
|
|
1266
2633
|
metadata?: MetadataType;
|
|
1267
2634
|
};
|
|
1268
2635
|
export declare type InfoForIntentOptions<MetadataType = IntentMetadata> = {
|
|
2636
|
+
/**
|
|
2637
|
+
* Name of the intent to get info for.
|
|
2638
|
+
*/
|
|
1269
2639
|
name: string;
|
|
1270
2640
|
context?: Context;
|
|
1271
2641
|
metadata?: MetadataType;
|
|
@@ -1274,8 +2644,17 @@ export declare type FindIntentsByContextOptions<MetadataType = IntentMetadata> =
|
|
|
1274
2644
|
context: Context;
|
|
1275
2645
|
metadata?: MetadataType;
|
|
1276
2646
|
};
|
|
2647
|
+
/**
|
|
2648
|
+
* Identity of a channel provider.
|
|
2649
|
+
*/
|
|
1277
2650
|
export declare type ProviderIdentity = Identity & {
|
|
2651
|
+
/**
|
|
2652
|
+
* Identifier of the channel.
|
|
2653
|
+
*/
|
|
1278
2654
|
channelId: string;
|
|
2655
|
+
/**
|
|
2656
|
+
* Channel provider name.
|
|
2657
|
+
*/
|
|
1279
2658
|
channelName: string;
|
|
1280
2659
|
};
|
|
1281
2660
|
export declare type RegisterUsageData = {
|
|
@@ -1283,23 +2662,59 @@ export declare type RegisterUsageData = {
|
|
|
1283
2662
|
type: string;
|
|
1284
2663
|
};
|
|
1285
2664
|
export interface ViewsPreventingUnloadPayload {
|
|
2665
|
+
/**
|
|
2666
|
+
* Specifies if the Window should close.
|
|
2667
|
+
*/
|
|
1286
2668
|
windowShouldClose: boolean;
|
|
2669
|
+
/**
|
|
2670
|
+
* Identity of the Window.
|
|
2671
|
+
*/
|
|
1287
2672
|
windowId: Identity;
|
|
2673
|
+
/**
|
|
2674
|
+
* Identities of the Views that are preventing an unload
|
|
2675
|
+
*/
|
|
1288
2676
|
viewsPreventingUnload: Identity[];
|
|
2677
|
+
/**
|
|
2678
|
+
* Identities of the Views that are not preventing an unload
|
|
2679
|
+
*/
|
|
1289
2680
|
viewsNotPreventingUnload: Identity[];
|
|
2681
|
+
/**
|
|
2682
|
+
* Source of the close action.
|
|
2683
|
+
*/
|
|
1290
2684
|
closeType: 'view' | 'window';
|
|
1291
2685
|
}
|
|
1292
2686
|
export interface BeforeUnloadUserDecision {
|
|
2687
|
+
/**
|
|
2688
|
+
* Specifies if the Window should close.
|
|
2689
|
+
*/
|
|
1293
2690
|
windowShouldClose: boolean;
|
|
2691
|
+
/**
|
|
2692
|
+
* Array of views that will close.
|
|
2693
|
+
*/
|
|
1294
2694
|
viewsToClose: Identity[];
|
|
1295
2695
|
}
|
|
1296
2696
|
export interface ViewStatuses {
|
|
2697
|
+
/**
|
|
2698
|
+
* Identities of the Views that are preventing an unload.
|
|
2699
|
+
*/
|
|
1297
2700
|
viewsPreventingUnload: Identity[];
|
|
2701
|
+
/**
|
|
2702
|
+
* Identities of the Views that are not preventing an unload.
|
|
2703
|
+
*/
|
|
1298
2704
|
viewsNotPreventingUnload: Identity[];
|
|
1299
2705
|
}
|
|
1300
2706
|
export interface CloseWindowPayload {
|
|
2707
|
+
/**
|
|
2708
|
+
*
|
|
2709
|
+
* Identity of the Window
|
|
2710
|
+
*/
|
|
1301
2711
|
windowId: Identity;
|
|
1302
2712
|
options: {
|
|
2713
|
+
/**
|
|
2714
|
+
* @defaultValue false
|
|
2715
|
+
*
|
|
2716
|
+
* When set to true skips any before handler set on views that are part of the window
|
|
2717
|
+
*/
|
|
1303
2718
|
skipBeforeUnload?: boolean;
|
|
1304
2719
|
};
|
|
1305
2720
|
}
|
|
@@ -1308,23 +2723,53 @@ export declare type ProxyInfo = {
|
|
|
1308
2723
|
system: ProxySystemInfo;
|
|
1309
2724
|
};
|
|
1310
2725
|
export declare type ProxyConfig = {
|
|
2726
|
+
/**
|
|
2727
|
+
* The configured proxy address.
|
|
2728
|
+
*/
|
|
1311
2729
|
proxyAddress: string;
|
|
2730
|
+
/**
|
|
2731
|
+
* The configured proxy port.
|
|
2732
|
+
*/
|
|
1312
2733
|
proxyPort: number;
|
|
1313
2734
|
type: string;
|
|
1314
2735
|
};
|
|
1315
2736
|
export declare type ProxySystemInfo = {
|
|
2737
|
+
/**
|
|
2738
|
+
* The auto configuration url.
|
|
2739
|
+
*/
|
|
1316
2740
|
autoConfigUrl: string;
|
|
2741
|
+
/**
|
|
2742
|
+
* The proxy bypass info.
|
|
2743
|
+
*/
|
|
1317
2744
|
bypass: string;
|
|
2745
|
+
/**
|
|
2746
|
+
* Value to check if a proxy is enabled.
|
|
2747
|
+
*/
|
|
1318
2748
|
enabled: boolean;
|
|
2749
|
+
/**
|
|
2750
|
+
* The proxy info.
|
|
2751
|
+
*/
|
|
1319
2752
|
proxy: string;
|
|
1320
2753
|
};
|
|
1321
2754
|
export declare type ChannelAction = (payload: unknown, id: ProviderIdentity | ClientIdentity) => unknown;
|
|
1322
2755
|
export declare type ChannelMiddleware = (topic: string, payload: unknown, senderIdentity: ProviderIdentity | ClientIdentity) => Promise<unknown> | unknown;
|
|
1323
2756
|
export declare type ErrorMiddleware = (topic: string, error: Error, id: ProviderIdentity | ClientIdentity) => unknown;
|
|
1324
2757
|
export declare type ApplicationState = {
|
|
2758
|
+
/**
|
|
2759
|
+
* True when the application is a Platform controller
|
|
2760
|
+
*/
|
|
1325
2761
|
isPlatform: boolean;
|
|
2762
|
+
/**
|
|
2763
|
+
* True when the application is running
|
|
2764
|
+
*/
|
|
1326
2765
|
isRunning: boolean;
|
|
2766
|
+
/**
|
|
2767
|
+
* uuid of the application
|
|
2768
|
+
*/
|
|
1327
2769
|
uuid: string;
|
|
2770
|
+
/**
|
|
2771
|
+
* uuid of the application that launches this application
|
|
2772
|
+
*/
|
|
1328
2773
|
parentUuid?: string;
|
|
1329
2774
|
};
|
|
1330
2775
|
export declare type InstalledApps = {
|
|
@@ -1334,18 +2779,45 @@ export declare type InstallationInfo = {
|
|
|
1334
2779
|
cachedManifest: any;
|
|
1335
2780
|
};
|
|
1336
2781
|
export declare type GetLogRequestType = {
|
|
2782
|
+
/**
|
|
2783
|
+
* The name of the running application
|
|
2784
|
+
*/
|
|
1337
2785
|
name: string;
|
|
2786
|
+
/**
|
|
2787
|
+
* The file length of the log file
|
|
2788
|
+
*/
|
|
1338
2789
|
endFile?: string;
|
|
2790
|
+
/**
|
|
2791
|
+
* The size limit of the log file.
|
|
2792
|
+
*/
|
|
1339
2793
|
sizeLimit?: number;
|
|
1340
2794
|
};
|
|
1341
2795
|
export declare type LogInfo = {
|
|
2796
|
+
/**
|
|
2797
|
+
* The filename of the log
|
|
2798
|
+
*/
|
|
1342
2799
|
name: string;
|
|
2800
|
+
/**
|
|
2801
|
+
* The size of the log in bytes
|
|
2802
|
+
*/
|
|
1343
2803
|
size: number;
|
|
2804
|
+
/**
|
|
2805
|
+
* The unix time at which the log was created "Thu Jan 08 2015 14:40:30 GMT-0500 (Eastern Standard Time)"
|
|
2806
|
+
*/
|
|
1344
2807
|
date: string;
|
|
1345
2808
|
};
|
|
1346
2809
|
export declare type SendApplicationLogResponse = {
|
|
1347
2810
|
logId: string;
|
|
1348
2811
|
};
|
|
2812
|
+
/**
|
|
2813
|
+
* Describes the minimum level (inclusive) above which logs will be written.
|
|
2814
|
+
*
|
|
2815
|
+
* `verbose`: all logs written
|
|
2816
|
+
* `info`: info and above
|
|
2817
|
+
* `warning` warning and above
|
|
2818
|
+
* `error` and above
|
|
2819
|
+
* `fatal`: fatal only, indicates a crash is imminent
|
|
2820
|
+
*/
|
|
1349
2821
|
export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
|
|
1350
2822
|
export declare type PermissionState = 'granted' | 'denied' | 'unavailable';
|
|
1351
2823
|
export declare type RegistryInfo = {
|
|
@@ -1369,31 +2841,63 @@ export declare type WindowInfo = {
|
|
|
1369
2841
|
export declare type ApplicationWindowInfo = {
|
|
1370
2842
|
childWindows: Array<WindowDetail>;
|
|
1371
2843
|
mainWindow: WindowDetail;
|
|
2844
|
+
/**
|
|
2845
|
+
* @property { string } uuid The uuid of the application
|
|
2846
|
+
*/
|
|
1372
2847
|
uuid: string;
|
|
1373
2848
|
};
|
|
1374
2849
|
export declare type WindowDetail = {
|
|
2850
|
+
/**
|
|
2851
|
+
* The bottom-most coordinate of the window.
|
|
2852
|
+
*/
|
|
1375
2853
|
bottom: number;
|
|
2854
|
+
/**
|
|
2855
|
+
* The height of the window.
|
|
2856
|
+
*/
|
|
1376
2857
|
height: number;
|
|
1377
2858
|
isShowing: boolean;
|
|
2859
|
+
/**
|
|
2860
|
+
* The left-most coordinate of the window.
|
|
2861
|
+
*/
|
|
1378
2862
|
left: number;
|
|
2863
|
+
/**
|
|
2864
|
+
* The name of the window.
|
|
2865
|
+
*/
|
|
1379
2866
|
name: string;
|
|
2867
|
+
/**
|
|
2868
|
+
* The right-most coordinate of the window
|
|
2869
|
+
*/
|
|
1380
2870
|
right: number;
|
|
1381
2871
|
state: string;
|
|
2872
|
+
/**
|
|
2873
|
+
* The top-most coordinate of the window.
|
|
2874
|
+
*/
|
|
1382
2875
|
top: number;
|
|
2876
|
+
/**
|
|
2877
|
+
* The width of the window.
|
|
2878
|
+
*/
|
|
1383
2879
|
width: number;
|
|
1384
2880
|
};
|
|
1385
2881
|
export declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
1386
2882
|
export declare type InitLayoutOptions = {
|
|
2883
|
+
/**
|
|
2884
|
+
* The id attribute of the container where the window's Layout should be initialized. If not provided
|
|
2885
|
+
* then an element with id `layout-container` is used. We recommend using a div element.
|
|
2886
|
+
*/
|
|
1387
2887
|
containerId?: string;
|
|
1388
2888
|
};
|
|
1389
2889
|
export declare type PresetLayoutOptions = {
|
|
2890
|
+
/**
|
|
2891
|
+
* Which preset layout arrangement to use.
|
|
2892
|
+
* The preset options are `columns`, `grid`, `rows`, and `tabs`.
|
|
2893
|
+
*/
|
|
1390
2894
|
presetType: LayoutPresetType;
|
|
1391
2895
|
};
|
|
1392
2896
|
export declare type ResultBehavior = 'close' | 'hide' | 'none';
|
|
1393
2897
|
export declare type PopupBaseBehavior = 'close' | 'hide';
|
|
1394
2898
|
export declare type PopupResultBehavior = 'none' | PopupBaseBehavior;
|
|
1395
2899
|
export declare type PopupBlurBehavior = 'modal' | PopupBaseBehavior;
|
|
1396
|
-
declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
2900
|
+
export declare type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
|
1397
2901
|
export interface PopupOptions {
|
|
1398
2902
|
initialOptions?: Optional<WindowCreationOptions, 'name'>;
|
|
1399
2903
|
additionalOptions?: UpdatableWindowOptions;
|
|
@@ -1432,11 +2936,43 @@ export declare type AppVersionCompleteEvent = {
|
|
|
1432
2936
|
export declare type AppVersionRuntimeStatusEvent = {
|
|
1433
2937
|
type: 'runtime-status';
|
|
1434
2938
|
} & AppVersionRuntimeInfo;
|
|
1435
|
-
|
|
2939
|
+
import type * as BaseEvents from './api/events/base';
|
|
2940
|
+
import type * as WebContentsEvents from './api/events/webcontents';
|
|
2941
|
+
import type * as SystemEvents from './api/events/system';
|
|
2942
|
+
import type * as ApplicationEvents from './api/events/application';
|
|
2943
|
+
import type * as WindowEvents from './api/events/window';
|
|
2944
|
+
import type * as ViewEvents from './api/events/view';
|
|
2945
|
+
import type * as GlobalHotkeyEvents from './api/events/globalHotkey';
|
|
2946
|
+
import type * as FrameEvents from './api/events/frame';
|
|
2947
|
+
import type * as PlatformEvents from './api/events/platform';
|
|
2948
|
+
import type * as ExternalApplicationEvents from './api/events/externalApplication';
|
|
2949
|
+
export type { BaseEvents, WebContentsEvents, SystemEvents, ApplicationEvents, WindowEvents, ViewEvents, GlobalHotkeyEvents, FrameEvents, PlatformEvents, ExternalApplicationEvents };
|
|
2950
|
+
export declare type BaseEvent = BaseEvents.BaseEvent;
|
|
2951
|
+
export declare type WebContentsEvent = WebContentsEvents.WebContentsEvent;
|
|
2952
|
+
export declare type SystemEvent = SystemEvents.SystemEvent;
|
|
2953
|
+
export declare type ApplicationEvent = ApplicationEvents.ApplicationEvent;
|
|
2954
|
+
export declare type WindowEvent = WindowEvents.WindowEvent;
|
|
2955
|
+
export declare type ViewEvent = ViewEvents.ViewEvent;
|
|
2956
|
+
export declare type GlobalHotkeyEvent = GlobalHotkeyEvents.GlobalHotkeyEvent;
|
|
2957
|
+
export declare type FrameEvent = FrameEvents.FrameEvent;
|
|
2958
|
+
export declare type PlatformEvent = PlatformEvents.PlatformEvent;
|
|
2959
|
+
export declare type ExternalApplicationEvent = ExternalApplicationEvents.ExternalApplicationEvent;
|
|
2960
|
+
/**
|
|
2961
|
+
* Configure the context menu when right-clicking on a window.
|
|
2962
|
+
*/
|
|
1436
2963
|
export declare type ContextMenuOptions = {
|
|
2964
|
+
/**
|
|
2965
|
+
* Context menu items to display on right-click.
|
|
2966
|
+
*/
|
|
1437
2967
|
template?: Array<PrebuiltContextMenuItem>;
|
|
2968
|
+
/**
|
|
2969
|
+
* Displays the context menu on right click.
|
|
2970
|
+
*/
|
|
1438
2971
|
enabled?: boolean;
|
|
1439
2972
|
};
|
|
2973
|
+
/**
|
|
2974
|
+
* Context menu item with an implementation provided by OpenFin.
|
|
2975
|
+
*/
|
|
1440
2976
|
export declare type PrebuiltContextMenuItem = 'separator' | 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'spellCheck' | 'inspect' | 'reload' | 'navigateForward' | 'navigateBack' | 'print';
|
|
1441
2977
|
export declare type InteropBrokerDisconnectionEvent = {
|
|
1442
2978
|
type: string;
|
|
@@ -1449,3 +2985,4 @@ export interface InteropActionLoggingOption {
|
|
|
1449
2985
|
}
|
|
1450
2986
|
export declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
|
|
1451
2987
|
export declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
|
|
2988
|
+
export type { Me } from './api/me';
|