@openfin/core 29.71.8 → 29.71.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 +10 -3
- package/package.json +1 -1
- package/src/api/interop/InteropBroker.d.ts +3 -1
- package/src/api/interop/InteropBroker.js +15 -0
- package/src/api/interop/InteropClient.d.ts +1 -1
- package/src/api/interop/InteropClient.js +2 -2
- package/src/api/interop/fdc3/fdc3-1.2.js +3 -1
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +24 -0
- package/src/api/interop/fdc3/fdc3-2.0.js +126 -0
- package/src/api/interop/fdc3/fdc3.js +3 -1
- package/src/api/interop/utils.d.ts +2 -0
- package/src/api/interop/utils.js +3 -1
- package/src/api/view/Instance.d.ts +16 -0
- package/src/api/view/Instance.js +16 -0
- package/src/api/window/Instance.d.ts +16 -0
- package/src/api/window/Instance.js +16 -0
package/OpenFin.d.ts
CHANGED
|
@@ -1429,6 +1429,7 @@ declare namespace OpenFin {
|
|
|
1429
1429
|
|
|
1430
1430
|
export type IntentMetadata<TargetType = any> = {
|
|
1431
1431
|
target?: TargetType;
|
|
1432
|
+
resultType?: string;
|
|
1432
1433
|
};
|
|
1433
1434
|
|
|
1434
1435
|
export type IntentHandler = (intent: OpenFin.Intent) => void;
|
|
@@ -1482,9 +1483,15 @@ declare namespace OpenFin {
|
|
|
1482
1483
|
metadata?: MetadataType;
|
|
1483
1484
|
};
|
|
1484
1485
|
|
|
1485
|
-
export type InfoForIntentOptions = {
|
|
1486
|
+
export type InfoForIntentOptions<MetadataType = IntentMetadata> = {
|
|
1486
1487
|
name: string;
|
|
1487
1488
|
context?: OpenFin.Context;
|
|
1489
|
+
metadata?: MetadataType;
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
export type FindIntentsByContextOptions<MetadataType = IntentMetadata> = {
|
|
1493
|
+
context: OpenFin.Context;
|
|
1494
|
+
metadata?: MetadataType;
|
|
1488
1495
|
};
|
|
1489
1496
|
|
|
1490
1497
|
export type ProviderIdentity = Identity & {
|
|
@@ -1693,11 +1700,11 @@ declare namespace OpenFin {
|
|
|
1693
1700
|
export type ExternalApplicationEvents = import('./src/api/events/externalApplication').ExternalApplicationEvents;
|
|
1694
1701
|
|
|
1695
1702
|
export type ContextMenuOptions = {
|
|
1696
|
-
template
|
|
1703
|
+
template?: Array<PrebuiltContextMenuItem>;
|
|
1697
1704
|
enabled?: boolean;
|
|
1698
1705
|
};
|
|
1699
1706
|
|
|
1700
|
-
export type
|
|
1707
|
+
export type PrebuiltContextMenuItem =
|
|
1701
1708
|
| 'separator'
|
|
1702
1709
|
| 'cut'
|
|
1703
1710
|
| 'copy'
|
package/package.json
CHANGED
|
@@ -304,7 +304,7 @@ export declare class InteropBroker extends Base {
|
|
|
304
304
|
* @tutorial interop.handleInfoForIntentsByContext
|
|
305
305
|
* @experimental
|
|
306
306
|
*/
|
|
307
|
-
handleInfoForIntentsByContext(context: OpenFin.Context, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
307
|
+
handleInfoForIntentsByContext(context: OpenFin.Context | OpenFin.FindIntentsByContextOptions, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
308
308
|
/**
|
|
309
309
|
* Responsible for resolving an Intent based on a specific Context.
|
|
310
310
|
* Must be overridden.
|
|
@@ -332,6 +332,8 @@ export declare class InteropBroker extends Base {
|
|
|
332
332
|
app: FDC3.TargetApp;
|
|
333
333
|
context: OpenFin.Context;
|
|
334
334
|
}, clientIdentity: OpenFin.ClientIdentity): Promise<void>;
|
|
335
|
+
fdc3HandleFindInstances(app: FDC3v2.AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
336
|
+
fdc3HandleGetAppMetadata(app: FDC3v2.AppIdentifier, clientIdentity: OpenFin.ClientIdentity): Promise<unknown>;
|
|
335
337
|
decorateSnapshot(snapshot: OpenFin.Snapshot): OpenFin.Snapshot;
|
|
336
338
|
applySnapshot(snapshot: OpenFin.Snapshot, options: OpenFin.ApplySnapshotOptions): void;
|
|
337
339
|
updateExistingClients(contextGroupStates: OpenFin.ContextGroupStates): void;
|
|
@@ -628,6 +628,18 @@ class InteropBroker extends base_1.Base {
|
|
|
628
628
|
console.warn(warning);
|
|
629
629
|
throw new Error(utils_1.BROKER_ERRORS.fdc3Open);
|
|
630
630
|
}
|
|
631
|
+
// eslint-disable-next-line class-methods-use-this
|
|
632
|
+
async fdc3HandleFindInstances(app, clientIdentity) {
|
|
633
|
+
const warning = utils_1.generateOverrideWarning('fdc3.open', 'InteropBroker.fdc3HandleFindInstances', clientIdentity);
|
|
634
|
+
console.warn(warning);
|
|
635
|
+
throw new Error(utils_1.BROKER_ERRORS.fdc3FindInstances);
|
|
636
|
+
}
|
|
637
|
+
// eslint-disable-next-line class-methods-use-this
|
|
638
|
+
async fdc3HandleGetAppMetadata(app, clientIdentity) {
|
|
639
|
+
const warning = utils_1.generateOverrideWarning('fdc3.getAppMetadata', 'InteropBroker.fdc3HandleGetAppMetadata', clientIdentity);
|
|
640
|
+
console.warn(warning);
|
|
641
|
+
throw new Error(utils_1.BROKER_ERRORS.fdc3FindInstances);
|
|
642
|
+
}
|
|
631
643
|
/*
|
|
632
644
|
Snapshot APIs
|
|
633
645
|
*/
|
|
@@ -936,6 +948,9 @@ class InteropBroker extends base_1.Base {
|
|
|
936
948
|
channel.register('sessionContextGroup:createIfNeeded', this.handleJoinSessionContextGroup.bind(this));
|
|
937
949
|
// fdc3 only methods
|
|
938
950
|
channel.register('fdc3Open', this.fdc3HandleOpen.bind(this));
|
|
951
|
+
channel.register('fdc3v2FindIntentsByContext', this.handleInfoForIntentsByContext.bind(this));
|
|
952
|
+
channel.register('fdc3FindInstances', this.fdc3HandleFindInstances.bind(this));
|
|
953
|
+
channel.register('fdc3GetAppMetadata', this.fdc3HandleGetAppMetadata.bind(this));
|
|
939
954
|
}
|
|
940
955
|
/**
|
|
941
956
|
* Can be used to completely prevent a connection. Return false to prevent connections. Allows all connections by default.
|
|
@@ -217,7 +217,7 @@ export declare class InteropClient extends Base {
|
|
|
217
217
|
* @tutorial interop.registerIntentHandler
|
|
218
218
|
* @experimental
|
|
219
219
|
*/
|
|
220
|
-
registerIntentHandler(handler: OpenFin.IntentHandler, intentName: string): Promise<{
|
|
220
|
+
registerIntentHandler(handler: OpenFin.IntentHandler, intentName: string, options?: any): Promise<{
|
|
221
221
|
unsubscribe: () => Promise<void>;
|
|
222
222
|
}>;
|
|
223
223
|
/**
|
|
@@ -324,7 +324,7 @@ class InteropClient extends base_1.Base {
|
|
|
324
324
|
* @tutorial interop.registerIntentHandler
|
|
325
325
|
* @experimental
|
|
326
326
|
*/
|
|
327
|
-
async registerIntentHandler(handler, intentName) {
|
|
327
|
+
async registerIntentHandler(handler, intentName, options) {
|
|
328
328
|
this.wire.sendAction('interop-client-register-intent-handler').catch((e) => {
|
|
329
329
|
// don't expose, this is only for api analytics purposes
|
|
330
330
|
});
|
|
@@ -333,7 +333,7 @@ class InteropClient extends base_1.Base {
|
|
|
333
333
|
const wrappedHandler = utils_1.wrapIntentHandler(handler, handlerId);
|
|
334
334
|
try {
|
|
335
335
|
await client.register(handlerId, wrappedHandler);
|
|
336
|
-
await client.dispatch('intentHandlerRegistered', { handlerId });
|
|
336
|
+
await client.dispatch('intentHandlerRegistered', { handlerId, ...options });
|
|
337
337
|
}
|
|
338
338
|
catch (error) {
|
|
339
339
|
throw new Error('Unable to register intent handler');
|
|
@@ -215,7 +215,9 @@ class Fdc3Module extends base_1.Base {
|
|
|
215
215
|
const contextHandler = (raisedIntent) => {
|
|
216
216
|
handler(raisedIntent.context);
|
|
217
217
|
};
|
|
218
|
-
const listener = this.fin.me.interop.registerIntentHandler(contextHandler, intent
|
|
218
|
+
const listener = this.fin.me.interop.registerIntentHandler(contextHandler, intent, {
|
|
219
|
+
fdc3Version: '1.2'
|
|
220
|
+
});
|
|
219
221
|
return {
|
|
220
222
|
...listener,
|
|
221
223
|
unsubscribe: () => listener.then((l) => l.unsubscribe())
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Base } from '../../base';
|
|
2
|
+
import Transport from '../../../transport/transport';
|
|
3
|
+
export default class Fdc3Module2 extends Base implements FDC3v2.DesktopAgent {
|
|
4
|
+
private fdc3Module;
|
|
5
|
+
constructor(wire: Transport);
|
|
6
|
+
open(app: FDC3v2.AppIdentifier | FDC3.TargetApp, context?: OpenFin.Context): Promise<FDC3v2.AppIdentifier | void>;
|
|
7
|
+
findInstances(app: FDC3v2.AppIdentifier): Promise<Array<FDC3v2.AppIdentifier>>;
|
|
8
|
+
getAppMetadata(app: FDC3v2.AppIdentifier): Promise<FDC3.AppMetadata>;
|
|
9
|
+
broadcast(context: OpenFin.Context): Promise<void>;
|
|
10
|
+
addContextListener(contextType: string | null, handler: OpenFin.ContextHandler): Promise<FDC3.Listener>;
|
|
11
|
+
findIntent(intent: string, context?: OpenFin.Context, resultType?: string): Promise<FDC3.AppIntent>;
|
|
12
|
+
findIntentsByContext(context: OpenFin.Context, resultType?: string): Promise<Array<FDC3.AppIntent>>;
|
|
13
|
+
raiseIntent(intent: string, context: OpenFin.Context, app?: FDC3v2.AppIdentifier | FDC3.TargetApp): Promise<FDC3.IntentResolution>;
|
|
14
|
+
raiseIntentForContext(context: OpenFin.Context, app?: FDC3v2.AppIdentifier | FDC3.TargetApp): Promise<FDC3.IntentResolution>;
|
|
15
|
+
addIntentListener(intent: string, handler: FDC3v2.IntentHandler): Promise<FDC3.Listener>;
|
|
16
|
+
getOrCreateChannel(channelId: string): Promise<FDC3.Channel>;
|
|
17
|
+
createPrivateChannel(): Promise<FDC3v2.PrivateChannel | void>;
|
|
18
|
+
getUserChannels(): Promise<Array<OpenFin.ContextGroupInfo>>;
|
|
19
|
+
getSystemChannels(): Promise<Array<OpenFin.ContextGroupInfo>>;
|
|
20
|
+
joinUserChannel(channelId: string): Promise<void>;
|
|
21
|
+
getCurrentChannel(): Promise<FDC3.Channel | null>;
|
|
22
|
+
leaveCurrentChannel(): Promise<void>;
|
|
23
|
+
getInfo(): Promise<FDC3.ImplementationMetadata>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS IS NOT PRODUCTION-READY. Until we implement the missing features: getResult, Private Channels and Instance Management we should not document this.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const base_1 = require("../../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
const InteropClient_1 = require("../InteropClient");
|
|
7
|
+
const fdc3_1_2_1 = require("./fdc3-1.2");
|
|
8
|
+
class Fdc3Module2 extends base_1.Base {
|
|
9
|
+
constructor(wire) {
|
|
10
|
+
super(wire);
|
|
11
|
+
// we get the module for fdc 1.2 here so we can reuse it wherever we can
|
|
12
|
+
this.fdc3Module = new fdc3_1_2_1.default(this.wire);
|
|
13
|
+
}
|
|
14
|
+
async open(app, context) {
|
|
15
|
+
return this.fdc3Module.open(app, context);
|
|
16
|
+
}
|
|
17
|
+
async findInstances(app) {
|
|
18
|
+
this.wire.sendAction('fdc3-find-instances').catch((e) => {
|
|
19
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
20
|
+
});
|
|
21
|
+
try {
|
|
22
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3FindInstances', app);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3FindInstances ? 'ResolverUnavailable' : error;
|
|
26
|
+
throw new Error(errorToThrow);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async getAppMetadata(app) {
|
|
30
|
+
this.wire.sendAction('fdc3-get-app-metadata').catch((e) => {
|
|
31
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
32
|
+
});
|
|
33
|
+
try {
|
|
34
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3GetAppMetadata', app);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
const errorToThrow = error.message === utils_1.BROKER_ERRORS.fdc3GetAppMetadata ? 'ResolverUnavailable' : error;
|
|
38
|
+
throw new Error(errorToThrow);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async broadcast(context) {
|
|
42
|
+
return this.fdc3Module.broadcast(context);
|
|
43
|
+
}
|
|
44
|
+
async addContextListener(contextType, handler) {
|
|
45
|
+
this.wire.sendAction('fdc3-add-context-listener').catch((e) => {
|
|
46
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
47
|
+
});
|
|
48
|
+
let listener;
|
|
49
|
+
if (typeof contextType === 'function') {
|
|
50
|
+
console.warn('addContextListener(handler) has been deprecated. Please use addContextListener(null, handler)');
|
|
51
|
+
listener = await this.fin.me.interop.addContextHandler(contextType);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
listener = await this.fin.me.interop.addContextHandler(handler, contextType === null ? undefined : contextType);
|
|
55
|
+
}
|
|
56
|
+
return listener;
|
|
57
|
+
}
|
|
58
|
+
async findIntent(intent, context, resultType) {
|
|
59
|
+
this.wire.sendAction('fdc3-find-intent').catch((e) => {
|
|
60
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
61
|
+
});
|
|
62
|
+
try {
|
|
63
|
+
return await this.fin.me.interop.getInfoForIntent({ name: intent, context, metadata: { resultType } });
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntent ? 'ResolverUnavailable' : error;
|
|
67
|
+
throw new Error(errorToThrow);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
async findIntentsByContext(context, resultType) {
|
|
71
|
+
this.wire.sendAction('fdc3-find-intents-by-context').catch((e) => {
|
|
72
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
73
|
+
});
|
|
74
|
+
try {
|
|
75
|
+
return await InteropClient_1.InteropClient.ferryFdc3Call(fin.me.interop, 'fdc3v2FindIntentsByContext', {
|
|
76
|
+
context,
|
|
77
|
+
resultType
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
const errorToThrow = error.message === utils_1.BROKER_ERRORS.getInfoForIntentsByContext ? 'ResolverUnavailable' : error;
|
|
82
|
+
throw new Error(errorToThrow);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
async raiseIntent(intent, context, app) {
|
|
86
|
+
return this.fdc3Module.raiseIntent(intent, context, app);
|
|
87
|
+
}
|
|
88
|
+
async raiseIntentForContext(context, app) {
|
|
89
|
+
return this.fdc3Module.raiseIntentForContext(context, app);
|
|
90
|
+
}
|
|
91
|
+
async addIntentListener(intent, handler) {
|
|
92
|
+
this.wire.sendAction('fdc3-add-intent-listener').catch((e) => {
|
|
93
|
+
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
94
|
+
});
|
|
95
|
+
const contextHandler = (raisedIntent) => {
|
|
96
|
+
handler(raisedIntent.context);
|
|
97
|
+
};
|
|
98
|
+
return this.fin.me.interop.registerIntentHandler(contextHandler, intent, { fdc3Version: '2.0' });
|
|
99
|
+
}
|
|
100
|
+
async getOrCreateChannel(channelId) {
|
|
101
|
+
return this.fdc3Module.getOrCreateChannel(channelId);
|
|
102
|
+
}
|
|
103
|
+
// eslint-disable-next-line class-methods-use-this
|
|
104
|
+
async createPrivateChannel() {
|
|
105
|
+
// private channels will be implemented in another PR
|
|
106
|
+
}
|
|
107
|
+
async getUserChannels() {
|
|
108
|
+
return this.fdc3Module.getSystemChannels();
|
|
109
|
+
}
|
|
110
|
+
async getSystemChannels() {
|
|
111
|
+
return this.fdc3Module.getSystemChannels();
|
|
112
|
+
}
|
|
113
|
+
async joinUserChannel(channelId) {
|
|
114
|
+
return this.fdc3Module.joinChannel(channelId);
|
|
115
|
+
}
|
|
116
|
+
async getCurrentChannel() {
|
|
117
|
+
return this.fdc3Module.getCurrentChannel();
|
|
118
|
+
}
|
|
119
|
+
async leaveCurrentChannel() {
|
|
120
|
+
return this.leaveCurrentChannel();
|
|
121
|
+
}
|
|
122
|
+
async getInfo() {
|
|
123
|
+
return this.fdc3Module.getInfo();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.default = Fdc3Module2;
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerFdc3Shim = exports.versionMap = void 0;
|
|
4
4
|
const fdc3_1_2_1 = require("./fdc3-1.2");
|
|
5
|
+
const fdc3_2_0_1 = require("./fdc3-2.0");
|
|
5
6
|
exports.versionMap = {
|
|
6
|
-
'1.2': fdc3_1_2_1.default
|
|
7
|
+
'1.2': fdc3_1_2_1.default,
|
|
8
|
+
'2.0': fdc3_2_0_1.default
|
|
7
9
|
};
|
|
8
10
|
function registerFdc3Shim(version, transport) {
|
|
9
11
|
if (Object.keys(exports.versionMap).includes(version)) {
|
|
@@ -10,5 +10,7 @@ export declare const BROKER_ERRORS: {
|
|
|
10
10
|
getInfoForIntentsByContext: string;
|
|
11
11
|
joinSessionContextGroupWithJoinContextGroup: string;
|
|
12
12
|
fdc3Open: string;
|
|
13
|
+
fdc3FindInstances: string;
|
|
14
|
+
fdc3GetAppMetadata: string;
|
|
13
15
|
};
|
|
14
16
|
export declare const wrapIntentHandler: (handler: OpenFin.IntentHandler, handlerId: string) => (intent: OpenFin.Intent) => Promise<void>;
|
package/src/api/interop/utils.js
CHANGED
|
@@ -37,7 +37,9 @@ exports.BROKER_ERRORS = {
|
|
|
37
37
|
getInfoForIntent: exports.generateOverrideError('getInfoForIntent', 'handleInfoForIntent'),
|
|
38
38
|
getInfoForIntentsByContext: exports.generateOverrideError('getInfoForIntentsByContext', 'handleInfoForIntentsByContext'),
|
|
39
39
|
joinSessionContextGroupWithJoinContextGroup: 'The Context Group you have tried to join is a Session Context Group. Custom Context Groups can only be defined by the Interop Broker through code or manifest configuration. Please use joinSessionContextGroup.',
|
|
40
|
-
fdc3Open: exports.generateOverrideError('fdc3.open', 'fdc3HandleOpen')
|
|
40
|
+
fdc3Open: exports.generateOverrideError('fdc3.open', 'fdc3HandleOpen'),
|
|
41
|
+
fdc3FindInstances: exports.generateOverrideError('fdc3.findInstances', 'fdc3HandleFindInstances'),
|
|
42
|
+
fdc3GetAppMetadata: exports.generateOverrideError('fdc3.getAppMetadata', 'fdc3HandleGetAppMetadata')
|
|
41
43
|
};
|
|
42
44
|
exports.wrapIntentHandler = (handler, handlerId) => {
|
|
43
45
|
return async (intent) => {
|
|
@@ -51,11 +51,27 @@ import UpdatableViewOptions = OpenFin.UpdatableViewOptions;
|
|
|
51
51
|
* @property {string[]} [contentRedirect.blacklist=[]] List of blacklisted URLs.
|
|
52
52
|
*
|
|
53
53
|
* @property {object} [contextMenuSettings] - _Updatable._
|
|
54
|
+
* Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
54
55
|
* Configure the context menu when right-clicking on a view.
|
|
55
56
|
* @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
|
|
56
57
|
* @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
|
|
57
58
|
* @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
|
|
58
59
|
*
|
|
60
|
+
* @property {object} [contextMenuOptions] - _Updatable._
|
|
61
|
+
* Configure the context menu when right-clicking on a view. Supported menu items:
|
|
62
|
+
* 'separator'
|
|
63
|
+
* 'cut'
|
|
64
|
+
* 'copy'
|
|
65
|
+
* 'paste'
|
|
66
|
+
* 'spellCheck'
|
|
67
|
+
* 'inspect'
|
|
68
|
+
* 'reload'
|
|
69
|
+
* 'navigateForward'
|
|
70
|
+
* 'navigateBack'
|
|
71
|
+
* 'print'
|
|
72
|
+
* @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
|
|
73
|
+
* @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
|
|
74
|
+
*
|
|
59
75
|
* @property {any} [customData=""] - _Updatable._
|
|
60
76
|
* A field that the user can attach serializable data to be ferried around with the view options.
|
|
61
77
|
* _When omitted, the default value of this property is the empty string (`""`)._
|
package/src/api/view/Instance.js
CHANGED
|
@@ -54,11 +54,27 @@ const window_1 = require("../window");
|
|
|
54
54
|
* @property {string[]} [contentRedirect.blacklist=[]] List of blacklisted URLs.
|
|
55
55
|
*
|
|
56
56
|
* @property {object} [contextMenuSettings] - _Updatable._
|
|
57
|
+
* Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
57
58
|
* Configure the context menu when right-clicking on a view.
|
|
58
59
|
* @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
|
|
59
60
|
* @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
|
|
60
61
|
* @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
|
|
61
62
|
*
|
|
63
|
+
* @property {object} [contextMenuOptions] - _Updatable._
|
|
64
|
+
* Configure the context menu when right-clicking on a view. Supported menu items:
|
|
65
|
+
* 'separator'
|
|
66
|
+
* 'cut'
|
|
67
|
+
* 'copy'
|
|
68
|
+
* 'paste'
|
|
69
|
+
* 'spellCheck'
|
|
70
|
+
* 'inspect'
|
|
71
|
+
* 'reload'
|
|
72
|
+
* 'navigateForward'
|
|
73
|
+
* 'navigateBack'
|
|
74
|
+
* 'print'
|
|
75
|
+
* @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
|
|
76
|
+
* @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
|
|
77
|
+
*
|
|
62
78
|
* @property {any} [customData=""] - _Updatable._
|
|
63
79
|
* A field that the user can attach serializable data to be ferried around with the view options.
|
|
64
80
|
* _When omitted, the default value of this property is the empty string (`""`)._
|
|
@@ -160,11 +160,27 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
160
160
|
* Gives access to the devtools for the window.
|
|
161
161
|
*
|
|
162
162
|
* @property {object} [contextMenuSettings] - _Updatable._
|
|
163
|
+
* Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
163
164
|
* Configure the context menu when right-clicking on a window.
|
|
164
165
|
* @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
|
|
165
166
|
* @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
|
|
166
167
|
* @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
|
|
167
168
|
*
|
|
169
|
+
* @property {object} [contextMenuOptions] - _Updatable._
|
|
170
|
+
* Configure the context menu when right-clicking on a window. Supported menu items:
|
|
171
|
+
* 'separator'
|
|
172
|
+
* 'cut'
|
|
173
|
+
* 'copy'
|
|
174
|
+
* 'paste'
|
|
175
|
+
* 'spellCheck'
|
|
176
|
+
* 'inspect'
|
|
177
|
+
* 'reload'
|
|
178
|
+
* 'navigateForward'
|
|
179
|
+
* 'navigateBack'
|
|
180
|
+
* 'print'
|
|
181
|
+
* @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
|
|
182
|
+
* @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
|
|
183
|
+
*
|
|
168
184
|
* @property {object} [cornerRounding] - _Updatable._
|
|
169
185
|
* Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
|
|
170
186
|
* average of _height_ and _width_.
|
|
@@ -167,11 +167,27 @@ const view_1 = require("../view");
|
|
|
167
167
|
* Gives access to the devtools for the window.
|
|
168
168
|
*
|
|
169
169
|
* @property {object} [contextMenuSettings] - _Updatable._
|
|
170
|
+
* Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
|
|
170
171
|
* Configure the context menu when right-clicking on a window.
|
|
171
172
|
* @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
|
|
172
173
|
* @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
|
|
173
174
|
* @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
|
|
174
175
|
*
|
|
176
|
+
* @property {object} [contextMenuOptions] - _Updatable._
|
|
177
|
+
* Configure the context menu when right-clicking on a window. Supported menu items:
|
|
178
|
+
* 'separator'
|
|
179
|
+
* 'cut'
|
|
180
|
+
* 'copy'
|
|
181
|
+
* 'paste'
|
|
182
|
+
* 'spellCheck'
|
|
183
|
+
* 'inspect'
|
|
184
|
+
* 'reload'
|
|
185
|
+
* 'navigateForward'
|
|
186
|
+
* 'navigateBack'
|
|
187
|
+
* 'print'
|
|
188
|
+
* @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
|
|
189
|
+
* @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
|
|
190
|
+
*
|
|
175
191
|
* @property {object} [cornerRounding] - _Updatable._
|
|
176
192
|
* Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
|
|
177
193
|
* average of _height_ and _width_.
|