@openfin/core 33.76.27 → 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.27.tgz +0 -0
|
@@ -3,57 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const base_1 = require("../base");
|
|
4
4
|
const Instance_1 = require("./Instance");
|
|
5
5
|
const index_1 = require("./layout/index");
|
|
6
|
-
/**
|
|
7
|
-
* @PORTED
|
|
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
|
-
* @PORTED
|
|
14
|
-
* @typedef { same | different } ProcessAffinityStrategy
|
|
15
|
-
* @summary Strategy to place views that share a domain into different process affinities or the same process affinity.
|
|
16
|
-
* @property { string } same views in the same domain will have the same process affinity.
|
|
17
|
-
* @property { string } different views in the same domain will have different process affinities.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* @PORTED
|
|
21
|
-
* @typedef { object } PlatformOptions
|
|
22
|
-
* @summary The options object required by {@link Platform#start Platform.start}
|
|
23
|
-
* Any {@link ApplicationOptions Application option} is also a valid platform option
|
|
24
|
-
* @property {Array.<Object>} [commands] Configuration for keyboard commands.
|
|
25
|
-
* For details and usage, see [Using Keyboard Commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}.
|
|
26
|
-
* @property {DefaultWindowOptions} [defaultWindowOptions] Default window options apply to all platform windows.
|
|
27
|
-
* @property {View~options} [defaultViewOptions] Default view options apply to all platform views.
|
|
28
|
-
* @property {ProcessAffinityStrategy} [viewProcessAffinityStrategy] 'same' | 'different'.
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* @PORTED
|
|
32
|
-
* @typedef { object } DefaultWindowOptions
|
|
33
|
-
* @summary Default window options apply to all platform windows.
|
|
34
|
-
* Any {@link Window~options Window option} is also a valid Default Window option
|
|
35
|
-
* used by default in any window that is created in the current platform's scope.
|
|
36
|
-
* Individual window options will override these defaults.
|
|
37
|
-
* @property {string} [stylesheetUrl]
|
|
38
|
-
* Specify a path of a custom CSS file to be injected to all of the platform's windows.
|
|
39
|
-
* _note_: this option is only applied to windows that use the Default OpenFin Window.
|
|
40
|
-
* Windows with a specified url (Custom Windows) will not be affected by this option.
|
|
41
|
-
*/
|
|
42
|
-
/**
|
|
43
|
-
* @DELETED
|
|
44
|
-
* Snapshot interface
|
|
45
|
-
* @typedef { object } Snapshot
|
|
46
|
-
* @property { WindowOption[] } windows The array of window options objects
|
|
47
|
-
*/
|
|
48
|
-
/**
|
|
49
|
-
* @lends Platform
|
|
50
|
-
*/
|
|
51
6
|
class PlatformModule extends base_1.Base {
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
52
10
|
constructor(wire, channel) {
|
|
53
11
|
super(wire);
|
|
54
12
|
this._channel = channel;
|
|
55
13
|
/**
|
|
56
|
-
*
|
|
14
|
+
*
|
|
57
15
|
* @desc Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
|
58
16
|
* enables the initialization and manipulation of a window's Layout. A Layout will
|
|
59
17
|
* <a href="tutorial-Layout.DOMEvents.html">emit events locally</a> on the DOM element representing the layout-container.
|
|
@@ -62,10 +20,53 @@ class PlatformModule extends base_1.Base {
|
|
|
62
20
|
}
|
|
63
21
|
/**
|
|
64
22
|
* Initializes a Platform. Must be called from the Provider when using a custom provider.
|
|
65
|
-
* @param
|
|
23
|
+
* @param options - platform options including a callback function that can be used to extend or replace
|
|
66
24
|
* default Provider behavior.
|
|
67
|
-
*
|
|
68
|
-
* @
|
|
25
|
+
*
|
|
26
|
+
* @remarks Must be called from the Provider when using a custom provider.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
*
|
|
30
|
+
* ```js
|
|
31
|
+
* // From Provider context
|
|
32
|
+
* await fin.Platform.init();
|
|
33
|
+
* // Platform API is now hooked up and windows contained in the manifest snapshot are open.
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* `Platform.init` accepts an options object that can contain a callback function which can be used to extend or
|
|
37
|
+
* replace default Provider behavior. As an argument, this function will receive the `Provider` class, which is
|
|
38
|
+
* used to handle Platform actions. The function must return an object with methods to handle Platform API actions.
|
|
39
|
+
* The recommended approach is to extend the `Provider` class, overriding the methods you wish to alter, and return an
|
|
40
|
+
* instance of your subclass:
|
|
41
|
+
*
|
|
42
|
+
* ```js
|
|
43
|
+
* const overrideCallback = async (PlatformProvider) => {
|
|
44
|
+
* // Actions can be performed before initialization.
|
|
45
|
+
* // e.g. we might authenticate a user, set up a Channel, etc before initializing the Platform.
|
|
46
|
+
* const { manifestUrl } = await fin.Application.getCurrentSync().getInfo();
|
|
47
|
+
*
|
|
48
|
+
* // Extend or replace default PlatformProvider behavior by extending the PlatformProvider class.
|
|
49
|
+
* class MyOverride extends PlatformProvider {
|
|
50
|
+
* // Default behavior can be changed by implementing methods with the same names as those used by the default PlatformProvider.
|
|
51
|
+
* async getSnapshot() {
|
|
52
|
+
* // Since we are extending the class, we can call `super` methods to access default behavior.
|
|
53
|
+
* const snapshot = await super.getSnapshot();
|
|
54
|
+
* // But we can modify return values.
|
|
55
|
+
* return { ...snapshot, answer: 42, manifestUrl };
|
|
56
|
+
* }
|
|
57
|
+
* async replaceLayout({ opts, target }) {
|
|
58
|
+
* // To disable an API method, overwrite with a noop function.
|
|
59
|
+
* return;
|
|
60
|
+
* }
|
|
61
|
+
* }
|
|
62
|
+
* // Return instance with methods to be consumed by Platform.
|
|
63
|
+
* // The returned object must implement all methods of the PlatformProvider class.
|
|
64
|
+
* // By extending the class, we can simply inherit methods we do not wish to alter.
|
|
65
|
+
* return new MyOverride();
|
|
66
|
+
* };
|
|
67
|
+
*
|
|
68
|
+
* fin.Platform.init({overrideCallback});
|
|
69
|
+
* ```
|
|
69
70
|
* @experimental
|
|
70
71
|
* @static
|
|
71
72
|
*/
|
|
@@ -74,9 +75,15 @@ class PlatformModule extends base_1.Base {
|
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Asynchronously returns a Platform object that represents an existing platform.
|
|
77
|
-
* @param
|
|
78
|
-
*
|
|
79
|
-
* @
|
|
78
|
+
* @param identity
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```js
|
|
82
|
+
* const { identity } = fin.me;
|
|
83
|
+
* const platform = await fin.Platform.wrap(identity);
|
|
84
|
+
* // Use wrapped instance to control layout, e.g.:
|
|
85
|
+
* const snapshot = await platform.getSnapshot();
|
|
86
|
+
* ```
|
|
80
87
|
* @static
|
|
81
88
|
*/
|
|
82
89
|
async wrap(identity) {
|
|
@@ -87,9 +94,15 @@ class PlatformModule extends base_1.Base {
|
|
|
87
94
|
}
|
|
88
95
|
/**
|
|
89
96
|
* Synchronously returns a Platform object that represents an existing platform.
|
|
90
|
-
* @param
|
|
91
|
-
*
|
|
92
|
-
* @
|
|
97
|
+
* @param identity
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```js
|
|
101
|
+
* const { identity } = fin.me;
|
|
102
|
+
* const platform = fin.Platform.wrapSync(identity);
|
|
103
|
+
* // Use wrapped instance to control layout, e.g.:
|
|
104
|
+
* const snapshot = await platform.getSnapshot();
|
|
105
|
+
* ```
|
|
93
106
|
* @static
|
|
94
107
|
*/
|
|
95
108
|
wrapSync(identity) {
|
|
@@ -100,8 +113,13 @@ class PlatformModule extends base_1.Base {
|
|
|
100
113
|
}
|
|
101
114
|
/**
|
|
102
115
|
* Asynchronously returns a Platform object that represents the current platform.
|
|
103
|
-
*
|
|
104
|
-
* @
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* ```js
|
|
119
|
+
* const platform = await fin.Platform.getCurrent();
|
|
120
|
+
* // Use wrapped instance to control layout, e.g.:
|
|
121
|
+
* const snapshot = await platform.getSnapshot();
|
|
122
|
+
* ```
|
|
105
123
|
* @static
|
|
106
124
|
*/
|
|
107
125
|
async getCurrent() {
|
|
@@ -112,8 +130,13 @@ class PlatformModule extends base_1.Base {
|
|
|
112
130
|
}
|
|
113
131
|
/**
|
|
114
132
|
* Synchronously returns a Platform object that represents the current platform.
|
|
115
|
-
*
|
|
116
|
-
* @
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```js
|
|
136
|
+
* const platform = fin.Platform.getCurrentSync();
|
|
137
|
+
* // Use wrapped instance to control layout, e.g.:
|
|
138
|
+
* const snapshot = await platform.getSnapshot();
|
|
139
|
+
* ```
|
|
117
140
|
* @static
|
|
118
141
|
*/
|
|
119
142
|
getCurrentSync() {
|
|
@@ -125,9 +148,27 @@ class PlatformModule extends base_1.Base {
|
|
|
125
148
|
/**
|
|
126
149
|
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
|
127
150
|
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
|
128
|
-
* @param
|
|
129
|
-
*
|
|
130
|
-
* @
|
|
151
|
+
* @param platformOptions
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```js
|
|
155
|
+
* try {
|
|
156
|
+
* const platform = await fin.Platform.start({
|
|
157
|
+
* uuid: 'platform-1',
|
|
158
|
+
* autoShow: false,
|
|
159
|
+
* defaultWindowOptions: {
|
|
160
|
+
* stylesheetUrl: 'css-sheet-url',
|
|
161
|
+
* cornerRounding: {
|
|
162
|
+
* height: 10,
|
|
163
|
+
* width: 10
|
|
164
|
+
* }
|
|
165
|
+
* }
|
|
166
|
+
* });
|
|
167
|
+
* console.log('Platform is running', platform);
|
|
168
|
+
* } catch(e) {
|
|
169
|
+
* console.error(e);
|
|
170
|
+
* }
|
|
171
|
+
* ```
|
|
131
172
|
* @static
|
|
132
173
|
*/
|
|
133
174
|
start(platformOptions) {
|
|
@@ -154,10 +195,25 @@ class PlatformModule extends base_1.Base {
|
|
|
154
195
|
/**
|
|
155
196
|
* Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
|
|
156
197
|
* it will be launched into the platform.
|
|
157
|
-
* @param
|
|
158
|
-
* @param
|
|
159
|
-
*
|
|
160
|
-
* @
|
|
198
|
+
* @param manifestUrl - The URL of platform's manifest.
|
|
199
|
+
* @param opts - Parameters that the RVM will use.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```js
|
|
203
|
+
* try {
|
|
204
|
+
* const platform = await fin.Platform.startFromManifest('https://openfin.github.io/golden-prototype/public.json');
|
|
205
|
+
* console.log('Platform is running, wrapped platform: ', platform);
|
|
206
|
+
* } catch(e) {
|
|
207
|
+
* console.error(e);
|
|
208
|
+
* }
|
|
209
|
+
* // For a local manifest file:
|
|
210
|
+
* try {
|
|
211
|
+
* const platform = await fin.Platform.startFromManifest('file:///C:/somefolder/app.json');
|
|
212
|
+
* console.log('Platform is running, wrapped platform: ', platform);
|
|
213
|
+
* } catch(e) {
|
|
214
|
+
* console.error(e);
|
|
215
|
+
* }
|
|
216
|
+
* ```
|
|
161
217
|
* @static
|
|
162
218
|
*/
|
|
163
219
|
startFromManifest(manifestUrl, opts) {
|