@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.
Files changed (269) hide show
  1. package/OpenFin.d.ts +1 -1
  2. package/README.md +29 -4
  3. package/fin.d.ts +2 -2
  4. package/{src → out}/GlobalOpenFin.d.ts +1 -1
  5. package/out/mock-alpha.d.ts +16112 -0
  6. package/out/mock-beta.d.ts +16112 -0
  7. package/out/mock-public.d.ts +16112 -0
  8. package/out/mock.d.ts +16797 -0
  9. package/out/mock.js +17104 -0
  10. package/package.json +30 -23
  11. package/LICENSE +0 -13
  12. package/NOTICE +0 -16
  13. package/openfin-core-33.76.31.tgz +0 -0
  14. package/src/OpenFin.d.ts +0 -3080
  15. package/src/OpenFin.js +0 -2
  16. package/src/api/api-exposer/api-consumer.d.ts +0 -28
  17. package/src/api/api-exposer/api-consumer.js +0 -28
  18. package/src/api/api-exposer/api-exposer.d.ts +0 -35
  19. package/src/api/api-exposer/api-exposer.js +0 -38
  20. package/src/api/api-exposer/decorators.d.ts +0 -10
  21. package/src/api/api-exposer/decorators.js +0 -18
  22. package/src/api/api-exposer/index.d.ts +0 -4
  23. package/src/api/api-exposer/index.js +0 -20
  24. package/src/api/api-exposer/strategies/index.d.ts +0 -1
  25. package/src/api/api-exposer/strategies/index.js +0 -17
  26. package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
  27. package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
  28. package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
  29. package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
  30. package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
  31. package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
  32. package/src/api/application/Factory.d.ts +0 -148
  33. package/src/api/application/Factory.js +0 -230
  34. package/src/api/application/Instance.d.ts +0 -321
  35. package/src/api/application/Instance.js +0 -453
  36. package/src/api/application/index.d.ts +0 -3
  37. package/src/api/application/index.js +0 -19
  38. package/src/api/base.d.ts +0 -48
  39. package/src/api/base.js +0 -177
  40. package/src/api/clipboard/index.d.ts +0 -92
  41. package/src/api/clipboard/index.js +0 -120
  42. package/src/api/events/application.d.ts +0 -146
  43. package/src/api/events/application.js +0 -2
  44. package/src/api/events/base.d.ts +0 -42
  45. package/src/api/events/base.js +0 -2
  46. package/src/api/events/channel.d.ts +0 -30
  47. package/src/api/events/channel.js +0 -2
  48. package/src/api/events/emitterMap.d.ts +0 -11
  49. package/src/api/events/emitterMap.js +0 -35
  50. package/src/api/events/eventAggregator.d.ts +0 -5
  51. package/src/api/events/eventAggregator.js +0 -35
  52. package/src/api/events/externalApplication.d.ts +0 -19
  53. package/src/api/events/externalApplication.js +0 -2
  54. package/src/api/events/frame.d.ts +0 -30
  55. package/src/api/events/frame.js +0 -2
  56. package/src/api/events/globalHotkey.d.ts +0 -20
  57. package/src/api/events/globalHotkey.js +0 -2
  58. package/src/api/events/platform.d.ts +0 -26
  59. package/src/api/events/platform.js +0 -2
  60. package/src/api/events/system.d.ts +0 -113
  61. package/src/api/events/system.js +0 -2
  62. package/src/api/events/typedEventEmitter.d.ts +0 -20
  63. package/src/api/events/typedEventEmitter.js +0 -2
  64. package/src/api/events/view.d.ts +0 -82
  65. package/src/api/events/view.js +0 -2
  66. package/src/api/events/webcontents.d.ts +0 -266
  67. package/src/api/events/webcontents.js +0 -2
  68. package/src/api/events/window.d.ts +0 -352
  69. package/src/api/events/window.js +0 -2
  70. package/src/api/external-application/Factory.d.ts +0 -27
  71. package/src/api/external-application/Factory.js +0 -40
  72. package/src/api/external-application/Instance.d.ts +0 -102
  73. package/src/api/external-application/Instance.js +0 -109
  74. package/src/api/external-application/index.d.ts +0 -3
  75. package/src/api/external-application/index.js +0 -19
  76. package/src/api/fin.d.ts +0 -51
  77. package/src/api/fin.js +0 -42
  78. package/src/api/frame/Factory.d.ts +0 -37
  79. package/src/api/frame/Factory.js +0 -69
  80. package/src/api/frame/Instance.d.ts +0 -123
  81. package/src/api/frame/Instance.js +0 -130
  82. package/src/api/frame/index.d.ts +0 -3
  83. package/src/api/frame/index.js +0 -19
  84. package/src/api/global-hotkey/index.d.ts +0 -38
  85. package/src/api/global-hotkey/index.js +0 -64
  86. package/src/api/interappbus/channel/channel.d.ts +0 -28
  87. package/src/api/interappbus/channel/channel.js +0 -77
  88. package/src/api/interappbus/channel/channels-docs.d.ts +0 -340
  89. package/src/api/interappbus/channel/channels-docs.js +0 -398
  90. package/src/api/interappbus/channel/client.d.ts +0 -24
  91. package/src/api/interappbus/channel/client.js +0 -89
  92. package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
  93. package/src/api/interappbus/channel/connection-manager.js +0 -246
  94. package/src/api/interappbus/channel/index.d.ts +0 -25
  95. package/src/api/interappbus/channel/index.js +0 -169
  96. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
  97. package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
  98. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
  99. package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
  100. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
  101. package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
  102. package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
  103. package/src/api/interappbus/channel/protocols/index.js +0 -2
  104. package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
  105. package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
  106. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
  107. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
  108. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
  109. package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
  110. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
  111. package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
  112. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
  113. package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
  114. package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
  115. package/src/api/interappbus/channel/protocols/strategy.js +0 -2
  116. package/src/api/interappbus/channel/provider.d.ts +0 -34
  117. package/src/api/interappbus/channel/provider.js +0 -166
  118. package/src/api/interappbus/index.d.ts +0 -85
  119. package/src/api/interappbus/index.js +0 -175
  120. package/src/api/interop/Factory.d.ts +0 -37
  121. package/src/api/interop/Factory.js +0 -76
  122. package/src/api/interop/InteropBroker.d.ts +0 -437
  123. package/src/api/interop/InteropBroker.js +0 -1085
  124. package/src/api/interop/InteropClient.d.ts +0 -278
  125. package/src/api/interop/InteropClient.js +0 -459
  126. package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
  127. package/src/api/interop/SessionContextGroupBroker.js +0 -108
  128. package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
  129. package/src/api/interop/SessionContextGroupClient.js +0 -86
  130. package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
  131. package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
  132. package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
  133. package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
  134. package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -208
  135. package/src/api/interop/fdc3/fdc3-1.2.js +0 -438
  136. package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -301
  137. package/src/api/interop/fdc3/fdc3-2.0.js +0 -482
  138. package/src/api/interop/fdc3/fdc3.d.ts +0 -12
  139. package/src/api/interop/fdc3/fdc3.js +0 -35
  140. package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
  141. package/src/api/interop/fdc3/overrideCheck.js +0 -32
  142. package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
  143. package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
  144. package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
  145. package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
  146. package/src/api/interop/fdc3/utils.d.ts +0 -45
  147. package/src/api/interop/fdc3/utils.js +0 -239
  148. package/src/api/interop/fdc3/versions.d.ts +0 -1
  149. package/src/api/interop/fdc3/versions.js +0 -2
  150. package/src/api/interop/index.d.ts +0 -4
  151. package/src/api/interop/index.js +0 -20
  152. package/src/api/interop/utils.d.ts +0 -18
  153. package/src/api/interop/utils.js +0 -61
  154. package/src/api/me.d.ts +0 -40
  155. package/src/api/me.js +0 -134
  156. package/src/api/platform/Factory.d.ts +0 -115
  157. package/src/api/platform/Factory.js +0 -184
  158. package/src/api/platform/Instance.d.ts +0 -150
  159. package/src/api/platform/Instance.js +0 -332
  160. package/src/api/platform/common-utils.d.ts +0 -7
  161. package/src/api/platform/common-utils.js +0 -16
  162. package/src/api/platform/index.d.ts +0 -3
  163. package/src/api/platform/index.js +0 -19
  164. package/src/api/platform/layout/Factory.d.ts +0 -114
  165. package/src/api/platform/layout/Factory.js +0 -174
  166. package/src/api/platform/layout/Instance.d.ts +0 -57
  167. package/src/api/platform/layout/Instance.js +0 -126
  168. package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
  169. package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
  170. package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
  171. package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
  172. package/src/api/platform/layout/entities/layout-entities.d.ts +0 -235
  173. package/src/api/platform/layout/entities/layout-entities.js +0 -312
  174. package/src/api/platform/layout/entities/shapes.d.ts +0 -6
  175. package/src/api/platform/layout/entities/shapes.js +0 -2
  176. package/src/api/platform/layout/index.d.ts +0 -2
  177. package/src/api/platform/layout/index.js +0 -18
  178. package/src/api/platform/layout/layout.constants.d.ts +0 -1
  179. package/src/api/platform/layout/layout.constants.js +0 -4
  180. package/src/api/platform/layout/shapes.d.ts +0 -16
  181. package/src/api/platform/layout/shapes.js +0 -2
  182. package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
  183. package/src/api/platform/layout/utils/layout-traversal.js +0 -65
  184. package/src/api/platform/provider.d.ts +0 -163
  185. package/src/api/platform/provider.js +0 -2
  186. package/src/api/snapshot-source/Factory.d.ts +0 -38
  187. package/src/api/snapshot-source/Factory.js +0 -66
  188. package/src/api/snapshot-source/Instance.d.ts +0 -31
  189. package/src/api/snapshot-source/Instance.js +0 -132
  190. package/src/api/snapshot-source/index.d.ts +0 -3
  191. package/src/api/snapshot-source/index.js +0 -19
  192. package/src/api/snapshot-source/utils.d.ts +0 -2
  193. package/src/api/snapshot-source/utils.js +0 -6
  194. package/src/api/system/index.d.ts +0 -517
  195. package/src/api/system/index.js +0 -895
  196. package/src/api/view/Factory.d.ts +0 -50
  197. package/src/api/view/Factory.js +0 -103
  198. package/src/api/view/Instance.d.ts +0 -487
  199. package/src/api/view/Instance.js +0 -557
  200. package/src/api/view/index.d.ts +0 -3
  201. package/src/api/view/index.js +0 -19
  202. package/src/api/webcontents/main.d.ts +0 -32
  203. package/src/api/webcontents/main.js +0 -156
  204. package/src/api/window/Factory.d.ts +0 -45
  205. package/src/api/window/Factory.js +0 -91
  206. package/src/api/window/Instance.d.ts +0 -1090
  207. package/src/api/window/Instance.js +0 -1349
  208. package/src/api/window/index.d.ts +0 -3
  209. package/src/api/window/index.js +0 -19
  210. package/src/browser.d.ts +0 -10
  211. package/src/browser.js +0 -36
  212. package/src/environment/browser.d.ts +0 -29
  213. package/src/environment/browser.js +0 -60
  214. package/src/environment/environment.d.ts +0 -33
  215. package/src/environment/environment.js +0 -4
  216. package/src/environment/mockEnvironment.d.ts +0 -27
  217. package/src/environment/mockEnvironment.js +0 -61
  218. package/src/environment/node-env.d.ts +0 -29
  219. package/src/environment/node-env.js +0 -72
  220. package/src/fdc3.d.ts +0 -3
  221. package/src/fdc3.js +0 -9
  222. package/src/mock.d.ts +0 -3
  223. package/src/mock.js +0 -18
  224. package/src/namespaces.d.ts +0 -21
  225. package/src/namespaces.js +0 -24
  226. package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
  227. package/src/shapes/ERROR_BOX_TYPES.js +0 -2
  228. package/src/shapes/WebOptions.d.ts +0 -13
  229. package/src/shapes/WebOptions.js +0 -2
  230. package/src/shapes/WindowOptions.d.ts +0 -43
  231. package/src/shapes/WindowOptions.js +0 -2
  232. package/src/shapes/protocol.d.ts +0 -200
  233. package/src/shapes/protocol.js +0 -2
  234. package/src/transport/mockWire.d.ts +0 -11
  235. package/src/transport/mockWire.js +0 -26
  236. package/src/transport/transport-errors.d.ts +0 -31
  237. package/src/transport/transport-errors.js +0 -79
  238. package/src/transport/transport.d.ts +0 -73
  239. package/src/transport/transport.js +0 -219
  240. package/src/transport/wire.d.ts +0 -77
  241. package/src/transport/wire.js +0 -36
  242. package/src/util/asyncFilter.d.ts +0 -1
  243. package/src/util/asyncFilter.js +0 -7
  244. package/src/util/channel-api-relay.d.ts +0 -13
  245. package/src/util/channel-api-relay.js +0 -47
  246. package/src/util/errors.d.ts +0 -10
  247. package/src/util/errors.js +0 -12
  248. package/src/util/exhaustive.d.ts +0 -1
  249. package/src/util/exhaustive.js +0 -7
  250. package/src/util/http.d.ts +0 -11
  251. package/src/util/http.js +0 -90
  252. package/src/util/inaccessibleObject.d.ts +0 -2
  253. package/src/util/inaccessibleObject.js +0 -49
  254. package/src/util/lazy.d.ts +0 -34
  255. package/src/util/lazy.js +0 -54
  256. package/src/util/normalize-config.d.ts +0 -3
  257. package/src/util/normalize-config.js +0 -52
  258. package/src/util/promises.d.ts +0 -5
  259. package/src/util/promises.js +0 -27
  260. package/src/util/ref-counter.d.ts +0 -7
  261. package/src/util/ref-counter.js +0 -52
  262. package/src/util/reversible-map.d.ts +0 -11
  263. package/src/util/reversible-map.js +0 -49
  264. package/src/util/runtimeVersioning.d.ts +0 -3
  265. package/src/util/runtimeVersioning.js +0 -25
  266. package/src/util/utilTypes.d.ts +0 -8
  267. package/src/util/utilTypes.js +0 -2
  268. package/src/util/validate.d.ts +0 -3
  269. package/src/util/validate.js +0 -11
