@openfin/core 33.76.31 → 33.76.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OpenFin.d.ts +1 -1
- package/README.md +29 -4
- package/fin.d.ts +2 -2
- package/{src → out}/GlobalOpenFin.d.ts +1 -1
- package/out/mock-alpha.d.ts +16112 -0
- package/out/mock-beta.d.ts +16112 -0
- package/out/mock-public.d.ts +16112 -0
- package/out/mock.d.ts +16797 -0
- package/out/mock.js +17104 -0
- package/package.json +30 -23
- package/LICENSE +0 -13
- package/NOTICE +0 -16
- package/openfin-core-33.76.31.tgz +0 -0
- package/src/OpenFin.d.ts +0 -3080
- package/src/OpenFin.js +0 -2
- package/src/api/api-exposer/api-consumer.d.ts +0 -28
- package/src/api/api-exposer/api-consumer.js +0 -28
- package/src/api/api-exposer/api-exposer.d.ts +0 -35
- package/src/api/api-exposer/api-exposer.js +0 -38
- package/src/api/api-exposer/decorators.d.ts +0 -10
- package/src/api/api-exposer/decorators.js +0 -18
- package/src/api/api-exposer/index.d.ts +0 -4
- package/src/api/api-exposer/index.js +0 -20
- package/src/api/api-exposer/strategies/index.d.ts +0 -1
- package/src/api/api-exposer/strategies/index.js +0 -17
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.d.ts +0 -14
- package/src/api/api-exposer/strategies/openfin-channels/channels-consumer.js +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.d.ts +0 -20
- package/src/api/api-exposer/strategies/openfin-channels/channels-exposer.js +0 -23
- package/src/api/api-exposer/strategies/openfin-channels/index.d.ts +0 -2
- package/src/api/api-exposer/strategies/openfin-channels/index.js +0 -18
- package/src/api/application/Factory.d.ts +0 -148
- package/src/api/application/Factory.js +0 -230
- package/src/api/application/Instance.d.ts +0 -321
- package/src/api/application/Instance.js +0 -453
- package/src/api/application/index.d.ts +0 -3
- package/src/api/application/index.js +0 -19
- package/src/api/base.d.ts +0 -48
- package/src/api/base.js +0 -177
- package/src/api/clipboard/index.d.ts +0 -92
- package/src/api/clipboard/index.js +0 -120
- package/src/api/events/application.d.ts +0 -146
- package/src/api/events/application.js +0 -2
- package/src/api/events/base.d.ts +0 -42
- package/src/api/events/base.js +0 -2
- package/src/api/events/channel.d.ts +0 -30
- package/src/api/events/channel.js +0 -2
- package/src/api/events/emitterMap.d.ts +0 -11
- package/src/api/events/emitterMap.js +0 -35
- package/src/api/events/eventAggregator.d.ts +0 -5
- package/src/api/events/eventAggregator.js +0 -35
- package/src/api/events/externalApplication.d.ts +0 -19
- package/src/api/events/externalApplication.js +0 -2
- package/src/api/events/frame.d.ts +0 -30
- package/src/api/events/frame.js +0 -2
- package/src/api/events/globalHotkey.d.ts +0 -20
- package/src/api/events/globalHotkey.js +0 -2
- package/src/api/events/platform.d.ts +0 -26
- package/src/api/events/platform.js +0 -2
- package/src/api/events/system.d.ts +0 -113
- package/src/api/events/system.js +0 -2
- package/src/api/events/typedEventEmitter.d.ts +0 -20
- package/src/api/events/typedEventEmitter.js +0 -2
- package/src/api/events/view.d.ts +0 -82
- package/src/api/events/view.js +0 -2
- package/src/api/events/webcontents.d.ts +0 -266
- package/src/api/events/webcontents.js +0 -2
- package/src/api/events/window.d.ts +0 -352
- package/src/api/events/window.js +0 -2
- package/src/api/external-application/Factory.d.ts +0 -27
- package/src/api/external-application/Factory.js +0 -40
- package/src/api/external-application/Instance.d.ts +0 -102
- package/src/api/external-application/Instance.js +0 -109
- package/src/api/external-application/index.d.ts +0 -3
- package/src/api/external-application/index.js +0 -19
- package/src/api/fin.d.ts +0 -51
- package/src/api/fin.js +0 -42
- package/src/api/frame/Factory.d.ts +0 -37
- package/src/api/frame/Factory.js +0 -69
- package/src/api/frame/Instance.d.ts +0 -123
- package/src/api/frame/Instance.js +0 -130
- package/src/api/frame/index.d.ts +0 -3
- package/src/api/frame/index.js +0 -19
- package/src/api/global-hotkey/index.d.ts +0 -38
- package/src/api/global-hotkey/index.js +0 -64
- package/src/api/interappbus/channel/channel.d.ts +0 -28
- package/src/api/interappbus/channel/channel.js +0 -77
- package/src/api/interappbus/channel/channels-docs.d.ts +0 -340
- package/src/api/interappbus/channel/channels-docs.js +0 -398
- package/src/api/interappbus/channel/client.d.ts +0 -24
- package/src/api/interappbus/channel/client.js +0 -89
- package/src/api/interappbus/channel/connection-manager.d.ts +0 -29
- package/src/api/interappbus/channel/connection-manager.js +0 -246
- package/src/api/interappbus/channel/index.d.ts +0 -25
- package/src/api/interappbus/channel/index.js +0 -169
- package/src/api/interappbus/channel/protocols/classic/message-receiver.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/classic/message-receiver.js +0 -73
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/classic/strategy.js +0 -101
- package/src/api/interappbus/channel/protocols/combined/strategy.d.ts +0 -20
- package/src/api/interappbus/channel/protocols/combined/strategy.js +0 -58
- package/src/api/interappbus/channel/protocols/index.d.ts +0 -47
- package/src/api/interappbus/channel/protocols/index.js +0 -2
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +0 -10
- package/src/api/interappbus/channel/protocols/protocol-manager.js +0 -43
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +0 -25
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +0 -141
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.d.ts +0 -30
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -130
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +0 -24
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +0 -85
- package/src/api/interappbus/channel/protocols/strategy-types.d.ts +0 -13
- package/src/api/interappbus/channel/protocols/strategy-types.js +0 -2
- package/src/api/interappbus/channel/protocols/strategy.d.ts +0 -17
- package/src/api/interappbus/channel/protocols/strategy.js +0 -2
- package/src/api/interappbus/channel/provider.d.ts +0 -34
- package/src/api/interappbus/channel/provider.js +0 -166
- package/src/api/interappbus/index.d.ts +0 -85
- package/src/api/interappbus/index.js +0 -175
- package/src/api/interop/Factory.d.ts +0 -37
- package/src/api/interop/Factory.js +0 -76
- package/src/api/interop/InteropBroker.d.ts +0 -437
- package/src/api/interop/InteropBroker.js +0 -1085
- package/src/api/interop/InteropClient.d.ts +0 -278
- package/src/api/interop/InteropClient.js +0 -459
- package/src/api/interop/SessionContextGroupBroker.d.ts +0 -27
- package/src/api/interop/SessionContextGroupBroker.js +0 -108
- package/src/api/interop/SessionContextGroupClient.d.ts +0 -21
- package/src/api/interop/SessionContextGroupClient.js +0 -86
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +0 -20
- package/src/api/interop/fdc3/PrivateChannelClient.js +0 -90
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +0 -55
- package/src/api/interop/fdc3/PrivateChannelProvider.js +0 -276
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +0 -208
- package/src/api/interop/fdc3/fdc3-1.2.js +0 -438
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +0 -301
- package/src/api/interop/fdc3/fdc3-2.0.js +0 -482
- package/src/api/interop/fdc3/fdc3.d.ts +0 -12
- package/src/api/interop/fdc3/fdc3.js +0 -35
- package/src/api/interop/fdc3/overrideCheck.d.ts +0 -4
- package/src/api/interop/fdc3/overrideCheck.js +0 -32
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +0 -53
- package/src/api/interop/fdc3/shapes/fdc3v1.js +0 -4
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +0 -75
- package/src/api/interop/fdc3/shapes/fdc3v2.js +0 -2
- package/src/api/interop/fdc3/utils.d.ts +0 -45
- package/src/api/interop/fdc3/utils.js +0 -239
- package/src/api/interop/fdc3/versions.d.ts +0 -1
- package/src/api/interop/fdc3/versions.js +0 -2
- package/src/api/interop/index.d.ts +0 -4
- package/src/api/interop/index.js +0 -20
- package/src/api/interop/utils.d.ts +0 -18
- package/src/api/interop/utils.js +0 -61
- package/src/api/me.d.ts +0 -40
- package/src/api/me.js +0 -134
- package/src/api/platform/Factory.d.ts +0 -115
- package/src/api/platform/Factory.js +0 -184
- package/src/api/platform/Instance.d.ts +0 -150
- package/src/api/platform/Instance.js +0 -332
- package/src/api/platform/common-utils.d.ts +0 -7
- package/src/api/platform/common-utils.js +0 -16
- package/src/api/platform/index.d.ts +0 -3
- package/src/api/platform/index.js +0 -19
- package/src/api/platform/layout/Factory.d.ts +0 -114
- package/src/api/platform/layout/Factory.js +0 -174
- package/src/api/platform/layout/Instance.d.ts +0 -57
- package/src/api/platform/layout/Instance.js +0 -126
- package/src/api/platform/layout/controllers/layout-content-cache.d.ts +0 -9
- package/src/api/platform/layout/controllers/layout-content-cache.js +0 -54
- package/src/api/platform/layout/controllers/layout-entities-controller.d.ts +0 -119
- package/src/api/platform/layout/controllers/layout-entities-controller.js +0 -287
- package/src/api/platform/layout/entities/layout-entities.d.ts +0 -235
- package/src/api/platform/layout/entities/layout-entities.js +0 -312
- package/src/api/platform/layout/entities/shapes.d.ts +0 -6
- package/src/api/platform/layout/entities/shapes.js +0 -2
- package/src/api/platform/layout/index.d.ts +0 -2
- package/src/api/platform/layout/index.js +0 -18
- package/src/api/platform/layout/layout.constants.d.ts +0 -1
- package/src/api/platform/layout/layout.constants.js +0 -4
- package/src/api/platform/layout/shapes.d.ts +0 -16
- package/src/api/platform/layout/shapes.js +0 -2
- package/src/api/platform/layout/utils/layout-traversal.d.ts +0 -4
- package/src/api/platform/layout/utils/layout-traversal.js +0 -65
- package/src/api/platform/provider.d.ts +0 -163
- package/src/api/platform/provider.js +0 -2
- package/src/api/snapshot-source/Factory.d.ts +0 -38
- package/src/api/snapshot-source/Factory.js +0 -66
- package/src/api/snapshot-source/Instance.d.ts +0 -31
- package/src/api/snapshot-source/Instance.js +0 -132
- package/src/api/snapshot-source/index.d.ts +0 -3
- package/src/api/snapshot-source/index.js +0 -19
- package/src/api/snapshot-source/utils.d.ts +0 -2
- package/src/api/snapshot-source/utils.js +0 -6
- package/src/api/system/index.d.ts +0 -517
- package/src/api/system/index.js +0 -895
- package/src/api/view/Factory.d.ts +0 -50
- package/src/api/view/Factory.js +0 -103
- package/src/api/view/Instance.d.ts +0 -487
- package/src/api/view/Instance.js +0 -557
- package/src/api/view/index.d.ts +0 -3
- package/src/api/view/index.js +0 -19
- package/src/api/webcontents/main.d.ts +0 -32
- package/src/api/webcontents/main.js +0 -156
- package/src/api/window/Factory.d.ts +0 -45
- package/src/api/window/Factory.js +0 -91
- package/src/api/window/Instance.d.ts +0 -1090
- package/src/api/window/Instance.js +0 -1349
- package/src/api/window/index.d.ts +0 -3
- package/src/api/window/index.js +0 -19
- package/src/browser.d.ts +0 -10
- package/src/browser.js +0 -36
- package/src/environment/browser.d.ts +0 -29
- package/src/environment/browser.js +0 -60
- package/src/environment/environment.d.ts +0 -33
- package/src/environment/environment.js +0 -4
- package/src/environment/mockEnvironment.d.ts +0 -27
- package/src/environment/mockEnvironment.js +0 -61
- package/src/environment/node-env.d.ts +0 -29
- package/src/environment/node-env.js +0 -72
- package/src/fdc3.d.ts +0 -3
- package/src/fdc3.js +0 -9
- package/src/mock.d.ts +0 -3
- package/src/mock.js +0 -18
- package/src/namespaces.d.ts +0 -21
- package/src/namespaces.js +0 -24
- package/src/shapes/ERROR_BOX_TYPES.d.ts +0 -1
- package/src/shapes/ERROR_BOX_TYPES.js +0 -2
- package/src/shapes/WebOptions.d.ts +0 -13
- package/src/shapes/WebOptions.js +0 -2
- package/src/shapes/WindowOptions.d.ts +0 -43
- package/src/shapes/WindowOptions.js +0 -2
- package/src/shapes/protocol.d.ts +0 -200
- package/src/shapes/protocol.js +0 -2
- package/src/transport/mockWire.d.ts +0 -11
- package/src/transport/mockWire.js +0 -26
- package/src/transport/transport-errors.d.ts +0 -31
- package/src/transport/transport-errors.js +0 -79
- package/src/transport/transport.d.ts +0 -73
- package/src/transport/transport.js +0 -219
- package/src/transport/wire.d.ts +0 -77
- package/src/transport/wire.js +0 -36
- package/src/util/asyncFilter.d.ts +0 -1
- package/src/util/asyncFilter.js +0 -7
- package/src/util/channel-api-relay.d.ts +0 -13
- package/src/util/channel-api-relay.js +0 -47
- package/src/util/errors.d.ts +0 -10
- package/src/util/errors.js +0 -12
- package/src/util/exhaustive.d.ts +0 -1
- package/src/util/exhaustive.js +0 -7
- package/src/util/http.d.ts +0 -11
- package/src/util/http.js +0 -90
- package/src/util/inaccessibleObject.d.ts +0 -2
- package/src/util/inaccessibleObject.js +0 -49
- package/src/util/lazy.d.ts +0 -34
- package/src/util/lazy.js +0 -54
- package/src/util/normalize-config.d.ts +0 -3
- package/src/util/normalize-config.js +0 -52
- package/src/util/promises.d.ts +0 -5
- package/src/util/promises.js +0 -27
- package/src/util/ref-counter.d.ts +0 -7
- package/src/util/ref-counter.js +0 -52
- package/src/util/reversible-map.d.ts +0 -11
- package/src/util/reversible-map.js +0 -49
- package/src/util/runtimeVersioning.d.ts +0 -3
- package/src/util/runtimeVersioning.js +0 -25
- package/src/util/utilTypes.d.ts +0 -8
- package/src/util/utilTypes.js +0 -2
- package/src/util/validate.d.ts +0 -3
- package/src/util/validate.js +0 -11
|
@@ -1,156 +0,0 @@
|
|
|
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.identity = identity;
|
|
9
|
-
this.entityType = entityType;
|
|
10
|
-
}
|
|
11
|
-
capturePage(options) {
|
|
12
|
-
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
|
13
|
-
}
|
|
14
|
-
executeJavaScript(code) {
|
|
15
|
-
return this.wire
|
|
16
|
-
.sendAction('execute-javascript-in-window', { ...this.identity, code })
|
|
17
|
-
.then(({ payload }) => payload.data);
|
|
18
|
-
}
|
|
19
|
-
getZoomLevel() {
|
|
20
|
-
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
|
21
|
-
}
|
|
22
|
-
setZoomLevel(level) {
|
|
23
|
-
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
|
24
|
-
}
|
|
25
|
-
navigate(url) {
|
|
26
|
-
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
|
27
|
-
}
|
|
28
|
-
navigateBack() {
|
|
29
|
-
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
|
30
|
-
}
|
|
31
|
-
async navigateForward() {
|
|
32
|
-
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
|
33
|
-
}
|
|
34
|
-
stopNavigation() {
|
|
35
|
-
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
|
36
|
-
}
|
|
37
|
-
reload(ignoreCache = false) {
|
|
38
|
-
return this.wire
|
|
39
|
-
.sendAction('reload-window', {
|
|
40
|
-
ignoreCache,
|
|
41
|
-
...this.identity
|
|
42
|
-
})
|
|
43
|
-
.then(() => undefined);
|
|
44
|
-
}
|
|
45
|
-
print(options = {}) {
|
|
46
|
-
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
|
47
|
-
}
|
|
48
|
-
findInPage(searchTerm, options) {
|
|
49
|
-
return this.wire
|
|
50
|
-
.sendAction('find-in-page', { ...this.identity, searchTerm, options })
|
|
51
|
-
.then(({ payload }) => payload.data);
|
|
52
|
-
}
|
|
53
|
-
stopFindInPage(action) {
|
|
54
|
-
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
|
55
|
-
}
|
|
56
|
-
getPrinters() {
|
|
57
|
-
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
|
58
|
-
}
|
|
59
|
-
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
|
60
|
-
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
|
61
|
-
}
|
|
62
|
-
async showDeveloperTools() {
|
|
63
|
-
// Note this hits the system action map in core state for legacy reasons.
|
|
64
|
-
await this.wire.sendAction('show-developer-tools', this.identity);
|
|
65
|
-
}
|
|
66
|
-
async getProcessInfo() {
|
|
67
|
-
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
|
68
|
-
return data;
|
|
69
|
-
}
|
|
70
|
-
async getSharedWorkers() {
|
|
71
|
-
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
|
72
|
-
}
|
|
73
|
-
async inspectSharedWorker() {
|
|
74
|
-
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
|
75
|
-
}
|
|
76
|
-
async inspectSharedWorkerById(workerId) {
|
|
77
|
-
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
|
78
|
-
}
|
|
79
|
-
async inspectServiceWorker() {
|
|
80
|
-
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
|
81
|
-
}
|
|
82
|
-
async showPopupWindow(options) {
|
|
83
|
-
this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
|
|
84
|
-
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
85
|
-
});
|
|
86
|
-
if (options === null || options === void 0 ? void 0 : options.onPopupReady) {
|
|
87
|
-
const readyListener = async ({ popupName }) => {
|
|
88
|
-
try {
|
|
89
|
-
const popupWindow = this.fin.Window.wrapSync({ uuid: this.fin.me.uuid, name: popupName });
|
|
90
|
-
await options.onPopupReady(popupWindow);
|
|
91
|
-
}
|
|
92
|
-
catch (error) {
|
|
93
|
-
throw new Error(`Something went wrong during onPopupReady execution: ${error}`);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
// TODO: fix typing (internal)
|
|
97
|
-
// @ts-expect-error
|
|
98
|
-
await this.once('popup-ready', readyListener);
|
|
99
|
-
}
|
|
100
|
-
const { payload: tryCreatePayload } = await this.wire.sendAction('try-create-popup-window', {
|
|
101
|
-
options: {
|
|
102
|
-
...options,
|
|
103
|
-
// Internal use only.
|
|
104
|
-
// @ts-expect-error
|
|
105
|
-
hasResultCallback: !!(options === null || options === void 0 ? void 0 : options.onPopupResult),
|
|
106
|
-
hasReadyCallback: !!(options === null || options === void 0 ? void 0 : options.onPopupReady)
|
|
107
|
-
},
|
|
108
|
-
...this.identity
|
|
109
|
-
});
|
|
110
|
-
const { data: { willOpen, options: popupOptions } } = tryCreatePayload;
|
|
111
|
-
if (willOpen) {
|
|
112
|
-
await this.wire.environment.createChildContent({
|
|
113
|
-
options: popupOptions.initialOptions,
|
|
114
|
-
entityType: 'window'
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
const normalizePopupResult = (payload) => {
|
|
118
|
-
const { name, uuid, result, data } = payload;
|
|
119
|
-
const popupResult = {
|
|
120
|
-
identity: {
|
|
121
|
-
name,
|
|
122
|
-
uuid
|
|
123
|
-
},
|
|
124
|
-
result
|
|
125
|
-
};
|
|
126
|
-
if (data) {
|
|
127
|
-
popupResult.data = data;
|
|
128
|
-
}
|
|
129
|
-
return popupResult;
|
|
130
|
-
};
|
|
131
|
-
if (options === null || options === void 0 ? void 0 : options.onPopupResult) {
|
|
132
|
-
const dispatchResultListener = async (payload) => {
|
|
133
|
-
await options.onPopupResult(normalizePopupResult(payload));
|
|
134
|
-
};
|
|
135
|
-
const teardownListener = async () => {
|
|
136
|
-
// TODO: fix typing (internal)
|
|
137
|
-
// @ts-expect-error
|
|
138
|
-
await this.removeListener('popup-result', dispatchResultListener);
|
|
139
|
-
};
|
|
140
|
-
// TODO: fix typing (internal)
|
|
141
|
-
// @ts-expect-error
|
|
142
|
-
await this.on('popup-result', dispatchResultListener);
|
|
143
|
-
// TODO: fix typing (internal)
|
|
144
|
-
// hilariously this does not need a ts-expect-error - this is gap in type soundness
|
|
145
|
-
// should investigate - probably due to `teardownListener` taking a void argument
|
|
146
|
-
// which might play nicely with the `never` type? huh...
|
|
147
|
-
await this.once('popup-teardown', teardownListener);
|
|
148
|
-
}
|
|
149
|
-
const { payload } = await this.wire.sendAction('show-popup-window', {
|
|
150
|
-
options: popupOptions,
|
|
151
|
-
...this.identity
|
|
152
|
-
});
|
|
153
|
-
return payload.data;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
exports.WebContents = WebContents;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type * as OpenFin from '../../OpenFin';
|
|
2
|
-
import { Base } from '../base';
|
|
3
|
-
/**
|
|
4
|
-
* @lends Window
|
|
5
|
-
*/
|
|
6
|
-
export default class _WindowModule extends Base {
|
|
7
|
-
/**
|
|
8
|
-
* Asynchronously returns a Window object that represents an existing window.
|
|
9
|
-
* @param { Identity } identity
|
|
10
|
-
* @return {Promise.<_Window>}
|
|
11
|
-
* @tutorial Window.wrap
|
|
12
|
-
* @static
|
|
13
|
-
*/
|
|
14
|
-
wrap(identity: OpenFin.Identity): Promise<OpenFin.Window>;
|
|
15
|
-
/**
|
|
16
|
-
* Synchronously returns a Window object that represents an existing window.
|
|
17
|
-
* @param { Identity } identity
|
|
18
|
-
* @return {_Window}
|
|
19
|
-
* @tutorial Window.wrapSync
|
|
20
|
-
* @static
|
|
21
|
-
*/
|
|
22
|
-
wrapSync(identity: OpenFin.Identity): OpenFin.Window;
|
|
23
|
-
/**
|
|
24
|
-
* Creates a new Window.
|
|
25
|
-
* @param { Window~options } options - Window creation options
|
|
26
|
-
* @return {Promise.<_Window>}
|
|
27
|
-
* @tutorial Window.create
|
|
28
|
-
* @static
|
|
29
|
-
*/
|
|
30
|
-
create(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
|
|
31
|
-
/**
|
|
32
|
-
* Asynchronously returns a Window object that represents the current window
|
|
33
|
-
* @return {Promise.<_Window>}
|
|
34
|
-
* @tutorial Window.getCurrent
|
|
35
|
-
* @static
|
|
36
|
-
*/
|
|
37
|
-
getCurrent(): Promise<OpenFin.Window>;
|
|
38
|
-
/**
|
|
39
|
-
* Synchronously returns a Window object that represents the current window
|
|
40
|
-
* @return {_Window}
|
|
41
|
-
* @tutorial Window.getCurrentSync
|
|
42
|
-
* @static
|
|
43
|
-
*/
|
|
44
|
-
getCurrentSync(): OpenFin.Window;
|
|
45
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const base_1 = require("../base");
|
|
4
|
-
const validate_1 = require("../../util/validate");
|
|
5
|
-
const Instance_1 = require("./Instance");
|
|
6
|
-
/**
|
|
7
|
-
* @lends 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 = (0, 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 = (0, 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;
|