@openfin/core 25.68.26

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 (227) hide show
  1. package/LICENSE +13 -0
  2. package/NOTICE +16 -0
  3. package/OpenFin.d.ts +1340 -0
  4. package/README.md +41 -0
  5. package/docs.README(OLD).md +82 -0
  6. package/fin.d.ts +4 -0
  7. package/package.json +33 -0
  8. package/resources/win/OpenFinRVM.exe +0 -0
  9. package/src/api/application/Factory.d.ts +145 -0
  10. package/src/api/application/Factory.js +229 -0
  11. package/src/api/application/Instance.d.ts +302 -0
  12. package/src/api/application/Instance.js +412 -0
  13. package/src/api/application/index.d.ts +3 -0
  14. package/src/api/application/index.js +15 -0
  15. package/src/api/base.d.ts +43 -0
  16. package/src/api/base.js +177 -0
  17. package/src/api/clipboard/index.d.ts +69 -0
  18. package/src/api/clipboard/index.js +88 -0
  19. package/src/api/events/application.d.ts +69 -0
  20. package/src/api/events/application.js +2 -0
  21. package/src/api/events/base.d.ts +17 -0
  22. package/src/api/events/base.js +2 -0
  23. package/src/api/events/channel.d.ts +10 -0
  24. package/src/api/events/channel.js +2 -0
  25. package/src/api/events/emitterMap.d.ts +11 -0
  26. package/src/api/events/emitterMap.js +35 -0
  27. package/src/api/events/eventAggregator.d.ts +5 -0
  28. package/src/api/events/eventAggregator.js +43 -0
  29. package/src/api/events/externalApplication.d.ts +5 -0
  30. package/src/api/events/externalApplication.js +2 -0
  31. package/src/api/events/frame.d.ts +9 -0
  32. package/src/api/events/frame.js +2 -0
  33. package/src/api/events/globalHotkey.d.ts +10 -0
  34. package/src/api/events/globalHotkey.js +2 -0
  35. package/src/api/events/platform.d.ts +18 -0
  36. package/src/api/events/platform.js +2 -0
  37. package/src/api/events/system.d.ts +22 -0
  38. package/src/api/events/system.js +2 -0
  39. package/src/api/events/view.d.ts +56 -0
  40. package/src/api/events/view.js +2 -0
  41. package/src/api/events/webcontents.d.ts +48 -0
  42. package/src/api/events/webcontents.js +2 -0
  43. package/src/api/events/window.d.ts +169 -0
  44. package/src/api/events/window.js +2 -0
  45. package/src/api/external-application/Factory.d.ts +26 -0
  46. package/src/api/external-application/Factory.js +40 -0
  47. package/src/api/external-application/Instance.d.ts +102 -0
  48. package/src/api/external-application/Instance.js +109 -0
  49. package/src/api/external-application/index.d.ts +3 -0
  50. package/src/api/external-application/index.js +15 -0
  51. package/src/api/fin.d.ts +49 -0
  52. package/src/api/fin.js +43 -0
  53. package/src/api/frame/Factory.d.ts +36 -0
  54. package/src/api/frame/Factory.js +69 -0
  55. package/src/api/frame/Instance.d.ts +121 -0
  56. package/src/api/frame/Instance.js +130 -0
  57. package/src/api/frame/index.d.ts +3 -0
  58. package/src/api/frame/index.js +15 -0
  59. package/src/api/global-hotkey/index.d.ts +38 -0
  60. package/src/api/global-hotkey/index.js +58 -0
  61. package/src/api/interappbus/channel/channel.d.ts +26 -0
  62. package/src/api/interappbus/channel/channel.js +77 -0
  63. package/src/api/interappbus/channel/channels-docs.d.ts +318 -0
  64. package/src/api/interappbus/channel/channels-docs.js +376 -0
  65. package/src/api/interappbus/channel/client.d.ts +22 -0
  66. package/src/api/interappbus/channel/client.js +84 -0
  67. package/src/api/interappbus/channel/connection-manager.d.ts +28 -0
  68. package/src/api/interappbus/channel/connection-manager.js +244 -0
  69. package/src/api/interappbus/channel/index.d.ts +22 -0
  70. package/src/api/interappbus/channel/index.js +121 -0
  71. package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -0
  72. package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -0
  73. package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -0
  74. package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -0
  75. package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -0
  76. package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -0
  77. package/src/api/interappbus/channel/protocols/index.d.ts +44 -0
  78. package/src/api/interappbus/channel/protocols/index.js +2 -0
  79. package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -0
  80. package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -0
  81. package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -0
  82. package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -0
  83. package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -0
  84. package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -0
  85. package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -0
  86. package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -0
  87. package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -0
  88. package/src/api/interappbus/channel/protocols/strategy-types.js +2 -0
  89. package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -0
  90. package/src/api/interappbus/channel/protocols/strategy.js +2 -0
  91. package/src/api/interappbus/channel/provider.d.ts +31 -0
  92. package/src/api/interappbus/channel/provider.js +165 -0
  93. package/src/api/interappbus/index.d.ts +85 -0
  94. package/src/api/interappbus/index.js +175 -0
  95. package/src/api/interop/Factory.d.ts +37 -0
  96. package/src/api/interop/Factory.js +54 -0
  97. package/src/api/interop/InteropBroker.d.ts +363 -0
  98. package/src/api/interop/InteropBroker.js +914 -0
  99. package/src/api/interop/InteropClient.d.ts +268 -0
  100. package/src/api/interop/InteropClient.js +450 -0
  101. package/src/api/interop/SessionContextGroupBroker.d.ts +26 -0
  102. package/src/api/interop/SessionContextGroupBroker.js +107 -0
  103. package/src/api/interop/SessionContextGroupClient.d.ts +20 -0
  104. package/src/api/interop/SessionContextGroupClient.js +85 -0
  105. package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -0
  106. package/src/api/interop/fdc3/fdc3-1.2.js +385 -0
  107. package/src/api/interop/fdc3/fdc3.js +17 -0
  108. package/src/api/interop/fdc3/utils.d.ts +6 -0
  109. package/src/api/interop/fdc3/utils.js +17 -0
  110. package/src/api/interop/index.d.ts +4 -0
  111. package/src/api/interop/index.js +16 -0
  112. package/src/api/interop/utils.d.ts +11 -0
  113. package/src/api/interop/utils.js +36 -0
  114. package/src/api/me.d.ts +35 -0
  115. package/src/api/me.js +60 -0
  116. package/src/api/platform/Factory.d.ts +109 -0
  117. package/src/api/platform/Factory.js +188 -0
  118. package/src/api/platform/Instance.d.ts +122 -0
  119. package/src/api/platform/Instance.js +299 -0
  120. package/src/api/platform/common-utils.d.ts +6 -0
  121. package/src/api/platform/common-utils.js +16 -0
  122. package/src/api/platform/index.d.ts +3 -0
  123. package/src/api/platform/index.js +15 -0
  124. package/src/api/platform/layout/Factory.d.ts +108 -0
  125. package/src/api/platform/layout/Factory.js +189 -0
  126. package/src/api/platform/layout/Instance.d.ts +48 -0
  127. package/src/api/platform/layout/Instance.js +99 -0
  128. package/src/api/platform/layout/index.d.ts +3 -0
  129. package/src/api/platform/layout/index.js +15 -0
  130. package/src/api/platform/layout/shapes.d.ts +11 -0
  131. package/src/api/platform/layout/shapes.js +2 -0
  132. package/src/api/snapshot-source/Factory.d.ts +36 -0
  133. package/src/api/snapshot-source/Factory.js +65 -0
  134. package/src/api/snapshot-source/Instance.d.ts +30 -0
  135. package/src/api/snapshot-source/Instance.js +134 -0
  136. package/src/api/snapshot-source/index.d.ts +3 -0
  137. package/src/api/snapshot-source/index.js +15 -0
  138. package/src/api/snapshot-source/utils.d.ts +1 -0
  139. package/src/api/snapshot-source/utils.js +5 -0
  140. package/src/api/system/application.d.ts +6 -0
  141. package/src/api/system/application.js +2 -0
  142. package/src/api/system/entity.d.ts +11 -0
  143. package/src/api/system/entity.js +2 -0
  144. package/src/api/system/index.d.ts +957 -0
  145. package/src/api/system/index.js +1241 -0
  146. package/src/api/system/installedApps.d.ts +6 -0
  147. package/src/api/system/installedApps.js +2 -0
  148. package/src/api/system/log.d.ts +11 -0
  149. package/src/api/system/log.js +2 -0
  150. package/src/api/system/process.d.ts +15 -0
  151. package/src/api/system/process.js +2 -0
  152. package/src/api/system/proxy.d.ts +15 -0
  153. package/src/api/system/proxy.js +2 -0
  154. package/src/api/system/queryPermissionTypes.d.ts +1 -0
  155. package/src/api/system/queryPermissionTypes.js +2 -0
  156. package/src/api/system/registry-info.d.ts +7 -0
  157. package/src/api/system/registry-info.js +2 -0
  158. package/src/api/system/window.d.ts +16 -0
  159. package/src/api/system/window.js +2 -0
  160. package/src/api/view/Factory.d.ts +49 -0
  161. package/src/api/view/Factory.js +103 -0
  162. package/src/api/view/Instance.d.ts +379 -0
  163. package/src/api/view/Instance.js +415 -0
  164. package/src/api/view/index.d.ts +3 -0
  165. package/src/api/view/index.js +15 -0
  166. package/src/api/webcontents/main.d.ts +36 -0
  167. package/src/api/webcontents/main.js +82 -0
  168. package/src/api/window/Factory.d.ts +44 -0
  169. package/src/api/window/Factory.js +91 -0
  170. package/src/api/window/Instance.d.ts +966 -0
  171. package/src/api/window/Instance.js +1202 -0
  172. package/src/api/window/bounds-changed.d.ts +10 -0
  173. package/src/api/window/bounds-changed.js +6 -0
  174. package/src/api/window/index.d.ts +5 -0
  175. package/src/api/window/index.js +17 -0
  176. package/src/api/window/shapes.d.ts +13 -0
  177. package/src/api/window/shapes.js +2 -0
  178. package/src/environment/environment.d.ts +28 -0
  179. package/src/environment/environment.js +4 -0
  180. package/src/environment/node-env.d.ts +25 -0
  181. package/src/environment/node-env.js +64 -0
  182. package/src/environment/openfin-env.d.ts +29 -0
  183. package/src/environment/openfin-env.js +105 -0
  184. package/src/mock.d.ts +4 -0
  185. package/src/mock.js +91 -0
  186. package/src/shapes/ERROR_BOX_TYPES.d.ts +6 -0
  187. package/src/shapes/ERROR_BOX_TYPES.js +10 -0
  188. package/src/shapes/EntityType.d.ts +1 -0
  189. package/src/shapes/EntityType.js +2 -0
  190. package/src/shapes/LayoutPresetType.d.ts +1 -0
  191. package/src/shapes/LayoutPresetType.js +2 -0
  192. package/src/shapes/Platform.d.ts +112 -0
  193. package/src/shapes/Platform.js +16 -0
  194. package/src/shapes/WebOptions.d.ts +12 -0
  195. package/src/shapes/WebOptions.js +2 -0
  196. package/src/shapes/WindowOptions.d.ts +42 -0
  197. package/src/shapes/WindowOptions.js +2 -0
  198. package/src/shapes/protocol.d.ts +178 -0
  199. package/src/shapes/protocol.js +2 -0
  200. package/src/transport/fin_store.d.ts +4 -0
  201. package/src/transport/fin_store.js +16 -0
  202. package/src/transport/transport-errors.d.ts +17 -0
  203. package/src/transport/transport-errors.js +39 -0
  204. package/src/transport/transport.d.ts +57 -0
  205. package/src/transport/transport.js +195 -0
  206. package/src/transport/wire.d.ts +76 -0
  207. package/src/transport/wire.js +39 -0
  208. package/src/util/asyncFilter.d.ts +1 -0
  209. package/src/util/asyncFilter.js +7 -0
  210. package/src/util/errors.d.ts +9 -0
  211. package/src/util/errors.js +14 -0
  212. package/src/util/exhaustive.d.ts +1 -0
  213. package/src/util/exhaustive.js +7 -0
  214. package/src/util/http.d.ts +11 -0
  215. package/src/util/http.js +83 -0
  216. package/src/util/normalize-config.d.ts +3 -0
  217. package/src/util/normalize-config.js +47 -0
  218. package/src/util/promises.d.ts +5 -0
  219. package/src/util/promises.js +27 -0
  220. package/src/util/ref-counter.d.ts +7 -0
  221. package/src/util/ref-counter.js +51 -0
  222. package/src/util/runtimeVersioning.d.ts +3 -0
  223. package/src/util/runtimeVersioning.js +25 -0
  224. package/src/util/utilTypes.d.ts +8 -0
  225. package/src/util/utilTypes.js +2 -0
  226. package/src/util/validate.d.ts +3 -0
  227. package/src/util/validate.js +11 -0
