@openfin/core 25.68.30 → 25.70.2
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.d.ts +30 -826
- package/README.md +12 -2
- package/package.json +1 -1
- package/src/api/application/Factory.d.ts +145 -145
- package/src/api/application/Factory.js +229 -229
- package/src/api/application/Instance.d.ts +301 -302
- package/src/api/application/Instance.js +412 -412
- package/src/api/application/index.d.ts +3 -3
- package/src/api/application/index.js +15 -15
- package/src/api/base.d.ts +43 -43
- package/src/api/base.js +177 -177
- package/src/api/clipboard/index.d.ts +69 -69
- package/src/api/clipboard/index.js +88 -88
- package/src/api/events/application.d.ts +69 -0
- package/src/api/events/application.js +2 -0
- package/src/api/events/base.d.ts +17 -0
- package/src/api/events/base.js +2 -0
- package/src/api/events/channel.d.ts +10 -11
- package/src/api/events/channel.js +2 -2
- package/src/api/events/emitterMap.d.ts +11 -11
- package/src/api/events/emitterMap.js +35 -35
- package/src/api/events/eventAggregator.d.ts +5 -5
- package/src/api/events/eventAggregator.js +43 -43
- package/src/api/events/externalApplication.d.ts +5 -0
- package/src/api/events/externalApplication.js +2 -0
- package/src/api/events/frame.d.ts +9 -0
- package/src/api/events/frame.js +2 -0
- package/src/api/events/globalHotkey.d.ts +10 -0
- package/src/api/events/globalHotkey.js +2 -0
- package/src/api/events/platform.d.ts +18 -0
- package/src/api/events/platform.js +2 -0
- package/src/api/events/system.d.ts +22 -0
- package/src/api/events/system.js +2 -0
- package/src/api/events/view.d.ts +56 -0
- package/src/api/events/view.js +2 -0
- package/src/api/events/webcontents.d.ts +48 -0
- package/src/api/events/webcontents.js +2 -0
- package/src/api/events/window.d.ts +176 -0
- package/src/api/events/window.js +2 -0
- package/src/api/external-application/Factory.d.ts +26 -26
- package/src/api/external-application/Factory.js +40 -40
- package/src/api/external-application/Instance.d.ts +101 -102
- package/src/api/external-application/Instance.js +109 -109
- package/src/api/external-application/index.d.ts +3 -3
- package/src/api/external-application/index.js +15 -15
- package/src/api/fin.d.ts +49 -49
- package/src/api/fin.js +43 -43
- package/src/api/frame/Factory.d.ts +36 -36
- package/src/api/frame/Factory.js +69 -69
- package/src/api/frame/Instance.d.ts +121 -121
- package/src/api/frame/Instance.js +130 -130
- package/src/api/frame/index.d.ts +3 -3
- package/src/api/frame/index.js +15 -15
- package/src/api/global-hotkey/index.d.ts +38 -38
- package/src/api/global-hotkey/index.js +58 -58
- package/src/api/interappbus/channel/channel.d.ts +26 -26
- package/src/api/interappbus/channel/channel.js +77 -77
- package/src/api/interappbus/channel/channels-docs.d.ts +318 -318
- package/src/api/interappbus/channel/channels-docs.js +376 -376
- package/src/api/interappbus/channel/client.d.ts +22 -22
- package/src/api/interappbus/channel/client.js +84 -84
- package/src/api/interappbus/channel/connection-manager.d.ts +28 -28
- package/src/api/interappbus/channel/connection-manager.js +244 -244
- package/src/api/interappbus/channel/index.d.ts +22 -23
- package/src/api/interappbus/channel/index.js +121 -121
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -22
- package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -84
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +44 -44
- package/src/api/interappbus/channel/protocols/index.js +2 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -23
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -135
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -131
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -22
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -87
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +2 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -15
- package/src/api/interappbus/channel/protocols/strategy.js +2 -2
- package/src/api/interappbus/channel/provider.d.ts +31 -31
- package/src/api/interappbus/channel/provider.js +160 -160
- package/src/api/interappbus/index.d.ts +85 -86
- package/src/api/interappbus/index.js +175 -175
- package/src/api/interop/Factory.d.ts +37 -37
- package/src/api/interop/Factory.js +54 -54
- package/src/api/interop/InteropBroker.d.ts +363 -363
- package/src/api/interop/InteropBroker.js +914 -914
- package/src/api/interop/InteropClient.d.ts +268 -268
- package/src/api/interop/InteropClient.js +450 -450
- package/src/api/interop/SessionContextGroupBroker.d.ts +26 -26
- package/src/api/interop/SessionContextGroupBroker.js +107 -107
- package/src/api/interop/SessionContextGroupClient.d.ts +20 -20
- package/src/api/interop/SessionContextGroupClient.js +85 -85
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -187
- package/src/api/interop/fdc3/fdc3-1.2.js +385 -385
- package/src/api/interop/fdc3/fdc3.js +17 -17
- package/src/api/interop/fdc3/utils.d.ts +6 -6
- package/src/api/interop/fdc3/utils.js +17 -17
- package/src/api/interop/index.d.ts +4 -4
- package/src/api/interop/index.js +16 -16
- package/src/api/interop/utils.d.ts +11 -11
- package/src/api/interop/utils.js +36 -36
- package/src/api/me.d.ts +38 -35
- package/src/api/me.js +128 -60
- package/src/api/platform/Factory.d.ts +109 -109
- package/src/api/platform/Factory.js +188 -188
- package/src/api/platform/Instance.d.ts +122 -122
- package/src/api/platform/Instance.js +298 -298
- package/src/api/platform/common-utils.d.ts +6 -6
- package/src/api/platform/common-utils.js +16 -16
- package/src/api/platform/index.d.ts +3 -3
- package/src/api/platform/index.js +15 -15
- package/src/api/platform/layout/Factory.d.ts +108 -108
- package/src/api/platform/layout/Factory.js +189 -189
- package/src/api/platform/layout/Instance.d.ts +49 -49
- package/src/api/platform/layout/Instance.js +99 -99
- package/src/api/platform/layout/index.d.ts +2 -2
- package/src/api/platform/layout/index.js +14 -14
- package/src/api/platform/layout/shapes.d.ts +11 -0
- package/src/api/{window → platform/layout}/shapes.js +2 -2
- package/src/api/snapshot-source/Factory.d.ts +36 -36
- package/src/api/snapshot-source/Factory.js +65 -65
- package/src/api/snapshot-source/Instance.d.ts +30 -30
- package/src/api/snapshot-source/Instance.js +134 -134
- package/src/api/snapshot-source/index.d.ts +3 -3
- package/src/api/snapshot-source/index.js +15 -15
- package/src/api/snapshot-source/utils.d.ts +1 -1
- package/src/api/snapshot-source/utils.js +5 -5
- package/src/api/system/index.d.ts +960 -961
- package/src/api/system/index.js +1241 -1241
- package/src/api/view/Factory.d.ts +49 -49
- package/src/api/view/Factory.js +103 -103
- package/src/api/view/Instance.d.ts +387 -380
- package/src/api/view/Instance.js +422 -415
- package/src/api/view/index.d.ts +3 -3
- package/src/api/view/index.js +15 -15
- package/src/api/webcontents/main.d.ts +36 -36
- package/src/api/webcontents/main.js +82 -82
- package/src/api/window/Factory.d.ts +44 -44
- package/src/api/window/Factory.js +91 -91
- package/src/api/window/Instance.d.ts +972 -966
- package/src/api/window/Instance.js +1209 -1202
- package/src/api/window/index.d.ts +3 -5
- package/src/api/window/index.js +15 -17
- package/src/environment/environment.d.ts +28 -25
- package/src/environment/environment.js +4 -4
- package/src/environment/node-env.d.ts +25 -26
- package/src/environment/node-env.js +64 -64
- package/src/environment/openfin-env.d.ts +29 -30
- package/src/environment/openfin-env.js +107 -107
- package/src/mock.d.ts +3 -3
- package/src/mock.js +91 -90
- package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -0
- package/src/shapes/ERROR_BOX_TYPES.js +2 -0
- package/src/shapes/WebOptions.d.ts +12 -0
- package/src/shapes/WebOptions.js +2 -0
- package/src/shapes/WindowOptions.d.ts +42 -0
- package/src/shapes/WindowOptions.js +2 -0
- package/src/shapes/protocol.d.ts +178 -0
- package/src/shapes/protocol.js +2 -0
- package/src/transport/fin_store.d.ts +4 -4
- package/src/transport/fin_store.js +16 -16
- package/src/transport/transport-errors.d.ts +18 -18
- package/src/transport/transport-errors.js +37 -37
- package/src/transport/transport.d.ts +56 -43
- package/src/transport/transport.js +181 -181
- package/src/transport/wire.d.ts +71 -11
- package/src/transport/wire.js +32 -32
- package/src/util/asyncFilter.d.ts +1 -1
- package/src/util/asyncFilter.js +7 -7
- package/src/util/errors.d.ts +9 -5
- package/src/util/errors.js +11 -11
- package/src/util/exhaustive.d.ts +1 -1
- package/src/util/exhaustive.js +7 -7
- package/src/util/http.d.ts +11 -11
- package/src/util/http.js +83 -83
- package/src/util/normalize-config.d.ts +3 -5
- package/src/util/normalize-config.js +47 -47
- package/src/util/promises.d.ts +5 -5
- package/src/util/promises.js +27 -27
- package/src/util/ref-counter.d.ts +7 -7
- package/src/util/ref-counter.js +51 -51
- package/src/util/runtimeVersioning.d.ts +3 -3
- package/src/util/runtimeVersioning.js +25 -25
- package/src/util/utilTypes.d.ts +8 -8
- package/src/util/utilTypes.js +2 -2
- package/src/util/validate.d.ts +3 -3
- package/src/util/validate.js +11 -11
- package/docs.README(OLD).md +0 -82
- package/resources/win/OpenFinRVM.exe +0 -0
- package/src/api/window/bounds-changed.d.ts +0 -10
- package/src/api/window/bounds-changed.js +0 -6
- package/src/api/window/shapes.d.ts +0 -13
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
import { Base } from '../base';
|
|
2
|
-
import { Channel } from '../interappbus/channel/index';
|
|
3
|
-
import Transport from '../../transport/transport';
|
|
4
|
-
import { LayoutModule } from './layout/index';
|
|
5
|
-
/**
|
|
6
|
-
* InitPlatformOptions interface
|
|
7
|
-
* @typedef { object } InitPlatformOptions
|
|
8
|
-
* @property { OverrideCallback } [overrideCallback] a callback function that can be used to extend or replace default Provider behavior.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* @typedef { same | different } ProcessAffinityStrategy
|
|
12
|
-
* @summary Strategy to place views that share a domain into different process affinities or the same process affinity.
|
|
13
|
-
* @property { string } same views in the same domain will have the same process affinity.
|
|
14
|
-
* @property { string } different views in the same domain will have different process affinities.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* @typedef { object } PlatformOptions
|
|
18
|
-
* @summary The options object required by {@link Platform#start Platform.start}
|
|
19
|
-
* Any {@link
|
|
20
|
-
* @property {Array.<Object>} [commands] Configuration for keyboard commands.
|
|
21
|
-
* For details and usage, see [Using Keyboard Commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}.
|
|
22
|
-
* @property {DefaultWindowOptions} [defaultWindowOptions] Default window options apply to all platform windows.
|
|
23
|
-
* @property {View~options} [defaultViewOptions] Default view options apply to all platform views.
|
|
24
|
-
* @property {ProcessAffinityStrategy} [viewProcessAffinityStrategy] 'same' | 'different'.
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* @typedef { object } DefaultWindowOptions
|
|
28
|
-
* @summary Default window options apply to all platform windows.
|
|
29
|
-
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
30
|
-
* used by default in any window that is created in the current platform's scope.
|
|
31
|
-
* Individual window options will override these defaults.
|
|
32
|
-
* @property {string} [stylesheetUrl]
|
|
33
|
-
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
34
|
-
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
35
|
-
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
36
|
-
*/
|
|
37
|
-
/**
|
|
38
|
-
* Snapshot interface
|
|
39
|
-
* @typedef { object } Snapshot
|
|
40
|
-
* @property { WindowOption[] } windows The array of window options objects
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* @lends Platform
|
|
44
|
-
*/
|
|
45
|
-
export default class PlatformModule extends Base {
|
|
46
|
-
private _channel;
|
|
47
|
-
Layout: LayoutModule;
|
|
48
|
-
private _initializer;
|
|
49
|
-
constructor(wire: Transport, channel: Channel);
|
|
50
|
-
/**
|
|
51
|
-
* Initializes a Platform. Must be called from the Provider when using a custom provider.
|
|
52
|
-
* @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace
|
|
53
|
-
* default Provider behavior.
|
|
54
|
-
* @return {Promise.<void>}
|
|
55
|
-
* @tutorial Platform.init
|
|
56
|
-
* @experimental
|
|
57
|
-
* @static
|
|
58
|
-
*/
|
|
59
|
-
init(options?: OpenFin.InitPlatformOptions): Promise<void>;
|
|
60
|
-
/**
|
|
61
|
-
* Asynchronously returns a Platform object that represents an existing platform.
|
|
62
|
-
* @param { Identity } identity
|
|
63
|
-
* @return {Promise.<Platform>}
|
|
64
|
-
* @tutorial Platform.wrap
|
|
65
|
-
* @static
|
|
66
|
-
*/
|
|
67
|
-
wrap(identity: OpenFin.ApplicationIdentity): Promise<OpenFin.Platform>;
|
|
68
|
-
/**
|
|
69
|
-
* Synchronously returns a Platform object that represents an existing platform.
|
|
70
|
-
* @param { Identity } identity
|
|
71
|
-
* @return {Platform}
|
|
72
|
-
* @tutorial Platform.wrapSync
|
|
73
|
-
* @static
|
|
74
|
-
*/
|
|
75
|
-
wrapSync(identity: OpenFin.ApplicationIdentity): OpenFin.Platform;
|
|
76
|
-
/**
|
|
77
|
-
* Asynchronously returns a Platform object that represents the current platform.
|
|
78
|
-
* @return {Promise.<Platform>}
|
|
79
|
-
* @tutorial Platform.getCurrent
|
|
80
|
-
* @static
|
|
81
|
-
*/
|
|
82
|
-
getCurrent(): Promise<OpenFin.Platform>;
|
|
83
|
-
/**
|
|
84
|
-
* Synchronously returns a Platform object that represents the current platform.
|
|
85
|
-
* @return {Platform}
|
|
86
|
-
* @tutorial Platform.getCurrentSync
|
|
87
|
-
* @static
|
|
88
|
-
*/
|
|
89
|
-
getCurrentSync(): OpenFin.Platform;
|
|
90
|
-
/**
|
|
91
|
-
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
|
92
|
-
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
|
93
|
-
* @param { PlatformOptions } platformOptions
|
|
94
|
-
* @return {Promise.<Platform>}
|
|
95
|
-
* @tutorial Platform.start
|
|
96
|
-
* @static
|
|
97
|
-
*/
|
|
98
|
-
start(platformOptions: OpenFin.PlatformOptions): Promise<OpenFin.Platform>;
|
|
99
|
-
/**
|
|
100
|
-
* Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
|
|
101
|
-
* it will be launched into the platform.
|
|
102
|
-
* @param {string} manifestUrl - The URL of platform's manifest.
|
|
103
|
-
* @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
|
|
104
|
-
* @return {Promise.<Platform>}
|
|
105
|
-
* @tutorial Platform.startFromManifest
|
|
106
|
-
* @static
|
|
107
|
-
*/
|
|
108
|
-
startFromManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise<OpenFin.Platform>;
|
|
109
|
-
}
|
|
1
|
+
import { Base } from '../base';
|
|
2
|
+
import { Channel } from '../interappbus/channel/index';
|
|
3
|
+
import Transport from '../../transport/transport';
|
|
4
|
+
import { LayoutModule } from './layout/index';
|
|
5
|
+
/**
|
|
6
|
+
* InitPlatformOptions interface
|
|
7
|
+
* @typedef { object } InitPlatformOptions
|
|
8
|
+
* @property { OverrideCallback } [overrideCallback] a callback function that can be used to extend or replace default Provider behavior.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* @typedef { same | different } ProcessAffinityStrategy
|
|
12
|
+
* @summary Strategy to place views that share a domain into different process affinities or the same process affinity.
|
|
13
|
+
* @property { string } same views in the same domain will have the same process affinity.
|
|
14
|
+
* @property { string } different views in the same domain will have different process affinities.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* @typedef { object } PlatformOptions
|
|
18
|
+
* @summary The options object required by {@link Platform#start Platform.start}
|
|
19
|
+
* Any {@link ApplicationOptions Application option} is also a valid platform option
|
|
20
|
+
* @property {Array.<Object>} [commands] Configuration for keyboard commands.
|
|
21
|
+
* For details and usage, see [Using Keyboard Commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}.
|
|
22
|
+
* @property {DefaultWindowOptions} [defaultWindowOptions] Default window options apply to all platform windows.
|
|
23
|
+
* @property {View~options} [defaultViewOptions] Default view options apply to all platform views.
|
|
24
|
+
* @property {ProcessAffinityStrategy} [viewProcessAffinityStrategy] 'same' | 'different'.
|
|
25
|
+
*/
|
|
26
|
+
/**
|
|
27
|
+
* @typedef { object } DefaultWindowOptions
|
|
28
|
+
* @summary Default window options apply to all platform windows.
|
|
29
|
+
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
30
|
+
* used by default in any window that is created in the current platform's scope.
|
|
31
|
+
* Individual window options will override these defaults.
|
|
32
|
+
* @property {string} [stylesheetUrl]
|
|
33
|
+
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
34
|
+
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
35
|
+
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* Snapshot interface
|
|
39
|
+
* @typedef { object } Snapshot
|
|
40
|
+
* @property { WindowOption[] } windows The array of window options objects
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* @lends Platform
|
|
44
|
+
*/
|
|
45
|
+
export default class PlatformModule extends Base {
|
|
46
|
+
private _channel;
|
|
47
|
+
Layout: LayoutModule;
|
|
48
|
+
private _initializer;
|
|
49
|
+
constructor(wire: Transport, channel: Channel);
|
|
50
|
+
/**
|
|
51
|
+
* Initializes a Platform. Must be called from the Provider when using a custom provider.
|
|
52
|
+
* @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace
|
|
53
|
+
* default Provider behavior.
|
|
54
|
+
* @return {Promise.<void>}
|
|
55
|
+
* @tutorial Platform.init
|
|
56
|
+
* @experimental
|
|
57
|
+
* @static
|
|
58
|
+
*/
|
|
59
|
+
init(options?: OpenFin.InitPlatformOptions): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Asynchronously returns a Platform object that represents an existing platform.
|
|
62
|
+
* @param { Identity } identity
|
|
63
|
+
* @return {Promise.<Platform>}
|
|
64
|
+
* @tutorial Platform.wrap
|
|
65
|
+
* @static
|
|
66
|
+
*/
|
|
67
|
+
wrap(identity: OpenFin.ApplicationIdentity): Promise<OpenFin.Platform>;
|
|
68
|
+
/**
|
|
69
|
+
* Synchronously returns a Platform object that represents an existing platform.
|
|
70
|
+
* @param { Identity } identity
|
|
71
|
+
* @return {Platform}
|
|
72
|
+
* @tutorial Platform.wrapSync
|
|
73
|
+
* @static
|
|
74
|
+
*/
|
|
75
|
+
wrapSync(identity: OpenFin.ApplicationIdentity): OpenFin.Platform;
|
|
76
|
+
/**
|
|
77
|
+
* Asynchronously returns a Platform object that represents the current platform.
|
|
78
|
+
* @return {Promise.<Platform>}
|
|
79
|
+
* @tutorial Platform.getCurrent
|
|
80
|
+
* @static
|
|
81
|
+
*/
|
|
82
|
+
getCurrent(): Promise<OpenFin.Platform>;
|
|
83
|
+
/**
|
|
84
|
+
* Synchronously returns a Platform object that represents the current platform.
|
|
85
|
+
* @return {Platform}
|
|
86
|
+
* @tutorial Platform.getCurrentSync
|
|
87
|
+
* @static
|
|
88
|
+
*/
|
|
89
|
+
getCurrentSync(): OpenFin.Platform;
|
|
90
|
+
/**
|
|
91
|
+
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
|
92
|
+
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
|
93
|
+
* @param { PlatformOptions } platformOptions
|
|
94
|
+
* @return {Promise.<Platform>}
|
|
95
|
+
* @tutorial Platform.start
|
|
96
|
+
* @static
|
|
97
|
+
*/
|
|
98
|
+
start(platformOptions: OpenFin.PlatformOptions): Promise<OpenFin.Platform>;
|
|
99
|
+
/**
|
|
100
|
+
* Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
|
|
101
|
+
* it will be launched into the platform.
|
|
102
|
+
* @param {string} manifestUrl - The URL of platform's manifest.
|
|
103
|
+
* @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
|
|
104
|
+
* @return {Promise.<Platform>}
|
|
105
|
+
* @tutorial Platform.startFromManifest
|
|
106
|
+
* @static
|
|
107
|
+
*/
|
|
108
|
+
startFromManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise<OpenFin.Platform>;
|
|
109
|
+
}
|
|
@@ -1,188 +1,188 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/* eslint-disable no-undef, no-underscore-dangle */
|
|
4
|
-
const base_1 = require("../base");
|
|
5
|
-
const index_1 = require("./layout/index");
|
|
6
|
-
const Instance_1 = require("./Instance");
|
|
7
|
-
/**
|
|
8
|
-
* InitPlatformOptions interface
|
|
9
|
-
* @typedef { object } InitPlatformOptions
|
|
10
|
-
* @property { OverrideCallback } [overrideCallback] a callback function that can be used to extend or replace default Provider behavior.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
* @typedef { same | different } ProcessAffinityStrategy
|
|
14
|
-
* @summary Strategy to place views that share a domain into different process affinities or the same process affinity.
|
|
15
|
-
* @property { string } same views in the same domain will have the same process affinity.
|
|
16
|
-
* @property { string } different views in the same domain will have different process affinities.
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* @typedef { object } PlatformOptions
|
|
20
|
-
* @summary The options object required by {@link Platform#start Platform.start}
|
|
21
|
-
* Any {@link
|
|
22
|
-
* @property {Array.<Object>} [commands] Configuration for keyboard commands.
|
|
23
|
-
* For details and usage, see [Using Keyboard Commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}.
|
|
24
|
-
* @property {DefaultWindowOptions} [defaultWindowOptions] Default window options apply to all platform windows.
|
|
25
|
-
* @property {View~options} [defaultViewOptions] Default view options apply to all platform views.
|
|
26
|
-
* @property {ProcessAffinityStrategy} [viewProcessAffinityStrategy] 'same' | 'different'.
|
|
27
|
-
*/
|
|
28
|
-
/**
|
|
29
|
-
* @typedef { object } DefaultWindowOptions
|
|
30
|
-
* @summary Default window options apply to all platform windows.
|
|
31
|
-
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
32
|
-
* used by default in any window that is created in the current platform's scope.
|
|
33
|
-
* Individual window options will override these defaults.
|
|
34
|
-
* @property {string} [stylesheetUrl]
|
|
35
|
-
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
36
|
-
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
37
|
-
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
38
|
-
*/
|
|
39
|
-
/**
|
|
40
|
-
* Snapshot interface
|
|
41
|
-
* @typedef { object } Snapshot
|
|
42
|
-
* @property { WindowOption[] } windows The array of window options objects
|
|
43
|
-
*/
|
|
44
|
-
/**
|
|
45
|
-
* @lends Platform
|
|
46
|
-
*/
|
|
47
|
-
class PlatformModule extends base_1.Base {
|
|
48
|
-
constructor(wire, channel) {
|
|
49
|
-
super(wire);
|
|
50
|
-
this._channel = channel;
|
|
51
|
-
this._initializer = (...args) => this.wire.environment
|
|
52
|
-
.getProviderInitializer()
|
|
53
|
-
.then((initConstructor) => initConstructor(this.wire.environment)(...args));
|
|
54
|
-
/**
|
|
55
|
-
* @namespace
|
|
56
|
-
* @desc Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
|
57
|
-
* enables the initialization and manipulation of a window's Layout. A Layout will
|
|
58
|
-
* <a href="tutorial-Layout.DOMEvents.html">emit events locally</a> on the DOM element representing the layout-container.
|
|
59
|
-
*/
|
|
60
|
-
this.Layout = new index_1.LayoutModule(this.wire);
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Initializes a Platform. Must be called from the Provider when using a custom provider.
|
|
64
|
-
* @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace
|
|
65
|
-
* default Provider behavior.
|
|
66
|
-
* @return {Promise.<void>}
|
|
67
|
-
* @tutorial Platform.init
|
|
68
|
-
* @experimental
|
|
69
|
-
* @static
|
|
70
|
-
*/
|
|
71
|
-
async init(options) {
|
|
72
|
-
const overrideCallback = options === null || options === void 0 ? void 0 : options.overrideCallback;
|
|
73
|
-
const interopBroker = await this.fin.Interop.init(this.fin.me.uuid, options === null || options === void 0 ? void 0 : options.interopOverride);
|
|
74
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
75
|
-
// @ts-ignore debugging purposes
|
|
76
|
-
window.interopBroker = interopBroker;
|
|
77
|
-
return this._initializer(overrideCallback, interopBroker);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Asynchronously returns a Platform object that represents an existing platform.
|
|
81
|
-
* @param { Identity } identity
|
|
82
|
-
* @return {Promise.<Platform>}
|
|
83
|
-
* @tutorial Platform.wrap
|
|
84
|
-
* @static
|
|
85
|
-
*/
|
|
86
|
-
async wrap(identity) {
|
|
87
|
-
this.wire.sendAction('platform-wrap').catch((e) => {
|
|
88
|
-
// don't expose
|
|
89
|
-
});
|
|
90
|
-
return new Instance_1.Platform({ uuid: identity.uuid }, this._channel);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Synchronously returns a Platform object that represents an existing platform.
|
|
94
|
-
* @param { Identity } identity
|
|
95
|
-
* @return {Platform}
|
|
96
|
-
* @tutorial Platform.wrapSync
|
|
97
|
-
* @static
|
|
98
|
-
*/
|
|
99
|
-
wrapSync(identity) {
|
|
100
|
-
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
|
101
|
-
// don't expose
|
|
102
|
-
});
|
|
103
|
-
return new Instance_1.Platform({ uuid: identity.uuid }, this._channel);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Asynchronously returns a Platform object that represents the current platform.
|
|
107
|
-
* @return {Promise.<Platform>}
|
|
108
|
-
* @tutorial Platform.getCurrent
|
|
109
|
-
* @static
|
|
110
|
-
*/
|
|
111
|
-
async getCurrent() {
|
|
112
|
-
this.wire.sendAction('platform-get-current').catch((e) => {
|
|
113
|
-
// don't expose
|
|
114
|
-
});
|
|
115
|
-
return this.wrap({ uuid: this.wire.me.uuid });
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Synchronously returns a Platform object that represents the current platform.
|
|
119
|
-
* @return {Platform}
|
|
120
|
-
* @tutorial Platform.getCurrentSync
|
|
121
|
-
* @static
|
|
122
|
-
*/
|
|
123
|
-
getCurrentSync() {
|
|
124
|
-
this.wire.sendAction('platform-get-current-sync').catch((e) => {
|
|
125
|
-
// don't expose
|
|
126
|
-
});
|
|
127
|
-
return this.wrapSync({ uuid: this.wire.me.uuid });
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
|
131
|
-
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
|
132
|
-
* @param { PlatformOptions } platformOptions
|
|
133
|
-
* @return {Promise.<Platform>}
|
|
134
|
-
* @tutorial Platform.start
|
|
135
|
-
* @static
|
|
136
|
-
*/
|
|
137
|
-
start(platformOptions) {
|
|
138
|
-
this.wire.sendAction('platform-start').catch((e) => {
|
|
139
|
-
// don't expose
|
|
140
|
-
});
|
|
141
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
142
|
-
return new Promise(async (resolve, reject) => {
|
|
143
|
-
try {
|
|
144
|
-
const { uuid } = platformOptions;
|
|
145
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
146
|
-
// @ts-ignore using private variable.
|
|
147
|
-
const app = await this.fin.Application._create({ ...platformOptions, isPlatformController: true });
|
|
148
|
-
app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid })));
|
|
149
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
150
|
-
// @ts-ignore using private variable.
|
|
151
|
-
app._run({ uuid });
|
|
152
|
-
}
|
|
153
|
-
catch (e) {
|
|
154
|
-
reject(e);
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
|
|
160
|
-
* it will be launched into the platform.
|
|
161
|
-
* @param {string} manifestUrl - The URL of platform's manifest.
|
|
162
|
-
* @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
|
|
163
|
-
* @return {Promise.<Platform>}
|
|
164
|
-
* @tutorial Platform.startFromManifest
|
|
165
|
-
* @static
|
|
166
|
-
*/
|
|
167
|
-
startFromManifest(manifestUrl, opts) {
|
|
168
|
-
this.wire.sendAction('platform-start-from-manifest').catch((e) => {
|
|
169
|
-
// don't expose
|
|
170
|
-
});
|
|
171
|
-
// eslint-disable-next-line no-async-promise-executor
|
|
172
|
-
return new Promise(async (resolve, reject) => {
|
|
173
|
-
try {
|
|
174
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
175
|
-
// @ts-ignore using private variable.
|
|
176
|
-
const app = await this.fin.Application._createFromManifest(manifestUrl);
|
|
177
|
-
app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid: app.identity.uuid })));
|
|
178
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
179
|
-
// @ts-ignore using private method without warning.
|
|
180
|
-
app._run(opts);
|
|
181
|
-
}
|
|
182
|
-
catch (e) {
|
|
183
|
-
reject(e);
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
exports.default = PlatformModule;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable no-undef, no-underscore-dangle */
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
const index_1 = require("./layout/index");
|
|
6
|
+
const Instance_1 = require("./Instance");
|
|
7
|
+
/**
|
|
8
|
+
* InitPlatformOptions interface
|
|
9
|
+
* @typedef { object } InitPlatformOptions
|
|
10
|
+
* @property { OverrideCallback } [overrideCallback] a callback function that can be used to extend or replace default Provider behavior.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @typedef { same | different } ProcessAffinityStrategy
|
|
14
|
+
* @summary Strategy to place views that share a domain into different process affinities or the same process affinity.
|
|
15
|
+
* @property { string } same views in the same domain will have the same process affinity.
|
|
16
|
+
* @property { string } different views in the same domain will have different process affinities.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* @typedef { object } PlatformOptions
|
|
20
|
+
* @summary The options object required by {@link Platform#start Platform.start}
|
|
21
|
+
* Any {@link ApplicationOptions Application option} is also a valid platform option
|
|
22
|
+
* @property {Array.<Object>} [commands] Configuration for keyboard commands.
|
|
23
|
+
* For details and usage, see [Using Keyboard Commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}.
|
|
24
|
+
* @property {DefaultWindowOptions} [defaultWindowOptions] Default window options apply to all platform windows.
|
|
25
|
+
* @property {View~options} [defaultViewOptions] Default view options apply to all platform views.
|
|
26
|
+
* @property {ProcessAffinityStrategy} [viewProcessAffinityStrategy] 'same' | 'different'.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* @typedef { object } DefaultWindowOptions
|
|
30
|
+
* @summary Default window options apply to all platform windows.
|
|
31
|
+
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
32
|
+
* used by default in any window that is created in the current platform's scope.
|
|
33
|
+
* Individual window options will override these defaults.
|
|
34
|
+
* @property {string} [stylesheetUrl]
|
|
35
|
+
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
36
|
+
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
37
|
+
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Snapshot interface
|
|
41
|
+
* @typedef { object } Snapshot
|
|
42
|
+
* @property { WindowOption[] } windows The array of window options objects
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* @lends Platform
|
|
46
|
+
*/
|
|
47
|
+
class PlatformModule extends base_1.Base {
|
|
48
|
+
constructor(wire, channel) {
|
|
49
|
+
super(wire);
|
|
50
|
+
this._channel = channel;
|
|
51
|
+
this._initializer = (...args) => this.wire.environment
|
|
52
|
+
.getProviderInitializer()
|
|
53
|
+
.then((initConstructor) => initConstructor(this.wire.environment)(...args));
|
|
54
|
+
/**
|
|
55
|
+
* @namespace
|
|
56
|
+
* @desc Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
|
57
|
+
* enables the initialization and manipulation of a window's Layout. A Layout will
|
|
58
|
+
* <a href="tutorial-Layout.DOMEvents.html">emit events locally</a> on the DOM element representing the layout-container.
|
|
59
|
+
*/
|
|
60
|
+
this.Layout = new index_1.LayoutModule(this.wire);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Initializes a Platform. Must be called from the Provider when using a custom provider.
|
|
64
|
+
* @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace
|
|
65
|
+
* default Provider behavior.
|
|
66
|
+
* @return {Promise.<void>}
|
|
67
|
+
* @tutorial Platform.init
|
|
68
|
+
* @experimental
|
|
69
|
+
* @static
|
|
70
|
+
*/
|
|
71
|
+
async init(options) {
|
|
72
|
+
const overrideCallback = options === null || options === void 0 ? void 0 : options.overrideCallback;
|
|
73
|
+
const interopBroker = await this.fin.Interop.init(this.fin.me.uuid, options === null || options === void 0 ? void 0 : options.interopOverride);
|
|
74
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
75
|
+
// @ts-ignore debugging purposes
|
|
76
|
+
window.interopBroker = interopBroker;
|
|
77
|
+
return this._initializer(overrideCallback, interopBroker);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Asynchronously returns a Platform object that represents an existing platform.
|
|
81
|
+
* @param { Identity } identity
|
|
82
|
+
* @return {Promise.<Platform>}
|
|
83
|
+
* @tutorial Platform.wrap
|
|
84
|
+
* @static
|
|
85
|
+
*/
|
|
86
|
+
async wrap(identity) {
|
|
87
|
+
this.wire.sendAction('platform-wrap').catch((e) => {
|
|
88
|
+
// don't expose
|
|
89
|
+
});
|
|
90
|
+
return new Instance_1.Platform({ uuid: identity.uuid }, this._channel);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Synchronously returns a Platform object that represents an existing platform.
|
|
94
|
+
* @param { Identity } identity
|
|
95
|
+
* @return {Platform}
|
|
96
|
+
* @tutorial Platform.wrapSync
|
|
97
|
+
* @static
|
|
98
|
+
*/
|
|
99
|
+
wrapSync(identity) {
|
|
100
|
+
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
|
101
|
+
// don't expose
|
|
102
|
+
});
|
|
103
|
+
return new Instance_1.Platform({ uuid: identity.uuid }, this._channel);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Asynchronously returns a Platform object that represents the current platform.
|
|
107
|
+
* @return {Promise.<Platform>}
|
|
108
|
+
* @tutorial Platform.getCurrent
|
|
109
|
+
* @static
|
|
110
|
+
*/
|
|
111
|
+
async getCurrent() {
|
|
112
|
+
this.wire.sendAction('platform-get-current').catch((e) => {
|
|
113
|
+
// don't expose
|
|
114
|
+
});
|
|
115
|
+
return this.wrap({ uuid: this.wire.me.uuid });
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Synchronously returns a Platform object that represents the current platform.
|
|
119
|
+
* @return {Platform}
|
|
120
|
+
* @tutorial Platform.getCurrentSync
|
|
121
|
+
* @static
|
|
122
|
+
*/
|
|
123
|
+
getCurrentSync() {
|
|
124
|
+
this.wire.sendAction('platform-get-current-sync').catch((e) => {
|
|
125
|
+
// don't expose
|
|
126
|
+
});
|
|
127
|
+
return this.wrapSync({ uuid: this.wire.me.uuid });
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
|
131
|
+
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
|
132
|
+
* @param { PlatformOptions } platformOptions
|
|
133
|
+
* @return {Promise.<Platform>}
|
|
134
|
+
* @tutorial Platform.start
|
|
135
|
+
* @static
|
|
136
|
+
*/
|
|
137
|
+
start(platformOptions) {
|
|
138
|
+
this.wire.sendAction('platform-start').catch((e) => {
|
|
139
|
+
// don't expose
|
|
140
|
+
});
|
|
141
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
142
|
+
return new Promise(async (resolve, reject) => {
|
|
143
|
+
try {
|
|
144
|
+
const { uuid } = platformOptions;
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
146
|
+
// @ts-ignore using private variable.
|
|
147
|
+
const app = await this.fin.Application._create({ ...platformOptions, isPlatformController: true });
|
|
148
|
+
app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid })));
|
|
149
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
150
|
+
// @ts-ignore using private variable.
|
|
151
|
+
app._run({ uuid });
|
|
152
|
+
}
|
|
153
|
+
catch (e) {
|
|
154
|
+
reject(e);
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
|
|
160
|
+
* it will be launched into the platform.
|
|
161
|
+
* @param {string} manifestUrl - The URL of platform's manifest.
|
|
162
|
+
* @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
|
|
163
|
+
* @return {Promise.<Platform>}
|
|
164
|
+
* @tutorial Platform.startFromManifest
|
|
165
|
+
* @static
|
|
166
|
+
*/
|
|
167
|
+
startFromManifest(manifestUrl, opts) {
|
|
168
|
+
this.wire.sendAction('platform-start-from-manifest').catch((e) => {
|
|
169
|
+
// don't expose
|
|
170
|
+
});
|
|
171
|
+
// eslint-disable-next-line no-async-promise-executor
|
|
172
|
+
return new Promise(async (resolve, reject) => {
|
|
173
|
+
try {
|
|
174
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
175
|
+
// @ts-ignore using private variable.
|
|
176
|
+
const app = await this.fin.Application._createFromManifest(manifestUrl);
|
|
177
|
+
app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid: app.identity.uuid })));
|
|
178
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
179
|
+
// @ts-ignore using private method without warning.
|
|
180
|
+
app._run(opts);
|
|
181
|
+
}
|
|
182
|
+
catch (e) {
|
|
183
|
+
reject(e);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
exports.default = PlatformModule;
|