@openfin/core 34.78.16 → 34.78.18

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.js CHANGED
@@ -11,18 +11,240 @@ var mock = {};
11
11
 
12
12
  var OpenFin$1 = {};
13
13
 
14
+ var events = {};
15
+
16
+ var application$1 = {};
17
+
18
+ /**
19
+ * Namespace for events that can be emitted by an {@link OpenFin.Application}. Includes events
20
+ * re-propagated from the {@link OpenFin.Window} (and, transitively, {@link OpenFin.View}) level, prefixed with `window-` (and also, if applicable, `view-`).
21
+ * For example, a view's "attached" event will fire as 'window-view-attached' at the application level.
22
+ *
23
+ * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
24
+ *
25
+ * This namespace contains only payload shapes for events that are unique to `Application`. Events that propagate to `Application` from
26
+ * child {@link OpenFin.Window windows} and {@link OpenFin.View views} are defined in the {@link OpenFin.WindowEvents} and
27
+ * {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all* application events, see {@link Application.on Application.on}.
28
+ *
29
+ * {@link WillPropagateApplicationEvent Bespoke application events} re-propagate to the system level, prefixed with `application-`. For example,
30
+ * the `closed` event will fire as `application-closed` at the system level. Propagated events from {@link PropagatedWindowEvent windows}
31
+ * and {@link PropagatedViewEvent views} within an application will *not* transitively re-propagate to the system level, because they are already
32
+ * visible at the system level and contain the identity of the application.
33
+ *
34
+ * @packageDocumentation
35
+ */
36
+ Object.defineProperty(application$1, "__esModule", { value: true });
37
+
38
+ var base$1 = {};
39
+
40
+ Object.defineProperty(base$1, "__esModule", { value: true });
41
+
42
+ var externalApplication$1 = {};
43
+
44
+ /**
45
+ * Namespace for events that can be transmitted by an {@link OpenFin.ExternalApplication}.
46
+ *
47
+ * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
48
+ *
49
+ * For a list of valid string keys for external application events, see {@link ExternalApplication.on ExternalApplication.on}.
50
+ *
51
+ * @packageDocumentation
52
+ */
53
+ Object.defineProperty(externalApplication$1, "__esModule", { value: true });
54
+
55
+ var frame$1 = {};
56
+
57
+ Object.defineProperty(frame$1, "__esModule", { value: true });
58
+
59
+ var globalHotkey$1 = {};
60
+
61
+ Object.defineProperty(globalHotkey$1, "__esModule", { value: true });
62
+
63
+ var platform$1 = {};
64
+
65
+ /**
66
+ *
67
+ * Namespace for events that can emitted by a {@link OpenFin.Platform}.
68
+ *
69
+ * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
70
+ *
71
+ * The Platform `EventEmitter` is a superset of the {@link OpenFin.Application} `EventEmitter`,
72
+ * meaning it can listen to all {@link OpenFin.ApplicationEvents Application events} in addition to the
73
+ * Platform-specific events listed here. For a list of valid string keys for *all* platform events, see
74
+ * {@link Platform.on Platform.on}.
75
+ *
76
+ * @packageDocumentation
77
+ */
78
+ Object.defineProperty(platform$1, "__esModule", { value: true });
79
+
80
+ var system$1 = {};
81
+
82
+ /**
83
+ * Namespace for runtime-wide OpenFin events emitted by {@link System.System}. Includes events
84
+ * re-propagated from {@link OpenFin.Application}, {@link OpenFin.Window}, and {@link OpenFin.View} (prefixed with `application-`, `window-`, and `view-`). All
85
+ * event propagations are visible at the System level. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
86
+ * transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
87
+ * of the application. For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
88
+ * will be visible as 'view-shown' at the system level, but *not* as `application-window-view-shown`.
89
+ *
90
+ * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
91
+ *
92
+ * This namespace contains only payload shapes for events that are unique to `System`. Events that propagate to `System` from
93
+ * child {@link OpenFin.Application applications}, {@link OpenFin.Window windows}, and {@link OpenFin.View views} are defined in the
94
+ * {@link OpenFin.ApplicationEvents}, {@link OpenFin.WindowEvents}, and {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all*
95
+ * system events, see {@link System.on System.on}.
96
+ *
97
+ * @packageDocumentation
98
+ */
99
+ Object.defineProperty(system$1, "__esModule", { value: true });
100
+
101
+ var view$1 = {};
102
+
103
+ /**
104
+ * Namespace for events that can be emitted by a {@link OpenFin.View}.
105
+ *
106
+ * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
107
+ *
108
+ * This namespace contains only payload shapes for events that are unique to `View`. Events that are shared between all `WebContents`
109
+ * (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. For a list
110
+ * of valid string keys for *all* View events, see {@link View.on View.on}.
111
+ *
112
+ * View events fall into two categories: {@link WillPropagateViewEvent} and {@link NonPropagatedViewEvent}. Propagated events will
113
+ * be re-emitted on the parent {@link OpenFin.Window} of the target view, prefixed with "view-". For example,
114
+ * the "shown" event will be re-emitted on the parent window as "view-shown". Non-propagated events
115
+ * will not be re-emitted on the parent window.
116
+ *
117
+ * @packageDocumentation
118
+ */
119
+ Object.defineProperty(view$1, "__esModule", { value: true });
120
+
121
+ var webcontents = {};
122
+
123
+ /**
124
+ * Namespace for events shared by all OpenFin WebContents elements (i.e. {@link OpenFin.Window},
125
+ * {@link OpenFin.View}).
126
+ *
127
+ * WebContents events are divided into two groups: {@link WillPropagateWebContentsEvent} and {@link NonPropagatedWebContentsEvent}. Propagating events
128
+ * will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
129
+ * parent window, and propagating events in a window will also be emitted on the window's parent {@link OpenFin.Application}.
130
+ *
131
+ * Non-propagating events will not re-emit on parent entities.
132
+ *
133
+ * @packageDocumentation
134
+ */
135
+ Object.defineProperty(webcontents, "__esModule", { value: true });
136
+
137
+ var window$2 = {};
138
+
139
+ /**
140
+ *
141
+ * Namespace for events that can be emitted by a {@link OpenFin.Window}.
142
+ *
143
+ * Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
144
+ *
145
+ * This namespace contains only payload shapes for events that are unique to `Window`. Events that are shared between all `WebContents`
146
+ * (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. Events that
147
+ * propagate from `View` are defined in {@link OpenFin.ViewEvents}. For a list of valid string keys for *all* Window events, see
148
+ * {@link Window.on Window.on}
149
+ *
150
+ * Window events fall into two categories: {@link WillPropagateWindowEvent} and {@link NonPropagatedWindowEvent}.
151
+ * Propagated events will be re-emitted on the parent {@link OpenFin.Application} of the target window, prefixed with "window-". For example,
152
+ * a window's "reloaded" event will be re-emitted on the parent application as "window-reloaded". Non-propagated
153
+ * events will not be re-emitted on the parent application.
154
+ *
155
+ * @packageDocumentation
156
+ */
157
+ Object.defineProperty(window$2, "__esModule", { value: true });
158
+
14
159
  /**
15
- * Top-level namespace for types referenced by the OpenFin API. Contains:
160
+ * Namespace for OpenFin event types. Each entity that emits OpenFin events has its own sub-namespace. Event payloads
161
+ * themselves are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
162
+ *
163
+ * #### Event emitters
164
+ *
165
+ * The following entities emit OpenFin events, and have corresponding sub-namespaces:
16
166
  *
17
- * * The type of the global `fin` entry point ({@link FinApi})
18
- * * Classes that act as static namespaces returned from the `fin` global (e.g. {@link ApplicationModule}, accessible via `fin.Application`)
19
- * * Instance classes that are returned from API calls (e.g. {@link Application}, accessible via `fin.Application.getCurrentSync()`)
20
- * * Parameter shapes for API methods (e.g. {@link ApplicationOptions}, used in `fin.Application.start()`)
21
- * * Event namespaces and payload union types (e.g. {@link ApplicationEvents} and {@link ApplicationEvent})
167
+ * * {@link OpenFin.Application}: {@link OpenFin.ApplicationEvents}
168
+ * * {@link OpenFin.ExternalApplication}: {@link OpenFin.ExternalApplicationEvents}
169
+ * * {@link OpenFin.Frame}: {@link OpenFin.FrameEvents}
170
+ * * {@link OpenFin.GlobalHotkey}: {@link OpenFin.GlobalHotkeyEvents}
171
+ * * {@link OpenFin.Platform}: {@link OpenFin.PlatformEvents}
172
+ * * {@link OpenFin.System}: {@link OpenFin.SystemEvents}
173
+ * * {@link OpenFin.View}: {@link OpenFin.ViewEvents}
174
+ * * {@link OpenFin.Window}: {@link OpenFin.WindowEvents}
175
+ *
176
+ * These `EventEmitter` entities share a common set of methods for interacting with the OpenFin event bus, which can be
177
+ * seen on the individual documentation pages for each entity type.
178
+ *
179
+ * Registering event handlers is an asynchronous operation. It is important to ensure that the returned Promises are awaited to reduce the
180
+ * risk of race conditions.
181
+ *
182
+ * When the `EventEmitter` receives an event from the browser process and emits on the renderer, all of the functions attached to that
183
+ * specific event are called synchronously. Any values returned by the called listeners are ignored and will be discarded. If the window document
184
+ * is destroyed by page navigation or reload, its registered event listeners will be removed.
185
+ *
186
+ * We recommend using Arrow Functions for event listeners to ensure the this scope is consistent with the original function context.
187
+ *
188
+ * Events re-propagate from smaller/more-local scopes to larger/more-global scopes. For example, an event emitted on a specific
189
+ * view will propagate to the window in which the view is embedded, and then to the application in which the window is running, and
190
+ * finally to the OpenFin runtime itself at the "system" level. For details on propagation semantics, see the namespace for
191
+ * the propagating (or propagated-to) entity.
22
192
  *
23
193
  * @packageDocumentation
24
194
  */