@@ -1,230 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const base_1 = require("../base");
4
- const validate_1 = require("../../util/validate");
5
- const Instance_1 = require("./Instance");
6
- /**
7
- * @PORTED
8
- * @typedef {object} ApplicationOptions
9
- * @summary Application creation options.
10
- * @desc This is the options object required by {@link Application.start Application.start}.
11
- *
12
- * The following options are required:
13
- * * `uuid` is required in the app manifest as well as by {@link Application.start Application.start}
14
- * * `name` is optional in the app manifest but required by {@link Application.start Application.start}
15
- * * `url` is optional in both the app manifest {@link Application.start Application.start} and but is usually given
16
- * (defaults to `"about:blank"` when omitted).
17
- *
18
- * _This jsdoc typedef mirrors the `ApplicationOption` TypeScript interface in `@types/openfin`._
19
- *
20
- * **IMPORTANT NOTE:**
21
- * This object inherits all the properties of the window creation {@link Window~options options} object,
22
- * which will take priority over those of the same name that may be provided in `mainWindowOptions`.
23
- *
24
- * @property {boolean} [disableIabSecureLogging=false]
25
- * When set to `true` it will disable IAB secure logging for the app.
26
- *
27
- * @property {string} [loadErrorMessage="There was an error loading the application."]
28
- * An error message to display when the application (launched via manifest) fails to load.
29
- * A dialog box will be launched with the error message just before the runtime exits.
30
- * Load fails such as failed DNS resolutions or aborted connections as well as cancellations, _e.g.,_ `window.stop()`,
31
- * will trigger this dialog.
32
- * Client response codes such as `404 Not Found` are not treated as fails as they are valid server responses.
33
- *
34
- * @property {Window~options} [mainWindowOptions]
35
- * The options of the main window of the application.
36
- * For a description of these options, click the link (in the Type column).
37
- *
38
- * @property {number} [maxViewPoolSize=1000]
39
- * Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed.
40
- * If you do not wish for views to be pooled on your platform, set this property to zero.
41
- *
42
- * @property {boolean} [preventQuitOnLastWindowClosed=false]
43
- * Platforms Only. Prevent the Platform Provider from quitting automatically when the last Platform Window is closed.
44
- * Note: if the Platform Provider is showing, it won't close automatically.
45
- * If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.
46
- *
47
- * @property {string} [name]
48
- * The name of the application (and the application's main window).
49
- *
50
- * If provided, _must_ match `uuid`.
51
- *
52
- * @property {boolean} [nonPersistent=false]
53
- * A flag to configure the application as non-persistent.
54
- * Runtime exits when there are no persistent apps running.
55
- *
56
- * @property {boolean} [plugins=false]
57
- * Enable Flash at the application level.
58
- *
59
- * @property {boolean} [spellCheck=false]
60
- * Enable spell check at the application level.
61
- *
62
- * @property {string} [url="about:blank"]
63
- * The url to the application (specifically the application's main window).
64
- *
65
- * @property {boolean} [enableJumpList=false]
66
- * Enables the use of the Jumplists API and the 'pin to taskbar' functionality.
67
- * Only relevant in Windows.
68
- *
69
- * @property {string} uuid
70
- * The _Unique Universal Identifier_ (UUID) of the application, unique within the set of all other applications
71
- * running in the OpenFin Runtime.
72
- *
73
- * Note that `name` and `uuid` must match.
74
- *
75
- * @property {boolean} [webSecurity=true]
76
- * When set to `false` it will disable the same-origin policy for the app.
77
- */
78
- /**
79
- * @lends Application
80
- */
81
- class ApplicationModule extends base_1.Base {
82
- /**
83
- * Asynchronously returns an Application object that represents an existing application.
84
- * @param { Identity } identity
85
- * @return {Promise.<Application>}
86
- * @tutorial Application.wrap
87
- * @static
88
- */
89
- async wrap(identity) {
90
- this.wire.sendAction('wrap-application').catch((e) => {
91
- // we do not want to expose this error, just continue if this analytics-only call fails
92
- });
93
- const errorMsg = (0, validate_1.validateIdentity)(identity);
94
- if (errorMsg) {
95
- throw new Error(errorMsg);
96
- }
97
- return new Instance_1.Application(this.wire, identity);
98
- }
99
- /**
100
- * Synchronously returns an Application object that represents an existing application.
101
- * @param { Identity } identity
102
- * @return {Application}
103
- * @tutorial Application.wrapSync
104
- * @static
105
- */
106
- wrapSync(identity) {
107
- this.wire.sendAction('wrap-application-sync').catch((e) => {
108
- // we do not want to expose this error, just continue if this analytics-only call fails
109
- });
110
- const errorMsg = (0, validate_1.validateIdentity)(identity);
111
- if (errorMsg) {
112
- throw new Error(errorMsg);
113
- }
114
- return new Instance_1.Application(this.wire, identity);
115
- }
116
- async _create(appOptions) {
117
- // set defaults:
118
- if (appOptions.waitForPageLoad === undefined) {
119
- appOptions.waitForPageLoad = false;
120
- }
121
- if (appOptions.autoShow === undefined && appOptions.isPlatformController === undefined) {
122
- appOptions.autoShow = true;
123
- }
124
- await this.wire.sendAction('create-application', appOptions);
125
- return this.wrap({ uuid: appOptions.uuid });
126
- }
127
- /**
128
- * DEPRECATED method to create a new Application. Use {@link Application.start} instead.
129
- * @param { ApplicationOptions } appOptions
130
- * @return {Promise.<Application>}
131
- * @tutorial Application.create
132
- * @ignore
133
- */
134
- create(appOptions) {
135
- console.warn('Deprecation Warning: fin.Application.create is deprecated. Please use fin.Application.start');
136
- this.wire.sendAction('application-create').catch((e) => {
137
- // we do not want to expose this error, just continue if this analytics-only call fails
138
- });
139
- return this._create(appOptions);
140
- }
141
- /**
142
- * Creates and starts a new Application.
143
- * @param { ApplicationOptions } appOptions
144
- * @return {Promise.<Application>}
145
- * @tutorial Application.start
146
- * @static
147
- */
148
- async start(appOptions) {
149
- this.wire.sendAction('start-application').catch((e) => {
150
- // we do not want to expose this error, just continue if this analytics-only call fails
151
- });
152
- const app = await this._create(appOptions);
153
- await this.wire.sendAction('run-application', { uuid: appOptions.uuid });
154
- return app;
155
- }
156
- /**
157
- * Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls.
158
- * Returns once the RVM is finished attempting to launch the applications.
159
- * @param { Array.<ManifestInfo> } applications
160
- * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
161
- * @return {Promise.<void>}
162
- * @static
163
- * @tutorial Application.startManyManifests
164
- * @experimental
165
- */
166
- async startManyManifests(applications, opts) {
167
- return this.wire.sendAction('run-applications', { applications, opts }).then(() => undefined);
168
- }
169
- /**
170
- * Asynchronously returns an Application object that represents the current application
171
- * @return {Promise.<Application>}
172
- * @tutorial Application.getCurrent
173
- * @static
174
- */
175
- getCurrent() {
176
- this.wire.sendAction('get-current-application').catch((e) => {
177
- // we do not want to expose this error, just continue if this analytics-only call fails
178
- });
179
- return this.wrap({ uuid: this.wire.me.uuid });
180
- }
181
- /**
182
- * Synchronously returns an Application object that represents the current application
183
- * @return {Application}
184
- * @tutorial Application.getCurrentSync
185
- * @static
186
- */
187
- getCurrentSync() {
188
- this.wire.sendAction('get-current-application-sync').catch((e) => {
189
- // we do not want to expose this error, just continue if this analytics-only call fails
190
- });
191
- return this.wrapSync({ uuid: this.wire.me.uuid });
192
- }
193
- /**
194
- * Retrieves application's manifest and returns a running instance of the application.
195
- * @param {string} manifestUrl - The URL of app's manifest.
196
- * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
197
- * @return {Promise.<Application>}
198
- * @tutorial Application.startFromManifest
199
- * @static
200
- */
201
- async startFromManifest(manifestUrl, opts) {
202
- this.wire.sendAction('application-start-from-manifest').catch((e) => {
203
- // we do not want to expose this error, just continue if this analytics-only call fails
204
- });
205
- const app = await this._createFromManifest(manifestUrl);
206
- // @ts-expect-error using private method without warning.
207
- await app._run(opts); // eslint-disable-line no-underscore-dangle
208
- return app;
209
- }
210
- createFromManifest(manifestUrl) {
211
- console.warn('Deprecation Warning: fin.Application.createFromManifest is deprecated. Please use fin.Application.startFromManifest');
212
- this.wire.sendAction('application-create-from-manifest').catch((e) => {
213
- // we do not want to expose this error, just continue if this analytics-only call fails
214
- });
215
- return this._createFromManifest(manifestUrl);
216
- }
217
- _createFromManifest(manifestUrl) {
218
- return this.wire
219
- .sendAction('get-application-manifest', { manifestUrl })
220
- .then(({ payload }) => {
221
- const uuid = payload.data.platform ? payload.data.platform.uuid : payload.data.startup_app.uuid;
222
- return this.wrap({ uuid });
223
- })
224
- .then((app) => {
225
- app._manifestUrl = manifestUrl; // eslint-disable-line no-underscore-dangle
226
- return app;
227
- });
228
- }
229
- }
230
- exports.default = ApplicationModule;
@@ -1,321 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { EmitterBase } from '../base';
3
- import { Transport } from '../../transport/transport';
4
- /**
5
- * @classdesc An object representing an application. Allows the developer to create,
6
- * execute, show/close an application as well as listen to <a href="tutorial-Application.EventEmitter.html">application events</a>.
7
- * @class
8
- * @hideconstructor
9
- */
10
- export declare class Application extends EmitterBase<OpenFin.ApplicationEvent> {
11
- identity: OpenFin.ApplicationIdentity;
12
- _manifestUrl?: string;
13
- private window;
14
- constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
15
- private windowListFromIdentityList;
16
- /**
17
- * Adds a listener to the end of the listeners array for the specified event.
18
- * @param { string | symbol } eventType - The type of the event.
19
- * @param { Function } listener - Called whenever an event of the specified type occurs.
20
- * @param { SubOptions } [options] - Option to support event timestamps.
21
- * @return {Promise.<this>}
22
- * @function addListener
23
- * @memberof Application
24
- * @instance
25
- * @tutorial Application.EventEmitter
26
- */
27
- /**
28
- * Adds a listener to the end of the listeners array for the specified event.
29
- * @param { string | symbol } eventType - The type of the event.
30
- * @param { Function } listener - Called whenever an event of the specified type occurs.
31
- * @param { SubOptions } [options] - Option to support event timestamps.
32
- * @return {Promise.<this>}
33
- * @function on
34
- * @memberof Application
35
- * @instance
36
- * @tutorial Application.EventEmitter
37
- */
38
- /**
39
- * 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.
40
- * @param { string | symbol } eventType - The type of the event.
41
- * @param { Function } listener - The callback function.
42
- * @param { SubOptions } [options] - Option to support event timestamps.
43
- * @return {Promise.<this>}
44
- * @function once
45
- * @memberof Application
46
- * @instance
47
- * @tutorial Application.EventEmitter
48
- */
49
- /**
50
- * Adds a listener to the beginning of the listeners array for the specified event.
51
- * @param { string | symbol } eventType - The type of the event.
52
- * @param { Function } listener - The callback function.
53
- * @param { SubOptions } [options] - Option to support event timestamps.
54
- * @return {Promise.<this>}
55
- * @function prependListener
56
- * @memberof Application
57
- * @instance
58
- * @tutorial Application.EventEmitter
59
- */
60
- /**
61
- * 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.
62
- * The listener is added to the beginning of the listeners array.
63
- * @param { string | symbol } eventType - The type of the event.
64
- * @param { Function } listener - The callback function.
65
- * @param { SubOptions } [options] - Option to support event timestamps.
66
- * @return {Promise.<this>}
67
- * @function prependOnceListener
68
- * @memberof Application
69
- * @instance
70
- * @tutorial Application.EventEmitter
71
- */
72
- /**
73
- * Remove a listener from the listener array for the specified event.
74
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
75
- * @param { string | symbol } eventType - The type of the event.
76
- * @param { Function } listener - The callback function.
77
- * @param { SubOptions } [options] - Option to support event timestamps.
78
- * @return {Promise.<this>}
79
- * @function removeListener
80
- * @memberof Application
81
- * @instance
82
- * @tutorial Application.EventEmitter
83
- */
84
- /**
85
- * Removes all listeners, or those of the specified event.
86
- * @param { string | symbol } [eventType] - The type of the event.
87
- * @return {Promise.<this>}
88
- * @function removeAllListeners
89
- * @memberof Application
90
- * @instance
91
- * @tutorial Application.EventEmitter
92
- */
93
- /**
94
- * Determines if the application is currently running.
95
- * @return {Promise.<boolean>}
96
- * @tutorial Application.isRunning
97
- */
98
- /**
99
- * JumpListCategory interface
100
- * @typedef { object } JumpListCategory
101
- * @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.
102
- * @property { JumpListItem[] } items Array of JumpListItem objects
103
- */
104
- /**
105
- * @PORTED
106
- * JumpListItem interface
107
- * @typedef { object } JumpListItem
108
- * @property { string } type One of the following: "task" or "separator". Defaults to task.
109
- * @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
110
- * @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
111
- * @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.
112
- * @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).
113
- * @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.
114
- */
115
- isRunning(): Promise<boolean>;
116
- /**
117
- * Closes the application and any child windows created by the application.
118
- * Cleans the application from state so it is no longer found in getAllApplications.
119
- * @param { boolean } [force = false] Close will be prevented from closing when force is false and
120
- * ‘close-requested’ has been subscribed to for application’s main window.
121
- * @return {Promise.<boolean>}
122
- * @tutorial Application.quit
123
- */
124
- quit(force?: boolean): Promise<void>;
125
- private _close;
126
- close(force?: boolean): Promise<void>;
127
- /**
128
- * Retrieves an array of wrapped fin.Windows for each of the application’s child windows.
129
- * @return {Promise.Array.<_Window>}
130
- * @tutorial Application.getChildWindows
131
- */
132
- getChildWindows(): Promise<Array<OpenFin.Window>>;
133
- /**
134
- * Retrieves the JSON manifest that was used to create the application. Invokes the error callback
135
- * if the application was not created from a manifest.
136
- * @return {Promise.<Manifest>}
137
- * @tutorial Application.getManifest
138
- */
139
- getManifest(): Promise<OpenFin.Manifest>;
140
- /**
141
- * Retrieves UUID of the application that launches this application. Invokes the error callback
142
- * if the application was created from a manifest.
143
- * @return {Promise.<string>}
144
- * @tutorial Application.getParentUuid
145
- */
146
- getParentUuid(): Promise<string>;
147
- /**
148
- * Retrieves current application's shortcut configuration.
149
- * @return {Promise.<ShortCutConfig>}
150
- * @tutorial Application.getShortcuts
151
- */
152
- getShortcuts(): Promise<OpenFin.ShortCutConfig>;
153
- /**
154
- * Retrieves current application's views.
155
- * @experimental
156
- * @return {Promise.Array.<View>}
157
- * @tutorial Application.getViews
158
- */
159
- getViews(): Promise<Array<OpenFin.View>>;
160
- /**
161
- * Returns the current zoom level of the application.
162
- * @return {Promise.<number>}
163
- * @tutorial Application.getZoomLevel
164
- */
165
- getZoomLevel(): Promise<number>;
166
- /**
167
- * Returns an instance of the main Window of the application
168
- * @return {Promise.<_Window>}
169
- * @tutorial Application.getWindow
170
- */
171
- getWindow(): Promise<OpenFin.Window>;
172
- /**
173
- * Manually registers a user with the licensing service. The only data sent by this call is userName and appName.
174
- * @param { string } userName - username to be passed to the RVM.
175
- * @param { string } appName - app name to be passed to the RVM.
176
- * @return {Promise.<void>}
177
- * @tutorial Application.registerUser
178
- */
179
- registerUser(userName: string, appName: string): Promise<void>;
180
- /**
181
- * Removes the application’s icon from the tray.
182
- * @return {Promise.<void>}
183
- * @tutorial Application.removeTrayIcon
184
- */
185
- removeTrayIcon(): Promise<void>;
186
- /**
187
- * Restarts the application.
188
- * @return {Promise.<void>}
189
- * @tutorial Application.restart
190
- */
191
- restart(): Promise<void>;
192
- /**
193
- * DEPRECATED method to run the application.
194
- * Needed when starting application via {@link Application.create}, but NOT needed when starting via {@link Application.start}.
195
- * @return {Promise.<void>}
196
- * @tutorial Application.run
197
- * @ignore
198
- */
199
- run(): Promise<void>;
200
- private _run;
201
- /**
202
- * Instructs the RVM to schedule one restart of the application.
203
- * @return {Promise.<void>}
204
- * @tutorial Application.scheduleRestart
205
- */
206
- scheduleRestart(): Promise<void>;
207
- /**
208
- * Sends a message to the RVM to upload the application's logs. On success,
209
- * an object containing logId is returned.
210
- * @return {Promise.<SendApplicationLogResponse>}
211
- * @tutorial Application.sendApplicationLog
212
- */
213
- sendApplicationLog(): Promise<OpenFin.SendApplicationLogResponse>;
214
- /**
215
- * Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
216
- * If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
217
- * Note: If the "name" property is omitted it defaults to "tasks".
218
- * @param { Array.<JumpListCategory> | null } jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
219
- * @return { Promise.<void> }
220
- * @tutorial Application.setJumpList
221
- */
222
- setJumpList(jumpListCategories: OpenFin.JumpListCategory[] | null): Promise<void>;
223
- /**
224
- * Adds a customizable icon in the system tray. To listen for a click on the icon use the `tray-icon-clicked` event.
225
- * @param { string } icon Image URL or base64 encoded string to be used as the icon
226
- * @return {Promise.<void>}
227
- * @tutorial Application.setTrayIcon
228
- */
229
- setTrayIcon(icon: string): Promise<void>;
230
- /**
231
- * Sets new application's shortcut configuration. Windows only.
232
- * @param { ShortCutConfig } config New application's shortcut configuration.
233
- * @param { boolean } [config.desktop] - Enable/disable desktop shortcut.
234
- * @param { boolean } [config.startMenu] - Enable/disable start menu shortcut.
235
- * @param { boolean } [config.systemStartup] - Enable/disable system startup shortcut.
236
- * @return {Promise.<void>}
237
- * @tutorial Application.setShortcuts
238
- */
239
- setShortcuts(config: OpenFin.ShortCutConfig): Promise<void>;
240
- /**
241
- * Sets the query string in all shortcuts for this app. Requires RVM 5.5+.
242
- * @param { string } queryString The new query string for this app's shortcuts.
243
- * @return {Promise.<void>}
244
- * @tutorial Application.setShortcutQueryParams
245
- */
246
- setShortcutQueryParams(queryString: string): Promise<void>;
247
- /**
248
- * Sets the zoom level of the application. The original size is 0 and each increment above or below represents zooming 20%
249
- * larger or smaller to default limits of 300% and 50% of original size, respectively.
250
- * @param { number } level The zoom level
251
- * @return {Promise.<void>}
252
- * @tutorial Application.setZoomLevel
253
- */
254
- setZoomLevel(level: number): Promise<void>;
255
- /**
256
- * Sets a username to correlate with App Log Management.
257
- * @param { string } username Username to correlate with App's Log.
258
- * @return {Promise.<void>}
259
- * @tutorial Application.setAppLogUsername
260
- */
261
- setAppLogUsername(username: string): Promise<void>;
262
- /**
263
- * @summary Retrieves information about the system tray. If the system tray is not set, it will throw an error message.
264
- * @desc The only information currently returned is the position and dimensions.
265
- * @return {Promise.<TrayInfo>}
266
- * @tutorial Application.getTrayIconInfo
267
- */
268
- getTrayIconInfo(): Promise<OpenFin.TrayInfo>;
269
- /**
270
- * @summary Checks if the application has an associated tray icon.
271
- * @return {Promise.<boolean>}
272
- * @tutorial Application.hasTrayIcon
273
- */
274
- hasTrayIcon(): Promise<boolean>;
275
- /**
276
- * Closes the application by terminating its process.
277
- * @return {Promise.<void>}
278
- * @tutorial Application.terminate
279
- */
280
- terminate(): Promise<void>;
281
- /**
282
- * Waits for a hanging application. This method can be called in response to an application
283
- * "not-responding" to allow the application to continue and to generate another "not-responding"
284
- * message after a certain period of time.
285
- * @return {Promise.<void>}
286
- * @ignore
287
- */
288
- wait(): Promise<void>;
289
- /**
290
- * Retrieves information about the application.
291
- * @return {Promise.<ApplicationInfo>}
292
- * @tutorial Application.getInfo
293
- */
294
- getInfo(): Promise<OpenFin.ApplicationInfo>;
295
- /**
296
- * Retrieves all process information for entities (windows and views) associated with an application.
297
- * @return {Promise.<AppProcessInfo>}
298
- * @tutorial Application.getProcessInfo
299
- * @experimental
300
- */
301
- getProcessInfo(): Promise<OpenFin.AppProcessInfo>;
302
- /**
303
- * Sets file auto download location. It's only allowed in the same application.
304
- * Note: This method is restricted by default and must be enabled via
305
- * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
306
- * @param { string } downloadLocation file auto download location
307
- * @return {Promise.<void>}
308
- * @throws if setting file auto download location on different applications.
309
- * @tutorial Application.setFileDownloadLocation
310
- */
311
- setFileDownloadLocation(downloadLocation: string): Promise<void>;
312
- /**
313
- * 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.
314
- * Note: This method is restricted by default and must be enabled via
315
- * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
316
- * @return {Promise.<string>}
317
- * @throws if getting file auto download location on different applications.
318
- * @tutorial Application.getFileDownloadLocation
319
- */
320
- getFileDownloadLocation(): Promise<string>;
321
- }