@openfin/core 30.73.22 → 30.73.24
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/LICENSE.md +4 -0
- package/package.json +2 -2
- package/src/OpenFin.d.ts +1678 -188
- package/src/api/application/Factory.d.ts +2 -1
- package/src/api/application/Factory.js +1 -0
- package/src/api/application/Instance.d.ts +3 -2
- package/src/api/application/Instance.js +1 -0
- package/src/api/base.d.ts +19 -16
- package/src/api/base.js +2 -2
- package/src/api/clipboard/index.d.ts +2 -1
- package/src/api/clipboard/index.js +1 -0
- package/src/api/events/application.d.ts +66 -57
- 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 -11
- package/src/api/events/platform.d.ts +10 -16
- package/src/api/events/system.d.ts +42 -30
- package/src/api/events/typedEventEmitter.d.ts +15 -8
- package/src/api/events/view.d.ts +38 -55
- package/src/api/events/webcontents.d.ts +75 -29
- package/src/api/events/window.d.ts +148 -135
- package/src/api/external-application/Factory.d.ts +1 -1
- package/src/api/external-application/Instance.d.ts +2 -2
- package/src/api/fin.d.ts +3 -2
- package/src/api/frame/Factory.d.ts +1 -1
- package/src/api/frame/Instance.d.ts +2 -2
- package/src/api/global-hotkey/index.d.ts +2 -4
- package/src/api/global-hotkey/index.js +6 -0
- package/src/api/interappbus/channel/channel.d.ts +6 -5
- package/src/api/interappbus/channel/channels-docs.d.ts +7 -0
- package/src/api/interappbus/channel/channels-docs.js +7 -0
- package/src/api/interappbus/channel/client.d.ts +4 -3
- package/src/api/interappbus/channel/client.js +12 -5
- package/src/api/interappbus/channel/connection-manager.d.ts +1 -1
- package/src/api/interappbus/channel/index.d.ts +6 -5
- package/src/api/interappbus/channel/index.js +7 -7
- package/src/api/interappbus/channel/protocols/classic/strategy.d.ts +3 -2
- package/src/api/interappbus/channel/protocols/index.d.ts +3 -0
- package/src/api/interappbus/channel/protocols/rtc/endpoint.d.ts +3 -2
- package/src/api/interappbus/channel/protocols/rtc/endpoint.js +10 -2
- package/src/api/interappbus/channel/protocols/rtc/strategy.d.ts +3 -2
- package/src/api/interappbus/channel/protocols/rtc/strategy.js +1 -1
- package/src/api/interappbus/channel/protocols/strategy.d.ts +3 -2
- package/src/api/interappbus/channel/provider.d.ts +3 -3
- package/src/api/interop/Factory.d.ts +2 -3
- package/src/api/interop/Factory.js +20 -4
- package/src/api/interop/InteropBroker.d.ts +18 -49
- package/src/api/interop/InteropBroker.js +33 -47
- package/src/api/interop/InteropClient.d.ts +10 -9
- package/src/api/interop/InteropClient.js +9 -8
- package/src/api/interop/SessionContextGroupBroker.d.ts +1 -1
- package/src/api/interop/SessionContextGroupClient.d.ts +1 -1
- package/src/api/interop/fdc3/PrivateChannelClient.d.ts +1 -1
- package/src/api/interop/fdc3/PrivateChannelProvider.d.ts +1 -1
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +1 -1
- package/src/api/interop/fdc3/fdc3-1.2.js +8 -8
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +3 -3
- package/src/api/interop/fdc3/fdc3-2.0.js +15 -7
- package/src/api/interop/fdc3/fdc3.d.ts +3 -4
- package/src/api/interop/fdc3/overrideCheck.d.ts +4 -0
- package/src/api/interop/fdc3/overrideCheck.js +32 -0
- package/src/api/interop/fdc3/utils.d.ts +3 -3
- package/src/api/interop/fdc3/versions.d.ts +1 -0
- package/src/api/interop/fdc3/versions.js +2 -0
- package/src/api/interop/utils.d.ts +1 -1
- package/src/api/me.d.ts +3 -2
- package/src/api/platform/Factory.d.ts +6 -1
- package/src/api/platform/Factory.js +9 -0
- package/src/api/platform/Instance.d.ts +8 -7
- package/src/api/platform/Instance.js +6 -3
- package/src/api/platform/common-utils.d.ts +2 -2
- package/src/api/platform/layout/Factory.d.ts +7 -2
- package/src/api/platform/layout/Factory.js +4 -0
- package/src/api/platform/layout/Instance.d.ts +5 -4
- package/src/api/platform/layout/controllers/tab-drag-controller.d.ts +1 -1
- package/src/api/platform/layout/shapes.d.ts +3 -2
- package/src/api/platform/layout/utils/view-overlay.d.ts +1 -1
- 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 -1
- package/src/api/snapshot-source/Factory.js +1 -0
- package/src/api/snapshot-source/Instance.d.ts +1 -1
- package/src/api/snapshot-source/utils.d.ts +1 -1
- package/src/api/system/index.d.ts +2 -3
- package/src/api/system/index.js +22 -6
- package/src/api/view/Factory.d.ts +1 -1
- package/src/api/view/Instance.d.ts +9 -5
- package/src/api/view/Instance.js +7 -4
- package/src/api/webcontents/main.d.ts +20 -6
- package/src/api/webcontents/main.js +10 -0
- package/src/api/window/Factory.d.ts +1 -1
- package/src/api/window/Instance.d.ts +22 -4
- package/src/api/window/Instance.js +22 -0
- package/src/browser.d.ts +1 -1
- package/src/environment/browser.d.ts +3 -2
- package/src/environment/environment.d.ts +3 -2
- package/src/environment/node-env.d.ts +3 -2
- package/src/environment/openfin-env.d.ts +3 -2
- package/src/fdc3.d.ts +1 -1
- package/src/mock.d.ts +1 -1
- package/src/mock.js +0 -1
- package/src/namespaces.d.ts +21 -0
- package/src/namespaces.js +24 -0
- package/src/shapes/WebOptions.d.ts +1 -1
- package/src/shapes/WindowOptions.d.ts +1 -1
- package/src/shapes/protocol.d.ts +1 -1
- package/src/transport/transport-errors.d.ts +6 -1
- package/src/transport/transport-errors.js +1 -2
- package/src/transport/transport.d.ts +12 -9
- package/src/transport/transport.js +9 -1
- package/src/util/inaccessibleObject.d.ts +2 -0
- package/src/util/inaccessibleObject.js +49 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as OpenFin from '../../OpenFin';
|
|
1
|
+
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import Transport from '../../transport/transport';
|
|
3
3
|
import { WebContents } from '../webcontents/main';
|
|
4
|
-
declare type WindowEvents = OpenFin.WindowEvents;
|
|
5
4
|
/**
|
|
5
|
+
* @PORTED
|
|
6
6
|
* @typedef { object } Margins
|
|
7
7
|
* @property { string } [marginType]
|
|
8
8
|
* Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
|
|
@@ -14,11 +14,13 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
14
14
|
* @property { number } [right] The right margin of the printed web page, in pixels.
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
|
+
* @PORTED
|
|
17
18
|
* @typedef { object } Dpi
|
|
18
19
|
* @property { number } [horizontal] The horizontal dpi
|
|
19
20
|
* @property { number } [vertical] The vertical dpi
|
|
20
21
|
*/
|
|
21
22
|
/**
|
|
23
|
+
* @PORTED
|
|
22
24
|
* @typedef { object } PrintOptions
|
|
23
25
|
* @property { boolean } [silent=false] Don't ask user for print settings.
|
|
24
26
|
* @property { boolean } [printBackground=false] Prints the background color and image of the web page.
|
|
@@ -35,6 +37,7 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
35
37
|
* @property { Dpi } [dpi] Set dpi for the printed web page
|
|
36
38
|
*/
|
|
37
39
|
/**
|
|
40
|
+
* @REMOVED
|
|
38
41
|
* PrinterInfo interface
|
|
39
42
|
* @typedef { object } PrinterInfo
|
|
40
43
|
* @property { string } name Printer Name
|
|
@@ -43,12 +46,14 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
43
46
|
* @property { boolean } isDefault Indicates that system's default printer
|
|
44
47
|
*/
|
|
45
48
|
/**
|
|
49
|
+
* @REMOVED
|
|
46
50
|
* SharedWorkerInfo interface
|
|
47
51
|
* @typedef { object } SharedWorkerInfo
|
|
48
52
|
* @property { string } id The unique id of the shared worker.
|
|
49
53
|
* @property { string } url The url of the shared worker.
|
|
50
54
|
*/
|
|
51
55
|
/**
|
|
56
|
+
* @PORTED
|
|
52
57
|
* ContentCreationRule interface
|
|
53
58
|
* @typedef { object } ContentCreationRule
|
|
54
59
|
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
|
@@ -56,6 +61,7 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
56
61
|
* @property { object } options Window creation options or View creation options.
|
|
57
62
|
*/
|
|
58
63
|
/**
|
|
64
|
+
* @PORTED
|
|
59
65
|
* @typedef {object} Window~options
|
|
60
66
|
* @summary Window creation options.
|
|
61
67
|
* @desc This is the options object required by {@link Window.create Window.create}.
|
|
@@ -359,31 +365,37 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
359
365
|
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
360
366
|
*/
|
|
361
367
|
/**
|
|
368
|
+
* @PORTED
|
|
362
369
|
* @typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
363
370
|
* @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
|
|
364
371
|
* @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
365
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.
|
|
366
373
|
*/
|
|
367
374
|
/**
|
|
375
|
+
* @PORTED
|
|
368
376
|
* @typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
369
377
|
* @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
|
|
370
378
|
* @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
|
|
371
379
|
*/
|
|
372
380
|
/**
|
|
381
|
+
* @REMOVED
|
|
373
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.
|
|
374
383
|
* @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
|
|
375
384
|
*/
|
|
376
385
|
/**
|
|
386
|
+
* @REMOVED
|
|
377
387
|
* @typedef {Object} ShowViewsOnTabDrag _Platform Windows Only_. Allows views to be shown when the user is manipulating the layout by repositioning a tab.
|
|
378
388
|
* @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
|
|
379
389
|
*/
|
|
380
390
|
/**
|
|
391
|
+
* @PORTED
|
|
381
392
|
* @typedef {object} CapturePageOptions
|
|
382
393
|
* @property { Area } [area] The area of the window to be captured.
|
|
383
394
|
* @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
|
|
384
395
|
* @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
|
|
385
396
|
*/
|
|
386
397
|
/**
|
|
398
|
+
* @PORTED
|
|
387
399
|
* @typedef { object } Area
|
|
388
400
|
* @property { number } height Area's height
|
|
389
401
|
* @property { number } width Area's width
|
|
@@ -391,6 +403,7 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
391
403
|
* @property { number } y Y coordinate of area's starting point
|
|
392
404
|
*/
|
|
393
405
|
/**
|
|
406
|
+
* @PORTED
|
|
394
407
|
* @typedef {object} FindInPageOptions
|
|
395
408
|
* @property {boolean} [forward=true] Whether to search forward or backward.
|
|
396
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.
|
|
@@ -401,18 +414,21 @@ declare type WindowEvents = OpenFin.WindowEvents;
|
|
|
401
414
|
* lowercase or non-letter. Accepts several other intra-word matches.
|
|
402
415
|
*/
|
|
403
416
|
/**
|
|
417
|
+
* @REMOVED
|
|
404
418
|
* @typedef {object} Transition
|
|
405
419
|
* @property {Opacity} opacity - The Opacity transition
|
|
406
420
|
* @property {Position} position - The Position transition
|
|
407
421
|
* @property {Size} size - The Size transition
|
|
408
422
|
*/
|
|
409
423
|
/**
|
|
424
|
+
* @PORTED
|
|
410
425
|
* @typedef {object} TransitionOptions
|
|
411
426
|
* @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
|
|
412
427
|
this animation onto the end of the animation queue.
|
|
413
428
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
414
429
|
*/
|
|
415
430
|
/**
|
|
431
|
+
* @PORTED
|
|
416
432
|
* @typedef {object} Size
|
|
417
433
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
418
434
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -420,6 +436,7 @@ this animation onto the end of the animation queue.
|
|
|
420
436
|
* @property {number} height - Optional if width is present. Defaults to the window's current height.
|
|
421
437
|
*/
|
|
422
438
|
/**
|
|
439
|
+
* @PORTED
|
|
423
440
|
* @typedef {object} Position
|
|
424
441
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
425
442
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -427,12 +444,14 @@ this animation onto the end of the animation queue.
|
|
|
427
444
|
* @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
|
|
428
445
|
*/
|
|
429
446
|
/**
|
|
447
|
+
* @PORTED
|
|
430
448
|
* @typedef {object} Opacity
|
|
431
449
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
432
450
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
433
451
|
* @property {number} opacity - This value is clamped from 0.0 to 1.0.
|
|
434
452
|
*/
|
|
435
453
|
/**
|
|
454
|
+
* @REMOVED
|
|
436
455
|
* Bounds is a interface that has the properties of height,
|
|
437
456
|
* width, left, top which are all numbers
|
|
438
457
|
* @typedef { object } Bounds
|
|
@@ -453,7 +472,7 @@ this animation onto the end of the animation queue.
|
|
|
453
472
|
* @alias Window
|
|
454
473
|
* @hideconstructor
|
|
455
474
|
*/
|
|
456
|
-
export declare class _Window extends WebContents<
|
|
475
|
+
export declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
457
476
|
identity: OpenFin.Identity;
|
|
458
477
|
constructor(wire: Transport, identity: OpenFin.Identity);
|
|
459
478
|
/**
|
|
@@ -1053,4 +1072,3 @@ export declare class _Window extends WebContents<WindowEvents> {
|
|
|
1053
1072
|
*/
|
|
1054
1073
|
dispatchPopupResult(data: any): Promise<void>;
|
|
1055
1074
|
}
|
|
1056
|
-
export {};
|
|
@@ -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}.
|
|
@@ -365,31 +372,37 @@ const view_1 = require("../view");
|
|
|
365
372
|
* _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
366
373
|
*/
|
|
367
374
|
/**
|
|
375
|
+
* @PORTED
|
|
368
376
|
* @typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
|
|
369
377
|
* @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
|
|
370
378
|
* @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
|
|
371
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.
|
|
372
380
|
*/
|
|
373
381
|
/**
|
|
382
|
+
* @PORTED
|
|
374
383
|
* @typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
|
|
375
384
|
* @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
|
|
376
385
|
* @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
|
|
377
386
|
*/
|
|
378
387
|
/**
|
|
388
|
+
* @REMOVED
|
|
379
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.
|
|
380
390
|
* @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
|
|
381
391
|
*/
|
|
382
392
|
/**
|
|
393
|
+
* @REMOVED
|
|
383
394
|
* @typedef {Object} ShowViewsOnTabDrag _Platform Windows Only_. Allows views to be shown when the user is manipulating the layout by repositioning a tab.
|
|
384
395
|
* @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
|
|
385
396
|
*/
|
|
386
397
|
/**
|
|
398
|
+
* @PORTED
|
|
387
399
|
* @typedef {object} CapturePageOptions
|
|
388
400
|
* @property { Area } [area] The area of the window to be captured.
|
|
389
401
|
* @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
|
|
390
402
|
* @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
|
|
391
403
|
*/
|
|
392
404
|
/**
|
|
405
|
+
* @PORTED
|
|
393
406
|
* @typedef { object } Area
|
|
394
407
|
* @property { number } height Area's height
|
|
395
408
|
* @property { number } width Area's width
|
|
@@ -397,6 +410,7 @@ const view_1 = require("../view");
|
|
|
397
410
|
* @property { number } y Y coordinate of area's starting point
|
|
398
411
|
*/
|
|
399
412
|
/**
|
|
413
|
+
* @PORTED
|
|
400
414
|
* @typedef {object} FindInPageOptions
|
|
401
415
|
* @property {boolean} [forward=true] Whether to search forward or backward.
|
|
402
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.
|
|
@@ -407,18 +421,21 @@ const view_1 = require("../view");
|
|
|
407
421
|
* lowercase or non-letter. Accepts several other intra-word matches.
|
|
408
422
|
*/
|
|
409
423
|
/**
|
|
424
|
+
* @REMOVED
|
|
410
425
|
* @typedef {object} Transition
|
|
411
426
|
* @property {Opacity} opacity - The Opacity transition
|
|
412
427
|
* @property {Position} position - The Position transition
|
|
413
428
|
* @property {Size} size - The Size transition
|
|
414
429
|
*/
|
|
415
430
|
/**
|
|
431
|
+
* @PORTED
|
|
416
432
|
* @typedef {object} TransitionOptions
|
|
417
433
|
* @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
|
|
418
434
|
this animation onto the end of the animation queue.
|
|
419
435
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
420
436
|
*/
|
|
421
437
|
/**
|
|
438
|
+
* @PORTED
|
|
422
439
|
* @typedef {object} Size
|
|
423
440
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
424
441
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -426,6 +443,7 @@ this animation onto the end of the animation queue.
|
|
|
426
443
|
* @property {number} height - Optional if width is present. Defaults to the window's current height.
|
|
427
444
|
*/
|
|
428
445
|
/**
|
|
446
|
+
* @PORTED
|
|
429
447
|
* @typedef {object} Position
|
|
430
448
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
431
449
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
@@ -433,12 +451,14 @@ this animation onto the end of the animation queue.
|
|
|
433
451
|
* @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
|
|
434
452
|
*/
|
|
435
453
|
/**
|
|
454
|
+
* @PORTED
|
|
436
455
|
* @typedef {object} Opacity
|
|
437
456
|
* @property {number} duration - The total time in milliseconds this transition should take.
|
|
438
457
|
* @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
|
|
439
458
|
* @property {number} opacity - This value is clamped from 0.0 to 1.0.
|
|
440
459
|
*/
|
|
441
460
|
/**
|
|
461
|
+
* @REMOVED
|
|
442
462
|
* Bounds is a interface that has the properties of height,
|
|
443
463
|
* width, left, top which are all numbers
|
|
444
464
|
* @typedef { object } Bounds
|
|
@@ -719,6 +739,8 @@ class _Window extends main_1.WebContents {
|
|
|
719
739
|
const CONSTRUCTOR_CB_TOPIC = 'fire-constructor-callback';
|
|
720
740
|
// need to call pageResponse, otherwise when a child window is created, page is not loaded
|
|
721
741
|
const pageResponse = new Promise((resolve) => {
|
|
742
|
+
// TODO: fix typing (internal)
|
|
743
|
+
// @ts-expect-error
|
|
722
744
|
this.on(CONSTRUCTOR_CB_TOPIC, function fireConstructor(response) {
|
|
723
745
|
let cbPayload;
|
|
724
746
|
const { success } = response;
|
package/src/browser.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as OpenFin from '../OpenFin';
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
2
2
|
import { NewConnectConfig } from '../transport/wire';
|
|
3
3
|
import { ChildContentOptions, Environment } from './environment';
|
|
4
|
-
|
|
4
|
+
declare type EntityType = OpenFin.EntityType;
|
|
5
5
|
export declare class BrowserEnvironment implements Environment {
|
|
6
6
|
getManagerConstructor(): Promise<any>;
|
|
7
7
|
getProviderInitializer(): Promise<any>;
|
|
@@ -24,3 +24,4 @@ export declare class BrowserEnvironment implements Environment {
|
|
|
24
24
|
getWsConstructor(): typeof WebSocket;
|
|
25
25
|
whenReady(): Promise<void>;
|
|
26
26
|
}
|
|
27
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as OpenFin from '../OpenFin';
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
2
2
|
import { NewConnectConfig } from '../transport/wire';
|
|
3
|
-
|
|
3
|
+
declare type EntityType = OpenFin.EntityType;
|
|
4
4
|
export interface Environment {
|
|
5
5
|
getManagerConstructor(): Promise<any>;
|
|
6
6
|
getProviderInitializer(): Promise<any>;
|
|
@@ -28,3 +28,4 @@ export interface ChildContentOptions {
|
|
|
28
28
|
entityType: EntityType;
|
|
29
29
|
}
|
|
30
30
|
export declare const notImplementedEnvErrorMsg = "Not implemented in this environment";
|
|
31
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as OpenFin from '../OpenFin';
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
2
2
|
import { Environment } from './environment';
|
|
3
3
|
import { NewConnectConfig } from '../transport/wire';
|
|
4
|
-
|
|
4
|
+
declare type EntityType = OpenFin.EntityType;
|
|
5
5
|
export default class NodeEnvironment implements Environment {
|
|
6
6
|
getDefaultChannelOptions(): {
|
|
7
7
|
create: OpenFin.ChannelCreateOptions;
|
|
@@ -25,3 +25,4 @@ export default class NodeEnvironment implements Environment {
|
|
|
25
25
|
getUrl: () => string;
|
|
26
26
|
getWsConstructor(): typeof WebSocket;
|
|
27
27
|
}
|
|
28
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as OpenFin from '../OpenFin';
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
2
2
|
import { ChildContentOptions, Environment } from './environment';
|
|
3
3
|
import { NewConnectConfig } from '../transport/wire';
|
|
4
4
|
import { BrowserEnvironment } from './browser';
|
|
5
|
-
|
|
5
|
+
declare type EntityType = OpenFin.EntityType;
|
|
6
6
|
export default class OpenFinEnvironment extends BrowserEnvironment implements Environment {
|
|
7
7
|
#private;
|
|
8
8
|
private raiseEventAsync;
|
|
@@ -26,3 +26,4 @@ export default class OpenFinEnvironment extends BrowserEnvironment implements En
|
|
|
26
26
|
raiseEvent: (eventName: string, eventArgs: any) => void;
|
|
27
27
|
whenReady(): Promise<void>;
|
|
28
28
|
}
|
|
29
|
+
export {};
|
package/src/fdc3.d.ts
CHANGED
package/src/mock.d.ts
CHANGED
package/src/mock.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fin = void 0;
|
|
4
4
|
const events_1 = require("events");
|
|
5
|
-
const OpenFin = require("./OpenFin");
|
|
6
5
|
/* eslint-disable import/prefer-default-export */
|
|
7
6
|
/* eslint-disable spaced-comment */
|
|
8
7
|
/* eslint-disable @typescript-eslint/triple-slash-reference */
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export * as OpenFin from './OpenFin';
|
|
2
|
+
export * as Application from './api/application';
|
|
3
|
+
export * as ExternalApplication from './api/external-application';
|
|
4
|
+
export * as Frame from './api/frame';
|
|
5
|
+
export * as Interop from './api/interop';
|
|
6
|
+
export * as InteropBroker from './api/interop/InteropBroker';
|
|
7
|
+
export * as InteropClient from './api/interop/InteropClient';
|
|
8
|
+
export * as InterApplicationBus from './api/interappbus';
|
|
9
|
+
export * as Channel from './api/interappbus/channel';
|
|
10
|
+
export * as ChannelProvider from './api/interappbus/channel/provider';
|
|
11
|
+
export * as ChannelClient from './api/interappbus/channel/client';
|
|
12
|
+
export * as Platform from './api/platform';
|
|
13
|
+
export * as PlatformProvider from './api/platform/provider';
|
|
14
|
+
export * as Layout from './api/platform/layout';
|
|
15
|
+
export * as View from './api/view';
|
|
16
|
+
export * as Window from './api/window';
|
|
17
|
+
export * as SnapshotSource from './api/snapshot-source';
|
|
18
|
+
export * as GlobalHotkey from './api/global-hotkey';
|
|
19
|
+
export * as Clipboard from './api/clipboard';
|
|
20
|
+
export * as Fin from './api/fin';
|
|
21
|
+
export * as System from './api/system';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.System = exports.Fin = exports.Clipboard = exports.GlobalHotkey = exports.SnapshotSource = exports.Window = exports.View = exports.Layout = exports.PlatformProvider = exports.Platform = exports.ChannelClient = exports.ChannelProvider = exports.Channel = exports.InterApplicationBus = exports.InteropClient = exports.InteropBroker = exports.Interop = exports.Frame = exports.ExternalApplication = exports.Application = exports.OpenFin = void 0;
|
|
4
|
+
exports.OpenFin = require("./OpenFin");
|
|
5
|
+
exports.Application = require("./api/application");
|
|
6
|
+
exports.ExternalApplication = require("./api/external-application");
|
|
7
|
+
exports.Frame = require("./api/frame");
|
|
8
|
+
exports.Interop = require("./api/interop");
|
|
9
|
+
exports.InteropBroker = require("./api/interop/InteropBroker");
|
|
10
|
+
exports.InteropClient = require("./api/interop/InteropClient");
|
|
11
|
+
exports.InterApplicationBus = require("./api/interappbus");
|
|
12
|
+
exports.Channel = require("./api/interappbus/channel");
|
|
13
|
+
exports.ChannelProvider = require("./api/interappbus/channel/provider");
|
|
14
|
+
exports.ChannelClient = require("./api/interappbus/channel/client");
|
|
15
|
+
exports.Platform = require("./api/platform");
|
|
16
|
+
exports.PlatformProvider = require("./api/platform/provider");
|
|
17
|
+
exports.Layout = require("./api/platform/layout");
|
|
18
|
+
exports.View = require("./api/view");
|
|
19
|
+
exports.Window = require("./api/window");
|
|
20
|
+
exports.SnapshotSource = require("./api/snapshot-source");
|
|
21
|
+
exports.GlobalHotkey = require("./api/global-hotkey");
|
|
22
|
+
exports.Clipboard = require("./api/clipboard");
|
|
23
|
+
exports.Fin = require("./api/fin");
|
|
24
|
+
exports.System = require("./api/system");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as OpenFin from '../OpenFin';
|
|
1
|
+
import type * as OpenFin from '../OpenFin';
|
|
2
2
|
import { ERROR_BOX_TYPES } from './ERROR_BOX_TYPES';
|
|
3
3
|
import { WebOptions } from './WebOptions';
|
|
4
4
|
export interface WindowOptions extends Partial<OpenFin.WindowOptions>, Partial<WindowInternalOptions> {
|
package/src/shapes/protocol.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorPlainObject } from '../util/errors';
|
|
1
2
|
export declare type ReadyState = 'CONNECTING' | 'OPEN' | 'CLOSING' | 'CLOSED';
|
|
2
3
|
export declare class DisconnectedError extends Error {
|
|
3
4
|
constructor(readyState: ReadyState);
|
|
@@ -13,6 +14,10 @@ export declare class NotImplementedError extends Error {
|
|
|
13
14
|
}
|
|
14
15
|
export declare class NotSupportedError extends Error {
|
|
15
16
|
}
|
|
17
|
+
export declare type RuntimeErrorPayload = {
|
|
18
|
+
reason: string;
|
|
19
|
+
error?: ErrorPlainObject;
|
|
20
|
+
};
|
|
16
21
|
export declare class RuntimeError extends Error {
|
|
17
|
-
constructor(
|
|
22
|
+
constructor(payload: RuntimeErrorPayload);
|
|
18
23
|
}
|
|
@@ -24,8 +24,7 @@ class NotSupportedError extends Error {
|
|
|
24
24
|
}
|
|
25
25
|
exports.NotSupportedError = NotSupportedError;
|
|
26
26
|
class RuntimeError extends Error {
|
|
27
|
-
constructor(
|
|
28
|
-
const payload = data.payload || data;
|
|
27
|
+
constructor(payload) {
|
|
29
28
|
const { reason, error } = payload;
|
|
30
29
|
super(reason);
|
|
31
30
|
this.name = 'RuntimeError';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import * as OpenFin from '../OpenFin';
|
|
3
|
+
import type * as OpenFin from '../OpenFin';
|
|
4
4
|
import { ExistingConnectConfig, InternalConnectConfig, RemoteConfig, Wire, WireConstructor } from './wire';
|
|
5
5
|
import { Environment } from '../environment/environment';
|
|
6
|
-
import { RuntimeEvent } from '../api/events/base';
|
|
7
6
|
import EventAggregator from '../api/events/eventAggregator';
|
|
8
7
|
import { EntityTypeHelpers } from '../api/me';
|
|
9
8
|
import { ProtocolMap } from '../shapes/protocol';
|
|
10
|
-
import
|
|
9
|
+
import { NamedEvent } from '../api/events/base';
|
|
10
|
+
import { ErrorPlainObject } from '../util/errors';
|
|
11
|
+
declare type EntityType = OpenFin.EntityType;
|
|
11
12
|
export declare type MessageHandler = (data: any) => boolean;
|
|
12
13
|
declare class Transport<MeType extends EntityType = EntityType> extends EventEmitter {
|
|
13
14
|
#private;
|
|
@@ -45,14 +46,16 @@ export interface Message<T> {
|
|
|
45
46
|
payload: T;
|
|
46
47
|
correlationId?: number;
|
|
47
48
|
}
|
|
48
|
-
export interface EventMessage extends Message<
|
|
49
|
+
export interface EventMessage extends Message<NamedEvent> {
|
|
49
50
|
action: 'process-desktop-event';
|
|
50
|
-
payload:
|
|
51
|
-
}
|
|
52
|
-
export interface Payload {
|
|
53
|
-
success: boolean;
|
|
54
|
-
data: any;
|
|
51
|
+
payload: NamedEvent;
|
|
55
52
|
}
|
|
53
|
+
export declare type Payload<Success extends boolean = boolean, Data = any> = {
|
|
54
|
+
success: Success;
|
|
55
|
+
data: Success extends true ? Data : never;
|
|
56
|
+
reason: Success extends false ? string : never;
|
|
57
|
+
error?: Success extends false ? ErrorPlainObject | undefined : never;
|
|
58
|
+
};
|
|
56
59
|
export interface AuthorizationPayload {
|
|
57
60
|
token: string;
|
|
58
61
|
file: string;
|
|
@@ -168,7 +168,15 @@ class Transport extends events_1.EventEmitter {
|
|
|
168
168
|
reject(new transport_errors_1.NoAckError(data.action));
|
|
169
169
|
}
|
|
170
170
|
else if (!('payload' in data)) {
|
|
171
|
-
|
|
171
|
+
// I'm not sure when this code would actually run, but passing in something that doeesn't have a reason to the runtimeerror constructor will not end well.
|
|
172
|
+
// @ts-expect-error
|
|
173
|
+
if (typeof data.reason === 'string') {
|
|
174
|
+
reject(new transport_errors_1.RuntimeError(data));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
console.warn('Received invalid response from core', data);
|
|
178
|
+
reject(new Error('Invalid response'));
|
|
179
|
+
}
|
|
172
180
|
}
|
|
173
181
|
else if (!data.payload.success) {
|
|
174
182
|
reject(new transport_errors_1.RuntimeError(data.payload));
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createWarningObject = exports.createUnusableObject = void 0;
|
|
4
|
+
function createUnusableObject(message) {
|
|
5
|
+
const handle = () => {
|
|
6
|
+
throw new Error(message);
|
|
7
|
+
};
|
|
8
|
+
return new Proxy({}, {
|
|
9
|
+
apply: handle,
|
|
10
|
+
construct: handle,
|
|
11
|
+
defineProperty: handle,
|
|
12
|
+
deleteProperty: handle,
|
|
13
|
+
get: handle,
|
|
14
|
+
getOwnPropertyDescriptor: handle,
|
|
15
|
+
getPrototypeOf: handle,
|
|
16
|
+
has: handle,
|
|
17
|
+
isExtensible: handle,
|
|
18
|
+
ownKeys: handle,
|
|
19
|
+
preventExtensions: handle,
|
|
20
|
+
set: handle,
|
|
21
|
+
setPrototypeOf: handle
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.createUnusableObject = createUnusableObject;
|
|
25
|
+
function createWarningObject(message, obj) {
|
|
26
|
+
return new Proxy(obj, {
|
|
27
|
+
get: (...args) => {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
29
|
+
console.warn(message);
|
|
30
|
+
return Reflect.get(...args);
|
|
31
|
+
},
|
|
32
|
+
set: (...args) => {
|
|
33
|
+
// eslint-disable-next-line no-console
|
|
34
|
+
console.warn(message);
|
|
35
|
+
return Reflect.set(...args);
|
|
36
|
+
},
|
|
37
|
+
getOwnPropertyDescriptor: (...args) => {
|
|
38
|
+
// eslint-disable-next-line no-console
|
|
39
|
+
console.warn(message);
|
|
40
|
+
return Reflect.getOwnPropertyDescriptor(...args);
|
|
41
|
+
},
|
|
42
|
+
ownKeys: (...args) => {
|
|
43
|
+
// eslint-disable-next-line no-console
|
|
44
|
+
console.warn(message);
|
|
45
|
+
return Reflect.ownKeys(...args);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
exports.createWarningObject = createWarningObject;
|