@openfin/core 30.73.18 → 30.73.20
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 -1765
- package/fdc3.js +2 -0
- package/fdc3.ts +264 -0
- package/fin.d.ts +3 -4
- package/package.json +1 -1
- package/src/GlobalOpenFin.d.ts +4 -0
- package/src/OpenFin.d.ts +1404 -0
- package/src/OpenFin.js +2 -0
- package/src/api/application/Factory.d.ts +1 -0
- package/src/api/application/Instance.d.ts +1 -0
- package/src/api/base.d.ts +1 -0
- package/src/api/clipboard/index.d.ts +1 -0
- package/src/api/events/application.d.ts +3 -2
- package/src/api/events/channel.d.ts +1 -1
- package/src/api/events/externalApplication.d.ts +1 -1
- package/src/api/events/globalHotkey.d.ts +2 -1
- package/src/api/events/system.d.ts +2 -1
- package/src/api/events/view.d.ts +3 -2
- package/src/api/events/webcontents.d.ts +1 -0
- package/src/api/events/window.d.ts +4 -3
- package/src/api/external-application/Factory.d.ts +1 -0
- package/src/api/external-application/Instance.d.ts +1 -0
- package/src/api/fin.d.ts +1 -0
- package/src/api/frame/Factory.d.ts +1 -0
- package/src/api/frame/Instance.d.ts +1 -0
- package/src/api/global-hotkey/index.d.ts +1 -0
- package/src/api/interappbus/channel/channel.d.ts +1 -0
- package/src/api/interappbus/channel/client.d.ts +1 -0
- package/src/api/interappbus/channel/connection-manager.d.ts +1 -0
- package/src/api/interappbus/channel/connection-manager.js +6 -2
- package/src/api/interappbus/channel/index.d.ts +1 -0
- package/src/api/interappbus/channel/index.js +4 -3
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +1 -0
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +1 -0
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +1 -1
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +1 -0
- package/src/api/interappbus/channel/protocols/strategy.d.ts +1 -0
- package/src/api/interappbus/channel/provider.d.ts +1 -0
- package/src/api/interop/Factory.d.ts +1 -0
- package/src/api/interop/InteropBroker.d.ts +6 -2
- package/src/api/interop/InteropBroker.js +23 -12
- package/src/api/interop/InteropClient.d.ts +1 -0
- package/src/api/interop/SessionContextGroupBroker.d.ts +1 -0
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -0
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +2 -0
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +1 -0
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +2 -0
- package/src/api/interop/fdc3/fdc3-1.2.js +1 -1
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +3 -0
- package/src/api/interop/fdc3/fdc3-2.0.js +6 -13
- package/src/api/interop/fdc3/utils.d.ts +2 -0
- package/src/api/interop/utils.d.ts +1 -0
- package/src/api/me.d.ts +1 -0
- package/src/api/platform/Factory.d.ts +1 -0
- package/src/api/platform/Instance.d.ts +1 -0
- package/src/api/platform/common-utils.d.ts +1 -0
- package/src/api/platform/layout/Factory.d.ts +1 -0
- package/src/api/platform/layout/Instance.d.ts +1 -0
- package/src/api/platform/layout/Instance.js +0 -1
- package/src/api/platform/layout/controllers/tab-drag-controller.d.ts +1 -0
- package/src/api/platform/layout/shapes.d.ts +1 -0
- package/src/api/platform/layout/utils/bounds-observer.d.ts +1 -1
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -0
- package/src/api/snapshot-source/Factory.d.ts +1 -0
- package/src/api/snapshot-source/Factory.js +1 -1
- package/src/api/snapshot-source/Instance.d.ts +1 -0
- package/src/api/snapshot-source/utils.d.ts +1 -0
- package/src/api/system/index.d.ts +2 -1
- package/src/api/system/index.js +1 -1
- package/src/api/view/Factory.d.ts +1 -0
- package/src/api/view/Instance.d.ts +1 -0
- package/src/api/webcontents/main.d.ts +1 -0
- package/src/api/window/Factory.d.ts +1 -0
- package/src/api/window/Instance.d.ts +2 -1
- package/src/api/window/Instance.js +1 -1
- package/src/browser.d.ts +1 -0
- package/src/environment/browser.d.ts +1 -0
- package/src/environment/environment.d.ts +1 -0
- package/src/environment/node-env.d.ts +1 -0
- package/src/environment/openfin-env.d.ts +1 -0
- package/src/mock.d.ts +1 -1
- package/src/mock.js +3 -1
- package/src/shapes/WebOptions.d.ts +1 -0
- package/src/shapes/WindowOptions.d.ts +1 -0
- package/src/shapes/protocol.d.ts +1 -0
- package/src/transport/transport.d.ts +2 -1
package/src/OpenFin.js
ADDED
package/src/api/base.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as OpenFin from '../../OpenFin';
|
|
2
|
+
import { ApplicationEvent, BaseEventMap, WindowEvent } from './base';
|
|
3
|
+
import { PropagatedWindowEvents, WindowAlertRequestedEvent, WindowAuthRequestedEvent, WindowEndLoadEvent, WindowPerformanceReport } from './window';
|
|
3
4
|
import { PropagatedViewEvents } from './view';
|
|
4
5
|
export interface CrashedEvent {
|
|
5
6
|
reason: 'normal-termination' | 'abnormal-termination' | 'killed' | 'crashed' | 'still-running' | 'launch-failed' | 'out-of-memory' | 'integrity-failure';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseEventMap, RuntimeEvent } from './base';
|
|
2
2
|
export interface ExternalApplicationEvents extends BaseEventMap {
|
|
3
3
|
connected: RuntimeEvent<'externalapplication', 'connected'>;
|
|
4
4
|
disconnected: RuntimeEvent<'externalapplication', 'disconnected'>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as OpenFin from '../../OpenFin';
|
|
2
|
+
import { BaseEventMap, RuntimeEvent } from './base';
|
|
2
3
|
import Identity = OpenFin.Identity;
|
|
3
4
|
export interface GlobalHotkeyEvent<Type> extends RuntimeEvent<'global-hotkey', Type> {
|
|
4
5
|
identity: Identity;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as OpenFin from '../../OpenFin';
|
|
2
|
+
import { ApplicationEvent, BaseEvent, BaseEventMap } from './base';
|
|
2
3
|
import { PropagatedWindowEvents } from './window';
|
|
3
4
|
import { PropagatedApplicationEvents } from './application';
|
|
4
5
|
import { PropagatedViewEvents } from './view';
|
package/src/api/events/view.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as OpenFin from '../../OpenFin';
|
|
2
|
+
import { CertificateSelectionShownEvent, WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent } from './webcontents';
|
|
3
|
+
import { BaseEventMap, WindowEvent } from './base';
|
|
3
4
|
import { WindowNavigationRejectedEvent } from './window';
|
|
4
5
|
import { CrashedEvent } from './application';
|
|
5
6
|
export interface ViewEventMapping<Topic = string, Type = string> extends WebContentsEventMapping {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as OpenFin from '../../OpenFin';
|
|
1
2
|
import { CrashedEvent } from './application';
|
|
2
|
-
import {
|
|
3
|
-
import { WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent
|
|
4
|
-
import {
|
|
3
|
+
import { BaseEventMap, WindowEvent } from './base';
|
|
4
|
+
import { CertificateSelectionShownEvent, WebContentsEventMapping, WindowResourceLoadFailedEvent, WindowResourceResponseReceivedEvent } from './webcontents';
|
|
5
|
+
import { InputEvent, PropagatedViewEventMapping } from './view';
|
|
5
6
|
export interface WindowAlertRequestedEvent<Topic, Type> extends WindowEvent<Topic, Type> {
|
|
6
7
|
message: string;
|
|
7
8
|
url: string;
|
package/src/api/fin.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ class ConnectionManager extends base_1.Base {
|
|
|
44
44
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
|
45
45
|
}
|
|
46
46
|
static getProtocolOptionsFromStrings(protocols) {
|
|
47
|
-
return protocols.map(protocol => {
|
|
47
|
+
return protocols.map((protocol) => {
|
|
48
48
|
switch (protocol) {
|
|
49
49
|
case 'rtc':
|
|
50
50
|
return strategy_2.RTCInfo;
|
|
@@ -85,7 +85,11 @@ class ConnectionManager extends base_1.Base {
|
|
|
85
85
|
}
|
|
86
86
|
const channel = new provider_1.ChannelProvider(providerIdentity, this.wire, strategy);
|
|
87
87
|
const key = providerIdentity.channelId;
|
|
88
|
-
this.providerMap.set(key, {
|
|
88
|
+
this.providerMap.set(key, {
|
|
89
|
+
provider: channel,
|
|
90
|
+
strategy,
|
|
91
|
+
supportedProtocols: ConnectionManager.getProtocolOptionsFromStrings(protocols)
|
|
92
|
+
});
|
|
89
93
|
provider_1.ChannelProvider.setProviderRemoval(channel, this.removeChannelFromProviderMap.bind(this));
|
|
90
94
|
return channel;
|
|
91
95
|
}
|
|
@@ -57,11 +57,12 @@ class Channel extends base_1.EmitterBase {
|
|
|
57
57
|
let connectionUrl;
|
|
58
58
|
const entityType = this.wire.environment.getCurrentEntityType();
|
|
59
59
|
if (entityType === 'iframe') {
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
// @ts-expect-error
|
|
61
|
+
// TODO: type this correctly (frame types are broken)
|
|
62
|
+
const frame = (await this.fin.me.getInfo()).url;
|
|
62
63
|
}
|
|
63
64
|
else if (entityType === 'window' || entityType === 'view') {
|
|
64
|
-
connectionUrl = (await fin.me.getInfo()).url;
|
|
65
|
+
connectionUrl = (await this.fin.me.getInfo()).url;
|
|
65
66
|
}
|
|
66
67
|
const res = await this.wire.sendAction('connect-to-channel', {
|
|
67
68
|
channelName,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ExternalClientOffer, LocalSupportedProtocol, MessagingProtocols, ProtocolOffer } from '.';
|
|
2
2
|
export declare class ProtocolManager {
|
|
3
3
|
private ProtocolsInPreferenceOrder;
|
|
4
4
|
DefaultClientProtocols: ['classic'];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
2
|
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
4
3
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
5
4
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
@@ -14,6 +13,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
14
13
|
var _RTCEndpoint_processAction, _RTCEndpoint_disconnectListener;
|
|
15
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
15
|
exports.RTCEndpoint = void 0;
|
|
16
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
17
17
|
const errors_1 = require("../../../../../util/errors");
|
|
18
18
|
/*
|
|
19
19
|
This handles sending RTC messages between RTC connections over the request and response data channels.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FDC3, FDC3v2 } from '../../../fdc3';
|
|
2
|
+
import * as OpenFin from '../../OpenFin';
|
|
1
3
|
import { Base } from '../base';
|
|
2
4
|
import type Transport from '../../transport/transport';
|
|
3
5
|
import Identity = OpenFin.Identity;
|
|
@@ -404,7 +406,9 @@ export declare class InteropBroker extends Base {
|
|
|
404
406
|
* @param clientIdentity
|
|
405
407
|
* @returns { Promise<ImplementationMetadata(2)> }
|
|
406
408
|
*/
|
|
407
|
-
fdc3HandleGetInfo(
|
|
409
|
+
fdc3HandleGetInfo(payload: {
|
|
410
|
+
fdc3Version: string;
|
|
411
|
+
}, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
408
412
|
/**
|
|
409
413
|
* Returns an array of info for each Interop Client connected to the Interop Broker.
|
|
410
414
|
*
|
|
@@ -443,7 +447,7 @@ export declare class InteropBroker extends Base {
|
|
|
443
447
|
private static hasEndpointId;
|
|
444
448
|
static isContextTypeCompatible(contextType: string, registeredContextType: string | undefined): boolean;
|
|
445
449
|
private setContextGroupMap;
|
|
446
|
-
private
|
|
450
|
+
private setCurrentContextGroupInClientOptions;
|
|
447
451
|
private setupChannelProvider;
|
|
448
452
|
private wireChannel;
|
|
449
453
|
/**
|
|
@@ -400,7 +400,7 @@ class InteropBroker extends base_1.Base {
|
|
|
400
400
|
const oldContextGroupId = clientSubscriptionState.contextGroupId;
|
|
401
401
|
if (oldContextGroupId !== contextGroupId) {
|
|
402
402
|
clientSubscriptionState.contextGroupId = contextGroupId;
|
|
403
|
-
await
|
|
403
|
+
await this.setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId);
|
|
404
404
|
const contextGroupMap = this.contextGroupsById.get(contextGroupId);
|
|
405
405
|
for (const [, handlerInfo] of clientSubscriptionState.contextHandlers) {
|
|
406
406
|
const { contextType, handlerId } = handlerInfo;
|
|
@@ -479,7 +479,7 @@ class InteropBroker extends base_1.Base {
|
|
|
479
479
|
if (clientState) {
|
|
480
480
|
clientState.contextGroupId = undefined;
|
|
481
481
|
}
|
|
482
|
-
await
|
|
482
|
+
await this.setCurrentContextGroupInClientOptions(clientIdentity, null);
|
|
483
483
|
}
|
|
484
484
|
// Used by platform windows to know what client groups the provider has declared. Also used internally to access context groups. Overrideable so that the platform developer can modify it.
|
|
485
485
|
/**
|
|
@@ -724,10 +724,21 @@ class InteropBroker extends base_1.Base {
|
|
|
724
724
|
* @returns { Promise<ImplementationMetadata(2)> }
|
|
725
725
|
*/
|
|
726
726
|
// eslint-disable-next-line class-methods-use-this
|
|
727
|
-
async fdc3HandleGetInfo(clientIdentity) {
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
|
|
727
|
+
async fdc3HandleGetInfo(payload, clientIdentity) {
|
|
728
|
+
const { fdc3Version } = payload;
|
|
729
|
+
return {
|
|
730
|
+
fdc3Version,
|
|
731
|
+
provider: 'OpenFin',
|
|
732
|
+
providerVersion: await this.fin.System.getVersion(),
|
|
733
|
+
optionalFeatures: {
|
|
734
|
+
OriginatingAppMetadata: false,
|
|
735
|
+
UserChannelMembershipAPIs: true
|
|
736
|
+
},
|
|
737
|
+
appMetadata: {
|
|
738
|
+
appId: '',
|
|
739
|
+
instanceId: ''
|
|
740
|
+
}
|
|
741
|
+
};
|
|
731
742
|
}
|
|
732
743
|
/**
|
|
733
744
|
* Returns an array of info for each Interop Client connected to the Interop Broker.
|
|
@@ -949,14 +960,14 @@ class InteropBroker extends base_1.Base {
|
|
|
949
960
|
this.contextGroupsById.set(contextGroupInfo.id, new Map());
|
|
950
961
|
}
|
|
951
962
|
}
|
|
952
|
-
|
|
953
|
-
const entityInfo = await fin.System.getEntityInfo(clientIdentity.uuid, clientIdentity.name);
|
|
963
|
+
async setCurrentContextGroupInClientOptions(clientIdentity, contextGroupId) {
|
|
964
|
+
const entityInfo = await this.fin.System.getEntityInfo(clientIdentity.uuid, clientIdentity.name);
|
|
954
965
|
let entity;
|
|
955
966
|
if (entityInfo.entityType === 'view') {
|
|
956
|
-
entity = await fin.View.wrap(clientIdentity);
|
|
967
|
+
entity = await this.fin.View.wrap(clientIdentity);
|
|
957
968
|
}
|
|
958
969
|
else if (entityInfo.entityType === 'window') {
|
|
959
|
-
entity = await fin.Window.wrap(clientIdentity);
|
|
970
|
+
entity = await this.fin.Window.wrap(clientIdentity);
|
|
960
971
|
}
|
|
961
972
|
if (entity) {
|
|
962
973
|
await entity.updateOptions({
|
|
@@ -1002,7 +1013,7 @@ class InteropBroker extends base_1.Base {
|
|
|
1002
1013
|
channel.onDisconnection((clientIdentity) => {
|
|
1003
1014
|
this.interopClients.delete(clientIdentity.endpointId);
|
|
1004
1015
|
const targetInfo = this.intentClientMap.get(clientIdentity.name);
|
|
1005
|
-
if (targetInfo && clientIdentity.uuid === fin.me.
|
|
1016
|
+
if (targetInfo && clientIdentity.uuid === this.fin.me.uuid) {
|
|
1006
1017
|
targetInfo.forEach((handler) => {
|
|
1007
1018
|
handler.isReady = false;
|
|
1008
1019
|
});
|
|
@@ -1053,7 +1064,7 @@ class InteropBroker extends base_1.Base {
|
|
|
1053
1064
|
channel.register('fdc3FindInstances', this.fdc3HandleFindInstances.bind(this));
|
|
1054
1065
|
channel.register('fdc3GetAppMetadata', this.fdc3HandleGetAppMetadata.bind(this));
|
|
1055
1066
|
channel.register('fdc3v2GetInfo', async (payload, clientIdentity) => {
|
|
1056
|
-
return this.fdc3HandleGetInfo.bind(this)(clientIdentity);
|
|
1067
|
+
return this.fdc3HandleGetInfo.bind(this)(payload, clientIdentity);
|
|
1057
1068
|
});
|
|
1058
1069
|
}
|
|
1059
1070
|
/**
|
|
@@ -351,7 +351,7 @@ class Fdc3Module extends base_1.Base {
|
|
|
351
351
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
352
352
|
});
|
|
353
353
|
try {
|
|
354
|
-
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3Open', { app, context });
|
|
354
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3Open', { app, context });
|
|
355
355
|
}
|
|
356
356
|
catch (error) {
|
|
357
357
|
const errorToThrow = error.message === utils_2.BROKER_ERRORS.fdc3Open ? 'ResolverUnavailable' : error;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { FDC3, FDC3v2 } from '../../../../fdc3';
|
|
2
|
+
import * as OpenFin from '../../../OpenFin';
|
|
1
3
|
import { Base } from '../../base';
|
|
2
4
|
import Transport from '../../../transport/transport';
|
|
3
5
|
/**
|
|
@@ -290,6 +292,7 @@ export default class Fdc3Module2 extends Base implements FDC3v2.DesktopAgent {
|
|
|
290
292
|
leaveCurrentChannel(): Promise<void>;
|
|
291
293
|
/**
|
|
292
294
|
* Retrieves information about the FDC3 implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number, details of whether optional API features are implemented and the metadata of the calling application according to the desktop agent.
|
|
295
|
+
* fdc3HandleGetInfo must be overridden in the InteropBroker so that the ImplementationMetadata will have the appMetadata info.
|
|
293
296
|
* @returns { Promise<ImplementationMetadata(2)> }
|
|
294
297
|
* @tutorial fdc3v2.getInfo
|
|
295
298
|
*/
|
|
@@ -188,7 +188,7 @@ class Fdc3Module2 extends base_1.Base {
|
|
|
188
188
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
189
189
|
});
|
|
190
190
|
try {
|
|
191
|
-
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3FindInstances', app);
|
|
191
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3FindInstances', app);
|
|
192
192
|
}
|
|
193
193
|
catch (error) {
|
|
194
194
|
const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3FindInstances ? 'ResolverUnavailable' : error;
|
|
@@ -206,7 +206,7 @@ class Fdc3Module2 extends base_1.Base {
|
|
|
206
206
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
207
207
|
});
|
|
208
208
|
try {
|
|
209
|
-
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3GetAppMetadata', app);
|
|
209
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3GetAppMetadata', app);
|
|
210
210
|
}
|
|
211
211
|
catch (error) {
|
|
212
212
|
const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetAppMetadata ? 'ResolverUnavailable' : error;
|
|
@@ -285,7 +285,7 @@ class Fdc3Module2 extends base_1.Base {
|
|
|
285
285
|
});
|
|
286
286
|
const payload = resultType ? { context, metadata: { resultType } } : context;
|
|
287
287
|
try {
|
|
288
|
-
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3v2FindIntentsByContext', payload);
|
|
288
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3v2FindIntentsByContext', payload);
|
|
289
289
|
}
|
|
290
290
|
catch (error) {
|
|
291
291
|
const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error;
|
|
@@ -362,7 +362,7 @@ class Fdc3Module2 extends base_1.Base {
|
|
|
362
362
|
const intentResolutionResultId = (intentMetadata === null || intentMetadata === void 0 ? void 0 : intentMetadata.intentResolutionResultId) || (metadata === null || metadata === void 0 ? void 0 : metadata.intentResolutionResultId);
|
|
363
363
|
if (intentResolutionResultId) {
|
|
364
364
|
// Send whatever the result is.
|
|
365
|
-
fin.InterApplicationBus.publish(intentResolutionResultId, intentResult);
|
|
365
|
+
this.fin.InterApplicationBus.publish(intentResolutionResultId, intentResult);
|
|
366
366
|
}
|
|
367
367
|
if (intentResult instanceof Error) {
|
|
368
368
|
throw new Error(intentResult.message);
|
|
@@ -455,19 +455,12 @@ class Fdc3Module2 extends base_1.Base {
|
|
|
455
455
|
}
|
|
456
456
|
/**
|
|
457
457
|
* Retrieves information about the FDC3 implementation, including the supported version of the FDC3 specification, the name of the provider of the implementation, its own version number, details of whether optional API features are implemented and the metadata of the calling application according to the desktop agent.
|
|
458
|
+
* fdc3HandleGetInfo must be overridden in the InteropBroker so that the ImplementationMetadata will have the appMetadata info.
|
|
458
459
|
* @returns { Promise<ImplementationMetadata(2)> }
|
|
459
460
|
* @tutorial fdc3v2.getInfo
|
|
460
461
|
*/
|
|
461
462
|
async getInfo() {
|
|
462
|
-
|
|
463
|
-
const result = await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3v2GetInfo', {});
|
|
464
|
-
const partialInfo = this.fdc3Module.getInfo();
|
|
465
|
-
return { ...partialInfo, ...result };
|
|
466
|
-
}
|
|
467
|
-
catch (error) {
|
|
468
|
-
const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetInfo ? 'ResolverUnavailable' : error;
|
|
469
|
-
throw new Error(errorToThrow);
|
|
470
|
-
}
|
|
463
|
+
return InteropClient_1.InteropClient.ferryFdc3Call(this.fin.me.interop, 'fdc3v2GetInfo', { fdc3Version: '2.0' });
|
|
471
464
|
}
|
|
472
465
|
}
|
|
473
466
|
exports.default = Fdc3Module2;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as OpenFin from '../../OpenFin';
|
|
1
2
|
export declare const generateId: () => string;
|
|
2
3
|
export declare const wrapInTryCatch: <T>(f: (...args: any[]) => T, prefix?: string) => (...args: any[]) => T;
|
|
3
4
|
export declare const wrapContextHandler: (handler: OpenFin.ContextHandler, handlerId: string) => (context: OpenFin.Context) => Promise<void>;
|
package/src/api/me.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export declare const isDomRectEqual: (a: DOMRect, b: DOMRect) => boolean;
|
|
|
16
16
|
* @returns Function which disposes the observers when invoked.
|
|
17
17
|
* @ignore
|
|
18
18
|
*/
|
|
19
|
-
export declare const observeBounds: (element: Element, onChange: (bounds: DOMRect) => void) => () => void;
|
|
19
|
+
export declare const observeBounds: (element: Element, onChange: (bounds: DOMRect) => void) => (() => void);
|
|
@@ -28,7 +28,7 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
28
28
|
typeof provider.applySnapshot !== 'function') {
|
|
29
29
|
throw new Error('you must pass in a valid SnapshotProvider');
|
|
30
30
|
}
|
|
31
|
-
const channel = await this.fin.InterApplicationBus.Channel.create((0, utils_1.getSnapshotSourceChannelName)(fin.me
|
|
31
|
+
const channel = await this.fin.InterApplicationBus.Channel.create((0, utils_1.getSnapshotSourceChannelName)(this.fin.me));
|
|
32
32
|
channel.register('get-snapshot', async () => {
|
|
33
33
|
const snapshot = await provider.getSnapshot();
|
|
34
34
|
return { snapshot };
|