@openfin/core 33.76.36 → 33.77.1

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 (271) 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 +17111 -0
  10. package/package.json +30 -23
  11. package/LICENSE +0 -13
  12. package/NOTICE +0 -16
  13. package/openfin-core-33.76.36.tgz +0 -0
  14. package/src/OpenFin.d.ts +0 -3091
  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 -196
  33. package/src/api/application/Factory.js +0 -278
  34. package/src/api/application/Instance.d.ts +0 -692
  35. package/src/api/application/Instance.js +0 -821
  36. package/src/api/application/index.d.ts +0 -12
  37. package/src/api/application/index.js +0 -28
  38. package/src/api/base.d.ts +0 -117
  39. package/src/api/base.js +0 -246
  40. package/src/api/clipboard/index.d.ts +0 -172
  41. package/src/api/clipboard/index.js +0 -200
  42. package/src/api/events/application.d.ts +0 -158
  43. package/src/api/events/application.js +0 -14
  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 -35
  47. package/src/api/events/channel.js +0 -7
  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 -24
  53. package/src/api/events/externalApplication.js +0 -7
  54. package/src/api/events/frame.d.ts +0 -35
  55. package/src/api/events/frame.js +0 -2
  56. package/src/api/events/globalHotkey.d.ts +0 -25
  57. package/src/api/events/globalHotkey.js +0 -2
  58. package/src/api/events/platform.d.ts +0 -34
  59. package/src/api/events/platform.js +0 -10
  60. package/src/api/events/system.d.ts +0 -126
  61. package/src/api/events/system.js +0 -15
  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 -92
  65. package/src/api/events/view.js +0 -12
  66. package/src/api/events/webcontents.d.ts +0 -277
  67. package/src/api/events/webcontents.js +0 -13
  68. package/src/api/events/window.d.ts +0 -421
  69. package/src/api/events/window.js +0 -12
  70. package/src/api/external-application/Factory.d.ts +0 -34
  71. package/src/api/external-application/Factory.js +0 -47
  72. package/src/api/external-application/Instance.d.ts +0 -110
  73. package/src/api/external-application/Instance.js +0 -117
  74. package/src/api/external-application/index.d.ts +0 -12
  75. package/src/api/external-application/index.js +0 -28
  76. package/src/api/fin.d.ts +0 -54
  77. package/src/api/fin.js +0 -45
  78. package/src/api/frame/Factory.d.ts +0 -54
  79. package/src/api/frame/Factory.js +0 -86
  80. package/src/api/frame/Instance.d.ts +0 -136
  81. package/src/api/frame/Instance.js +0 -143
  82. package/src/api/frame/index.d.ts +0 -14
  83. package/src/api/frame/index.js +0 -30
  84. package/src/api/global-hotkey/index.d.ts +0 -106
  85. package/src/api/global-hotkey/index.js +0 -132
  86. package/src/api/interappbus/channel/channel.d.ts +0 -285
  87. package/src/api/interappbus/channel/channel.js +0 -334
  88. package/src/api/interappbus/channel/channels-docs.d.ts +0 -342
  89. package/src/api/interappbus/channel/channels-docs.js +0 -401
  90. package/src/api/interappbus/channel/client.d.ts +0 -117
  91. package/src/api/interappbus/channel/client.js +0 -181
  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 -189
  95. package/src/api/interappbus/channel/index.js +0 -333
  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 -206
  117. package/src/api/interappbus/channel/provider.js +0 -338
  118. package/src/api/interappbus/index.d.ts +0 -120
  119. package/src/api/interappbus/index.js +0 -210
  120. package/src/api/interop/Factory.d.ts +0 -57
  121. package/src/api/interop/Factory.js +0 -96
  122. package/src/api/interop/InteropBroker.d.ts +0 -665
  123. package/src/api/interop/InteropBroker.js +0 -1313
  124. package/src/api/interop/InteropClient.d.ts +0 -502
  125. package/src/api/interop/InteropClient.js +0 -683
  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/documentationStub.d.ts +0 -14
  135. package/src/api/interop/fdc3/documentationStub.js +0 -17
  136. package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -205
  137. package/src/api/interop/fdc3/fdc3-1.2.js +0 -435
  138. package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -298
  139. package/src/api/interop/fdc3/fdc3-2.0.js +0 -479
  140. package/src/api/interop/fdc3/fdc3.d.ts +0 -12
  141. package/src/api/interop/fdc3/fdc3.js +0 -35
  142. package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
  143. package/src/api/interop/fdc3/overrideCheck.js +0 -32
  144. package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
  145. package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
  146. package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
  147. package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
  148. package/src/api/interop/fdc3/utils.d.ts +0 -45
  149. package/src/api/interop/fdc3/utils.js +0 -239
  150. package/src/api/interop/fdc3/versions.d.ts +0 -1
  151. package/src/api/interop/fdc3/versions.js +0 -2
  152. package/src/api/interop/index.d.ts +0 -12
  153. package/src/api/interop/index.js +0 -28
  154. package/src/api/interop/utils.d.ts +0 -18
  155. package/src/api/interop/utils.js +0 -61
  156. package/src/api/me.d.ts +0 -40
  157. package/src/api/me.js +0 -134
  158. package/src/api/platform/Factory.d.ts +0 -171
  159. package/src/api/platform/Factory.js +0 -240
  160. package/src/api/platform/Instance.d.ts +0 -653
  161. package/src/api/platform/Instance.js +0 -834
  162. package/src/api/platform/common-utils.d.ts +0 -7
  163. package/src/api/platform/common-utils.js +0 -16
  164. package/src/api/platform/index.d.ts +0 -12
  165. package/src/api/platform/index.js +0 -28
  166. package/src/api/platform/layout/Factory.d.ts +0 -91
  167. package/src/api/platform/layout/Factory.js +0 -151
  168. package/src/api/platform/layout/Instance.d.ts +0 -192
  169. package/src/api/platform/layout/Instance.js +0 -224
  170. package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
  171. package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
  172. package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
  173. package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
  174. package/src/api/platform/layout/entities/layout-entities.d.ts +0 -427
  175. package/src/api/platform/layout/entities/layout-entities.js +0 -504
  176. package/src/api/platform/layout/entities/shapes.d.ts +0 -6
  177. package/src/api/platform/layout/entities/shapes.js +0 -2
  178. package/src/api/platform/layout/index.d.ts +0 -11
  179. package/src/api/platform/layout/index.js +0 -27
  180. package/src/api/platform/layout/layout.constants.d.ts +0 -1
  181. package/src/api/platform/layout/layout.constants.js +0 -4
  182. package/src/api/platform/layout/shapes.d.ts +0 -16
  183. package/src/api/platform/layout/shapes.js +0 -2
  184. package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
  185. package/src/api/platform/layout/utils/layout-traversal.js +0 -65
  186. package/src/api/platform/provider.d.ts +0 -510
  187. package/src/api/platform/provider.js +0 -2
  188. package/src/api/snapshot-source/Factory.d.ts +0 -53
  189. package/src/api/snapshot-source/Factory.js +0 -81
  190. package/src/api/snapshot-source/Instance.d.ts +0 -53
  191. package/src/api/snapshot-source/Instance.js +0 -154
  192. package/src/api/snapshot-source/index.d.ts +0 -12
  193. package/src/api/snapshot-source/index.js +0 -28
  194. package/src/api/snapshot-source/utils.d.ts +0 -2
  195. package/src/api/snapshot-source/utils.js +0 -6
  196. package/src/api/system/index.d.ts +0 -1468
  197. package/src/api/system/index.js +0 -1851
  198. package/src/api/view/Factory.d.ts +0 -88
  199. package/src/api/view/Factory.js +0 -141
  200. package/src/api/view/Instance.d.ts +0 -601
  201. package/src/api/view/Instance.js +0 -671
  202. package/src/api/view/index.d.ts +0 -12
  203. package/src/api/view/index.js +0 -28
  204. package/src/api/webcontents/main.d.ts +0 -922
  205. package/src/api/webcontents/main.js +0 -1046
  206. package/src/api/window/Factory.d.ts +0 -96
  207. package/src/api/window/Factory.js +0 -142
  208. package/src/api/window/Instance.d.ts +0 -1598
  209. package/src/api/window/Instance.js +0 -1851
  210. package/src/api/window/index.d.ts +0 -14
  211. package/src/api/window/index.js +0 -30
  212. package/src/browser.d.ts +0 -10
  213. package/src/browser.js +0 -36
  214. package/src/environment/browser.d.ts +0 -29
  215. package/src/environment/browser.js +0 -60
  216. package/src/environment/environment.d.ts +0 -33
  217. package/src/environment/environment.js +0 -4
  218. package/src/environment/mockEnvironment.d.ts +0 -27
  219. package/src/environment/mockEnvironment.js +0 -61
  220. package/src/environment/node-env.d.ts +0 -29
  221. package/src/environment/node-env.js +0 -72
  222. package/src/fdc3.d.ts +0 -3
  223. package/src/fdc3.js +0 -9
  224. package/src/mock.d.ts +0 -3
  225. package/src/mock.js +0 -18
  226. package/src/namespaces.d.ts +0 -22
  227. package/src/namespaces.js +0 -26
  228. package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
  229. package/src/shapes/ERROR_BOX_TYPES.js +0 -2
  230. package/src/shapes/WebOptions.d.ts +0 -13
  231. package/src/shapes/WebOptions.js +0 -2
  232. package/src/shapes/WindowOptions.d.ts +0 -43
  233. package/src/shapes/WindowOptions.js +0 -2
  234. package/src/shapes/protocol.d.ts +0 -204
  235. package/src/shapes/protocol.js +0 -2
  236. package/src/transport/mockWire.d.ts +0 -11
  237. package/src/transport/mockWire.js +0 -26
  238. package/src/transport/transport-errors.d.ts +0 -31
  239. package/src/transport/transport-errors.js +0 -79
  240. package/src/transport/transport.d.ts +0 -73
  241. package/src/transport/transport.js +0 -219
  242. package/src/transport/wire.d.ts +0 -77
  243. package/src/transport/wire.js +0 -36
  244. package/src/util/asyncFilter.d.ts +0 -1
  245. package/src/util/asyncFilter.js +0 -7
  246. package/src/util/channel-api-relay.d.ts +0 -13
  247. package/src/util/channel-api-relay.js +0 -47
  248. package/src/util/errors.d.ts +0 -10
  249. package/src/util/errors.js +0 -12
  250. package/src/util/exhaustive.d.ts +0 -1
  251. package/src/util/exhaustive.js +0 -7
  252. package/src/util/http.d.ts +0 -11
  253. package/src/util/http.js +0 -90
  254. package/src/util/inaccessibleObject.d.ts +0 -2
  255. package/src/util/inaccessibleObject.js +0 -49
  256. package/src/util/lazy.d.ts +0 -34
  257. package/src/util/lazy.js +0 -54
  258. package/src/util/normalize-config.d.ts +0 -3
  259. package/src/util/normalize-config.js +0 -52
  260. package/src/util/promises.d.ts +0 -5
  261. package/src/util/promises.js +0 -27
  262. package/src/util/ref-counter.d.ts +0 -7
  263. package/src/util/ref-counter.js +0 -52
  264. package/src/util/reversible-map.d.ts +0 -11
  265. package/src/util/reversible-map.js +0 -49
  266. package/src/util/runtimeVersioning.d.ts +0 -3
  267. package/src/util/runtimeVersioning.js +0 -25
  268. package/src/util/utilTypes.d.ts +0 -8
  269. package/src/util/utilTypes.js +0 -2
  270. package/src/util/validate.d.ts +0 -3
  271. package/src/util/validate.js +0 -11
