@openfin/core 33.76.31 → 33.76.36
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-core-33.76.36.tgz +0 -0
- package/package.json +1 -1
- package/src/OpenFin.d.ts +27 -16
- package/src/api/application/Factory.d.ts +148 -100
- package/src/api/application/Factory.js +148 -100
- package/src/api/application/Instance.d.ts +477 -106
- package/src/api/application/Instance.js +474 -106
- package/src/api/application/index.d.ts +9 -0
- package/src/api/application/index.js +9 -0
- package/src/api/base.d.ts +69 -0
- package/src/api/base.js +69 -0
- package/src/api/clipboard/index.d.ts +111 -31
- package/src/api/clipboard/index.js +111 -31
- package/src/api/events/application.d.ts +12 -0
- package/src/api/events/application.js +12 -0
- package/src/api/events/channel.d.ts +5 -0
- package/src/api/events/channel.js +5 -0
- package/src/api/events/externalApplication.d.ts +5 -0
- package/src/api/events/externalApplication.js +5 -0
- package/src/api/events/frame.d.ts +5 -0
- package/src/api/events/globalHotkey.d.ts +5 -0
- package/src/api/events/platform.d.ts +9 -1
- package/src/api/events/platform.js +8 -0
- package/src/api/events/system.d.ts +13 -0
- package/src/api/events/system.js +13 -0
- package/src/api/events/view.d.ts +19 -9
- package/src/api/events/view.js +10 -0
- package/src/api/events/webcontents.d.ts +21 -10
- package/src/api/events/webcontents.js +11 -0
- package/src/api/events/window.d.ts +70 -1
- package/src/api/events/window.js +10 -0
- package/src/api/external-application/Factory.d.ts +16 -9
- package/src/api/external-application/Factory.js +16 -9
- package/src/api/external-application/Instance.d.ts +40 -32
- package/src/api/external-application/Instance.js +40 -32
- package/src/api/external-application/index.d.ts +9 -0
- package/src/api/external-application/index.js +9 -0
- package/src/api/fin.d.ts +3 -0
- package/src/api/fin.js +3 -0
- package/src/api/frame/Factory.d.ts +30 -13
- package/src/api/frame/Factory.js +30 -13
- package/src/api/frame/Instance.d.ts +51 -38
- package/src/api/frame/Instance.js +51 -38
- package/src/api/frame/index.d.ts +11 -0
- package/src/api/frame/index.js +11 -0
- package/src/api/global-hotkey/index.d.ts +81 -13
- package/src/api/global-hotkey/index.js +81 -13
- package/src/api/interappbus/channel/channel.d.ts +257 -0
- package/src/api/interappbus/channel/channel.js +257 -0
- package/src/api/interappbus/channel/channels-docs.d.ts +59 -57
- package/src/api/interappbus/channel/channels-docs.js +71 -68
- package/src/api/interappbus/channel/client.d.ts +93 -0
- package/src/api/interappbus/channel/client.js +93 -1
- package/src/api/interappbus/channel/index.d.ts +164 -0
- package/src/api/interappbus/channel/index.js +165 -1
- package/src/api/interappbus/channel/provider.d.ts +172 -0
- package/src/api/interappbus/channel/provider.js +172 -0
- package/src/api/interappbus/index.d.ts +55 -20
- package/src/api/interappbus/index.js +55 -20
- package/src/api/interop/Factory.d.ts +30 -10
- package/src/api/interop/Factory.js +30 -10
- package/src/api/interop/InteropBroker.d.ts +298 -70
- package/src/api/interop/InteropBroker.js +298 -70
- package/src/api/interop/InteropClient.d.ts +286 -62
- package/src/api/interop/InteropClient.js +286 -62
- package/src/api/interop/SessionContextGroupClient.d.ts +2 -2
- package/src/api/interop/SessionContextGroupClient.js +2 -2
- package/src/api/interop/fdc3/documentationStub.d.ts +14 -0
- package/src/api/interop/fdc3/documentationStub.js +17 -0
- package/src/api/interop/fdc3/fdc3-1.2.d.ts +31 -34
- package/src/api/interop/fdc3/fdc3-1.2.js +31 -34
- package/src/api/interop/fdc3/fdc3-2.0.d.ts +48 -51
- package/src/api/interop/fdc3/fdc3-2.0.js +48 -51
- package/src/api/interop/index.d.ts +8 -0
- package/src/api/interop/index.js +8 -0
- package/src/api/platform/Factory.d.ts +121 -65
- package/src/api/platform/Factory.js +122 -66
- package/src/api/platform/Instance.d.ts +551 -48
- package/src/api/platform/Instance.js +551 -49
- package/src/api/platform/index.d.ts +9 -0
- package/src/api/platform/index.js +9 -0
- package/src/api/platform/layout/Factory.d.ts +53 -76
- package/src/api/platform/layout/Factory.js +53 -76
- package/src/api/platform/layout/Instance.d.ts +158 -23
- package/src/api/platform/layout/Instance.js +118 -20
- package/src/api/platform/layout/entities/layout-entities.d.ts +222 -30
- package/src/api/platform/layout/entities/layout-entities.js +222 -30
- package/src/api/platform/layout/index.d.ts +9 -0
- package/src/api/platform/layout/index.js +9 -0
- package/src/api/platform/provider.d.ts +398 -51
- package/src/api/snapshot-source/Factory.d.ts +33 -18
- package/src/api/snapshot-source/Factory.js +33 -18
- package/src/api/snapshot-source/Instance.d.ts +30 -8
- package/src/api/snapshot-source/Instance.js +30 -8
- package/src/api/snapshot-source/index.d.ts +9 -0
- package/src/api/snapshot-source/index.js +9 -0
- package/src/api/system/index.d.ts +1137 -186
- package/src/api/system/index.js +1142 -186
- package/src/api/view/Factory.d.ts +54 -16
- package/src/api/view/Factory.js +54 -16
- package/src/api/view/Instance.d.ts +330 -216
- package/src/api/view/Instance.js +331 -217
- package/src/api/view/index.d.ts +9 -0
- package/src/api/view/index.js +9 -0
- package/src/api/webcontents/main.d.ts +890 -0
- package/src/api/webcontents/main.js +890 -0
- package/src/api/window/Factory.d.ts +67 -16
- package/src/api/window/Factory.js +67 -16
- package/src/api/window/Instance.d.ts +824 -316
- package/src/api/window/Instance.js +822 -320
- package/src/api/window/index.d.ts +11 -0
- package/src/api/window/index.js +11 -0
- package/src/namespaces.d.ts +1 -0
- package/src/namespaces.js +3 -1
- package/src/shapes/protocol.d.ts +4 -0
- package/openfin-core-33.76.31.tgz +0 -0
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for events that can be transmitted on an OpenFin Application's EventEmitter. Includes events
|
|
4
|
+
* re-propagate from the `Window` (and, transitively, `View`) level, prefixed with `window-` (and also, if applicable, `view-`).
|
|
5
|
+
* For example, a view's "shown" event will fire as 'window-view-shown' at the application level.
|
|
6
|
+
*
|
|
7
|
+
* Application events re-propagate to the system level, prefixed with `application-`. For example,
|
|
8
|
+
* the `closed` event will fire as `application-closed` at the system level. Propagated events from
|
|
9
|
+
* WebContents within an application will *not* transitively re-propagate to the system level, because they are already
|
|
10
|
+
* visible at the system level and contain the identity of the application.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace for events that can be transmitted on an OpenFin Platform's EventEmitter.
|
|
3
|
+
*
|
|
4
|
+
* The Platform `EventEmitter` is a superset of the Application's `EventEmitter`,
|
|
5
|
+
* meaning it can listen to all Application events, along with some Platform-specific events.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
1
9
|
import { ApplicationEvent } from './application';
|
|
2
10
|
import { BaseEvent } from './base';
|
|
3
11
|
/**
|
|
@@ -8,7 +16,7 @@ export type PlatformApiReadyEvent = BaseEvent & {
|
|
|
8
16
|
type: 'platform-api-ready';
|
|
9
17
|
};
|
|
10
18
|
/**
|
|
11
|
-
* Generated when a
|
|
19
|
+
* Generated when a platform.ApplySnapshot call is resolved.
|
|
12
20
|
* @remarks The call is resolved when the following conditions are met for all windows in the snapshot:
|
|
13
21
|
* 1. The window has been created
|
|
14
22
|
* 2. The window has a responsive API
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for events that can be transmitted on an OpenFin Platform's EventEmitter.
|
|
4
|
+
*
|
|
5
|
+
* The Platform `EventEmitter` is a superset of the Application's `EventEmitter`,
|
|
6
|
+
* meaning it can listen to all Application events, along with some Platform-specific events.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
2
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace for runtime-wide OpenFin events that transmit on the OpenFin System event emitter. Includes events
|
|
3
|
+
* re-propagated from individual applications, windows, and views (prefixed with `application-`, `window-`, and `view-`). All
|
|
4
|
+
* event propagations are visible at the System level, regardless of source, so transitive re-propagations (e.g. from view to window)
|
|
5
|
+
* are visible in their entirety. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
|
|
6
|
+
* transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
|
|
7
|
+
* of the application.
|
|
8
|
+
*
|
|
9
|
+
* For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
|
|
10
|
+
* will be visible as both 'view-shown' and 'window-view-shown' at the system level, but *not* as `application-window-view-shown`.
|
|
11
|
+
*
|
|
12
|
+
* @packageDocumentation
|
|
13
|
+
*/
|
|
1
14
|
import type * as OpenFin from '../../OpenFin';
|
|
2
15
|
import { PropagatedApplicationEvent } from './application';
|
|
3
16
|
import { BaseEvent, IdentityEvent } from './base';
|
package/src/api/events/system.js
CHANGED
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for runtime-wide OpenFin events that transmit on the OpenFin System event emitter. Includes events
|
|
4
|
+
* re-propagated from individual applications, windows, and views (prefixed with `application-`, `window-`, and `view-`). All
|
|
5
|
+
* event propagations are visible at the System level, regardless of source, so transitive re-propagations (e.g. from view to window)
|
|
6
|
+
* are visible in their entirety. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
|
|
7
|
+
* transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
|
|
8
|
+
* of the application.
|
|
9
|
+
*
|
|
10
|
+
* For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
|
|
11
|
+
* will be visible as both 'view-shown' and 'window-view-shown' at the system level, but *not* as `application-window-view-shown`.
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
2
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/src/api/events/view.d.ts
CHANGED
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace for events that can be transmitted on an OpenFin View's EventEmitter.
|
|
3
|
+
*
|
|
4
|
+
* View events fall into two categories: propagated and non-propagated. Propagated events will
|
|
5
|
+
* be re-emitted on the parent window of the target view, prefixed with "view-". For example,
|
|
6
|
+
* the "shown" event will be re-emitted on the parent window as "view-shown". Non-propagated events
|
|
7
|
+
* will not be re-emitted on the parent window.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
1
11
|
import type * as OpenFin from '../../OpenFin';
|
|
2
12
|
import { NonPropagatedWebContentsEvent, WillPropagateWebContentsEvent } from './webcontents';
|
|
3
13
|
import { NamedEvent, PropagatedEvent } from './base';
|
|
4
14
|
/**
|
|
5
15
|
* A base View event.
|
|
6
16
|
*/
|
|
7
|
-
export type BaseViewEvent = {
|
|
17
|
+
export type BaseViewEvent = NamedEvent & {
|
|
8
18
|
target: OpenFin.Identity;
|
|
9
19
|
viewIdentity: OpenFin.Identity;
|
|
10
20
|
};
|
|
@@ -13,7 +23,7 @@ export type BaseViewEvent = {
|
|
|
13
23
|
* @remarks This event will fire during creation of a View.
|
|
14
24
|
* In that case, previousTarget identity will be the same as target identity.
|
|
15
25
|
*/
|
|
16
|
-
export type TargetChangedEvent =
|
|
26
|
+
export type TargetChangedEvent = BaseViewEvent & {
|
|
17
27
|
type: 'target-changed';
|
|
18
28
|
previousTarget: OpenFin.Identity;
|
|
19
29
|
};
|
|
@@ -24,44 +34,44 @@ export type NonPropagatedViewEvent = BaseViewEvent & NonPropagatedWebContentsEve
|
|
|
24
34
|
/**
|
|
25
35
|
* Generated when a View is attached to a window.
|
|
26
36
|
*/
|
|
27
|
-
export type AttachedEvent =
|
|
37
|
+
export type AttachedEvent = BaseViewEvent & {
|
|
28
38
|
type: 'attached';
|
|
29
39
|
};
|
|
30
40
|
/**
|
|
31
41
|
* Generated when a View is created.
|
|
32
42
|
*/
|
|
33
|
-
export type CreatedEvent =
|
|
43
|
+
export type CreatedEvent = BaseViewEvent & {
|
|
34
44
|
type: 'created';
|
|
35
45
|
};
|
|
36
46
|
/**
|
|
37
47
|
* Generated when a View is destroyed.
|
|
38
48
|
*/
|
|
39
|
-
export type DestroyedEvent =
|
|
49
|
+
export type DestroyedEvent = BaseViewEvent & {
|
|
40
50
|
type: 'destroyed';
|
|
41
51
|
};
|
|
42
52
|
/**
|
|
43
53
|
* Generated when a View is hidden.
|
|
44
54
|
*/
|
|
45
|
-
export type HiddenEvent =
|
|
55
|
+
export type HiddenEvent = BaseViewEvent & {
|
|
46
56
|
type: 'hidden';
|
|
47
57
|
};
|
|
48
58
|
/**
|
|
49
59
|
* Generated when a keyboard shortcut defined in the `hotkeys` array in [View options](OpenFin.ViewOptions.html) is pressed inside the view.
|
|
50
60
|
* @remarks For reference on keyboard event properties see [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent).
|
|
51
61
|
*/
|
|
52
|
-
export type HotkeyEvent =
|
|
62
|
+
export type HotkeyEvent = BaseViewEvent & {
|
|
53
63
|
type: 'hotkey';
|
|
54
64
|
};
|
|
55
65
|
/**
|
|
56
66
|
* Generated when a View is shown. This event will fire during creation of a View.
|
|
57
67
|
*/
|
|
58
|
-
export type ShownEvent =
|
|
68
|
+
export type ShownEvent = BaseViewEvent & {
|
|
59
69
|
type: 'shown';
|
|
60
70
|
};
|
|
61
71
|
/**
|
|
62
72
|
* A View event that does propagate to (republish on) parent topics.
|
|
63
73
|
*/
|
|
64
|
-
export type WillPropagateViewEvent =
|
|
74
|
+
export type WillPropagateViewEvent = WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent;
|
|
65
75
|
/**
|
|
66
76
|
* A View event.
|
|
67
77
|
*/
|
package/src/api/events/view.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for events that can be transmitted on an OpenFin View's EventEmitter.
|
|
4
|
+
*
|
|
5
|
+
* View events fall into two categories: propagated and non-propagated. Propagated events will
|
|
6
|
+
* be re-emitted on the parent window of the target view, prefixed with "view-". For example,
|
|
7
|
+
* the "shown" event will be re-emitted on the parent window as "view-shown". Non-propagated events
|
|
8
|
+
* will not be re-emitted on the parent window.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace for events shared by all OpenFin WebContents elements (i.e. windows, views, and frames).
|
|
3
|
+
*
|
|
4
|
+
* WebContents events are divided into two groups: propagating and non-propagating. Propagating events
|
|
5
|
+
* will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
|
|
6
|
+
* parent window, and propagating events in a window will also be emitted on the window's parent application.
|
|
7
|
+
*
|
|
8
|
+
* Non-propagating events will not re-emit on parent entities.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
1
12
|
import type * as OpenFin from '../../OpenFin';
|
|
2
13
|
import { NamedEvent } from './base';
|
|
3
14
|
import { CrashedEvent } from './application';
|
|
@@ -127,20 +138,20 @@ export type ContentCreationRulesEvent = NamedEvent & {
|
|
|
127
138
|
*/
|
|
128
139
|
url: string;
|
|
129
140
|
/**
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
* The features string passed to `window.open()`
|
|
142
|
+
*/
|
|
132
143
|
features: string;
|
|
133
144
|
/**
|
|
134
|
-
|
|
135
|
-
|
|
145
|
+
* The frame name passed to `window.open()`
|
|
146
|
+
*/
|
|
136
147
|
frameName: string;
|
|
137
148
|
/**
|
|
138
149
|
* The rule which triggered this event. May be undefined on `child-window-created` where no rule corresponds to the child Window creation
|
|
139
150
|
*/
|
|
140
151
|
rule: OpenFin.ContentCreationRule;
|
|
141
152
|
/**
|
|
142
|
-
|
|
143
|
-
|
|
153
|
+
* The features string passed to `window.open()` converted to OpenFin window options
|
|
154
|
+
*/
|
|
144
155
|
parsedFeatures: Partial<OpenFin.WindowOptions>;
|
|
145
156
|
disposition: string;
|
|
146
157
|
};
|
|
@@ -162,8 +173,8 @@ export type ChildContentOpenedInBrowserEvent = ContentCreationRulesEvent & {
|
|
|
162
173
|
export type ChildViewCreatedEvent = ContentCreationRulesEvent & {
|
|
163
174
|
type: 'child-view-created';
|
|
164
175
|
/**
|
|
165
|
-
|
|
166
|
-
|
|
176
|
+
* The options the child View was created with.
|
|
177
|
+
*/
|
|
167
178
|
childOptions: OpenFin.ViewOptions;
|
|
168
179
|
};
|
|
169
180
|
/**
|
|
@@ -172,8 +183,8 @@ export type ChildViewCreatedEvent = ContentCreationRulesEvent & {
|
|
|
172
183
|
export type ChildWindowCreatedEvent = ContentCreationRulesEvent & {
|
|
173
184
|
type: 'child-window-created';
|
|
174
185
|
/**
|
|
175
|
-
|
|
176
|
-
|
|
186
|
+
* The options the child Window was created with.
|
|
187
|
+
*/
|
|
177
188
|
childOptions: OpenFin.WindowOptions;
|
|
178
189
|
/**
|
|
179
190
|
* On `child-window-created` rule may be undefined.
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for events shared by all OpenFin WebContents elements (i.e. windows, views, and frames).
|
|
4
|
+
*
|
|
5
|
+
* WebContents events are divided into two groups: propagating and non-propagating. Propagating events
|
|
6
|
+
* will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
|
|
7
|
+
* parent window, and propagating events in a window will also be emitted on the window's parent application.
|
|
8
|
+
*
|
|
9
|
+
* Non-propagating events will not re-emit on parent entities.
|
|
10
|
+
*
|
|
11
|
+
* @packageDocumentation
|
|
12
|
+
*/
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Namespace for events that can be transmitted on an OpenFin Window's EventEmitter.
|
|
3
|
+
*
|
|
4
|
+
* Window events fall into two categories: propagated and non-propagated. Propagated events will
|
|
5
|
+
* be re-emitted on the parent application of the target window, prefixed with "window-". For example,
|
|
6
|
+
* a window's "reloaded" event will be re-emitted on the parent application as "window-reloaded". Non-propagated
|
|
7
|
+
* events will not be re-emitted on the parent application.
|
|
8
|
+
*
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
*/
|
|
1
11
|
import type * as OpenFin from '../../OpenFin';
|
|
2
12
|
import { NamedEvent, PropagatedEvent } from './base';
|
|
3
13
|
import { BaseViewEvent, PropagatedViewEvent, AttachedEvent as ViewAttachedEvent } from './view';
|
|
@@ -12,7 +22,66 @@ export type AlertRequestedEvent = NamedEvent & {
|
|
|
12
22
|
};
|
|
13
23
|
/**
|
|
14
24
|
* Generated when a window within this application requires credentials from the user.
|
|
15
|
-
* @remarks
|
|
25
|
+
* @remarks When a proxy exists, our default behavior shows an auth dialog, and asks users to enter their username and password.
|
|
26
|
+
* If you would like to change the default behavior, you can use the 'window-auth-requested' event to override it.
|
|
27
|
+
*
|
|
28
|
+
* Show customized auth dialog instead of default auth dialog:
|
|
29
|
+
* ```js
|
|
30
|
+
*
|
|
31
|
+
* // Sample code to create a login window. Users can create their own login pages
|
|
32
|
+
* async function createAuthUI(identity, loginPageUrl, authInfo) {
|
|
33
|
+
* const winName = 'my-auth-win-' + Date.now();
|
|
34
|
+
* const uriUuid = encodeURIComponent(identity.uuid);
|
|
35
|
+
* const uriName = encodeURIComponent(identity.name);
|
|
36
|
+
*
|
|
37
|
+
* const url = `http://${authInfo.host}:${authInfo.port}`;
|
|
38
|
+
* // login page should handle these query params
|
|
39
|
+
* loginPageUrl = `${loginPageUrl}?uuid=${uriUuid}&name=${uriName}&url=${url}`;
|
|
40
|
+
* await fin.Window.create({
|
|
41
|
+
* url: loginPageUrl,
|
|
42
|
+
* uuid: identity.uuid,
|
|
43
|
+
* name: winName,
|
|
44
|
+
* alwaysOnTop: true,
|
|
45
|
+
* autoShow: true,
|
|
46
|
+
* defaultCentered: true,
|
|
47
|
+
* defaultHeight: 271,
|
|
48
|
+
* defaultTop: true,
|
|
49
|
+
* defaultWidth: 362,
|
|
50
|
+
* frame: false,
|
|
51
|
+
* resizable: false
|
|
52
|
+
* });
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* const app = fin.Application.getCurrentSync();
|
|
56
|
+
* app.on('window-auth-requested', (event) => {
|
|
57
|
+
* if (event.authInfo.isProxy) {
|
|
58
|
+
* const identity = { uuid: event.uuid, name: event.name};
|
|
59
|
+
* createAuthUI(identity, 'userLoginPageUrl', event.authInfo);
|
|
60
|
+
* }
|
|
61
|
+
*
|
|
62
|
+
* });
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* Don't show any auth dialog:
|
|
66
|
+
* ```js
|
|
67
|
+
* const app = fin.Application.getCurrentSync();
|
|
68
|
+
* app.on('window-auth-requested', event => {
|
|
69
|
+
* if (event.authInfo.isProxy) {
|
|
70
|
+
* console.log('no auth dialog');
|
|
71
|
+
* }
|
|
72
|
+
* });
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* User defined function. For example, showing a single dialog, alerting a support team and so on:
|
|
76
|
+
* ```js
|
|
77
|
+
* const app = fin.Application.getCurrentSync();
|
|
78
|
+
* app.on('window-auth-requested', event => {
|
|
79
|
+
* if (event.authInfo.isProxy) {
|
|
80
|
+
* // user defined function
|
|
81
|
+
* alert('Do whatever you like');
|
|
82
|
+
* }
|
|
83
|
+
* });
|
|
84
|
+
* ```
|
|
16
85
|
*/
|
|
17
86
|
export type AuthRequestedEvent = NamedEvent & {
|
|
18
87
|
type: 'auth-requested';
|
package/src/api/events/window.js
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Namespace for events that can be transmitted on an OpenFin Window's EventEmitter.
|
|
4
|
+
*
|
|
5
|
+
* Window events fall into two categories: propagated and non-propagated. Propagated events will
|
|
6
|
+
* be re-emitted on the parent application of the target window, prefixed with "window-". For example,
|
|
7
|
+
* a window's "reloaded" event will be re-emitted on the parent application as "window-reloaded". Non-propagated
|
|
8
|
+
* events will not be re-emitted on the parent application.
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
*/
|
|
2
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type * as OpenFin from '../../OpenFin';
|
|
2
2
|
import { Base } from '../base';
|
|
3
|
-
/**
|
|
4
|
-
* @lends ExternalApplication
|
|
5
|
-
*/
|
|
6
3
|
export default class ExternalApplicationModule extends Base {
|
|
7
4
|
/**
|
|
8
5
|
* Asynchronously returns an External Application object that represents an external application.
|
|
9
6
|
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
10
7
|
* provided its uuid is already known.
|
|
11
|
-
* @param
|
|
12
|
-
*
|
|
13
|
-
* @
|
|
8
|
+
* @param uuid The UUID of the external application to be wrapped
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```js
|
|
12
|
+
* fin.ExternalApplication.wrap('javaApp-uuid');
|
|
13
|
+
* .then(extApp => console.log('wrapped external application'))
|
|
14
|
+
* .catch(err => console.log(err));
|
|
15
|
+
* ```
|
|
14
16
|
* @static
|
|
15
17
|
*/
|
|
16
18
|
wrap(uuid: string): Promise<OpenFin.ExternalApplication>;
|
|
@@ -18,9 +20,14 @@ export default class ExternalApplicationModule extends Base {
|
|
|
18
20
|
* Synchronously returns an External Application object that represents an external application.
|
|
19
21
|
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
20
22
|
* provided its uuid is already known.
|
|
21
|
-
* @param
|
|
22
|
-
*
|
|
23
|
-
* @
|
|
23
|
+
* @param uuid The UUID of the external application to be wrapped
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* const extApp = fin.ExternalApplication.wrapSync('javaApp-uuid');
|
|
28
|
+
* const info = await extApp.getInfo();
|
|
29
|
+
* console.log(info);
|
|
30
|
+
* ```
|
|
24
31
|
* @static
|
|
25
32
|
*/
|
|
26
33
|
wrapSync(uuid: string): OpenFin.ExternalApplication;
|
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const base_1 = require("../base");
|
|
4
4
|
const Instance_1 = require("./Instance");
|
|
5
|
-
/**
|
|
6
|
-
* @lends ExternalApplication
|
|
7
|
-
*/
|
|
8
5
|
class ExternalApplicationModule extends base_1.Base {
|
|
9
6
|
/**
|
|
10
7
|
* Asynchronously returns an External Application object that represents an external application.
|
|
11
8
|
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
12
9
|
* provided its uuid is already known.
|
|
13
|
-
* @param
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
10
|
+
* @param uuid The UUID of the external application to be wrapped
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```js
|
|
14
|
+
* fin.ExternalApplication.wrap('javaApp-uuid');
|
|
15
|
+
* .then(extApp => console.log('wrapped external application'))
|
|
16
|
+
* .catch(err => console.log(err));
|
|
17
|
+
* ```
|
|
16
18
|
* @static
|
|
17
19
|
*/
|
|
18
20
|
wrap(uuid) {
|
|
@@ -25,9 +27,14 @@ class ExternalApplicationModule extends base_1.Base {
|
|
|
25
27
|
* Synchronously returns an External Application object that represents an external application.
|
|
26
28
|
* <br>It is possible to wrap a process that does not yet exist, (for example, to listen for startup-related events)
|
|
27
29
|
* provided its uuid is already known.
|
|
28
|
-
* @param
|
|
29
|
-
*
|
|
30
|
-
* @
|
|
30
|
+
* @param uuid The UUID of the external application to be wrapped
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```js
|
|
34
|
+
* const extApp = fin.ExternalApplication.wrapSync('javaApp-uuid');
|
|
35
|
+
* const info = await extApp.getInfo();
|
|
36
|
+
* console.log(info);
|
|
37
|
+
* ```
|
|
31
38
|
* @static
|
|
32
39
|
*/
|
|
33
40
|
wrapSync(uuid) {
|
|
@@ -2,26 +2,27 @@ import type * as OpenFin from '../../OpenFin';
|
|
|
2
2
|
import { EmitterBase } from '../base';
|
|
3
3
|
import { Transport } from '../../transport/transport';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* the developer to listen to
|
|
5
|
+
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
6
|
+
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
|
7
7
|
* Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
|
|
8
8
|
*
|
|
9
9
|
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
|
10
10
|
* - Processes which have connected to an OpenFin runtime via an adapter
|
|
11
11
|
* - Processes started via `System.launchExternalApplication`
|
|
12
12
|
* - Processes monitored via `System.monitorExternalProcess`
|
|
13
|
-
* @class
|
|
14
|
-
* @hideconstructor
|
|
15
13
|
*/
|
|
16
14
|
export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApplicationEvent> {
|
|
17
15
|
identity: OpenFin.ApplicationIdentity;
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
18
19
|
constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
|
|
19
20
|
/**
|
|
20
21
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
21
|
-
* @param
|
|
22
|
-
* @param
|
|
23
|
-
* @param
|
|
24
|
-
*
|
|
22
|
+
* @param eventType - The type of the event.
|
|
23
|
+
* @param listener - Called whenever an event of the specified type occurs.
|
|
24
|
+
* @param options - Option to support event timestamps.
|
|
25
|
+
*
|
|
25
26
|
* @function addListener
|
|
26
27
|
* @memberof ExternalApplication
|
|
27
28
|
* @instance
|
|
@@ -29,10 +30,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
29
30
|
*/
|
|
30
31
|
/**
|
|
31
32
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
32
|
-
* @param
|
|
33
|
-
* @param
|
|
34
|
-
* @param
|
|
35
|
-
*
|
|
33
|
+
* @param eventType - The type of the event.
|
|
34
|
+
* @param listener - Called whenever an event of the specified type occurs.
|
|
35
|
+
* @param options - Option to support event timestamps.
|
|
36
|
+
*
|
|
36
37
|
* @function on
|
|
37
38
|
* @memberof ExternalApplication
|
|
38
39
|
* @instance
|
|
@@ -40,10 +41,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
40
41
|
*/
|
|
41
42
|
/**
|
|
42
43
|
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
43
|
-
* @param
|
|
44
|
-
* @param
|
|
45
|
-
* @param
|
|
46
|
-
*
|
|
44
|
+
* @param eventType - The type of the event.
|
|
45
|
+
* @param listener - The callback function.
|
|
46
|
+
* @param options - Option to support event timestamps.
|
|
47
|
+
*
|
|
47
48
|
* @function once
|
|
48
49
|
* @memberof ExternalApplication
|
|
49
50
|
* @instance
|
|
@@ -51,10 +52,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
51
52
|
*/
|
|
52
53
|
/**
|
|
53
54
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
54
|
-
* @param
|
|
55
|
-
* @param
|
|
56
|
-
* @param
|
|
57
|
-
*
|
|
55
|
+
* @param eventType - The type of the event.
|
|
56
|
+
* @param listener - The callback function.
|
|
57
|
+
* @param options - Option to support event timestamps.
|
|
58
|
+
*
|
|
58
59
|
* @function prependListener
|
|
59
60
|
* @memberof ExternalApplication
|
|
60
61
|
* @instance
|
|
@@ -63,10 +64,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
63
64
|
/**
|
|
64
65
|
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
|
65
66
|
* The listener is added to the beginning of the listeners array.
|
|
66
|
-
* @param
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
69
|
-
*
|
|
67
|
+
* @param eventType - The type of the event.
|
|
68
|
+
* @param listener - The callback function.
|
|
69
|
+
* @param options - Option to support event timestamps.
|
|
70
|
+
*
|
|
70
71
|
* @function prependOnceListener
|
|
71
72
|
* @memberof ExternalApplication
|
|
72
73
|
* @instance
|
|
@@ -75,10 +76,10 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
75
76
|
/**
|
|
76
77
|
* Remove a listener from the listener array for the specified event.
|
|
77
78
|
* Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
78
|
-
* @param
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
81
|
-
*
|
|
79
|
+
* @param eventType - The type of the event.
|
|
80
|
+
* @param listener - The callback function.
|
|
81
|
+
* @param options - Option to support event timestamps.
|
|
82
|
+
*
|
|
82
83
|
* @function removeListener
|
|
83
84
|
* @memberof ExternalApplication
|
|
84
85
|
* @instance
|
|
@@ -86,8 +87,8 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
86
87
|
*/
|
|
87
88
|
/**
|
|
88
89
|
* Removes all listeners, or those of the specified event.
|
|
89
|
-
* @param
|
|
90
|
-
*
|
|
90
|
+
* @param eventType - The type of the event.
|
|
91
|
+
*
|
|
91
92
|
* @function removeAllListeners
|
|
92
93
|
* @memberof ExternalApplication
|
|
93
94
|
* @instance
|
|
@@ -95,8 +96,15 @@ export declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApp
|
|
|
95
96
|
*/
|
|
96
97
|
/**
|
|
97
98
|
* Retrieves information about the external application.
|
|
98
|
-
*
|
|
99
|
-
* @
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```js
|
|
102
|
+
* async function getInfo() {
|
|
103
|
+
* const extApp = await fin.ExternalApplication.wrap('javaApp-uuid');
|
|
104
|
+
* return await extApp.getInfo();
|
|
105
|
+
* }
|
|
106
|
+
* getInfo().then(info => console.log(info)).catch(err => console.log(err));
|
|
107
|
+
* ```
|
|
100
108
|
*/
|
|
101
109
|
getInfo(): Promise<OpenFin.ExternalApplicationInfo>;
|
|
102
110
|
}
|