@openfin/core 25.68.30 → 25.70.2
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.
- package/OpenFin.d.ts +30 -826
- package/README.md +12 -2
- package/package.json +1 -1
- package/src/api/application/Factory.d.ts +145 -145
- package/src/api/application/Factory.js +229 -229
- package/src/api/application/Instance.d.ts +301 -302
- package/src/api/application/Instance.js +412 -412
- package/src/api/application/index.d.ts +3 -3
- package/src/api/application/index.js +15 -15
- package/src/api/base.d.ts +43 -43
- package/src/api/base.js +177 -177
- package/src/api/clipboard/index.d.ts +69 -69
- package/src/api/clipboard/index.js +88 -88
- package/src/api/events/application.d.ts +69 -0
- package/src/api/events/application.js +2 -0
- package/src/api/events/base.d.ts +17 -0
- package/src/api/events/base.js +2 -0
- package/src/api/events/channel.d.ts +10 -11
- package/src/api/events/channel.js +2 -2
- package/src/api/events/emitterMap.d.ts +11 -11
- package/src/api/events/emitterMap.js +35 -35
- package/src/api/events/eventAggregator.d.ts +5 -5
- package/src/api/events/eventAggregator.js +43 -43
- package/src/api/events/externalApplication.d.ts +5 -0
- package/src/api/events/externalApplication.js +2 -0
- package/src/api/events/frame.d.ts +9 -0
- package/src/api/events/frame.js +2 -0
- package/src/api/events/globalHotkey.d.ts +10 -0
- package/src/api/events/globalHotkey.js +2 -0
- package/src/api/events/platform.d.ts +18 -0
- package/src/api/events/platform.js +2 -0
- package/src/api/events/system.d.ts +22 -0
- package/src/api/events/system.js +2 -0
- package/src/api/events/view.d.ts +56 -0
- package/src/api/events/view.js +2 -0
- package/src/api/events/webcontents.d.ts +48 -0
- package/src/api/events/webcontents.js +2 -0
- package/src/api/events/window.d.ts +176 -0
- package/src/api/events/window.js +2 -0
- package/src/api/external-application/Factory.d.ts +26 -26
- package/src/api/external-application/Factory.js +40 -40
- package/src/api/external-application/Instance.d.ts +101 -102
- package/src/api/external-application/Instance.js +109 -109
- package/src/api/external-application/index.d.ts +3 -3
- package/src/api/external-application/index.js +15 -15
- package/src/api/fin.d.ts +49 -49
- package/src/api/fin.js +43 -43
- package/src/api/frame/Factory.d.ts +36 -36
- package/src/api/frame/Factory.js +69 -69
- package/src/api/frame/Instance.d.ts +121 -121
- package/src/api/frame/Instance.js +130 -130
- package/src/api/frame/index.d.ts +3 -3
- package/src/api/frame/index.js +15 -15
- package/src/api/global-hotkey/index.d.ts +38 -38
- package/src/api/global-hotkey/index.js +58 -58
- package/src/api/interappbus/channel/channel.d.ts +26 -26
- package/src/api/interappbus/channel/channel.js +77 -77
- package/src/api/interappbus/channel/channels-docs.d.ts +318 -318
- package/src/api/interappbus/channel/channels-docs.js +376 -376
- package/src/api/interappbus/channel/client.d.ts +22 -22
- package/src/api/interappbus/channel/client.js +84 -84
- package/src/api/interappbus/channel/connection-manager.d.ts +28 -28
- package/src/api/interappbus/channel/connection-manager.js +244 -244
- package/src/api/interappbus/channel/index.d.ts +22 -23
- package/src/api/interappbus/channel/index.js +121 -121
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +13 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +73 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +22 -22
- package/src/api/interappbus/channel/protocols/classic/strategy.js +84 -84
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +20 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +58 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +44 -44
- package/src/api/interappbus/channel/protocols/index.js +2 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +10 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +43 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +23 -23
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +135 -135
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +30 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +131 -131
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +22 -22
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +87 -87
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +13 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +2 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +15 -15
- package/src/api/interappbus/channel/protocols/strategy.js +2 -2
- package/src/api/interappbus/channel/provider.d.ts +31 -31
- package/src/api/interappbus/channel/provider.js +160 -160
- package/src/api/interappbus/index.d.ts +85 -86
- package/src/api/interappbus/index.js +175 -175
- package/src/api/interop/Factory.d.ts +37 -37
- package/src/api/interop/Factory.js +54 -54
- package/src/api/interop/InteropBroker.d.ts +363 -363
- package/src/api/interop/InteropBroker.js +914 -914
- package/src/api/interop/InteropClient.d.ts +268 -268
- package/src/api/interop/InteropClient.js +450 -450
- package/src/api/interop/SessionContextGroupBroker.d.ts +26 -26
- package/src/api/interop/SessionContextGroupBroker.js +107 -107
- package/src/api/interop/SessionContextGroupClient.d.ts +20 -20
- package/src/api/interop/SessionContextGroupClient.js +85 -85
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +187 -187
- package/src/api/interop/fdc3/fdc3-1.2.js +385 -385
- package/src/api/interop/fdc3/fdc3.js +17 -17
- package/src/api/interop/fdc3/utils.d.ts +6 -6
- package/src/api/interop/fdc3/utils.js +17 -17
- package/src/api/interop/index.d.ts +4 -4
- package/src/api/interop/index.js +16 -16
- package/src/api/interop/utils.d.ts +11 -11
- package/src/api/interop/utils.js +36 -36
- package/src/api/me.d.ts +38 -35
- package/src/api/me.js +128 -60
- package/src/api/platform/Factory.d.ts +109 -109
- package/src/api/platform/Factory.js +188 -188
- package/src/api/platform/Instance.d.ts +122 -122
- package/src/api/platform/Instance.js +298 -298
- package/src/api/platform/common-utils.d.ts +6 -6
- package/src/api/platform/common-utils.js +16 -16
- package/src/api/platform/index.d.ts +3 -3
- package/src/api/platform/index.js +15 -15
- package/src/api/platform/layout/Factory.d.ts +108 -108
- package/src/api/platform/layout/Factory.js +189 -189
- package/src/api/platform/layout/Instance.d.ts +49 -49
- package/src/api/platform/layout/Instance.js +99 -99
- package/src/api/platform/layout/index.d.ts +2 -2
- package/src/api/platform/layout/index.js +14 -14
- package/src/api/platform/layout/shapes.d.ts +11 -0
- package/src/api/{window → platform/layout}/shapes.js +2 -2
- package/src/api/snapshot-source/Factory.d.ts +36 -36
- package/src/api/snapshot-source/Factory.js +65 -65
- package/src/api/snapshot-source/Instance.d.ts +30 -30
- package/src/api/snapshot-source/Instance.js +134 -134
- package/src/api/snapshot-source/index.d.ts +3 -3
- package/src/api/snapshot-source/index.js +15 -15
- package/src/api/snapshot-source/utils.d.ts +1 -1
- package/src/api/snapshot-source/utils.js +5 -5
- package/src/api/system/index.d.ts +960 -961
- package/src/api/system/index.js +1241 -1241
- package/src/api/view/Factory.d.ts +49 -49
- package/src/api/view/Factory.js +103 -103
- package/src/api/view/Instance.d.ts +387 -380
- package/src/api/view/Instance.js +422 -415
- package/src/api/view/index.d.ts +3 -3
- package/src/api/view/index.js +15 -15
- package/src/api/webcontents/main.d.ts +36 -36
- package/src/api/webcontents/main.js +82 -82
- package/src/api/window/Factory.d.ts +44 -44
- package/src/api/window/Factory.js +91 -91
- package/src/api/window/Instance.d.ts +972 -966
- package/src/api/window/Instance.js +1209 -1202
- package/src/api/window/index.d.ts +3 -5
- package/src/api/window/index.js +15 -17
- package/src/environment/environment.d.ts +28 -25
- package/src/environment/environment.js +4 -4
- package/src/environment/node-env.d.ts +25 -26
- package/src/environment/node-env.js +64 -64
- package/src/environment/openfin-env.d.ts +29 -30
- package/src/environment/openfin-env.js +107 -107
- package/src/mock.d.ts +3 -3
- package/src/mock.js +91 -90
- package/src/shapes/ERROR_BOX_TYPES.d.ts +1 -0
- package/src/shapes/ERROR_BOX_TYPES.js +2 -0
- package/src/shapes/WebOptions.d.ts +12 -0
- package/src/shapes/WebOptions.js +2 -0
- package/src/shapes/WindowOptions.d.ts +42 -0
- package/src/shapes/WindowOptions.js +2 -0
- package/src/shapes/protocol.d.ts +178 -0
- package/src/shapes/protocol.js +2 -0
- package/src/transport/fin_store.d.ts +4 -4
- package/src/transport/fin_store.js +16 -16
- package/src/transport/transport-errors.d.ts +18 -18
- package/src/transport/transport-errors.js +37 -37
- package/src/transport/transport.d.ts +56 -43
- package/src/transport/transport.js +181 -181
- package/src/transport/wire.d.ts +71 -11
- package/src/transport/wire.js +32 -32
- package/src/util/asyncFilter.d.ts +1 -1
- package/src/util/asyncFilter.js +7 -7
- package/src/util/errors.d.ts +9 -5
- package/src/util/errors.js +11 -11
- package/src/util/exhaustive.d.ts +1 -1
- package/src/util/exhaustive.js +7 -7
- package/src/util/http.d.ts +11 -11
- package/src/util/http.js +83 -83
- package/src/util/normalize-config.d.ts +3 -5
- package/src/util/normalize-config.js +47 -47
- package/src/util/promises.d.ts +5 -5
- package/src/util/promises.js +27 -27
- package/src/util/ref-counter.d.ts +7 -7
- package/src/util/ref-counter.js +51 -51
- package/src/util/runtimeVersioning.d.ts +3 -3
- package/src/util/runtimeVersioning.js +25 -25
- package/src/util/utilTypes.d.ts +8 -8
- package/src/util/utilTypes.js +2 -2
- package/src/util/validate.d.ts +3 -3
- package/src/util/validate.js +11 -11
- package/docs.README(OLD).md +0 -82
- package/resources/win/OpenFinRVM.exe +0 -0
- package/src/api/window/bounds-changed.d.ts +0 -10
- package/src/api/window/bounds-changed.js +0 -6
- package/src/api/window/shapes.d.ts +0 -13
package/src/api/view/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import ViewModule from './Factory';
|
|
2
|
-
export default ViewModule;
|
|
3
|
-
export * from './Instance';
|
|
1
|
+
import ViewModule from './Factory';
|
|
2
|
+
export default ViewModule;
|
|
3
|
+
export * from './Instance';
|
package/src/api/view/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
-
}
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const Factory_1 = require("./Factory");
|
|
14
|
-
exports.default = Factory_1.default;
|
|
15
|
-
__exportStar(require("./Instance"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const Factory_1 = require("./Factory");
|
|
14
|
+
exports.default = Factory_1.default;
|
|
15
|
+
__exportStar(require("./Instance"), exports);
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { EmitterBase } from '../base';
|
|
2
|
-
import Transport from '../../transport/transport';
|
|
3
|
-
import WebContentsEventMapping
|
|
4
|
-
declare type ImageFormat = 'bmp' | 'jpg' | 'png';
|
|
5
|
-
export interface CapturePageOptions {
|
|
6
|
-
area?: OpenFin.Rectangle;
|
|
7
|
-
format?: ImageFormat;
|
|
8
|
-
quality?: number;
|
|
9
|
-
}
|
|
10
|
-
export declare class WebContents<T extends WebContentsEventMapping> extends EmitterBase<T> {
|
|
11
|
-
entityType: string;
|
|
12
|
-
constructor(wire: Transport, identity: OpenFin.Identity, entityType: string);
|
|
13
|
-
capturePage(options?: CapturePageOptions): Promise<string>;
|
|
14
|
-
executeJavaScript(code: string): Promise<void>;
|
|
15
|
-
getZoomLevel(): Promise<number>;
|
|
16
|
-
setZoomLevel(level: number): Promise<void>;
|
|
17
|
-
navigate(url: string): Promise<void>;
|
|
18
|
-
navigateBack(): Promise<void>;
|
|
19
|
-
navigateForward(): Promise<void>;
|
|
20
|
-
stopNavigation(): Promise<void>;
|
|
21
|
-
reload(ignoreCache?: boolean): Promise<void>;
|
|
22
|
-
print(options?: OpenFin.PrintOptions): Promise<void>;
|
|
23
|
-
findInPage(searchTerm: string, options?: OpenFin.FindInPageOptions): Promise<void>;
|
|
24
|
-
stopFindInPage(action: string): Promise<void>;
|
|
25
|
-
getPrinters(): Promise<OpenFin.PrinterInfo>;
|
|
26
|
-
focus({ emitSynthFocused }?: {
|
|
27
|
-
emitSynthFocused: boolean;
|
|
28
|
-
}): Promise<void>;
|
|
29
|
-
showDeveloperTools(): Promise<void>;
|
|
30
|
-
getProcessInfo(): Promise<OpenFin.EntityProcessDetails>;
|
|
31
|
-
getSharedWorkers(): Promise<OpenFin.SharedWorkerInfo[]>;
|
|
32
|
-
inspectSharedWorker(): Promise<void>;
|
|
33
|
-
inspectSharedWorkerById(workerId: string): Promise<void>;
|
|
34
|
-
inspectServiceWorker(): Promise<void>;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
1
|
+
import { EmitterBase } from '../base';
|
|
2
|
+
import Transport from '../../transport/transport';
|
|
3
|
+
import { WebContentsEventMapping } from '../events/webcontents';
|
|
4
|
+
declare type ImageFormat = 'bmp' | 'jpg' | 'png';
|
|
5
|
+
export interface CapturePageOptions {
|
|
6
|
+
area?: OpenFin.Rectangle;
|
|
7
|
+
format?: ImageFormat;
|
|
8
|
+
quality?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare class WebContents<T extends WebContentsEventMapping> extends EmitterBase<T> {
|
|
11
|
+
entityType: string;
|
|
12
|
+
constructor(wire: Transport, identity: OpenFin.Identity, entityType: string);
|
|
13
|
+
capturePage(options?: CapturePageOptions): Promise<string>;
|
|
14
|
+
executeJavaScript(code: string): Promise<void>;
|
|
15
|
+
getZoomLevel(): Promise<number>;
|
|
16
|
+
setZoomLevel(level: number): Promise<void>;
|
|
17
|
+
navigate(url: string): Promise<void>;
|
|
18
|
+
navigateBack(): Promise<void>;
|
|
19
|
+
navigateForward(): Promise<void>;
|
|
20
|
+
stopNavigation(): Promise<void>;
|
|
21
|
+
reload(ignoreCache?: boolean): Promise<void>;
|
|
22
|
+
print(options?: OpenFin.PrintOptions): Promise<void>;
|
|
23
|
+
findInPage(searchTerm: string, options?: OpenFin.FindInPageOptions): Promise<void>;
|
|
24
|
+
stopFindInPage(action: string): Promise<void>;
|
|
25
|
+
getPrinters(): Promise<OpenFin.PrinterInfo>;
|
|
26
|
+
focus({ emitSynthFocused }?: {
|
|
27
|
+
emitSynthFocused: boolean;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
showDeveloperTools(): Promise<void>;
|
|
30
|
+
getProcessInfo(): Promise<OpenFin.EntityProcessDetails>;
|
|
31
|
+
getSharedWorkers(): Promise<OpenFin.SharedWorkerInfo[]>;
|
|
32
|
+
inspectSharedWorker(): Promise<void>;
|
|
33
|
+
inspectSharedWorkerById(workerId: string): Promise<void>;
|
|
34
|
+
inspectServiceWorker(): Promise<void>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WebContents = void 0;
|
|
4
|
-
const base_1 = require("../base");
|
|
5
|
-
class WebContents extends base_1.EmitterBase {
|
|
6
|
-
constructor(wire, identity, entityType) {
|
|
7
|
-
super(wire, entityType, identity.uuid, identity.name);
|
|
8
|
-
this.entityType = entityType;
|
|
9
|
-
}
|
|
10
|
-
capturePage(options) {
|
|
11
|
-
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
|
12
|
-
}
|
|
13
|
-
executeJavaScript(code) {
|
|
14
|
-
return this.wire
|
|
15
|
-
.sendAction('execute-javascript-in-window', { ...this.identity, code })
|
|
16
|
-
.then(({ payload }) => payload.data);
|
|
17
|
-
}
|
|
18
|
-
getZoomLevel() {
|
|
19
|
-
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
|
20
|
-
}
|
|
21
|
-
setZoomLevel(level) {
|
|
22
|
-
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
|
23
|
-
}
|
|
24
|
-
navigate(url) {
|
|
25
|
-
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
|
26
|
-
}
|
|
27
|
-
navigateBack() {
|
|
28
|
-
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
|
29
|
-
}
|
|
30
|
-
async navigateForward() {
|
|
31
|
-
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
|
32
|
-
}
|
|
33
|
-
stopNavigation() {
|
|
34
|
-
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
|
35
|
-
}
|
|
36
|
-
reload(ignoreCache = false) {
|
|
37
|
-
return this.wire
|
|
38
|
-
.sendAction('reload-window', {
|
|
39
|
-
ignoreCache,
|
|
40
|
-
...this.identity
|
|
41
|
-
})
|
|
42
|
-
.then(() => undefined);
|
|
43
|
-
}
|
|
44
|
-
print(options) {
|
|
45
|
-
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
|
46
|
-
}
|
|
47
|
-
findInPage(searchTerm, options) {
|
|
48
|
-
return this.wire
|
|
49
|
-
.sendAction('find-in-page', { ...this.identity, searchTerm, options })
|
|
50
|
-
.then(({ payload }) => payload.data);
|
|
51
|
-
}
|
|
52
|
-
stopFindInPage(action) {
|
|
53
|
-
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
|
54
|
-
}
|
|
55
|
-
getPrinters() {
|
|
56
|
-
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
|
57
|
-
}
|
|
58
|
-
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
|
59
|
-
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
|
60
|
-
}
|
|
61
|
-
async showDeveloperTools() {
|
|
62
|
-
// Note this hits the system action map in core state for legacy reasons.
|
|
63
|
-
await this.wire.sendAction('show-developer-tools', this.identity);
|
|
64
|
-
}
|
|
65
|
-
async getProcessInfo() {
|
|
66
|
-
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
|
67
|
-
return data;
|
|
68
|
-
}
|
|
69
|
-
async getSharedWorkers() {
|
|
70
|
-
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
|
71
|
-
}
|
|
72
|
-
async inspectSharedWorker() {
|
|
73
|
-
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
|
74
|
-
}
|
|
75
|
-
async inspectSharedWorkerById(workerId) {
|
|
76
|
-
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
|
77
|
-
}
|
|
78
|
-
async inspectServiceWorker() {
|
|
79
|
-
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
exports.WebContents = WebContents;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebContents = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
class WebContents extends base_1.EmitterBase {
|
|
6
|
+
constructor(wire, identity, entityType) {
|
|
7
|
+
super(wire, entityType, identity.uuid, identity.name);
|
|
8
|
+
this.entityType = entityType;
|
|
9
|
+
}
|
|
10
|
+
capturePage(options) {
|
|
11
|
+
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
|
12
|
+
}
|
|
13
|
+
executeJavaScript(code) {
|
|
14
|
+
return this.wire
|
|
15
|
+
.sendAction('execute-javascript-in-window', { ...this.identity, code })
|
|
16
|
+
.then(({ payload }) => payload.data);
|
|
17
|
+
}
|
|
18
|
+
getZoomLevel() {
|
|
19
|
+
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
|
20
|
+
}
|
|
21
|
+
setZoomLevel(level) {
|
|
22
|
+
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
|
23
|
+
}
|
|
24
|
+
navigate(url) {
|
|
25
|
+
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
|
26
|
+
}
|
|
27
|
+
navigateBack() {
|
|
28
|
+
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
|
29
|
+
}
|
|
30
|
+
async navigateForward() {
|
|
31
|
+
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
|
32
|
+
}
|
|
33
|
+
stopNavigation() {
|
|
34
|
+
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
|
35
|
+
}
|
|
36
|
+
reload(ignoreCache = false) {
|
|
37
|
+
return this.wire
|
|
38
|
+
.sendAction('reload-window', {
|
|
39
|
+
ignoreCache,
|
|
40
|
+
...this.identity
|
|
41
|
+
})
|
|
42
|
+
.then(() => undefined);
|
|
43
|
+
}
|
|
44
|
+
print(options) {
|
|
45
|
+
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
|
46
|
+
}
|
|
47
|
+
findInPage(searchTerm, options) {
|
|
48
|
+
return this.wire
|
|
49
|
+
.sendAction('find-in-page', { ...this.identity, searchTerm, options })
|
|
50
|
+
.then(({ payload }) => payload.data);
|
|
51
|
+
}
|
|
52
|
+
stopFindInPage(action) {
|
|
53
|
+
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
|
54
|
+
}
|
|
55
|
+
getPrinters() {
|
|
56
|
+
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
|
57
|
+
}
|
|
58
|
+
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
|
59
|
+
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
|
60
|
+
}
|
|
61
|
+
async showDeveloperTools() {
|
|
62
|
+
// Note this hits the system action map in core state for legacy reasons.
|
|
63
|
+
await this.wire.sendAction('show-developer-tools', this.identity);
|
|
64
|
+
}
|
|
65
|
+
async getProcessInfo() {
|
|
66
|
+
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
|
67
|
+
return data;
|
|
68
|
+
}
|
|
69
|
+
async getSharedWorkers() {
|
|
70
|
+
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
|
71
|
+
}
|
|
72
|
+
async inspectSharedWorker() {
|
|
73
|
+
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
|
74
|
+
}
|
|
75
|
+
async inspectSharedWorkerById(workerId) {
|
|
76
|
+
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
|
77
|
+
}
|
|
78
|
+
async inspectServiceWorker() {
|
|
79
|
+
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
exports.WebContents = WebContents;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Base } from '../base';
|
|
2
|
-
/**
|
|
3
|
-
* @lends Window
|
|
4
|
-
*/
|
|
5
|
-
export default class _WindowModule extends Base {
|
|
6
|
-
/**
|
|
7
|
-
* Asynchronously returns a Window object that represents an existing window.
|
|
8
|
-
* @param { Identity } identity
|
|
9
|
-
* @return {Promise.<_Window>}
|
|
10
|
-
* @tutorial Window.wrap
|
|
11
|
-
* @static
|
|
12
|
-
*/
|
|
13
|
-
wrap(identity: OpenFin.Identity): Promise<OpenFin.Window>;
|
|
14
|
-
/**
|
|
15
|
-
* Synchronously returns a Window object that represents an existing window.
|
|
16
|
-
* @param { Identity } identity
|
|
17
|
-
* @return {_Window}
|
|
18
|
-
* @tutorial Window.wrapSync
|
|
19
|
-
* @static
|
|
20
|
-
*/
|
|
21
|
-
wrapSync(identity: OpenFin.Identity): OpenFin.Window;
|
|
22
|
-
/**
|
|
23
|
-
* Creates a new Window.
|
|
24
|
-
* @param { Window~options } options - Window creation options
|
|
25
|
-
* @return {Promise.<_Window>}
|
|
26
|
-
* @tutorial Window.create
|
|
27
|
-
* @static
|
|
28
|
-
*/
|
|
29
|
-
create(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
|
|
30
|
-
/**
|
|
31
|
-
* Asynchronously returns a Window object that represents the current window
|
|
32
|
-
* @return {Promise.<_Window>}
|
|
33
|
-
* @tutorial Window.getCurrent
|
|
34
|
-
* @static
|
|
35
|
-
*/
|
|
36
|
-
getCurrent(): Promise<OpenFin.Window>;
|
|
37
|
-
/**
|
|
38
|
-
* Synchronously returns a Window object that represents the current window
|
|
39
|
-
* @return {_Window}
|
|
40
|
-
* @tutorial Window.getCurrentSync
|
|
41
|
-
* @static
|
|
42
|
-
*/
|
|
43
|
-
getCurrentSync(): OpenFin.Window;
|
|
44
|
-
}
|
|
1
|
+
import { Base } from '../base';
|
|
2
|
+
/**
|
|
3
|
+
* @lends Window
|
|
4
|
+
*/
|
|
5
|
+
export default class _WindowModule extends Base {
|
|
6
|
+
/**
|
|
7
|
+
* Asynchronously returns a Window object that represents an existing window.
|
|
8
|
+
* @param { Identity } identity
|
|
9
|
+
* @return {Promise.<_Window>}
|
|
10
|
+
* @tutorial Window.wrap
|
|
11
|
+
* @static
|
|
12
|
+
*/
|
|
13
|
+
wrap(identity: OpenFin.Identity): Promise<OpenFin.Window>;
|
|
14
|
+
/**
|
|
15
|
+
* Synchronously returns a Window object that represents an existing window.
|
|
16
|
+
* @param { Identity } identity
|
|
17
|
+
* @return {_Window}
|
|
18
|
+
* @tutorial Window.wrapSync
|
|
19
|
+
* @static
|
|
20
|
+
*/
|
|
21
|
+
wrapSync(identity: OpenFin.Identity): OpenFin.Window;
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new Window.
|
|
24
|
+
* @param { Window~options } options - Window creation options
|
|
25
|
+
* @return {Promise.<_Window>}
|
|
26
|
+
* @tutorial Window.create
|
|
27
|
+
* @static
|
|
28
|
+
*/
|
|
29
|
+
create(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
|
|
30
|
+
/**
|
|
31
|
+
* Asynchronously returns a Window object that represents the current window
|
|
32
|
+
* @return {Promise.<_Window>}
|
|
33
|
+
* @tutorial Window.getCurrent
|
|
34
|
+
* @static
|
|
35
|
+
*/
|
|
36
|
+
getCurrent(): Promise<OpenFin.Window>;
|
|
37
|
+
/**
|
|
38
|
+
* Synchronously returns a Window object that represents the current window
|
|
39
|
+
* @return {_Window}
|
|
40
|
+
* @tutorial Window.getCurrentSync
|
|
41
|
+
* @static
|
|
42
|
+
*/
|
|
43
|
+
getCurrentSync(): OpenFin.Window;
|
|
44
|
+
}
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const base_1 = require("../base");
|
|
4
|
-
const validate_1 = require("../../util/validate");
|
|
5
|
-
const Instance_1 = require("./Instance");
|
|
6
|
-
/**
|
|
7
|
-
* @lends Window
|
|
8
|
-
*/
|
|
9
|
-
class _WindowModule extends base_1.Base {
|
|
10
|
-
/**
|
|
11
|
-
* Asynchronously returns a Window object that represents an existing window.
|
|
12
|
-
* @param { Identity } identity
|
|
13
|
-
* @return {Promise.<_Window>}
|
|
14
|
-
* @tutorial Window.wrap
|
|
15
|
-
* @static
|
|
16
|
-
*/
|
|
17
|
-
async wrap(identity) {
|
|
18
|
-
this.wire.sendAction('window-wrap').catch((e) => {
|
|
19
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
20
|
-
});
|
|
21
|
-
const errorMsg = validate_1.validateIdentity(identity);
|
|
22
|
-
if (errorMsg) {
|
|
23
|
-
throw new Error(errorMsg);
|
|
24
|
-
}
|
|
25
|
-
return new Instance_1._Window(this.wire, identity);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Synchronously returns a Window object that represents an existing window.
|
|
29
|
-
* @param { Identity } identity
|
|
30
|
-
* @return {_Window}
|
|
31
|
-
* @tutorial Window.wrapSync
|
|
32
|
-
* @static
|
|
33
|
-
*/
|
|
34
|
-
wrapSync(identity) {
|
|
35
|
-
this.wire.sendAction('window-wrap-sync').catch((e) => {
|
|
36
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
37
|
-
});
|
|
38
|
-
const errorMsg = validate_1.validateIdentity(identity);
|
|
39
|
-
if (errorMsg) {
|
|
40
|
-
throw new Error(errorMsg);
|
|
41
|
-
}
|
|
42
|
-
return new Instance_1._Window(this.wire, identity);
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Creates a new Window.
|
|
46
|
-
* @param { Window~options } options - Window creation options
|
|
47
|
-
* @return {Promise.<_Window>}
|
|
48
|
-
* @tutorial Window.create
|
|
49
|
-
* @static
|
|
50
|
-
*/
|
|
51
|
-
create(options) {
|
|
52
|
-
this.wire.sendAction('create-window').catch((e) => {
|
|
53
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
54
|
-
});
|
|
55
|
-
const win = new Instance_1._Window(this.wire, { uuid: this.me.uuid, name: options.name });
|
|
56
|
-
return win.createWindow(options);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Asynchronously returns a Window object that represents the current window
|
|
60
|
-
* @return {Promise.<_Window>}
|
|
61
|
-
* @tutorial Window.getCurrent
|
|
62
|
-
* @static
|
|
63
|
-
*/
|
|
64
|
-
getCurrent() {
|
|
65
|
-
this.wire.sendAction('get-current-window').catch((e) => {
|
|
66
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
67
|
-
});
|
|
68
|
-
if (!this.wire.me.isWindow) {
|
|
69
|
-
throw new Error('You are not in a Window context');
|
|
70
|
-
}
|
|
71
|
-
const { uuid, name } = this.wire.me;
|
|
72
|
-
return this.wrap({ uuid, name });
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Synchronously returns a Window object that represents the current window
|
|
76
|
-
* @return {_Window}
|
|
77
|
-
* @tutorial Window.getCurrentSync
|
|
78
|
-
* @static
|
|
79
|
-
*/
|
|
80
|
-
getCurrentSync() {
|
|
81
|
-
this.wire.sendAction('get-current-window-sync').catch((e) => {
|
|
82
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
83
|
-
});
|
|
84
|
-
if (!this.wire.me.isWindow) {
|
|
85
|
-
throw new Error('You are not in a Window context');
|
|
86
|
-
}
|
|
87
|
-
const { uuid, name } = this.wire.me;
|
|
88
|
-
return this.wrapSync({ uuid, name });
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.default = _WindowModule;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_1 = require("../base");
|
|
4
|
+
const validate_1 = require("../../util/validate");
|
|
5
|
+
const Instance_1 = require("./Instance");
|
|
6
|
+
/**
|
|
7
|
+
* @lends Window
|
|
8
|
+
*/
|
|
9
|
+
class _WindowModule extends base_1.Base {
|
|
10
|
+
/**
|
|
11
|
+
* Asynchronously returns a Window object that represents an existing window.
|
|
12
|
+
* @param { Identity } identity
|
|
13
|
+
* @return {Promise.<_Window>}
|
|
14
|
+
* @tutorial Window.wrap
|
|
15
|
+
* @static
|
|
16
|
+
*/
|
|
17
|
+
async wrap(identity) {
|
|
18
|
+
this.wire.sendAction('window-wrap').catch((e) => {
|
|
19
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
20
|
+
});
|
|
21
|
+
const errorMsg = validate_1.validateIdentity(identity);
|
|
22
|
+
if (errorMsg) {
|
|
23
|
+
throw new Error(errorMsg);
|
|
24
|
+
}
|
|
25
|
+
return new Instance_1._Window(this.wire, identity);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Synchronously returns a Window object that represents an existing window.
|
|
29
|
+
* @param { Identity } identity
|
|
30
|
+
* @return {_Window}
|
|
31
|
+
* @tutorial Window.wrapSync
|
|
32
|
+
* @static
|
|
33
|
+
*/
|
|
34
|
+
wrapSync(identity) {
|
|
35
|
+
this.wire.sendAction('window-wrap-sync').catch((e) => {
|
|
36
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
37
|
+
});
|
|
38
|
+
const errorMsg = validate_1.validateIdentity(identity);
|
|
39
|
+
if (errorMsg) {
|
|
40
|
+
throw new Error(errorMsg);
|
|
41
|
+
}
|
|
42
|
+
return new Instance_1._Window(this.wire, identity);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Creates a new Window.
|
|
46
|
+
* @param { Window~options } options - Window creation options
|
|
47
|
+
* @return {Promise.<_Window>}
|
|
48
|
+
* @tutorial Window.create
|
|
49
|
+
* @static
|
|
50
|
+
*/
|
|
51
|
+
create(options) {
|
|
52
|
+
this.wire.sendAction('create-window').catch((e) => {
|
|
53
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
54
|
+
});
|
|
55
|
+
const win = new Instance_1._Window(this.wire, { uuid: this.me.uuid, name: options.name });
|
|
56
|
+
return win.createWindow(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Asynchronously returns a Window object that represents the current window
|
|
60
|
+
* @return {Promise.<_Window>}
|
|
61
|
+
* @tutorial Window.getCurrent
|
|
62
|
+
* @static
|
|
63
|
+
*/
|
|
64
|
+
getCurrent() {
|
|
65
|
+
this.wire.sendAction('get-current-window').catch((e) => {
|
|
66
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
67
|
+
});
|
|
68
|
+
if (!this.wire.me.isWindow) {
|
|
69
|
+
throw new Error('You are not in a Window context');
|
|
70
|
+
}
|
|
71
|
+
const { uuid, name } = this.wire.me;
|
|
72
|
+
return this.wrap({ uuid, name });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Synchronously returns a Window object that represents the current window
|
|
76
|
+
* @return {_Window}
|
|
77
|
+
* @tutorial Window.getCurrentSync
|
|
78
|
+
* @static
|
|
79
|
+
*/
|
|
80
|
+
getCurrentSync() {
|
|
81
|
+
this.wire.sendAction('get-current-window-sync').catch((e) => {
|
|
82
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
83
|
+
});
|
|
84
|
+
if (!this.wire.me.isWindow) {
|
|
85
|
+
throw new Error('You are not in a Window context');
|
|
86
|
+
}
|
|
87
|
+
const { uuid, name } = this.wire.me;
|
|
88
|
+
return this.wrapSync({ uuid, name });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.default = _WindowModule;
|