@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,557 +0,0 @@
1
- "use strict";
2
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
5
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
6
- };
7
- var _View_providerChannelClient;
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.View = void 0;
10
- const transport_errors_1 = require("../../transport/transport-errors");
11
- const lazy_1 = require("../../util/lazy");
12
- const layout_entities_1 = require("../platform/layout/entities/layout-entities");
13
- const layout_constants_1 = require("../platform/layout/layout.constants");
14
- const main_1 = require("../webcontents/main");
15
- const window_1 = require("../window");
16
- /**
17
- * @PORTED
18
- * @typedef {object} View~options
19
- * @summary View creation options.
20
- * @desc This is the options object required by {@link View.create View.create}.
21
- *
22
- * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
23
- * (defaults to `"about:blank"` when omitted).
24
- *
25
- * @property {object} [experimental]
26
- * Configurations for API injection.
27
- *
28
- * @property {boolean} [experimental.childWindows] Configure if the runtime should enable child windows for views.
29
- *
30
- * @property {object} [accelerator]
31
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
32
- *
33
- * @property {boolean} [accelerator.devtools=false]
34
- * If `true`, enables the devtools keyboard shortcut:<br>
35
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
36
- *
37
- * @property {boolean} [accelerator.reload=false]
38
- * If `true`, enables the reload keyboard shortcuts:<br>
39
- * `Ctrl` + `R` _(Windows)_<br>
40
- * `F5` _(Windows)_<br>
41
- * `Command` + `R` _(Mac)_
42
- *
43
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
44
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
45
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
46
- * `Shift` + `F5` _(Windows)_<br>
47
- * `Command` + `Shift` + `R` _(Mac)_
48
- *
49
- * @property {boolean} [accelerator.zoom=false]
50
- * If `true`, enables the zoom keyboard shortcuts:<br>
51
- * `Ctrl` + `+` _(Zoom In)_<br>
52
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
53
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
54
- * `Ctrl` + `-` _(Zoom Out)_<br>
55
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
56
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
57
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
58
- * `Ctrl` + `0` _(Restore to 100%)_
59
- *
60
- * @property {object} [api]
61
- * Configurations for API injection.
62
- *
63
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
64
- *
65
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
66
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
67
- *
68
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
69
- * Autoplay policy to apply to content in the window, can be
70
- * `no-user-gesture-required`, `user-gesture-required`,
71
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
72
- *
73
- * @property {object} [autoResize] AutoResize options
74
- *
75
- * @property {object} [bounds] initial bounds given relative to the window.
76
- *
77
- * @property {string} [backgroundColor="#FFF"] - _Updatable._
78
- * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
79
- * (`document.body.style.backgroundColor`),
80
- * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
81
- * areas when growing a window. Setting
82
- * this value to the anticipated content background color can help improve user experience.
83
- * Default is white.
84
- *
85
- * @property {object} [contentNavigation]
86
- * Restrict navigation to URLs that match an allowed pattern.
87
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
88
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
89
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
90
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
91
- *
92
- * @property {object} [contentRedirect]
93
- * Restrict redirects to URLs that match an allowed pattern.
94
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
95
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
96
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
97
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
98
- *
99
- * @property {object} [contextMenuSettings] - _Updatable._
100
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
101
- * Configure the context menu when right-clicking on a view.
102
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
103
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
104
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
105
- *
106
- * @property {object} [contextMenuOptions] - _Updatable._
107
- * Configure the context menu when right-clicking on a view. Supported menu items:
108
- * 'separator'
109
- * 'cut'
110
- * 'copy'
111
- * 'copyImage',
112
- * 'paste'
113
- * 'spellCheck'
114
- * 'inspect'
115
- * 'reload'
116
- * 'navigateForward'
117
- * 'navigateBack'
118
- * 'print'
119
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
120
- * @property {string[]} [contextMenuOptions.template=[]] List of context menu items to display on right-click.
121
- *
122
- * @property {any} [customData=""] - _Updatable._
123
- * A field that the user can attach serializable data to be ferried around with the view options.
124
- * _When omitted, the default value of this property is the empty string (`""`)._
125
- *
126
- * @property {any} [customContext=""] - _Updatable._
127
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
128
- * is called.
129
- * When omitted, the default value of this property is the empty string (`""`).
130
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
131
- *
132
- * @property {object[]} [hotkeys=[]] - _Updatable._
133
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
134
- * Within Platform, OpenFin also implements a set of pre-defined actions called
135
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
136
- * that can be assigned to a specific hotkey in the platform manifest.
137
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
138
- * @property {boolean} [hotkeys.preventDefault=false] preventDefault will prevent the page keydown/keyup events from being emitted.
139
- *
140
- * @property {boolean} [isClosable=true] **Platforms Only.** If false, the view will be persistent and can't be closed through
141
- * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
142
- * if the view isn't part of the new layout when running `Layout.replace`.
143
- *
144
- * @property {string} name
145
- * The name of the view.
146
- *
147
- * @property {boolean} [detachOnClose=false] - _Updatable._
148
- * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
149
- * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
150
- *
151
- * @property {string} [manifestUrl] **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
152
- * but the properties in the manifest will take precedence if there is any collision.
153
- *
154
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
155
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
156
- * from the parent application.
157
- *
158
- * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
159
- *
160
- * @property {string} [processAffinity=<application uuid>]
161
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
162
- *
163
- * @property {boolean} [spellCheck=false]
164
- * Enable spell check in input text fields for the view.
165
- *
166
- * @property {Identity} [target]
167
- * The identity of the window this view should be attached to.
168
- *
169
- * @property {string} [url="about:blank"]
170
- * The URL of the view.
171
- *
172
- * @property {string} [uuid=<application uuid>]
173
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
174
- * If omitted, defaults to the `uuid` of the application spawning the view.
175
- * If given, must match the `uuid` of the application spawning the view.
176
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
177
- * really no need to provide it.
178
- */
179
- /**
180
- * @classdesc A View can be used to embed additional web content into a Window.
181
- * It is like a child window, except it is positioned relative to its owning window.
182
- * It has the ability to listen for <a href="tutorial-View.EventEmitter.html">View-specific events</a>.
183
- *
184
- * By default, a View will try to share the same renderer process as other Views owned by its parent Application.
185
- * To change that behavior, see the processAffinity {@link View~options view option}.
186
- *
187
- * A View's lifecycle is tied to its owning window and can be re-attached to a different window at any point during its lifecycle.
188
- * @class
189
- * @alias View
190
- * @hideconstructor
191
- */
192
- class View extends main_1.WebContents {
193
- constructor(wire, identity) {
194
- super(wire, identity, 'view');
195
- this.identity = identity;
196
- _View_providerChannelClient.set(this, new lazy_1.Lazy(() => {
197
- const platform = this.fin.Platform.wrapSync(this.identity);
198
- return platform.getClient();
199
- }));
200
- /**
201
- * Returns the zoom level of the view.
202
- * @function getZoomLevel
203
- * @memberOf View
204
- * @instance
205
- * @return {Promise.<number>}
206
- * @tutorial View.getZoomLevel
207
- */
208
- /**
209
- * Sets the zoom level of the view.
210
- * @param { number } level The zoom level
211
- * @function setZoomLevel
212
- * @memberOf View
213
- * @instance
214
- * @return {Promise.<void>}
215
- * @tutorial View.setZoomLevel
216
- */
217
- /**
218
- * Find and highlight text on a page.
219
- * @param { string } searchTerm Term to find in page
220
- * @param { FindInPageOptions } options Search options
221
- * @function findInPage
222
- * @memberOf View
223
- * @instance
224
- * @return {Promise.<number>}
225
- * @tutorial View.findInPage
226
- */
227
- /**
228
- * Stops any findInPage call with the provided action.
229
- * @param {string} action
230
- * Action to execute when stopping a find in page:<br>
231
- * "clearSelection" - Clear the selection.<br>
232
- * "keepSelection" - Translate the selection into a normal selection.<br>
233
- * "activateSelection" - Focus and click the selection node.<br>
234
- * @function stopFindInPage
235
- * @memberOf View
236
- * @instance
237
- * @return {Promise.<void>}
238
- * @tutorial View.stopFindInPage
239
- */
240
- /**
241
- * Navigates the view to a specified URL. The url must contain the protocol prefix such as http:// or https://.
242
- * @param { string } url - The URL to navigate the view to.
243
- * @return {Promise.<void>}
244
- * @function navigate
245
- * @memberof View
246
- * @instance
247
- * @tutorial View.navigate
248
- * @experimental
249
- */
250
- /**
251
- * Navigates the view back one page.
252
- * @function navigateBack
253
- * @memberOf View
254
- * @instance
255
- * @return {Promise.<void>}
256
- * @tutorial View.navigateBack
257
- */
258
- /**
259
- * Navigates the view forward one page.
260
- * @function navigateForward
261
- * @memberOf View
262
- * @instance
263
- * @return {Promise.<void>}
264
- * @tutorial View.navigateForward
265
- */
266
- /**
267
- * Stops any current navigation the view is performing.
268
- * @function stopNavigation
269
- * @memberOf View
270
- * @instance
271
- * @return {Promise.<void>}
272
- * @tutorial View.stopNavigation
273
- */
274
- /**
275
- * Reloads the view current page
276
- * @function reload
277
- * @memberOf View
278
- * @instance
279
- * @return {Promise.<void>}
280
- * @tutorial View.reload
281
- */
282
- /**
283
- * Prints the view's web page
284
- * @param { PrintOptions } [options] Printer Options
285
- * @function print
286
- * @memberOf View
287
- * @instance
288
- * @return {Promise.<void>}
289
- * @tutorial View.print
290
- */
291
- /**
292
- * Returns an array with all system printers
293
- * @deprecated use System.getPrinters instead
294
- * @function getPrinters
295
- * @memberOf View
296
- * @instance
297
- * @return { Promise.Array.<PrinterInfo> }
298
- * @tutorial View.getPrinters
299
- */
300
- /**
301
- * Shows the Chromium Developer Tools
302
- * @function showDeveloperTools
303
- * @memberOf View
304
- * @instance
305
- * @return {Promise.<void>}
306
- * @tutorial View.showDeveloperTools
307
- */
308
- /**
309
- * Retrieves the process information associated with a view.
310
- * @function getProcessInfo
311
- * @memberOf View
312
- * @instance
313
- * @return {Promise.<EntityProcessDetails>}
314
- * @tutorial View.getProcessInfo
315
- */
316
- /**
317
- * Retrieves information on all Shared Workers.
318
- * @function getSharedWorkers
319
- * @memberOf View
320
- * @instance
321
- * @return {Promise.Array.<SharedWorkerInfo>}
322
- * @tutorial View.getSharedWorkers
323
- */
324
- /**
325
- * Opens the developer tools for the shared worker context.
326
- * @function inspectSharedWorker
327
- * @memberOf View
328
- * @instance
329
- * @return {Promise.<void>}
330
- * @tutorial View.inspectSharedWorker
331
- */
332
- /**
333
- * Inspects the shared worker based on its ID.
334
- * @param { string } workerId - The id of the shared worker.
335
- * @function inspectSharedWorkerById
336
- * @memberOf View
337
- * @instance
338
- * @return {Promise.<void>}
339
- * @tutorial View.inspectSharedWorkerById
340
- */
341
- /**
342
- * Opens the developer tools for the service worker context.
343
- * @function inspectServiceWorker
344
- * @memberOf View
345
- * @instance
346
- * @return {Promise.<void>}
347
- * @tutorial View.inspectServiceWorker
348
- */
349
- /**
350
- * Shows a popup window. If the window this view is currently attached to has a popup open, closes it.
351
- * @function showPopupWindow
352
- * @memberOf View
353
- * @instance
354
- * @param {PopupOptions} options
355
- * @return {Promise<PopupResult>}
356
- * @tutorial View.showPopupWindow
357
- */
358
- /**
359
- * Attaches the current view to a the given window identity.
360
- * Identity must be the identity of a window in the same application.
361
- * This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
362
- * @param target {Identity}
363
- * @return {Promise.<void>}
364
- * @tutorial View.attach
365
- * @experimental
366
- */
367
- this.attach = async (target) => {
368
- await this.wire.sendAction('attach-view', { target, ...this.identity });
369
- };
370
- /**
371
- * Destroys the current view
372
- * @return {Promise.<void>}
373
- * @tutorial View.destroy
374
- * @experimental
375
- */
376
- this.destroy = async () => {
377
- await this.wire.sendAction('destroy-view', { ...this.identity });
378
- };
379
- /**
380
- * Shows the current view if it is currently hidden.
381
- * @return {Promise.<void>}
382
- * @tutorial View.show
383
- * @experimental
384
- */
385
- this.show = async () => {
386
- await this.wire.sendAction('show-view', { ...this.identity });
387
- };
388
- /**
389
- * Hides the current view if it is currently visible.
390
- * @return {Promise.<void>}
391
- * @tutorial View.hide
392
- * @experimental
393
- */
394
- this.hide = async () => {
395
- await this.wire.sendAction('hide-view', { ...this.identity });
396
- };
397
- /**
398
- * Sets the bounds (top, left, width, height) of the view relative to its window.
399
- * @param bounds {ViewBounds}
400
- * @return {Promise.<void>}
401
- * @tutorial View.setBounds
402
- * @experimental
403
- */
404
- this.setBounds = async (bounds) => {
405
- await this.wire.sendAction('set-view-bounds', { bounds, ...this.identity });
406
- };
407
- /**
408
- * Gets the bounds (top, left, width, height) of the view relative to its window.
409
- * @return {Promise.<ViewBounds>}
410
- * @tutorial View.getBounds
411
- * @experimental
412
- */
413
- this.getBounds = async () => {
414
- const ack = await this.wire.sendAction('get-view-bounds', { ...this.identity });
415
- return ack.payload.data;
416
- };
417
- /**
418
- * Gets the View's info.
419
- * @return {Promise.<ViewInfo>}
420
- * @tutorial View.getInfo
421
- * @experimental
422
- */
423
- this.getInfo = async () => {
424
- const ack = await this.wire.sendAction('get-view-info', { ...this.identity });
425
- return ack.payload.data;
426
- };
427
- /**
428
- * Retrieves the layout for the window the view is attached to.
429
- * @return {Promise.<Layout>}
430
- * @tutorial View.getParentLayout
431
- * @experimental
432
- */
433
- this.getParentLayout = async () => {
434
- this.wire.sendAction('view-get-parent-layout', { ...this.identity }).catch(() => {
435
- // don't expose
436
- });
437
- const currentWindow = await this.getCurrentWindow();
438
- return currentWindow.getLayout();
439
- };
440
- /**
441
- * Gets the View's options.
442
- * @return {Promise<ViewOptions>}
443
- * @tutorial View.getOptions
444
- * @experimental
445
- */
446
- this.getOptions = async () => {
447
- return this.wire.sendAction('get-view-options', { ...this.identity }).then(({ payload }) => payload.data);
448
- };
449
- /**
450
- * Updates the view's options.
451
- * @param { Partial<ViewOptions> } options
452
- * @return {Promise.<void>}
453
- * @tutorial View.updateOptions
454
- * @experimental
455
- */
456
- this.updateOptions = async (options) => {
457
- return this.wire.sendAction('update-view-options', { options, ...this.identity }).then(() => undefined);
458
- };
459
- /**
460
- * Retrieves the window the view is currently attached to.
461
- * @return {Promise.<_Window>}
462
- * @experimental
463
- */
464
- this.getCurrentWindow = async () => {
465
- const { payload: { data } } = await this.wire.sendAction('get-view-window', { ...this.identity });
466
- return new window_1._Window(this.wire, data);
467
- };
468
- /**
469
- * Retrieves the current {@link TabStack} of the view if it belongs to one.
470
- * @return {Promise<TabStack>} The {@link TabStack} this view belongs to.
471
- * @throws if this view does not belong to a TabStack or if the window has been destroyed.
472
- */
473
- this.getCurrentStack = async () => {
474
- this.wire.sendAction('view-get-current-stack').catch(() => {
475
- // don't expose
476
- });
477
- try {
478
- const layoutWindow = await this.getCurrentWindow();
479
- const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
480
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
481
- const stackDefinition = (await client.getStackByView(this.identity));
482
- return layout_entities_1.LayoutNode.getEntity(stackDefinition, client);
483
- }
484
- catch (error) {
485
- throw new transport_errors_1.RuntimeError({ reason: 'This view does not belong to a stack.', error });
486
- }
487
- };
488
- /**
489
- * Triggers the before-unload handler for the View, if one is set. Returns `true` if the handler is trying to prevent the View from unloading, and `false` if it isn't.
490
- * Only enabled when setting enableBeforeUnload: true in your View options. If this option is not enabled it will always return false.
491
- * @returns {Promise<boolean>}
492
- * @tutorial View.triggerBeforeUnload
493
- * @experimental
494
- */
495
- this.triggerBeforeUnload = async () => {
496
- const message = await this.wire.sendAction('trigger-before-unload', { ...this.identity });
497
- return message.payload.data;
498
- };
499
- /**
500
- * **NOTE**: Internal use only.
501
- * Attaches this view to an HTML element in the current context. The view will resize responsively when the element bounds change.
502
- *
503
- * **Known issue**: View.bindToElement does not track position changes, if the element has fixed px width and height values it is possible for the view to not update responsively.
504
- *
505
- * **Known issue**: When View.bindToElement is used on a element that takes up the entire page in a platform window, the bound view will not respond responsively when the window is resized to be smaller.
506
- *
507
- * @param {HTMLElement} element - HTML element to attach the view to.
508
- * @return {Function} - Cleanup function that will disconnect the element resize observer.
509
- * @internal
510
- * @experimental
511
- * @tutorial View.bindToElement
512
- */
513
- this.bindToElement = async (element) => {
514
- if (!element) {
515
- throw new Error('Element not found.');
516
- }
517
- const onChange = async (bounds) => this.setBounds(bounds);
518
- return this.wire.environment.observeBounds(element, onChange);
519
- };
520
- }
521
- /**
522
- * Gets a base64 encoded image of the view or a part of it.
523
- * @function capturePage
524
- * @param { CapturePageOptions } [options] Options for the capturePage call.
525
- * @memberOf View
526
- * @instance
527
- * @return {Promise.<string>}
528
- * @tutorial View.capturePage
529
- */
530
- /**
531
- * Executes Javascript on the view, restricted to contents you own or contents owned by
532
- * applications you have created.
533
- * @param { string } code JavaScript code to be executed on the view.
534
- * @function executeJavaScript
535
- * @memberOf View
536
- * @instance
537
- * @return {Promise.<void>}
538
- * @tutorial View.executeJavaScript
539
- */
540
- /**
541
- * Focuses the view
542
- * @return {Promise.<void>}
543
- * @function focus
544
- * @memberof View
545
- * @emits focused
546
- * @instance
547
- * @tutorial View.focus
548
- * @experimental
549
- */
550
- async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
551
- const win = await this.getCurrentWindow();
552
- await win.focusedWebViewWasChanged();
553
- await super.focus({ emitSynthFocused });
554
- }
555
- }
556
- exports.View = View;
557
- _View_providerChannelClient = new WeakMap();
@@ -1,3 +0,0 @@
1
- import ViewModule from './Factory';
2
- export default ViewModule;
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,32 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { EmitterBase } from '../base';
3
- import { Transport } from '../../transport/transport';
4
- import { BaseEvent } from '../events/base';
5
- export declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
6
- identity: OpenFin.Identity;
7
- entityType: string;
8
- constructor(wire: Transport, identity: OpenFin.Identity, entityType: string);
9
- capturePage(options?: OpenFin.CapturePageOptions): Promise<string>;
10
- executeJavaScript(code: string): Promise<void>;
11
- getZoomLevel(): Promise<number>;
12
- setZoomLevel(level: number): Promise<void>;
13
- navigate(url: string): Promise<void>;
14
- navigateBack(): Promise<void>;
15
- navigateForward(): Promise<void>;
16
- stopNavigation(): Promise<void>;
17
- reload(ignoreCache?: boolean): Promise<void>;
18
- print(options?: OpenFin.PrintOptions): Promise<void>;
19
- findInPage(searchTerm: string, options?: OpenFin.FindInPageOptions): Promise<void>;
20
- stopFindInPage(action: string): Promise<void>;
21
- getPrinters(): Promise<OpenFin.PrinterInfo>;
22
- focus({ emitSynthFocused }?: {
23
- emitSynthFocused: boolean;
24
- }): Promise<void>;
25
- showDeveloperTools(): Promise<void>;
26
- getProcessInfo(): Promise<OpenFin.EntityProcessDetails>;
27
- getSharedWorkers(): Promise<OpenFin.SharedWorkerInfo[]>;
28
- inspectSharedWorker(): Promise<void>;
29
- inspectSharedWorkerById(workerId: string): Promise<void>;
30
- inspectServiceWorker(): Promise<void>;
31
- showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
32
- }