@openfin/core 33.77.1 → 33.77.2
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/out/mock-alpha.d.ts +1727 -455
- package/out/mock-beta.d.ts +1727 -455
- package/out/mock-public.d.ts +1727 -455
- package/out/mock.d.ts +1738 -448
- package/out/mock.js +765 -303
- package/package.json +1 -1
package/out/mock.js
CHANGED
|
@@ -10,7 +10,240 @@ var mock = {};
|
|
|
10
10
|
|
|
11
11
|
var OpenFin$1 = {};
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
var events$1 = {};
|
|
14
|
+
|
|
15
|
+
var application$1 = {};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Namespace for events that can be emitted by an {@link OpenFin.Application}. Includes events
|
|
19
|
+
* re-propagated from the {@link OpenFin.Window} (and, transitively, {@link OpenFin.View}) level, prefixed with `window-` (and also, if applicable, `view-`).
|
|
20
|
+
* For example, a view's "attached" event will fire as 'window-view-attached' at the application level.
|
|
21
|
+
*
|
|
22
|
+
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
23
|
+
*
|
|
24
|
+
* This namespace contains only payload shapes for events that are unique to `Application`. Events that propagate to `Application` from
|
|
25
|
+
* child {@link OpenFin.Window windows} and {@link OpenFin.View views} are defined in the {@link OpenFin.WindowEvents} and
|
|
26
|
+
* {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all* application events, see {@link Application.on Application.on}.
|
|
27
|
+
*
|
|
28
|
+
* {@link WillPropagateApplicationEvent Bespoke application events} re-propagate to the system level, prefixed with `application-`. For example,
|
|
29
|
+
* the `closed` event will fire as `application-closed` at the system level. Propagated events from {@link PropagatedWindowEvent windows}
|
|
30
|
+
* and {@link PropagatedViewEvent views} within an application will *not* transitively re-propagate to the system level, because they are already
|
|
31
|
+
* visible at the system level and contain the identity of the application.
|
|
32
|
+
*
|
|
33
|
+
* @packageDocumentation
|
|
34
|
+
*/
|
|
35
|
+
Object.defineProperty(application$1, "__esModule", { value: true });
|
|
36
|
+
|
|
37
|
+
var base$1 = {};
|
|
38
|
+
|
|
39
|
+
Object.defineProperty(base$1, "__esModule", { value: true });
|
|
40
|
+
|
|
41
|
+
var externalApplication$1 = {};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Namespace for events that can be transmitted by an {@link OpenFin.ExternalApplication}.
|
|
45
|
+
*
|
|
46
|
+
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
47
|
+
*
|
|
48
|
+
* For a list of valid string keys for external application events, see {@link ExternalApplication.on ExternalApplication.on}.
|
|
49
|
+
*
|
|
50
|
+
* @packageDocumentation
|
|
51
|
+
*/
|
|
52
|
+
Object.defineProperty(externalApplication$1, "__esModule", { value: true });
|
|
53
|
+
|
|
54
|
+
var frame$1 = {};
|
|
55
|
+
|
|
56
|
+
Object.defineProperty(frame$1, "__esModule", { value: true });
|
|
57
|
+
|
|
58
|
+
var globalHotkey$1 = {};
|
|
59
|
+
|
|
60
|
+
Object.defineProperty(globalHotkey$1, "__esModule", { value: true });
|
|
61
|
+
|
|
62
|
+
var platform$1 = {};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* Namespace for events that can emitted by a {@link OpenFin.Platform}.
|
|
67
|
+
*
|
|
68
|
+
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
69
|
+
*
|
|
70
|
+
* The Platform `EventEmitter` is a superset of the {@link OpenFin.Application} `EventEmitter`,
|
|
71
|
+
* meaning it can listen to all {@link OpenFin.ApplicationEvents Application events} in addition to the
|
|
72
|
+
* Platform-specific events listed here. For a list of valid string keys for *all* platform events, see
|
|
73
|
+
* {@link Platform.on Platform.on}.
|
|
74
|
+
*
|
|
75
|
+
* @packageDocumentation
|
|
76
|
+
*/
|
|
77
|
+
Object.defineProperty(platform$1, "__esModule", { value: true });
|
|
78
|
+
|
|
79
|
+
var system$1 = {};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Namespace for runtime-wide OpenFin events emitted by {@link System.System}. Includes events
|
|
83
|
+
* re-propagated from {@link OpenFin.Application}, {@link OpenFin.Window}, and {@link OpenFin.View} (prefixed with `application-`, `window-`, and `view-`). All
|
|
84
|
+
* event propagations are visible at the System level. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
|
|
85
|
+
* transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
|
|
86
|
+
* of the application. For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
|
|
87
|
+
* will be visible as 'view-shown' at the system level, but *not* as `application-window-view-shown`.
|
|
88
|
+
*
|
|
89
|
+
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
90
|
+
*
|
|
91
|
+
* This namespace contains only payload shapes for events that are unique to `System`. Events that propagate to `System` from
|
|
92
|
+
* child {@link OpenFin.Application applications}, {@link OpenFin.Window windows}, and {@link OpenFin.View views} are defined in the
|
|
93
|
+
* {@link OpenFin.ApplicationEvents}, {@link OpenFin.WindowEvents}, and {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all*
|
|
94
|
+
* system events, see {@link System.on System.on}.
|
|
95
|
+
*
|
|
96
|
+
* @packageDocumentation
|
|
97
|
+
*/
|
|
98
|
+
Object.defineProperty(system$1, "__esModule", { value: true });
|
|
99
|
+
|
|
100
|
+
var view$1 = {};
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Namespace for events that can be emitted by a {@link OpenFin.View}.
|
|
104
|
+
*
|
|
105
|
+
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
106
|
+
*
|
|
107
|
+
* This namespace contains only payload shapes for events that are unique to `View`. Events that are shared between all `WebContents`
|
|
108
|
+
* (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. For a list
|
|
109
|
+
* of valid string keys for *all* View events, see {@link View.on View.on}.
|
|
110
|
+
*
|
|
111
|
+
* View events fall into two categories: {@link WillPropagateViewEvent} and {@link NonPropagatedViewEvent}. Propagated events will
|
|
112
|
+
* be re-emitted on the parent {@link OpenFin.Window} of the target view, prefixed with "view-". For example,
|
|
113
|
+
* the "shown" event will be re-emitted on the parent window as "view-shown". Non-propagated events
|
|
114
|
+
* will not be re-emitted on the parent window.
|
|
115
|
+
*
|
|
116
|
+
* @packageDocumentation
|
|
117
|
+
*/
|
|
118
|
+
Object.defineProperty(view$1, "__esModule", { value: true });
|
|
119
|
+
|
|
120
|
+
var webcontents = {};
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Namespace for events shared by all OpenFin WebContents elements (i.e. {@link OpenFin.Window},
|
|
124
|
+
* {@link OpenFin.View}).
|
|
125
|
+
*
|
|
126
|
+
* WebContents events are divided into two groups: {@link WillPropagateWebContentsEvent} and {@link NonPropagatedWebContentsEvent}. Propagating events
|
|
127
|
+
* will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
|
|
128
|
+
* parent window, and propagating events in a window will also be emitted on the window's parent {@link OpenFin.Application}.
|
|
129
|
+
*
|
|
130
|
+
* Non-propagating events will not re-emit on parent entities.
|
|
131
|
+
*
|
|
132
|
+
* @packageDocumentation
|
|
133
|
+
*/
|
|
134
|
+
Object.defineProperty(webcontents, "__esModule", { value: true });
|
|
135
|
+
|
|
136
|
+
var window$2 = {};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
*
|
|
140
|
+
* Namespace for events that can be emitted by a {@link OpenFin.Window}.
|
|
141
|
+
*
|
|
142
|
+
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
143
|
+
*
|
|
144
|
+
* This namespace contains only payload shapes for events that are unique to `Window`. Events that are shared between all `WebContents`
|
|
145
|
+
* (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. Events that
|
|
146
|
+
* propagate from `View` are defined in {@link OpenFin.ViewEvents}. For a list of valid string keys for *all* Window events, see
|
|
147
|
+
* {@link Window.on Window.on}
|
|
148
|
+
*
|
|
149
|
+
* Window events fall into two categories: {@link WillPropagateWindowEvent} and {@link NonPropagatedWindowEvent}.
|
|
150
|
+
* Propagated events will be re-emitted on the parent {@link OpenFin.Application} of the target window, prefixed with "window-". For example,
|
|
151
|
+
* a window's "reloaded" event will be re-emitted on the parent application as "window-reloaded". Non-propagated
|
|
152
|
+
* events will not be re-emitted on the parent application.
|
|
153
|
+
*
|
|
154
|
+
* @packageDocumentation
|
|
155
|
+
*/
|
|
156
|
+
Object.defineProperty(window$2, "__esModule", { value: true });
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Namespace for OpenFin event types. Each entity that emits OpenFin events has its own sub-namespace. Event payloads
|
|
160
|
+
* themselves are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
|
161
|
+
*
|
|
162
|
+
* #### Event emitters
|
|
163
|
+
*
|
|
164
|
+
* The following entities emit OpenFin events, and have corresponding sub-namespaces:
|
|
165
|
+
*
|
|
166
|
+
* * {@link OpenFin.Application}: {@link OpenFin.ApplicationEvents}
|
|
167
|
+
* * {@link OpenFin.ExternalApplication}: {@link OpenFin.ExternalApplicationEvents}
|
|
168
|
+
* * {@link OpenFin.Frame}: {@link OpenFin.FrameEvents}
|
|
169
|
+
* * {@link OpenFin.GlobalHotkey}: {@link OpenFin.GlobalHotkeyEvents}
|
|
170
|
+
* * {@link OpenFin.Platform}: {@link OpenFin.PlatformEvents}
|
|
171
|
+
* * {@link OpenFin.System}: {@link OpenFin.SystemEvents}
|
|
172
|
+
* * {@link OpenFin.View}: {@link OpenFin.ViewEvents}
|
|
173
|
+
* * {@link OpenFin.Window}: {@link OpenFin.WindowEvents}
|
|
174
|
+
*
|
|
175
|
+
* These `EventEmitter` entities share a common set of methods for interacting with the OpenFin event bus, which can be
|
|
176
|
+
* seen on the individual documentation pages for each entity type.
|
|
177
|
+
*
|
|
178
|
+
* Registering event handlers is an asynchronous operation. It is important to ensure that the returned Promises are awaited to reduce the
|
|
179
|
+
* risk of race conditions.
|
|
180
|
+
*
|
|
181
|
+
* When the `EventEmitter` receives an event from the browser process and emits on the renderer, all of the functions attached to that
|
|
182
|
+
* specific event are called synchronously. Any values returned by the called listeners are ignored and will be discarded. If the window document
|
|
183
|
+
* is destroyed by page navigation or reload, its registered event listeners will be removed.
|
|
184
|
+
*
|
|
185
|
+
* We recommend using Arrow Functions for event listeners to ensure the this scope is consistent with the original function context.
|
|
186
|
+
*
|
|
187
|
+
* Events re-propagate from smaller/more-local scopes to larger/more-global scopes. For example, an event emitted on a specific
|
|
188
|
+
* view will propagate to the window in which the view is embedded, and then to the application in which the window is running, and
|
|
189
|
+
* finally to the OpenFin runtime itself at the "system" level. For details on propagation semantics, see the namespace for
|
|
190
|
+
* the propagating (or propagated-to) entity.
|
|
191
|
+
*
|
|
192
|
+
* @packageDocumentation
|
|
193
|
+
*/
|
|
194
|
+
Object.defineProperty(events$1, "__esModule", { value: true });
|
|
195
|
+
events$1.WindowEvents = events$1.WebContentsEvents = events$1.ViewEvents = events$1.SystemEvents = events$1.PlatformEvents = events$1.GlobalHotkeyEvents = events$1.FrameEvents = events$1.ExternalApplicationEvents = events$1.BaseEvents = events$1.ApplicationEvents = void 0;
|
|
196
|
+
const ApplicationEvents = application$1;
|
|
197
|
+
events$1.ApplicationEvents = ApplicationEvents;
|
|
198
|
+
const BaseEvents = base$1;
|
|
199
|
+
events$1.BaseEvents = BaseEvents;
|
|
200
|
+
const ExternalApplicationEvents = externalApplication$1;
|
|
201
|
+
events$1.ExternalApplicationEvents = ExternalApplicationEvents;
|
|
202
|
+
const FrameEvents = frame$1;
|
|
203
|
+
events$1.FrameEvents = FrameEvents;
|
|
204
|
+
const GlobalHotkeyEvents = globalHotkey$1;
|
|
205
|
+
events$1.GlobalHotkeyEvents = GlobalHotkeyEvents;
|
|
206
|
+
const PlatformEvents = platform$1;
|
|
207
|
+
events$1.PlatformEvents = PlatformEvents;
|
|
208
|
+
const SystemEvents = system$1;
|
|
209
|
+
events$1.SystemEvents = SystemEvents;
|
|
210
|
+
const ViewEvents = view$1;
|
|
211
|
+
events$1.ViewEvents = ViewEvents;
|
|
212
|
+
const WebContentsEvents = webcontents;
|
|
213
|
+
events$1.WebContentsEvents = WebContentsEvents;
|
|
214
|
+
const WindowEvents = window$2;
|
|
215
|
+
events$1.WindowEvents = WindowEvents;
|
|
216
|
+
|
|
217
|
+
(function (exports) {
|
|
218
|
+
/**
|
|
219
|
+
* Top-level namespace for types referenced by the OpenFin API. Contains:
|
|
220
|
+
*
|
|
221
|
+
* * The type of the global `fin` entry point ({@link FinApi})
|
|
222
|
+
* * Classes that act as static namespaces returned from the `fin` global (e.g. {@link ApplicationModule}, accessible via `fin.Application`)
|
|
223
|
+
* * Instance classes that are returned from API calls (e.g. {@link Application}, accessible via `fin.Application.getCurrentSync()`)
|
|
224
|
+
* * Parameter shapes for API methods (e.g. {@link ApplicationOptions}, used in `fin.Application.start()`)
|
|
225
|
+
* * Event namespaces and payload union types (e.g. {@link ApplicationEvents} and {@link ApplicationEvent})
|
|
226
|
+
*
|
|
227
|
+
* @packageDocumentation
|
|
228
|
+
*/
|
|
229
|
+
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
230
|
+
if (k2 === undefined) k2 = k;
|
|
231
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
232
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
233
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
234
|
+
}
|
|
235
|
+
Object.defineProperty(o, k2, desc);
|
|
236
|
+
}) : (function(o, m, k, k2) {
|
|
237
|
+
if (k2 === undefined) k2 = k;
|
|
238
|
+
o[k2] = m[k];
|
|
239
|
+
}));
|
|
240
|
+
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
241
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
242
|
+
};
|
|
243
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
244
|
+
// Deprecated shim to preserve v30 namespace names
|
|
245
|
+
__exportStar(events$1, exports);
|
|
246
|
+
} (OpenFin$1));
|
|
14
247
|
|
|
15
248
|
var fin = {};
|
|
16
249
|
|
|
@@ -561,6 +794,13 @@ class Base {
|
|
|
561
794
|
get fin() {
|
|
562
795
|
return this.wire.getFin();
|
|
563
796
|
}
|
|
797
|
+
/**
|
|
798
|
+
* Provides access to the OpenFin representation of the current code context (usually a document
|
|
799
|
+
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
|
800
|
+
*
|
|
801
|
+
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
|
802
|
+
* on the context in which the devtools panel was opened.
|
|
803
|
+
*/
|
|
564
804
|
get me() {
|
|
565
805
|
return this.wire.me;
|
|
566
806
|
}
|
|
@@ -595,6 +835,9 @@ class EmitterBase extends Base {
|
|
|
595
835
|
this.topic = topic;
|
|
596
836
|
_EmitterBase_emitterAccessor.set(this, void 0);
|
|
597
837
|
this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
|
|
838
|
+
/**
|
|
839
|
+
* @internal
|
|
840
|
+
*/
|
|
598
841
|
this.emit = (eventType, payload, ...args) => {
|
|
599
842
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
|
600
843
|
};
|
|
@@ -637,16 +880,13 @@ class EmitterBase extends Base {
|
|
|
637
880
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
|
638
881
|
return Promise.resolve();
|
|
639
882
|
};
|
|
640
|
-
this.addListener = this.on;
|
|
641
883
|
__classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
|
642
884
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
|
643
885
|
}
|
|
644
886
|
/**
|
|
645
887
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
646
888
|
*
|
|
647
|
-
* @
|
|
648
|
-
* @param listener
|
|
649
|
-
* @param options
|
|
889
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
|
650
890
|
*/
|
|
651
891
|
async on(eventType, listener, options) {
|
|
652
892
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
@@ -656,12 +896,16 @@ class EmitterBase extends Base {
|
|
|
656
896
|
});
|
|
657
897
|
return this;
|
|
658
898
|
}
|
|
899
|
+
/**
|
|
900
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
901
|
+
*/
|
|
902
|
+
async addListener(eventType, listener, options) {
|
|
903
|
+
return this.on(eventType, listener, options);
|
|
904
|
+
}
|
|
659
905
|
/**
|
|
660
906
|
* 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.
|
|
661
907
|
*
|
|
662
|
-
* @
|
|
663
|
-
* @param listener
|
|
664
|
-
* @param options
|
|
908
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
|
665
909
|
*/
|
|
666
910
|
async once(eventType, listener, options) {
|
|
667
911
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
@@ -677,9 +921,7 @@ class EmitterBase extends Base {
|
|
|
677
921
|
/**
|
|
678
922
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
|
679
923
|
*
|
|
680
|
-
* @
|
|
681
|
-
* @param listener
|
|
682
|
-
* @param options
|
|
924
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
|
683
925
|
*/
|
|
684
926
|
async prependListener(eventType, listener, options) {
|
|
685
927
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
@@ -693,9 +935,7 @@ class EmitterBase extends Base {
|
|
|
693
935
|
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired,
|
|
694
936
|
* after which it is removed. The listener is added to the beginning of the listeners array.
|
|
695
937
|
*
|
|
696
|
-
* @
|
|
697
|
-
* @param listener
|
|
698
|
-
* @param options
|
|
938
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
|
699
939
|
*/
|
|
700
940
|
async prependOnceListener(eventType, listener, options) {
|
|
701
941
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
@@ -712,10 +952,6 @@ class EmitterBase extends Base {
|
|
|
712
952
|
* Remove a listener from the listener array for the specified event.
|
|
713
953
|
*
|
|
714
954
|
* @remarks Caution: Calling this method changes the array indices in the listener array behind the listener.
|
|
715
|
-
*
|
|
716
|
-
* @param eventType
|
|
717
|
-
* @param listener
|
|
718
|
-
* @param options
|
|
719
955
|
*/
|
|
720
956
|
async removeListener(eventType, listener, options) {
|
|
721
957
|
const emitter = await this.deregisterEventListener(eventType, options);
|
|
@@ -742,7 +978,6 @@ class EmitterBase extends Base {
|
|
|
742
978
|
/**
|
|
743
979
|
* Removes all listeners, or those of the specified event.
|
|
744
980
|
*
|
|
745
|
-
* @param eventType
|
|
746
981
|
*/
|
|
747
982
|
async removeAllListeners(eventType) {
|
|
748
983
|
const removeByEvent = async (event) => {
|
|
@@ -889,9 +1124,13 @@ function requireFactory$3 () {
|
|
|
889
1124
|
if (hasRequiredFactory$3) return Factory$6;
|
|
890
1125
|
hasRequiredFactory$3 = 1;
|
|
891
1126
|
Object.defineProperty(Factory$6, "__esModule", { value: true });
|
|
1127
|
+
Factory$6.ViewModule = void 0;
|
|
892
1128
|
const base_1 = base;
|
|
893
1129
|
const validate_1 = validate;
|
|
894
1130
|
const index_1 = requireView();
|
|
1131
|
+
/**
|
|
1132
|
+
* Static namespace for OpenFin API methods that interact with the {@link View} class, available under `fin.View`.
|
|
1133
|
+
*/
|
|
895
1134
|
class ViewModule extends base_1.Base {
|
|
896
1135
|
/**
|
|
897
1136
|
* Creates a new View.
|
|
@@ -920,7 +1159,6 @@ function requireFactory$3 () {
|
|
|
920
1159
|
* ```
|
|
921
1160
|
* Note that created views needs to navigate somewhere for them to actually render a website.
|
|
922
1161
|
* @experimental
|
|
923
|
-
* @static
|
|
924
1162
|
*/
|
|
925
1163
|
async create(options) {
|
|
926
1164
|
const { uuid } = this.wire.me;
|
|
@@ -940,7 +1178,6 @@ function requireFactory$3 () {
|
|
|
940
1178
|
}
|
|
941
1179
|
/**
|
|
942
1180
|
* Asynchronously returns a View object that represents an existing view.
|
|
943
|
-
* @param identity
|
|
944
1181
|
*
|
|
945
1182
|
* @example
|
|
946
1183
|
* ```js
|
|
@@ -949,7 +1186,6 @@ function requireFactory$3 () {
|
|
|
949
1186
|
* .catch(err => console.log(err));
|
|
950
1187
|
* ```
|
|
951
1188
|
* @experimental
|
|
952
|
-
* @static
|
|
953
1189
|
*/
|
|
954
1190
|
async wrap(identity) {
|
|
955
1191
|
this.wire.sendAction('view-wrap');
|
|
@@ -961,7 +1197,6 @@ function requireFactory$3 () {
|
|
|
961
1197
|
}
|
|
962
1198
|
/**
|
|
963
1199
|
* Synchronously returns a View object that represents an existing view.
|
|
964
|
-
* @param identity
|
|
965
1200
|
*
|
|
966
1201
|
* @example
|
|
967
1202
|
* ```js
|
|
@@ -969,7 +1204,6 @@ function requireFactory$3 () {
|
|
|
969
1204
|
* await view.hide();
|
|
970
1205
|
* ```
|
|
971
1206
|
* @experimental
|
|
972
|
-
* @static
|
|
973
1207
|
*/
|
|
974
1208
|
wrapSync(identity) {
|
|
975
1209
|
this.wire.sendAction('view-wrap-sync').catch((e) => {
|
|
@@ -992,7 +1226,6 @@ function requireFactory$3 () {
|
|
|
992
1226
|
*
|
|
993
1227
|
* ```
|
|
994
1228
|
* @experimental
|
|
995
|
-
* @static
|
|
996
1229
|
*/
|
|
997
1230
|
getCurrent() {
|
|
998
1231
|
this.wire.sendAction('view-get-current').catch((e) => {
|
|
@@ -1014,7 +1247,6 @@ function requireFactory$3 () {
|
|
|
1014
1247
|
*
|
|
1015
1248
|
* ```
|
|
1016
1249
|
* @experimental
|
|
1017
|
-
* @static
|
|
1018
1250
|
*/
|
|
1019
1251
|
getCurrentSync() {
|
|
1020
1252
|
this.wire.sendAction('view-get-current-sync').catch((e) => {
|
|
@@ -1027,7 +1259,7 @@ function requireFactory$3 () {
|
|
|
1027
1259
|
return this.wrapSync({ uuid, name });
|
|
1028
1260
|
}
|
|
1029
1261
|
}
|
|
1030
|
-
Factory$6.
|
|
1262
|
+
Factory$6.ViewModule = ViewModule;
|
|
1031
1263
|
return Factory$6;
|
|
1032
1264
|
}
|
|
1033
1265
|
|
|
@@ -1859,6 +2091,10 @@ Object.defineProperty(main, "__esModule", { value: true });
|
|
|
1859
2091
|
main.WebContents = void 0;
|
|
1860
2092
|
const base_1$k = base;
|
|
1861
2093
|
class WebContents extends base_1$k.EmitterBase {
|
|
2094
|
+
/**
|
|
2095
|
+
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
2096
|
+
* @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
2097
|
+
*/
|
|
1862
2098
|
constructor(wire, identity, entityType) {
|
|
1863
2099
|
super(wire, entityType, identity.uuid, identity.name);
|
|
1864
2100
|
this.identity = identity;
|
|
@@ -1866,10 +2102,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1866
2102
|
}
|
|
1867
2103
|
/**
|
|
1868
2104
|
* Gets a base64 encoded image of all or part of the WebContents.
|
|
1869
|
-
* @function capturePage
|
|
1870
2105
|
* @param options Options for the capturePage call.
|
|
1871
|
-
* @memberOf View
|
|
1872
|
-
* @instance
|
|
1873
2106
|
*
|
|
1874
2107
|
* @example
|
|
1875
2108
|
*
|
|
@@ -1914,6 +2147,11 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1914
2147
|
* }
|
|
1915
2148
|
* console.log(await wnd.capturePage(options));
|
|
1916
2149
|
* ```
|
|
2150
|
+
*
|
|
2151
|
+
* @remarks
|
|
2152
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2153
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2154
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1917
2155
|
*/
|
|
1918
2156
|
capturePage(options) {
|
|
1919
2157
|
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
|
@@ -1922,9 +2160,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1922
2160
|
* Executes Javascript on the WebContents, restricted to contents you own or contents owned by
|
|
1923
2161
|
* applications you have created.
|
|
1924
2162
|
* @param code JavaScript code to be executed on the view.
|
|
1925
|
-
* @function executeJavaScript
|
|
1926
|
-
* @memberOf View
|
|
1927
|
-
* @instance
|
|
1928
2163
|
*
|
|
1929
2164
|
* @example
|
|
1930
2165
|
* View:
|
|
@@ -1952,6 +2187,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1952
2187
|
*
|
|
1953
2188
|
* executeJavaScript(`console.log('Hello, Openfin')`).then(() => console.log('Javascript excuted')).catch(err => console.log(err));
|
|
1954
2189
|
* ```
|
|
2190
|
+
* @remarks
|
|
2191
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2192
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2193
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1955
2194
|
*/
|
|
1956
2195
|
executeJavaScript(code) {
|
|
1957
2196
|
return this.wire
|
|
@@ -1960,9 +2199,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1960
2199
|
}
|
|
1961
2200
|
/**
|
|
1962
2201
|
* Returns the zoom level of the WebContents.
|
|
1963
|
-
* @function getZoomLevel
|
|
1964
|
-
* @memberOf View
|
|
1965
|
-
* @instance
|
|
1966
2202
|
*
|
|
1967
2203
|
* @example
|
|
1968
2204
|
* View:
|
|
@@ -1994,6 +2230,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
1994
2230
|
*
|
|
1995
2231
|
* getZoomLevel().then(zoomLevel => console.log(zoomLevel)).catch(err => console.log(err));
|
|
1996
2232
|
* ```
|
|
2233
|
+
* @remarks
|
|
2234
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2235
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2236
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
1997
2237
|
*/
|
|
1998
2238
|
getZoomLevel() {
|
|
1999
2239
|
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
|
@@ -2001,9 +2241,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2001
2241
|
/**
|
|
2002
2242
|
* Sets the zoom level of the WebContents.
|
|
2003
2243
|
* @param level The zoom level
|
|
2004
|
-
* @function setZoomLevel
|
|
2005
|
-
* @memberOf View
|
|
2006
|
-
* @instance
|
|
2007
2244
|
*
|
|
2008
2245
|
* @example
|
|
2009
2246
|
* View:
|
|
@@ -2035,6 +2272,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2035
2272
|
*
|
|
2036
2273
|
* setZoomLevel(4).then(() => console.log('Setting a zoom level')).catch(err => console.log(err));
|
|
2037
2274
|
* ```
|
|
2275
|
+
* @remarks
|
|
2276
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2277
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2278
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2038
2279
|
*/
|
|
2039
2280
|
setZoomLevel(level) {
|
|
2040
2281
|
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
|
@@ -2042,12 +2283,9 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2042
2283
|
/**
|
|
2043
2284
|
* Navigates the WebContents to a specified URL.
|
|
2044
2285
|
*
|
|
2045
|
-
*
|
|
2286
|
+
* Note: The url must contain the protocol prefix such as http:// or https://.
|
|
2046
2287
|
* @param url - The URL to navigate the WebContents to.
|
|
2047
2288
|
*
|
|
2048
|
-
* @function navigate
|
|
2049
|
-
* @memberof View
|
|
2050
|
-
* @instance
|
|
2051
2289
|
* @example
|
|
2052
2290
|
* View:
|
|
2053
2291
|
* ```js
|
|
@@ -2075,15 +2313,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2075
2313
|
* navigate().then(() => console.log('Navigate to tutorial')).catch(err => console.log(err));
|
|
2076
2314
|
* ```
|
|
2077
2315
|
* @experimental
|
|
2316
|
+
* @remarks
|
|
2317
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2318
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2319
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2078
2320
|
*/
|
|
2079
2321
|
navigate(url) {
|
|
2080
2322
|
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
|
2081
2323
|
}
|
|
2082
2324
|
/**
|
|
2083
2325
|
* Navigates the WebContents back one page.
|
|
2084
|
-
* @function navigateBack
|
|
2085
|
-
* @memberOf View
|
|
2086
|
-
* @instance
|
|
2087
2326
|
*
|
|
2088
2327
|
* @example
|
|
2089
2328
|
* View:
|
|
@@ -2105,15 +2344,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2105
2344
|
* }
|
|
2106
2345
|
* navigateBack().then(() => console.log('Navigated back')).catch(err => console.log(err));
|
|
2107
2346
|
* ```
|
|
2347
|
+
* @remarks
|
|
2348
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2349
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2350
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2108
2351
|
*/
|
|
2109
2352
|
navigateBack() {
|
|
2110
2353
|
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
|
2111
2354
|
}
|
|
2112
2355
|
/**
|
|
2113
2356
|
* Navigates the WebContents forward one page.
|
|
2114
|
-
* @function navigateForward
|
|
2115
|
-
* @memberOf View
|
|
2116
|
-
* @instance
|
|
2117
2357
|
*
|
|
2118
2358
|
* @example
|
|
2119
2359
|
* View:
|
|
@@ -2137,15 +2377,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2137
2377
|
* }
|
|
2138
2378
|
* navigateForward().then(() => console.log('Navigated forward')).catch(err => console.log(err));
|
|
2139
2379
|
* ```
|
|
2380
|
+
* @remarks
|
|
2381
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2382
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2383
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2140
2384
|
*/
|
|
2141
2385
|
async navigateForward() {
|
|
2142
2386
|
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
|
2143
2387
|
}
|
|
2144
2388
|
/**
|
|
2145
2389
|
* Stops any current navigation the WebContents is performing.
|
|
2146
|
-
* @function stopNavigation
|
|
2147
|
-
* @memberOf View
|
|
2148
|
-
* @instance
|
|
2149
2390
|
*
|
|
2150
2391
|
* @example
|
|
2151
2392
|
* View:
|
|
@@ -2167,15 +2408,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2167
2408
|
* }
|
|
2168
2409
|
* stopNavigation().then(() => console.log('you shall not navigate')).catch(err => console.log(err));
|
|
2169
2410
|
* ```
|
|
2411
|
+
* @remarks
|
|
2412
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2413
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2414
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2170
2415
|
*/
|
|
2171
2416
|
stopNavigation() {
|
|
2172
2417
|
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
|
2173
2418
|
}
|
|
2174
2419
|
/**
|
|
2175
2420
|
* Reloads the WebContents
|
|
2176
|
-
* @function reload
|
|
2177
|
-
* @memberOf View
|
|
2178
|
-
* @instance
|
|
2179
2421
|
*
|
|
2180
2422
|
* @example
|
|
2181
2423
|
* View:
|
|
@@ -2207,6 +2449,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2207
2449
|
* console.log('Reloaded window')
|
|
2208
2450
|
* }).catch(err => console.log(err));
|
|
2209
2451
|
* ```
|
|
2452
|
+
* @remarks
|
|
2453
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2454
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2455
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2210
2456
|
*/
|
|
2211
2457
|
reload(ignoreCache = false) {
|
|
2212
2458
|
return this.wire
|
|
@@ -2219,11 +2465,8 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2219
2465
|
/**
|
|
2220
2466
|
* Prints the WebContents.
|
|
2221
2467
|
* @param options Printer Options
|
|
2222
|
-
* @function print
|
|
2223
|
-
* @memberOf View
|
|
2224
|
-
* @instance
|
|
2225
2468
|
*
|
|
2226
|
-
*
|
|
2469
|
+
* Note: When `silent` is set to `true`, the API will pick the system's default printer if deviceName
|
|
2227
2470
|
* is empty and the default settings for printing.
|
|
2228
2471
|
*
|
|
2229
2472
|
* Use the CSS style `page-break-before: always;` to force print to a new page.
|
|
@@ -2236,6 +2479,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2236
2479
|
* console.log('print call has been sent to the system');
|
|
2237
2480
|
* });
|
|
2238
2481
|
* ```
|
|
2482
|
+
* @remarks
|
|
2483
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2484
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2485
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2239
2486
|
*/
|
|
2240
2487
|
print(options = {}) {
|
|
2241
2488
|
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
|
@@ -2244,11 +2491,8 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2244
2491
|
* Find and highlight text on a page.
|
|
2245
2492
|
* @param searchTerm Term to find in page
|
|
2246
2493
|
* @param options Search options
|
|
2247
|
-
* @function findInPage
|
|
2248
|
-
* @memberOf View
|
|
2249
|
-
* @instance
|
|
2250
2494
|
*
|
|
2251
|
-
*
|
|
2495
|
+
* Note: By default, each subsequent call will highlight the next text that matches the search term.
|
|
2252
2496
|
*
|
|
2253
2497
|
* Returns a promise with the results for the request. By subscribing to the
|
|
2254
2498
|
* found-in-page event, you can get the results of this call as well.
|
|
@@ -2283,6 +2527,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2283
2527
|
* console.log(result)
|
|
2284
2528
|
* });
|
|
2285
2529
|
* ```
|
|
2530
|
+
* @remarks
|
|
2531
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2532
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2533
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2286
2534
|
*/
|
|
2287
2535
|
findInPage(searchTerm, options) {
|
|
2288
2536
|
return this.wire
|
|
@@ -2326,6 +2574,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2326
2574
|
* console.log(results);
|
|
2327
2575
|
* });
|
|
2328
2576
|
* ```
|
|
2577
|
+
* @remarks
|
|
2578
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2579
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2580
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2329
2581
|
*/
|
|
2330
2582
|
stopFindInPage(action) {
|
|
2331
2583
|
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
|
@@ -2333,9 +2585,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2333
2585
|
/**
|
|
2334
2586
|
* Returns an array with all system printers
|
|
2335
2587
|
* @deprecated use System.getPrinters instead
|
|
2336
|
-
* @function getPrinters
|
|
2337
|
-
* @memberOf View
|
|
2338
|
-
* @instance
|
|
2339
2588
|
*
|
|
2340
2589
|
* @example
|
|
2341
2590
|
* View:
|
|
@@ -2371,6 +2620,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2371
2620
|
* console.log(err);
|
|
2372
2621
|
* });
|
|
2373
2622
|
* ```
|
|
2623
|
+
* @remarks
|
|
2624
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2625
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2626
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2374
2627
|
*/
|
|
2375
2628
|
getPrinters() {
|
|
2376
2629
|
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
|
@@ -2378,10 +2631,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2378
2631
|
/**
|
|
2379
2632
|
* Gives focus to the WebContents.
|
|
2380
2633
|
*
|
|
2381
|
-
* @function focus
|
|
2382
|
-
* @emits focused
|
|
2383
|
-
* @memberOf Window
|
|
2384
|
-
* @instance
|
|
2385
2634
|
* @example
|
|
2386
2635
|
* ```js
|
|
2387
2636
|
* async function focusWindow() {
|
|
@@ -2397,15 +2646,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2397
2646
|
*
|
|
2398
2647
|
* focusWindow().then(() => console.log('Window focused')).catch(err => console.log(err));
|
|
2399
2648
|
* ```
|
|
2649
|
+
* @remarks
|
|
2650
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2651
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2652
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2400
2653
|
*/
|
|
2401
2654
|
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
|
2402
2655
|
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
|
2403
2656
|
}
|
|
2404
2657
|
/**
|
|
2405
2658
|
* Shows the Chromium Developer Tools
|
|
2406
|
-
* @function showDeveloperTools
|
|
2407
|
-
* @memberOf View
|
|
2408
|
-
* @instance
|
|
2409
2659
|
*
|
|
2410
2660
|
* @example
|
|
2411
2661
|
* View:
|
|
@@ -2431,6 +2681,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2431
2681
|
* .then(() => console.log('Showing dev tools'))
|
|
2432
2682
|
* .catch(err => console.error(err));
|
|
2433
2683
|
* ```
|
|
2684
|
+
* @remarks
|
|
2685
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2686
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2687
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2434
2688
|
*/
|
|
2435
2689
|
async showDeveloperTools() {
|
|
2436
2690
|
// Note this hits the system action map in core state for legacy reasons.
|
|
@@ -2439,11 +2693,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2439
2693
|
/**
|
|
2440
2694
|
* Retrieves the process information associated with a WebContents.
|
|
2441
2695
|
*
|
|
2442
|
-
*
|
|
2443
|
-
*
|
|
2444
|
-
* @function getProcessInfo
|
|
2445
|
-
* @memberOf View
|
|
2446
|
-
* @instance
|
|
2696
|
+
* Note: This includes any iframes associated with the WebContents
|
|
2447
2697
|
*
|
|
2448
2698
|
* @example
|
|
2449
2699
|
* View:
|
|
@@ -2457,6 +2707,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2457
2707
|
* const win = await fin.Window.getCurrent();
|
|
2458
2708
|
* const processInfo = await win.getProcessInfo();
|
|
2459
2709
|
* ```
|
|
2710
|
+
* @remarks
|
|
2711
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2712
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2713
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2460
2714
|
*/
|
|
2461
2715
|
async getProcessInfo() {
|
|
2462
2716
|
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
|
@@ -2464,9 +2718,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2464
2718
|
}
|
|
2465
2719
|
/**
|
|
2466
2720
|
* Retrieves information on all Shared Workers.
|
|
2467
|
-
* @function getSharedWorkers
|
|
2468
|
-
* @memberOf View
|
|
2469
|
-
* @instance
|
|
2470
2721
|
*
|
|
2471
2722
|
* @example
|
|
2472
2723
|
* View:
|
|
@@ -2495,15 +2746,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2495
2746
|
* const win = await fin.Window.create(winOption);
|
|
2496
2747
|
* const sharedWorkers = await win.getSharedWorkers();
|
|
2497
2748
|
* ```
|
|
2749
|
+
* @remarks
|
|
2750
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2751
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2752
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2498
2753
|
*/
|
|
2499
2754
|
async getSharedWorkers() {
|
|
2500
2755
|
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
|
2501
2756
|
}
|
|
2502
2757
|
/**
|
|
2503
2758
|
* Opens the developer tools for the shared worker context.
|
|
2504
|
-
* @function inspectSharedWorker
|
|
2505
|
-
* @memberOf View
|
|
2506
|
-
* @instance
|
|
2507
2759
|
*
|
|
2508
2760
|
* @example
|
|
2509
2761
|
* View:
|
|
@@ -2532,6 +2784,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2532
2784
|
* const win = await fin.Window.create(winOption);
|
|
2533
2785
|
* await win.inspectSharedWorker();
|
|
2534
2786
|
* ```
|
|
2787
|
+
* @remarks
|
|
2788
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2789
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2790
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2535
2791
|
*/
|
|
2536
2792
|
async inspectSharedWorker() {
|
|
2537
2793
|
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
|
@@ -2539,9 +2795,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2539
2795
|
/**
|
|
2540
2796
|
* Inspects the shared worker based on its ID.
|
|
2541
2797
|
* @param workerId - The id of the shared worker.
|
|
2542
|
-
* @function inspectSharedWorkerById
|
|
2543
|
-
* @memberOf View
|
|
2544
|
-
* @instance
|
|
2545
2798
|
*
|
|
2546
2799
|
* @example
|
|
2547
2800
|
* View:
|
|
@@ -2572,15 +2825,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2572
2825
|
* const sharedWorkers = await win.getSharedWorkers();
|
|
2573
2826
|
* await win.inspectSharedWorkerById(sharedWorkers[0].id);
|
|
2574
2827
|
* ```
|
|
2828
|
+
* @remarks
|
|
2829
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2830
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2831
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2575
2832
|
*/
|
|
2576
2833
|
async inspectSharedWorkerById(workerId) {
|
|
2577
2834
|
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
|
2578
2835
|
}
|
|
2579
2836
|
/**
|
|
2580
2837
|
* Opens the developer tools for the service worker context.
|
|
2581
|
-
* @function inspectServiceWorker
|
|
2582
|
-
* @memberOf View
|
|
2583
|
-
* @instance
|
|
2584
2838
|
*
|
|
2585
2839
|
* @example
|
|
2586
2840
|
* View:
|
|
@@ -2609,6 +2863,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2609
2863
|
* const win = await fin.Window.create(winOption);
|
|
2610
2864
|
* await win.inspectServiceWorker();
|
|
2611
2865
|
* ```
|
|
2866
|
+
* @remarks
|
|
2867
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
2868
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
2869
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2612
2870
|
*/
|
|
2613
2871
|
async inspectServiceWorker() {
|
|
2614
2872
|
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
|
@@ -2616,7 +2874,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2616
2874
|
/**
|
|
2617
2875
|
* Shows a popup window.
|
|
2618
2876
|
*
|
|
2619
|
-
*
|
|
2877
|
+
* Note: If this WebContents is a view and its attached window has a popup open, this will close it.
|
|
2620
2878
|
*
|
|
2621
2879
|
* Shows a popup window. Including a `name` in `options` will attempt to show an existing window as a popup, if
|
|
2622
2880
|
* that window doesn't exist or no `name` is included a window will be created. If the caller view or the caller
|
|
@@ -2624,7 +2882,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2624
2882
|
* open popup window before showing the new popup window. Also, if the caller view is destroyed or detached, the popup
|
|
2625
2883
|
* will be dismissed.
|
|
2626
2884
|
*
|
|
2627
|
-
*
|
|
2885
|
+
* Note: in the case where the window being shown as a popup needs to be created, it is a child of the caller view's parent window.
|
|
2628
2886
|
*
|
|
2629
2887
|
* @example
|
|
2630
2888
|
*
|
|
@@ -2819,11 +3077,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
|
2819
3077
|
* onPopupReady: popupWindowCallback;
|
|
2820
3078
|
* });
|
|
2821
3079
|
* ```
|
|
2822
|
-
* @
|
|
2823
|
-
* @
|
|
2824
|
-
*
|
|
2825
|
-
* @
|
|
2826
|
-
*
|
|
3080
|
+
* @remarks
|
|
3081
|
+
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
|
3082
|
+
* We do not expose an explicit superclass for this functionality, but it does have its own
|
|
3083
|
+
* {@link OpenFin.WebContentsEvents event namespace}.
|
|
2827
3084
|
*/
|
|
2828
3085
|
async showPopupWindow(options) {
|
|
2829
3086
|
this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
|
|
@@ -3108,7 +3365,6 @@ function requireInstance$2 () {
|
|
|
3108
3365
|
* Attaches the current view to the given window identity.
|
|
3109
3366
|
* Identity must be the identity of a window in the same application.
|
|
3110
3367
|
* This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
|
|
3111
|
-
* @param target {Identity}
|
|
3112
3368
|
*
|
|
3113
3369
|
* @example
|
|
3114
3370
|
* ```js
|
|
@@ -3237,7 +3493,6 @@ function requireInstance$2 () {
|
|
|
3237
3493
|
};
|
|
3238
3494
|
/**
|
|
3239
3495
|
* Sets the bounds (top, left, width, height) of the view relative to its window.
|
|
3240
|
-
* @param bounds {ViewBounds}
|
|
3241
3496
|
*
|
|
3242
3497
|
* @remarks View position is relative to the bounds of the window.
|
|
3243
3498
|
* ({top: 0, left: 0} represents the top left corner of the window)
|
|
@@ -3402,7 +3657,6 @@ function requireInstance$2 () {
|
|
|
3402
3657
|
};
|
|
3403
3658
|
/**
|
|
3404
3659
|
* Updates the view's options.
|
|
3405
|
-
* @param options
|
|
3406
3660
|
*
|
|
3407
3661
|
* @example
|
|
3408
3662
|
* ```js
|
|
@@ -3443,7 +3697,6 @@ function requireInstance$2 () {
|
|
|
3443
3697
|
/**
|
|
3444
3698
|
* Retrieves the window the view is currently attached to.
|
|
3445
3699
|
*
|
|
3446
|
-
* @experimental
|
|
3447
3700
|
* @example
|
|
3448
3701
|
* ```js
|
|
3449
3702
|
* const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
|
|
@@ -3451,6 +3704,7 @@ function requireInstance$2 () {
|
|
|
3451
3704
|
* .then(win => console.log('current window', win))
|
|
3452
3705
|
* .catch(err => console.log(err));)
|
|
3453
3706
|
* ```
|
|
3707
|
+
* @experimental
|
|
3454
3708
|
*/
|
|
3455
3709
|
this.getCurrentWindow = async () => {
|
|
3456
3710
|
const { payload: { data } } = await this.wire.sendAction('get-view-window', { ...this.identity });
|
|
@@ -3556,10 +3810,6 @@ function requireInstance$2 () {
|
|
|
3556
3810
|
/**
|
|
3557
3811
|
* Focuses the view
|
|
3558
3812
|
*
|
|
3559
|
-
* @function focus
|
|
3560
|
-
* @memberof View
|
|
3561
|
-
* @emits focused
|
|
3562
|
-
* @instance
|
|
3563
3813
|
* @example
|
|
3564
3814
|
* ```js
|
|
3565
3815
|
* const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
|
|
@@ -3601,16 +3851,17 @@ function requireView () {
|
|
|
3601
3851
|
};
|
|
3602
3852
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3603
3853
|
/**
|
|
3604
|
-
* Entry
|
|
3854
|
+
* Entry points for the OpenFin `View` API (`fin.View`).
|
|
3605
3855
|
*
|
|
3606
|
-
*
|
|
3607
|
-
*
|
|
3608
|
-
*
|
|
3856
|
+
* * {@link ViewModule} contains static members of the `View` API, accessible through `fin.View`.
|
|
3857
|
+
* * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
|
|
3858
|
+
*
|
|
3859
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
3860
|
+
* both of these were documented on the same page.
|
|
3609
3861
|
*
|
|
3610
3862
|
* @packageDocumentation
|
|
3611
3863
|
*/
|
|
3612
|
-
|
|
3613
|
-
exports.default = Factory_1.default;
|
|
3864
|
+
__exportStar(requireFactory$3(), exports);
|
|
3614
3865
|
__exportStar(requireInstance$2(), exports);
|
|
3615
3866
|
} (view));
|
|
3616
3867
|
return view;
|
|
@@ -4099,6 +4350,7 @@ function requireInstance$1 () {
|
|
|
4099
4350
|
/**
|
|
4100
4351
|
* Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
|
|
4101
4352
|
* If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
|
|
4353
|
+
*
|
|
4102
4354
|
* Note: If the "name" property is omitted it defaults to "tasks".
|
|
4103
4355
|
* @param jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
|
|
4104
4356
|
*
|
|
@@ -4399,6 +4651,7 @@ function requireInstance$1 () {
|
|
|
4399
4651
|
}
|
|
4400
4652
|
/**
|
|
4401
4653
|
* Sets file auto download location. It's only allowed in the same application.
|
|
4654
|
+
*
|
|
4402
4655
|
* Note: This method is restricted by default and must be enabled via
|
|
4403
4656
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
4404
4657
|
* @param downloadLocation file auto download location
|
|
@@ -4424,6 +4677,7 @@ function requireInstance$1 () {
|
|
|
4424
4677
|
}
|
|
4425
4678
|
/**
|
|
4426
4679
|
* Gets file auto download location. It's only allowed in the same application. If file auto download location is not set, it will return the default location.
|
|
4680
|
+
*
|
|
4427
4681
|
* Note: This method is restricted by default and must be enabled via
|
|
4428
4682
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
4429
4683
|
*
|
|
@@ -4450,13 +4704,16 @@ function requireFactory$2 () {
|
|
|
4450
4704
|
if (hasRequiredFactory$2) return Factory$7;
|
|
4451
4705
|
hasRequiredFactory$2 = 1;
|
|
4452
4706
|
Object.defineProperty(Factory$7, "__esModule", { value: true });
|
|
4707
|
+
Factory$7.ApplicationModule = void 0;
|
|
4453
4708
|
const base_1 = base;
|
|
4454
4709
|
const validate_1 = validate;
|
|
4455
4710
|
const Instance_1 = requireInstance$1();
|
|
4711
|
+
/**
|
|
4712
|
+
* Static namespace for OpenFin API methods that interact with the {@link Application} class, available under `fin.Application`.
|
|
4713
|
+
*/
|
|
4456
4714
|
class ApplicationModule extends base_1.Base {
|
|
4457
4715
|
/**
|
|
4458
4716
|
* Asynchronously returns an Application object that represents an existing application.
|
|
4459
|
-
* @param identity
|
|
4460
4717
|
*
|
|
4461
4718
|
* @example
|
|
4462
4719
|
*
|
|
@@ -4467,7 +4724,6 @@ function requireFactory$2 () {
|
|
|
4467
4724
|
* .catch(err => console.log(err));
|
|
4468
4725
|
* ```
|
|
4469
4726
|
*
|
|
4470
|
-
* @static
|
|
4471
4727
|
*/
|
|
4472
4728
|
async wrap(identity) {
|
|
4473
4729
|
this.wire.sendAction('wrap-application').catch((e) => {
|
|
@@ -4481,7 +4737,6 @@ function requireFactory$2 () {
|
|
|
4481
4737
|
}
|
|
4482
4738
|
/**
|
|
4483
4739
|
* Synchronously returns an Application object that represents an existing application.
|
|
4484
|
-
* @param identity
|
|
4485
4740
|
*
|
|
4486
4741
|
* @example
|
|
4487
4742
|
*
|
|
@@ -4490,7 +4745,6 @@ function requireFactory$2 () {
|
|
|
4490
4745
|
* await app.close();
|
|
4491
4746
|
* ```
|
|
4492
4747
|
*
|
|
4493
|
-
* @static
|
|
4494
4748
|
*/
|
|
4495
4749
|
wrapSync(identity) {
|
|
4496
4750
|
this.wire.sendAction('wrap-application-sync').catch((e) => {
|
|
@@ -4515,8 +4769,6 @@ function requireFactory$2 () {
|
|
|
4515
4769
|
}
|
|
4516
4770
|
/**
|
|
4517
4771
|
* DEPRECATED method to create a new Application. Use {@link Application.ApplicationModule.start Application.start} instead.
|
|
4518
|
-
* @param appOptions
|
|
4519
|
-
*
|
|
4520
4772
|
*
|
|
4521
4773
|
* @example
|
|
4522
4774
|
*
|
|
@@ -4545,7 +4797,6 @@ function requireFactory$2 () {
|
|
|
4545
4797
|
}
|
|
4546
4798
|
/**
|
|
4547
4799
|
* Creates and starts a new Application.
|
|
4548
|
-
* @param appOptions
|
|
4549
4800
|
*
|
|
4550
4801
|
* @example
|
|
4551
4802
|
*
|
|
@@ -4561,8 +4812,6 @@ function requireFactory$2 () {
|
|
|
4561
4812
|
* start().then(() => console.log('Application is running')).catch(err => console.log(err));
|
|
4562
4813
|
* ```
|
|
4563
4814
|
*
|
|
4564
|
-
*
|
|
4565
|
-
* @static
|
|
4566
4815
|
*/
|
|
4567
4816
|
async start(appOptions) {
|
|
4568
4817
|
this.wire.sendAction('start-application').catch((e) => {
|
|
@@ -4575,10 +4824,8 @@ function requireFactory$2 () {
|
|
|
4575
4824
|
/**
|
|
4576
4825
|
* Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls.
|
|
4577
4826
|
* Returns once the RVM is finished attempting to launch the applications.
|
|
4578
|
-
* @param applications
|
|
4579
4827
|
* @param opts - Parameters that the RVM will use.
|
|
4580
4828
|
*
|
|
4581
|
-
* @static
|
|
4582
4829
|
* @example
|
|
4583
4830
|
*
|
|
4584
4831
|
* ```js
|
|
@@ -4630,8 +4877,6 @@ function requireFactory$2 () {
|
|
|
4630
4877
|
* });
|
|
4631
4878
|
*
|
|
4632
4879
|
* ```
|
|
4633
|
-
*
|
|
4634
|
-
* @static
|
|
4635
4880
|
*/
|
|
4636
4881
|
getCurrent() {
|
|
4637
4882
|
this.wire.sendAction('get-current-application').catch((e) => {
|
|
@@ -4657,8 +4902,6 @@ function requireFactory$2 () {
|
|
|
4657
4902
|
* });
|
|
4658
4903
|
*
|
|
4659
4904
|
* ```
|
|
4660
|
-
*
|
|
4661
|
-
* @static
|
|
4662
4905
|
*/
|
|
4663
4906
|
getCurrentSync() {
|
|
4664
4907
|
this.wire.sendAction('get-current-application-sync').catch((e) => {
|
|
@@ -4679,8 +4922,6 @@ function requireFactory$2 () {
|
|
|
4679
4922
|
* // For a local manifest file:
|
|
4680
4923
|
* fin.Application.startFromManifest('file:///C:/somefolder/app.json').then(app => console.log('App is running')).catch(err => console.log(err));
|
|
4681
4924
|
* ```
|
|
4682
|
-
*
|
|
4683
|
-
* @static
|
|
4684
4925
|
*/
|
|
4685
4926
|
async startFromManifest(manifestUrl, opts) {
|
|
4686
4927
|
this.wire.sendAction('application-start-from-manifest').catch((e) => {
|
|
@@ -4725,7 +4966,7 @@ function requireFactory$2 () {
|
|
|
4725
4966
|
});
|
|
4726
4967
|
}
|
|
4727
4968
|
}
|
|
4728
|
-
Factory$7.
|
|
4969
|
+
Factory$7.ApplicationModule = ApplicationModule;
|
|
4729
4970
|
return Factory$7;
|
|
4730
4971
|
}
|
|
4731
4972
|
|
|
@@ -4751,17 +4992,18 @@ function requireApplication () {
|
|
|
4751
4992
|
};
|
|
4752
4993
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4753
4994
|
/**
|
|
4754
|
-
* Entry
|
|
4995
|
+
* Entry points for the OpenFin `Application` API (`fin.Application`).
|
|
4755
4996
|
*
|
|
4756
|
-
*
|
|
4757
|
-
*
|
|
4758
|
-
*
|
|
4997
|
+
* * {@link ApplicationModule} contains static members of the `Application` API, accessible through `fin.Application`.
|
|
4998
|
+
* * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
|
|
4999
|
+
*
|
|
5000
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
5001
|
+
* both of these were documented on the same page.
|
|
4759
5002
|
*
|
|
4760
5003
|
* @packageDocumentation
|
|
4761
5004
|
*/
|
|
4762
|
-
|
|
5005
|
+
__exportStar(requireFactory$2(), exports);
|
|
4763
5006
|
__exportStar(requireInstance$1(), exports);
|
|
4764
|
-
exports.default = Factory_1.default;
|
|
4765
5007
|
} (application));
|
|
4766
5008
|
return application;
|
|
4767
5009
|
}
|
|
@@ -4886,7 +5128,7 @@ function requireInstance () {
|
|
|
4886
5128
|
* alphaMask turns anything of matching RGB value transparent.
|
|
4887
5129
|
* <br>
|
|
4888
5130
|
* Caveats:
|
|
4889
|
-
* *
|
|
5131
|
+
* * Runtime flags --disable-gpu and --allow-unsafe-compositing are required. Note: Unclear behavior on remote Desktop support
|
|
4890
5132
|
* * User cannot click-through transparent regions
|
|
4891
5133
|
* * Not supported on Mac
|
|
4892
5134
|
* * Windows Aero must be enabled
|
|
@@ -5074,6 +5316,7 @@ function requireInstance () {
|
|
|
5074
5316
|
* A flag that specifies how transparent the window will be.
|
|
5075
5317
|
* Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
|
|
5076
5318
|
* This value is clamped between `0.0` and `1.0`.
|
|
5319
|
+
* * In software composition mode, the runtime flag --allow-unsafe-compositing is required.
|
|
5077
5320
|
*
|
|
5078
5321
|
* @property {preloadScript[]} [preloadScripts] - _Inheritable_
|
|
5079
5322
|
* A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
|
|
@@ -5263,7 +5506,6 @@ function requireInstance () {
|
|
|
5263
5506
|
*/
|
|
5264
5507
|
constructor(wire, identity) {
|
|
5265
5508
|
super(wire, identity, 'window');
|
|
5266
|
-
this.identity = identity;
|
|
5267
5509
|
}
|
|
5268
5510
|
/**
|
|
5269
5511
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
@@ -6094,11 +6336,12 @@ function requireInstance () {
|
|
|
6094
6336
|
* moveBy(580, 300).then(() => console.log('Moved')).catch(err => console.log(err));
|
|
6095
6337
|
* ```
|
|
6096
6338
|
*/
|
|
6097
|
-
moveBy(deltaLeft, deltaTop) {
|
|
6339
|
+
moveBy(deltaLeft, deltaTop, positioningOptions) {
|
|
6098
6340
|
return this.wire
|
|
6099
6341
|
.sendAction('move-window-by', {
|
|
6100
6342
|
deltaLeft,
|
|
6101
6343
|
deltaTop,
|
|
6344
|
+
positioningOptions,
|
|
6102
6345
|
...this.identity
|
|
6103
6346
|
})
|
|
6104
6347
|
.then(() => undefined);
|
|
@@ -6128,11 +6371,12 @@ function requireInstance () {
|
|
|
6128
6371
|
* moveTo(580, 300).then(() => console.log('Moved')).catch(err => console.log(err))
|
|
6129
6372
|
* ```
|
|
6130
6373
|
*/
|
|
6131
|
-
moveTo(left, top) {
|
|
6374
|
+
moveTo(left, top, positioningOptions) {
|
|
6132
6375
|
return this.wire
|
|
6133
6376
|
.sendAction('move-window', {
|
|
6134
6377
|
left,
|
|
6135
6378
|
top,
|
|
6379
|
+
positioningOptions,
|
|
6136
6380
|
...this.identity
|
|
6137
6381
|
})
|
|
6138
6382
|
.then(() => undefined);
|
|
@@ -6165,12 +6409,13 @@ function requireInstance () {
|
|
|
6165
6409
|
* resizeBy(580, 300, 'top-right').then(() => console.log('Resized')).catch(err => console.log(err));
|
|
6166
6410
|
* ```
|
|
6167
6411
|
*/
|
|
6168
|
-
resizeBy(deltaWidth, deltaHeight, anchor) {
|
|
6412
|
+
resizeBy(deltaWidth, deltaHeight, anchor, positioningOptions) {
|
|
6169
6413
|
return this.wire
|
|
6170
6414
|
.sendAction('resize-window-by', {
|
|
6171
6415
|
deltaWidth: Math.floor(deltaWidth),
|
|
6172
6416
|
deltaHeight: Math.floor(deltaHeight),
|
|
6173
6417
|
anchor,
|
|
6418
|
+
positioningOptions,
|
|
6174
6419
|
...this.identity
|
|
6175
6420
|
})
|
|
6176
6421
|
.then(() => undefined);
|
|
@@ -6203,12 +6448,13 @@ function requireInstance () {
|
|
|
6203
6448
|
* resizeTo(580, 300, 'top-left').then(() => console.log('Resized')).catch(err => console.log(err));
|
|
6204
6449
|
* ```
|
|
6205
6450
|
*/
|
|
6206
|
-
resizeTo(width, height, anchor) {
|
|
6451
|
+
resizeTo(width, height, anchor, positioningOptions) {
|
|
6207
6452
|
return this.wire
|
|
6208
6453
|
.sendAction('resize-window', {
|
|
6209
6454
|
width: Math.floor(width),
|
|
6210
6455
|
height: Math.floor(height),
|
|
6211
6456
|
anchor,
|
|
6457
|
+
positioningOptions,
|
|
6212
6458
|
...this.identity
|
|
6213
6459
|
})
|
|
6214
6460
|
.then(() => undefined);
|
|
@@ -6267,7 +6513,6 @@ function requireInstance () {
|
|
|
6267
6513
|
}
|
|
6268
6514
|
/**
|
|
6269
6515
|
* Sets the window's size and position.
|
|
6270
|
-
* @property { Bounds } bounds This is a * @type {string} name - name of the window.object that holds the propertys of
|
|
6271
6516
|
*
|
|
6272
6517
|
* @example
|
|
6273
6518
|
* ```js
|
|
@@ -6294,8 +6539,10 @@ function requireInstance () {
|
|
|
6294
6539
|
* }).then(() => console.log('Bounds set to window')).catch(err => console.log(err));
|
|
6295
6540
|
* ```
|
|
6296
6541
|
*/
|
|
6297
|
-
setBounds(bounds) {
|
|
6298
|
-
return this.wire
|
|
6542
|
+
setBounds(bounds, positioningOptions) {
|
|
6543
|
+
return this.wire
|
|
6544
|
+
.sendAction('set-window-bounds', { ...bounds, ...this.identity, positioningOptions })
|
|
6545
|
+
.then(() => undefined);
|
|
6299
6546
|
}
|
|
6300
6547
|
/**
|
|
6301
6548
|
* Shows the window if it is hidden.
|
|
@@ -6437,7 +6684,10 @@ function requireInstance () {
|
|
|
6437
6684
|
* Calling this method will close previously opened menus.
|
|
6438
6685
|
* @experimental
|
|
6439
6686
|
* @param options
|
|
6440
|
-
*
|
|
6687
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
6688
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
6689
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
6690
|
+
* these with a "reducer" pattern.
|
|
6441
6691
|
* @example
|
|
6442
6692
|
* This could be used to show a drop down menu over views in a platform window:
|
|
6443
6693
|
* ```js
|
|
@@ -6527,6 +6777,7 @@ function requireInstance () {
|
|
|
6527
6777
|
return this.wire.sendAction('close-popup-menu', { ...this.identity }).then(() => undefined);
|
|
6528
6778
|
}
|
|
6529
6779
|
/**
|
|
6780
|
+
* @PORTED
|
|
6530
6781
|
* @typedef {object} PopupOptions
|
|
6531
6782
|
* @property {string} [name] - If a window with this `name` exists, it will be shown as a popup. Otherwise, a new window with this `name` will be created. If this `name` is undefined, `initialOptions.name` will be used. If this `name` and `intialOptions.name` are both undefined, a `name` will be generated.
|
|
6532
6783
|
* @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
|
|
@@ -6544,6 +6795,7 @@ function requireInstance () {
|
|
|
6544
6795
|
* @property {boolean} [hideOnClose] - Hide the popup window instead of closing whenever `close` is called on it. Note: if this is `true` and `blurBehavior` and/or `resultDispatchBehavior` are set to `close`, the window will be hidden.
|
|
6545
6796
|
*/
|
|
6546
6797
|
/**
|
|
6798
|
+
* @PORTED
|
|
6547
6799
|
* @typedef {object} PopupResult
|
|
6548
6800
|
* @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
|
|
6549
6801
|
* @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
|
|
@@ -6633,13 +6885,16 @@ function requireFactory$1 () {
|
|
|
6633
6885
|
if (hasRequiredFactory$1) return Factory$8;
|
|
6634
6886
|
hasRequiredFactory$1 = 1;
|
|
6635
6887
|
Object.defineProperty(Factory$8, "__esModule", { value: true });
|
|
6888
|
+
Factory$8._WindowModule = void 0;
|
|
6636
6889
|
const base_1 = base;
|
|
6637
6890
|
const validate_1 = validate;
|
|
6638
6891
|
const Instance_1 = requireInstance();
|
|
6892
|
+
/**
|
|
6893
|
+
* Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
|
|
6894
|
+
*/
|
|
6639
6895
|
class _WindowModule extends base_1.Base {
|
|
6640
6896
|
/**
|
|
6641
6897
|
* Asynchronously returns a Window object that represents an existing window.
|
|
6642
|
-
* @param identity
|
|
6643
6898
|
*
|
|
6644
6899
|
* @example
|
|
6645
6900
|
* ```js
|
|
@@ -6656,7 +6911,6 @@ function requireFactory$1 () {
|
|
|
6656
6911
|
* .then(win => console.log('wrapped window'))
|
|
6657
6912
|
* .catch(err => console.log(err));
|
|
6658
6913
|
* ```
|
|
6659
|
-
* @static
|
|
6660
6914
|
*/
|
|
6661
6915
|
async wrap(identity) {
|
|
6662
6916
|
this.wire.sendAction('window-wrap').catch((e) => {
|
|
@@ -6670,7 +6924,6 @@ function requireFactory$1 () {
|
|
|
6670
6924
|
}
|
|
6671
6925
|
/**
|
|
6672
6926
|
* Synchronously returns a Window object that represents an existing window.
|
|
6673
|
-
* @param identity
|
|
6674
6927
|
*
|
|
6675
6928
|
* @example
|
|
6676
6929
|
* ```js
|
|
@@ -6686,7 +6939,6 @@ function requireFactory$1 () {
|
|
|
6686
6939
|
* await createWin();
|
|
6687
6940
|
* let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
|
|
6688
6941
|
* ```
|
|
6689
|
-
* @static
|
|
6690
6942
|
*/
|
|
6691
6943
|
wrapSync(identity) {
|
|
6692
6944
|
this.wire.sendAction('window-wrap-sync').catch((e) => {
|
|
@@ -6718,7 +6970,6 @@ function requireFactory$1 () {
|
|
|
6718
6970
|
*
|
|
6719
6971
|
* createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
|
|
6720
6972
|
* ```
|
|
6721
|
-
* @static
|
|
6722
6973
|
*/
|
|
6723
6974
|
create(options) {
|
|
6724
6975
|
this.wire.sendAction('create-window').catch((e) => {
|
|
@@ -6737,7 +6988,6 @@ function requireFactory$1 () {
|
|
|
6737
6988
|
* .catch(err => console.log(err));
|
|
6738
6989
|
*
|
|
6739
6990
|
* ```
|
|
6740
|
-
* @static
|
|
6741
6991
|
*/
|
|
6742
6992
|
getCurrent() {
|
|
6743
6993
|
this.wire.sendAction('get-current-window').catch((e) => {
|
|
@@ -6759,7 +7009,6 @@ function requireFactory$1 () {
|
|
|
6759
7009
|
* console.log(info);
|
|
6760
7010
|
*
|
|
6761
7011
|
* ```
|
|
6762
|
-
* @static
|
|
6763
7012
|
*/
|
|
6764
7013
|
getCurrentSync() {
|
|
6765
7014
|
this.wire.sendAction('get-current-window-sync').catch((e) => {
|
|
@@ -6772,7 +7021,7 @@ function requireFactory$1 () {
|
|
|
6772
7021
|
return this.wrapSync({ uuid, name });
|
|
6773
7022
|
}
|
|
6774
7023
|
}
|
|
6775
|
-
Factory$8.
|
|
7024
|
+
Factory$8._WindowModule = _WindowModule;
|
|
6776
7025
|
return Factory$8;
|
|
6777
7026
|
}
|
|
6778
7027
|
|
|
@@ -6798,24 +7047,33 @@ function requireWindow () {
|
|
|
6798
7047
|
};
|
|
6799
7048
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6800
7049
|
/**
|
|
6801
|
-
* Entry
|
|
7050
|
+
* Entry points for the OpenFin `Window` API (`fin.Window`).
|
|
6802
7051
|
*
|
|
6803
|
-
*
|
|
6804
|
-
*
|
|
6805
|
-
* instances of the OpenFin `Window` class.
|
|
7052
|
+
* * {@link _WindowModule} contains static members of the `Window` API, accessible through `fin.Window`.
|
|
7053
|
+
* * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
|
|
6806
7054
|
*
|
|
6807
|
-
*
|
|
7055
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
7056
|
+
* both of these were documented on the same page.
|
|
7057
|
+
*
|
|
7058
|
+
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
|
6808
7059
|
*
|
|
6809
7060
|
* @packageDocumentation
|
|
6810
7061
|
*/
|
|
6811
|
-
|
|
6812
|
-
exports.default = Factory_1.default;
|
|
7062
|
+
__exportStar(requireFactory$1(), exports);
|
|
6813
7063
|
__exportStar(requireInstance(), exports);
|
|
6814
7064
|
} (window$1));
|
|
6815
7065
|
return window$1;
|
|
6816
7066
|
}
|
|
6817
7067
|
|
|
7068
|
+
/**
|
|
7069
|
+
* Entry point for the OpenFin `System` API (`fin.System`).
|
|
7070
|
+
*
|
|
7071
|
+
* * {@link System} contains static members of the `System` API (available under `fin.System`)
|
|
7072
|
+
*
|
|
7073
|
+
* @packageDocumentation
|
|
7074
|
+
*/
|
|
6818
7075
|
Object.defineProperty(system, "__esModule", { value: true });
|
|
7076
|
+
system.System = void 0;
|
|
6819
7077
|
const base_1$j = base;
|
|
6820
7078
|
const transport_errors_1$1 = transportErrors;
|
|
6821
7079
|
const window_1 = requireWindow();
|
|
@@ -7131,7 +7389,6 @@ class System extends base_1$j.EmitterBase {
|
|
|
7131
7389
|
* ```js
|
|
7132
7390
|
* fin.System.getUniqueUserId().then(id => console.log(id)).catch(err => console.log(err));
|
|
7133
7391
|
* ```
|
|
7134
|
-
* @static
|
|
7135
7392
|
*/
|
|
7136
7393
|
getUniqueUserId() {
|
|
7137
7394
|
return this.wire.sendAction('get-unique-user-id').then(({ payload }) => payload.data);
|
|
@@ -7822,7 +8079,8 @@ class System extends base_1$j.EmitterBase {
|
|
|
7822
8079
|
}
|
|
7823
8080
|
/**
|
|
7824
8081
|
* Attempt to close an external process. The process will be terminated if it
|
|
7825
|
-
* has not closed after the elapsed timeout in milliseconds
|
|
8082
|
+
* has not closed after the elapsed timeout in milliseconds.
|
|
8083
|
+
*
|
|
7826
8084
|
* Note: This method is restricted by default and must be enabled via
|
|
7827
8085
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
7828
8086
|
* @param options A object defined in the TerminateExternalRequestType interface
|
|
@@ -7858,7 +8116,8 @@ class System extends base_1$j.EmitterBase {
|
|
|
7858
8116
|
return this.wire.sendAction('update-proxy', options).then(() => undefined);
|
|
7859
8117
|
}
|
|
7860
8118
|
/**
|
|
7861
|
-
* Downloads the given application asset
|
|
8119
|
+
* Downloads the given application asset.
|
|
8120
|
+
*
|
|
7862
8121
|
* Note: This method is restricted by default and must be enabled via
|
|
7863
8122
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
|
7864
8123
|
* @param appAsset App asset object
|
|
@@ -8402,7 +8661,6 @@ class System extends base_1$j.EmitterBase {
|
|
|
8402
8661
|
* }
|
|
8403
8662
|
* });
|
|
8404
8663
|
* ```
|
|
8405
|
-
* @static
|
|
8406
8664
|
*/
|
|
8407
8665
|
async launchManifest(manifestUrl, opts = {}) {
|
|
8408
8666
|
const { subscribe, ..._sendOpts } = opts;
|
|
@@ -8662,7 +8920,7 @@ class System extends base_1$j.EmitterBase {
|
|
|
8662
8920
|
await this.wire.sendAction('set-domain-settings', { domainSettings, ...this.identity });
|
|
8663
8921
|
}
|
|
8664
8922
|
}
|
|
8665
|
-
system.
|
|
8923
|
+
system.System = System;
|
|
8666
8924
|
|
|
8667
8925
|
var interappbus = {};
|
|
8668
8926
|
|
|
@@ -9073,6 +9331,7 @@ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
9073
9331
|
};
|
|
9074
9332
|
var _ChannelClient_protectedObj, _ChannelClient_strategy, _ChannelClient_close;
|
|
9075
9333
|
Object.defineProperty(client, "__esModule", { value: true });
|
|
9334
|
+
client.ChannelClient = void 0;
|
|
9076
9335
|
const channel_1$1 = channel;
|
|
9077
9336
|
const channelClientsByEndpointId = new Map();
|
|
9078
9337
|
/**
|
|
@@ -9081,17 +9340,17 @@ const channelClientsByEndpointId = new Map();
|
|
|
9081
9340
|
* provider via {@link ChannelClient#dispatch dispatch} and to listen for communication
|
|
9082
9341
|
* from the provider by registering an action via {@link ChannelClient#register register}.
|
|
9083
9342
|
*
|
|
9084
|
-
* Synchronous Methods:
|
|
9343
|
+
* ### Synchronous Methods:
|
|
9085
9344
|
* * {@link ChannelClient#onDisconnection onDisconnection(listener)}
|
|
9086
9345
|
* * {@link ChannelClient#register register(action, listener)}
|
|
9087
9346
|
* * {@link ChannelClient#remove remove(action)}
|
|
9088
9347
|
*
|
|
9089
|
-
* Asynchronous Methods:
|
|
9348
|
+
* ### Asynchronous Methods:
|
|
9090
9349
|
* * {@link ChannelClient#disconnect disconnect()}
|
|
9091
9350
|
* * {@link ChannelClient#dispatch dispatch(action, payload)}
|
|
9092
9351
|
*
|
|
9093
|
-
* Middleware:
|
|
9094
|
-
*
|
|
9352
|
+
* ### Middleware:
|
|
9353
|
+
* Middleware functions receive the following arguments: (action, payload, senderId).
|
|
9095
9354
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
|
9096
9355
|
* unless it is undefined, in which case the original payload is used. Middleware can be used for side effects.
|
|
9097
9356
|
* * {@link ChannelClient#setDefaultAction setDefaultAction(middleware)}
|
|
@@ -9238,7 +9497,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
|
9238
9497
|
});
|
|
9239
9498
|
}
|
|
9240
9499
|
}
|
|
9241
|
-
client.
|
|
9500
|
+
client.ChannelClient = ChannelClient;
|
|
9242
9501
|
_ChannelClient_protectedObj = new WeakMap(), _ChannelClient_strategy = new WeakMap(), _ChannelClient_close = new WeakMap();
|
|
9243
9502
|
|
|
9244
9503
|
var connectionManager = {};
|
|
@@ -9781,20 +10040,20 @@ const runtimeVersioning_1 = runtimeVersioning;
|
|
|
9781
10040
|
* a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
|
|
9782
10041
|
* and to listen for communication from clients by registering an action via {@link ChannelProvider#register register}.
|
|
9783
10042
|
*
|
|
9784
|
-
* Synchronous Methods:
|
|
10043
|
+
* ### Synchronous Methods:
|
|
9785
10044
|
* * {@link ChannelProvider#onConnection onConnection(listener)}
|
|
9786
10045
|
* * {@link ChannelProvider#onDisconnection onDisconnection(listener)}
|
|
9787
10046
|
* * {@link ChannelProvider#publish publish(action, payload)}
|
|
9788
10047
|
* * {@link ChannelProvider#register register(action, listener)}
|
|
9789
10048
|
* * {@link ChannelProvider#remove remove(action)}
|
|
9790
10049
|
*
|
|
9791
|
-
* Asynchronous Methods:
|
|
10050
|
+
* ### Asynchronous Methods:
|
|
9792
10051
|
* * {@link ChannelProvider#destroy destroy()}
|
|
9793
10052
|
* * {@link ChannelProvider#dispatch dispatch(to, action, payload)}
|
|
9794
10053
|
* * {@link ChannelProvider#getAllClientInfo getAllClientInfo()}
|
|
9795
10054
|
*
|
|
9796
|
-
* Middleware:
|
|
9797
|
-
*
|
|
10055
|
+
* ### Middleware:
|
|
10056
|
+
* Middleware functions receive the following arguments: (action, payload, senderId).
|
|
9798
10057
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
|
9799
10058
|
* unless it is undefined, in which case the most recently defined payload is used. Middleware can be used for side effects.
|
|
9800
10059
|
* * {@link ChannelProvider#setDefaultAction setDefaultAction(middleware)}
|
|
@@ -10163,7 +10422,7 @@ class MessageReceiver extends base_1$h.Base {
|
|
|
10163
10422
|
const endpointIdFromPreviousConnection = this.latestEndpointIdByChannelId.get(channelId);
|
|
10164
10423
|
if (endpointIdFromPreviousConnection) {
|
|
10165
10424
|
// Not convinced by this way of doing things, but pushing up for now.
|
|
10166
|
-
client_1$1.
|
|
10425
|
+
client_1$1.ChannelClient.closeChannelByEndpointId(endpointIdFromPreviousConnection);
|
|
10167
10426
|
// eslint-disable-next-line no-console
|
|
10168
10427
|
console.warn('You have created a second connection to an older provider. First connection has been removed from the clientMap');
|
|
10169
10428
|
// eslint-disable-next-line no-console
|
|
@@ -10524,6 +10783,15 @@ class ConnectionManager extends base_1$g.Base {
|
|
|
10524
10783
|
connectionManager.ConnectionManager = ConnectionManager;
|
|
10525
10784
|
_ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnectionManager = new WeakMap();
|
|
10526
10785
|
|
|
10786
|
+
/**
|
|
10787
|
+
* Entry points for the `Channel` subset of the `InterApplicationBus` API (`fin.InterApplicationBus.Channel`).
|
|
10788
|
+
*
|
|
10789
|
+
* * {@link Channel} contains static members of the `Channel` API, accessible through `fin.InterApplicationBus.Channel`.
|
|
10790
|
+
* * {@link OpenFin.ChannelClient} describes a client of a channel, e.g. as returned by `fin.InterApplicationBus.Channel.connect`.
|
|
10791
|
+
* * {@link OpenFin.ChannelProvider} describes a provider of a channel, e.g. as returned by `fin.InterApplicationBus.Channel.create`.
|
|
10792
|
+
*
|
|
10793
|
+
* @packageDocumentation
|
|
10794
|
+
*/
|
|
10527
10795
|
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
10528
10796
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
10529
10797
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -10584,7 +10852,7 @@ class Channel extends base_1$f.EmitterBase {
|
|
|
10584
10852
|
_Channel_readyToConnect.set(this, new lazy_1$1.AsyncRetryableLazy(async () => {
|
|
10585
10853
|
await Promise.all([
|
|
10586
10854
|
this.on('disconnected', (eventPayload) => {
|
|
10587
|
-
client_1.
|
|
10855
|
+
client_1.ChannelClient.handleProviderDisconnect(eventPayload);
|
|
10588
10856
|
}),
|
|
10589
10857
|
this.on('connected', (...args) => {
|
|
10590
10858
|
__classPrivateFieldGet$7(this, _Channel_internalEmitter, "f").emit('connected', ...args);
|
|
@@ -10775,7 +11043,7 @@ class Channel extends base_1$f.EmitterBase {
|
|
|
10775
11043
|
};
|
|
10776
11044
|
const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
|
|
10777
11045
|
const strategy = await __classPrivateFieldGet$7(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
|
|
10778
|
-
const channel = new client_1.
|
|
11046
|
+
const channel = new client_1.ChannelClient(routingInfo, this.wire, strategy);
|
|
10779
11047
|
// It is the client's responsibility to handle endpoint disconnection to the provider.
|
|
10780
11048
|
// If the endpoint dies, the client will force a disconnection through the core.
|
|
10781
11049
|
// The provider does not care about endpoint disconnection.
|
|
@@ -10787,7 +11055,7 @@ class Channel extends base_1$f.EmitterBase {
|
|
|
10787
11055
|
console.warn(`Something went wrong during disconnect for client with uuid: ${routingInfo.uuid} / name: ${routingInfo.name} / endpointId: ${routingInfo.endpointId}.`);
|
|
10788
11056
|
}
|
|
10789
11057
|
finally {
|
|
10790
|
-
client_1.
|
|
11058
|
+
client_1.ChannelClient.handleProviderDisconnect(routingInfo);
|
|
10791
11059
|
}
|
|
10792
11060
|
});
|
|
10793
11061
|
return channel;
|
|
@@ -10858,7 +11126,14 @@ channel$1.Channel = Channel;
|
|
|
10858
11126
|
_Channel_connectionManager = new WeakMap(), _Channel_internalEmitter = new WeakMap(), _Channel_readyToConnect = new WeakMap();
|
|
10859
11127
|
|
|
10860
11128
|
Object.defineProperty(interappbus, "__esModule", { value: true });
|
|
10861
|
-
interappbus.InterAppPayload = void 0;
|
|
11129
|
+
interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
|
|
11130
|
+
/**
|
|
11131
|
+
* Entry point for the OpenFin `InterApplicationBus` API (`fin.InterApplicationBus`).
|
|
11132
|
+
*
|
|
11133
|
+
* * {@link InterApplicationBus} contains static members of the `InterApplicationBus` API, accessible through `fin.InterApplicationBus`.
|
|
11134
|
+
*
|
|
11135
|
+
* @packageDocumentation
|
|
11136
|
+
*/
|
|
10862
11137
|
const events_1$4 = eventsExports;
|
|
10863
11138
|
const base_1$e = base;
|
|
10864
11139
|
const ref_counter_1 = refCounter;
|
|
@@ -11050,7 +11325,7 @@ class InterApplicationBus extends base_1$e.Base {
|
|
|
11050
11325
|
return true;
|
|
11051
11326
|
}
|
|
11052
11327
|
}
|
|
11053
|
-
interappbus.
|
|
11328
|
+
interappbus.InterApplicationBus = InterApplicationBus;
|
|
11054
11329
|
/**
|
|
11055
11330
|
* @internal
|
|
11056
11331
|
*/
|
|
@@ -11067,7 +11342,15 @@ function createKey(...toHash) {
|
|
|
11067
11342
|
|
|
11068
11343
|
var clipboard = {};
|
|
11069
11344
|
|
|
11345
|
+
/**
|
|
11346
|
+
* Entry point for the OpenFin `Clipboard` API (`fin.Clipboard`).
|
|
11347
|
+
*
|
|
11348
|
+
* * {@link Clipboard} contains static members of the `Clipboard` API, accessible through `fin.Clipboard`.
|
|
11349
|
+
*
|
|
11350
|
+
* @packageDocumentation
|
|
11351
|
+
*/
|
|
11070
11352
|
Object.defineProperty(clipboard, "__esModule", { value: true });
|
|
11353
|
+
clipboard.Clipboard = void 0;
|
|
11071
11354
|
const base_1$d = base;
|
|
11072
11355
|
/**
|
|
11073
11356
|
* @PORTED
|
|
@@ -11265,7 +11548,7 @@ class Clipboard extends base_1$d.Base {
|
|
|
11265
11548
|
return payload.data;
|
|
11266
11549
|
}
|
|
11267
11550
|
}
|
|
11268
|
-
clipboard.
|
|
11551
|
+
clipboard.Clipboard = Clipboard;
|
|
11269
11552
|
|
|
11270
11553
|
var externalApplication = {};
|
|
11271
11554
|
|
|
@@ -11280,7 +11563,7 @@ const base_1$c = base;
|
|
|
11280
11563
|
/**
|
|
11281
11564
|
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
|
11282
11565
|
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
|
11283
|
-
* Discovery of connections is provided by
|
|
11566
|
+
* Discovery of connections is provided by {@link System.System.getAllExternalApplications getAllExternalApplications}.</a>
|
|
11284
11567
|
*
|
|
11285
11568
|
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
|
11286
11569
|
* - Processes which have connected to an OpenFin runtime via an adapter
|
|
@@ -11391,8 +11674,12 @@ class ExternalApplication extends base_1$c.EmitterBase {
|
|
|
11391
11674
|
Instance$4.ExternalApplication = ExternalApplication;
|
|
11392
11675
|
|
|
11393
11676
|
Object.defineProperty(Factory$5, "__esModule", { value: true });
|
|
11677
|
+
Factory$5.ExternalApplicationModule = void 0;
|
|
11394
11678
|
const base_1$b = base;
|
|
11395
11679
|
const Instance_1$4 = Instance$4;
|
|
11680
|
+
/**
|
|
11681
|
+
* Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
|
|
11682
|
+
*/
|
|
11396
11683
|
class ExternalApplicationModule extends base_1$b.Base {
|
|
11397
11684
|
/**
|
|
11398
11685
|
* Asynchronously returns an External Application object that represents an external application.
|
|
@@ -11406,7 +11693,6 @@ class ExternalApplicationModule extends base_1$b.Base {
|
|
|
11406
11693
|
* .then(extApp => console.log('wrapped external application'))
|
|
11407
11694
|
* .catch(err => console.log(err));
|
|
11408
11695
|
* ```
|
|
11409
|
-
* @static
|
|
11410
11696
|
*/
|
|
11411
11697
|
wrap(uuid) {
|
|
11412
11698
|
this.wire.sendAction('external-application-wrap').catch((e) => {
|
|
@@ -11426,7 +11712,6 @@ class ExternalApplicationModule extends base_1$b.Base {
|
|
|
11426
11712
|
* const info = await extApp.getInfo();
|
|
11427
11713
|
* console.log(info);
|
|
11428
11714
|
* ```
|
|
11429
|
-
* @static
|
|
11430
11715
|
*/
|
|
11431
11716
|
wrapSync(uuid) {
|
|
11432
11717
|
this.wire.sendAction('external-application-wrap-sync').catch((e) => {
|
|
@@ -11435,18 +11720,9 @@ class ExternalApplicationModule extends base_1$b.Base {
|
|
|
11435
11720
|
return new Instance_1$4.ExternalApplication(this.wire, { uuid });
|
|
11436
11721
|
}
|
|
11437
11722
|
}
|
|
11438
|
-
Factory$5.
|
|
11723
|
+
Factory$5.ExternalApplicationModule = ExternalApplicationModule;
|
|
11439
11724
|
|
|
11440
11725
|
(function (exports) {
|
|
11441
|
-
/**
|
|
11442
|
-
* Entry point for the OpenFin ExternalApplication namespace.
|
|
11443
|
-
*
|
|
11444
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "ExternalApplicationModule" is used for
|
|
11445
|
-
* the module containing static members of the `ExternalApplication` namespace (available under `fin.ExternalApplication`), while `ExternalApplication`
|
|
11446
|
-
* documents instances of the OpenFin `ExternalApplication` class.
|
|
11447
|
-
*
|
|
11448
|
-
* @packageDocumentation
|
|
11449
|
-
*/
|
|
11450
11726
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11451
11727
|
if (k2 === undefined) k2 = k;
|
|
11452
11728
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -11462,8 +11738,18 @@ Factory$5.default = ExternalApplicationModule;
|
|
|
11462
11738
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11463
11739
|
};
|
|
11464
11740
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11465
|
-
|
|
11466
|
-
|
|
11741
|
+
/**
|
|
11742
|
+
* Entry points for the OpenFin `ExternalApplication` API (`fin.ExternalApplication`).
|
|
11743
|
+
*
|
|
11744
|
+
* * {@link ExternalApplicationModule} contains static members of the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
|
|
11745
|
+
* * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
|
|
11746
|
+
*
|
|
11747
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
11748
|
+
* both of these were documented on the same page.
|
|
11749
|
+
*
|
|
11750
|
+
* @packageDocumentation
|
|
11751
|
+
*/
|
|
11752
|
+
__exportStar(Factory$5, exports);
|
|
11467
11753
|
__exportStar(Instance$4, exports);
|
|
11468
11754
|
} (externalApplication));
|
|
11469
11755
|
|
|
@@ -11617,9 +11903,13 @@ class _Frame extends base_1$a.EmitterBase {
|
|
|
11617
11903
|
Instance$3._Frame = _Frame;
|
|
11618
11904
|
|
|
11619
11905
|
Object.defineProperty(Factory$4, "__esModule", { value: true });
|
|
11906
|
+
Factory$4._FrameModule = void 0;
|
|
11620
11907
|
const base_1$9 = base;
|
|
11621
11908
|
const validate_1$2 = validate;
|
|
11622
11909
|
const Instance_1$3 = Instance$3;
|
|
11910
|
+
/**
|
|
11911
|
+
* Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
|
|
11912
|
+
*/
|
|
11623
11913
|
class _FrameModule extends base_1$9.Base {
|
|
11624
11914
|
/**
|
|
11625
11915
|
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
|
@@ -11631,7 +11921,6 @@ class _FrameModule extends base_1$9.Base {
|
|
|
11631
11921
|
* .then(frm => console.log('wrapped frame'))
|
|
11632
11922
|
* .catch(err => console.log(err));
|
|
11633
11923
|
* ```
|
|
11634
|
-
* @static
|
|
11635
11924
|
*/
|
|
11636
11925
|
async wrap(identity) {
|
|
11637
11926
|
this.wire.sendAction('frame-wrap').catch((e) => {
|
|
@@ -11653,7 +11942,6 @@ class _FrameModule extends base_1$9.Base {
|
|
|
11653
11942
|
* const info = await frm.getInfo();
|
|
11654
11943
|
* console.log(info);
|
|
11655
11944
|
* ```
|
|
11656
|
-
* @static
|
|
11657
11945
|
*/
|
|
11658
11946
|
wrapSync(identity) {
|
|
11659
11947
|
this.wire.sendAction('frame-wrap-sync').catch((e) => {
|
|
@@ -11674,7 +11962,6 @@ class _FrameModule extends base_1$9.Base {
|
|
|
11674
11962
|
* .then(frm => console.log('current frame'))
|
|
11675
11963
|
* .catch(err => console.log(err));
|
|
11676
11964
|
* ```
|
|
11677
|
-
* @static
|
|
11678
11965
|
*/
|
|
11679
11966
|
getCurrent() {
|
|
11680
11967
|
this.wire.sendAction('frame-get-current').catch((e) => {
|
|
@@ -11691,7 +11978,6 @@ class _FrameModule extends base_1$9.Base {
|
|
|
11691
11978
|
* const info = await frm.getInfo();
|
|
11692
11979
|
* console.log(info);
|
|
11693
11980
|
* ```
|
|
11694
|
-
* @static
|
|
11695
11981
|
*/
|
|
11696
11982
|
getCurrentSync() {
|
|
11697
11983
|
this.wire.sendAction('frame-get-current-sync').catch((e) => {
|
|
@@ -11700,17 +11986,19 @@ class _FrameModule extends base_1$9.Base {
|
|
|
11700
11986
|
return new Instance_1$3._Frame(this.wire, this.wire.environment.getCurrentEntityIdentity());
|
|
11701
11987
|
}
|
|
11702
11988
|
}
|
|
11703
|
-
Factory$4.
|
|
11989
|
+
Factory$4._FrameModule = _FrameModule;
|
|
11704
11990
|
|
|
11705
11991
|
(function (exports) {
|
|
11706
11992
|
/**
|
|
11707
|
-
* Entry
|
|
11993
|
+
* Entry points for the OpenFin `Frame` API (`fin.Frame`).
|
|
11994
|
+
*
|
|
11995
|
+
* * {@link _FrameModule} contains static members of the `Frame` API, accessible through `fin.Frame`.
|
|
11996
|
+
* * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
|
|
11708
11997
|
*
|
|
11709
|
-
*
|
|
11710
|
-
*
|
|
11711
|
-
* instances of the OpenFin `Frame` class.
|
|
11998
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
11999
|
+
* both of these were documented on the same page.
|
|
11712
12000
|
*
|
|
11713
|
-
*
|
|
12001
|
+
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
|
11714
12002
|
*
|
|
11715
12003
|
* @packageDocumentation
|
|
11716
12004
|
*/
|
|
@@ -11729,14 +12017,14 @@ Factory$4.default = _FrameModule;
|
|
|
11729
12017
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11730
12018
|
};
|
|
11731
12019
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11732
|
-
|
|
11733
|
-
exports.default = Factory_1.default;
|
|
12020
|
+
__exportStar(Factory$4, exports);
|
|
11734
12021
|
__exportStar(Instance$3, exports);
|
|
11735
12022
|
} (frame));
|
|
11736
12023
|
|
|
11737
12024
|
var globalHotkey = {};
|
|
11738
12025
|
|
|
11739
12026
|
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
|
12027
|
+
globalHotkey.GlobalHotkey = void 0;
|
|
11740
12028
|
const base_1$8 = base;
|
|
11741
12029
|
/**
|
|
11742
12030
|
* The GlobalHotkey module can register/unregister a global hotkeys.
|
|
@@ -11866,7 +12154,7 @@ class GlobalHotkey extends base_1$8.EmitterBase {
|
|
|
11866
12154
|
return data;
|
|
11867
12155
|
}
|
|
11868
12156
|
}
|
|
11869
|
-
globalHotkey.
|
|
12157
|
+
globalHotkey.GlobalHotkey = GlobalHotkey;
|
|
11870
12158
|
|
|
11871
12159
|
var platform = {};
|
|
11872
12160
|
|
|
@@ -11889,10 +12177,8 @@ const validate_1$1 = validate;
|
|
|
11889
12177
|
const clientMap = new Map();
|
|
11890
12178
|
/** Manages the life cycle of windows and views in the application.
|
|
11891
12179
|
*
|
|
11892
|
-
* Enables taking snapshots of itself and
|
|
11893
|
-
* ng them to restore a previous configuration
|
|
12180
|
+
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
|
11894
12181
|
* as well as listen to {@link OpenFin.PlatformEvents platform events}.
|
|
11895
|
-
*
|
|
11896
12182
|
*/
|
|
11897
12183
|
class Platform extends base_1$7.EmitterBase {
|
|
11898
12184
|
/**
|
|
@@ -12251,12 +12537,11 @@ class Platform extends base_1$7.EmitterBase {
|
|
|
12251
12537
|
});
|
|
12252
12538
|
}
|
|
12253
12539
|
/**
|
|
12254
|
-
* ***DEPRECATED - please use Platform.createView.***
|
|
12540
|
+
* ***DEPRECATED - please use {@link Platform.createView Platform.createView}.***
|
|
12255
12541
|
* Reparents a specified view in a new target window.
|
|
12256
12542
|
* @param viewIdentity View identity
|
|
12257
12543
|
* @param target new owner window identity
|
|
12258
12544
|
*
|
|
12259
|
-
* @tutorial Platform.createView
|
|
12260
12545
|
*/
|
|
12261
12546
|
async reparentView(viewIdentity, target) {
|
|
12262
12547
|
var _a;
|
|
@@ -12717,7 +13002,7 @@ var Instance$1 = {};
|
|
|
12717
13002
|
var commonUtils = {};
|
|
12718
13003
|
|
|
12719
13004
|
Object.defineProperty(commonUtils, "__esModule", { value: true });
|
|
12720
|
-
commonUtils.isValidPresetType = void 0;
|
|
13005
|
+
commonUtils.overrideFromComposables = commonUtils.isValidPresetType = void 0;
|
|
12721
13006
|
function isValidPresetType(type) {
|
|
12722
13007
|
switch (type) {
|
|
12723
13008
|
case 'columns':
|
|
@@ -12730,6 +13015,10 @@ function isValidPresetType(type) {
|
|
|
12730
13015
|
}
|
|
12731
13016
|
}
|
|
12732
13017
|
commonUtils.isValidPresetType = isValidPresetType;
|
|
13018
|
+
function overrideFromComposables(...overrides) {
|
|
13019
|
+
return (base) => overrides.reduceRight((p, c) => (b) => c(p(b)), (x) => x)(base);
|
|
13020
|
+
}
|
|
13021
|
+
commonUtils.overrideFromComposables = overrideFromComposables;
|
|
12733
13022
|
commonUtils.default = { isValidPresetType };
|
|
12734
13023
|
|
|
12735
13024
|
var __classPrivateFieldGet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
@@ -12746,6 +13035,138 @@ const base_1$6 = base;
|
|
|
12746
13035
|
const common_utils_1 = commonUtils;
|
|
12747
13036
|
const layout_entities_1 = layoutEntities;
|
|
12748
13037
|
const layout_constants_1 = layout_constants;
|
|
13038
|
+
/**
|
|
13039
|
+
*
|
|
13040
|
+
* Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
|
13041
|
+
* enables the initialization and manipulation of a window's Layout. A Layout will
|
|
13042
|
+
* emit events locally on the DOM element representing the layout-container.
|
|
13043
|
+
*
|
|
13044
|
+
*
|
|
13045
|
+
* ### Layout.DOMEvents
|
|
13046
|
+
*
|
|
13047
|
+
* When a Layout is created, it emits events onto the DOM element representing the Layout container.
|
|
13048
|
+
* This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
|
|
13049
|
+
* You can use the built-in event emitter to listen to these events using [addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener).
|
|
13050
|
+
* The events are emitted synchronously and only in the process where the Layout exists.
|
|
13051
|
+
* Any values returned by the called listeners are ignored and will be discarded.
|
|
13052
|
+
* If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
|
|
13053
|
+
*
|
|
13054
|
+
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
13055
|
+
*
|
|
13056
|
+
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
|
|
13057
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
13058
|
+
* @example
|
|
13059
|
+
* ```js
|
|
13060
|
+
* const myLayoutContainer = document.getElementById('layout-container');
|
|
13061
|
+
*
|
|
13062
|
+
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
13063
|
+
* const { tabSelector } = event.detail;
|
|
13064
|
+
* const tabElement = document.getElementById(tabSelector);
|
|
13065
|
+
* const existingColor = tabElement.style.backgroundColor;
|
|
13066
|
+
* tabElement.style.backgroundColor = "red";
|
|
13067
|
+
* setTimeout(() => {
|
|
13068
|
+
* tabElement.style.backgroundColor = existingColor;
|
|
13069
|
+
* }, 2000);
|
|
13070
|
+
* });
|
|
13071
|
+
* ```
|
|
13072
|
+
*
|
|
13073
|
+
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
|
|
13074
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
|
13075
|
+
* @example
|
|
13076
|
+
* ```js
|
|
13077
|
+
* const myLayoutContainer = document.getElementById('layout-container');
|
|
13078
|
+
*
|
|
13079
|
+
* const listener = function(event) {
|
|
13080
|
+
* console.log(event.detail);
|
|
13081
|
+
* console.log('container-created event fired once, removing listener');
|
|
13082
|
+
* myLayoutContainer.removeEventListener('container-created', listener);
|
|
13083
|
+
* };
|
|
13084
|
+
*
|
|
13085
|
+
* myLayoutContainer.addEventListener('container-created', listener);
|
|
13086
|
+
* ```
|
|
13087
|
+
*
|
|
13088
|
+
* ### Supported event types are:
|
|
13089
|
+
*
|
|
13090
|
+
* * tab-created
|
|
13091
|
+
* * container-created
|
|
13092
|
+
* * layout-state-changed
|
|
13093
|
+
* * tab-closed
|
|
13094
|
+
* * tab-dropped
|
|
13095
|
+
*
|
|
13096
|
+
* ### Layout DOM Node Events
|
|
13097
|
+
*
|
|
13098
|
+
* #### tab-created
|
|
13099
|
+
* Generated when a tab is created. As a user drags and drops tabs within window, new tabs are created. A single view may have multiple tabs created and destroyed during its lifetime attached to a single window.
|
|
13100
|
+
* ```js
|
|
13101
|
+
* // The response has the following shape in event.detail:
|
|
13102
|
+
* {
|
|
13103
|
+
* containerSelector: "container-component_A",
|
|
13104
|
+
* name: "component_A",
|
|
13105
|
+
* tabSelector: "tab-component_A",
|
|
13106
|
+
* topic: "openfin-DOM-event",
|
|
13107
|
+
* type: "tab-created",
|
|
13108
|
+
* uuid: "OpenFin POC"
|
|
13109
|
+
* }
|
|
13110
|
+
* ```
|
|
13111
|
+
*
|
|
13112
|
+
* #### container-created
|
|
13113
|
+
* Generated when a container is created. A single view will have only one container during its lifetime attached to a single window and the container's lifecycle is tied to the view. To discover when the container is destroyed, please listen to view-detached event.
|
|
13114
|
+
* ```js
|
|
13115
|
+
* // The response has the following shape in event.detail:
|
|
13116
|
+
* {
|
|
13117
|
+
* containerSelector: "container-component_A",
|
|
13118
|
+
* name: "component_A",
|
|
13119
|
+
* tabSelector: "tab-component_A",
|
|
13120
|
+
* topic: "openfin-DOM-event",
|
|
13121
|
+
* type: "container-created",
|
|
13122
|
+
* uuid: "OpenFin POC"
|
|
13123
|
+
* }
|
|
13124
|
+
* ```
|
|
13125
|
+
*
|
|
13126
|
+
* ### layout-state-changed
|
|
13127
|
+
* Generated when the state of the layout changes in any way, such as a view added/removed/replaced. Note that this event can fire frequently as the underlying layout can change multiple components from all kinds of changes (resizing for example). Given this, it is recommended to debounce this event and then you can use the {@link Layout#getConfig Layout.getConfig} API to retrieve the most up-to-date state.
|
|
13128
|
+
* ```js
|
|
13129
|
+
* // The response has the following shape in event.detail
|
|
13130
|
+
* {
|
|
13131
|
+
* containerSelector: "container-component_A",
|
|
13132
|
+
* name: "component_A",
|
|
13133
|
+
* tabSelector: "tab-component_A",
|
|
13134
|
+
* topic: "openfin-DOM-event",
|
|
13135
|
+
* type: "layout-state-changed",
|
|
13136
|
+
* uuid: "OpenFin POC"
|
|
13137
|
+
* }
|
|
13138
|
+
* ```
|
|
13139
|
+
*
|
|
13140
|
+
* #### tab-closed
|
|
13141
|
+
* Generated when a tab is closed.
|
|
13142
|
+
* ```js
|
|
13143
|
+
* // The response has the following shape in event.detail:
|
|
13144
|
+
* {
|
|
13145
|
+
* containerSelector: "container-component_A",
|
|
13146
|
+
* name: "component_A",
|
|
13147
|
+
* tabSelector: "tab-component_A",
|
|
13148
|
+
* topic: "openfin-DOM-event",
|
|
13149
|
+
* type: "tab-closed",
|
|
13150
|
+
* uuid: "OpenFin POC",
|
|
13151
|
+
* url: "http://openfin.co" // The url of the view that was closed.
|
|
13152
|
+
* }
|
|
13153
|
+
* ```
|
|
13154
|
+
*
|
|
13155
|
+
* #### tab-dropped
|
|
13156
|
+
* Generated when a tab is dropped.
|
|
13157
|
+
* ```js
|
|
13158
|
+
* // The response has the following shape in event.detail:
|
|
13159
|
+
* {
|
|
13160
|
+
* containerSelector: "container-component_A",
|
|
13161
|
+
* name: "component_A",
|
|
13162
|
+
* tabSelector: "tab-component_A",
|
|
13163
|
+
* topic: "openfin-DOM-event",
|
|
13164
|
+
* type: "tab-dropped",
|
|
13165
|
+
* uuid: "OpenFin POC",
|
|
13166
|
+
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
|
13167
|
+
* }
|
|
13168
|
+
* ```
|
|
13169
|
+
*/
|
|
12749
13170
|
class Layout extends base_1$6.Base {
|
|
12750
13171
|
/**
|
|
12751
13172
|
* @internal
|
|
@@ -12973,20 +13394,50 @@ Factory$2.LayoutModule = void 0;
|
|
|
12973
13394
|
/* eslint-disable no-undef, import/prefer-default-export */
|
|
12974
13395
|
const base_1$5 = base;
|
|
12975
13396
|
const Instance_1$2 = Instance$1;
|
|
13397
|
+
/**
|
|
13398
|
+
* Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
|
|
13399
|
+
*/
|
|
12976
13400
|
class LayoutModule extends base_1$5.Base {
|
|
12977
13401
|
constructor() {
|
|
12978
13402
|
super(...arguments);
|
|
12979
13403
|
_LayoutModule_layoutInitializationAttempted.set(this, false);
|
|
12980
13404
|
/**
|
|
12981
|
-
* Initialize the window's Layout.
|
|
13405
|
+
* Initialize the window's Layout.
|
|
13406
|
+
*
|
|
13407
|
+
* @remarks Must be called from a custom window that has a 'layout' option set upon creation of that window.
|
|
12982
13408
|
* If a containerId is not provided, this method attempts to find an element with the id `layout-container`.
|
|
12983
|
-
* A Layout will
|
|
13409
|
+
* A Layout will emit events locally on the DOM element representing the layout-container.
|
|
12984
13410
|
* In order to capture the relevant events during Layout initiation, set up the listeners on the DOM element prior to calling `init`.
|
|
12985
13411
|
* @param options - Layout init options.
|
|
12986
13412
|
*
|
|
12987
|
-
* @static
|
|
12988
13413
|
* @experimental
|
|
12989
|
-
*
|
|
13414
|
+
*
|
|
13415
|
+
* @example
|
|
13416
|
+
* ```js
|
|
13417
|
+
* // If no options are included, the layout in the window options is initialized in an element with the id `layout-container`
|
|
13418
|
+
* const layout = await fin.Platform.Layout.init();
|
|
13419
|
+
* ```
|
|
13420
|
+
* <br>
|
|
13421
|
+
*
|
|
13422
|
+
* ```js
|
|
13423
|
+
* const containerId = 'my-custom-container-id';
|
|
13424
|
+
*
|
|
13425
|
+
* const myLayoutContainer = document.getElementById(containerId);
|
|
13426
|
+
*
|
|
13427
|
+
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
13428
|
+
* const { tabSelector } = event.detail;
|
|
13429
|
+
* const tabElement = document.getElementById(tabSelector);
|
|
13430
|
+
* const existingColor = tabElement.style.backgroundColor;
|
|
13431
|
+
* tabElement.style.backgroundColor = "red";
|
|
13432
|
+
* setTimeout(() => {
|
|
13433
|
+
* tabElement.style.backgroundColor = existingColor;
|
|
13434
|
+
* }, 2000);
|
|
13435
|
+
* });
|
|
13436
|
+
*
|
|
13437
|
+
* // initialize the layout into an existing HTML element with the div `my-custom-container-id`
|
|
13438
|
+
* // the window must have been created with a layout in its window options
|
|
13439
|
+
* const layout = await fin.Platform.Layout.init({ containerId });
|
|
13440
|
+
* ```
|
|
12990
13441
|
*/
|
|
12991
13442
|
this.init = async (options = {}) => {
|
|
12992
13443
|
this.wire.sendAction('layout-init').catch((e) => {
|
|
@@ -13004,7 +13455,6 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13004
13455
|
}
|
|
13005
13456
|
/**
|
|
13006
13457
|
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
13007
|
-
* @param identity
|
|
13008
13458
|
*
|
|
13009
13459
|
* @example
|
|
13010
13460
|
* ```js
|
|
@@ -13021,9 +13471,7 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13021
13471
|
* // Use wrapped instance to control layout, e.g.:
|
|
13022
13472
|
* const layoutConfig = await layout.getConfig();
|
|
13023
13473
|
* ```
|
|
13024
|
-
* @static
|
|
13025
13474
|
*/
|
|
13026
|
-
// eslint-disable-next-line class-methods-use-this
|
|
13027
13475
|
async wrap(identity) {
|
|
13028
13476
|
this.wire.sendAction('layout-wrap').catch((e) => {
|
|
13029
13477
|
// don't expose
|
|
@@ -13032,7 +13480,6 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13032
13480
|
}
|
|
13033
13481
|
/**
|
|
13034
13482
|
* Synchronously returns a Layout object that represents a Window's layout.
|
|
13035
|
-
* @param identity
|
|
13036
13483
|
*
|
|
13037
13484
|
* @example
|
|
13038
13485
|
* ```js
|
|
@@ -13049,9 +13496,7 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13049
13496
|
* // Use wrapped instance to control layout, e.g.:
|
|
13050
13497
|
* const layoutConfig = await layout.getConfig();
|
|
13051
13498
|
* ```
|
|
13052
|
-
* @static
|
|
13053
13499
|
*/
|
|
13054
|
-
// eslint-disable-next-line class-methods-use-this
|
|
13055
13500
|
wrapSync(identity) {
|
|
13056
13501
|
this.wire.sendAction('layout-wrap-sync').catch((e) => {
|
|
13057
13502
|
// don't expose
|
|
@@ -13067,7 +13512,6 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13067
13512
|
* // Use wrapped instance to control layout, e.g.:
|
|
13068
13513
|
* const layoutConfig = await layout.getConfig();
|
|
13069
13514
|
* ```
|
|
13070
|
-
* @static
|
|
13071
13515
|
*/
|
|
13072
13516
|
async getCurrent() {
|
|
13073
13517
|
this.wire.sendAction('layout-get-current').catch((e) => {
|
|
@@ -13091,7 +13535,6 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13091
13535
|
* // Use wrapped instance to control layout, e.g.:
|
|
13092
13536
|
* const layoutConfig = await layout.getConfig();
|
|
13093
13537
|
* ```
|
|
13094
|
-
* @static
|
|
13095
13538
|
*/
|
|
13096
13539
|
getCurrentSync() {
|
|
13097
13540
|
this.wire.sendAction('layout-get-current-sync').catch((e) => {
|
|
@@ -13109,13 +13552,16 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
|
13109
13552
|
|
|
13110
13553
|
(function (exports) {
|
|
13111
13554
|
/**
|
|
13112
|
-
* Entry point for the OpenFin Layout
|
|
13555
|
+
* Entry point for the OpenFin `Layout` subset of the `Platform` API (`fin.Platform.Layout`).
|
|
13556
|
+
*
|
|
13557
|
+
* * {@link LayoutModule} contains static members of the `Layout` API, accessible through `fin.Platform.Layout`.
|
|
13558
|
+
* * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
|
|
13113
13559
|
*
|
|
13114
|
-
*
|
|
13115
|
-
*
|
|
13116
|
-
* instances of the OpenFin `Layout` class.
|
|
13560
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
13561
|
+
* both of these were documented on the same page.
|
|
13117
13562
|
*
|
|
13118
13563
|
* @packageDocumentation
|
|
13564
|
+
*
|
|
13119
13565
|
*/
|
|
13120
13566
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13121
13567
|
if (k2 === undefined) k2 = k;
|
|
@@ -13137,9 +13583,13 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
|
13137
13583
|
} (layout));
|
|
13138
13584
|
|
|
13139
13585
|
Object.defineProperty(Factory$3, "__esModule", { value: true });
|
|
13586
|
+
Factory$3.PlatformModule = void 0;
|
|
13140
13587
|
const base_1$4 = base;
|
|
13141
13588
|
const Instance_1$1 = Instance$2;
|
|
13142
13589
|
const index_1$1 = layout;
|
|
13590
|
+
/**
|
|
13591
|
+
* Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
|
|
13592
|
+
*/
|
|
13143
13593
|
class PlatformModule extends base_1$4.Base {
|
|
13144
13594
|
/**
|
|
13145
13595
|
* @internal
|
|
@@ -13205,14 +13655,12 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13205
13655
|
* fin.Platform.init({overrideCallback});
|
|
13206
13656
|
* ```
|
|
13207
13657
|
* @experimental
|
|
13208
|
-
* @static
|
|
13209
13658
|
*/
|
|
13210
13659
|
async init(options) {
|
|
13211
13660
|
return this.wire.environment.initPlatform(this.fin, options);
|
|
13212
13661
|
}
|
|
13213
13662
|
/**
|
|
13214
13663
|
* Asynchronously returns a Platform object that represents an existing platform.
|
|
13215
|
-
* @param identity
|
|
13216
13664
|
*
|
|
13217
13665
|
* @example
|
|
13218
13666
|
* ```js
|
|
@@ -13221,7 +13669,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13221
13669
|
* // Use wrapped instance to control layout, e.g.:
|
|
13222
13670
|
* const snapshot = await platform.getSnapshot();
|
|
13223
13671
|
* ```
|
|
13224
|
-
* @static
|
|
13225
13672
|
*/
|
|
13226
13673
|
async wrap(identity) {
|
|
13227
13674
|
this.wire.sendAction('platform-wrap').catch((e) => {
|
|
@@ -13231,7 +13678,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13231
13678
|
}
|
|
13232
13679
|
/**
|
|
13233
13680
|
* Synchronously returns a Platform object that represents an existing platform.
|
|
13234
|
-
* @param identity
|
|
13235
13681
|
*
|
|
13236
13682
|
* @example
|
|
13237
13683
|
* ```js
|
|
@@ -13240,7 +13686,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13240
13686
|
* // Use wrapped instance to control layout, e.g.:
|
|
13241
13687
|
* const snapshot = await platform.getSnapshot();
|
|
13242
13688
|
* ```
|
|
13243
|
-
* @static
|
|
13244
13689
|
*/
|
|
13245
13690
|
wrapSync(identity) {
|
|
13246
13691
|
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
|
@@ -13257,7 +13702,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13257
13702
|
* // Use wrapped instance to control layout, e.g.:
|
|
13258
13703
|
* const snapshot = await platform.getSnapshot();
|
|
13259
13704
|
* ```
|
|
13260
|
-
* @static
|
|
13261
13705
|
*/
|
|
13262
13706
|
async getCurrent() {
|
|
13263
13707
|
this.wire.sendAction('platform-get-current').catch((e) => {
|
|
@@ -13274,7 +13718,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13274
13718
|
* // Use wrapped instance to control layout, e.g.:
|
|
13275
13719
|
* const snapshot = await platform.getSnapshot();
|
|
13276
13720
|
* ```
|
|
13277
|
-
* @static
|
|
13278
13721
|
*/
|
|
13279
13722
|
getCurrentSync() {
|
|
13280
13723
|
this.wire.sendAction('platform-get-current-sync').catch((e) => {
|
|
@@ -13285,7 +13728,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13285
13728
|
/**
|
|
13286
13729
|
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
|
13287
13730
|
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
|
13288
|
-
* @param platformOptions
|
|
13289
13731
|
*
|
|
13290
13732
|
* @example
|
|
13291
13733
|
* ```js
|
|
@@ -13306,7 +13748,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13306
13748
|
* console.error(e);
|
|
13307
13749
|
* }
|
|
13308
13750
|
* ```
|
|
13309
|
-
* @static
|
|
13310
13751
|
*/
|
|
13311
13752
|
start(platformOptions) {
|
|
13312
13753
|
this.wire.sendAction('platform-start').catch((e) => {
|
|
@@ -13351,7 +13792,6 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13351
13792
|
* console.error(e);
|
|
13352
13793
|
* }
|
|
13353
13794
|
* ```
|
|
13354
|
-
* @static
|
|
13355
13795
|
*/
|
|
13356
13796
|
startFromManifest(manifestUrl, opts) {
|
|
13357
13797
|
this.wire.sendAction('platform-start-from-manifest').catch((e) => {
|
|
@@ -13374,18 +13814,9 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13374
13814
|
});
|
|
13375
13815
|
}
|
|
13376
13816
|
}
|
|
13377
|
-
Factory$3.
|
|
13817
|
+
Factory$3.PlatformModule = PlatformModule;
|
|
13378
13818
|
|
|
13379
13819
|
(function (exports) {
|
|
13380
|
-
/**
|
|
13381
|
-
* Entry point for the OpenFin Platform namespace.
|
|
13382
|
-
*
|
|
13383
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "PlatformModule" is used for
|
|
13384
|
-
* the module containing static members of the `Platform` namespace (available under `fin.Platform`), while `Platform` documents
|
|
13385
|
-
* instances of the OpenFin `Platform` class.
|
|
13386
|
-
*
|
|
13387
|
-
* @packageDocumentation
|
|
13388
|
-
*/
|
|
13389
13820
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13390
13821
|
if (k2 === undefined) k2 = k;
|
|
13391
13822
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -13401,8 +13832,18 @@ Factory$3.default = PlatformModule;
|
|
|
13401
13832
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
13402
13833
|
};
|
|
13403
13834
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13404
|
-
|
|
13405
|
-
|
|
13835
|
+
/**
|
|
13836
|
+
* Entry points for the OpenFin `Platform` API (`fin.Platform`)
|
|
13837
|
+
*
|
|
13838
|
+
* * {@link PlatformModule} contains static members of the `Platform` API, accessible through `fin.Platform`.
|
|
13839
|
+
* * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
|
|
13840
|
+
*
|
|
13841
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
13842
|
+
* both of these were documented on the same page.
|
|
13843
|
+
*
|
|
13844
|
+
* @packageDocumentation
|
|
13845
|
+
*/
|
|
13846
|
+
__exportStar(Factory$3, exports);
|
|
13406
13847
|
__exportStar(Instance$2, exports);
|
|
13407
13848
|
} (platform));
|
|
13408
13849
|
|
|
@@ -14650,7 +15091,8 @@ function requireInteropBroker () {
|
|
|
14650
15091
|
* ```
|
|
14651
15092
|
*/
|
|
14652
15093
|
// eslint-disable-next-line class-methods-use-this
|
|
14653
|
-
async handleFiredIntent(intent, clientIdentity)
|
|
15094
|
+
async handleFiredIntent(intent, clientIdentity // TODO(CORE-811): remove inline intersected type
|
|
15095
|
+
) {
|
|
14654
15096
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.raiseIntent', 'InteropBroker.handleFiredIntent', clientIdentity, 'interopClient.fireIntent');
|
|
14655
15097
|
console.warn(warning);
|
|
14656
15098
|
throw new Error(utils_1.BROKER_ERRORS.fireIntent);
|
|
@@ -14717,7 +15159,7 @@ function requireInteropBroker () {
|
|
|
14717
15159
|
* More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
|
|
14718
15160
|
*
|
|
14719
15161
|
* @param options
|
|
14720
|
-
* @param
|
|
15162
|
+
* @param clientIdentity Identity of the Client making the request.
|
|
14721
15163
|
*
|
|
14722
15164
|
* @example
|
|
14723
15165
|
* ```js
|
|
@@ -14734,7 +15176,8 @@ function requireInteropBroker () {
|
|
|
14734
15176
|
* ```
|
|
14735
15177
|
*/
|
|
14736
15178
|
// eslint-disable-next-line class-methods-use-this
|
|
14737
|
-
async handleInfoForIntent(options, clientIdentity)
|
|
15179
|
+
async handleInfoForIntent(options, clientIdentity // TODO(CORE-811): remove inline intersected type
|
|
15180
|
+
) {
|
|
14738
15181
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntent', 'InteropBroker.handleInfoForIntent', clientIdentity, 'interopClient.getInfoForIntent');
|
|
14739
15182
|
console.warn(warning);
|
|
14740
15183
|
throw new Error(utils_1.BROKER_ERRORS.getInfoForIntent);
|
|
@@ -14780,7 +15223,8 @@ function requireInteropBroker () {
|
|
|
14780
15223
|
* ```
|
|
14781
15224
|
*/
|
|
14782
15225
|
// eslint-disable-next-line class-methods-use-this
|
|
14783
|
-
async handleInfoForIntentsByContext(context, clientIdentity)
|
|
15226
|
+
async handleInfoForIntentsByContext(context, clientIdentity // TODO(CORE-811): remove inline intersected type
|
|
15227
|
+
) {
|
|
14784
15228
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntentsByContext', 'InteropBroker.handleInfoForIntentsByContext', clientIdentity, 'interopClient.getInfoForIntentsByContext');
|
|
14785
15229
|
console.warn(warning);
|
|
14786
15230
|
throw new Error(utils_1.BROKER_ERRORS.getInfoForIntentsByContext);
|
|
@@ -14806,7 +15250,7 @@ function requireInteropBroker () {
|
|
|
14806
15250
|
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
|
|
14807
15251
|
*
|
|
14808
15252
|
* @param contextForIntent Data passed between entities and applications.
|
|
14809
|
-
* @param
|
|
15253
|
+
* @param clientIdentity Identity of the Client making the request.
|
|
14810
15254
|
*
|
|
14811
15255
|
* @example
|
|
14812
15256
|
* ```js
|
|
@@ -14867,7 +15311,7 @@ function requireInteropBroker () {
|
|
|
14867
15311
|
/**
|
|
14868
15312
|
* Responsible for resolving the fdc3.findInstances call.
|
|
14869
15313
|
* Must be overridden
|
|
14870
|
-
* @param
|
|
15314
|
+
* @param app AppIdentifier that was passed to fdc3.findInstances
|
|
14871
15315
|
* @param clientIdentity Identity of the Client making the request.
|
|
14872
15316
|
*/
|
|
14873
15317
|
// eslint-disable-next-line class-methods-use-this
|
|
@@ -14902,7 +15346,7 @@ function requireInteropBroker () {
|
|
|
14902
15346
|
* fin.Platform.init({
|
|
14903
15347
|
* interopOverride: async (InteropBroker) => {
|
|
14904
15348
|
* class Override extends InteropBroker {
|
|
14905
|
-
* async invokeContextHandler(
|
|
15349
|
+
* async invokeContextHandler(clientIdentity, handlerId, context) {
|
|
14906
15350
|
* return super.invokeContextHandler(clientIdentity, handlerId, {
|
|
14907
15351
|
* ...context,
|
|
14908
15352
|
* contextMetadata: {
|
|
@@ -14942,7 +15386,7 @@ function requireInteropBroker () {
|
|
|
14942
15386
|
* fin.Platform.init({
|
|
14943
15387
|
* interopOverride: async (InteropBroker) => {
|
|
14944
15388
|
* class Override extends InteropBroker {
|
|
14945
|
-
* async invokeIntentHandler(
|
|
15389
|
+
* async invokeIntentHandler(clientIdentity, handlerId, context) {
|
|
14946
15390
|
* const { context } = intent;
|
|
14947
15391
|
* return super.invokeIntentHandler(clientIdentity, handlerId, {
|
|
14948
15392
|
* ...intent,
|
|
@@ -15281,7 +15725,8 @@ function requireInteropBroker () {
|
|
|
15281
15725
|
}
|
|
15282
15726
|
// Setup Channel Connection Logic
|
|
15283
15727
|
wireChannel(channel) {
|
|
15284
|
-
channel.onConnection(async (clientIdentity,
|
|
15728
|
+
channel.onConnection(async (clientIdentity, // TODO(CORE-811): remove inline intersected type
|
|
15729
|
+
payload) => {
|
|
15285
15730
|
if (!(await this.isConnectionAuthorized(clientIdentity, payload))) {
|
|
15286
15731
|
throw new Error(`Connection not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
|
|
15287
15732
|
}
|
|
@@ -16208,12 +16653,14 @@ function requireFactory () {
|
|
|
16208
16653
|
if (hasRequiredFactory) return Factory$1;
|
|
16209
16654
|
hasRequiredFactory = 1;
|
|
16210
16655
|
Object.defineProperty(Factory$1, "__esModule", { value: true });
|
|
16656
|
+
Factory$1.InteropModule = void 0;
|
|
16211
16657
|
const lodash_1 = require$$3;
|
|
16212
16658
|
const inaccessibleObject_1 = inaccessibleObject;
|
|
16213
16659
|
const base_1 = base;
|
|
16214
16660
|
const InteropBroker_1 = requireInteropBroker();
|
|
16215
16661
|
const InteropClient_1 = InteropClient$1;
|
|
16216
16662
|
const overrideCheck_1 = requireOverrideCheck();
|
|
16663
|
+
const common_utils_1 = commonUtils;
|
|
16217
16664
|
const defaultOverride = (Class) => new Class();
|
|
16218
16665
|
const BrokerParamAccessError = 'You have attempted to use or modify InteropBroker parameters, which is not allowed. You are likely using an older InteropBroker override scheme. Please consult our Interop docs for guidance on migrating to the new override scheme.';
|
|
16219
16666
|
/**
|
|
@@ -16235,7 +16682,7 @@ function requireFactory () {
|
|
|
16235
16682
|
* when not using a Platform app. You can override functions in the Interop Broker. More info {@link InteropBroker here}.
|
|
16236
16683
|
*
|
|
16237
16684
|
* @param name - Name of the Interop Broker.
|
|
16238
|
-
* @param override - A callback function that can be used to extend or replace default Interop Broker behavior.
|
|
16685
|
+
* @param override - A callback function or array of callback functions that can be used to extend or replace default Interop Broker behavior.
|
|
16239
16686
|
*
|
|
16240
16687
|
* @example
|
|
16241
16688
|
* ``` js
|
|
@@ -16243,11 +16690,10 @@ function requireFactory () {
|
|
|
16243
16690
|
* const contextGroups = await interopBroker.getContextGroups();
|
|
16244
16691
|
* console.log(contextGroups);
|
|
16245
16692
|
* ```
|
|
16246
|
-
* @static
|
|
16247
16693
|
*/
|
|
16248
16694
|
async init(name, override = defaultOverride) {
|
|
16249
16695
|
var _a;
|
|
16250
|
-
this.wire.sendAction('interop-init').catch((
|
|
16696
|
+
this.wire.sendAction('interop-init').catch(() => {
|
|
16251
16697
|
// don't expose, analytics-only call
|
|
16252
16698
|
});
|
|
16253
16699
|
// Allows for manifest-level configuration, without having to override. (e.g. specifying custom context groups)
|
|
@@ -16267,9 +16713,18 @@ function requireFactory () {
|
|
|
16267
16713
|
throw new Error(BrokerParamAccessError);
|
|
16268
16714
|
};
|
|
16269
16715
|
const OverrideableBroker = InteropBroker_1.InteropBroker.createClosedConstructor(this.wire, getProvider, opts);
|
|
16270
|
-
|
|
16271
|
-
|
|
16272
|
-
|
|
16716
|
+
let broker;
|
|
16717
|
+
if (Array.isArray(override)) {
|
|
16718
|
+
const BrokerConstructor = (0, common_utils_1.overrideFromComposables)(...override)(OverrideableBroker);
|
|
16719
|
+
// We need to use these objects because removing them entirely would be a breaking change and we want an informative error
|
|
16720
|
+
// @ts-expect-error
|
|
16721
|
+
broker = new BrokerConstructor(objectThatThrows, throwingGetProvider, warningOptsClone);
|
|
16722
|
+
}
|
|
16723
|
+
else {
|
|
16724
|
+
// We need to use these objects because removing them entirely would be a breaking change and we want an informative error
|
|
16725
|
+
// @ts-expect-error
|
|
16726
|
+
broker = await override(OverrideableBroker, objectThatThrows, throwingGetProvider, warningOptsClone);
|
|
16727
|
+
}
|
|
16273
16728
|
(0, overrideCheck_1.overrideCheck)(broker, (0, overrideCheck_1.getDefaultViewFdc3VersionFromAppInfo)(options));
|
|
16274
16729
|
return broker;
|
|
16275
16730
|
}
|
|
@@ -16292,16 +16747,15 @@ function requireFactory () {
|
|
|
16292
16747
|
* const contextGroupInfo = await client.getInfoForContextGroup();
|
|
16293
16748
|
* console.log(contextGroupInfo);
|
|
16294
16749
|
* ```
|
|
16295
|
-
* @static
|
|
16296
16750
|
*/
|
|
16297
16751
|
connectSync(name, interopConfig) {
|
|
16298
|
-
this.wire.sendAction('interop-connect-sync').catch((
|
|
16752
|
+
this.wire.sendAction('interop-connect-sync').catch(() => {
|
|
16299
16753
|
// don't expose, analytics-only call
|
|
16300
16754
|
});
|
|
16301
16755
|
return new InteropClient_1.InteropClient(this.wire, name, interopConfig);
|
|
16302
16756
|
}
|
|
16303
16757
|
}
|
|
16304
|
-
Factory$1.
|
|
16758
|
+
Factory$1.InteropModule = InteropModule;
|
|
16305
16759
|
return Factory$1;
|
|
16306
16760
|
}
|
|
16307
16761
|
|
|
@@ -16312,10 +16766,10 @@ function requireInterop () {
|
|
|
16312
16766
|
hasRequiredInterop = 1;
|
|
16313
16767
|
(function (exports) {
|
|
16314
16768
|
/**
|
|
16315
|
-
* Entry point for the OpenFin Interop
|
|
16769
|
+
* Entry point for the OpenFin `Interop` API (`fin.Interop`).
|
|
16316
16770
|
*
|
|
16317
|
-
*
|
|
16318
|
-
*
|
|
16771
|
+
* * {@link InteropModule} contains static members of the `Interop` API (available under `fin.Interop`)
|
|
16772
|
+
* * {@link InteropClient} and {@link InteropBroker} document instances of their respective classes.
|
|
16319
16773
|
*
|
|
16320
16774
|
* @packageDocumentation
|
|
16321
16775
|
*/
|
|
@@ -16334,8 +16788,7 @@ function requireInterop () {
|
|
|
16334
16788
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16335
16789
|
};
|
|
16336
16790
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16337
|
-
|
|
16338
|
-
exports.default = Factory_1.default;
|
|
16791
|
+
__exportStar(requireFactory(), exports);
|
|
16339
16792
|
__exportStar(InteropClient$1, exports);
|
|
16340
16793
|
__exportStar(requireInteropBroker(), exports);
|
|
16341
16794
|
} (interop));
|
|
@@ -16377,6 +16830,8 @@ const connectionMap = new Map();
|
|
|
16377
16830
|
/**
|
|
16378
16831
|
* Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.
|
|
16379
16832
|
*
|
|
16833
|
+
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
|
16834
|
+
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
|
16380
16835
|
*/
|
|
16381
16836
|
class SnapshotSource extends base_1$1.Base {
|
|
16382
16837
|
/**
|
|
@@ -16511,13 +16966,19 @@ Instance.SnapshotSource = SnapshotSource;
|
|
|
16511
16966
|
_SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new WeakMap(), _SnapshotSource_getClient = new WeakMap(), _SnapshotSource_startConnection = new WeakMap(), _SnapshotSource_setUpConnectionListener = new WeakMap();
|
|
16512
16967
|
|
|
16513
16968
|
Object.defineProperty(Factory, "__esModule", { value: true });
|
|
16969
|
+
Factory.SnapshotSourceModule = void 0;
|
|
16514
16970
|
const base_1 = base;
|
|
16515
16971
|
const Instance_1 = Instance;
|
|
16516
16972
|
const utils_1 = utils;
|
|
16973
|
+
/**
|
|
16974
|
+
* Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
|
|
16975
|
+
*/
|
|
16517
16976
|
class SnapshotSourceModule extends base_1.Base {
|
|
16518
16977
|
/**
|
|
16519
16978
|
* Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
|
|
16520
|
-
*
|
|
16979
|
+
*
|
|
16980
|
+
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
|
16981
|
+
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
|
16521
16982
|
*
|
|
16522
16983
|
* @example
|
|
16523
16984
|
* ```js
|
|
@@ -16534,7 +16995,7 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
16534
16995
|
*
|
|
16535
16996
|
* await fin.SnapshotSource.init(snapshotProvider);
|
|
16536
16997
|
* ```
|
|
16537
|
-
*
|
|
16998
|
+
*
|
|
16538
16999
|
*/
|
|
16539
17000
|
async init(provider) {
|
|
16540
17001
|
this.wire.sendAction('snapshot-source-init').catch((e) => {
|
|
@@ -16554,7 +17015,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
16554
17015
|
}
|
|
16555
17016
|
/**
|
|
16556
17017
|
* Synchronously returns a SnapshotSource object that represents the current SnapshotSource.
|
|
16557
|
-
* @param identity
|
|
16558
17018
|
*
|
|
16559
17019
|
* @example
|
|
16560
17020
|
* ```js
|
|
@@ -16562,7 +17022,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
16562
17022
|
* // Use wrapped instance's getSnapshot method, e.g.:
|
|
16563
17023
|
* const snapshot = await snapshotSource.getSnapshot();
|
|
16564
17024
|
* ```
|
|
16565
|
-
* @static
|
|
16566
17025
|
*/
|
|
16567
17026
|
wrapSync(identity) {
|
|
16568
17027
|
this.wire.sendAction('snapshot-source-wrap-sync').catch((e) => {
|
|
@@ -16572,7 +17031,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
16572
17031
|
}
|
|
16573
17032
|
/**
|
|
16574
17033
|
* Asynchronously returns a SnapshotSource object that represents the current SnapshotSource.
|
|
16575
|
-
* @param identity
|
|
16576
17034
|
*
|
|
16577
17035
|
* @example
|
|
16578
17036
|
* ```js
|
|
@@ -16580,7 +17038,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
16580
17038
|
* // Use wrapped instance's getSnapshot method, e.g.:
|
|
16581
17039
|
* const snapshot = await snapshotSource.getSnapshot();
|
|
16582
17040
|
* ```
|
|
16583
|
-
* @static
|
|
16584
17041
|
*/
|
|
16585
17042
|
async wrap(identity) {
|
|
16586
17043
|
this.wire.sendAction('snapshot-source-wrap').catch((e) => {
|
|
@@ -16589,15 +17046,17 @@ class SnapshotSourceModule extends base_1.Base {
|
|
|
16589
17046
|
return this.wrapSync(identity);
|
|
16590
17047
|
}
|
|
16591
17048
|
}
|
|
16592
|
-
Factory.
|
|
17049
|
+
Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
16593
17050
|
|
|
16594
17051
|
(function (exports) {
|
|
16595
17052
|
/**
|
|
16596
|
-
* Entry
|
|
17053
|
+
* Entry points for the OpenFin `SnapshotSource` API (`fin.SnapshotSource`).
|
|
16597
17054
|
*
|
|
16598
|
-
*
|
|
16599
|
-
*
|
|
16600
|
-
*
|
|
17055
|
+
* * {@link SnapshotSourceModule} contains static members of the `SnapshotSource` API, accessible through `fin.SnapshotSource`.
|
|
17056
|
+
* * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
|
|
17057
|
+
*
|
|
17058
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
|
17059
|
+
* both of these were documented on the same page.
|
|
16601
17060
|
*
|
|
16602
17061
|
* @packageDocumentation
|
|
16603
17062
|
*/
|
|
@@ -16616,12 +17075,12 @@ Factory.default = SnapshotSourceModule;
|
|
|
16616
17075
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16617
17076
|
};
|
|
16618
17077
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16619
|
-
|
|
16620
|
-
exports.default = Factory_1.default;
|
|
17078
|
+
__exportStar(Factory, exports);
|
|
16621
17079
|
__exportStar(Instance, exports);
|
|
16622
17080
|
} (snapshotSource));
|
|
16623
17081
|
|
|
16624
17082
|
Object.defineProperty(fin, "__esModule", { value: true });
|
|
17083
|
+
fin.Fin = void 0;
|
|
16625
17084
|
const events_1$3 = eventsExports;
|
|
16626
17085
|
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
|
16627
17086
|
const index_1 = system;
|
|
@@ -16637,6 +17096,9 @@ const index_10 = platform;
|
|
|
16637
17096
|
const me_1$2 = me;
|
|
16638
17097
|
const interop_1 = requireInterop();
|
|
16639
17098
|
const snapshot_source_1 = snapshotSource;
|
|
17099
|
+
/**
|
|
17100
|
+
* @internal
|
|
17101
|
+
*/
|
|
16640
17102
|
class Fin extends events_1$3.EventEmitter {
|
|
16641
17103
|
/**
|
|
16642
17104
|
* @internal
|
|
@@ -16644,18 +17106,18 @@ class Fin extends events_1$3.EventEmitter {
|
|
|
16644
17106
|
constructor(wire) {
|
|
16645
17107
|
super();
|
|
16646
17108
|
this.wire = wire;
|
|
16647
|
-
this.System = new index_1.
|
|
16648
|
-
this.Window = new index_2.
|
|
16649
|
-
this.Application = new index_3.
|
|
16650
|
-
this.InterApplicationBus = new index_4.
|
|
16651
|
-
this.Clipboard = new index_5.
|
|
16652
|
-
this.ExternalApplication = new index_6.
|
|
16653
|
-
this.Frame = new index_7.
|
|
16654
|
-
this.GlobalHotkey = new index_8.
|
|
16655
|
-
this.Platform = new index_10.
|
|
16656
|
-
this.View = new index_9.
|
|
16657
|
-
this.Interop = new interop_1.
|
|
16658
|
-
this.SnapshotSource = new snapshot_source_1.
|
|
17109
|
+
this.System = new index_1.System(wire);
|
|
17110
|
+
this.Window = new index_2._WindowModule(wire);
|
|
17111
|
+
this.Application = new index_3.ApplicationModule(wire);
|
|
17112
|
+
this.InterApplicationBus = new index_4.InterApplicationBus(wire);
|
|
17113
|
+
this.Clipboard = new index_5.Clipboard(wire);
|
|
17114
|
+
this.ExternalApplication = new index_6.ExternalApplicationModule(wire);
|
|
17115
|
+
this.Frame = new index_7._FrameModule(wire);
|
|
17116
|
+
this.GlobalHotkey = new index_8.GlobalHotkey(wire);
|
|
17117
|
+
this.Platform = new index_10.PlatformModule(wire, this.InterApplicationBus.Channel);
|
|
17118
|
+
this.View = new index_9.ViewModule(wire);
|
|
17119
|
+
this.Interop = new interop_1.InteropModule(wire);
|
|
17120
|
+
this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
|
|
16659
17121
|
wire.registerFin(this);
|
|
16660
17122
|
this.me = (0, me_1$2.getMe)(wire);
|
|
16661
17123
|
// Handle disconnect events
|
|
@@ -16664,7 +17126,7 @@ class Fin extends events_1$3.EventEmitter {
|
|
|
16664
17126
|
});
|
|
16665
17127
|
}
|
|
16666
17128
|
}
|
|
16667
|
-
fin.
|
|
17129
|
+
fin.Fin = Fin;
|
|
16668
17130
|
|
|
16669
17131
|
var transport = {};
|
|
16670
17132
|
|
|
@@ -17104,7 +17566,7 @@ exports.fin = mock.fin = ((typeof window !== 'undefined' && (window === null ||
|
|
|
17104
17566
|
uuid: '',
|
|
17105
17567
|
name: ''
|
|
17106
17568
|
});
|
|
17107
|
-
return new fin_1.
|
|
17569
|
+
return new fin_1.Fin(transport);
|
|
17108
17570
|
})());
|
|
17109
17571
|
var _default = mock.default = OpenFin;
|
|
17110
17572
|
|