@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,115 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { Transport } from '../../transport/transport';
3
- import { Base } from '../base';
4
- import { LayoutModule } from './layout/index';
5
- type Channel = OpenFin.Fin['InterApplicationBus']['Channel'];
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
- export default class PlatformModule extends Base {
52
- private _channel;
53
- Layout: LayoutModule;
54
- constructor(wire: Transport, channel: Channel);
55
- /**
56
- * Initializes a Platform. Must be called from the Provider when using a custom provider.
57
- * @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace
58
- * default Provider behavior.
59
- * @return {Promise.<void>}
60
- * @tutorial Platform.init
61
- * @experimental
62
- * @static
63
- */
64
- init(options?: OpenFin.InitPlatformOptions): Promise<void>;
65
- /**
66
- * Asynchronously returns a Platform object that represents an existing platform.
67
- * @param { Identity } identity
68
- * @return {Promise.<Platform>}
69
- * @tutorial Platform.wrap
70
- * @static
71
- */
72
- wrap(identity: OpenFin.ApplicationIdentity): Promise<OpenFin.Platform>;
73
- /**
74
- * Synchronously returns a Platform object that represents an existing platform.
75
- * @param { Identity } identity
76
- * @return {Platform}
77
- * @tutorial Platform.wrapSync
78
- * @static
79
- */
80
- wrapSync(identity: OpenFin.ApplicationIdentity): OpenFin.Platform;
81
- /**
82
- * Asynchronously returns a Platform object that represents the current platform.
83
- * @return {Promise.<Platform>}
84
- * @tutorial Platform.getCurrent
85
- * @static
86
- */
87
- getCurrent(): Promise<OpenFin.Platform>;
88
- /**
89
- * Synchronously returns a Platform object that represents the current platform.
90
- * @return {Platform}
91
- * @tutorial Platform.getCurrentSync
92
- * @static
93
- */
94
- getCurrentSync(): OpenFin.Platform;
95
- /**
96
- * Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
97
- * be used to launch content into the platform. Promise will reject if the platform is already running.
98
- * @param { PlatformOptions } platformOptions
99
- * @return {Promise.<Platform>}
100
- * @tutorial Platform.start
101
- * @static
102
- */
103
- start(platformOptions: OpenFin.PlatformOptions): Promise<OpenFin.Platform>;
104
- /**
105
- * Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
106
- * it will be launched into the platform.
107
- * @param {string} manifestUrl - The URL of platform's manifest.
108
- * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
109
- * @return {Promise.<Platform>}
110
- * @tutorial Platform.startFromManifest
111
- * @static
112
- */
113
- startFromManifest(manifestUrl: string, opts?: OpenFin.RvmLaunchOptions): Promise<OpenFin.Platform>;
114
- }
115
- export {};
@@ -1,184 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const base_1 = require("../base");
4
- const Instance_1 = require("./Instance");
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
- class PlatformModule extends base_1.Base {
52
- constructor(wire, channel) {
53
- super(wire);
54
- this._channel = channel;
55
- /**
56
- * @namespace
57
- * @desc Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
58
- * enables the initialization and manipulation of a window's Layout. A Layout will
59
- * <a href="tutorial-Layout.DOMEvents.html">emit events locally</a> on the DOM element representing the layout-container.
60
- */
61
- this.Layout = new index_1.LayoutModule(this.wire);
62
- }
63
- /**
64
- * Initializes a Platform. Must be called from the Provider when using a custom provider.
65
- * @param { InitPlatformOptions } [options] - platform options including a callback function that can be used to extend or replace
66
- * default Provider behavior.
67
- * @return {Promise.<void>}
68
- * @tutorial Platform.init
69
- * @experimental
70
- * @static
71
- */
72
- async init(options) {
73
- return this.wire.environment.initPlatform(this.fin, options);
74
- }
75
- /**
76
- * Asynchronously returns a Platform object that represents an existing platform.
77
- * @param { Identity } identity
78
- * @return {Promise.<Platform>}
79
- * @tutorial Platform.wrap
80
- * @static
81
- */
82
- async wrap(identity) {
83
- this.wire.sendAction('platform-wrap').catch((e) => {
84
- // don't expose
85
- });
86
- return new Instance_1.Platform({ uuid: identity.uuid }, this._channel);
87
- }
88
- /**
89
- * Synchronously returns a Platform object that represents an existing platform.
90
- * @param { Identity } identity
91
- * @return {Platform}
92
- * @tutorial Platform.wrapSync
93
- * @static
94
- */
95
- wrapSync(identity) {
96
- this.wire.sendAction('platform-wrap-sync').catch((e) => {
97
- // don't expose
98
- });
99
- return new Instance_1.Platform({ uuid: identity.uuid }, this._channel);
100
- }
101
- /**
102
- * Asynchronously returns a Platform object that represents the current platform.
103
- * @return {Promise.<Platform>}
104
- * @tutorial Platform.getCurrent
105
- * @static
106
- */
107
- async getCurrent() {
108
- this.wire.sendAction('platform-get-current').catch((e) => {
109
- // don't expose
110
- });
111
- return this.wrap({ uuid: this.wire.me.uuid });
112
- }
113
- /**
114
- * Synchronously returns a Platform object that represents the current platform.
115
- * @return {Platform}
116
- * @tutorial Platform.getCurrentSync
117
- * @static
118
- */
119
- getCurrentSync() {
120
- this.wire.sendAction('platform-get-current-sync').catch((e) => {
121
- // don't expose
122
- });
123
- return this.wrapSync({ uuid: this.wire.me.uuid });
124
- }
125
- /**
126
- * Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
127
- * be used to launch content into the platform. Promise will reject if the platform is already running.
128
- * @param { PlatformOptions } platformOptions
129
- * @return {Promise.<Platform>}
130
- * @tutorial Platform.start
131
- * @static
132
- */
133
- start(platformOptions) {
134
- this.wire.sendAction('platform-start').catch((e) => {
135
- // don't expose
136
- });
137
- // eslint-disable-next-line no-async-promise-executor
138
- return new Promise(async (resolve, reject) => {
139
- try {
140
- const { uuid } = platformOptions;
141
- // @ts-expect-error using private variable.
142
- const app = await this.fin.Application._create({ ...platformOptions, isPlatformController: true });
143
- // TODO: fix typing (internal)
144
- // @ts-expect-error
145
- app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid })));
146
- // @ts-expect-error using private variable.
147
- app._run({ uuid });
148
- }
149
- catch (e) {
150
- reject(e);
151
- }
152
- });
153
- }
154
- /**
155
- * Retrieves platforms's manifest and returns a wrapped and running Platform. If there is a snapshot in the manifest,
156
- * it will be launched into the platform.
157
- * @param {string} manifestUrl - The URL of platform's manifest.
158
- * @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
159
- * @return {Promise.<Platform>}
160
- * @tutorial Platform.startFromManifest
161
- * @static
162
- */
163
- startFromManifest(manifestUrl, opts) {
164
- this.wire.sendAction('platform-start-from-manifest').catch((e) => {
165
- // don't expose
166
- });
167
- // eslint-disable-next-line no-async-promise-executor
168
- return new Promise(async (resolve, reject) => {
169
- try {
170
- // @ts-expect-error using private variable.
171
- const app = await this.fin.Application._createFromManifest(manifestUrl);
172
- // TODO: fix typing (internal)
173
- // @ts-expect-error
174
- app.once('platform-api-ready', () => resolve(this.wrapSync({ uuid: app.identity.uuid })));
175
- // @ts-expect-error using private method without warning.
176
- app._run(opts);
177
- }
178
- catch (e) {
179
- reject(e);
180
- }
181
- });
182
- }
183
- }
184
- exports.default = PlatformModule;
@@ -1,150 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { EmitterBase } from '../base';
3
- type View = OpenFin.View;
4
- type Channel = OpenFin.Fin['InterApplicationBus']['Channel'];
5
- type ChannelClient = OpenFin.ChannelClient;
6
- type LayoutModule = OpenFin.Fin['Platform']['Layout'];
7
- /** Manages the life cycle of windows and views in the application.
8
- *
9
- * Enables taking snapshots of itself and applyi
10
- * ng them to restore a previous configuration
11
- * as well as listen to <a href="tutorial-Platform.EventEmitter.html">platform events</a>.
12
- * @namespace
13
- */
14
- export declare class Platform extends EmitterBase<OpenFin.PlatformEvent> {
15
- #private;
16
- Layout: LayoutModule;
17
- private _channel;
18
- Application: OpenFin.Application;
19
- identity: OpenFin.ApplicationIdentity;
20
- constructor(identity: OpenFin.ApplicationIdentity, channel: Channel);
21
- getClient: (identity?: OpenFin.ApplicationIdentity) => Promise<ChannelClient>;
22
- /**
23
- * Creates a new view and attaches it to a specified target window.
24
- * @param { View~options } viewOptions View creation options
25
- * @param { Identity } [target] The window to which the new view is to be attached. If no target, create a view in a new window.
26
- * @param { Identity } [targetView] If provided, the new view will be added to the same tabstrip as targetView.
27
- * @return { Promise<View> }
28
- * @tutorial Platform.createView
29
- */
30
- createView(viewOptions: OpenFin.PlatformViewCreationOptions, target?: OpenFin.CreateViewTarget, targetView?: OpenFin.Identity): Promise<View>;
31
- /**
32
- * Creates a new Window.
33
- * @param { Window~options } options Window creation options
34
- * @return { Promise<_Window> }
35
- * @tutorial Platform.createWindow
36
- */
37
- createWindow(options: OpenFin.PlatformWindowCreationOptions): Promise<OpenFin.Window & OpenFin.Identity>;
38
- /**
39
- * Closes current platform, all its windows, and their views.
40
- * @return { Promise<void> }
41
- * @tutorial Platform.quit
42
- */
43
- quit(): Promise<void>;
44
- /**
45
- * Closes a specified view in a target window.
46
- * @param { Identity } viewIdentity View identity
47
- * @return { Promise<void> }
48
- * @tutorial Platform.closeView
49
- */
50
- closeView(viewIdentity: OpenFin.Identity): Promise<void>;
51
- /**
52
- * ***DEPRECATED - please use Platform.createView.***
53
- * Reparents a specified view in a new target window.
54
- * @param { Identity } viewIdentity View identity
55
- * @param { Identity } target new owner window identity
56
- * @return { Promise<View> }
57
- * @tutorial Platform.createView
58
- */
59
- reparentView(viewIdentity: OpenFin.Identity, target: OpenFin.Identity): Promise<View>;
60
- /**
61
- * Returns a snapshot of the platform in its current state.
62
- *
63
- * Can be used to restore an application to a previous state.
64
- * @return { Promise<Snapshot> }
65
- * @tutorial Platform.getSnapshot
66
- */
67
- getSnapshot(): Promise<OpenFin.Snapshot>;
68
- /**
69
- * **NOTE**: Internal use only. It is not recommended to manage the state of individual views.
70
- *
71
- * Returns a snapshot of a single view's options in its current state.
72
- *
73
- * Can be used to restore a view to a previous state.
74
- *
75
- * @param { Identity } viewIdentity View identity
76
- * @returns { Promise<ViewState> }
77
- * @internal
78
- * @experimental
79
- * @tutorial Platform.getViewSnapshot
80
- */
81
- getViewSnapshot(viewIdentity: OpenFin.Identity): Promise<OpenFin.ViewState>;
82
- /**
83
- * Adds a snapshot to a running Platform.
84
- * Requested snapshot must be a valid Snapshot object, or a url or filepath to such an object.
85
- *
86
- * Can optionally close existing windows and overwrite current platform state with that of a snapshot.
87
- *
88
- * The function accepts either a snapshot taken using {@link Platform#getSnapshot getSnapshot},
89
- * or a url or filepath to a snapshot JSON object.
90
- * @param { Snapshot | string } requestedSnapshot Snapshot to apply, or a url or filepath.
91
- * @param { ApplySnapshotOptions } [options] Optional parameters to specify whether existing windows should be closed.
92
- * @return { Promise<Platform> }
93
- * @tutorial Platform.applySnapshot
94
- */
95
- applySnapshot(requestedSnapshot: OpenFin.Snapshot | string, options?: OpenFin.ApplySnapshotOptions): Promise<Platform>;
96
- /**
97
- * Fetches a JSON manifest using the browser process and returns a Javascript object.
98
- * Can be overwritten using {@link Platform#init Platform.init}.
99
- * @param { string } manifestUrl The URL of the manifest to fetch.
100
- * @return { Promise<any> }
101
- * @tutorial Platform.fetchManifest
102
- */
103
- fetchManifest(manifestUrl: string): Promise<any>;
104
- launchLegacyManifest: (manifestUrl: string) => Promise<Platform>;
105
- /**
106
- * Retrieves a manifest by url and launches a legacy application manifest or snapshot into the platform. Returns a promise that
107
- * resolves to the wrapped Platform.
108
- * @param {string} manifestUrl - The URL of the manifest that will be launched into the platform. If this app manifest
109
- * contains a snapshot, that will be launched into the platform. If not, the application described in startup_app options
110
- * will be launched into the platform. The applicable startup_app options will become {@link View~options View Options}.
111
- * @return {Promise<Platform>}
112
- * @tutorial Platform.launchContentManifest
113
- * @experimental
114
- */
115
- launchContentManifest(manifestUrl: string): Promise<Platform>;
116
- /**
117
- * Set the context of a host window. The context will be available to the window itself, and to its child Views. It will be saved in any platform snapshots.
118
- * It can be retrieved using {@link Platform#getWindowContext getWindowContext}.
119
- * @param {any} context - A field where serializable context data can be stored to be saved in platform snapshots.
120
- * @param {Identity} [target] - A target window or view may optionally be provided. If no target is provided, the update will be applied
121
- * to the current window (if called from a Window) or the current host window (if called from a View).
122
- * @return {Promise<void>}
123
- * @tutorial Platform.setWindowContext
124
- * @experimental
125
- */
126
- setWindowContext(context?: any, target?: OpenFin.Identity): Promise<void>;
127
- /**
128
- * Get the context context of a host window that was previously set using {@link Platform#setWindowContext setWindowContext}.
129
- * The context will be saved in any platform snapshots. Returns a promise that resolves to the context.
130
- * @param {Identity} [target] - A target window or view may optionally be provided. If no target is provided, target will be
131
- * the current window (if called from a Window) or the current host window (if called from a View).
132
- * @return {Promise<any>}
133
- * @tutorial Platform.getWindowContext
134
- * @experimental
135
- */
136
- getWindowContext(target?: OpenFin.Identity): Promise<any>;
137
- /**
138
- * Closes a window. If enableBeforeUnload is enabled in the Platform options, any beforeunload handler set on Views will fire
139
- * This behavior can be disabled by setting skipBeforeUnload to false in the options parameter.
140
- * @param {Identity} winId
141
- * @param {closeWindowoptions} [options]
142
- * @returns {Promise<void>}
143
- * @tutorial Platform.closeWindow
144
- * @experimental
145
- */
146
- closeWindow(windowId: OpenFin.Identity, options?: {
147
- skipBeforeUnload: boolean;
148
- }): Promise<void>;
149
- }
150
- export {};