@@ -1,601 +0,0 @@
1
- import type * as OpenFin from '../../OpenFin';
2
- import { Transport } from '../../transport/transport';
3
- import { WebContents } from '../webcontents/main';
4
- type UpdatableViewOptions = OpenFin.UpdatableViewOptions;
5
- type ViewEvent = OpenFin.ViewEvent;
6
- /**
7
- * @PORTED
8
- * @typedef {object} View~options
9
- * @summary View creation options.
10
- * @desc This is the options object required by {@link View.create View.create}.
11
- *
12
- * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
13
- * (defaults to `"about:blank"` when omitted).
14
- *
15
- * @property {object} [experimental]
16
- * Configurations for API injection.
17
- *
18
- * @property {boolean} [experimental.childWindows] Configure if the runtime should enable child windows for views.
19
- *
20
- * @property {object} [accelerator]
21
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
22
- *
23
- * @property {boolean} [accelerator.devtools=false]
24
- * If `true`, enables the devtools keyboard shortcut:<br>
25
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
26
- *
27
- * @property {boolean} [accelerator.reload=false]
28
- * If `true`, enables the reload keyboard shortcuts:<br>
29
- * `Ctrl` + `R` _(Windows)_<br>
30
- * `F5` _(Windows)_<br>
31
- * `Command` + `R` _(Mac)_
32
- *
33
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
34
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
35
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
36
- * `Shift` + `F5` _(Windows)_<br>
37
- * `Command` + `Shift` + `R` _(Mac)_
38
- *
39
- * @property {boolean} [accelerator.zoom=false]
40
- * If `true`, enables the zoom keyboard shortcuts:<br>
41
- * `Ctrl` + `+` _(Zoom In)_<br>
42
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
43
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
44
- * `Ctrl` + `-` _(Zoom Out)_<br>
45
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
46
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
47
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
48
- * `Ctrl` + `0` _(Restore to 100%)_
49
- *
50
- * @property {object} [api]
51
- * Configurations for API injection.
52
- *
53
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
54
- *
55
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
56
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
57
- *
58
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
59
- * Autoplay policy to apply to content in the window, can be
60
- * `no-user-gesture-required`, `user-gesture-required`,
61
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
62
- *
63
- * @property {object} [autoResize] AutoResize options
64
- *
65
- * @property {object} [bounds] initial bounds given relative to the window.
66
- *
67
- * @property {string} [backgroundColor="#FFF"] - _Updatable._
68
- * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
69
- * (`document.body.style.backgroundColor`),
70
- * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
71
- * areas when growing a window. Setting
72
- * this value to the anticipated content background color can help improve user experience.
73
- * Default is white.
74
- *
75
- * @property {object} [contentNavigation]
76
- * Restrict navigation to URLs that match an allowed pattern.
77
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
78
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
79
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
80
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
81
- *
82
- * @property {object} [contentRedirect]
83
- * Restrict redirects to URLs that match an allowed pattern.
84
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
85
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
86
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
87
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
88
- *
89
- * @property {object} [contextMenuSettings] - _Updatable._
90
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
91
- * Configure the context menu when right-clicking on a view.
92
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
93
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
94
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
95
- *
96
- * @property {object} [contextMenuOptions] - _Updatable._
97
- * Configure the context menu when right-clicking on a view. Supported menu items:
98
- * 'separator'
99
- * 'cut'
100
- * 'copy'
101
- * 'copyImage',
102
- * 'paste'
103
- * 'spellCheck'
104
- * 'inspect'
105
- * 'reload'
106
- * 'navigateForward'
107
- * 'navigateBack'
108
- * 'print'
109
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
110
- * @property {string[]} [contextMenuOptions.template=[]] List of context menu items to display on right-click.
111
- *
112
- * @property {any} [customData=""] - _Updatable._
113
- * A field that the user can attach serializable data to be ferried around with the view options.
114
- * _When omitted, the default value of this property is the empty string (`""`)._
115
- *
116
- * @property {any} [customContext=""] - _Updatable._
117
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
118
- * is called.
119
- * When omitted, the default value of this property is the empty string (`""`).
120
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
121
- *
122
- * @property {object[]} [hotkeys=[]] - _Updatable._
123
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
124
- * Within Platform, OpenFin also implements a set of pre-defined actions called
125
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
126
- * that can be assigned to a specific hotkey in the platform manifest.
127
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
128
- * @property {boolean} [hotkeys.preventDefault=false] preventDefault will prevent the page keydown/keyup events from being emitted.
129
- *
130
- * @property {boolean} [isClosable=true] **Platforms Only.** If false, the view will be persistent and can't be closed through
131
- * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
132
- * if the view isn't part of the new layout when running `Layout.replace`.
133
- *
134
- * @property {string} name
135
- * The name of the view.
136
- *
137
- * @property {boolean} [detachOnClose=false] - _Updatable._
138
- * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
139
- * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
140
- *
141
- * @property {string} [manifestUrl] **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
142
- * but the properties in the manifest will take precedence if there is any collision.
143
- *
144
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
145
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
146
- * from the parent application.
147
- *
148
- * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
149
- *
150
- * @property {string} [processAffinity=<application uuid>]
151
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
152
- *
153
- * @property {boolean} [spellCheck=false]
154
- * Enable spell check in input text fields for the view.
155
- *
156
- * @property {Identity} [target]
157
- * The identity of the window this view should be attached to.
158
- *
159
- * @property {string} [url="about:blank"]
160
- * The URL of the view.
161
- *
162
- * @property {string} [uuid=<application uuid>]
163
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
164
- * If omitted, defaults to the `uuid` of the application spawning the view.
165
- * If given, must match the `uuid` of the application spawning the view.
166
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
167
- * really no need to provide it.
168
- */
169
- /**
170
- * A View can be used to embed additional web content into a Window.
171
- * It is like a child window, except it is positioned relative to its owning window.
172
- * It has the ability to listen for {@link OpenFin.ViewEvents View-specific events}.
173
- *
174
- * By default, a View will try to share the same renderer process as other Views owned by its parent Application.
175
- * To change that behavior, see the processAffinity {@link OpenFin.ViewOptions view option}.
176
- *
177
- * 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.
178
- */
179
- export declare class View extends WebContents<ViewEvent> {
180
- #private;
181
- identity: OpenFin.Identity;
182
- /**
183
- * @internal
184
- */
185
- constructor(wire: Transport, identity: OpenFin.Identity);
186
- /**
187
- * Focuses the view
188
- *
189
- * @function focus
190
- * @memberof View
191
- * @emits focused
192
- * @instance
193
- * @example
194
- * ```js
195
- * const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
196
- * await view.focus();
197
- * // do things with the focused view
198
- * ```
199
- * @experimental
200
- */
201
- focus({ emitSynthFocused }?: {
202
- emitSynthFocused: boolean;
203
- }): Promise<void>;
204
- /**
205
- * Attaches the current view to the given window identity.
206
- * Identity must be the identity of a window in the same application.
207
- * This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
208
- * @param target {Identity}
209
- *
210
- * @example
211
- * ```js
212
- * let view;
213
- * async function createView() {
214
- * const me = await fin.Window.getCurrent();
215
- * return fin.View.create({
216
- * name: 'viewNameAttach',
217
- * target: me.identity,
218
- * bounds: {top: 10, left: 10, width: 200, height: 200}
219
- * });
220
- * }
221
- *
222
- * async function attachView() {
223
- * view = await createView();
224
- * console.log('View created.');
225
- *
226
- * await view.navigate('https://google.com');
227
- * console.log('View navigated to given url.');
228
- *
229
- * const winOption = {
230
- * name:'winOptionName',
231
- * defaultWidth: 300,
232
- * defaultHeight: 300,
233
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
234
- * frame: true,
235
- * autoShow: true
236
- * };
237
- * const newWindow = await fin.Window.create(winOption);
238
- * view.attach(newWindow.identity);
239
- * }
240
- *
241
- * attachView()
242
- * .then(() => console.log('View attached to new window.'))
243
- * .catch(err => console.log(err));
244
- * ```
245
- * @experimental
246
- */
247
- attach: (target: OpenFin.Identity) => Promise<void>;
248
- /**
249
- * Destroys the current view
250
- *
251
- * @example
252
- * ```js
253
- * const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
254
- * view.destroy();
255
- * ```
256
- * @experimental
257
- */
258
- destroy: () => Promise<void>;
259
- /**
260
- * Shows the current view if it is currently hidden.
261
- *
262
- * @example
263
- * ```js
264
- * let view;
265
- * async function createView() {
266
- * const me = await fin.Window.getCurrent();
267
- * return fin.View.create({
268
- * name: 'viewNameShow',
269
- * target: me.identity,
270
- * bounds: {top: 10, left: 10, width: 200, height: 200}
271
- * });
272
- * }
273
- *
274
- * async function hideAndShowView() {
275
- * view = await createView();
276
- * console.log('View created.');
277
- *
278
- * await view.navigate('https://google.com');
279
- * console.log('View navigated to given url option.');
280
- *
281
- * await view.hide();
282
- * console.log("View hidden.");
283
- *
284
- * view.show();
285
- * console.log("View shown.");
286
- * }
287
- *
288
- * hideAndShowView()
289
- * .then(() => console.log('View hidden and shown.'))
290
- * .catch(err => console.log(err));
291
- * ```
292
- * @experimental
293
- */
294
- show: () => Promise<void>;
295
- /**
296
- * Hides the current view if it is currently visible.
297
- *
298
- * @example
299
- * ```js
300
- * let view;
301
- * async function createView() {
302
- * const me = await fin.Window.getCurrent();
303
- * return fin.View.create({
304
- * name: 'viewNameHide',
305
- * target: me.identity,
306
- * bounds: {top: 10, left: 10, width: 200, height: 200}
307
- * });
308
- * }
309
- *
310
- * async function hideView() {
311
- * view = await createView();
312
- * console.log('View created.');
313
- *
314
- * await view.navigate('https://google.com');
315
- * console.log('View navigated to given url.');
316
- *
317
- * await view.hide();
318
- * }
319
- *
320
- * hideView()
321
- * .then(() => console.log('View hidden.'))
322
- * .catch(err => console.log(err));
323
- * ```
324
- * @experimental
325
- */
326
- hide: () => Promise<void>;
327
- /**
328
- * Sets the bounds (top, left, width, height) of the view relative to its window.
329
- * @param bounds {ViewBounds}
330
- *
331
- * @remarks View position is relative to the bounds of the window.
332
- * ({top: 0, left: 0} represents the top left corner of the window)
333
- *
334
- * @example
335
- * ```js
336
- * let view;
337
- * async function createView() {
338
- * const me = await fin.Window.getCurrent();
339
- * return fin.View.create({
340
- * name: 'viewNameSetBounds',
341
- * target: me.identity,
342
- * bounds: {top: 10, left: 10, width: 200, height: 200}
343
- * });
344
- * }
345
- *
346
- * async function setViewBounds() {
347
- * view = await createView();
348
- * console.log('View created.');
349
- *
350
- * await view.navigate('https://google.com');
351
- * console.log('View navigated to given url.');
352
- *
353
- * await view.setBounds({
354
- * top: 100,
355
- * left: 100,
356
- * width: 300,
357
- * height: 300
358
- * });
359
- * }
360
- *
361
- * setViewBounds()
362
- * .then(() => console.log('View set to new bounds.'))
363
- * .catch(err => console.log(err));
364
- * ```
365
- * @experimental
366
- */
367
- setBounds: (bounds: OpenFin.Bounds) => Promise<void>;
368
- /**
369
- * Gets the bounds (top, left, width, height) of the view relative to its window.
370
- *
371
- * @remarks View position is relative to the bounds of the window.
372
- * ({top: 0, left: 0} represents the top left corner of the window)
373
- *
374
- * @example
375
- * ```js
376
- * const view = await fin.View.create({
377
- * name: 'viewNameSetBounds',
378
- * target: fin.me.identity,
379
- * bounds: {top: 10, left: 10, width: 200, height: 200}
380
- * });
381
- *
382
- * await view.navigate('https://google.com');
383
- *
384
- * await view.setBounds({
385
- * top: 100,
386
- * left: 100,
387
- * width: 300,
388
- * height: 300
389
- * });
390
- *
391
- * console.log(await view.getBounds());
392
- * ```
393
- * @experimental
394
- */
395
- getBounds: () => Promise<OpenFin.Bounds>;
396
- /**
397
- * Gets the View's info.
398
- *
399
- * @example
400
- * ```js
401
- * let view;
402
- * async function createView() {
403
- * const me = await fin.Window.getCurrent();
404
- * return fin.View.create({
405
- * name: 'viewNameGetInfo',
406
- * target: me.identity,
407
- * bounds: {top: 10, left: 10, width: 200, height: 200}
408
- * });
409
- * }
410
- *
411
- * async function getViewInfo() {
412
- * view = await createView();
413
- * console.log('View created.');
414
- *
415
- * await view.navigate('https://google.com');
416
- * console.log('View navigated to given url.');
417
- *
418
- * return view.getInfo();
419
- * }
420
- *
421
- * getViewInfo()
422
- * .then((info) => console.log('View info fetched.', info))
423
- * .catch(err => console.log(err));
424
- * ```
425
- * @experimental
426
- */
427
- getInfo: () => Promise<OpenFin.ViewInfo>;
428
- /**
429
- * Retrieves the layout for the window the view is attached to.
430
- *
431
- * @example
432
- * ```js
433
- * //get the current View
434
- * const view = await fin.View.getCurrent();
435
- *
436
- * //get a reference to the Layout for the Window the view is part of
437
- * const layout = await view.getParentLayout();
438
- * ```
439
- * @experimental
440
- */
441
- getParentLayout: () => Promise<OpenFin.Layout>;
442
- /**
443
- * Gets the View's options.
444
- *
445
- * @example
446
- * ```js
447
- * let view;
448
- * async function createView() {
449
- * const me = await fin.Window.getCurrent();
450
- * return fin.View.create({
451
- * name: 'viewNameGetOptions',
452
- * target: me.identity,
453
- * bounds: {top: 10, left: 10, width: 200, height: 200}
454
- * });
455
- * }
456
- *
457
- * async function getViewOptions() {
458
- * view = await createView();
459
- * console.log('View created.');
460
- *
461
- * await view.navigate('https://google.com');
462
- * console.log('View navigated to given url.');
463
- *
464
- * const me = await fin.Window.getCurrent();
465
- * view = fin.View.wrapSync({ uuid: me.identity.uuid, name: 'viewNameGetOptions' });
466
- * return view.getOptions();
467
- * }
468
- *
469
- * getViewOptions()
470
- * .then((info) => console.log('View options fetched.', info))
471
- * .catch(err => console.log(err));
472
- * ```
473
- * @experimental
474
- */
475
- getOptions: () => Promise<OpenFin.ViewOptions>;
476
- /**
477
- * Updates the view's options.
478
- * @param options
479
- *
480
- * @example
481
- * ```js
482
- * let view;
483
- * async function createView() {
484
- * const me = await fin.Window.getCurrent();
485
- * return fin.View.create({
486
- * url: 'https://google.com',
487
- * name: 'viewNameUpdateOptions',
488
- * target: me.identity,
489
- * bounds: {top: 10, left: 10, width: 200, height: 200}
490
- * });
491
- * }
492
- *
493
- * async function updateViewOptions() {
494
- * view = await createView();
495
- * console.log('View created.');
496
- *
497
- * await view.navigate('https://google.com');
498
- * console.log('View navigated to given url option.');
499
- *
500
- * const newOptions = { autoResize: {
501
- * width: true,
502
- * horizontal: true
503
- * }};
504
- * return view.updateOptions(newOptions);
505
- * }
506
- *
507
- * updateViewOptions()
508
- * .then(payload => console.log('View options updated: ', payload))
509
- * .catch(err => console.log(err));
510
- * ```
511
- * @experimental
512
- */
513
- updateOptions: (options: UpdatableViewOptions) => Promise<void>;
514
- /**
515
- * Retrieves the window the view is currently attached to.
516
- *
517
- * @experimental
518
- * @example
519
- * ```js
520
- * const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
521
- * view.getCurrentWindow()
522
- * .then(win => console.log('current window', win))
523
- * .catch(err => console.log(err));)
524
- * ```
525
- */
526
- getCurrentWindow: () => Promise<OpenFin.Window>;
527
- /**
528
- * Retrieves the current {@link OpenFin.TabStack} of the view if it belongs to one.
529
- * @returns this view belongs to.
530
- * @throws if this view does not belong to a TabStack or if the window has been destroyed.
531
- * @example
532
- * ```js
533
- * if (!fin.me.isView) {
534
- * throw new Error('Not running in a platform View.');
535
- * }
536
- *
537
- * const stack = await fin.me.getCurrentStack();
538
- * // Alternatively, you can wrap any view and get the stack from there
539
- * // const viewFromSomewhere = fin.View.wrapSync(someView.identity);
540
- * // const stack = await viewFromSomewhere.getCurrentStack();
541
- * const views = await stack.getViews();
542
- * console.log(`Stack contains ${views.length} view(s)`);
543
- * ```
544
- */
545
- getCurrentStack: () => Promise<OpenFin.TabStack>;
546
- /**
547
- * Triggers the before-unload handler for the View, if one is set.
548
- *
549
- * @remarks Returns `true` if the handler is trying to prevent the View from unloading, and `false` if it isn't.
550
- * Only enabled when setting enableBeforeUnload: true in your View options. If this option is not enabled it will
551
- * always return false.
552
- *
553
- * This method is used internally by the Platform Provider to determine the status of each before unload handler in Views when closing the Window.
554
- *
555
- * @example
556
- *
557
- * ```js
558
- * // from inside a View context
559
- * const unloadPrevented = await fin.me.triggerBeforeUnload();
560
- * ```
561
- *
562
- * @experimental
563
- */
564
- triggerBeforeUnload: () => Promise<boolean>;
565
- /**
566
- * **NOTE**: Internal use only.
567
- * Attaches this view to an HTML element in the current context. The view will resize responsively when the element bounds change.
568
- *
569
- * **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.
570
- *
571
- * **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.
572
- *
573
- * @param element - HTML element to attach the view to.
574
- * @returns - Cleanup function that will disconnect the element resize observer.
575
- * @internal
576
- * @experimental
577
- * @remarks View will resize accordingly when the element is resized. If the element is repositioned in the DOM the view will not be repositioned, to handle this case call `bindToElement` again once the element changes position.
578
- *
579
- * @example
580
- * ```html
581
- * <div id="view-container"></div>
582
- * <script>
583
- * async function createAndAttachView() {
584
- * const url = 'https://example.com';
585
- * const elementId = 'view-container';
586
- * const element = document.getElementById(elementId);
587
- * const view = await fin.View.create({
588
- * name: 'my-view',
589
- * url,
590
- * target: fin.me.identity
591
- * });
592
- * await view.navigate(url);
593
- * await view.bindToElement(element);
594
- * }
595
- * createAndAttachView().catch(console.error);
596
- * </script>
597
- * ```
598
- */
599
- bindToElement: (element: HTMLElement) => Promise<() => void>;
600
- }
601
- export {};