25
- Object.defineProperty(OpenFin$1, "__esModule", { value: true });
195
+ Object.defineProperty(events, "__esModule", { value: true });
196
+ events.WindowEvents = events.WebContentsEvents = events.ViewEvents = events.SystemEvents = events.PlatformEvents = events.GlobalHotkeyEvents = events.FrameEvents = events.ExternalApplicationEvents = events.BaseEvents = events.ApplicationEvents = void 0;
197
+ const ApplicationEvents = application$1;
198
+ events.ApplicationEvents = ApplicationEvents;
199
+ const BaseEvents = base$1;
200
+ events.BaseEvents = BaseEvents;
201
+ const ExternalApplicationEvents = externalApplication$1;
202
+ events.ExternalApplicationEvents = ExternalApplicationEvents;
203
+ const FrameEvents = frame$1;
204
+ events.FrameEvents = FrameEvents;
205
+ const GlobalHotkeyEvents = globalHotkey$1;
206
+ events.GlobalHotkeyEvents = GlobalHotkeyEvents;
207
+ const PlatformEvents = platform$1;
208
+ events.PlatformEvents = PlatformEvents;
209
+ const SystemEvents = system$1;
210
+ events.SystemEvents = SystemEvents;
211
+ const ViewEvents = view$1;
212
+ events.ViewEvents = ViewEvents;
213
+ const WebContentsEvents = webcontents;
214
+ events.WebContentsEvents = WebContentsEvents;
215
+ const WindowEvents = window$2;
216
+ events.WindowEvents = WindowEvents;
217
+
218
+ (function (exports) {
219
+ /**
220
+ * Top-level namespace for types referenced by the OpenFin API. Contains:
221
+ *
222
+ * * The type of the global `fin` entry point ({@link FinApi})
223
+ * * Classes that act as static namespaces returned from the `fin` global (e.g. {@link ApplicationModule}, accessible via `fin.Application`)
224
+ * * Instance classes that are returned from API calls (e.g. {@link Application}, accessible via `fin.Application.getCurrentSync()`)
225
+ * * Parameter shapes for API methods (e.g. {@link ApplicationOptions}, used in `fin.Application.start()`)
226
+ * * Event namespaces and payload union types (e.g. {@link ApplicationEvents} and {@link ApplicationEvent})
227
+ *
228
+ * @packageDocumentation
229
+ */
230
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
231
+ if (k2 === undefined) k2 = k;
232
+ var desc = Object.getOwnPropertyDescriptor(m, k);
233
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
234
+ desc = { enumerable: true, get: function() { return m[k]; } };
235
+ }
236
+ Object.defineProperty(o, k2, desc);
237
+ }) : (function(o, m, k, k2) {
238
+ if (k2 === undefined) k2 = k;
239
+ o[k2] = m[k];
240
+ }));
241
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
242
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
243
+ };
244
+ Object.defineProperty(exports, "__esModule", { value: true });
245
+ // Deprecated shim to preserve v30 namespace names
246
+ __exportStar(events, exports);
247
+ } (OpenFin$1));
26
248
 
