@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
package/src/api/fin.d.ts DELETED
@@ -1,51 +0,0 @@
1
- /// <reference types="node" />
2
- import { EventEmitter } from 'events';
3
- import type * as OpenFin from '../OpenFin';
4
- import { Transport } from '../transport/transport';
5
- import System from './system/index';
6
- import _WindowModule from './window/index';
7
- import ApplicationModule from './application/index';
8
- import InterApplicationBus from './interappbus/index';
9
- import Clipboard from './clipboard/index';
10
- import ExternalApplicationModule from './external-application/index';
11
- import _FrameModule from './frame/index';
12
- import GlobalHotkey from './global-hotkey/index';
13
- import ViewModule from './view/index';
14
- import PlatformModule from './platform/index';
15
- import { Me } from './me';
16
- import InteropModule from './interop';
17
- import SnapshotSourceModule from './snapshot-source';
18
- type EntityType = OpenFin.EntityType;
19
- export interface FinApi<MeType extends EntityType> {
20
- readonly System: System;
21
- readonly Window: _WindowModule;
22
- readonly Application: ApplicationModule;
23
- readonly InterApplicationBus: InterApplicationBus;
24
- readonly Clipboard: Clipboard;
25
- readonly ExternalApplication: ExternalApplicationModule;
26
- readonly Frame: _FrameModule;
27
- readonly GlobalHotkey: GlobalHotkey;
28
- readonly View: ViewModule;
29
- readonly Platform: PlatformModule;
30
- readonly Interop: InteropModule;
31
- readonly SnapshotSource: SnapshotSourceModule;
32
- readonly me: Me<MeType>;
33
- }
34
- export default class Fin<MeType extends EntityType = EntityType> extends EventEmitter implements FinApi<MeType> {
35
- private wire;
36
- System: System;
37
- Window: _WindowModule;
38
- Application: ApplicationModule;
39
- InterApplicationBus: InterApplicationBus;
40
- Clipboard: Clipboard;
41
- ExternalApplication: ExternalApplicationModule;
42
- Frame: _FrameModule;
43
- GlobalHotkey: GlobalHotkey;
44
- View: ViewModule;
45
- Platform: PlatformModule;
46
- Interop: InteropModule;
47
- SnapshotSource: SnapshotSourceModule;
48
- readonly me: Me<MeType>;
49
- constructor(wire: Transport<MeType>);
50
- }
51
- export {};
package/src/api/fin.js DELETED
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const events_1 = require("events");
4
- // Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
5
- const index_1 = require("./system/index");
6
- const index_2 = require("./window/index");
7
- const index_3 = require("./application/index");
8
- const index_4 = require("./interappbus/index");
9
- const index_5 = require("./clipboard/index");
10
- const index_6 = require("./external-application/index");
11
- const index_7 = require("./frame/index");
12
- const index_8 = require("./global-hotkey/index");
13
- const index_9 = require("./view/index");
14
- const index_10 = require("./platform/index");
15
- const me_1 = require("./me");
16
- const interop_1 = require("./interop");
17
- const snapshot_source_1 = require("./snapshot-source");
18
- class Fin extends events_1.EventEmitter {
19
- constructor(wire) {
20
- super();
21
- this.wire = wire;
22
- this.System = new index_1.default(wire);
23
- this.Window = new index_2.default(wire);
24
- this.Application = new index_3.default(wire);
25
- this.InterApplicationBus = new index_4.default(wire);
26
- this.Clipboard = new index_5.default(wire);
27
- this.ExternalApplication = new index_6.default(wire);
28
- this.Frame = new index_7.default(wire);
29
- this.GlobalHotkey = new index_8.default(wire);
30
- this.Platform = new index_10.default(wire, this.InterApplicationBus.Channel);
31
- this.View = new index_9.default(wire);
32
- this.Interop = new interop_1.default(wire);
33
- this.SnapshotSource = new snapshot_source_1.default(wire);
34
- wire.registerFin(this);
35
- this.me = (0, me_1.getMe)(wire);
36
- // Handle disconnect events
37
- wire.on('disconnected', () => {
38
- this.emit('disconnected');
39
- });
40
- }
41
- }
42
- exports.default = Fin;
@@ -1,37 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { Base } from '../base';
3
- /**
4
- * @lends Frame
5
- */
6
- export default class _FrameModule extends Base {
7
- /**
8
- * Asynchronously returns a reference to the specified frame. The frame does not have to exist
9
- * @param {Identity} identity - the identity of the frame you want to wrap
10
- * @return {Promise.<_Frame>}
11
- * @tutorial Frame.wrap
12
- * @static
13
- */
14
- wrap(identity: OpenFin.Identity): Promise<OpenFin.Frame>;
15
- /**
16
- * Synchronously returns a reference to the specified frame. The frame does not have to exist
17
- * @param {Identity} identity - the identity of the frame you want to wrap
18
- * @return {_Frame}
19
- * @tutorial Frame.wrapSync
20
- * @static
21
- */
22
- wrapSync(identity: OpenFin.Identity): OpenFin.Frame;
23
- /**
24
- * Asynchronously returns a reference to the current frame
25
- * @return {Promise.<_Frame>}
26
- * @tutorial Frame.getCurrent
27
- * @static
28
- */
29
- getCurrent(): Promise<OpenFin.Frame>;
30
- /**
31
- * Synchronously returns a reference to the current frame
32
- * @return {_Frame}
33
- * @tutorial Frame.getCurrentSync
34
- * @static
35
- */
36
- getCurrentSync(): OpenFin.Frame;
37
- }
@@ -1,69 +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
- * @lends Frame
8
- */
9
- class _FrameModule extends base_1.Base {
10
- /**
11
- * Asynchronously returns a reference to the specified frame. The frame does not have to exist
12
- * @param {Identity} identity - the identity of the frame you want to wrap
13
- * @return {Promise.<_Frame>}
14
- * @tutorial Frame.wrap
15
- * @static
16
- */
17
- async wrap(identity) {
18
- this.wire.sendAction('frame-wrap').catch((e) => {
19
- // we do not want to expose this error, just continue if this analytics-only call fails
20
- });
21
- const errorMsg = (0, validate_1.validateIdentity)(identity);
22
- if (errorMsg) {
23
- throw new Error(errorMsg);
24
- }
25
- return new Instance_1._Frame(this.wire, identity);
26
- }
27
- /**
28
- * Synchronously returns a reference to the specified frame. The frame does not have to exist
29
- * @param {Identity} identity - the identity of the frame you want to wrap
30
- * @return {_Frame}
31
- * @tutorial Frame.wrapSync
32
- * @static
33
- */
34
- wrapSync(identity) {
35
- this.wire.sendAction('frame-wrap-sync').catch((e) => {
36
- // we do not want to expose this error, just continue if this analytics-only call fails
37
- });
38
- const errorMsg = (0, validate_1.validateIdentity)(identity);
39
- if (errorMsg) {
40
- throw new Error(errorMsg);
41
- }
42
- return new Instance_1._Frame(this.wire, identity);
43
- }
44
- /**
45
- * Asynchronously returns a reference to the current frame
46
- * @return {Promise.<_Frame>}
47
- * @tutorial Frame.getCurrent
48
- * @static
49
- */
50
- getCurrent() {
51
- this.wire.sendAction('frame-get-current').catch((e) => {
52
- // we do not want to expose this error, just continue if this analytics-only call fails
53
- });
54
- return Promise.resolve(new Instance_1._Frame(this.wire, this.wire.environment.getCurrentEntityIdentity()));
55
- }
56
- /**
57
- * Synchronously returns a reference to the current frame
58
- * @return {_Frame}
59
- * @tutorial Frame.getCurrentSync
60
- * @static
61
- */
62
- getCurrentSync() {
63
- this.wire.sendAction('frame-get-current-sync').catch((e) => {
64
- // we do not want to expose this error, just continue if this analytics-only call fails
65
- });
66
- return new Instance_1._Frame(this.wire, this.wire.environment.getCurrentEntityIdentity());
67
- }
68
- }
69
- exports.default = _FrameModule;
@@ -1,123 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { EmitterBase } from '../base';
3
- import { Transport } from '../../transport/transport';
4
- type FrameEvents = OpenFin.FrameEvent;
5
- /**
6
- * @classdesc
7
- * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
8
- * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
9
- * on if it is considered out of the root domain or not), it represents a unique endpoint as an OpenFin
10
- * connection. Iframes may be generated dynamically, or be present on initial page load and each non-CORS
11
- * iframe has the OpenFin API injected by default. It is possible to opt into cross-origin iframes having
12
- * the API by setting api.iframe.crossOriginInjection to true in a window's options. To block all iframes
13
- * from getting the API injected you can set api.frame.sameOriginInjection
14
- * to false <a href="Window.html#~options" target="_blank">(see Window~options)</a>.
15
- *
16
- * To be able to directly address this context for eventing and messaging purposes, it needs a
17
- * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
18
- * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
19
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
20
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
21
- * the same as the parent window's.
22
- *
23
- * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
24
- * (iframe or main window) as well as the ability to listen for <a href="tutorial-Frame.EventEmitter.html">frame-specific events</a>.
25
- * @class
26
- * @alias Frame
27
- * @hideconstructor
28
- */
29
- export declare class _Frame extends EmitterBase<FrameEvents> {
30
- identity: OpenFin.Identity;
31
- constructor(wire: Transport, identity: OpenFin.Identity);
32
- /**
33
- * Adds the listener function to the end of the listeners array for the specified event type.
34
- * @param { string | symbol } eventType - The type of the event.
35
- * @param { Function } listener - Called whenever an event of the specified type occurs.
36
- * @param { SubOptions } [options] - Option to support event timestamps.
37
- * @return {Promise.<this>}
38
- * @function addListener
39
- * @memberof Frame
40
- * @instance
41
- * @tutorial Frame.EventEmitter
42
- */
43
- /**
44
- * Adds a listener to the end of the listeners array for the specified event.
45
- * @param { string | symbol } eventType - The type of the event.
46
- * @param { Function } listener - Called whenever an event of the specified type occurs.
47
- * @param { SubOptions } [options] - Option to support event timestamps.
48
- * @return {Promise.<this>}
49
- * @function on
50
- * @memberof Frame
51
- * @instance
52
- * @tutorial Frame.EventEmitter
53
- */
54
- /**
55
- * 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.
56
- * @param { string | symbol } eventType - The type of the event.
57
- * @param { Function } listener - The callback function.
58
- * @param { SubOptions } [options] - Option to support event timestamps.
59
- * @return {Promise.<this>}
60
- * @function once
61
- * @memberof Frame
62
- * @instance
63
- * @tutorial Frame.EventEmitter
64
- */
65
- /**
66
- * Adds a listener to the beginning of the listeners array for the specified event.
67
- * @param { string | symbol } eventType - The type of the event.
68
- * @param { Function } listener - The callback function.
69
- * @param { SubOptions } [options] - Option to support event timestamps.
70
- * @return {Promise.<this>}
71
- * @function prependListener
72
- * @memberof Frame
73
- * @instance
74
- * @tutorial Frame.EventEmitter
75
- */
76
- /**
77
- * 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.
78
- * The listener is added to the beginning of the listeners array.
79
- * @param { string | symbol } eventType - The type of the event.
80
- * @param { Function } listener - The callback function.
81
- * @param { SubOptions } [options] - Option to support event timestamps.
82
- * @return {Promise.<this>}
83
- * @function prependOnceListener
84
- * @memberof Frame
85
- * @instance
86
- * @tutorial Frame.EventEmitter
87
- */
88
- /**
89
- * Remove a listener from the listener array for the specified event.
90
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
91
- * @param { string | symbol } eventType - The type of the event.
92
- * @param { Function } listener - The callback function.
93
- * @param { SubOptions } [options] - Option to support event timestamps.
94
- * @return {Promise.<this>}
95
- * @function removeListener
96
- * @memberof Frame
97
- * @instance
98
- * @tutorial Frame.EventEmitter
99
- */
100
- /**
101
- * Removes all listeners, or those of the specified event.
102
- * @param { string | symbol } [eventType] - The type of the event.
103
- * @return {Promise.<this>}
104
- * @function removeAllListeners
105
- * @memberof Frame
106
- * @instance
107
- * @tutorial Frame.EventEmitter
108
- */
109
- /**
110
- * Returns a frame info object for the represented frame
111
- * @return {Promise.<FrameInfo>}
112
- * @tutorial Frame.getInfo
113
- */
114
- getInfo(): Promise<OpenFin.FrameInfo>;
115
- /**
116
- * Returns a frame info object representing the window that the referenced iframe is
117
- * currently embedded in
118
- * @return {Promise.<FrameInfo>}
119
- * @tutorial Frame.getParentWindow
120
- */
121
- getParentWindow(): Promise<OpenFin.FrameInfo>;
122
- }
123
- export {};
@@ -1,130 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports._Frame = void 0;
4
- /* eslint-disable import/prefer-default-export */
5
- const base_1 = require("../base");
6
- /**
7
- * @classdesc
8
- * An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
9
- * has its own DOM and global JS context (which may or may not be linked to that of the parent depending
10
- * on if it is considered out of the root domain or not), it represents a unique endpoint as an OpenFin
11
- * connection. Iframes may be generated dynamically, or be present on initial page load and each non-CORS
12
- * iframe has the OpenFin API injected by default. It is possible to opt into cross-origin iframes having
13
- * the API by setting api.iframe.crossOriginInjection to true in a window's options. To block all iframes
14
- * from getting the API injected you can set api.frame.sameOriginInjection
15
- * to false <a href="Window.html#~options" target="_blank">(see Window~options)</a>.
16
- *
17
- * To be able to directly address this context for eventing and messaging purposes, it needs a
18
- * unique uuid name pairing. For OpenFin applications and windows this is provided via a configuration
19
- * object in the form of a manifest URL or options object, but there is no configuration object for iframes.
20
- * Just as a call to window.open outside of our Window API returns a new window with a random GUID assigned
21
- * for the name, each iframe that has the API injected will be assigned a GUID as its name, the UUID will be
22
- * the same as the parent window's.
23
- *
24
- * The fin.Frame namespace represents a way to interact with `iframes` and facilitates the discovery of current context
25
- * (iframe or main window) as well as the ability to listen for <a href="tutorial-Frame.EventEmitter.html">frame-specific events</a>.
26
- * @class
27
- * @alias Frame
28
- * @hideconstructor
29
- */
30
- class _Frame extends base_1.EmitterBase {
31
- constructor(wire, identity) {
32
- super(wire, 'frame', identity.uuid, identity.name);
33
- this.identity = identity;
34
- }
35
- /**
36
- * Adds the listener function to the end of the listeners array for the specified event type.
37
- * @param { string | symbol } eventType - The type of the event.
38
- * @param { Function } listener - Called whenever an event of the specified type occurs.
39
- * @param { SubOptions } [options] - Option to support event timestamps.
40
- * @return {Promise.<this>}
41
- * @function addListener
42
- * @memberof Frame
43
- * @instance
44
- * @tutorial Frame.EventEmitter
45
- */
46
- /**
47
- * Adds a listener to the end of the listeners array for the specified event.
48
- * @param { string | symbol } eventType - The type of the event.
49
- * @param { Function } listener - Called whenever an event of the specified type occurs.
50
- * @param { SubOptions } [options] - Option to support event timestamps.
51
- * @return {Promise.<this>}
52
- * @function on
53
- * @memberof Frame
54
- * @instance
55
- * @tutorial Frame.EventEmitter
56
- */
57
- /**
58
- * 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.
59
- * @param { string | symbol } eventType - The type of the event.
60
- * @param { Function } listener - The callback function.
61
- * @param { SubOptions } [options] - Option to support event timestamps.
62
- * @return {Promise.<this>}
63
- * @function once
64
- * @memberof Frame
65
- * @instance
66
- * @tutorial Frame.EventEmitter
67
- */
68
- /**
69
- * Adds a listener to the beginning of the listeners array for the specified event.
70
- * @param { string | symbol } eventType - The type of the event.
71
- * @param { Function } listener - The callback function.
72
- * @param { SubOptions } [options] - Option to support event timestamps.
73
- * @return {Promise.<this>}
74
- * @function prependListener
75
- * @memberof Frame
76
- * @instance
77
- * @tutorial Frame.EventEmitter
78
- */
79
- /**
80
- * 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.
81
- * The listener is added to the beginning of the listeners array.
82
- * @param { string | symbol } eventType - The type of the event.
83
- * @param { Function } listener - The callback function.
84
- * @param { SubOptions } [options] - Option to support event timestamps.
85
- * @return {Promise.<this>}
86
- * @function prependOnceListener
87
- * @memberof Frame
88
- * @instance
89
- * @tutorial Frame.EventEmitter
90
- */
91
- /**
92
- * Remove a listener from the listener array for the specified event.
93
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
94
- * @param { string | symbol } eventType - The type of the event.
95
- * @param { Function } listener - The callback function.
96
- * @param { SubOptions } [options] - Option to support event timestamps.
97
- * @return {Promise.<this>}
98
- * @function removeListener
99
- * @memberof Frame
100
- * @instance
101
- * @tutorial Frame.EventEmitter
102
- */
103
- /**
104
- * Removes all listeners, or those of the specified event.
105
- * @param { string | symbol } [eventType] - The type of the event.
106
- * @return {Promise.<this>}
107
- * @function removeAllListeners
108
- * @memberof Frame
109
- * @instance
110
- * @tutorial Frame.EventEmitter
111
- */
112
- /**
113
- * Returns a frame info object for the represented frame
114
- * @return {Promise.<FrameInfo>}
115
- * @tutorial Frame.getInfo
116
- */
117
- getInfo() {
118
- return this.wire.sendAction('get-frame-info', this.identity).then(({ payload }) => payload.data);
119
- }
120
- /**
121
- * Returns a frame info object representing the window that the referenced iframe is
122
- * currently embedded in
123
- * @return {Promise.<FrameInfo>}
124
- * @tutorial Frame.getParentWindow
125
- */
126
- getParentWindow() {
127
- return this.wire.sendAction('get-parent-window', this.identity).then(({ payload }) => payload.data);
128
- }
129
- }
130
- exports._Frame = _Frame;
@@ -1,3 +0,0 @@
1
- import _FrameModule from './Factory';
2
- export default _FrameModule;
3
- export * from './Instance';
@@ -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
- exports.default = Factory_1.default;
19
- __exportStar(require("./Instance"), exports);
@@ -1,38 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { EmitterBase } from '../base';
3
- import { Transport } from '../../transport/transport';
4
- /**
5
- * The GlobalHotkey module can register/unregister a global hotkeys.
6
- * @namespace
7
- */
8
- export default class GlobalHotkey extends EmitterBase<OpenFin.GlobalHotkeyEvent> {
9
- constructor(wire: Transport);
10
- /**
11
- * Registers a global hotkey with the operating system.
12
- * @param { string } hotkey a hotkey string
13
- * @param { Function } listener called when the registered hotkey is pressed by the user.
14
- * @return {Promise.<void>}
15
- * @tutorial GlobalHotkey.register
16
- */
17
- register(hotkey: string, listener: (...args: any[]) => void): Promise<void>;
18
- /**
19
- * Unregisters a global hotkey with the operating system.
20
- * @param { string } hotkey a hotkey string
21
- * @return {Promise.<void>}
22
- * @tutorial GlobalHotkey.unregister
23
- */
24
- unregister(hotkey: string): Promise<void>;
25
- /**
26
- * Unregisters all global hotkeys for the current application.
27
- * @return {Promise.<void>}
28
- * @tutorial GlobalHotkey.unregisterAll
29
- */
30
- unregisterAll(): Promise<void>;
31
- /**
32
- * Checks if a given hotkey has been registered
33
- * @param { string } hotkey a hotkey string
34
- * @return {Promise.<boolean>}
35
- * @tutorial GlobalHotkey.isRegistered
36
- */
37
- isRegistered(hotkey: string): Promise<boolean>;
38
- }
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const base_1 = require("../base");
4
- /**
5
- * The GlobalHotkey module can register/unregister a global hotkeys.
6
- * @namespace
7
- */
8
- class GlobalHotkey extends base_1.EmitterBase {
9
- constructor(wire) {
10
- super(wire, 'global-hotkey');
11
- }
12
- /**
13
- * Registers a global hotkey with the operating system.
14
- * @param { string } hotkey a hotkey string
15
- * @param { Function } listener called when the registered hotkey is pressed by the user.
16
- * @return {Promise.<void>}
17
- * @tutorial GlobalHotkey.register
18
- */
19
- async register(hotkey, listener) {
20
- // TODO: fix typing (hotkey events are not typed)
21
- // @ts-expect-error
22
- await this.on(hotkey, listener);
23
- await this.wire.sendAction('global-hotkey-register', { hotkey });
24
- return undefined;
25
- }
26
- /**
27
- * Unregisters a global hotkey with the operating system.
28
- * @param { string } hotkey a hotkey string
29
- * @return {Promise.<void>}
30
- * @tutorial GlobalHotkey.unregister
31
- */
32
- async unregister(hotkey) {
33
- // TODO: fix typing (hotkey events are not typed)
34
- // @ts-expect-error
35
- await this.removeAllListeners(hotkey);
36
- await this.wire.sendAction('global-hotkey-unregister', { hotkey });
37
- return undefined;
38
- }
39
- /**
40
- * Unregisters all global hotkeys for the current application.
41
- * @return {Promise.<void>}
42
- * @tutorial GlobalHotkey.unregisterAll
43
- */
44
- async unregisterAll() {
45
- await Promise.all(this.eventNames()
46
- .filter((name) => !(name === 'registered' || name === 'unregistered'))
47
- // TODO: fix typing (hotkey events are not typed)
48
- // @ts-expect-error
49
- .map((name) => this.removeAllListeners(name)));
50
- await this.wire.sendAction('global-hotkey-unregister-all', {});
51
- return undefined;
52
- }
53
- /**
54
- * Checks if a given hotkey has been registered
55
- * @param { string } hotkey a hotkey string
56
- * @return {Promise.<boolean>}
57
- * @tutorial GlobalHotkey.isRegistered
58
- */
59
- async isRegistered(hotkey) {
60
- const { payload: { data } } = await this.wire.sendAction('global-hotkey-is-registered', { hotkey });
61
- return data;
62
- }
63
- }
64
- exports.default = GlobalHotkey;
@@ -1,28 +0,0 @@
1
- import type * as OpenFin from '../../../OpenFin';
2
- import { Transport } from '../../../transport/transport';
3
- type ProviderIdentity = OpenFin.ProviderIdentity;
4
- type ChannelMiddleware = OpenFin.ChannelMiddleware;
5
- type ErrorMiddleware = OpenFin.ErrorMiddleware;
6
- type ChannelAction = OpenFin.ChannelAction;
7
- export declare class ProtectedItems {
8
- providerIdentity: ProviderIdentity;
9
- wire: Transport;
10
- constructor(providerIdentity: ProviderIdentity, wire: Transport);
11
- }
12
- export declare class ChannelBase {
13
- protected subscriptions: Map<string, ChannelAction>;
14
- private defaultAction?;
15
- private preAction?;
16
- private postAction?;
17
- private errorMiddleware?;
18
- private static defaultAction;
19
- constructor();
20
- protected processAction(topic: string, payload: unknown, senderIdentity: ProviderIdentity | OpenFin.ClientIdentity): Promise<unknown>;
21
- beforeAction(func: ChannelMiddleware): void;
22
- onError(func: ErrorMiddleware): void;
23
- afterAction(func: ChannelMiddleware): void;
24
- remove(action: string): void;
25
- setDefaultAction(func: ChannelMiddleware): void;
26
- register(topic: string, listener: ChannelAction): boolean;
27
- }
28
- export {};