@@ -0,0 +1,6 @@
1
+ export interface InstalledApps {
2
+ [key: string]: InstallationInfo;
3
+ }
4
+ export interface InstallationInfo {
5
+ cachedManifest: any;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ export interface GetLogRequestType {
2
+ name: string;
3
+ endFile?: string;
4
+ sizeLimit?: number;
5
+ }
6
+ export interface LogInfo {
7
+ name: string;
8
+ size: number;
9
+ date: string;
10
+ }
11
+ export declare type LogLevel = 'verbose' | 'info' | 'warning' | 'error' | 'fatal';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ export interface ProcessInfo {
2
+ cpuUsage?: number;
3
+ name?: string;
4
+ nonPagedPoolUsage?: number;
5
+ pageFaultCount?: number;
6
+ pagedPoolUsage?: number;
7
+ pagefileUsage?: number;
8
+ peakNonPagedPoolUsage?: number;
9
+ peakPagedPoolUsage?: number;
10
+ peakPagefileUsage?: number;
11
+ peakWorkingSetSize?: number;
12
+ processId?: number;
13
+ uuid?: string;
14
+ workingSetSize?: number;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ export interface ProxyInfo {
2
+ config: ProxyConfig;
3
+ system: ProxySystemInfo;
4
+ }
5
+ export interface ProxyConfig {
6
+ proxyAddress: string;
7
+ proxyPort: number;
8
+ type: string;
9
+ }
10
+ export interface ProxySystemInfo {
11
+ autoConfigUrl: string;
12
+ bypass: string;
13
+ enabled: boolean;
14
+ proxy: string;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export declare type PermissionState = 'granted' | 'denied' | 'unavailable';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface RegistryInfo {
2
+ data: any;
3
+ rootKey: string;
4
+ subkey: string;
5
+ type: string;
6
+ value: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ export interface WindowInfo {
2
+ childWindows: Array<WindowDetail>;
3
+ mainWindow: WindowDetail;
4
+ uuid: string;
5
+ }
6
+ export interface WindowDetail {
7
+ bottom: number;
8
+ height: number;
9
+ isShowing: boolean;
10
+ left: number;
11
+ name: string;
12
+ right: number;
13
+ state: string;
14
+ top: number;
15
+ width: number;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,49 @@
1
+ import { Base } from '../base';
2
+ /**
3
+ * @lends View
4
+ */
5
+ export default class ViewModule extends Base {
6
+ /**
7
+ * Creates a new View.
8
+ * @param { View~options } options - View creation options
9
+ * @return {Promise.<View>}
10
+ * @tutorial View.create
11
+ * @experimental
12
+ * @static
13
+ */
14
+ create(options: OpenFin.ViewCreationOptions): Promise<OpenFin.View>;
15
+ /**
16
+ * Asynchronously returns a View object that represents an existing view.
17
+ * @param { Identity } identity
18
+ * @return {Promise.<View>}
19
+ * @tutorial View.wrap
20
+ * @experimental
21
+ * @static
22
+ */
23
+ wrap(identity: OpenFin.Identity): Promise<OpenFin.View>;
24
+ /**
25
+ * Synchronously returns a View object that represents an existing view.
26
+ * @param { Identity } identity
27
+ * @return {View}
28
+ * @tutorial View.wrapSync
29
+ * @experimental
30
+ * @static
31
+ */
32
+ wrapSync(identity: OpenFin.Identity): OpenFin.View;
33
+ /**
34
+ * Asynchronously returns a View object that represents the current view
35
+ * @return {Promise.<View>}
36
+ * @tutorial View.getCurrent
37
+ * @experimental
38
+ * @static
39
+ */
40
+ getCurrent(): Promise<OpenFin.View>;
41
+ /**
42
+ * Synchronously returns a View object that represents the current view
43
+ * @return {View}
44
+ * @tutorial View.getCurrentSync
45
+ * @experimental
46
+ * @static
47
+ */
48
+ getCurrentSync(): OpenFin.View;
49
+ }
@@ -0,0 +1,103 @@
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 index_1 = require("./index");
6
+ /**
7
+ * @lends View
8
+ */
9
+ class ViewModule extends base_1.Base {
10
+ /**
11
+ * Creates a new View.
12
+ * @param { View~options } options - View creation options
13
+ * @return {Promise.<View>}
14
+ * @tutorial View.create
15
+ * @experimental
16
+ * @static
17
+ */
18
+ async create(options) {
19
+ const { uuid } = this.wire.me;
20
+ if (!options.name || typeof options.name !== 'string') {
21
+ throw new Error('Please provide a name property as a string in order to create a View.');
22
+ }
23
+ if (this.wire.environment.childViews) {
24
+ await this.wire.environment.createChildContent({
25
+ entityType: 'view',
26
+ options: { ...options, uuid }
27
+ });
28
+ }
29
+ else {
30
+ await this.wire.sendAction('create-view', { ...options, uuid });
31
+ }
32
+ return this.wrapSync({ uuid, name: options.name });
33
+ }
34
+ /**
35
+ * Asynchronously returns a View object that represents an existing view.
36
+ * @param { Identity } identity
37
+ * @return {Promise.<View>}
38
+ * @tutorial View.wrap
39
+ * @experimental
40
+ * @static
41
+ */
42
+ async wrap(identity) {
43
+ this.wire.sendAction('view-wrap');
44
+ const errorMsg = validate_1.validateIdentity(identity);
45
+ if (errorMsg) {
46
+ throw new Error(errorMsg);
47
+ }
48
+ return new index_1.View(this.wire, identity);
49
+ }
50
+ /**
51
+ * Synchronously returns a View object that represents an existing view.
52
+ * @param { Identity } identity
53
+ * @return {View}
54
+ * @tutorial View.wrapSync
55
+ * @experimental
56
+ * @static
57
+ */
58
+ wrapSync(identity) {
59
+ this.wire.sendAction('view-wrap-sync').catch((e) => {
60
+ // we do not want to expose this error, just continue if this analytics-only call fails
61
+ });
62
+ const errorMsg = validate_1.validateIdentity(identity);
63
+ if (errorMsg) {
64
+ throw new Error(errorMsg);
65
+ }
66
+ return new index_1.View(this.wire, identity);
67
+ }
68
+ /**
69
+ * Asynchronously returns a View object that represents the current view
70
+ * @return {Promise.<View>}
71
+ * @tutorial View.getCurrent
72
+ * @experimental
73
+ * @static
74
+ */
75
+ getCurrent() {
76
+ this.wire.sendAction('view-get-current').catch((e) => {
77
+ // we do not want to expose this error, just continue if this analytics-only call fails
78
+ });
79
+ if (!this.wire.me.isView) {
80
+ throw new Error('You are not in a View context');
81
+ }
82
+ const { uuid, name } = this.wire.me;
83
+ return this.wrap({ uuid, name });
84
+ }
85
+ /**
86
+ * Synchronously returns a View object that represents the current view
87
+ * @return {View}
88
+ * @tutorial View.getCurrentSync
89
+ * @experimental
90
+ * @static
91
+ */
92
+ getCurrentSync() {
93
+ this.wire.sendAction('view-get-current-sync').catch((e) => {
94
+ // we do not want to expose this error, just continue if this analytics-only call fails
95
+ });
96
+ if (!this.wire.me.isView) {
97
+ throw new Error('You are not in a View context');
98
+ }
99
+ const { uuid, name } = this.wire.me;
100
+ return this.wrapSync({ uuid, name });
101
+ }
102
+ }
103
+ exports.default = ViewModule;
@@ -0,0 +1,379 @@
1
+ import { WebContents } from '../webcontents/main';
2
+ import Transport from '../../transport/transport';
3
+ import { ViewEvents } from '../events/view';
4
+ import { Layout } from '../platform/layout';
5
+ /**
6
+ * @typedef {object} View~options
7
+ * @summary View creation options.
8
+ * @desc This is the options object required by {@link View.create View.create}.
9
+ *
10
+ * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
11
+ * (defaults to `"about:blank"` when omitted).
12
+ *
13
+ * @property {object} [experimental]
14
+ * Configurations for API injection.
15
+ *
16
+ * @property {boolean} [experimental.childWindows] Configure if the runtime should enable child windows for views.
17
+ *
18
+ * @property {object} [api]
19
+ * Configurations for API injection.
20
+ *
21
+ * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
22
+ *
23
+ * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
24
+ * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
25
+ *
26
+ * @property {object} [autoResize] AutoResize options
27
+ *
28
+ * @property {object} [bounds] initial bounds given relative to the window.
29
+ *
30
+ * @property {string} [backgroundColor="#FFF"] - _Updatable._
31
+ * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
32
+ * (`document.body.style.backgroundColor`),
33
+ * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
34
+ * areas when growing a window. Setting
35
+ * this value to the anticipated content background color can help improve user experience.
36
+ * Default is white.
37
+ *
38
+ * @property {object} [contentNavigation]
39
+ * Restrict navigation to URLs that match a whitelisted pattern.
40
+ * In the lack of a whitelist, navigation to URLs that match a blacklisted pattern would be prohibited.
41
+ * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
42
+ * @property {string[]} [contentNavigation.whitelist=[]] List of whitelisted URLs.
43
+ * @property {string[]} [contentNavigation.blacklist=[]] List of blacklisted URLs.
44
+ *
45
+ * @property {object} [contextMenuSettings] - _Updatable._
46
+ * Configure the context menu when right-clicking on a view.
47
+ * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
48
+ * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
49
+ * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
50
+ *
51
+ * @property {any} [customData=""] - _Updatable._
52
+ * A field that the user can attach serializable data to to be ferried around with the view options.
53
+ * _When omitted, the default value of this property is the empty string (`""`)._
54
+ *
55
+ * When omitted, the default value of this property is the empty string (`""`).
56
+ * As opposed to customData this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
57
+ *
58
+ * @property {object[]} [hotkeys=[]] - _Updatable._
59
+ * Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
60
+ * Within Platform, OpenFin also implements a set of pre-defined actions called
61
+ * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
62
+ * that can be assigned to a specific hotkey in the platform manifest.
63
+ * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
64
+ * @property {boolean} [hotkeys.preventDefault=false] preventDefault will prevent the page keydown/keyup events from being emitted.
65
+ *
66
+ * @property {boolean} [isClosable=true] **Platforms Only.** If false, the view will be persistent and can't be closed through
67
+ * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
68
+ * if the view isn't part of the new layout when running `Layout.replace`.
69
+ *
70
+ * @property {string} name
71
+ * The name of the view.
72
+ *
73
+ * @property {boolean} [detachOnClose=false] - _Updatable._
74
+ * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
75
+ * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
76
+ *
77
+ * @property {string} [manifestUrl] **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
78
+ * but the properties in the manifest will take precedence if there is any collision.
79
+ *
80
+ * @property {preloadScript[]} [preloadScripts] - _Inheritable_
81
+ * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
82
+ * from the parent application.
83
+ *
84
+ * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
85
+ *
86
+ * @property {string} [processAffinity=<application uuid>]
87
+ * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
88
+ *
89
+ * @property {Identity} [target]
90
+ * The identity of the window this view should be attached to.
91
+ *
92
+ * @property {string} [url="about:blank"]
93
+ * The URL of the view.
94
+ *
95
+ * @property {string} [uuid=<application uuid>]
96
+ * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
97
+ * If omitted, defaults to the `uuid` of the application spawning the view.
98
+ * If given, must match the `uuid` of the application spawning the view.
99
+ * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
100
+ * really no need to provide it.
101
+ */
102
+ /**
103
+ * @classdesc a View can be used to embed additional web content into a Window.
104
+ * It is like a child window, except it is positioned relative to its owning window.
105
+ * It has the ability to listen for <a href="tutorial-View.EventEmitter.html">View-specific events</a>.
106
+ *
107
+ * By default, a View will try to share the same renderer process as other Views owned by its parent Application.
108
+ * To change that behavior, see the processAffinity {@link View~options view option}.
109
+ *
110
+ * 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.
111
+ * @class
112
+ * @alias View
113
+ * @hideconstructor
114
+ */
115
+ export declare class View extends WebContents<ViewEvents> {
116
+ identity: OpenFin.Identity;
117
+ constructor(wire: Transport, identity: OpenFin.Identity);
118
+ /**
119
+ * Gets a base64 encoded image of the view or a part of it.
120
+ * @function capturePage
121
+ * @param { CapturePageOptions } [options] Options for the capturePage call.
122
+ * @memberOf View
123
+ * @instance
124
+ * @return {Promise.<string>}
125
+ * @tutorial View.capturePage
126
+ */
127
+ /**
128
+ * Executes Javascript on the view, restricted to contents you own or contents owned by
129
+ * applications you have created.
130
+ * @param { string } code JavaScript code to be executed on the view.
131
+ * @function executeJavaScript
132
+ * @memberOf View
133
+ * @instance
134
+ * @return {Promise.<void>}
135
+ * @tutorial View.executeJavaScript
136
+ */
137
+ /**
138
+ * Focuses the view
139
+ * @return {Promise.<void>}
140
+ * @function focus
141
+ * @memberof View
142
+ * @emits focused
143
+ * @instance
144
+ * @tutorial View.focus
145
+ * @experimental
146
+ */
147
+ focus({ emitSynthFocused }?: {
148
+ emitSynthFocused: boolean;
149
+ }): Promise<void>;
150
+ /**
151
+ * Returns the zoom level of the view.
152
+ * @function getZoomLevel
153
+ * @memberOf View
154
+ * @instance
155
+ * @return {Promise.<number>}
156
+ * @tutorial View.getZoomLevel
157
+ */
158
+ /**
159
+ * Sets the zoom level of the view.
160
+ * @param { number } level The zoom level
161
+ * @function setZoomLevel
162
+ * @memberOf View
163
+ * @instance
164
+ * @return {Promise.<void>}
165
+ * @tutorial View.setZoomLevel
166
+ */
167
+ /**
168
+ * Find and highlight text on a page.
169
+ * @param { string } searchTerm Term to find in page
170
+ * @param { FindInPageOptions } options Search options
171
+ * @function findInPage
172
+ * @memberOf View
173
+ * @instance
174
+ * @return {Promise.<number>}
175
+ * @tutorial View.findInPage
176
+ */
177
+ /**
178
+ * Stops any findInPage call with the provided action.
179
+ * @param {string} action
180
+ * Action to execute when stopping a find in page:<br>
181
+ * "clearSelection" - Clear the selection.<br>
182
+ * "keepSelection" - Translate the selection into a normal selection.<br>
183
+ * "activateSelection" - Focus and click the selection node.<br>
184
+ * @function stopFindInPage
185
+ * @memberOf View
186
+ * @instance
187
+ * @return {Promise.<void>}
188
+ * @tutorial View.stopFindInPage
189
+ */
190
+ /**
191
+ * Navigates the view to a specified URL. The url must contain the protocol prefix such as http:// or https://.
192
+ * @param { string } url - The URL to navigate the view to.
193
+ * @return {Promise.<void>}
194
+ * @function navigate
195
+ * @memberof View
196
+ * @instance
197
+ * @tutorial View.navigate
198
+ * @experimental
199
+ */
200
+ /**
201
+ * Navigates the view back one page.
202
+ * @function navigateBack
203
+ * @memberOf View
204
+ * @instance
205
+ * @return {Promise.<void>}
206
+ * @tutorial View.navigateBack
207
+ */
208
+ /**
209
+ * Navigates the view forward one page.
210
+ * @function navigateForward
211
+ * @memberOf View
212
+ * @instance
213
+ * @return {Promise.<void>}
214
+ * @tutorial View.navigateForward
215
+ */
216
+ /**
217
+ * Stops any current navigation the view is performing.
218
+ * @function stopNavigation
219
+ * @memberOf View
220
+ * @instance
221
+ * @return {Promise.<void>}
222
+ * @tutorial View.stopNavigation
223
+ */
224
+ /**
225
+ * Reloads the view current page
226
+ * @function reload
227
+ * @memberOf View
228
+ * @instance
229
+ * @return {Promise.<void>}
230
+ * @tutorial View.reload
231
+ */
232
+ /**
233
+ * Prints the view's web page
234
+ * @param { PrintOptions } [options] Printer Options
235
+ * @function print
236
+ * @memberOf View
237
+ * @instance
238
+ * @return {Promise.<void>}
239
+ * @tutorial View.print
240
+ */
241
+ /**
242
+ * Returns an array with all system printers
243
+ * @function getPrinters
244
+ * @memberOf View
245
+ * @instance
246
+ * @return { Promise.Array.<PrinterInfo> }
247
+ * @tutorial View.getPrinters
248
+ */
249
+ /**
250
+ * Shows the Chromium Developer Tools
251
+ * @function showDeveloperTools
252
+ * @memberOf View
253
+ * @instance
254
+ * @return {Promise.<void>}
255
+ * @tutorial View.showDeveloperTools
256
+ */
257
+ /**
258
+ * Retrieves the process information associated with a view.
259
+ * @function getProcessInfo
260
+ * @memberOf View
261
+ * @instance
262
+ * @return {Promise.<EntityProcessDetails>}
263
+ * @tutorial View.getProcessInfo
264
+ */
265
+ /**
266
+ * Retrieves information on all Shared Workers.
267
+ * @function getSharedWorkers
268
+ * @memberOf View
269
+ * @instance
270
+ * @return {Promise.Array.<SharedWorkerInfo>}
271
+ * @tutorial View.getSharedWorkers
272
+ */
273
+ /**
274
+ * Opens the developer tools for the shared worker context.
275
+ * @function inspectSharedWorker
276
+ * @memberOf View
277
+ * @instance
278
+ * @return {Promise.<void>}
279
+ * @tutorial View.inspectSharedWorker
280
+ */
281
+ /**
282
+ * Inspects the shared worker based on its ID.
283
+ * @param { string } workerId - The id of the shared worker.
284
+ * @function inspectSharedWorkerById
285
+ * @memberOf View
286
+ * @instance
287
+ * @return {Promise.<void>}
288
+ * @tutorial View.inspectSharedWorkerById
289
+ */
290
+ /**
291
+ * Opens the developer tools for the service worker context.
292
+ * @function inspectServiceWorker
293
+ * @memberOf View
294
+ * @instance
295
+ * @return {Promise.<void>}
296
+ * @tutorial View.inspectServiceWorker
297
+ */
298
+ /**
299
+ * Attaches the current view to a the given window identity.
300
+ * Identity must be the identity of a window in the same application.
301
+ * This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
302
+ * @param target {Identity}
303
+ * @return {Promise.<void>}
304
+ * @tutorial View.attach
305
+ * @experimental
306
+ */
307
+ attach: (target: OpenFin.Identity) => Promise<void>;
308
+ /**
309
+ * Destroys the current view
310
+ * @return {Promise.<void>}
311
+ * @tutorial View.destroy
312
+ * @experimental
313
+ */
314
+ destroy: () => Promise<void>;
315
+ /**
316
+ * Shows the current view if it is currently hidden.
317
+ * @return {Promise.<void>}
318
+ * @tutorial View.show
319
+ * @experimental
320
+ */
321
+ show: () => Promise<void>;
322
+ /**
323
+ * Hides the current view if it is currently visible.
324
+ * @return {Promise.<void>}
325
+ * @tutorial View.hide
326
+ * @experimental
327
+ */
328
+ hide: () => Promise<void>;
329
+ /**
330
+ * Sets the bounds (top, left, width, height) of the view relative to its window.
331
+ * @param bounds {ViewBounds}
332
+ * @return {Promise.<void>}
333
+ * @tutorial View.setBounds
334
+ * @experimental
335
+ */
336
+ setBounds: (bounds: OpenFin.Bounds) => Promise<void>;
337
+ /**
338
+ * Gets the bounds (top, left, width, height) of the view relative to its window.
339
+ * @return {Promise.<ViewBounds>}
340
+ * @tutorial View.getBounds
341
+ * @experimental
342
+ */
343
+ getBounds: () => Promise<OpenFin.Bounds>;
344
+ /**
345
+ * Gets the View's info.
346
+ * @return {Promise.<ViewInfo>}
347
+ * @tutorial View.getInfo
348
+ * @experimental
349
+ */
350
+ getInfo: () => Promise<OpenFin.ViewInfo>;
351
+ /**
352
+ * Retrieves the layout for the window the view is attached to.
353
+ * @return {Promise.<Layout>}
354
+ * @tutorial View.getParentLayout
355
+ * @experimental
356
+ */
357
+ getParentLayout: () => Promise<OpenFin.Layout>;
358
+ /**
359
+ * Gets the View's options.
360
+ * @return {Promise<ViewOptions>}
361
+ * @tutorial View.getOptions
362
+ * @experimental
363
+ */
364
+ getOptions: () => Promise<OpenFin.ViewOptions>;
365
+ /**
366
+ * Updates the view's options.
367
+ * @param { Partial<ViewOptions> } options
368
+ * @return {Promise.<void>}
369
+ * @tutorial View.updateOptions
370
+ * @experimental
371
+ */
372
+ updateOptions: (options: Partial<OpenFin.UpdatableViewOptions>) => Promise<void>;
373
+ /**
374
+ * Retrieves the window the view is currently attached to.
375
+ * @return {Promise.<_Window>}
376
+ * @experimental
377
+ */
378
+ getCurrentWindow: () => Promise<OpenFin.Window>;
379
+ }