@openfin/core 33.76.31 → 33.76.38
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 +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17104 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.31.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3080
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -148
- package/src/api/application/Factory.js +0 -230
- package/src/api/application/Instance.d.ts +0 -321
- package/src/api/application/Instance.js +0 -453
- package/src/api/application/index.d.ts +0 -3
- package/src/api/application/index.js +0 -19
- package/src/api/base.d.ts +0 -48
- package/src/api/base.js +0 -177
- package/src/api/clipboard/index.d.ts +0 -92
- package/src/api/clipboard/index.js +0 -120
- package/src/api/events/application.d.ts +0 -146
- package/src/api/events/application.js +0 -2
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -30
- package/src/api/events/channel.js +0 -2
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -19
- package/src/api/events/externalApplication.js +0 -2
- package/src/api/events/frame.d.ts +0 -30
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -20
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -26
- package/src/api/events/platform.js +0 -2
- package/src/api/events/system.d.ts +0 -113
- package/src/api/events/system.js +0 -2
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -82
- package/src/api/events/view.js +0 -2
- package/src/api/events/webcontents.d.ts +0 -266
- package/src/api/events/webcontents.js +0 -2
- package/src/api/events/window.d.ts +0 -352
- package/src/api/events/window.js +0 -2
- package/src/api/external-application/Factory.d.ts +0 -27
- package/src/api/external-application/Factory.js +0 -40
- package/src/api/external-application/Instance.d.ts +0 -102
- package/src/api/external-application/Instance.js +0 -109
- package/src/api/external-application/index.d.ts +0 -3
- package/src/api/external-application/index.js +0 -19
- package/src/api/fin.d.ts +0 -51
- package/src/api/fin.js +0 -42
- package/src/api/frame/Factory.d.ts +0 -37
- package/src/api/frame/Factory.js +0 -69
- package/src/api/frame/Instance.d.ts +0 -123
- package/src/api/frame/Instance.js +0 -130
- package/src/api/frame/index.d.ts +0 -3
- package/src/api/frame/index.js +0 -19
- package/src/api/global-hotkey/index.d.ts +0 -38
- package/src/api/global-hotkey/index.js +0 -64
- package/src/api/interappbus/channel/channel.d.ts +0 -28
- package/src/api/interappbus/channel/channel.js +0 -77
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -340
- package/src/api/interappbus/channel/channels-docs.js +0 -398
- package/src/api/interappbus/channel/client.d.ts +0 -24
- package/src/api/interappbus/channel/client.js +0 -89
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -25
- package/src/api/interappbus/channel/index.js +0 -169
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -34
- package/src/api/interappbus/channel/provider.js +0 -166
- package/src/api/interappbus/index.d.ts +0 -85
- package/src/api/interappbus/index.js +0 -175
- package/src/api/interop/Factory.d.ts +0 -37
- package/src/api/interop/Factory.js +0 -76
- package/src/api/interop/InteropBroker.d.ts +0 -437
- package/src/api/interop/InteropBroker.js +0 -1085
- package/src/api/interop/InteropClient.d.ts +0 -278
- package/src/api/interop/InteropClient.js +0 -459
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -208
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -438
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -301
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -482
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -4
- package/src/api/interop/index.js +0 -20
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -115
- package/src/api/platform/Factory.js +0 -184
- package/src/api/platform/Instance.d.ts +0 -150
- package/src/api/platform/Instance.js +0 -332
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -3
- package/src/api/platform/index.js +0 -19
- package/src/api/platform/layout/Factory.d.ts +0 -114
- package/src/api/platform/layout/Factory.js +0 -174
- package/src/api/platform/layout/Instance.d.ts +0 -57
- package/src/api/platform/layout/Instance.js +0 -126
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -235
- package/src/api/platform/layout/entities/layout-entities.js +0 -312
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -2
- package/src/api/platform/layout/index.js +0 -18
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -163
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -38
- package/src/api/snapshot-source/Factory.js +0 -66
- package/src/api/snapshot-source/Instance.d.ts +0 -31
- package/src/api/snapshot-source/Instance.js +0 -132
- package/src/api/snapshot-source/index.d.ts +0 -3
- package/src/api/snapshot-source/index.js +0 -19
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -517
- package/src/api/system/index.js +0 -895
- package/src/api/view/Factory.d.ts +0 -50
- package/src/api/view/Factory.js +0 -103
- package/src/api/view/Instance.d.ts +0 -487
- package/src/api/view/Instance.js +0 -557
- package/src/api/view/index.d.ts +0 -3
- package/src/api/view/index.js +0 -19
- package/src/api/webcontents/main.d.ts +0 -32
- package/src/api/webcontents/main.js +0 -156
- package/src/api/window/Factory.d.ts +0 -45
- package/src/api/window/Factory.js +0 -91
- package/src/api/window/Instance.d.ts +0 -1090
- package/src/api/window/Instance.js +0 -1349
- package/src/api/window/index.d.ts +0 -3
- package/src/api/window/index.js +0 -19
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -21
- package/src/namespaces.js +0 -24
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -200
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Application = void 0;
|
|
4
|
-
/* eslint-disable import/prefer-default-export */
|
|
5
|
-
const base_1 = require("../base");
|
|
6
|
-
const window_1 = require("../window");
|
|
7
|
-
const view_1 = require("../view");
|
|
8
|
-
/**
|
|
9
|
-
* @classdesc An object representing an application. Allows the developer to create,
|
|
10
|
-
* execute, show/close an application as well as listen to <a href="tutorial-Application.EventEmitter.html">application events</a>.
|
|
11
|
-
* @class
|
|
12
|
-
* @hideconstructor
|
|
13
|
-
*/
|
|
14
|
-
class Application extends base_1.EmitterBase {
|
|
15
|
-
constructor(wire, identity) {
|
|
16
|
-
super(wire, 'application', identity.uuid);
|
|
17
|
-
this.identity = identity;
|
|
18
|
-
this.window = new window_1._Window(this.wire, {
|
|
19
|
-
uuid: this.identity.uuid,
|
|
20
|
-
name: this.identity.uuid
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
windowListFromIdentityList(identityList) {
|
|
24
|
-
const windowList = [];
|
|
25
|
-
identityList.forEach((identity) => {
|
|
26
|
-
windowList.push(new window_1._Window(this.wire, {
|
|
27
|
-
uuid: identity.uuid,
|
|
28
|
-
name: identity.name
|
|
29
|
-
}));
|
|
30
|
-
});
|
|
31
|
-
return windowList;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
35
|
-
* @param { string | symbol } eventType - The type of the event.
|
|
36
|
-
* @param { Function } listener - Called whenever an event of the specified type occurs.
|
|
37
|
-
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
38
|
-
* @return {Promise.<this>}
|
|
39
|
-
* @function addListener
|
|
40
|
-
* @memberof Application
|
|
41
|
-
* @instance
|
|
42
|
-
* @tutorial Application.EventEmitter
|
|
43
|
-
*/
|
|
44
|
-
/**
|
|
45
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
|
46
|
-
* @param { string | symbol } eventType - The type of the event.
|
|
47
|
-
* @param { Function } listener - Called whenever an event of the specified type occurs.
|
|
48
|
-
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
49
|
-
* @return {Promise.<this>}
|
|
50
|
-
* @function on
|
|
51
|
-
* @memberof Application
|
|
52
|
-
* @instance
|
|
53
|
-
* @tutorial Application.EventEmitter
|
|
54
|
-
*/
|
|
55
|
-
/**
|
|
56
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
57
|
-
* @param { string | symbol } eventType - The type of the event.
|
|
58
|
-
* @param { Function } listener - The callback function.
|
|
59
|
-
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
60
|
-
* @return {Promise.<this>}
|
|
61
|
-
* @function once
|
|
62
|
-
* @memberof Application
|
|
63
|
-
* @instance
|
|
64
|
-
* @tutorial Application.EventEmitter
|
|
65
|
-
*/
|
|
66
|
-
/**
|
|
67
|
-
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
68
|
-
* @param { string | symbol } eventType - The type of the event.
|
|
69
|
-
* @param { Function } listener - The callback function.
|
|
70
|
-
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
71
|
-
* @return {Promise.<this>}
|
|
72
|
-
* @function prependListener
|
|
73
|
-
* @memberof Application
|
|
74
|
-
* @instance
|
|
75
|
-
* @tutorial Application.EventEmitter
|
|
76
|
-
*/
|
|
77
|
-
/**
|
|
78
|
-
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
79
|
-
* The listener is added to the beginning of the listeners array.
|
|
80
|
-
* @param { string | symbol } eventType - The type of the event.
|
|
81
|
-
* @param { Function } listener - The callback function.
|
|
82
|
-
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
83
|
-
* @return {Promise.<this>}
|
|
84
|
-
* @function prependOnceListener
|
|
85
|
-
* @memberof Application
|
|
86
|
-
* @instance
|
|
87
|
-
* @tutorial Application.EventEmitter
|
|
88
|
-
*/
|
|
89
|
-
/**
|
|
90
|
-
* Remove a listener from the listener array for the specified event.
|
|
91
|
-
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
92
|
-
* @param { string | symbol } eventType - The type of the event.
|
|
93
|
-
* @param { Function } listener - The callback function.
|
|
94
|
-
* @param { SubOptions } [options] - Option to support event timestamps.
|
|
95
|
-
* @return {Promise.<this>}
|
|
96
|
-
* @function removeListener
|
|
97
|
-
* @memberof Application
|
|
98
|
-
* @instance
|
|
99
|
-
* @tutorial Application.EventEmitter
|
|
100
|
-
*/
|
|
101
|
-
/**
|
|
102
|
-
* Removes all listeners, or those of the specified event.
|
|
103
|
-
* @param { string | symbol } [eventType] - The type of the event.
|
|
104
|
-
* @return {Promise.<this>}
|
|
105
|
-
* @function removeAllListeners
|
|
106
|
-
* @memberof Application
|
|
107
|
-
* @instance
|
|
108
|
-
* @tutorial Application.EventEmitter
|
|
109
|
-
*/
|
|
110
|
-
/**
|
|
111
|
-
* Determines if the application is currently running.
|
|
112
|
-
* @return {Promise.<boolean>}
|
|
113
|
-
* @tutorial Application.isRunning
|
|
114
|
-
*/
|
|
115
|
-
/**
|
|
116
|
-
* JumpListCategory interface
|
|
117
|
-
* @typedef { object } JumpListCategory
|
|
118
|
-
* @property { string } name The display title for the category. If omitted, items in this category will be placed into the standard 'Tasks' category. There can be only one such category, and it will always be displayed at the bottom of the JumpList.
|
|
119
|
-
* @property { JumpListItem[] } items Array of JumpListItem objects
|
|
120
|
-
*/
|
|
121
|
-
/**
|
|
122
|
-
* @PORTED
|
|
123
|
-
* JumpListItem interface
|
|
124
|
-
* @typedef { object } JumpListItem
|
|
125
|
-
* @property { string } type One of the following: "task" or "separator". Defaults to task.
|
|
126
|
-
* @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
|
|
127
|
-
* @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
|
|
128
|
-
* @property { string } deepLink Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1. See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
|
|
129
|
-
* @property { string } iconPath 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).
|
|
130
|
-
* @property { number } iconIndex The index of the icon in the resource file. 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. If a resource file contains only one icon, this property should be set to zero.
|
|
131
|
-
*/
|
|
132
|
-
isRunning() {
|
|
133
|
-
return this.wire.sendAction('is-application-running', this.identity).then(({ payload }) => payload.data);
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Closes the application and any child windows created by the application.
|
|
137
|
-
* Cleans the application from state so it is no longer found in getAllApplications.
|
|
138
|
-
* @param { boolean } [force = false] Close will be prevented from closing when force is false and
|
|
139
|
-
* ‘close-requested’ has been subscribed to for application’s main window.
|
|
140
|
-
* @return {Promise.<boolean>}
|
|
141
|
-
* @tutorial Application.quit
|
|
142
|
-
*/
|
|
143
|
-
async quit(force = false) {
|
|
144
|
-
try {
|
|
145
|
-
await this._close(force);
|
|
146
|
-
await this.wire.sendAction('destroy-application', { force, ...this.identity });
|
|
147
|
-
}
|
|
148
|
-
catch (error) {
|
|
149
|
-
const acceptableErrors = ['Remote connection has closed', 'Could not locate the requested application'];
|
|
150
|
-
if (!acceptableErrors.some((msg) => error.message.includes(msg))) {
|
|
151
|
-
throw error;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
async _close(force = false) {
|
|
156
|
-
try {
|
|
157
|
-
await this.wire.sendAction('close-application', { force, ...this.identity });
|
|
158
|
-
}
|
|
159
|
-
catch (error) {
|
|
160
|
-
if (!error.message.includes('Remote connection has closed')) {
|
|
161
|
-
throw error;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
close(force = false) {
|
|
166
|
-
console.warn('Deprecation Warning: Application.close is deprecated Please use Application.quit');
|
|
167
|
-
this.wire.sendAction('application-close', this.identity).catch((e) => {
|
|
168
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
169
|
-
});
|
|
170
|
-
return this._close(force);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Retrieves an array of wrapped fin.Windows for each of the application’s child windows.
|
|
174
|
-
* @return {Promise.Array.<_Window>}
|
|
175
|
-
* @tutorial Application.getChildWindows
|
|
176
|
-
*/
|
|
177
|
-
getChildWindows() {
|
|
178
|
-
return this.wire.sendAction('get-child-windows', this.identity).then(({ payload }) => {
|
|
179
|
-
const identityList = [];
|
|
180
|
-
payload.data.forEach((winName) => {
|
|
181
|
-
identityList.push({ uuid: this.identity.uuid, name: winName });
|
|
182
|
-
});
|
|
183
|
-
return this.windowListFromIdentityList(identityList);
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Retrieves the JSON manifest that was used to create the application. Invokes the error callback
|
|
188
|
-
* if the application was not created from a manifest.
|
|
189
|
-
* @return {Promise.<Manifest>}
|
|
190
|
-
* @tutorial Application.getManifest
|
|
191
|
-
*/
|
|
192
|
-
getManifest() {
|
|
193
|
-
return this.wire.sendAction('get-application-manifest', this.identity).then(({ payload }) => payload.data);
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Retrieves UUID of the application that launches this application. Invokes the error callback
|
|
197
|
-
* if the application was created from a manifest.
|
|
198
|
-
* @return {Promise.<string>}
|
|
199
|
-
* @tutorial Application.getParentUuid
|
|
200
|
-
*/
|
|
201
|
-
getParentUuid() {
|
|
202
|
-
return this.wire.sendAction('get-parent-application', this.identity).then(({ payload }) => payload.data);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Retrieves current application's shortcut configuration.
|
|
206
|
-
* @return {Promise.<ShortCutConfig>}
|
|
207
|
-
* @tutorial Application.getShortcuts
|
|
208
|
-
*/
|
|
209
|
-
getShortcuts() {
|
|
210
|
-
return this.wire.sendAction('get-shortcuts', this.identity).then(({ payload }) => payload.data);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Retrieves current application's views.
|
|
214
|
-
* @experimental
|
|
215
|
-
* @return {Promise.Array.<View>}
|
|
216
|
-
* @tutorial Application.getViews
|
|
217
|
-
*/
|
|
218
|
-
async getViews() {
|
|
219
|
-
const { payload } = await this.wire.sendAction('application-get-views', this.identity);
|
|
220
|
-
return payload.data.map((id) => new view_1.View(this.wire, id));
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Returns the current zoom level of the application.
|
|
224
|
-
* @return {Promise.<number>}
|
|
225
|
-
* @tutorial Application.getZoomLevel
|
|
226
|
-
*/
|
|
227
|
-
getZoomLevel() {
|
|
228
|
-
return this.wire.sendAction('get-application-zoom-level', this.identity).then(({ payload }) => payload.data);
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* Returns an instance of the main Window of the application
|
|
232
|
-
* @return {Promise.<_Window>}
|
|
233
|
-
* @tutorial Application.getWindow
|
|
234
|
-
*/
|
|
235
|
-
getWindow() {
|
|
236
|
-
this.wire.sendAction('application-get-window', this.identity).catch((e) => {
|
|
237
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
238
|
-
});
|
|
239
|
-
return Promise.resolve(this.window);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Manually registers a user with the licensing service. The only data sent by this call is userName and appName.
|
|
243
|
-
* @param { string } userName - username to be passed to the RVM.
|
|
244
|
-
* @param { string } appName - app name to be passed to the RVM.
|
|
245
|
-
* @return {Promise.<void>}
|
|
246
|
-
* @tutorial Application.registerUser
|
|
247
|
-
*/
|
|
248
|
-
registerUser(userName, appName) {
|
|
249
|
-
return this.wire.sendAction('register-user', { userName, appName, ...this.identity }).then(() => undefined);
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Removes the application’s icon from the tray.
|
|
253
|
-
* @return {Promise.<void>}
|
|
254
|
-
* @tutorial Application.removeTrayIcon
|
|
255
|
-
*/
|
|
256
|
-
removeTrayIcon() {
|
|
257
|
-
return this.wire.sendAction('remove-tray-icon', this.identity).then(() => undefined);
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Restarts the application.
|
|
261
|
-
* @return {Promise.<void>}
|
|
262
|
-
* @tutorial Application.restart
|
|
263
|
-
*/
|
|
264
|
-
restart() {
|
|
265
|
-
return this.wire.sendAction('restart-application', this.identity).then(() => undefined);
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* DEPRECATED method to run the application.
|
|
269
|
-
* Needed when starting application via {@link Application.create}, but NOT needed when starting via {@link Application.start}.
|
|
270
|
-
* @return {Promise.<void>}
|
|
271
|
-
* @tutorial Application.run
|
|
272
|
-
* @ignore
|
|
273
|
-
*/
|
|
274
|
-
run() {
|
|
275
|
-
console.warn('Deprecation Warning: Application.run is deprecated Please use fin.Application.start');
|
|
276
|
-
this.wire.sendAction('application-run', this.identity).catch((e) => {
|
|
277
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
278
|
-
});
|
|
279
|
-
return this._run();
|
|
280
|
-
}
|
|
281
|
-
_run(opts = {}) {
|
|
282
|
-
return this.wire
|
|
283
|
-
.sendAction('run-application', {
|
|
284
|
-
manifestUrl: this._manifestUrl,
|
|
285
|
-
opts,
|
|
286
|
-
...this.identity
|
|
287
|
-
})
|
|
288
|
-
.then(() => undefined);
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* Instructs the RVM to schedule one restart of the application.
|
|
292
|
-
* @return {Promise.<void>}
|
|
293
|
-
* @tutorial Application.scheduleRestart
|
|
294
|
-
*/
|
|
295
|
-
scheduleRestart() {
|
|
296
|
-
return this.wire.sendAction('relaunch-on-close', this.identity).then(() => undefined);
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* Sends a message to the RVM to upload the application's logs. On success,
|
|
300
|
-
* an object containing logId is returned.
|
|
301
|
-
* @return {Promise.<SendApplicationLogResponse>}
|
|
302
|
-
* @tutorial Application.sendApplicationLog
|
|
303
|
-
*/
|
|
304
|
-
async sendApplicationLog() {
|
|
305
|
-
const { payload } = await this.wire.sendAction('send-application-log', this.identity);
|
|
306
|
-
return payload.data;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
|
|
310
|
-
* If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
|
|
311
|
-
* Note: If the "name" property is omitted it defaults to "tasks".
|
|
312
|
-
* @param { Array.<JumpListCategory> | null } jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
|
|
313
|
-
* @return { Promise.<void> }
|
|
314
|
-
* @tutorial Application.setJumpList
|
|
315
|
-
*/
|
|
316
|
-
async setJumpList(jumpListCategories) {
|
|
317
|
-
await this.wire.sendAction('set-jump-list', { config: jumpListCategories, ...this.identity });
|
|
318
|
-
}
|
|
319
|
-
/**
|
|
320
|
-
* Adds a customizable icon in the system tray. To listen for a click on the icon use the `tray-icon-clicked` event.
|
|
321
|
-
* @param { string } icon Image URL or base64 encoded string to be used as the icon
|
|
322
|
-
* @return {Promise.<void>}
|
|
323
|
-
* @tutorial Application.setTrayIcon
|
|
324
|
-
*/
|
|
325
|
-
setTrayIcon(icon) {
|
|
326
|
-
return this.wire
|
|
327
|
-
.sendAction('set-tray-icon', {
|
|
328
|
-
enabledIcon: icon,
|
|
329
|
-
...this.identity
|
|
330
|
-
})
|
|
331
|
-
.then(() => undefined);
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Sets new application's shortcut configuration. Windows only.
|
|
335
|
-
* @param { ShortCutConfig } config New application's shortcut configuration.
|
|
336
|
-
* @param { boolean } [config.desktop] - Enable/disable desktop shortcut.
|
|
337
|
-
* @param { boolean } [config.startMenu] - Enable/disable start menu shortcut.
|
|
338
|
-
* @param { boolean } [config.systemStartup] - Enable/disable system startup shortcut.
|
|
339
|
-
* @return {Promise.<void>}
|
|
340
|
-
* @tutorial Application.setShortcuts
|
|
341
|
-
*/
|
|
342
|
-
setShortcuts(config) {
|
|
343
|
-
return this.wire.sendAction('set-shortcuts', { data: config, ...this.identity }).then(() => undefined);
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* Sets the query string in all shortcuts for this app. Requires RVM 5.5+.
|
|
347
|
-
* @param { string } queryString The new query string for this app's shortcuts.
|
|
348
|
-
* @return {Promise.<void>}
|
|
349
|
-
* @tutorial Application.setShortcutQueryParams
|
|
350
|
-
*/
|
|
351
|
-
async setShortcutQueryParams(queryString) {
|
|
352
|
-
await this.wire.sendAction('set-shortcut-query-args', { data: queryString, ...this.identity });
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20%
|
|
356
|
-
* larger or smaller to default limits of 300% and 50% of original size, respectively.
|
|
357
|
-
* @param { number } level The zoom level
|
|
358
|
-
* @return {Promise.<void>}
|
|
359
|
-
* @tutorial Application.setZoomLevel
|
|
360
|
-
*/
|
|
361
|
-
setZoomLevel(level) {
|
|
362
|
-
return this.wire.sendAction('set-application-zoom-level', { level, ...this.identity }).then(() => undefined);
|
|
363
|
-
}
|
|
364
|
-
/**
|
|
365
|
-
* Sets a username to correlate with App Log Management.
|
|
366
|
-
* @param { string } username Username to correlate with App's Log.
|
|
367
|
-
* @return {Promise.<void>}
|
|
368
|
-
* @tutorial Application.setAppLogUsername
|
|
369
|
-
*/
|
|
370
|
-
async setAppLogUsername(username) {
|
|
371
|
-
await this.wire.sendAction('set-app-log-username', { data: username, ...this.identity });
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* @summary Retrieves information about the system tray. If the system tray is not set, it will throw an error message.
|
|
375
|
-
* @desc The only information currently returned is the position and dimensions.
|
|
376
|
-
* @return {Promise.<TrayInfo>}
|
|
377
|
-
* @tutorial Application.getTrayIconInfo
|
|
378
|
-
*/
|
|
379
|
-
getTrayIconInfo() {
|
|
380
|
-
return this.wire.sendAction('get-tray-icon-info', this.identity).then(({ payload }) => payload.data);
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* @summary Checks if the application has an associated tray icon.
|
|
384
|
-
* @return {Promise.<boolean>}
|
|
385
|
-
* @tutorial Application.hasTrayIcon
|
|
386
|
-
*/
|
|
387
|
-
hasTrayIcon() {
|
|
388
|
-
return this.wire.sendAction('has-tray-icon', this.identity).then(({ payload }) => payload.data);
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Closes the application by terminating its process.
|
|
392
|
-
* @return {Promise.<void>}
|
|
393
|
-
* @tutorial Application.terminate
|
|
394
|
-
*/
|
|
395
|
-
terminate() {
|
|
396
|
-
return this.wire.sendAction('terminate-application', this.identity).then(() => undefined);
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Waits for a hanging application. This method can be called in response to an application
|
|
400
|
-
* "not-responding" to allow the application to continue and to generate another "not-responding"
|
|
401
|
-
* message after a certain period of time.
|
|
402
|
-
* @return {Promise.<void>}
|
|
403
|
-
* @ignore
|
|
404
|
-
*/
|
|
405
|
-
wait() {
|
|
406
|
-
return this.wire.sendAction('wait-for-hung-application', this.identity).then(() => undefined);
|
|
407
|
-
}
|
|
408
|
-
/**
|
|
409
|
-
* Retrieves information about the application.
|
|
410
|
-
* @return {Promise.<ApplicationInfo>}
|
|
411
|
-
* @tutorial Application.getInfo
|
|
412
|
-
*/
|
|
413
|
-
getInfo() {
|
|
414
|
-
return this.wire.sendAction('get-info', this.identity).then(({ payload }) => payload.data);
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Retrieves all process information for entities (windows and views) associated with an application.
|
|
418
|
-
* @return {Promise.<AppProcessInfo>}
|
|
419
|
-
* @tutorial Application.getProcessInfo
|
|
420
|
-
* @experimental
|
|
421
|
-
*/
|
|
422
|
-
async getProcessInfo() {
|
|
423
|
-
const { payload: { data } } = await this.wire.sendAction('application-get-process-info', this.identity);
|
|
424
|
-
return data;
|
|
425
|
-
}
|
|
426
|
-
/**
|
|
427
|
-
* Sets file auto download location. It's only allowed in the same application.
|
|
428
|
-
* Note: This method is restricted by default and must be enabled via
|
|
429
|
-
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
430
|
-
* @param { string } downloadLocation file auto download location
|
|
431
|
-
* @return {Promise.<void>}
|
|
432
|
-
* @throws if setting file auto download location on different applications.
|
|
433
|
-
* @tutorial Application.setFileDownloadLocation
|
|
434
|
-
*/
|
|
435
|
-
async setFileDownloadLocation(downloadLocation) {
|
|
436
|
-
const { name } = this.wire.me;
|
|
437
|
-
const entityIdentity = { uuid: this.identity.uuid, name };
|
|
438
|
-
await this.wire.sendAction('set-file-download-location', { ...entityIdentity, downloadLocation });
|
|
439
|
-
}
|
|
440
|
-
/**
|
|
441
|
-
* Gets file auto download location. It's only allowed in the same application. If file auto download location is not set, it will return the default location.
|
|
442
|
-
* Note: This method is restricted by default and must be enabled via
|
|
443
|
-
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
444
|
-
* @return {Promise.<string>}
|
|
445
|
-
* @throws if getting file auto download location on different applications.
|
|
446
|
-
* @tutorial Application.getFileDownloadLocation
|
|
447
|
-
*/
|
|
448
|
-
async getFileDownloadLocation() {
|
|
449
|
-
const { payload: { data } } = await this.wire.sendAction('get-file-download-location', this.identity);
|
|
450
|
-
return data;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
exports.Application = Application;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const Factory_1 = require("./Factory");
|
|
18
|
-
__exportStar(require("./Instance"), exports);
|
|
19
|
-
exports.default = Factory_1.default;
|
package/src/api/base.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
|
-
import { Transport } from '../transport/transport';
|
|
4
|
-
import type * as OpenFin from '../OpenFin';
|
|
5
|
-
import { BaseEvent, EventHandler } from './events/base';
|
|
6
|
-
type ApplicationIdentity = OpenFin.ApplicationIdentity;
|
|
7
|
-
type Identity = OpenFin.Identity;
|
|
8
|
-
export declare class Base {
|
|
9
|
-
wire: Transport;
|
|
10
|
-
constructor(wire: Transport);
|
|
11
|
-
protected get fin(): OpenFin.Fin<OpenFin.EntityType>;
|
|
12
|
-
get me(): Identity;
|
|
13
|
-
protected isNodeEnvironment: () => boolean;
|
|
14
|
-
protected isOpenFinEnvironment: () => boolean;
|
|
15
|
-
protected isBrowserEnvironment: () => boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType extends EmitterEvent['type'] = EmitterEvent['type']> extends Base {
|
|
18
|
-
#private;
|
|
19
|
-
private topic;
|
|
20
|
-
protected identity: ApplicationIdentity;
|
|
21
|
-
constructor(wire: Transport, topic: string, ...additionalAccessors: string[]);
|
|
22
|
-
eventNames: () => (string | symbol)[];
|
|
23
|
-
emit: <EventType extends EmitterEventType>(eventType: EventType, payload: Extract<EmitterEvent, {
|
|
24
|
-
type: EventType;
|
|
25
|
-
}>, ...args: any[]) => boolean;
|
|
26
|
-
private hasEmitter;
|
|
27
|
-
private getOrCreateEmitter;
|
|
28
|
-
listeners: (type: string | symbol) => Function[];
|
|
29
|
-
listenerCount: (type: string | symbol) => number;
|
|
30
|
-
protected registerEventListener: (eventType: EmitterEventType, options: OpenFin.SubscriptionOptions, applySubscription: (emitter: EventEmitter) => void, undoSubscription: (emitter: EventEmitter) => void) => Promise<void>;
|
|
31
|
-
protected deregisterEventListener: (eventType: EmitterEventType, options?: OpenFin.SubscriptionOptions) => Promise<void | EventEmitter>;
|
|
32
|
-
on<EventType extends EmitterEventType>(eventType: EventType, listener: EventHandler<EmitterEvent, EventType>, options?: OpenFin.SubscriptionOptions): Promise<this>;
|
|
33
|
-
addListener: <EventType extends EmitterEventType>(eventType: EventType, listener: OpenFin.BaseEvents.EventHandler<EmitterEvent, EventType>, options?: OpenFin.SubscriptionOptions) => Promise<this>;
|
|
34
|
-
once<EventType extends EmitterEventType>(eventType: EventType, listener: EventHandler<EmitterEvent, EventType>, options?: OpenFin.SubscriptionOptions): Promise<this>;
|
|
35
|
-
prependListener<EventType extends EmitterEventType>(eventType: EventType, listener: EventHandler<EmitterEvent, EventType>, options?: OpenFin.SubscriptionOptions): Promise<this>;
|
|
36
|
-
prependOnceListener<EventType extends EmitterEventType>(eventType: EventType, listener: EventHandler<EmitterEvent, EventType>, options?: OpenFin.SubscriptionOptions): Promise<this>;
|
|
37
|
-
removeListener<EventType extends EmitterEventType>(eventType: EventType, listener: EventHandler<EmitterEvent, EventType>, options?: OpenFin.SubscriptionOptions): Promise<this>;
|
|
38
|
-
protected deregisterAllListeners(eventType: EmitterEventType): Promise<EventEmitter | void>;
|
|
39
|
-
removeAllListeners(eventType?: EmitterEventType): Promise<this>;
|
|
40
|
-
private deleteEmitterIfNothingRegistered;
|
|
41
|
-
}
|
|
42
|
-
export declare class Reply<TOPIC extends string, TYPE extends string | void> implements Identity {
|
|
43
|
-
topic: TOPIC;
|
|
44
|
-
type: TYPE;
|
|
45
|
-
uuid: string;
|
|
46
|
-
name: string;
|
|
47
|
-
}
|
|
48
|
-
export {};
|