@openfin/core 33.76.31 → 33.76.36
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/openfin-core-33.76.36.tgz +0 -0
- package/package.json +1 -1
- package/src/OpenFin.d.ts +27 -16
- package/src/api/application/Factory.d.ts +148 -100
- package/src/api/application/Factory.js +148 -100
- package/src/api/application/Instance.d.ts +477 -106
- package/src/api/application/Instance.js +474 -106
- package/src/api/application/index.d.ts +9 -0
- package/src/api/application/index.js +9 -0
- package/src/api/base.d.ts +69 -0
- package/src/api/base.js +69 -0
- package/src/api/clipboard/index.d.ts +111 -31
- package/src/api/clipboard/index.js +111 -31
- package/src/api/events/application.d.ts +12 -0
- package/src/api/events/application.js +12 -0
- package/src/api/events/channel.d.ts +5 -0
- package/src/api/events/channel.js +5 -0
- package/src/api/events/externalApplication.d.ts +5 -0
- package/src/api/events/externalApplication.js +5 -0
- package/src/api/events/frame.d.ts +5 -0
- package/src/api/events/globalHotkey.d.ts +5 -0
- package/src/api/events/platform.d.ts +9 -1
- package/src/api/events/platform.js +8 -0
- package/src/api/events/system.d.ts +13 -0
- package/src/api/events/system.js +13 -0
- package/src/api/events/view.d.ts +19 -9
- package/src/api/events/view.js +10 -0
- package/src/api/events/webcontents.d.ts +21 -10
- package/src/api/events/webcontents.js +11 -0
- package/src/api/events/window.d.ts +70 -1
- package/src/api/events/window.js +10 -0
- package/src/api/external-application/Factory.d.ts +16 -9
- package/src/api/external-application/Factory.js +16 -9
- package/src/api/external-application/Instance.d.ts +40 -32
- package/src/api/external-application/Instance.js +40 -32
- package/src/api/external-application/index.d.ts +9 -0
- package/src/api/external-application/index.js +9 -0
- package/src/api/fin.d.ts +3 -0
- package/src/api/fin.js +3 -0
- package/src/api/frame/Factory.d.ts +30 -13
- package/src/api/frame/Factory.js +30 -13
- package/src/api/frame/Instance.d.ts +51 -38
- package/src/api/frame/Instance.js +51 -38
- package/src/api/frame/index.d.ts +11 -0
- package/src/api/frame/index.js +11 -0
- package/src/api/global-hotkey/index.d.ts +81 -13
- package/src/api/global-hotkey/index.js +81 -13
- package/src/api/interappbus/channel/channel.d.ts +257 -0
- package/src/api/interappbus/channel/channel.js +257 -0
- package/src/api/interappbus/channel/channels-docs.d.ts +59 -57
- package/src/api/interappbus/channel/channels-docs.js +71 -68
- package/src/api/interappbus/channel/client.d.ts +93 -0
- package/src/api/interappbus/channel/client.js +93 -1
- package/src/api/interappbus/channel/index.d.ts +164 -0
- package/src/api/interappbus/channel/index.js +165 -1
- package/src/api/interappbus/channel/provider.d.ts +172 -0
- package/src/api/interappbus/channel/provider.js +172 -0
- package/src/api/interappbus/index.d.ts +55 -20
- package/src/api/interappbus/index.js +55 -20
- package/src/api/interop/Factory.d.ts +30 -10
- package/src/api/interop/Factory.js +30 -10
- package/src/api/interop/InteropBroker.d.ts +298 -70
- package/src/api/interop/InteropBroker.js +298 -70
- package/src/api/interop/InteropClient.d.ts +286 -62
- package/src/api/interop/InteropClient.js +286 -62
- package/src/api/interop/SessionContextGroupClient.d.ts +2 -2
- package/src/api/interop/SessionContextGroupClient.js +2 -2
- package/src/api/interop/fdc3/documentationStub.d.ts +14 -0
- package/src/api/interop/fdc3/documentationStub.js +17 -0
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +31 -34
- package/src/api/interop/fdc3/fdc3-1.2.js +31 -34
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +48 -51
- package/src/api/interop/fdc3/fdc3-2.0.js +48 -51
- package/src/api/interop/index.d.ts +8 -0
- package/src/api/interop/index.js +8 -0
- package/src/api/platform/Factory.d.ts +121 -65
- package/src/api/platform/Factory.js +122 -66
- package/src/api/platform/Instance.d.ts +551 -48
- package/src/api/platform/Instance.js +551 -49
- package/src/api/platform/index.d.ts +9 -0
- package/src/api/platform/index.js +9 -0
- package/src/api/platform/layout/Factory.d.ts +53 -76
- package/src/api/platform/layout/Factory.js +53 -76
- package/src/api/platform/layout/Instance.d.ts +158 -23
- package/src/api/platform/layout/Instance.js +118 -20
- package/src/api/platform/layout/entities/layout-entities.d.ts +222 -30
- package/src/api/platform/layout/entities/layout-entities.js +222 -30
- package/src/api/platform/layout/index.d.ts +9 -0
- package/src/api/platform/layout/index.js +9 -0
- package/src/api/platform/provider.d.ts +398 -51
- package/src/api/snapshot-source/Factory.d.ts +33 -18
- package/src/api/snapshot-source/Factory.js +33 -18
- package/src/api/snapshot-source/Instance.d.ts +30 -8
- package/src/api/snapshot-source/Instance.js +30 -8
- package/src/api/snapshot-source/index.d.ts +9 -0
- package/src/api/snapshot-source/index.js +9 -0
- package/src/api/system/index.d.ts +1137 -186
- package/src/api/system/index.js +1142 -186
- package/src/api/view/Factory.d.ts +54 -16
- package/src/api/view/Factory.js +54 -16
- package/src/api/view/Instance.d.ts +330 -216
- package/src/api/view/Instance.js +331 -217
- package/src/api/view/index.d.ts +9 -0
- package/src/api/view/index.js +9 -0
- package/src/api/webcontents/main.d.ts +890 -0
- package/src/api/webcontents/main.js +890 -0
- package/src/api/window/Factory.d.ts +67 -16
- package/src/api/window/Factory.js +67 -16
- package/src/api/window/Instance.d.ts +824 -316
- package/src/api/window/Instance.js +822 -320
- package/src/api/window/index.d.ts +11 -0
- package/src/api/window/index.js +11 -0
- package/src/namespaces.d.ts +1 -0
- package/src/namespaces.js +3 -1
- package/src/shapes/protocol.d.ts +4 -0
- package/openfin-core-33.76.31.tgz +0 -0
|
Binary file
|
package/package.json
CHANGED
package/src/OpenFin.d.ts
CHANGED
|
@@ -23,13 +23,19 @@ export type { PlatformProvider };
|
|
|
23
23
|
export type ApplicationIdentity = {
|
|
24
24
|
uuid: string;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for a window, view or iframe.
|
|
28
|
+
*
|
|
29
|
+
* @remarks The `uuid` property refers the application that owns the entity, not to the entity itself.
|
|
30
|
+
* The `name` property identifies the entity itself, and must be unique within the application.
|
|
31
|
+
*/
|
|
26
32
|
export type Identity = {
|
|
27
33
|
/**
|
|
28
|
-
* Universally unique identifier of the
|
|
34
|
+
* Universally unique identifier of the application that owns the component.
|
|
29
35
|
*/
|
|
30
36
|
uuid: string;
|
|
31
37
|
/**
|
|
32
|
-
* The name of the component
|
|
38
|
+
* The name of the component. Must be unique within the owning application.
|
|
33
39
|
*/
|
|
34
40
|
name: string;
|
|
35
41
|
};
|
|
@@ -81,6 +87,8 @@ export type WindowBounds = Bounds & {
|
|
|
81
87
|
};
|
|
82
88
|
/**
|
|
83
89
|
* A rectangular area on the screen.
|
|
90
|
+
*
|
|
91
|
+
* @remarks Origin is top-left. All numbers are in pixels.
|
|
84
92
|
*/
|
|
85
93
|
export type Rectangle = {
|
|
86
94
|
/**
|
|
@@ -101,18 +109,18 @@ export type Rectangle = {
|
|
|
101
109
|
height: number;
|
|
102
110
|
};
|
|
103
111
|
/**
|
|
104
|
-
* The options object required by {@link Application.start Application.start}.
|
|
112
|
+
* The options object required by {@link Application.ApplicationModule.start Application.start}.
|
|
105
113
|
*
|
|
106
114
|
* The following options are required:
|
|
107
|
-
* * `uuid` is required in the app manifest as well as by {@link Application.start Application.start}
|
|
108
|
-
* * `name` is optional in the app manifest but required by {@link Application.start Application.start}
|
|
109
|
-
* * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given
|
|
115
|
+
* * `uuid` is required in the app manifest as well as by {@link Application.ApplicationModule.start Application.start}
|
|
116
|
+
* * `name` is optional in the app manifest but required by {@link Application.ApplicationModule.start Application.start}
|
|
117
|
+
* * `url` is optional in both the app manifest {@link Application.ApplicationModule.start Application.start} and but is usually given
|
|
110
118
|
* (defaults to `"about:blank"` when omitted).
|
|
111
119
|
*
|
|
112
120
|
* _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._
|
|
113
121
|
*
|
|
114
122
|
* **IMPORTANT NOTE:**
|
|
115
|
-
* This object inherits all the properties of the window creation {@link
|
|
123
|
+
* This object inherits all the properties of the window creation {@link OpenFin.WindowCreationOptions options} object,
|
|
116
124
|
* which will take priority over those of the same name that may be provided in `mainWindowOptions`.
|
|
117
125
|
*/
|
|
118
126
|
export type ApplicationCreationOptions = Partial<ApplicationOptions> & {
|
|
@@ -222,7 +230,7 @@ export type InteropBrokerOptions = {
|
|
|
222
230
|
};
|
|
223
231
|
export type ContextGroupInfo = {
|
|
224
232
|
/**
|
|
225
|
-
*
|
|
233
|
+
* Unique identifier of the context group.
|
|
226
234
|
*/
|
|
227
235
|
id: string;
|
|
228
236
|
/**
|
|
@@ -381,7 +389,7 @@ export type TaskBar = DipScaleRects & {
|
|
|
381
389
|
rect: RectangleByEdgePositions;
|
|
382
390
|
};
|
|
383
391
|
/**
|
|
384
|
-
* Options required to create a new window with {@link Window.create Window.create}.
|
|
392
|
+
* Options required to create a new window with {@link Window._WindowModule.create Window.create}.
|
|
385
393
|
*
|
|
386
394
|
* Note that `name` is the only required property — albeit the `url` property is usually provided as well
|
|
387
395
|
* (defaults to `"about:blank"` when omitted).
|
|
@@ -598,7 +606,7 @@ export type ConstWindowOptions = {
|
|
|
598
606
|
*/
|
|
599
607
|
state: WindowState;
|
|
600
608
|
/**
|
|
601
|
-
* @
|
|
609
|
+
* @deprecated - use `icon` instead.
|
|
602
610
|
*/
|
|
603
611
|
taskbarIcon: string;
|
|
604
612
|
/**
|
|
@@ -617,7 +625,7 @@ export type ConstWindowOptions = {
|
|
|
617
625
|
*
|
|
618
626
|
* The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
|
|
619
627
|
* If omitted, defaults to the `uuid` of the application spawning the window.
|
|
620
|
-
* If given, must match the `uuid` of the
|
|
628
|
+
* If given, must match the `uuid` of the application spawning the window.
|
|
621
629
|
* In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
|
|
622
630
|
* really no need to provide it.
|
|
623
631
|
*/
|
|
@@ -1116,7 +1124,7 @@ export type ViewInfo = {
|
|
|
1116
1124
|
*/
|
|
1117
1125
|
export type UpdatableViewOptions = Partial<MutableViewOptions>;
|
|
1118
1126
|
/**
|
|
1119
|
-
* The options object required by {@link View.create View.create}.
|
|
1127
|
+
* The options object required by {@link View.ViewModule.create View.create}.
|
|
1120
1128
|
*
|
|
1121
1129
|
* Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
|
|
1122
1130
|
* (defaults to `"about:blank"` when omitted).
|
|
@@ -1486,7 +1494,7 @@ export type PlatformWindowCreationOptions = Partial<WindowCreationOptions> & {
|
|
|
1486
1494
|
};
|
|
1487
1495
|
/**
|
|
1488
1496
|
* Window options apply to all platform windows.
|
|
1489
|
-
* Any {@link
|
|
1497
|
+
* Any {@link OpenFin.WindowCreationOptions Window option} is also a valid Default Window option
|
|
1490
1498
|
* used by default in any window that is created in the current platform's scope.
|
|
1491
1499
|
* Individual window options will override these defaults.
|
|
1492
1500
|
*/
|
|
@@ -1507,7 +1515,7 @@ export type PlatformViewCreationOptions = Partial<ViewOptions>;
|
|
|
1507
1515
|
*/
|
|
1508
1516
|
export type ProcessAffinityStrategy = 'same' | 'different';
|
|
1509
1517
|
/**
|
|
1510
|
-
* The options object required by {@link Platform#start Platform.start}
|
|
1518
|
+
* The options object required by {@link Platform.PlatformModule#start Platform.start}
|
|
1511
1519
|
* Any {@link ApplicationOptions Application option} is also a valid platform option
|
|
1512
1520
|
*/
|
|
1513
1521
|
export type PlatformOptions = ApplicationCreationOptions & {
|
|
@@ -1587,7 +1595,7 @@ export type LayoutContent = Array<LayoutItemConfig | LayoutRow | LayoutColumn |
|
|
|
1587
1595
|
/**
|
|
1588
1596
|
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
|
1589
1597
|
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
|
1590
|
-
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }
|
|
1598
|
+
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
|
|
1591
1599
|
*/
|
|
1592
1600
|
export type LayoutItemConfig = {
|
|
1593
1601
|
/**
|
|
@@ -2121,6 +2129,9 @@ export type AppVersionRuntimeInfo = {
|
|
|
2121
2129
|
healthCheck: boolean | null;
|
|
2122
2130
|
error: string | null;
|
|
2123
2131
|
};
|
|
2132
|
+
/**
|
|
2133
|
+
* The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
|
|
2134
|
+
*/
|
|
2124
2135
|
export type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
|
|
2125
2136
|
export type RvmLaunchOptions = {
|
|
2126
2137
|
/**
|
|
@@ -2568,7 +2579,7 @@ export type DefaultDomainSettingsRule = {
|
|
|
2568
2579
|
downloadSettings: FileDownloadSettings;
|
|
2569
2580
|
};
|
|
2570
2581
|
};
|
|
2571
|
-
export type FileDownloadBehaviorNames = 'prompt' | 'no-prompt'
|
|
2582
|
+
export type FileDownloadBehaviorNames = 'prompt' | 'no-prompt';
|
|
2572
2583
|
export type FileDownloadSettings = {
|
|
2573
2584
|
rules: DownloadRule[];
|
|
2574
2585
|
};
|
|
@@ -1,148 +1,196 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { Base } from '../base';
|
|
3
|
-
/**
|
|
4
|
-
* @PORTED
|
|
5
|
-
* @typedef {object} ApplicationOptions
|
|
6
|
-
* @summary Application creation options.
|
|
7
|
-
* @desc This is the options object required by {@link Application.start Application.start}.
|
|
8
|
-
*
|
|
9
|
-
* The following options are required:
|
|
10
|
-
* * `uuid` is required in the app manifest as well as by {@link Application.start Application.start}
|
|
11
|
-
* * `name` is optional in the app manifest but required by {@link Application.start Application.start}
|
|
12
|
-
* * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given
|
|
13
|
-
* (defaults to `"about:blank"` when omitted).
|
|
14
|
-
*
|
|
15
|
-
* _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._
|
|
16
|
-
*
|
|
17
|
-
* **IMPORTANT NOTE:**
|
|
18
|
-
* This object inherits all the properties of the window creation {@link Window~options options} object,
|
|
19
|
-
* which will take priority over those of the same name that may be provided in `mainWindowOptions`.
|
|
20
|
-
*
|
|
21
|
-
* @property {boolean} [disableIabSecureLogging=false]
|
|
22
|
-
* When set to `true` it will disable IAB secure logging for the app.
|
|
23
|
-
*
|
|
24
|
-
* @property {string} [loadErrorMessage="There was an error loading the application."]
|
|
25
|
-
* An error message to display when the application (launched via manifest) fails to load.
|
|
26
|
-
* A dialog box will be launched with the error message just before the runtime exits.
|
|
27
|
-
* Load fails such as failed DNS resolutions or aborted connections as well as cancellations, _e.g.,_ `window.stop()`,
|
|
28
|
-
* will trigger this dialog.
|
|
29
|
-
* Client response codes such as `404 Not Found` are not treated as fails as they are valid server responses.
|
|
30
|
-
*
|
|
31
|
-
* @property {Window~options} [mainWindowOptions]
|
|
32
|
-
* The options of the main window of the application.
|
|
33
|
-
* For a description of these options, click the link (in the Type column).
|
|
34
|
-
*
|
|
35
|
-
* @property {number} [maxViewPoolSize=1000]
|
|
36
|
-
* Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed.
|
|
37
|
-
* If you do not wish for views to be pooled on your platform, set this property to zero.
|
|
38
|
-
*
|
|
39
|
-
* @property {boolean} [preventQuitOnLastWindowClosed=false]
|
|
40
|
-
* Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed.
|
|
41
|
-
* Note: if the Platform Provider is showing, it won't close automatically.
|
|
42
|
-
* If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.
|
|
43
|
-
*
|
|
44
|
-
* @property {string} [name]
|
|
45
|
-
* The name of the application (and the application's main window).
|
|
46
|
-
*
|
|
47
|
-
* If provided, _must_ match `uuid`.
|
|
48
|
-
*
|
|
49
|
-
* @property {boolean} [nonPersistent=false]
|
|
50
|
-
* A flag to configure the application as non-persistent.
|
|
51
|
-
* Runtime exits when there are no persistent apps running.
|
|
52
|
-
*
|
|
53
|
-
* @property {boolean} [plugins=false]
|
|
54
|
-
* Enable Flash at the application level.
|
|
55
|
-
*
|
|
56
|
-
* @property {boolean} [spellCheck=false]
|
|
57
|
-
* Enable spell check at the application level.
|
|
58
|
-
*
|
|
59
|
-
* @property {string} [url="about:blank"]
|
|
60
|
-
* The url to the application (specifically the application's main window).
|
|
61
|
-
*
|
|
62
|
-
* @property {boolean} [enableJumpList=false]
|
|
63
|
-
* Enables the use of the Jumplists API and the 'pin to taskbar' functionality.
|
|
64
|
-
* Only relevant in Windows.
|
|
65
|
-
*
|
|
66
|
-
* @property {string} uuid
|
|
67
|
-
* The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
|
|
68
|
-
* running in the OpenFin Runtime.
|
|
69
|
-
*
|
|
70
|
-
* Note that `name` and `uuid` must match.
|
|
71
|
-
*
|
|
72
|
-
* @property {boolean} [webSecurity=true]
|
|
73
|
-
* When set to `false` it will disable the same-origin policy for the app.
|
|
74
|
-
*/
|
|
75
|
-
/**
|
|
76
|
-
* @lends Application
|
|
77
|
-
*/
|
|
78
3
|
export default class ApplicationModule extends Base {
|
|
79
4
|
/**
|
|
80
5
|
* Asynchronously returns an Application object that represents an existing application.
|
|
81
|
-
* @param
|
|
82
|
-
*
|
|
83
|
-
* @
|
|
6
|
+
* @param identity
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
*
|
|
10
|
+
* ```js
|
|
11
|
+
* fin.Application.wrap({ uuid: 'testapp' })
|
|
12
|
+
* .then(app => app.isRunning())
|
|
13
|
+
* .then(running => console.log('Application is running: ' + running))
|
|
14
|
+
* .catch(err => console.log(err));
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
84
17
|
* @static
|
|
85
18
|
*/
|
|
86
19
|
wrap(identity: OpenFin.ApplicationIdentity): Promise<OpenFin.Application>;
|
|
87
20
|
/**
|
|
88
21
|
* Synchronously returns an Application object that represents an existing application.
|
|
89
|
-
* @param
|
|
90
|
-
*
|
|
91
|
-
* @
|
|
22
|
+
* @param identity
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* ```js
|
|
27
|
+
* const app = fin.Application.wrapSync({ uuid: 'testapp' });
|
|
28
|
+
* await app.close();
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
92
31
|
* @static
|
|
93
32
|
*/
|
|
94
33
|
wrapSync(identity: OpenFin.ApplicationIdentity): OpenFin.Application;
|
|
95
34
|
private _create;
|
|
96
35
|
/**
|
|
97
|
-
* DEPRECATED method to create a new Application. Use {@link Application.start} instead.
|
|
98
|
-
* @param
|
|
99
|
-
*
|
|
100
|
-
*
|
|
36
|
+
* DEPRECATED method to create a new Application. Use {@link Application.ApplicationModule.start Application.start} instead.
|
|
37
|
+
* @param appOptions
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
*
|
|
42
|
+
* ```js
|
|
43
|
+
* async function createApp() {
|
|
44
|
+
* const app = await fin.Application.create({
|
|
45
|
+
* name: 'myApp',
|
|
46
|
+
* uuid: 'app-3',
|
|
47
|
+
* url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Application.create.html',
|
|
48
|
+
* autoShow: true
|
|
49
|
+
* });
|
|
50
|
+
* await app.run();
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* createApp().then(() => console.log('Application is created')).catch(err => console.log(err));
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
101
56
|
* @ignore
|
|
102
57
|
*/
|
|
103
58
|
create(appOptions: OpenFin.ApplicationCreationOptions): Promise<OpenFin.Application>;
|
|
104
59
|
/**
|
|
105
60
|
* Creates and starts a new Application.
|
|
106
|
-
* @param
|
|
107
|
-
*
|
|
108
|
-
* @
|
|
61
|
+
* @param appOptions
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* ```js
|
|
66
|
+
* async function start() {
|
|
67
|
+
* return fin.Application.start({
|
|
68
|
+
* name: 'app-1',
|
|
69
|
+
* uuid: 'app-1',
|
|
70
|
+
* url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Application.start.html',
|
|
71
|
+
* autoShow: true
|
|
72
|
+
* });
|
|
73
|
+
* }
|
|
74
|
+
* start().then(() => console.log('Application is running')).catch(err => console.log(err));
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
*
|
|
109
78
|
* @static
|
|
110
79
|
*/
|
|
111
80
|
start(appOptions: OpenFin.ApplicationCreationOptions): Promise<OpenFin.Application>;
|
|
112
81
|
/**
|
|
113
82
|
* Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls.
|
|
114
83
|
* Returns once the RVM is finished attempting to launch the applications.
|
|
115
|
-
* @param
|
|
116
|
-
* @param
|
|
117
|
-
*
|
|
84
|
+
* @param applications
|
|
85
|
+
* @param opts - Parameters that the RVM will use.
|
|
86
|
+
*
|
|
118
87
|
* @static
|
|
119
|
-
* @
|
|
88
|
+
* @example
|
|
89
|
+
*
|
|
90
|
+
* ```js
|
|
91
|
+
*
|
|
92
|
+
* const applicationInfoArray = [
|
|
93
|
+
* {
|
|
94
|
+
* "uuid": 'App-1',
|
|
95
|
+
* "manifestUrl": 'http://localhost:5555/app1.json',
|
|
96
|
+
* },
|
|
97
|
+
* {
|
|
98
|
+
* "uuid": 'App-2',
|
|
99
|
+
* "manifestUrl": 'http://localhost:5555/app2.json',
|
|
100
|
+
* },
|
|
101
|
+
* {
|
|
102
|
+
* "uuid": 'App-3',
|
|
103
|
+
* "manifestUrl": 'http://localhost:5555/app3.json',
|
|
104
|
+
* }
|
|
105
|
+
* ]
|
|
106
|
+
*
|
|
107
|
+
* fin.Application.startManyManifests(applicationInfoArray)
|
|
108
|
+
* .then(() => {
|
|
109
|
+
* console.log('RVM has finished launching the application list.');
|
|
110
|
+
* })
|
|
111
|
+
* .catch((err) => {
|
|
112
|
+
* console.log(err);
|
|
113
|
+
* })
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
120
116
|
* @experimental
|
|
121
117
|
*/
|
|
122
118
|
startManyManifests(applications: Array<OpenFin.ManifestInfo>, opts?: OpenFin.RvmLaunchOptions): Promise<void>;
|
|
123
119
|
/**
|
|
124
120
|
* Asynchronously returns an Application object that represents the current application
|
|
125
|
-
*
|
|
126
|
-
* @
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
*
|
|
124
|
+
* ```js
|
|
125
|
+
* async function isCurrentAppRunning () {
|
|
126
|
+
* const app = await fin.Application.getCurrent();
|
|
127
|
+
* return app.isRunning();
|
|
128
|
+
* }
|
|
129
|
+
*
|
|
130
|
+
* isCurrentAppRunning().then(running => {
|
|
131
|
+
* console.log(`Current app is running: ${running}`);
|
|
132
|
+
* }).catch(err => {
|
|
133
|
+
* console.error(err);
|
|
134
|
+
* });
|
|
135
|
+
*
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
127
138
|
* @static
|
|
128
139
|
*/
|
|
129
140
|
getCurrent(): Promise<OpenFin.Application>;
|
|
130
141
|
/**
|
|
131
142
|
* Synchronously returns an Application object that represents the current application
|
|
132
|
-
*
|
|
133
|
-
* @
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
*
|
|
146
|
+
* ```js
|
|
147
|
+
* async function isCurrentAppRunning () {
|
|
148
|
+
* const app = fin.Application.getCurrentSync();
|
|
149
|
+
* return app.isRunning();
|
|
150
|
+
* }
|
|
151
|
+
*
|
|
152
|
+
* isCurrentAppRunning().then(running => {
|
|
153
|
+
* console.log(`Current app is running: ${running}`);
|
|
154
|
+
* }).catch(err => {
|
|
155
|
+
* console.error(err);
|
|
156
|
+
* });
|
|
157
|
+
*
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
134
160
|
* @static
|
|
135
161
|
*/
|
|
136
162
|
getCurrentSync(): OpenFin.Application;
|
|
137
163
|
/**
|
|
138
164
|
* Retrieves application's manifest and returns a running instance of the application.
|
|
139
|
-
* @param
|
|
140
|
-
* @param
|
|
141
|
-
*
|
|
142
|
-
* @
|
|
165
|
+
* @param manifestUrl - The URL of app's manifest.
|
|
166
|
+
* @param opts - Parameters that the RVM will use.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
*
|
|
170
|
+
* ```js
|
|
171
|
+
* fin.Application.startFromManifest('http://localhost:5555/app.json').then(app => console.log('App is running')).catch(err => console.log(err));
|
|
172
|
+
*
|
|
173
|
+
* // For a local manifest file:
|
|
174
|
+
* fin.Application.startFromManifest('file:///C:/somefolder/app.json').then(app => console.log('App is running')).catch(err => console.log(err));
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
143
177
|
* @static
|
|
144
178
|
*/
|
|
145
179
|
startFromManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise<OpenFin.Application>;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated Use {@link Application.ApplicationModule.startFromManifest Application.startFromManifest} instead.
|
|
182
|
+
* Retrieves application's manifest and returns a wrapped application.
|
|
183
|
+
* @param manifestUrl - The URL of app's manifest.
|
|
184
|
+
* @param callback - called if the method succeeds.
|
|
185
|
+
* @param errorCallback - called if the method fails. The reason for failure is passed as an argument.
|
|
186
|
+
*
|
|
187
|
+
* @example
|
|
188
|
+
*
|
|
189
|
+
* ```js
|
|
190
|
+
* fin.Application.createFromManifest('http://localhost:5555/app.json').then(app => console.log(app)).catch(err => console.log(err));
|
|
191
|
+
* ```
|
|
192
|
+
* @ignore
|
|
193
|
+
*/
|
|
146
194
|
createFromManifest(manifestUrl: string): Promise<OpenFin.Application>;
|
|
147
195
|
private _createFromManifest;
|
|
148
196
|
}
|