@openfin/core 30.73.6 → 30.73.7
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 -1729
- package/fin.d.ts +3 -4
- package/package.json +1 -1
- package/src/GlobalOpenFin.d.ts +4 -0
- package/src/OpenFin.d.ts +2938 -0
- package/src/OpenFin.js +4 -0
- package/src/api/application/Factory.d.ts +2 -0
- package/src/api/application/Factory.js +4 -3
- package/src/api/application/Instance.d.ts +3 -1
- package/src/api/application/Instance.js +1 -0
- package/src/api/application/index.js +7 -3
- package/src/api/base.d.ts +19 -15
- package/src/api/base.js +20 -22
- package/src/api/clipboard/index.d.ts +2 -0
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/application.d.ts +66 -56
- package/src/api/events/base.d.ts +33 -15
- package/src/api/events/channel.d.ts +13 -8
- package/src/api/events/eventAggregator.js +1 -9
- package/src/api/events/externalApplication.d.ts +10 -5
- package/src/api/events/frame.d.ts +13 -7
- package/src/api/events/globalHotkey.d.ts +11 -10
- package/src/api/events/platform.d.ts +10 -16
- package/src/api/events/system.d.ts +48 -18
- package/src/api/events/typedEventEmitter.d.ts +20 -0
- package/src/api/events/typedEventEmitter.js +2 -0
- package/src/api/events/view.d.ts +38 -54
- package/src/api/events/webcontents.d.ts +55 -28
- package/src/api/events/window.d.ts +148 -134
- package/src/api/external-application/Factory.d.ts +1 -0
- package/src/api/external-application/Instance.d.ts +2 -1
- package/src/api/external-application/index.js +7 -3
- package/src/api/fin.d.ts +3 -1
- package/src/api/fin.js +2 -2
- package/src/api/frame/Factory.d.ts +1 -0
- package/src/api/frame/Factory.js +2 -2
- package/src/api/frame/Instance.d.ts +3 -1
- package/src/api/frame/index.js +7 -3
- package/src/api/global-hotkey/index.d.ts +2 -2
- package/src/api/global-hotkey/index.js +6 -0
- package/src/api/interappbus/channel/channel.d.ts +6 -4
- package/src/api/interappbus/channel/channels-docs.d.ts +22 -0
- package/src/api/interappbus/channel/channels-docs.js +22 -0
- package/src/api/interappbus/channel/client.d.ts +2 -1
- package/src/api/interappbus/channel/client.js +24 -26
- package/src/api/interappbus/channel/connection-manager.d.ts +1 -0
- package/src/api/interappbus/channel/connection-manager.js +30 -28
- package/src/api/interappbus/channel/index.d.ts +6 -4
- package/src/api/interappbus/channel/index.js +34 -19
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +3 -1
- package/src/api/interappbus/channel/protocols/classic/strategy.js +21 -22
- package/src/api/interappbus/channel/protocols/index.d.ts +3 -0
- package/src/api/interappbus/channel/protocols/protocol-manager.d.ts +1 -1
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +3 -1
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +25 -27
- package/src/api/interappbus/channel/protocols/rtc/ice-manager.js +0 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +3 -1
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +29 -31
- package/src/api/interappbus/channel/protocols/strategy.d.ts +3 -1
- package/src/api/interappbus/channel/provider.d.ts +8 -4
- package/src/api/interappbus/channel/provider.js +140 -139
- package/src/api/interappbus/index.js +1 -1
- package/src/api/interop/Factory.d.ts +2 -0
- package/src/api/interop/Factory.js +20 -2
- package/src/api/interop/InteropBroker.d.ts +62 -39
- package/src/api/interop/InteropBroker.js +114 -55
- package/src/api/interop/InteropClient.d.ts +9 -0
- package/src/api/interop/InteropClient.js +46 -40
- package/src/api/interop/SessionContextGroupBroker.d.ts +1 -0
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -0
- package/src/api/interop/SessionContextGroupClient.js +22 -24
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +9 -7
- package/src/api/interop/fdc3/PrivateChannelClient.js +6 -6
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +1 -0
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +14 -13
- package/src/api/interop/fdc3/fdc3-1.2.js +3 -14
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +24 -21
- package/src/api/interop/fdc3/fdc3-2.0.js +27 -27
- package/src/api/interop/fdc3/fdc3.d.ts +12 -0
- package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
- package/src/api/interop/fdc3/overrideCheck.js +32 -0
- package/src/api/interop/fdc3/shapes/fdc3v1.d.ts +53 -0
- package/src/api/interop/fdc3/shapes/fdc3v1.js +4 -0
- package/src/api/interop/fdc3/shapes/fdc3v2.d.ts +75 -0
- package/src/api/interop/fdc3/shapes/fdc3v2.js +2 -0
- package/src/api/interop/fdc3/utils.d.ts +15 -5
- package/src/api/interop/fdc3/utils.js +29 -11
- package/src/api/interop/fdc3/versions.d.ts +1 -0
- package/src/api/interop/fdc3/versions.js +2 -0
- package/src/api/interop/index.js +7 -3
- package/src/api/interop/utils.d.ts +2 -0
- package/src/api/interop/utils.js +29 -15
- package/src/api/me.d.ts +3 -1
- package/src/api/platform/Factory.d.ts +6 -0
- package/src/api/platform/Factory.js +14 -5
- package/src/api/platform/Instance.d.ts +18 -3
- package/src/api/platform/Instance.js +30 -13
- package/src/api/platform/common-utils.d.ts +2 -1
- package/src/api/platform/index.js +7 -3
- package/src/api/platform/layout/Factory.d.ts +7 -1
- package/src/api/platform/layout/Factory.js +22 -20
- package/src/api/platform/layout/Instance.d.ts +6 -4
- package/src/api/platform/layout/Instance.js +2 -3
- package/src/api/platform/layout/controllers/splitter-controller.js +1 -1
- package/src/api/platform/layout/controllers/tab-drag-controller.d.ts +1 -0
- package/src/api/platform/layout/controllers/tab-drag-controller.js +1 -1
- package/src/api/platform/layout/index.js +7 -3
- package/src/api/platform/layout/shapes.d.ts +3 -1
- package/src/api/platform/layout/utils/bounds-observer.d.ts +1 -1
- package/src/api/platform/layout/utils/bounds-observer.js +7 -5
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -0
- package/src/api/platform/provider.d.ts +162 -0
- package/src/api/platform/provider.js +2 -0
- package/src/api/snapshot-source/Factory.d.ts +2 -0
- package/src/api/snapshot-source/Factory.js +2 -1
- package/src/api/snapshot-source/Instance.d.ts +1 -0
- package/src/api/snapshot-source/Instance.js +33 -35
- package/src/api/snapshot-source/index.js +7 -3
- package/src/api/snapshot-source/utils.d.ts +1 -0
- package/src/api/snapshot-source/utils.js +2 -1
- package/src/api/system/index.d.ts +76 -16
- package/src/api/system/index.js +127 -3
- package/src/api/view/Factory.d.ts +1 -0
- package/src/api/view/Factory.js +2 -2
- package/src/api/view/Instance.d.ts +17 -3
- package/src/api/view/Instance.js +20 -0
- package/src/api/view/index.js +7 -3
- package/src/api/webcontents/main.d.ts +20 -5
- package/src/api/webcontents/main.js +10 -0
- package/src/api/window/Factory.d.ts +1 -0
- package/src/api/window/Factory.js +2 -2
- package/src/api/window/Instance.d.ts +26 -3
- package/src/api/window/Instance.js +26 -1
- package/src/api/window/index.js +7 -3
- package/src/browser.d.ts +4 -4
- package/src/environment/browser.d.ts +3 -1
- package/src/environment/environment.d.ts +3 -1
- package/src/environment/node-env.d.ts +3 -1
- package/src/environment/node-env.js +2 -2
- package/src/environment/openfin-env.d.ts +3 -1
- package/src/environment/openfin-env.js +15 -17
- package/src/fdc3.d.ts +3 -0
- package/src/fdc3.js +1 -1
- package/src/mock.d.ts +2 -2
- package/src/mock.js +3 -3
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/shapes/WebOptions.d.ts +1 -0
- package/src/shapes/WindowOptions.d.ts +1 -0
- package/src/shapes/protocol.d.ts +34 -26
- package/src/transport/transport.d.ts +6 -5
- package/src/transport/transport.js +26 -28
- package/src/transport/wire.d.ts +9 -7
- package/src/util/http.d.ts +1 -1
- package/src/util/http.js +16 -11
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
- package/src/util/normalize-config.js +5 -5
|
@@ -1,13 +1,29 @@
|
|
|
1
|
+
import type * as OpenFin from '../../OpenFin';
|
|
1
2
|
import { EmitterBase } from '../base';
|
|
2
3
|
import Transport from '../../transport/transport';
|
|
3
|
-
import {
|
|
4
|
-
|
|
4
|
+
import { BaseEvent } from '../events/base';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for page capture.
|
|
7
|
+
*/
|
|
5
8
|
export interface CapturePageOptions {
|
|
9
|
+
/**
|
|
10
|
+
* The area of the window to be captured.
|
|
11
|
+
*/
|
|
6
12
|
area?: OpenFin.Rectangle;
|
|
7
|
-
|
|
13
|
+
/**
|
|
14
|
+
* @defaultValue 'png'
|
|
15
|
+
*
|
|
16
|
+
* The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
|
|
17
|
+
*/
|
|
18
|
+
format?: 'bmp' | 'jpg' | 'png';
|
|
19
|
+
/**
|
|
20
|
+
* @defaultValue 100
|
|
21
|
+
*
|
|
22
|
+
* Quality of JPEG image. Between 0 - 100.
|
|
23
|
+
*/
|
|
8
24
|
quality?: number;
|
|
9
25
|
}
|
|
10
|
-
export declare class WebContents<T extends
|
|
26
|
+
export declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
|
|
11
27
|
entityType: string;
|
|
12
28
|
constructor(wire: Transport, identity: OpenFin.Identity, entityType: string);
|
|
13
29
|
capturePage(options?: CapturePageOptions): Promise<string>;
|
|
@@ -34,4 +50,3 @@ export declare class WebContents<T extends WebContentsEventMapping> extends Emit
|
|
|
34
50
|
inspectServiceWorker(): Promise<void>;
|
|
35
51
|
showPopupWindow(options: OpenFin.PopupOptions): Promise<OpenFin.PopupResult>;
|
|
36
52
|
}
|
|
37
|
-
export {};
|
|
@@ -92,6 +92,8 @@ class WebContents extends base_1.EmitterBase {
|
|
|
92
92
|
throw new Error(`Something went wrong during onPopupReady execution: ${error}`);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
|
+
// TODO: fix typing (internal)
|
|
96
|
+
// @ts-expect-error
|
|
95
97
|
await this.once('popup-ready', readyListener);
|
|
96
98
|
}
|
|
97
99
|
const { payload: tryCreatePayload } = await this.wire.sendAction('try-create-popup-window', {
|
|
@@ -130,9 +132,17 @@ class WebContents extends base_1.EmitterBase {
|
|
|
130
132
|
await options.onPopupResult(normalizePopupResult(payload));
|
|
131
133
|
};
|
|
132
134
|
const teardownListener = async () => {
|
|
135
|
+
// TODO: fix typing (internal)
|
|
136
|
+
// @ts-expect-error
|
|
133
137
|
await this.removeListener('popup-result', dispatchResultListener);
|
|
134
138
|
};
|
|
139
|
+
// TODO: fix typing (internal)
|
|
140
|
+
// @ts-expect-error
|
|
135
141
|
await this.on('popup-result', dispatchResultListener);
|
|
142
|
+
// TODO: fix typing (internal)
|
|
143
|
+
// hilariously this does not need a ts-expect-error - this is gap in type soundness
|
|
144
|
+
// should investigate - probably due to `teardownListener` taking a void argument
|
|
145
|
+
// which might play nicely with the `never` type? huh...
|
|
136
146
|
await this.once('popup-teardown', teardownListener);
|
|
137
147
|
}
|
|
138
148
|
const { payload } = await this.wire.sendAction('show-popup-window', {
|
|
@@ -18,7 +18,7 @@ class _WindowModule extends base_1.Base {
|
|
|
18
18
|
this.wire.sendAction('window-wrap').catch((e) => {
|
|
19
19
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
20
20
|
});
|
|
21
|
-
const errorMsg = validate_1.validateIdentity(identity);
|
|
21
|
+
const errorMsg = (0, validate_1.validateIdentity)(identity);
|
|
22
22
|
if (errorMsg) {
|
|
23
23
|
throw new Error(errorMsg);
|
|
24
24
|
}
|
|
@@ -35,7 +35,7 @@ class _WindowModule extends base_1.Base {
|
|
|
35
35
|
this.wire.sendAction('window-wrap-sync').catch((e) => {
|
|
36
36
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
|
37
37
|
});
|
|
38
|
-
const errorMsg = validate_1.validateIdentity(identity);
|
|
38
|
+
const errorMsg = (0, validate_1.validateIdentity)(identity);
|
|
39
39
|
if (errorMsg) {
|
|
40
40
|
throw new Error(errorMsg);
|
|
41
41
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type * as OpenFin from '../../OpenFin';
|
|
1
2
|
import Transport from '../../transport/transport';
|
|
2
3
|
import { WebContents } from '../webcontents/main';
|
|
3
|
-
import WindowEvents = OpenFin.WindowEvents;
|
|
4
4
|
/**
|
|
5
|
+
* @PORTED
|
|
5
6
|
* @typedef { object } Margins
|
|
6
7
|
* @property { string } [marginType]
|
|
7
8
|
* Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
|
|
@@ -13,11 +14,13 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
13
14
|
* @property { number } [right] The right margin of the printed web page, in pixels.
|
|
14
15
|
*/
|
|
15
16
|
/**
|
|
17
|
+
* @PORTED
|
|
16
18
|
* @typedef { object } Dpi
|
|
17
19
|
* @property { number } [horizontal] The horizontal dpi
|
|
18
20
|
* @property { number } [vertical] The vertical dpi
|
|
19
21
|
*/
|
|
20
22
|
/**
|
|
23
|
+
* @PORTED
|
|
21
24
|
* @typedef { object } PrintOptions
|
|
22
25
|
* @property { boolean } [silent=false] Don't ask user for print settings.
|
|
23
26
|
* @property { boolean } [printBackground=false] Prints the background color and image of the web page.
|
|
@@ -34,6 +37,7 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
34
37
|
* @property { Dpi } [dpi] Set dpi for the printed web page
|
|
35
38
|
*/
|
|
36
39
|
/**
|
|
40
|
+
* @REMOVED
|
|
37
41
|
* PrinterInfo interface
|
|
38
42
|
* @typedef { object } PrinterInfo
|
|
39
43
|
* @property { string } name Printer Name
|
|
@@ -42,12 +46,14 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
42
46
|
* @property { boolean } isDefault Indicates that system's default printer
|
|
43
47
|
*/
|
|
44
48
|
/**
|
|
49
|
+
* @REMOVED
|
|
45
50
|
* SharedWorkerInfo interface
|
|
46
51
|
* @typedef { object } SharedWorkerInfo
|
|
47
52
|
* @property { string } id The unique id of the shared worker.
|
|
48
53
|
* @property { string } url The url of the shared worker.
|
|
49
54
|
*/
|
|
50
55
|
/**
|
|
56
|
+
* @PORTED
|
|
51
57
|
* ContentCreationRule interface
|
|
52
58
|
* @typedef { object } ContentCreationRule
|
|
53
59
|
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
|
@@ -55,6 +61,7 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
55
61
|
* @property { object } options Window creation options or View creation options.
|
|
56
62
|
*/
|
|
57
63
|
/**
|
|
64
|
+
* @PORTED
|
|
58
65
|
* @typedef {object} Window~options
|
|
59
66
|
* @summary Window creation options.
|
|
60
67
|
* @desc This is the options object required by {@link Window.create Window.create}.
|
|
@@ -307,6 +314,9 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
307
314
|
* A flag to cache the location of the window.
|
|
308
315
|
* ** note ** - This option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
|
|
309
316
|
*
|
|
317
|
+
* @property {boolean} [ignoreSavedWindowState]
|
|
318
|
+
* A flag to ignore previously cached state of the window. It defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
|
|
319
|
+
*
|
|
310
320
|
* @property {boolean} [shadow=false]
|
|
311
321
|
* A flag to display a shadow on frameless windows.
|
|
312
322
|
* `shadow` and `cornerRounding` are mutually exclusive.
|
|
@@ -355,31 +365,37 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
355
365
|
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
356
366
|
*/
|
|
357
367
|
/**
|
|
368
|
+
* @PORTED
|
|
358
369
|
* @typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
359
370
|
* @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
|
|
360
371
|
* @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
361
372
|
* @property {ShowViewsOnTabDrag} [showViewsOnTabDrag] _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
|
|
362
|
-
*/
|
|
373
|
+
*/
|
|
363
374
|
/**
|
|
375
|
+
* @PORTED
|
|
364
376
|
* @typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
365
377
|
* @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
|
|
366
378
|
* @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
|
|
367
379
|
*/
|
|
368
380
|
/**
|
|
381
|
+
* @REMOVED
|
|
369
382
|
* @typedef {Object} ShowViewsOnSplitterDrag _Platform Windows Only_. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
370
383
|
* @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
|
|
371
384
|
*/
|
|
372
385
|
/**
|
|
386
|
+
* @REMOVED
|
|
373
387
|
* @typedef {Object} ShowViewsOnTabDrag _Platform Windows Only_. Allows views to be shown when the user is manipulating the layout by repositioning a tab.
|
|
374
388
|
* @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
|
|
375
389
|
*/
|
|
376
390
|
/**
|
|
391
|
+
* @PORTED
|
|
377
392
|
* @typedef {object} CapturePageOptions
|
|
378
393
|
* @property { Area } [area] The area of the window to be captured.
|
|
379
394
|
* @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
|
|
380
395
|
* @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
|
|
381
396
|
*/
|
|
382
397
|
/**
|
|
398
|
+
* @PORTED
|
|
383
399
|
* @typedef { object } Area
|
|
384
400
|
* @property { number } height Area's height
|
|
385
401
|
* @property { number } width Area's width
|
|
@@ -387,6 +403,7 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
387
403
|
* @property { number } y Y coordinate of area's starting point
|
|
388
404
|
*/
|
|
389
405
|
/**
|
|
406
|
+
* @PORTED
|
|
390
407
|
* @typedef {object} FindInPageOptions
|
|
391
408
|
* @property {boolean} [forward=true] Whether to search forward or backward.
|
|
392
409
|
* @property {boolean} [findNext=false] Whether to begin a new text finding session. Should be true for first requests, and false for subsequent requests. Defaults to false.
|
|
@@ -397,18 +414,21 @@ import WindowEvents = OpenFin.WindowEvents;
|
|
|
397
414
|
* lowercase or non-letter. Accepts several other intra-word matches.
|
|
398
415
|
*/
|
|
399
416
|
/**
|
|
417
|
+
* @REMOVED
|
|
400
418
|
* @typedef {object} Transition
|
|
401
419
|
* @property {Opacity} opacity - The Opacity transition
|
|
402
420
|
* @property {Position} position - The Position transition
|
|
403
421
|
* @property {Size} size - The Size transition
|
|
404
422
|
*/
|
|
405
423
|
/**
|
|
424
|
+
* @PORTED
|
|
406
425
|
* @typedef {object} TransitionOptions
|
|
407
426
|
* @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
|
|
408
427
|
this animation onto the end of the animation queue.
|
|
409
428
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
410
429
|
*/
|
|
411
430
|
/**
|
|
431
|
+
* @PORTED
|
|
412
432
|
* @typedef {object} Size
|
|
413
433
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
414
434
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -416,6 +436,7 @@ this animation onto the end of the animation queue.
|
|
|
416
436
|
* @property {number} height - Optional if width is present. Defaults to the window's current height.
|
|
417
437
|
*/
|
|
418
438
|
/**
|
|
439
|
+
* @PORTED
|
|
419
440
|
* @typedef {object} Position
|
|
420
441
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
421
442
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -423,12 +444,14 @@ this animation onto the end of the animation queue.
|
|
|
423
444
|
* @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
|
|
424
445
|
*/
|
|
425
446
|
/**
|
|
447
|
+
* @PORTED
|
|
426
448
|
* @typedef {object} Opacity
|
|
427
449
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
428
450
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
429
451
|
* @property {number} opacity - This value is clamped from 0.0 to 1.0.
|
|
430
452
|
*/
|
|
431
453
|
/**
|
|
454
|
+
* @REMOVED
|
|
432
455
|
* Bounds is a interface that has the properties of height,
|
|
433
456
|
* width, left, top which are all numbers
|
|
434
457
|
* @typedef { object } Bounds
|
|
@@ -449,7 +472,7 @@ this animation onto the end of the animation queue.
|
|
|
449
472
|
* @alias Window
|
|
450
473
|
* @hideconstructor
|
|
451
474
|
*/
|
|
452
|
-
export declare class _Window extends WebContents<
|
|
475
|
+
export declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
453
476
|
identity: OpenFin.Identity;
|
|
454
477
|
constructor(wire: Transport, identity: OpenFin.Identity);
|
|
455
478
|
/**
|
|
@@ -9,6 +9,7 @@ const application_1 = require("../application");
|
|
|
9
9
|
const main_1 = require("../webcontents/main");
|
|
10
10
|
const view_1 = require("../view");
|
|
11
11
|
/**
|
|
12
|
+
* @PORTED
|
|
12
13
|
* @typedef { object } Margins
|
|
13
14
|
* @property { string } [marginType]
|
|
14
15
|
* Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
|
|
@@ -20,11 +21,13 @@ const view_1 = require("../view");
|
|
|
20
21
|
* @property { number } [right] The right margin of the printed web page, in pixels.
|
|
21
22
|
*/
|
|
22
23
|
/**
|
|
24
|
+
* @PORTED
|
|
23
25
|
* @typedef { object } Dpi
|
|
24
26
|
* @property { number } [horizontal] The horizontal dpi
|
|
25
27
|
* @property { number } [vertical] The vertical dpi
|
|
26
28
|
*/
|
|
27
29
|
/**
|
|
30
|
+
* @PORTED
|
|
28
31
|
* @typedef { object } PrintOptions
|
|
29
32
|
* @property { boolean } [silent=false] Don't ask user for print settings.
|
|
30
33
|
* @property { boolean } [printBackground=false] Prints the background color and image of the web page.
|
|
@@ -41,6 +44,7 @@ const view_1 = require("../view");
|
|
|
41
44
|
* @property { Dpi } [dpi] Set dpi for the printed web page
|
|
42
45
|
*/
|
|
43
46
|
/**
|
|
47
|
+
* @REMOVED
|
|
44
48
|
* PrinterInfo interface
|
|
45
49
|
* @typedef { object } PrinterInfo
|
|
46
50
|
* @property { string } name Printer Name
|
|
@@ -49,12 +53,14 @@ const view_1 = require("../view");
|
|
|
49
53
|
* @property { boolean } isDefault Indicates that system's default printer
|
|
50
54
|
*/
|
|
51
55
|
/**
|
|
56
|
+
* @REMOVED
|
|
52
57
|
* SharedWorkerInfo interface
|
|
53
58
|
* @typedef { object } SharedWorkerInfo
|
|
54
59
|
* @property { string } id The unique id of the shared worker.
|
|
55
60
|
* @property { string } url The url of the shared worker.
|
|
56
61
|
*/
|
|
57
62
|
/**
|
|
63
|
+
* @PORTED
|
|
58
64
|
* ContentCreationRule interface
|
|
59
65
|
* @typedef { object } ContentCreationRule
|
|
60
66
|
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
|
@@ -62,6 +68,7 @@ const view_1 = require("../view");
|
|
|
62
68
|
* @property { object } options Window creation options or View creation options.
|
|
63
69
|
*/
|
|
64
70
|
/**
|
|
71
|
+
* @PORTED
|
|
65
72
|
* @typedef {object} Window~options
|
|
66
73
|
* @summary Window creation options.
|
|
67
74
|
* @desc This is the options object required by {@link Window.create Window.create}.
|
|
@@ -314,6 +321,9 @@ const view_1 = require("../view");
|
|
|
314
321
|
* A flag to cache the location of the window.
|
|
315
322
|
* ** note ** - This option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
|
|
316
323
|
*
|
|
324
|
+
* @property {boolean} [ignoreSavedWindowState]
|
|
325
|
+
* A flag to ignore previously cached state of the window. It defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
|
|
326
|
+
*
|
|
317
327
|
* @property {boolean} [shadow=false]
|
|
318
328
|
* A flag to display a shadow on frameless windows.
|
|
319
329
|
* `shadow` and `cornerRounding` are mutually exclusive.
|
|
@@ -362,31 +372,37 @@ const view_1 = require("../view");
|
|
|
362
372
|
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
363
373
|
*/
|
|
364
374
|
/**
|
|
375
|
+
* @PORTED
|
|
365
376
|
* @typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
366
377
|
* @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
|
|
367
378
|
* @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
368
379
|
* @property {ShowViewsOnTabDrag} [showViewsOnTabDrag] _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
|
|
369
|
-
*/
|
|
380
|
+
*/
|
|
370
381
|
/**
|
|
382
|
+
* @PORTED
|
|
371
383
|
* @typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
372
384
|
* @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
|
|
373
385
|
* @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
|
|
374
386
|
*/
|
|
375
387
|
/**
|
|
388
|
+
* @REMOVED
|
|
376
389
|
* @typedef {Object} ShowViewsOnSplitterDrag _Platform Windows Only_. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
377
390
|
* @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
|
|
378
391
|
*/
|
|
379
392
|
/**
|
|
393
|
+
* @REMOVED
|
|
380
394
|
* @typedef {Object} ShowViewsOnTabDrag _Platform Windows Only_. Allows views to be shown when the user is manipulating the layout by repositioning a tab.
|
|
381
395
|
* @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
|
|
382
396
|
*/
|
|
383
397
|
/**
|
|
398
|
+
* @PORTED
|
|
384
399
|
* @typedef {object} CapturePageOptions
|
|
385
400
|
* @property { Area } [area] The area of the window to be captured.
|
|
386
401
|
* @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
|
|
387
402
|
* @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
|
|
388
403
|
*/
|
|
389
404
|
/**
|
|
405
|
+
* @PORTED
|
|
390
406
|
* @typedef { object } Area
|
|
391
407
|
* @property { number } height Area's height
|
|
392
408
|
* @property { number } width Area's width
|
|
@@ -394,6 +410,7 @@ const view_1 = require("../view");
|
|
|
394
410
|
* @property { number } y Y coordinate of area's starting point
|
|
395
411
|
*/
|
|
396
412
|
/**
|
|
413
|
+
* @PORTED
|
|
397
414
|
* @typedef {object} FindInPageOptions
|
|
398
415
|
* @property {boolean} [forward=true] Whether to search forward or backward.
|
|
399
416
|
* @property {boolean} [findNext=false] Whether to begin a new text finding session. Should be true for first requests, and false for subsequent requests. Defaults to false.
|
|
@@ -404,18 +421,21 @@ const view_1 = require("../view");
|
|
|
404
421
|
* lowercase or non-letter. Accepts several other intra-word matches.
|
|
405
422
|
*/
|
|
406
423
|
/**
|
|
424
|
+
* @REMOVED
|
|
407
425
|
* @typedef {object} Transition
|
|
408
426
|
* @property {Opacity} opacity - The Opacity transition
|
|
409
427
|
* @property {Position} position - The Position transition
|
|
410
428
|
* @property {Size} size - The Size transition
|
|
411
429
|
*/
|
|
412
430
|
/**
|
|
431
|
+
* @PORTED
|
|
413
432
|
* @typedef {object} TransitionOptions
|
|
414
433
|
* @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
|
|
415
434
|
this animation onto the end of the animation queue.
|
|
416
435
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
417
436
|
*/
|
|
418
437
|
/**
|
|
438
|
+
* @PORTED
|
|
419
439
|
* @typedef {object} Size
|
|
420
440
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
421
441
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -423,6 +443,7 @@ this animation onto the end of the animation queue.
|
|
|
423
443
|
* @property {number} height - Optional if width is present. Defaults to the window's current height.
|
|
424
444
|
*/
|
|
425
445
|
/**
|
|
446
|
+
* @PORTED
|
|
426
447
|
* @typedef {object} Position
|
|
427
448
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
428
449
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -430,12 +451,14 @@ this animation onto the end of the animation queue.
|
|
|
430
451
|
* @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
|
|
431
452
|
*/
|
|
432
453
|
/**
|
|
454
|
+
* @PORTED
|
|
433
455
|
* @typedef {object} Opacity
|
|
434
456
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
435
457
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
436
458
|
* @property {number} opacity - This value is clamped from 0.0 to 1.0.
|
|
437
459
|
*/
|
|
438
460
|
/**
|
|
461
|
+
* @REMOVED
|
|
439
462
|
* Bounds is a interface that has the properties of height,
|
|
440
463
|
* width, left, top which are all numbers
|
|
441
464
|
* @typedef { object } Bounds
|
|
@@ -716,6 +739,8 @@ class _Window extends main_1.WebContents {
|
|
|
716
739
|
const CONSTRUCTOR_CB_TOPIC = 'fire-constructor-callback';
|
|
717
740
|
// need to call pageResponse, otherwise when a child window is created, page is not loaded
|
|
718
741
|
const pageResponse = new Promise((resolve) => {
|
|
742
|
+
// TODO: fix typing (internal)
|
|
743
|
+
// @ts-expect-error
|
|
719
744
|
this.on(CONSTRUCTOR_CB_TOPIC, function fireConstructor(response) {
|
|
720
745
|
let cbPayload;
|
|
721
746
|
const { success } = response;
|
package/src/api/window/index.js
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
8
12
|
}));
|
|
9
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !
|
|
11
|
-
}
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
17
|
const Factory_1 = require("./Factory");
|
|
14
18
|
exports.default = Factory_1.default;
|
package/src/browser.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type * as OpenFin from './OpenFin';
|
|
2
2
|
import { RemoteConfig } from './transport/wire';
|
|
3
3
|
interface GetRemoteConnectionPayload extends RemoteConfig {
|
|
4
4
|
interopProviderId: string;
|
|
5
5
|
withInterop: boolean;
|
|
6
6
|
}
|
|
7
|
-
export declare function getRemoteConnectionPayload(fin:
|
|
8
|
-
export declare function remoteConnect({ uuid, token, address, interopProviderId, withInterop }: GetRemoteConnectionPayload): Promise<
|
|
9
|
-
export declare function remoteConnectInterop(fin:
|
|
7
|
+
export declare function getRemoteConnectionPayload(fin: OpenFin.Fin<OpenFin.EntityType>, uuid?: string, interopProviderId?: string): Promise<GetRemoteConnectionPayload>;
|
|
8
|
+
export declare function remoteConnect({ uuid, token, address, interopProviderId, withInterop }: GetRemoteConnectionPayload): Promise<OpenFin.Fin<'external connection'>>;
|
|
9
|
+
export declare function remoteConnectInterop(fin: OpenFin.Fin<OpenFin.EntityType>, interopProviderId: string): Promise<OpenFin.Fin<OpenFin.EntityType>>;
|
|
10
10
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
1
2
|
import { NewConnectConfig } from '../transport/wire';
|
|
2
3
|
import { ChildContentOptions, Environment } from './environment';
|
|
3
|
-
|
|
4
|
+
declare type EntityType = OpenFin.EntityType;
|
|
4
5
|
export declare class BrowserEnvironment implements Environment {
|
|
5
6
|
getManagerConstructor(): Promise<any>;
|
|
6
7
|
getProviderInitializer(): Promise<any>;
|
|
@@ -23,3 +24,4 @@ export declare class BrowserEnvironment implements Environment {
|
|
|
23
24
|
getWsConstructor(): typeof WebSocket;
|
|
24
25
|
whenReady(): Promise<void>;
|
|
25
26
|
}
|
|
27
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
1
2
|
import { NewConnectConfig } from '../transport/wire';
|
|
2
|
-
|
|
3
|
+
declare type EntityType = OpenFin.EntityType;
|
|
3
4
|
export interface Environment {
|
|
4
5
|
getManagerConstructor(): Promise<any>;
|
|
5
6
|
getProviderInitializer(): Promise<any>;
|
|
@@ -27,3 +28,4 @@ export interface ChildContentOptions {
|
|
|
27
28
|
entityType: EntityType;
|
|
28
29
|
}
|
|
29
30
|
export declare const notImplementedEnvErrorMsg = "Not implemented in this environment";
|
|
31
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
1
2
|
import { Environment } from './environment';
|
|
2
3
|
import { NewConnectConfig } from '../transport/wire';
|
|
3
|
-
|
|
4
|
+
declare type EntityType = OpenFin.EntityType;
|
|
4
5
|
export default class NodeEnvironment implements Environment {
|
|
5
6
|
getDefaultChannelOptions(): {
|
|
6
7
|
create: OpenFin.ChannelCreateOptions;
|
|
@@ -24,3 +25,4 @@ export default class NodeEnvironment implements Environment {
|
|
|
24
25
|
getUrl: () => string;
|
|
25
26
|
getWsConstructor(): typeof WebSocket;
|
|
26
27
|
}
|
|
28
|
+
export {};
|
|
@@ -13,7 +13,7 @@ class NodeEnvironment {
|
|
|
13
13
|
this.childViews = false;
|
|
14
14
|
this.writeToken = (path, token) => {
|
|
15
15
|
return new Promise((resolve) => {
|
|
16
|
-
fs_1.writeFile(path, token, () => resolve(token));
|
|
16
|
+
(0, fs_1.writeFile)(path, token, () => resolve(token));
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
this.retrievePort = (config) => {
|
|
@@ -25,7 +25,7 @@ class NodeEnvironment {
|
|
|
25
25
|
return this.messageCounter++;
|
|
26
26
|
};
|
|
27
27
|
this.getRandomId = () => {
|
|
28
|
-
return crypto_1.randomBytes(16).toString('hex');
|
|
28
|
+
return (0, crypto_1.randomBytes)(16).toString('hex');
|
|
29
29
|
};
|
|
30
30
|
this.getWebWindow = (identity) => {
|
|
31
31
|
throw new transport_errors_1.NotSupportedError('Not supported outside of OpenFin web context');
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
1
2
|
import { ChildContentOptions, Environment } from './environment';
|
|
2
3
|
import { NewConnectConfig } from '../transport/wire';
|
|
3
4
|
import { BrowserEnvironment } from './browser';
|
|
4
|
-
|
|
5
|
+
declare type EntityType = OpenFin.EntityType;
|
|
5
6
|
export default class OpenFinEnvironment extends BrowserEnvironment implements Environment {
|
|
6
7
|
#private;
|
|
7
8
|
private raiseEventAsync;
|
|
@@ -25,3 +26,4 @@ export default class OpenFinEnvironment extends BrowserEnvironment implements En
|
|
|
25
26
|
raiseEvent: (eventName: string, eventArgs: any) => void;
|
|
26
27
|
whenReady(): Promise<void>;
|
|
27
28
|
}
|
|
29
|
+
export {};
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver,
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return value;
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
8
7
|
};
|
|
9
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver,
|
|
10
|
-
if (!
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return privateMap.get(receiver);
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
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");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
14
12
|
};
|
|
15
|
-
var
|
|
13
|
+
var _OpenFinEnvironment_ready;
|
|
16
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
15
|
/* global window, location */
|
|
18
16
|
/* eslint-disable class-methods-use-this */
|
|
@@ -22,7 +20,7 @@ const browser_1 = require("./browser");
|
|
|
22
20
|
class OpenFinEnvironment extends browser_1.BrowserEnvironment {
|
|
23
21
|
constructor() {
|
|
24
22
|
super();
|
|
25
|
-
|
|
23
|
+
_OpenFinEnvironment_ready.set(this, void 0);
|
|
26
24
|
this.writeToken = (path, token) => {
|
|
27
25
|
throw new transport_errors_1.NotImplementedError('Not Implemented');
|
|
28
26
|
};
|
|
@@ -63,9 +61,9 @@ class OpenFinEnvironment extends browser_1.BrowserEnvironment {
|
|
|
63
61
|
this.raiseEventAsync = fin.__internal_.raiseEventAsync;
|
|
64
62
|
delete fin.__internal_.raiseEventAsync;
|
|
65
63
|
this.childViews = fin.__internal_.childViews;
|
|
66
|
-
__classPrivateFieldSet(this,
|
|
64
|
+
__classPrivateFieldSet(this, _OpenFinEnvironment_ready, new Promise((resolve) => {
|
|
67
65
|
fin.desktop.main(resolve);
|
|
68
|
-
}));
|
|
66
|
+
}), "f");
|
|
69
67
|
}
|
|
70
68
|
getDefaultChannelOptions() {
|
|
71
69
|
var _a, _b;
|
|
@@ -93,8 +91,8 @@ class OpenFinEnvironment extends browser_1.BrowserEnvironment {
|
|
|
93
91
|
return newUrl.href;
|
|
94
92
|
}
|
|
95
93
|
whenReady() {
|
|
96
|
-
return __classPrivateFieldGet(this,
|
|
94
|
+
return __classPrivateFieldGet(this, _OpenFinEnvironment_ready, "f");
|
|
97
95
|
}
|
|
98
96
|
}
|
|
99
97
|
exports.default = OpenFinEnvironment;
|
|
100
|
-
|
|
98
|
+
_OpenFinEnvironment_ready = new WeakMap();
|
package/src/fdc3.d.ts
ADDED
package/src/fdc3.js
CHANGED
|
@@ -4,6 +4,6 @@ exports.fdc3FromFin = void 0;
|
|
|
4
4
|
const fdc3_1 = require("./api/interop/fdc3/fdc3");
|
|
5
5
|
async function fdc3FromFin(fin, version) {
|
|
6
6
|
// @ts-expect-error
|
|
7
|
-
return fdc3_1.getFdc3(fin.wire, version);
|
|
7
|
+
return (0, fdc3_1.getFdc3)(fin.wire, version);
|
|
8
8
|
}
|
|
9
9
|
exports.fdc3FromFin = fdc3FromFin;
|
package/src/mock.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const fin:
|
|
1
|
+
import type * as OpenFin from './OpenFin';
|
|
2
|
+
export declare const fin: OpenFin.Fin<"window" | "view">;
|
|
3
3
|
export default OpenFin;
|
package/src/mock.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var _a;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.fin = void 0;
|
|
4
|
+
const events_1 = require("events");
|
|
5
5
|
/* eslint-disable import/prefer-default-export */
|
|
6
6
|
/* eslint-disable spaced-comment */
|
|
7
7
|
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
8
8
|
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
9
9
|
/* eslint-disable class-methods-use-this */
|
|
10
10
|
/// <reference path="../OpenFin.d.ts"/>
|
|
11
|
-
const events_1 = require("events");
|
|
12
11
|
const fin_1 = require("./api/fin");
|
|
13
12
|
const transport_1 = require("./transport/transport");
|
|
14
13
|
const me_1 = require("./api/me");
|
|
@@ -83,7 +82,7 @@ class MockEnvironment {
|
|
|
83
82
|
throw new Error('Method not implemented.');
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
|
-
exports.fin = ((typeof window !== 'undefined' && (
|
|
85
|
+
exports.fin = ((typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.fin)) ||
|
|
87
86
|
(() => {
|
|
88
87
|
const environment = new MockEnvironment();
|
|
89
88
|
const transport = new transport_1.default(MockWire, environment, {
|
|
@@ -92,3 +91,4 @@ exports.fin = ((typeof window !== 'undefined' && ((_a = window) === null || _a =
|
|
|
92
91
|
});
|
|
93
92
|
return new fin_1.default(transport);
|
|
94
93
|
})());
|
|
94
|
+
exports.default = OpenFin;
|