@openfin/core 27.71.5 → 27.71.6
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 +41 -1
- package/package.json +1 -1
- package/src/api/application/Factory.d.ts +2 -1
- package/src/api/application/Factory.js +3 -2
- package/src/api/platform/layout/Factory.js +5 -1
- package/src/api/platform/layout/SplitterController/bounds-observer.d.ts +17 -0
- package/src/api/platform/layout/SplitterController/bounds-observer.js +49 -0
- package/src/api/platform/layout/SplitterController/index.d.ts +29 -0
- package/src/api/platform/layout/SplitterController/index.js +81 -0
- package/src/api/platform/layout/SplitterController/view-overlay.d.ts +23 -0
- package/src/api/platform/layout/SplitterController/view-overlay.js +30 -0
- package/src/api/system/index.d.ts +1 -0
- package/src/api/system/index.js +1 -0
- package/src/api/view/Instance.d.ts +5 -2
- package/src/api/view/Instance.js +5 -2
- package/src/api/window/Instance.d.ts +24 -7
- package/src/api/window/Instance.js +24 -7
- package/src/shapes/protocol.d.ts +39 -92
package/OpenFin.d.ts
CHANGED
|
@@ -254,6 +254,19 @@ declare namespace OpenFin {
|
|
|
254
254
|
|
|
255
255
|
export type WindowOptions = MutableWindowOptions & ConstWindowOptions;
|
|
256
256
|
|
|
257
|
+
export interface ShowViewOnWindowResizeOptions {
|
|
258
|
+
enabled?: boolean;
|
|
259
|
+
paintIntervalMs?: number;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface ShowViewOnSplitterDragOptions {
|
|
263
|
+
enabled?: boolean;
|
|
264
|
+
}
|
|
265
|
+
export type ViewVisibilityOptions = {
|
|
266
|
+
showViewsOnWindowResize?: ShowViewOnWindowResizeOptions;
|
|
267
|
+
showViewsOnSplitterDrag?: ShowViewOnSplitterDragOptions;
|
|
268
|
+
};
|
|
269
|
+
|
|
257
270
|
export type WindowState = 'maximized' | 'minimized' | 'normal';
|
|
258
271
|
|
|
259
272
|
export type ConstWindowOptions = {
|
|
@@ -294,6 +307,8 @@ declare namespace OpenFin {
|
|
|
294
307
|
y: number;
|
|
295
308
|
experimental?: any;
|
|
296
309
|
fdc3InteropApi?: string;
|
|
310
|
+
// Platform only
|
|
311
|
+
viewVisibility?: ViewVisibilityOptions;
|
|
297
312
|
};
|
|
298
313
|
|
|
299
314
|
export type MutableWindowOptions = {
|
|
@@ -301,7 +316,9 @@ declare namespace OpenFin {
|
|
|
301
316
|
alwaysOnTop: boolean;
|
|
302
317
|
aspectRatio: number;
|
|
303
318
|
contextMenu: boolean;
|
|
319
|
+
// DEPRECATED
|
|
304
320
|
contextMenuSettings: ContextMenuSettings;
|
|
321
|
+
contextMenuOptions: ContextMenuOptions;
|
|
305
322
|
cornerRounding: Partial<CornerRounding>;
|
|
306
323
|
customContext: any;
|
|
307
324
|
customData: any;
|
|
@@ -401,6 +418,7 @@ declare namespace OpenFin {
|
|
|
401
418
|
green: number;
|
|
402
419
|
};
|
|
403
420
|
|
|
421
|
+
// DEPRECATED
|
|
404
422
|
export type ContextMenuSettings = {
|
|
405
423
|
enable: boolean;
|
|
406
424
|
devtools?: boolean;
|
|
@@ -469,7 +487,10 @@ declare namespace OpenFin {
|
|
|
469
487
|
|
|
470
488
|
export type MutableViewOptions = {
|
|
471
489
|
autoResize: AutoResizeOptions;
|
|
490
|
+
contextMenu: boolean;
|
|
491
|
+
// DEPRECATED
|
|
472
492
|
contextMenuSettings: ContextMenuSettings;
|
|
493
|
+
contextMenuOptions: ContextMenuOptions;
|
|
473
494
|
backgroundColor: string;
|
|
474
495
|
customData: any;
|
|
475
496
|
customContext: any;
|
|
@@ -1108,6 +1129,7 @@ declare namespace OpenFin {
|
|
|
1108
1129
|
export type RvmLaunchOptions = {
|
|
1109
1130
|
noUi?: boolean;
|
|
1110
1131
|
userAppConfigArgs?: object;
|
|
1132
|
+
timeToLive?: number;
|
|
1111
1133
|
};
|
|
1112
1134
|
|
|
1113
1135
|
export type ShortCutConfig = {
|
|
@@ -1324,6 +1346,7 @@ declare namespace OpenFin {
|
|
|
1324
1346
|
* Defaults to 'normal' unless a 'submenu' key exists
|
|
1325
1347
|
*/
|
|
1326
1348
|
type?: 'normal' | 'separator' | 'submenu' | 'checkbox';
|
|
1349
|
+
role?: 'cut' | 'copy' | 'paste' | 'toggleDevTools' | 'reload';
|
|
1327
1350
|
label?: string;
|
|
1328
1351
|
/**
|
|
1329
1352
|
* If false, the menu item will be greyed out and unclickable.
|
|
@@ -1348,7 +1371,7 @@ declare namespace OpenFin {
|
|
|
1348
1371
|
/**
|
|
1349
1372
|
* Data to be returned if the user selects the element. Must be serializable
|
|
1350
1373
|
*/
|
|
1351
|
-
data
|
|
1374
|
+
data?: any;
|
|
1352
1375
|
|
|
1353
1376
|
/**
|
|
1354
1377
|
* Image Data URI with image dimensions inferred from the encoded string
|
|
@@ -1668,4 +1691,21 @@ declare namespace OpenFin {
|
|
|
1668
1691
|
export type PlatformEvents = import('./src/api/events/platform').PlatformEvents;
|
|
1669
1692
|
|
|
1670
1693
|
export type ExternalApplicationEvents = import('./src/api/events/externalApplication').ExternalApplicationEvents;
|
|
1694
|
+
|
|
1695
|
+
export type ContextMenuOptions = {
|
|
1696
|
+
template: Array<PrebuiltContextMenuItems>;
|
|
1697
|
+
enabled?: boolean;
|
|
1698
|
+
};
|
|
1699
|
+
|
|
1700
|
+
export type PrebuiltContextMenuItems =
|
|
1701
|
+
| 'separator'
|
|
1702
|
+
| 'cut'
|
|
1703
|
+
| 'copy'
|
|
1704
|
+
| 'paste'
|
|
1705
|
+
| 'spellCheck'
|
|
1706
|
+
| 'inspect'
|
|
1707
|
+
| 'reload'
|
|
1708
|
+
| 'navigateForward'
|
|
1709
|
+
| 'navigateBack'
|
|
1710
|
+
| 'print';
|
|
1671
1711
|
}
|
package/package.json
CHANGED
|
@@ -111,12 +111,13 @@ export default class ApplicationModule extends Base {
|
|
|
111
111
|
* Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls.
|
|
112
112
|
* Returns once the RVM is finished attempting to launch the applications.
|
|
113
113
|
* @param { Array.<ManifestInfo> } applications
|
|
114
|
+
* @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
|
|
114
115
|
* @return {Promise.<void>}
|
|
115
116
|
* @static
|
|
116
117
|
* @tutorial Application.startManyManifests
|
|
117
118
|
* @experimental
|
|
118
119
|
*/
|
|
119
|
-
startManyManifests(applications: Array<OpenFin.ManifestInfo
|
|
120
|
+
startManyManifests(applications: Array<OpenFin.ManifestInfo>, opts?: OpenFin.RvmLaunchOptions): Promise<void>;
|
|
120
121
|
/**
|
|
121
122
|
* Asynchronously returns an Application object that represents the current application
|
|
122
123
|
* @return {Promise.<Application>}
|
|
@@ -156,13 +156,14 @@ class ApplicationModule extends base_1.Base {
|
|
|
156
156
|
* Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls.
|
|
157
157
|
* Returns once the RVM is finished attempting to launch the applications.
|
|
158
158
|
* @param { Array.<ManifestInfo> } applications
|
|
159
|
+
* @param {RvmLaunchOptions} [opts] - Parameters that the RVM will use.
|
|
159
160
|
* @return {Promise.<void>}
|
|
160
161
|
* @static
|
|
161
162
|
* @tutorial Application.startManyManifests
|
|
162
163
|
* @experimental
|
|
163
164
|
*/
|
|
164
|
-
async startManyManifests(applications) {
|
|
165
|
-
return this.wire.sendAction('run-applications', { applications }).then(() => undefined);
|
|
165
|
+
async startManyManifests(applications, opts) {
|
|
166
|
+
return this.wire.sendAction('run-applications', { applications, opts }).then(() => undefined);
|
|
166
167
|
}
|
|
167
168
|
/**
|
|
168
169
|
* Asynchronously returns an Application object that represents the current application
|
|
@@ -18,6 +18,8 @@ exports.LayoutModule = void 0;
|
|
|
18
18
|
/* eslint-disable no-undef, import/prefer-default-export */
|
|
19
19
|
const Instance_1 = require("./Instance");
|
|
20
20
|
const base_1 = require("../../base");
|
|
21
|
+
const SplitterController_1 = require("./SplitterController");
|
|
22
|
+
const view_overlay_1 = require("./SplitterController/view-overlay");
|
|
21
23
|
/**
|
|
22
24
|
* InitLayoutOptions interface
|
|
23
25
|
* @typedef { object } InitLayoutOptions
|
|
@@ -105,7 +107,9 @@ class LayoutModule extends base_1.Base {
|
|
|
105
107
|
}
|
|
106
108
|
// We need to go through environment to make sure it is only imported/bundled in OpenFin.
|
|
107
109
|
const ManagerConstructor = await this.wire.environment.getManagerConstructor();
|
|
108
|
-
|
|
110
|
+
const viewOverlay = new view_overlay_1.ViewOverlay(this.wire);
|
|
111
|
+
const splitterController = new SplitterController_1.SplitterController(viewOverlay);
|
|
112
|
+
__classPrivateFieldSet(this, _layoutManager, new ManagerConstructor(splitterController));
|
|
109
113
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
110
114
|
// @ts-ignore - layout warning here for backwards compatibility, can remove layout check in .52
|
|
111
115
|
let { layout, containerId } = options;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Observes the bounding client box rectangle of the given element for changes.
|
|
3
|
+
*
|
|
4
|
+
* This solution only works for 2 scenarios, though could be updated to support more
|
|
5
|
+
* (e.g. via polling).
|
|
6
|
+
*
|
|
7
|
+
* MutationObserver will only pick up changes to bounds if they are specified via fixed
|
|
8
|
+
* style rules in the element's attribtues.
|
|
9
|
+
*
|
|
10
|
+
* ResizeObserver will pick up all changes to an element's width and height but will not capture
|
|
11
|
+
* any changes to position.
|
|
12
|
+
*
|
|
13
|
+
* @param element The element to observe the bounding box for (i.e. position, width, height)
|
|
14
|
+
* @param onChange Called every time the bounding box changes.
|
|
15
|
+
* @returns Function which disposes the observers when invoked.
|
|
16
|
+
*/
|
|
17
|
+
export declare const observeBounds: (element: Element, onChange: (bounds: DOMRect) => void) => () => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.observeBounds = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Observes the bounding client box rectangle of the given element for changes.
|
|
6
|
+
*
|
|
7
|
+
* This solution only works for 2 scenarios, though could be updated to support more
|
|
8
|
+
* (e.g. via polling).
|
|
9
|
+
*
|
|
10
|
+
* MutationObserver will only pick up changes to bounds if they are specified via fixed
|
|
11
|
+
* style rules in the element's attribtues.
|
|
12
|
+
*
|
|
13
|
+
* ResizeObserver will pick up all changes to an element's width and height but will not capture
|
|
14
|
+
* any changes to position.
|
|
15
|
+
*
|
|
16
|
+
* @param element The element to observe the bounding box for (i.e. position, width, height)
|
|
17
|
+
* @param onChange Called every time the bounding box changes.
|
|
18
|
+
* @returns Function which disposes the observers when invoked.
|
|
19
|
+
*/
|
|
20
|
+
exports.observeBounds = (element, onChange) => {
|
|
21
|
+
let lastBounds;
|
|
22
|
+
const isDomRectEqual = (a, b) => {
|
|
23
|
+
if (a.top !== b.top
|
|
24
|
+
|| a.left !== b.left
|
|
25
|
+
|| a.width !== b.width
|
|
26
|
+
|| a.height !== b.height
|
|
27
|
+
|| a.x !== b.x
|
|
28
|
+
|| a.y !== b.y) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return true;
|
|
32
|
+
};
|
|
33
|
+
const checkBounds = () => {
|
|
34
|
+
const currentBounds = element.getBoundingClientRect();
|
|
35
|
+
if (!lastBounds || !isDomRectEqual(lastBounds, currentBounds)) {
|
|
36
|
+
lastBounds = currentBounds;
|
|
37
|
+
onChange(element.getBoundingClientRect());
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
const resizeObserver = new ResizeObserver(() => checkBounds());
|
|
41
|
+
const mutationObserver = new MutationObserver(() => checkBounds());
|
|
42
|
+
resizeObserver.observe(element, { box: 'content-box' });
|
|
43
|
+
mutationObserver.observe(element, { attributes: true, attributeFilter: ['style'] });
|
|
44
|
+
checkBounds();
|
|
45
|
+
return () => {
|
|
46
|
+
resizeObserver.disconnect();
|
|
47
|
+
mutationObserver.disconnect();
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ViewOverlay } from './view-overlay';
|
|
2
|
+
export declare type SplitterItem = GoldenLayout.ContentItem & {
|
|
3
|
+
viewEventsAdded: boolean;
|
|
4
|
+
isVertical: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Utility class for managing Golden Layout splitter drag interactions.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SplitterController {
|
|
10
|
+
private readonly viewOverlay;
|
|
11
|
+
constructor(viewOverlay: ViewOverlay);
|
|
12
|
+
private teardown?;
|
|
13
|
+
private tryTeardown;
|
|
14
|
+
/**
|
|
15
|
+
* Disables the pointer events on the splitters, preventing them from being dragged.
|
|
16
|
+
*/
|
|
17
|
+
preventSplitterResize: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Ends a splitter drag move, if one is in progress.
|
|
20
|
+
*/
|
|
21
|
+
endMove: () => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Initialises a splitter drag move, rendering a view on top of the splitter
|
|
24
|
+
* to allow it to render on top of the views within a layout (as they will always
|
|
25
|
+
* have a higher z-index to the platform window itself).
|
|
26
|
+
* @param splitterItem The Golden Layout splitter item that is currently being dragged.
|
|
27
|
+
*/
|
|
28
|
+
startMove: (splitterItem: SplitterItem) => Promise<void>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SplitterController = void 0;
|
|
4
|
+
const bounds_observer_1 = require("./bounds-observer");
|
|
5
|
+
const applyBoundsOffset = (bounds, offsets = {}) => {
|
|
6
|
+
const sum = (bound, offset) => {
|
|
7
|
+
return bound + (offset || 0);
|
|
8
|
+
};
|
|
9
|
+
return {
|
|
10
|
+
left: sum(bounds.left, offsets.left),
|
|
11
|
+
top: sum(bounds.top, offsets.top),
|
|
12
|
+
width: sum(bounds.width, offsets.width),
|
|
13
|
+
height: sum(bounds.height, offsets.height)
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Utility class for managing Golden Layout splitter drag interactions.
|
|
18
|
+
*/
|
|
19
|
+
class SplitterController {
|
|
20
|
+
// eslint-disable-next-line
|
|
21
|
+
constructor(viewOverlay) {
|
|
22
|
+
this.viewOverlay = viewOverlay;
|
|
23
|
+
this.tryTeardown = () => {
|
|
24
|
+
if (this.teardown) {
|
|
25
|
+
this.teardown();
|
|
26
|
+
this.teardown = undefined;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Disables the pointer events on the splitters, preventing them from being dragged.
|
|
31
|
+
*/
|
|
32
|
+
this.preventSplitterResize = () => {
|
|
33
|
+
document.querySelectorAll('.lm_splitter').forEach((splitter) => {
|
|
34
|
+
splitter.style.pointerEvents = 'none';
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Ends a splitter drag move, if one is in progress.
|
|
39
|
+
*/
|
|
40
|
+
this.endMove = async () => {
|
|
41
|
+
try {
|
|
42
|
+
this.viewOverlay.detachOverlay();
|
|
43
|
+
this.tryTeardown();
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
throw new Error(`Failed to end splitter move: ${error.stack}`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Initialises a splitter drag move, rendering a view on top of the splitter
|
|
51
|
+
* to allow it to render on top of the views within a layout (as they will always
|
|
52
|
+
* have a higher z-index to the platform window itself).
|
|
53
|
+
* @param splitterItem The Golden Layout splitter item that is currently being dragged.
|
|
54
|
+
*/
|
|
55
|
+
this.startMove = async (splitterItem) => {
|
|
56
|
+
try {
|
|
57
|
+
if (this.teardown) {
|
|
58
|
+
console.warn('Splitter move started before other move has been torn down.');
|
|
59
|
+
this.tryTeardown();
|
|
60
|
+
}
|
|
61
|
+
const splitterDiv = splitterItem.element.get(0);
|
|
62
|
+
const { backgroundColor } = getComputedStyle(splitterDiv);
|
|
63
|
+
const initialVisibility = splitterDiv.style.visibility;
|
|
64
|
+
splitterDiv.style.visibility = 'hidden';
|
|
65
|
+
const onBoundsChange = (bounds) => {
|
|
66
|
+
const offsetBounds = applyBoundsOffset(bounds, { height: splitterItem.isVertical ? 0 : 2 });
|
|
67
|
+
this.viewOverlay.renderOverlay({ bounds: offsetBounds, backgroundColor });
|
|
68
|
+
};
|
|
69
|
+
const teardownBoundsObserver = bounds_observer_1.observeBounds(splitterDiv, onBoundsChange);
|
|
70
|
+
this.teardown = () => {
|
|
71
|
+
teardownBoundsObserver();
|
|
72
|
+
splitterDiv.style.visibility = initialVisibility;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
throw new Error(`Failed to start splitter move: ${error.stack}`);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.SplitterController = SplitterController;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Transport from "../../../../transport/transport";
|
|
2
|
+
/**
|
|
3
|
+
* Api client allowing an empty electron BrowserView to be rendered
|
|
4
|
+
* in the current window with the specified bounds.
|
|
5
|
+
*
|
|
6
|
+
* Please note, only one view based overlay can be rendered at a time per runtime.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ViewOverlay {
|
|
9
|
+
private wire;
|
|
10
|
+
constructor(wire: Transport);
|
|
11
|
+
/**
|
|
12
|
+
* Renders the overlay at the specified position relative to the calling window.
|
|
13
|
+
* @param options Bounds and background color to display in the overlay.
|
|
14
|
+
*/
|
|
15
|
+
renderOverlay: (options: {
|
|
16
|
+
bounds: OpenFin.Bounds;
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
}) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Removes the overlay from the current window.
|
|
21
|
+
*/
|
|
22
|
+
detachOverlay: () => Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewOverlay = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Api client allowing an empty electron BrowserView to be rendered
|
|
6
|
+
* in the current window with the specified bounds.
|
|
7
|
+
*
|
|
8
|
+
* Please note, only one view based overlay can be rendered at a time per runtime.
|
|
9
|
+
*/
|
|
10
|
+
class ViewOverlay {
|
|
11
|
+
// eslint-disable-next-line
|
|
12
|
+
constructor(wire) {
|
|
13
|
+
this.wire = wire;
|
|
14
|
+
/**
|
|
15
|
+
* Renders the overlay at the specified position relative to the calling window.
|
|
16
|
+
* @param options Bounds and background color to display in the overlay.
|
|
17
|
+
*/
|
|
18
|
+
this.renderOverlay = async (options) => {
|
|
19
|
+
const { bounds, backgroundColor } = options;
|
|
20
|
+
await this.wire.sendAction('render-overlay', { bounds, backgroundColor });
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Removes the overlay from the current window.
|
|
24
|
+
*/
|
|
25
|
+
this.detachOverlay = async () => {
|
|
26
|
+
await this.wire.sendAction('detach-overlay');
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ViewOverlay = ViewOverlay;
|
|
@@ -397,6 +397,7 @@ import ApplicationWindowInfo = OpenFin.ApplicationWindowInfo;
|
|
|
397
397
|
* @typedef { object } RvmLaunchOptions
|
|
398
398
|
* @property { boolean } [noUi] true if no UI when launching
|
|
399
399
|
* @property { object } [userAppConfigArgs] The user app configuration args
|
|
400
|
+
* @property { number } [timeToLive] Timeout in seconds until RVM launch request expires
|
|
400
401
|
*/
|
|
401
402
|
/**
|
|
402
403
|
* ServiceIdentifier interface
|
package/src/api/system/index.js
CHANGED
|
@@ -387,6 +387,7 @@ const window_1 = require("../window");
|
|
|
387
387
|
* @typedef { object } RvmLaunchOptions
|
|
388
388
|
* @property { boolean } [noUi] true if no UI when launching
|
|
389
389
|
* @property { object } [userAppConfigArgs] The user app configuration args
|
|
390
|
+
* @property { number } [timeToLive] Timeout in seconds until RVM launch request expires
|
|
390
391
|
*/
|
|
391
392
|
/**
|
|
392
393
|
* ServiceIdentifier interface
|
|
@@ -57,11 +57,14 @@ import UpdatableViewOptions = OpenFin.UpdatableViewOptions;
|
|
|
57
57
|
* @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
|
|
58
58
|
*
|
|
59
59
|
* @property {any} [customData=""] - _Updatable._
|
|
60
|
-
* A field that the user can attach serializable data to
|
|
60
|
+
* A field that the user can attach serializable data to be ferried around with the view options.
|
|
61
61
|
* _When omitted, the default value of this property is the empty string (`""`)._
|
|
62
62
|
*
|
|
63
|
+
* @property {any} [customContext=""] - _Updatable._
|
|
64
|
+
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
65
|
+
* is called.
|
|
63
66
|
* When omitted, the default value of this property is the empty string (`""`).
|
|
64
|
-
* As opposed to customData this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
67
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
65
68
|
*
|
|
66
69
|
* @property {object[]} [hotkeys=[]] - _Updatable._
|
|
67
70
|
* Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
|
package/src/api/view/Instance.js
CHANGED
|
@@ -60,11 +60,14 @@ const window_1 = require("../window");
|
|
|
60
60
|
* @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
|
|
61
61
|
*
|
|
62
62
|
* @property {any} [customData=""] - _Updatable._
|
|
63
|
-
* A field that the user can attach serializable data to
|
|
63
|
+
* A field that the user can attach serializable data to be ferried around with the view options.
|
|
64
64
|
* _When omitted, the default value of this property is the empty string (`""`)._
|
|
65
65
|
*
|
|
66
|
+
* @property {any} [customContext=""] - _Updatable._
|
|
67
|
+
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
68
|
+
* is called.
|
|
66
69
|
* When omitted, the default value of this property is the empty string (`""`).
|
|
67
|
-
* As opposed to customData this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
70
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
68
71
|
*
|
|
69
72
|
* @property {object[]} [hotkeys=[]] - _Updatable._
|
|
70
73
|
* Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
|
|
@@ -171,16 +171,16 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
171
171
|
* @property {number} [cornerRounding.height=0] The height in pixels.
|
|
172
172
|
* @property {number} [cornerRounding.width=0] The width in pixels.
|
|
173
173
|
*
|
|
174
|
-
* @property {any} [customContext=""] - _Updatable._
|
|
174
|
+
* @property {any} [customContext=""] - _Updatable. Inheritable._
|
|
175
175
|
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
176
176
|
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
177
177
|
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
178
|
-
*
|
|
179
|
-
* As opposed to customData this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
178
|
+
* _When omitted, _inherits_ from the parent application._
|
|
179
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
180
180
|
*
|
|
181
|
-
* @property {any} [customData=""] - _Updatable._
|
|
182
|
-
* A field that the user can attach serializable data to
|
|
183
|
-
* _When omitted,
|
|
181
|
+
* @property {any} [customData=""] - _Updatable. Inheritable._
|
|
182
|
+
* A field that the user can attach serializable data to be ferried around with the window options.
|
|
183
|
+
* _When omitted, _inherits_ from the parent application._
|
|
184
184
|
*
|
|
185
185
|
* @property {object[]} [customRequestHeaders]
|
|
186
186
|
* Defines list of custom headers for requests sent by the window.
|
|
@@ -235,7 +235,7 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
235
235
|
*
|
|
236
236
|
* @property {string} [icon] - _Updatable. Inheritable._
|
|
237
237
|
* A URL for the icon to be shown in the window title bar and the taskbar.
|
|
238
|
-
*
|
|
238
|
+
* When omitted, inherits from the parent application._
|
|
239
239
|
* note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
|
|
240
240
|
*
|
|
241
241
|
* @property {number} [maxHeight=-1] - _Updatable._
|
|
@@ -333,6 +333,23 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
333
333
|
* @property {boolean} [waitForPageLoad=false]
|
|
334
334
|
* When set to `true`, the window will not appear until the `window` object's `load` event fires.
|
|
335
335
|
* When set to `false`, the window will appear immediately without waiting for content to be loaded.
|
|
336
|
+
*
|
|
337
|
+
* @property {ViewVisibility} [viewVisibility]
|
|
338
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
339
|
+
*/
|
|
340
|
+
/**
|
|
341
|
+
* @typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
342
|
+
* @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
|
|
343
|
+
* @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
344
|
+
*/
|
|
345
|
+
/**
|
|
346
|
+
* @typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
347
|
+
* @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
|
|
348
|
+
* @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
|
|
349
|
+
*/
|
|
350
|
+
/**
|
|
351
|
+
* @typedef {Object} ShowViewsOnSplitterDrag _Platform Windows Only_. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
352
|
+
* @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
|
|
336
353
|
*/
|
|
337
354
|
/**
|
|
338
355
|
* @typedef {object} CapturePageOptions
|
|
@@ -178,16 +178,16 @@ const view_1 = require("../view");
|
|
|
178
178
|
* @property {number} [cornerRounding.height=0] The height in pixels.
|
|
179
179
|
* @property {number} [cornerRounding.width=0] The width in pixels.
|
|
180
180
|
*
|
|
181
|
-
* @property {any} [customContext=""] - _Updatable._
|
|
181
|
+
* @property {any} [customContext=""] - _Updatable. Inheritable._
|
|
182
182
|
* A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
|
|
183
183
|
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
184
184
|
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
185
|
-
*
|
|
186
|
-
* As opposed to customData this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
185
|
+
* _When omitted, _inherits_ from the parent application._
|
|
186
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
|
|
187
187
|
*
|
|
188
|
-
* @property {any} [customData=""] - _Updatable._
|
|
189
|
-
* A field that the user can attach serializable data to
|
|
190
|
-
* _When omitted,
|
|
188
|
+
* @property {any} [customData=""] - _Updatable. Inheritable._
|
|
189
|
+
* A field that the user can attach serializable data to be ferried around with the window options.
|
|
190
|
+
* _When omitted, _inherits_ from the parent application._
|
|
191
191
|
*
|
|
192
192
|
* @property {object[]} [customRequestHeaders]
|
|
193
193
|
* Defines list of custom headers for requests sent by the window.
|
|
@@ -242,7 +242,7 @@ const view_1 = require("../view");
|
|
|
242
242
|
*
|
|
243
243
|
* @property {string} [icon] - _Updatable. Inheritable._
|
|
244
244
|
* A URL for the icon to be shown in the window title bar and the taskbar.
|
|
245
|
-
*
|
|
245
|
+
* When omitted, inherits from the parent application._
|
|
246
246
|
* note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
|
|
247
247
|
*
|
|
248
248
|
* @property {number} [maxHeight=-1] - _Updatable._
|
|
@@ -340,6 +340,23 @@ const view_1 = require("../view");
|
|
|
340
340
|
* @property {boolean} [waitForPageLoad=false]
|
|
341
341
|
* When set to `true`, the window will not appear until the `window` object's `load` event fires.
|
|
342
342
|
* When set to `false`, the window will appear immediately without waiting for content to be loaded.
|
|
343
|
+
*
|
|
344
|
+
* @property {ViewVisibility} [viewVisibility]
|
|
345
|
+
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
346
|
+
*/
|
|
347
|
+
/**
|
|
348
|
+
* @typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
349
|
+
* @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
|
|
350
|
+
* @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
351
|
+
*/
|
|
352
|
+
/**
|
|
353
|
+
* @typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
354
|
+
* @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
|
|
355
|
+
* @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
|
|
356
|
+
*/
|
|
357
|
+
/**
|
|
358
|
+
* @typedef {Object} ShowViewsOnSplitterDrag _Platform Windows Only_. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
359
|
+
* @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
|
|
343
360
|
*/
|
|
344
361
|
/**
|
|
345
362
|
* @typedef {object} CapturePageOptions
|
package/src/shapes/protocol.d.ts
CHANGED
|
@@ -68,98 +68,29 @@ export interface ProtocolMap extends ProtocolMapBase {
|
|
|
68
68
|
request: OpenFin.Identity;
|
|
69
69
|
response: void;
|
|
70
70
|
};
|
|
71
|
-
'fdc3-add-context-listener':
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
'fdc3-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
'
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
'
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
'interop-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
};
|
|
95
|
-
'interop-client-set-context': {
|
|
96
|
-
request: void;
|
|
97
|
-
response: void;
|
|
98
|
-
};
|
|
99
|
-
'interop-client-add-context-handler': {
|
|
100
|
-
request: void;
|
|
101
|
-
response: void;
|
|
102
|
-
};
|
|
103
|
-
'interop-client-get-context-groups': {
|
|
104
|
-
request: void;
|
|
105
|
-
response: void;
|
|
106
|
-
};
|
|
107
|
-
'interop-client-join-context-group': {
|
|
108
|
-
request: void;
|
|
109
|
-
response: void;
|
|
110
|
-
};
|
|
111
|
-
'interop-client-remove-from-context-group': {
|
|
112
|
-
request: void;
|
|
113
|
-
response: void;
|
|
114
|
-
};
|
|
115
|
-
'interop-client-get-all-clients-in-context-group': {
|
|
116
|
-
request: void;
|
|
117
|
-
response: void;
|
|
118
|
-
};
|
|
119
|
-
'interop-client-get-info-for-context-group': {
|
|
120
|
-
request: void;
|
|
121
|
-
response: void;
|
|
122
|
-
};
|
|
123
|
-
'interop-broker-add-client-to-context-group': {
|
|
124
|
-
request: void;
|
|
125
|
-
response: void;
|
|
126
|
-
};
|
|
127
|
-
'interop-broker-get-all-clients-in-context-group': {
|
|
128
|
-
request: void;
|
|
129
|
-
response: void;
|
|
130
|
-
};
|
|
131
|
-
'interop-broker-get-context-groups': {
|
|
132
|
-
request: void;
|
|
133
|
-
response: void;
|
|
134
|
-
};
|
|
135
|
-
'interop-broker-get-info-for-context-group': {
|
|
136
|
-
request: void;
|
|
137
|
-
response: void;
|
|
138
|
-
};
|
|
139
|
-
'interop-broker-is-action-authorized': {
|
|
140
|
-
request: void;
|
|
141
|
-
response: void;
|
|
142
|
-
};
|
|
143
|
-
'interop-broker-is-connection-authorized': {
|
|
144
|
-
request: void;
|
|
145
|
-
response: void;
|
|
146
|
-
};
|
|
147
|
-
'interop-broker-join-context-group': {
|
|
148
|
-
request: void;
|
|
149
|
-
response: void;
|
|
150
|
-
};
|
|
151
|
-
'interop-broker-remove-client-from-context-group': {
|
|
152
|
-
request: void;
|
|
153
|
-
response: void;
|
|
154
|
-
};
|
|
155
|
-
'interop-broker-remove-from-context-group': {
|
|
156
|
-
request: void;
|
|
157
|
-
response: void;
|
|
158
|
-
};
|
|
159
|
-
'interop-broker-set-context': {
|
|
160
|
-
request: void;
|
|
161
|
-
response: void;
|
|
162
|
-
};
|
|
71
|
+
'fdc3-add-context-listener': VoidCall;
|
|
72
|
+
'fdc3-broadcast': VoidCall;
|
|
73
|
+
'fdc3-get-system-channels': VoidCall;
|
|
74
|
+
'fdc3-join-channel': VoidCall;
|
|
75
|
+
'fdc3-leave-current-channel': VoidCall;
|
|
76
|
+
'interop-connect-sync': VoidCall;
|
|
77
|
+
'interop-client-set-context': VoidCall;
|
|
78
|
+
'interop-client-add-context-handler': VoidCall;
|
|
79
|
+
'interop-client-get-context-groups': VoidCall;
|
|
80
|
+
'interop-client-join-context-group': VoidCall;
|
|
81
|
+
'interop-client-remove-from-context-group': VoidCall;
|
|
82
|
+
'interop-client-get-all-clients-in-context-group': VoidCall;
|
|
83
|
+
'interop-client-get-info-for-context-group': VoidCall;
|
|
84
|
+
'interop-broker-add-client-to-context-group': VoidCall;
|
|
85
|
+
'interop-broker-get-all-clients-in-context-group': VoidCall;
|
|
86
|
+
'interop-broker-get-context-groups': VoidCall;
|
|
87
|
+
'interop-broker-get-info-for-context-group': VoidCall;
|
|
88
|
+
'interop-broker-is-action-authorized': VoidCall;
|
|
89
|
+
'interop-broker-is-connection-authorized': VoidCall;
|
|
90
|
+
'interop-broker-join-context-group': VoidCall;
|
|
91
|
+
'interop-broker-remove-client-from-context-group': VoidCall;
|
|
92
|
+
'interop-broker-remove-from-context-group': VoidCall;
|
|
93
|
+
'interop-broker-set-context': VoidCall;
|
|
163
94
|
'query-permission-for-current-context': {
|
|
164
95
|
request: {
|
|
165
96
|
apiName: string;
|
|
@@ -188,7 +119,23 @@ export interface ProtocolMap extends ProtocolMapBase {
|
|
|
188
119
|
};
|
|
189
120
|
response: void;
|
|
190
121
|
};
|
|
122
|
+
'render-overlay': {
|
|
123
|
+
request: {
|
|
124
|
+
bounds: OpenFin.Bounds;
|
|
125
|
+
backgroundColor: string;
|
|
126
|
+
};
|
|
127
|
+
response: void;
|
|
128
|
+
};
|
|
129
|
+
'detach-overlay': VoidCall;
|
|
130
|
+
'system-get-printers': {
|
|
131
|
+
request: void;
|
|
132
|
+
response: OpenFin.PrinterInfo[];
|
|
133
|
+
};
|
|
191
134
|
}
|
|
135
|
+
declare type VoidCall = {
|
|
136
|
+
request: void;
|
|
137
|
+
response: void;
|
|
138
|
+
};
|
|
192
139
|
interface ProtocolMapBase {
|
|
193
140
|
[action: string]: {
|
|
194
141
|
request: any;
|