27
249
  var fin = {};
28
250
 
@@ -134,6 +356,9 @@ class EmitterBase extends Base {
134
356
  this.topic = topic;
135
357
  _EmitterBase_emitterAccessor.set(this, void 0);
136
358
  this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
359
+ /**
360
+ * @internal
361
+ */
137
362
  this.emit = (eventType, payload, ...args) => {
138
363
  return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
139
364
  };
@@ -181,6 +406,8 @@ class EmitterBase extends Base {
181
406
  }
182
407
  /**
183
408
  * Adds a listener to the end of the listeners array for the specified event.
409
+ *
410
+ * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
184
411
  */
185
412
  async on(eventType, listener, options) {
186
413
  await this.registerEventListener(eventType, options, (emitter) => {
@@ -198,6 +425,8 @@ class EmitterBase extends Base {
198
425
  }
199
426
  /**
200
427
  * 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.
428
+ *
429
+ * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
201
430
  */
202
431
  async once(eventType, listener, options) {
203
432
  const deregister = () => this.deregisterEventListener(eventType);
@@ -212,6 +441,8 @@ class EmitterBase extends Base {
212
441
  }
213
442
  /**
214
443
  * Adds a listener to the beginning of the listeners array for the specified event.
444
+ *
445
+ * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
215
446
  */
216
447
  async prependListener(eventType, listener, options) {
217
448
  await this.registerEventListener(eventType, options, (emitter) => {
@@ -224,6 +455,8 @@ class EmitterBase extends Base {
224
455
  /**
225
456
  * Adds a one time listener for the event. The listener is invoked only the first time the event is fired,
226
457
  * after which it is removed. The listener is added to the beginning of the listeners array.
458
+ *
459
+ * @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
227
460
  */
228
461
  async prependOnceListener(eventType, listener, options) {
229
462
  const deregister = () => this.deregisterEventListener(eventType);
@@ -1571,7 +1804,7 @@ class WebContents extends base_1$k.EmitterBase {
1571
1804
  /**
1572
1805
  * Navigates the WebContents to a specified URL.
1573
1806
  *
1574
- * @remarks The url must contain the protocol prefix such as http:// or https://.
1807
+ * Note: The url must contain the protocol prefix such as http:// or https://.
1575
1808
  * @param url - The URL to navigate the WebContents to.
1576
1809
  *
1577
1810
  * @example
@@ -1754,7 +1987,7 @@ class WebContents extends base_1$k.EmitterBase {
1754
1987
  * Prints the WebContents.
1755
1988
  * @param options Printer Options
1756
1989
  *
1757
- * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName
1990
+ * Note: When `silent` is set to `true`, the API will pick the system's default printer if deviceName
1758
1991
  * is empty and the default settings for printing.
1759
1992
  *
1760
1993
  * Use the CSS style `page-break-before: always;` to force print to a new page.
@@ -1780,7 +2013,7 @@ class WebContents extends base_1$k.EmitterBase {
1780
2013
  * @param searchTerm Term to find in page
1781
2014
  * @param options Search options
1782
2015
  *
1783
- * @remarks By default, each subsequent call will highlight the next text that matches the search term.
2016
+ * Note: By default, each subsequent call will highlight the next text that matches the search term.
1784
2017
  *
1785
2018
  * Returns a promise with the results for the request. By subscribing to the
1786
2019
  * found-in-page event, you can get the results of this call as well.
@@ -1981,7 +2214,7 @@ class WebContents extends base_1$k.EmitterBase {
1981
2214
  /**
1982
2215
  * Retrieves the process information associated with a WebContents.
1983
2216
  *
1984
- * @remarks This includes any iframes associated with the WebContents
2217
+ * Note: This includes any iframes associated with the WebContents
1985
2218
  *
1986
2219
  * @example
1987
2220
  * View:
@@ -2162,7 +2395,7 @@ class WebContents extends base_1$k.EmitterBase {
2162
2395
  /**
2163
2396
  * Shows a popup window.
2164
2397
  *
2165
- * @remarks If this WebContents is a view and its attached window has a popup open, this will close it.
2398
+ * Note: If this WebContents is a view and its attached window has a popup open, this will close it.
2166
2399
  *
2167
2400
  * Shows a popup window. Including a `name` in `options` will attempt to show an existing window as a popup, if
2168
2401
  * that window doesn't exist or no `name` is included a window will be created. If the caller view or the caller
@@ -2170,7 +2403,7 @@ class WebContents extends base_1$k.EmitterBase {
2170
2403
  * open popup window before showing the new popup window. Also, if the caller view is destroyed or detached, the popup
2171
2404
  * will be dismissed.
2172
2405
  *
2173
- * 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.
2406
+ * 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.
2174
2407
  *
2175
2408
  * @example
2176
2409
  *
@@ -3638,6 +3871,7 @@ function requireInstance$1 () {
3638
3871
  /**
3639
3872
  * Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
3640
3873
  * If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
3874
+ *
3641
3875
  * Note: If the "name" property is omitted it defaults to "tasks".
3642
3876
  * @param jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
3643
3877
  *
@@ -3938,6 +4172,7 @@ function requireInstance$1 () {
3938
4172
  }
3939
4173
  /**
3940
4174
  * Sets file auto download location. It's only allowed in the same application.
4175
+ *
3941
4176
  * Note: This method is restricted by default and must be enabled via
3942
4177
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
3943
4178
  * @param downloadLocation file auto download location
@@ -3963,6 +4198,7 @@ function requireInstance$1 () {
3963
4198
  }
3964
4199
  /**
3965
4200
  * 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.
4201
+ *
3966
4202
  * Note: This method is restricted by default and must be enabled via
3967
4203
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
3968
4204
  *
@@ -7364,7 +7600,8 @@ class System extends base_1$j.EmitterBase {
7364
7600
  }
7365
7601
  /**
7366
7602
  * Attempt to close an external process. The process will be terminated if it
7367
- * has not closed after the elapsed timeout in milliseconds.<br>
7603
+ * has not closed after the elapsed timeout in milliseconds.
7604
+ *
7368
7605
  * Note: This method is restricted by default and must be enabled via
7369
7606
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
7370
7607
  * @param options A object defined in the TerminateExternalRequestType interface
@@ -7400,7 +7637,8 @@ class System extends base_1$j.EmitterBase {
7400
7637
  return this.wire.sendAction('update-proxy', options).then(() => undefined);
7401
7638
  }
7402
7639
  /**
7403
- * Downloads the given application asset<br>
7640
+ * Downloads the given application asset.
7641
+ *
7404
7642
  * Note: This method is restricted by default and must be enabled via
7405
7643
  * <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
7406
7644
  * @param appAsset App asset object
@@ -11460,10 +11698,8 @@ const validate_1$1 = validate;
11460
11698
  const clientMap = new Map();
11461
11699
  /** Manages the life cycle of windows and views in the application.
11462
11700
  *
11463
- * Enables taking snapshots of itself and applyi
11464
- * ng them to restore a previous configuration
11701
+ * Enables taking snapshots of itself and applying them to restore a previous configuration
11465
11702
  * as well as listen to {@link OpenFin.PlatformEvents platform events}.
11466
- *
11467
11703
  */
11468
11704
  class Platform extends base_1$7.EmitterBase {
11469
11705
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "34.78.16",
3
+ "version": "34.78.18",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.MD",
6
6
  "main": "out/mock.js",