@openfin/node-adapter 34.78.4 → 34.78.5
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/node-adapter-alpha.d.ts +712 -3652
- package/out/node-adapter-beta.d.ts +712 -3652
- package/out/node-adapter-public.d.ts +712 -3652
- package/out/node-adapter.d.ts +769 -3645
- package/out/node-adapter.js +935 -960
- package/package.json +6 -9
- package/resources/win/OpenFinRVM.exe +0 -0
package/out/node-adapter.js
CHANGED
@@ -2,17 +2,16 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
var require$$0 = require('events');
|
6
5
|
var require$$3 = require('lodash');
|
7
|
-
var require$$0$
|
6
|
+
var require$$0$1 = require('fs');
|
8
7
|
var require$$1$1 = require('crypto');
|
9
8
|
var require$$2$1 = require('ws');
|
10
9
|
var require$$1 = require('net');
|
11
|
-
var require$$0$
|
12
|
-
var require$$0$
|
10
|
+
var require$$0$2 = require('path');
|
11
|
+
var require$$0$3 = require('os');
|
13
12
|
var require$$4 = require('timers');
|
14
13
|
var require$$2 = require('child_process');
|
15
|
-
var require$$0
|
14
|
+
var require$$0 = require('node:url');
|
16
15
|
|
17
16
|
function _mergeNamespaces(n, m) {
|
18
17
|
m.forEach(function (e) {
|
@@ -31,17 +30,493 @@ function _mergeNamespaces(n, m) {
|
|
31
30
|
|
32
31
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
33
32
|
|
34
|
-
function getDefaultExportFromCjs (x) {
|
35
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
36
|
-
}
|
37
|
-
|
38
33
|
var main$1 = {};
|
39
34
|
|
40
35
|
var fin = {};
|
41
36
|
|
42
|
-
var
|
37
|
+
var eventsExports = {};
|
38
|
+
var events = {
|
39
|
+
get exports(){ return eventsExports; },
|
40
|
+
set exports(v){ eventsExports = v; },
|
41
|
+
};
|
42
|
+
|
43
|
+
var R = typeof Reflect === 'object' ? Reflect : null;
|
44
|
+
var ReflectApply = R && typeof R.apply === 'function'
|
45
|
+
? R.apply
|
46
|
+
: function ReflectApply(target, receiver, args) {
|
47
|
+
return Function.prototype.apply.call(target, receiver, args);
|
48
|
+
};
|
49
|
+
|
50
|
+
var ReflectOwnKeys;
|
51
|
+
if (R && typeof R.ownKeys === 'function') {
|
52
|
+
ReflectOwnKeys = R.ownKeys;
|
53
|
+
} else if (Object.getOwnPropertySymbols) {
|
54
|
+
ReflectOwnKeys = function ReflectOwnKeys(target) {
|
55
|
+
return Object.getOwnPropertyNames(target)
|
56
|
+
.concat(Object.getOwnPropertySymbols(target));
|
57
|
+
};
|
58
|
+
} else {
|
59
|
+
ReflectOwnKeys = function ReflectOwnKeys(target) {
|
60
|
+
return Object.getOwnPropertyNames(target);
|
61
|
+
};
|
62
|
+
}
|
63
|
+
|
64
|
+
function ProcessEmitWarning(warning) {
|
65
|
+
if (console && console.warn) console.warn(warning);
|
66
|
+
}
|
67
|
+
|
68
|
+
var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
|
69
|
+
return value !== value;
|
70
|
+
};
|
71
|
+
|
72
|
+
function EventEmitter() {
|
73
|
+
EventEmitter.init.call(this);
|
74
|
+
}
|
75
|
+
events.exports = EventEmitter;
|
76
|
+
eventsExports.once = once;
|
77
|
+
|
78
|
+
// Backwards-compat with node 0.10.x
|
79
|
+
EventEmitter.EventEmitter = EventEmitter;
|
80
|
+
|
81
|
+
EventEmitter.prototype._events = undefined;
|
82
|
+
EventEmitter.prototype._eventsCount = 0;
|
83
|
+
EventEmitter.prototype._maxListeners = undefined;
|
84
|
+
|
85
|
+
// By default EventEmitters will print a warning if more than 10 listeners are
|
86
|
+
// added to it. This is a useful default which helps finding memory leaks.
|
87
|
+
var defaultMaxListeners = 10;
|
88
|
+
|
89
|
+
function checkListener(listener) {
|
90
|
+
if (typeof listener !== 'function') {
|
91
|
+
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
|
96
|
+
enumerable: true,
|
97
|
+
get: function() {
|
98
|
+
return defaultMaxListeners;
|
99
|
+
},
|
100
|
+
set: function(arg) {
|
101
|
+
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
|
102
|
+
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
|
103
|
+
}
|
104
|
+
defaultMaxListeners = arg;
|
105
|
+
}
|
106
|
+
});
|
107
|
+
|
108
|
+
EventEmitter.init = function() {
|
109
|
+
|
110
|
+
if (this._events === undefined ||
|
111
|
+
this._events === Object.getPrototypeOf(this)._events) {
|
112
|
+
this._events = Object.create(null);
|
113
|
+
this._eventsCount = 0;
|
114
|
+
}
|
115
|
+
|
116
|
+
this._maxListeners = this._maxListeners || undefined;
|
117
|
+
};
|
118
|
+
|
119
|
+
// Obviously not all Emitters should be limited to 10. This function allows
|
120
|
+
// that to be increased. Set to zero for unlimited.
|
121
|
+
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
|
122
|
+
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
|
123
|
+
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
|
124
|
+
}
|
125
|
+
this._maxListeners = n;
|
126
|
+
return this;
|
127
|
+
};
|
128
|
+
|
129
|
+
function _getMaxListeners(that) {
|
130
|
+
if (that._maxListeners === undefined)
|
131
|
+
return EventEmitter.defaultMaxListeners;
|
132
|
+
return that._maxListeners;
|
133
|
+
}
|
134
|
+
|
135
|
+
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
|
136
|
+
return _getMaxListeners(this);
|
137
|
+
};
|
138
|
+
|
139
|
+
EventEmitter.prototype.emit = function emit(type) {
|
140
|
+
var args = [];
|
141
|
+
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
|
142
|
+
var doError = (type === 'error');
|
143
|
+
|
144
|
+
var events = this._events;
|
145
|
+
if (events !== undefined)
|
146
|
+
doError = (doError && events.error === undefined);
|
147
|
+
else if (!doError)
|
148
|
+
return false;
|
149
|
+
|
150
|
+
// If there is no 'error' event listener then throw.
|
151
|
+
if (doError) {
|
152
|
+
var er;
|
153
|
+
if (args.length > 0)
|
154
|
+
er = args[0];
|
155
|
+
if (er instanceof Error) {
|
156
|
+
// Note: The comments on the `throw` lines are intentional, they show
|
157
|
+
// up in Node's output if this results in an unhandled exception.
|
158
|
+
throw er; // Unhandled 'error' event
|
159
|
+
}
|
160
|
+
// At least give some kind of context to the user
|
161
|
+
var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
|
162
|
+
err.context = er;
|
163
|
+
throw err; // Unhandled 'error' event
|
164
|
+
}
|
43
165
|
|
44
|
-
var
|
166
|
+
var handler = events[type];
|
167
|
+
|
168
|
+
if (handler === undefined)
|
169
|
+
return false;
|
170
|
+
|
171
|
+
if (typeof handler === 'function') {
|
172
|
+
ReflectApply(handler, this, args);
|
173
|
+
} else {
|
174
|
+
var len = handler.length;
|
175
|
+
var listeners = arrayClone(handler, len);
|
176
|
+
for (var i = 0; i < len; ++i)
|
177
|
+
ReflectApply(listeners[i], this, args);
|
178
|
+
}
|
179
|
+
|
180
|
+
return true;
|
181
|
+
};
|
182
|
+
|
183
|
+
function _addListener(target, type, listener, prepend) {
|
184
|
+
var m;
|
185
|
+
var events;
|
186
|
+
var existing;
|
187
|
+
|
188
|
+
checkListener(listener);
|
189
|
+
|
190
|
+
events = target._events;
|
191
|
+
if (events === undefined) {
|
192
|
+
events = target._events = Object.create(null);
|
193
|
+
target._eventsCount = 0;
|
194
|
+
} else {
|
195
|
+
// To avoid recursion in the case that type === "newListener"! Before
|
196
|
+
// adding it to the listeners, first emit "newListener".
|
197
|
+
if (events.newListener !== undefined) {
|
198
|
+
target.emit('newListener', type,
|
199
|
+
listener.listener ? listener.listener : listener);
|
200
|
+
|
201
|
+
// Re-assign `events` because a newListener handler could have caused the
|
202
|
+
// this._events to be assigned to a new object
|
203
|
+
events = target._events;
|
204
|
+
}
|
205
|
+
existing = events[type];
|
206
|
+
}
|
207
|
+
|
208
|
+
if (existing === undefined) {
|
209
|
+
// Optimize the case of one listener. Don't need the extra array object.
|
210
|
+
existing = events[type] = listener;
|
211
|
+
++target._eventsCount;
|
212
|
+
} else {
|
213
|
+
if (typeof existing === 'function') {
|
214
|
+
// Adding the second element, need to change to array.
|
215
|
+
existing = events[type] =
|
216
|
+
prepend ? [listener, existing] : [existing, listener];
|
217
|
+
// If we've already got an array, just append.
|
218
|
+
} else if (prepend) {
|
219
|
+
existing.unshift(listener);
|
220
|
+
} else {
|
221
|
+
existing.push(listener);
|
222
|
+
}
|
223
|
+
|
224
|
+
// Check for listener leak
|
225
|
+
m = _getMaxListeners(target);
|
226
|
+
if (m > 0 && existing.length > m && !existing.warned) {
|
227
|
+
existing.warned = true;
|
228
|
+
// No error code for this since it is a Warning
|
229
|
+
// eslint-disable-next-line no-restricted-syntax
|
230
|
+
var w = new Error('Possible EventEmitter memory leak detected. ' +
|
231
|
+
existing.length + ' ' + String(type) + ' listeners ' +
|
232
|
+
'added. Use emitter.setMaxListeners() to ' +
|
233
|
+
'increase limit');
|
234
|
+
w.name = 'MaxListenersExceededWarning';
|
235
|
+
w.emitter = target;
|
236
|
+
w.type = type;
|
237
|
+
w.count = existing.length;
|
238
|
+
ProcessEmitWarning(w);
|
239
|
+
}
|
240
|
+
}
|
241
|
+
|
242
|
+
return target;
|
243
|
+
}
|
244
|
+
|
245
|
+
EventEmitter.prototype.addListener = function addListener(type, listener) {
|
246
|
+
return _addListener(this, type, listener, false);
|
247
|
+
};
|
248
|
+
|
249
|
+
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
|
250
|
+
|
251
|
+
EventEmitter.prototype.prependListener =
|
252
|
+
function prependListener(type, listener) {
|
253
|
+
return _addListener(this, type, listener, true);
|
254
|
+
};
|
255
|
+
|
256
|
+
function onceWrapper() {
|
257
|
+
if (!this.fired) {
|
258
|
+
this.target.removeListener(this.type, this.wrapFn);
|
259
|
+
this.fired = true;
|
260
|
+
if (arguments.length === 0)
|
261
|
+
return this.listener.call(this.target);
|
262
|
+
return this.listener.apply(this.target, arguments);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
266
|
+
function _onceWrap(target, type, listener) {
|
267
|
+
var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
|
268
|
+
var wrapped = onceWrapper.bind(state);
|
269
|
+
wrapped.listener = listener;
|
270
|
+
state.wrapFn = wrapped;
|
271
|
+
return wrapped;
|
272
|
+
}
|
273
|
+
|
274
|
+
EventEmitter.prototype.once = function once(type, listener) {
|
275
|
+
checkListener(listener);
|
276
|
+
this.on(type, _onceWrap(this, type, listener));
|
277
|
+
return this;
|
278
|
+
};
|
279
|
+
|
280
|
+
EventEmitter.prototype.prependOnceListener =
|
281
|
+
function prependOnceListener(type, listener) {
|
282
|
+
checkListener(listener);
|
283
|
+
this.prependListener(type, _onceWrap(this, type, listener));
|
284
|
+
return this;
|
285
|
+
};
|
286
|
+
|
287
|
+
// Emits a 'removeListener' event if and only if the listener was removed.
|
288
|
+
EventEmitter.prototype.removeListener =
|
289
|
+
function removeListener(type, listener) {
|
290
|
+
var list, events, position, i, originalListener;
|
291
|
+
|
292
|
+
checkListener(listener);
|
293
|
+
|
294
|
+
events = this._events;
|
295
|
+
if (events === undefined)
|
296
|
+
return this;
|
297
|
+
|
298
|
+
list = events[type];
|
299
|
+
if (list === undefined)
|
300
|
+
return this;
|
301
|
+
|
302
|
+
if (list === listener || list.listener === listener) {
|
303
|
+
if (--this._eventsCount === 0)
|
304
|
+
this._events = Object.create(null);
|
305
|
+
else {
|
306
|
+
delete events[type];
|
307
|
+
if (events.removeListener)
|
308
|
+
this.emit('removeListener', type, list.listener || listener);
|
309
|
+
}
|
310
|
+
} else if (typeof list !== 'function') {
|
311
|
+
position = -1;
|
312
|
+
|
313
|
+
for (i = list.length - 1; i >= 0; i--) {
|
314
|
+
if (list[i] === listener || list[i].listener === listener) {
|
315
|
+
originalListener = list[i].listener;
|
316
|
+
position = i;
|
317
|
+
break;
|
318
|
+
}
|
319
|
+
}
|
320
|
+
|
321
|
+
if (position < 0)
|
322
|
+
return this;
|
323
|
+
|
324
|
+
if (position === 0)
|
325
|
+
list.shift();
|
326
|
+
else {
|
327
|
+
spliceOne(list, position);
|
328
|
+
}
|
329
|
+
|
330
|
+
if (list.length === 1)
|
331
|
+
events[type] = list[0];
|
332
|
+
|
333
|
+
if (events.removeListener !== undefined)
|
334
|
+
this.emit('removeListener', type, originalListener || listener);
|
335
|
+
}
|
336
|
+
|
337
|
+
return this;
|
338
|
+
};
|
339
|
+
|
340
|
+
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
|
341
|
+
|
342
|
+
EventEmitter.prototype.removeAllListeners =
|
343
|
+
function removeAllListeners(type) {
|
344
|
+
var listeners, events, i;
|
345
|
+
|
346
|
+
events = this._events;
|
347
|
+
if (events === undefined)
|
348
|
+
return this;
|
349
|
+
|
350
|
+
// not listening for removeListener, no need to emit
|
351
|
+
if (events.removeListener === undefined) {
|
352
|
+
if (arguments.length === 0) {
|
353
|
+
this._events = Object.create(null);
|
354
|
+
this._eventsCount = 0;
|
355
|
+
} else if (events[type] !== undefined) {
|
356
|
+
if (--this._eventsCount === 0)
|
357
|
+
this._events = Object.create(null);
|
358
|
+
else
|
359
|
+
delete events[type];
|
360
|
+
}
|
361
|
+
return this;
|
362
|
+
}
|
363
|
+
|
364
|
+
// emit removeListener for all listeners on all events
|
365
|
+
if (arguments.length === 0) {
|
366
|
+
var keys = Object.keys(events);
|
367
|
+
var key;
|
368
|
+
for (i = 0; i < keys.length; ++i) {
|
369
|
+
key = keys[i];
|
370
|
+
if (key === 'removeListener') continue;
|
371
|
+
this.removeAllListeners(key);
|
372
|
+
}
|
373
|
+
this.removeAllListeners('removeListener');
|
374
|
+
this._events = Object.create(null);
|
375
|
+
this._eventsCount = 0;
|
376
|
+
return this;
|
377
|
+
}
|
378
|
+
|
379
|
+
listeners = events[type];
|
380
|
+
|
381
|
+
if (typeof listeners === 'function') {
|
382
|
+
this.removeListener(type, listeners);
|
383
|
+
} else if (listeners !== undefined) {
|
384
|
+
// LIFO order
|
385
|
+
for (i = listeners.length - 1; i >= 0; i--) {
|
386
|
+
this.removeListener(type, listeners[i]);
|
387
|
+
}
|
388
|
+
}
|
389
|
+
|
390
|
+
return this;
|
391
|
+
};
|
392
|
+
|
393
|
+
function _listeners(target, type, unwrap) {
|
394
|
+
var events = target._events;
|
395
|
+
|
396
|
+
if (events === undefined)
|
397
|
+
return [];
|
398
|
+
|
399
|
+
var evlistener = events[type];
|
400
|
+
if (evlistener === undefined)
|
401
|
+
return [];
|
402
|
+
|
403
|
+
if (typeof evlistener === 'function')
|
404
|
+
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
|
405
|
+
|
406
|
+
return unwrap ?
|
407
|
+
unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
|
408
|
+
}
|
409
|
+
|
410
|
+
EventEmitter.prototype.listeners = function listeners(type) {
|
411
|
+
return _listeners(this, type, true);
|
412
|
+
};
|
413
|
+
|
414
|
+
EventEmitter.prototype.rawListeners = function rawListeners(type) {
|
415
|
+
return _listeners(this, type, false);
|
416
|
+
};
|
417
|
+
|
418
|
+
EventEmitter.listenerCount = function(emitter, type) {
|
419
|
+
if (typeof emitter.listenerCount === 'function') {
|
420
|
+
return emitter.listenerCount(type);
|
421
|
+
} else {
|
422
|
+
return listenerCount.call(emitter, type);
|
423
|
+
}
|
424
|
+
};
|
425
|
+
|
426
|
+
EventEmitter.prototype.listenerCount = listenerCount;
|
427
|
+
function listenerCount(type) {
|
428
|
+
var events = this._events;
|
429
|
+
|
430
|
+
if (events !== undefined) {
|
431
|
+
var evlistener = events[type];
|
432
|
+
|
433
|
+
if (typeof evlistener === 'function') {
|
434
|
+
return 1;
|
435
|
+
} else if (evlistener !== undefined) {
|
436
|
+
return evlistener.length;
|
437
|
+
}
|
438
|
+
}
|
439
|
+
|
440
|
+
return 0;
|
441
|
+
}
|
442
|
+
|
443
|
+
EventEmitter.prototype.eventNames = function eventNames() {
|
444
|
+
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
|
445
|
+
};
|
446
|
+
|
447
|
+
function arrayClone(arr, n) {
|
448
|
+
var copy = new Array(n);
|
449
|
+
for (var i = 0; i < n; ++i)
|
450
|
+
copy[i] = arr[i];
|
451
|
+
return copy;
|
452
|
+
}
|
453
|
+
|
454
|
+
function spliceOne(list, index) {
|
455
|
+
for (; index + 1 < list.length; index++)
|
456
|
+
list[index] = list[index + 1];
|
457
|
+
list.pop();
|
458
|
+
}
|
459
|
+
|
460
|
+
function unwrapListeners(arr) {
|
461
|
+
var ret = new Array(arr.length);
|
462
|
+
for (var i = 0; i < ret.length; ++i) {
|
463
|
+
ret[i] = arr[i].listener || arr[i];
|
464
|
+
}
|
465
|
+
return ret;
|
466
|
+
}
|
467
|
+
|
468
|
+
function once(emitter, name) {
|
469
|
+
return new Promise(function (resolve, reject) {
|
470
|
+
function errorListener(err) {
|
471
|
+
emitter.removeListener(name, resolver);
|
472
|
+
reject(err);
|
473
|
+
}
|
474
|
+
|
475
|
+
function resolver() {
|
476
|
+
if (typeof emitter.removeListener === 'function') {
|
477
|
+
emitter.removeListener('error', errorListener);
|
478
|
+
}
|
479
|
+
resolve([].slice.call(arguments));
|
480
|
+
}
|
481
|
+
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
|
482
|
+
if (name !== 'error') {
|
483
|
+
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
|
484
|
+
}
|
485
|
+
});
|
486
|
+
}
|
487
|
+
|
488
|
+
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
|
489
|
+
if (typeof emitter.on === 'function') {
|
490
|
+
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
|
491
|
+
}
|
492
|
+
}
|
493
|
+
|
494
|
+
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
495
|
+
if (typeof emitter.on === 'function') {
|
496
|
+
if (flags.once) {
|
497
|
+
emitter.once(name, listener);
|
498
|
+
} else {
|
499
|
+
emitter.on(name, listener);
|
500
|
+
}
|
501
|
+
} else if (typeof emitter.addEventListener === 'function') {
|
502
|
+
// EventTarget does not have `error` event semantics like Node
|
503
|
+
// EventEmitters, we do not listen for `error` events here.
|
504
|
+
emitter.addEventListener(name, function wrapListener(arg) {
|
505
|
+
// IE does not have builtin `{ once: true }` support so we
|
506
|
+
// have to do it manually.
|
507
|
+
if (flags.once) {
|
508
|
+
emitter.removeEventListener(name, wrapListener);
|
509
|
+
}
|
510
|
+
listener(arg);
|
511
|
+
});
|
512
|
+
} else {
|
513
|
+
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
|
514
|
+
}
|
515
|
+
}
|
516
|
+
|
517
|
+
var system = {};
|
518
|
+
|
519
|
+
var base = {};
|
45
520
|
|
46
521
|
var promises = {};
|
47
522
|
|
@@ -84,8 +559,8 @@ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
84
559
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
85
560
|
};
|
86
561
|
var _EmitterBase_emitterAccessor;
|
87
|
-
Object.defineProperty(base
|
88
|
-
base
|
562
|
+
Object.defineProperty(base, "__esModule", { value: true });
|
563
|
+
base.Reply = base.EmitterBase = base.Base = void 0;
|
89
564
|
const promises_1$2 = promises;
|
90
565
|
class Base {
|
91
566
|
/**
|
@@ -106,18 +581,11 @@ class Base {
|
|
106
581
|
get fin() {
|
107
582
|
return this.wire.getFin();
|
108
583
|
}
|
109
|
-
/**
|
110
|
-
* Provides access to the OpenFin representation of the current code context (usually a document
|
111
|
-
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
112
|
-
*
|
113
|
-
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
114
|
-
* on the context in which the devtools panel was opened.
|
115
|
-
*/
|
116
584
|
get me() {
|
117
585
|
return this.wire.me;
|
118
586
|
}
|
119
587
|
}
|
120
|
-
base
|
588
|
+
base.Base = Base;
|
121
589
|
/**
|
122
590
|
* An entity that emits OpenFin events.
|
123
591
|
*
|
@@ -147,9 +615,6 @@ class EmitterBase extends Base {
|
|
147
615
|
this.topic = topic;
|
148
616
|
_EmitterBase_emitterAccessor.set(this, void 0);
|
149
617
|
this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
|
150
|
-
/**
|
151
|
-
* @internal
|
152
|
-
*/
|
153
618
|
this.emit = (eventType, payload, ...args) => {
|
154
619
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
155
620
|
};
|
@@ -192,13 +657,16 @@ class EmitterBase extends Base {
|
|
192
657
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
193
658
|
return Promise.resolve();
|
194
659
|
};
|
660
|
+
this.addListener = this.on;
|
195
661
|
__classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
196
662
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
197
663
|
}
|
198
664
|
/**
|
199
665
|
* Adds a listener to the end of the listeners array for the specified event.
|
200
666
|
*
|
201
|
-
* @
|
667
|
+
* @param eventType
|
668
|
+
* @param listener
|
669
|
+
* @param options
|
202
670
|
*/
|
203
671
|
async on(eventType, listener, options) {
|
204
672
|
await this.registerEventListener(eventType, options, (emitter) => {
|
@@ -208,16 +676,12 @@ class EmitterBase extends Base {
|
|
208
676
|
});
|
209
677
|
return this;
|
210
678
|
}
|
211
|
-
/**
|
212
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
213
|
-
*/
|
214
|
-
async addListener(eventType, listener, options) {
|
215
|
-
return this.on(eventType, listener, options);
|
216
|
-
}
|
217
679
|
/**
|
218
680
|
* 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.
|
219
681
|
*
|
220
|
-
* @
|
682
|
+
* @param eventType
|
683
|
+
* @param listener
|
684
|
+
* @param options
|
221
685
|
*/
|
222
686
|
async once(eventType, listener, options) {
|
223
687
|
const deregister = () => this.deregisterEventListener(eventType);
|
@@ -233,7 +697,9 @@ class EmitterBase extends Base {
|
|
233
697
|
/**
|
234
698
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
235
699
|
*
|
236
|
-
* @
|
700
|
+
* @param eventType
|
701
|
+
* @param listener
|
702
|
+
* @param options
|
237
703
|
*/
|
238
704
|
async prependListener(eventType, listener, options) {
|
239
705
|
await this.registerEventListener(eventType, options, (emitter) => {
|
@@ -247,7 +713,9 @@ class EmitterBase extends Base {
|
|
247
713
|
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired,
|
248
714
|
* after which it is removed. The listener is added to the beginning of the listeners array.
|
249
715
|
*
|
250
|
-
* @
|
716
|
+
* @param eventType
|
717
|
+
* @param listener
|
718
|
+
* @param options
|
251
719
|
*/
|
252
720
|
async prependOnceListener(eventType, listener, options) {
|
253
721
|
const deregister = () => this.deregisterEventListener(eventType);
|
@@ -264,6 +732,10 @@ class EmitterBase extends Base {
|
|
264
732
|
* Remove a listener from the listener array for the specified event.
|
265
733
|
*
|
266
734
|
* @remarks Caution: Calling this method changes the array indices in the listener array behind the listener.
|
735
|
+
*
|
736
|
+
* @param eventType
|
737
|
+
* @param listener
|
738
|
+
* @param options
|
267
739
|
*/
|
268
740
|
async removeListener(eventType, listener, options) {
|
269
741
|
const emitter = await this.deregisterEventListener(eventType, options);
|
@@ -290,6 +762,7 @@ class EmitterBase extends Base {
|
|
290
762
|
/**
|
291
763
|
* Removes all listeners, or those of the specified event.
|
292
764
|
*
|
765
|
+
* @param eventType
|
293
766
|
*/
|
294
767
|
async removeAllListeners(eventType) {
|
295
768
|
const removeByEvent = async (event) => {
|
@@ -314,11 +787,11 @@ class EmitterBase extends Base {
|
|
314
787
|
}
|
315
788
|
}
|
316
789
|
}
|
317
|
-
base
|
790
|
+
base.EmitterBase = EmitterBase;
|
318
791
|
_EmitterBase_emitterAccessor = new WeakMap();
|
319
792
|
class Reply {
|
320
793
|
}
|
321
|
-
base
|
794
|
+
base.Reply = Reply;
|
322
795
|
|
323
796
|
var transportErrors = {};
|
324
797
|
|
@@ -351,7 +824,7 @@ class InternalError extends Error {
|
|
351
824
|
const { message, name, stack, ...rest } = err;
|
352
825
|
super(message);
|
353
826
|
this.name = name || 'Error';
|
354
|
-
this.stack = stack
|
827
|
+
this.stack = stack !== null && stack !== void 0 ? stack : this.toString();
|
355
828
|
Object.keys(rest).forEach(key => {
|
356
829
|
this[key] = rest[key];
|
357
830
|
});
|
@@ -360,6 +833,7 @@ class InternalError extends Error {
|
|
360
833
|
// For documentation of the error methods being used see here: https://v8.dev/docs/stack-trace-api
|
361
834
|
class RuntimeError extends Error {
|
362
835
|
static getCallSite(callsToRemove = 0) {
|
836
|
+
var _a, _b;
|
363
837
|
const length = Error.stackTraceLimit;
|
364
838
|
const realCallsToRemove = callsToRemove + 1; // remove this call;
|
365
839
|
Error.stackTraceLimit = length + realCallsToRemove;
|
@@ -368,7 +842,7 @@ class RuntimeError extends Error {
|
|
368
842
|
// This will be called when we access the `stack` property
|
369
843
|
Error.prepareStackTrace = (_, stack) => stack;
|
370
844
|
// stack is optional in non chromium contexts
|
371
|
-
const stack = new Error().stack
|
845
|
+
const stack = (_b = (_a = new Error().stack) === null || _a === void 0 ? void 0 : _a.slice(realCallsToRemove)) !== null && _b !== void 0 ? _b : [];
|
372
846
|
Error.prepareStackTrace = _prepareStackTrace;
|
373
847
|
Error.stackTraceLimit = length;
|
374
848
|
return stack;
|
@@ -390,7 +864,7 @@ class RuntimeError extends Error {
|
|
390
864
|
const { reason, error } = payload;
|
391
865
|
super(reason);
|
392
866
|
this.name = 'RuntimeError';
|
393
|
-
if (error
|
867
|
+
if (error === null || error === void 0 ? void 0 : error.stack) {
|
394
868
|
this.cause = new InternalError(error);
|
395
869
|
}
|
396
870
|
if (callSites) {
|
@@ -400,7 +874,7 @@ class RuntimeError extends Error {
|
|
400
874
|
}
|
401
875
|
transportErrors.RuntimeError = RuntimeError;
|
402
876
|
|
403
|
-
var window$
|
877
|
+
var window$1 = {};
|
404
878
|
|
405
879
|
var Factory$8 = {};
|
406
880
|
|
@@ -419,30 +893,16 @@ validate.validateIdentity = validateIdentity;
|
|
419
893
|
|
420
894
|
var Instance$7 = {};
|
421
895
|
|
422
|
-
var application
|
896
|
+
var application = {};
|
423
897
|
|
424
898
|
var Factory$7 = {};
|
425
899
|
|
426
900
|
var Instance$6 = {};
|
427
901
|
|
428
|
-
var view
|
902
|
+
var view = {};
|
429
903
|
|
430
904
|
var Factory$6 = {};
|
431
905
|
|
432
|
-
var warnings = {};
|
433
|
-
|
434
|
-
Object.defineProperty(warnings, "__esModule", { value: true });
|
435
|
-
warnings.handleDeprecatedWarnings = void 0;
|
436
|
-
const handleDeprecatedWarnings = (options) => {
|
437
|
-
if (options.contentNavigation?.whitelist ||
|
438
|
-
options.contentNavigation?.blacklist ||
|
439
|
-
options.contentRedirect?.whitelist ||
|
440
|
-
options.contentRedirect?.blacklist) {
|
441
|
-
console.warn(`The properties 'whitelist' and 'blacklist' have been marked as deprecated and will be removed in a future version. Please use 'allowlist' and 'denylist'.`);
|
442
|
-
}
|
443
|
-
};
|
444
|
-
warnings.handleDeprecatedWarnings = handleDeprecatedWarnings;
|
445
|
-
|
446
906
|
var hasRequiredFactory$3;
|
447
907
|
|
448
908
|
function requireFactory$3 () {
|
@@ -450,13 +910,9 @@ function requireFactory$3 () {
|
|
450
910
|
hasRequiredFactory$3 = 1;
|
451
911
|
Object.defineProperty(Factory$6, "__esModule", { value: true });
|
452
912
|
Factory$6.ViewModule = void 0;
|
453
|
-
const base_1 = base
|
913
|
+
const base_1 = base;
|
454
914
|
const validate_1 = validate;
|
455
915
|
const index_1 = requireView();
|
456
|
-
const warnings_1 = warnings;
|
457
|
-
/**
|
458
|
-
* Static namespace for OpenFin API methods that interact with the {@link View} class, available under `fin.View`.
|
459
|
-
*/
|
460
916
|
class ViewModule extends base_1.Base {
|
461
917
|
/**
|
462
918
|
* Creates a new View.
|
@@ -491,7 +947,6 @@ function requireFactory$3 () {
|
|
491
947
|
if (!options.name || typeof options.name !== 'string') {
|
492
948
|
throw new Error('Please provide a name property as a string in order to create a View.');
|
493
949
|
}
|
494
|
-
(0, warnings_1.handleDeprecatedWarnings)(options);
|
495
950
|
if (this.wire.environment.childViews) {
|
496
951
|
await this.wire.environment.createChildContent({
|
497
952
|
entityType: 'view',
|
@@ -779,7 +1234,7 @@ class ChannelsExposer {
|
|
779
1234
|
this.exposeFunction = async (target, config) => {
|
780
1235
|
const { key, options, meta } = config;
|
781
1236
|
const { id } = meta;
|
782
|
-
const action = `${id}.${options
|
1237
|
+
const action = `${id}.${(options === null || options === void 0 ? void 0 : options.action) || key}`;
|
783
1238
|
await this.channelProviderOrClient.register(action, async ({ args }) => {
|
784
1239
|
return target(...args);
|
785
1240
|
});
|
@@ -810,7 +1265,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
|
|
810
1265
|
};
|
811
1266
|
Object.defineProperty(exports, "__esModule", { value: true });
|
812
1267
|
__exportStar(channelsConsumer, exports);
|
813
|
-
__exportStar(channelsExposer, exports);
|
1268
|
+
__exportStar(channelsExposer, exports);
|
814
1269
|
} (openfinChannels));
|
815
1270
|
|
816
1271
|
(function (exports) {
|
@@ -829,7 +1284,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
|
|
829
1284
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
830
1285
|
};
|
831
1286
|
Object.defineProperty(exports, "__esModule", { value: true });
|
832
|
-
__exportStar(openfinChannels, exports);
|
1287
|
+
__exportStar(openfinChannels, exports);
|
833
1288
|
} (strategies));
|
834
1289
|
|
835
1290
|
(function (exports) {
|
@@ -851,7 +1306,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
|
|
851
1306
|
__exportStar(apiConsumer, exports);
|
852
1307
|
__exportStar(apiExposer, exports);
|
853
1308
|
__exportStar(strategies, exports);
|
854
|
-
__exportStar(decorators, exports);
|
1309
|
+
__exportStar(decorators, exports);
|
855
1310
|
} (apiExposer$1));
|
856
1311
|
|
857
1312
|
var channelApiRelay = {};
|
@@ -1092,14 +1547,14 @@ _LayoutNode_client = new WeakMap();
|
|
1092
1547
|
/**
|
1093
1548
|
* @ignore
|
1094
1549
|
* @internal
|
1095
|
-
* Encapsulates Api consumption of {@link
|
1550
|
+
* Encapsulates Api consumption of {@link LayoutEntitiesController} with a relayed dispatch
|
1096
1551
|
* @param client
|
1097
1552
|
* @param controllerId
|
1098
1553
|
* @param identity
|
1099
1554
|
* @returns a new instance of {@link LayoutEntitiesClient} with bound to the controllerId
|
1100
1555
|
*/
|
1101
1556
|
LayoutNode.newLayoutEntitiesClient = async (client, controllerId, identity) => {
|
1102
|
-
const dispatch = (0, channel_api_relay_1.createRelayedDispatch)(client, identity, 'layout-relay', 'You are trying to interact with a layout component on a window that
|
1557
|
+
const dispatch = (0, channel_api_relay_1.createRelayedDispatch)(client, identity, 'layout-relay', 'You are trying to interact with a layout component on a window that has been destroyed.');
|
1103
1558
|
const consumer = new api_exposer_1.ApiConsumer(new api_exposer_1.ChannelsConsumer({ dispatch }));
|
1104
1559
|
return consumer.consume({ id: controllerId });
|
1105
1560
|
};
|
@@ -1409,20 +1864,15 @@ _ColumnOrRow_client = new WeakMap();
|
|
1409
1864
|
var layout_constants = {};
|
1410
1865
|
|
1411
1866
|
Object.defineProperty(layout_constants, "__esModule", { value: true });
|
1412
|
-
layout_constants.
|
1867
|
+
layout_constants.LAYOUT_CONTROLLER_ID = void 0;
|
1413
1868
|
layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
|
1414
|
-
layout_constants.DEFAULT_LAYOUT_KEY = 'default';
|
1415
1869
|
|
1416
1870
|
var main = {};
|
1417
1871
|
|
1418
1872
|
Object.defineProperty(main, "__esModule", { value: true });
|
1419
1873
|
main.WebContents = void 0;
|
1420
|
-
const base_1$k = base
|
1874
|
+
const base_1$k = base;
|
1421
1875
|
class WebContents extends base_1$k.EmitterBase {
|
1422
|
-
/**
|
1423
|
-
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
1424
|
-
* @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
|
1425
|
-
*/
|
1426
1876
|
constructor(wire, identity, entityType) {
|
1427
1877
|
super(wire, entityType, identity.uuid, identity.name);
|
1428
1878
|
this.identity = identity;
|
@@ -1475,11 +1925,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1475
1925
|
* }
|
1476
1926
|
* console.log(await wnd.capturePage(options));
|
1477
1927
|
* ```
|
1478
|
-
*
|
1479
|
-
* @remarks
|
1480
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1481
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1482
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1483
1928
|
*/
|
1484
1929
|
capturePage(options) {
|
1485
1930
|
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
@@ -1515,10 +1960,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1515
1960
|
*
|
1516
1961
|
* executeJavaScript(`console.log('Hello, Openfin')`).then(() => console.log('Javascript excuted')).catch(err => console.log(err));
|
1517
1962
|
* ```
|
1518
|
-
* @remarks
|
1519
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1520
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1521
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1522
1963
|
*/
|
1523
1964
|
executeJavaScript(code) {
|
1524
1965
|
return this.wire
|
@@ -1558,10 +1999,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1558
1999
|
*
|
1559
2000
|
* getZoomLevel().then(zoomLevel => console.log(zoomLevel)).catch(err => console.log(err));
|
1560
2001
|
* ```
|
1561
|
-
* @remarks
|
1562
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1563
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1564
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1565
2002
|
*/
|
1566
2003
|
getZoomLevel() {
|
1567
2004
|
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
@@ -1600,10 +2037,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1600
2037
|
*
|
1601
2038
|
* setZoomLevel(4).then(() => console.log('Setting a zoom level')).catch(err => console.log(err));
|
1602
2039
|
* ```
|
1603
|
-
* @remarks
|
1604
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1605
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1606
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1607
2040
|
*/
|
1608
2041
|
setZoomLevel(level) {
|
1609
2042
|
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
@@ -1611,7 +2044,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1611
2044
|
/**
|
1612
2045
|
* Navigates the WebContents to a specified URL.
|
1613
2046
|
*
|
1614
|
-
*
|
2047
|
+
* @remarks The url must contain the protocol prefix such as http:// or https://.
|
1615
2048
|
* @param url - The URL to navigate the WebContents to.
|
1616
2049
|
*
|
1617
2050
|
* @example
|
@@ -1641,10 +2074,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1641
2074
|
* navigate().then(() => console.log('Navigate to tutorial')).catch(err => console.log(err));
|
1642
2075
|
* ```
|
1643
2076
|
* @experimental
|
1644
|
-
* @remarks
|
1645
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1646
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1647
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1648
2077
|
*/
|
1649
2078
|
navigate(url) {
|
1650
2079
|
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
@@ -1672,10 +2101,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1672
2101
|
* }
|
1673
2102
|
* navigateBack().then(() => console.log('Navigated back')).catch(err => console.log(err));
|
1674
2103
|
* ```
|
1675
|
-
* @remarks
|
1676
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1677
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1678
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1679
2104
|
*/
|
1680
2105
|
navigateBack() {
|
1681
2106
|
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
@@ -1705,10 +2130,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1705
2130
|
* }
|
1706
2131
|
* navigateForward().then(() => console.log('Navigated forward')).catch(err => console.log(err));
|
1707
2132
|
* ```
|
1708
|
-
* @remarks
|
1709
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1710
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1711
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1712
2133
|
*/
|
1713
2134
|
async navigateForward() {
|
1714
2135
|
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
@@ -1736,10 +2157,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1736
2157
|
* }
|
1737
2158
|
* stopNavigation().then(() => console.log('you shall not navigate')).catch(err => console.log(err));
|
1738
2159
|
* ```
|
1739
|
-
* @remarks
|
1740
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1741
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1742
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1743
2160
|
*/
|
1744
2161
|
stopNavigation() {
|
1745
2162
|
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
@@ -1777,10 +2194,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1777
2194
|
* console.log('Reloaded window')
|
1778
2195
|
* }).catch(err => console.log(err));
|
1779
2196
|
* ```
|
1780
|
-
* @remarks
|
1781
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1782
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1783
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1784
2197
|
*/
|
1785
2198
|
reload(ignoreCache = false) {
|
1786
2199
|
return this.wire
|
@@ -1794,7 +2207,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1794
2207
|
* Prints the WebContents.
|
1795
2208
|
* @param options Printer Options
|
1796
2209
|
*
|
1797
|
-
*
|
2210
|
+
* @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName
|
1798
2211
|
* is empty and the default settings for printing.
|
1799
2212
|
*
|
1800
2213
|
* Use the CSS style `page-break-before: always;` to force print to a new page.
|
@@ -1807,10 +2220,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1807
2220
|
* console.log('print call has been sent to the system');
|
1808
2221
|
* });
|
1809
2222
|
* ```
|
1810
|
-
* @remarks
|
1811
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1812
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1813
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1814
2223
|
*/
|
1815
2224
|
print(options = {}) {
|
1816
2225
|
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
@@ -1820,7 +2229,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1820
2229
|
* @param searchTerm Term to find in page
|
1821
2230
|
* @param options Search options
|
1822
2231
|
*
|
1823
|
-
*
|
2232
|
+
* @remarks By default, each subsequent call will highlight the next text that matches the search term.
|
1824
2233
|
*
|
1825
2234
|
* Returns a promise with the results for the request. By subscribing to the
|
1826
2235
|
* found-in-page event, you can get the results of this call as well.
|
@@ -1855,10 +2264,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1855
2264
|
* console.log(result)
|
1856
2265
|
* });
|
1857
2266
|
* ```
|
1858
|
-
* @remarks
|
1859
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1860
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1861
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1862
2267
|
*/
|
1863
2268
|
findInPage(searchTerm, options) {
|
1864
2269
|
return this.wire
|
@@ -1902,10 +2307,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1902
2307
|
* console.log(results);
|
1903
2308
|
* });
|
1904
2309
|
* ```
|
1905
|
-
* @remarks
|
1906
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1907
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1908
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1909
2310
|
*/
|
1910
2311
|
stopFindInPage(action) {
|
1911
2312
|
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
@@ -1948,10 +2349,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1948
2349
|
* console.log(err);
|
1949
2350
|
* });
|
1950
2351
|
* ```
|
1951
|
-
* @remarks
|
1952
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1953
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1954
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1955
2352
|
*/
|
1956
2353
|
getPrinters() {
|
1957
2354
|
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
@@ -1974,10 +2371,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1974
2371
|
*
|
1975
2372
|
* focusWindow().then(() => console.log('Window focused')).catch(err => console.log(err));
|
1976
2373
|
* ```
|
1977
|
-
* @remarks
|
1978
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
1979
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
1980
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
1981
2374
|
*/
|
1982
2375
|
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
1983
2376
|
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
@@ -2009,10 +2402,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2009
2402
|
* .then(() => console.log('Showing dev tools'))
|
2010
2403
|
* .catch(err => console.error(err));
|
2011
2404
|
* ```
|
2012
|
-
* @remarks
|
2013
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2014
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2015
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2016
2405
|
*/
|
2017
2406
|
async showDeveloperTools() {
|
2018
2407
|
// Note this hits the system action map in core state for legacy reasons.
|
@@ -2021,7 +2410,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2021
2410
|
/**
|
2022
2411
|
* Retrieves the process information associated with a WebContents.
|
2023
2412
|
*
|
2024
|
-
*
|
2413
|
+
* @remarks This includes any iframes associated with the WebContents
|
2025
2414
|
*
|
2026
2415
|
* @example
|
2027
2416
|
* View:
|
@@ -2035,10 +2424,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2035
2424
|
* const win = await fin.Window.getCurrent();
|
2036
2425
|
* const processInfo = await win.getProcessInfo();
|
2037
2426
|
* ```
|
2038
|
-
* @remarks
|
2039
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2040
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2041
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2042
2427
|
*/
|
2043
2428
|
async getProcessInfo() {
|
2044
2429
|
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
@@ -2074,10 +2459,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2074
2459
|
* const win = await fin.Window.create(winOption);
|
2075
2460
|
* const sharedWorkers = await win.getSharedWorkers();
|
2076
2461
|
* ```
|
2077
|
-
* @remarks
|
2078
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2079
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2080
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2081
2462
|
*/
|
2082
2463
|
async getSharedWorkers() {
|
2083
2464
|
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
@@ -2112,10 +2493,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2112
2493
|
* const win = await fin.Window.create(winOption);
|
2113
2494
|
* await win.inspectSharedWorker();
|
2114
2495
|
* ```
|
2115
|
-
* @remarks
|
2116
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2117
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2118
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2119
2496
|
*/
|
2120
2497
|
async inspectSharedWorker() {
|
2121
2498
|
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
@@ -2153,10 +2530,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2153
2530
|
* const sharedWorkers = await win.getSharedWorkers();
|
2154
2531
|
* await win.inspectSharedWorkerById(sharedWorkers[0].id);
|
2155
2532
|
* ```
|
2156
|
-
* @remarks
|
2157
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2158
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2159
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2160
2533
|
*/
|
2161
2534
|
async inspectSharedWorkerById(workerId) {
|
2162
2535
|
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
@@ -2191,10 +2564,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2191
2564
|
* const win = await fin.Window.create(winOption);
|
2192
2565
|
* await win.inspectServiceWorker();
|
2193
2566
|
* ```
|
2194
|
-
* @remarks
|
2195
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2196
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2197
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2198
2567
|
*/
|
2199
2568
|
async inspectServiceWorker() {
|
2200
2569
|
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
@@ -2202,7 +2571,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2202
2571
|
/**
|
2203
2572
|
* Shows a popup window.
|
2204
2573
|
*
|
2205
|
-
*
|
2574
|
+
* @remarks If this WebContents is a view and its attached window has a popup open, this will close it.
|
2206
2575
|
*
|
2207
2576
|
* Shows a popup window. Including a `name` in `options` will attempt to show an existing window as a popup, if
|
2208
2577
|
* that window doesn't exist or no `name` is included a window will be created. If the caller view or the caller
|
@@ -2210,7 +2579,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2210
2579
|
* open popup window before showing the new popup window. Also, if the caller view is destroyed or detached, the popup
|
2211
2580
|
* will be dismissed.
|
2212
2581
|
*
|
2213
|
-
*
|
2582
|
+
* 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.
|
2214
2583
|
*
|
2215
2584
|
* @example
|
2216
2585
|
*
|
@@ -2405,16 +2774,12 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2405
2774
|
* onPopupReady: popupWindowCallback;
|
2406
2775
|
* });
|
2407
2776
|
* ```
|
2408
|
-
* @remarks
|
2409
|
-
* `WebContents` refers to shared functionality between {@link OpenFin.Window} and {@link OpenFin.View}.
|
2410
|
-
* We do not expose an explicit superclass for this functionality, but it does have its own
|
2411
|
-
* {@link OpenFin.WebContentsEvents event namespace}.
|
2412
2777
|
*/
|
2413
2778
|
async showPopupWindow(options) {
|
2414
2779
|
this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
|
2415
2780
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
2416
2781
|
});
|
2417
|
-
if (options
|
2782
|
+
if (options === null || options === void 0 ? void 0 : options.onPopupReady) {
|
2418
2783
|
const readyListener = async ({ popupName }) => {
|
2419
2784
|
try {
|
2420
2785
|
const popupWindow = this.fin.Window.wrapSync({ uuid: this.fin.me.uuid, name: popupName });
|
@@ -2433,8 +2798,8 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2433
2798
|
...options,
|
2434
2799
|
// Internal use only.
|
2435
2800
|
// @ts-expect-error
|
2436
|
-
hasResultCallback: !!options
|
2437
|
-
hasReadyCallback: !!options
|
2801
|
+
hasResultCallback: !!(options === null || options === void 0 ? void 0 : options.onPopupResult),
|
2802
|
+
hasReadyCallback: !!(options === null || options === void 0 ? void 0 : options.onPopupReady)
|
2438
2803
|
},
|
2439
2804
|
...this.identity
|
2440
2805
|
});
|
@@ -2459,7 +2824,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2459
2824
|
}
|
2460
2825
|
return popupResult;
|
2461
2826
|
};
|
2462
|
-
if (options
|
2827
|
+
if (options === null || options === void 0 ? void 0 : options.onPopupResult) {
|
2463
2828
|
const dispatchResultListener = async (payload) => {
|
2464
2829
|
await options.onPopupResult(normalizePopupResult(payload));
|
2465
2830
|
};
|
@@ -2785,49 +3150,6 @@ function requireInstance$2 () {
|
|
2785
3150
|
this.show = async () => {
|
2786
3151
|
await this.wire.sendAction('show-view', { ...this.identity });
|
2787
3152
|
};
|
2788
|
-
/**
|
2789
|
-
* Sets the bounds (top, left, width, height) of the view relative to its window and shows it if it is hidden.
|
2790
|
-
* This method ensures the view is both positioned and showing. It will reposition a visible view and both show and reposition a hidden view.
|
2791
|
-
*
|
2792
|
-
* @remarks View position is relative to the bounds of the window.
|
2793
|
-
* ({top: 0, left: 0} represents the top left corner of the window)
|
2794
|
-
*
|
2795
|
-
* @example
|
2796
|
-
* ```js
|
2797
|
-
* let view;
|
2798
|
-
* async function createView() {
|
2799
|
-
* const me = await fin.Window.getCurrent();
|
2800
|
-
* return fin.View.create({
|
2801
|
-
* name: 'viewNameSetBounds',
|
2802
|
-
* target: me.identity,
|
2803
|
-
* bounds: {top: 10, left: 10, width: 200, height: 200}
|
2804
|
-
* });
|
2805
|
-
* }
|
2806
|
-
*
|
2807
|
-
* async function showViewAt() {
|
2808
|
-
* view = await createView();
|
2809
|
-
* console.log('View created.');
|
2810
|
-
*
|
2811
|
-
* await view.navigate('https://google.com');
|
2812
|
-
* console.log('View navigated to given url.');
|
2813
|
-
*
|
2814
|
-
* await view.showAt({
|
2815
|
-
* top: 100,
|
2816
|
-
* left: 100,
|
2817
|
-
* width: 300,
|
2818
|
-
* height: 300
|
2819
|
-
* });
|
2820
|
-
* }
|
2821
|
-
*
|
2822
|
-
* showViewAt()
|
2823
|
-
* .then(() => console.log('View set to new bounds and shown.'))
|
2824
|
-
* .catch(err => console.log(err));
|
2825
|
-
* ```
|
2826
|
-
* @experimental
|
2827
|
-
*/
|
2828
|
-
this.showAt = async (bounds) => {
|
2829
|
-
await this.wire.sendAction('show-view-at', { bounds, ...this.identity });
|
2830
|
-
};
|
2831
3153
|
/**
|
2832
3154
|
* Hides the current view if it is currently visible.
|
2833
3155
|
*
|
@@ -2987,11 +3309,8 @@ function requireInstance$2 () {
|
|
2987
3309
|
this.wire.sendAction('view-get-parent-layout', { ...this.identity }).catch(() => {
|
2988
3310
|
// don't expose
|
2989
3311
|
});
|
2990
|
-
const
|
2991
|
-
|
2992
|
-
const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
|
2993
|
-
const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
|
2994
|
-
return this.fin.Platform.Layout.wrap(layoutIdentity);
|
3312
|
+
const currentWindow = await this.getCurrentWindow();
|
3313
|
+
return currentWindow.getLayout();
|
2995
3314
|
};
|
2996
3315
|
/**
|
2997
3316
|
* Gets the View's options.
|
@@ -3206,7 +3525,7 @@ function requireInstance$2 () {
|
|
3206
3525
|
var hasRequiredView;
|
3207
3526
|
|
3208
3527
|
function requireView () {
|
3209
|
-
if (hasRequiredView) return view
|
3528
|
+
if (hasRequiredView) return view;
|
3210
3529
|
hasRequiredView = 1;
|
3211
3530
|
(function (exports) {
|
3212
3531
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -3225,20 +3544,20 @@ function requireView () {
|
|
3225
3544
|
};
|
3226
3545
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3227
3546
|
/**
|
3228
|
-
* Entry points for the OpenFin `View` API
|
3547
|
+
* Entry points for the OpenFin `View` API.
|
3229
3548
|
*
|
3230
|
-
*
|
3231
|
-
*
|
3549
|
+
* In the previous version of the API documentation, both static methods involving `View` and instance properties of the
|
3550
|
+
* `View` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
3232
3551
|
*
|
3233
|
-
*
|
3234
|
-
*
|
3552
|
+
* * {@link ViewModule} contains static methods relating to the `View` type, accessible through `fin.View`.
|
3553
|
+
* * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
|
3235
3554
|
*
|
3236
3555
|
* @packageDocumentation
|
3237
3556
|
*/
|
3238
3557
|
__exportStar(requireFactory$3(), exports);
|
3239
|
-
__exportStar(requireInstance$2(), exports);
|
3240
|
-
|
3241
|
-
return view
|
3558
|
+
__exportStar(requireInstance$2(), exports);
|
3559
|
+
} (view));
|
3560
|
+
return view;
|
3242
3561
|
}
|
3243
3562
|
|
3244
3563
|
var hasRequiredInstance$1;
|
@@ -3249,7 +3568,7 @@ function requireInstance$1 () {
|
|
3249
3568
|
Object.defineProperty(Instance$6, "__esModule", { value: true });
|
3250
3569
|
Instance$6.Application = void 0;
|
3251
3570
|
/* eslint-disable import/prefer-default-export */
|
3252
|
-
const base_1 = base
|
3571
|
+
const base_1 = base;
|
3253
3572
|
const window_1 = requireWindow();
|
3254
3573
|
const view_1 = requireView();
|
3255
3574
|
/**
|
@@ -3724,7 +4043,6 @@ function requireInstance$1 () {
|
|
3724
4043
|
/**
|
3725
4044
|
* Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
|
3726
4045
|
* If categories is null the previously set custom JumpList (if any) will be replaced by the standard JumpList for the app (managed by Windows).
|
3727
|
-
*
|
3728
4046
|
* Note: If the "name" property is omitted it defaults to "tasks".
|
3729
4047
|
* @param jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
|
3730
4048
|
*
|
@@ -4025,7 +4343,6 @@ function requireInstance$1 () {
|
|
4025
4343
|
}
|
4026
4344
|
/**
|
4027
4345
|
* Sets file auto download location. It's only allowed in the same application.
|
4028
|
-
*
|
4029
4346
|
* Note: This method is restricted by default and must be enabled via
|
4030
4347
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
4031
4348
|
* @param downloadLocation file auto download location
|
@@ -4051,7 +4368,6 @@ function requireInstance$1 () {
|
|
4051
4368
|
}
|
4052
4369
|
/**
|
4053
4370
|
* 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.
|
4054
|
-
*
|
4055
4371
|
* Note: This method is restricted by default and must be enabled via
|
4056
4372
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
4057
4373
|
*
|
@@ -4079,12 +4395,9 @@ function requireFactory$2 () {
|
|
4079
4395
|
hasRequiredFactory$2 = 1;
|
4080
4396
|
Object.defineProperty(Factory$7, "__esModule", { value: true });
|
4081
4397
|
Factory$7.ApplicationModule = void 0;
|
4082
|
-
const base_1 = base
|
4398
|
+
const base_1 = base;
|
4083
4399
|
const validate_1 = validate;
|
4084
4400
|
const Instance_1 = requireInstance$1();
|
4085
|
-
/**
|
4086
|
-
* Static namespace for OpenFin API methods that interact with the {@link Application} class, available under `fin.Application`.
|
4087
|
-
*/
|
4088
4401
|
class ApplicationModule extends base_1.Base {
|
4089
4402
|
/**
|
4090
4403
|
* Asynchronously returns an Application object that represents an existing application.
|
@@ -4347,7 +4660,7 @@ function requireFactory$2 () {
|
|
4347
4660
|
var hasRequiredApplication;
|
4348
4661
|
|
4349
4662
|
function requireApplication () {
|
4350
|
-
if (hasRequiredApplication) return application
|
4663
|
+
if (hasRequiredApplication) return application;
|
4351
4664
|
hasRequiredApplication = 1;
|
4352
4665
|
(function (exports) {
|
4353
4666
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -4366,20 +4679,20 @@ function requireApplication () {
|
|
4366
4679
|
};
|
4367
4680
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4368
4681
|
/**
|
4369
|
-
* Entry points for the OpenFin `Application` API
|
4682
|
+
* Entry points for the OpenFin `Application` API.
|
4370
4683
|
*
|
4371
|
-
*
|
4372
|
-
*
|
4684
|
+
* In the previous version of the API documentation, both static methods involving `Application` and instance properties of the
|
4685
|
+
* `Application` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
4373
4686
|
*
|
4374
|
-
*
|
4375
|
-
*
|
4687
|
+
* * {@link ApplicationModule} contains static methods relating to the `Application` type, accessible through `fin.Application`.
|
4688
|
+
* * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
|
4376
4689
|
*
|
4377
4690
|
* @packageDocumentation
|
4378
4691
|
*/
|
4379
4692
|
__exportStar(requireFactory$2(), exports);
|
4380
|
-
__exportStar(requireInstance$1(), exports);
|
4381
|
-
|
4382
|
-
return application
|
4693
|
+
__exportStar(requireInstance$1(), exports);
|
4694
|
+
} (application));
|
4695
|
+
return application;
|
4383
4696
|
}
|
4384
4697
|
|
4385
4698
|
var hasRequiredInstance;
|
@@ -4396,7 +4709,6 @@ function requireInstance () {
|
|
4396
4709
|
const application_1 = requireApplication();
|
4397
4710
|
const main_1 = main;
|
4398
4711
|
const view_1 = requireView();
|
4399
|
-
const warnings_1 = warnings;
|
4400
4712
|
/**
|
4401
4713
|
* @PORTED
|
4402
4714
|
* @typedef { object } Margins
|
@@ -4881,6 +5193,7 @@ function requireInstance () {
|
|
4881
5193
|
*/
|
4882
5194
|
constructor(wire, identity) {
|
4883
5195
|
super(wire, identity, 'window');
|
5196
|
+
this.identity = identity;
|
4884
5197
|
}
|
4885
5198
|
/**
|
4886
5199
|
* Adds a listener to the end of the listeners array for the specified event.
|
@@ -5006,7 +5319,6 @@ function requireInstance () {
|
|
5006
5319
|
if (options.autoShow === undefined) {
|
5007
5320
|
options.autoShow = true;
|
5008
5321
|
}
|
5009
|
-
(0, warnings_1.handleDeprecatedWarnings)(options);
|
5010
5322
|
const windowCreation = this.wire.environment.createChildContent({ entityType: 'window', options });
|
5011
5323
|
Promise.all([pageResponse, windowCreation])
|
5012
5324
|
.then((resolvedArr) => {
|
@@ -5423,15 +5735,15 @@ function requireInstance () {
|
|
5423
5735
|
* ```
|
5424
5736
|
* @experimental
|
5425
5737
|
*/
|
5426
|
-
async getLayout(
|
5738
|
+
async getLayout() {
|
5427
5739
|
this.wire.sendAction('window-get-layout', this.identity).catch((e) => {
|
5428
5740
|
// don't expose
|
5429
5741
|
});
|
5430
5742
|
const opts = await this.getOptions();
|
5431
|
-
if (!opts.layout
|
5743
|
+
if (!opts.layout) {
|
5432
5744
|
throw new Error('Window does not have a Layout');
|
5433
5745
|
}
|
5434
|
-
return this.fin.Platform.Layout.wrap(
|
5746
|
+
return this.fin.Platform.Layout.wrap(this.identity);
|
5435
5747
|
}
|
5436
5748
|
/**
|
5437
5749
|
* Gets the current settings of the window.
|
@@ -5712,12 +6024,11 @@ function requireInstance () {
|
|
5712
6024
|
* moveBy(580, 300).then(() => console.log('Moved')).catch(err => console.log(err));
|
5713
6025
|
* ```
|
5714
6026
|
*/
|
5715
|
-
moveBy(deltaLeft, deltaTop
|
6027
|
+
moveBy(deltaLeft, deltaTop) {
|
5716
6028
|
return this.wire
|
5717
6029
|
.sendAction('move-window-by', {
|
5718
6030
|
deltaLeft,
|
5719
6031
|
deltaTop,
|
5720
|
-
positioningOptions,
|
5721
6032
|
...this.identity
|
5722
6033
|
})
|
5723
6034
|
.then(() => undefined);
|
@@ -5747,12 +6058,11 @@ function requireInstance () {
|
|
5747
6058
|
* moveTo(580, 300).then(() => console.log('Moved')).catch(err => console.log(err))
|
5748
6059
|
* ```
|
5749
6060
|
*/
|
5750
|
-
moveTo(left, top
|
6061
|
+
moveTo(left, top) {
|
5751
6062
|
return this.wire
|
5752
6063
|
.sendAction('move-window', {
|
5753
6064
|
left,
|
5754
6065
|
top,
|
5755
|
-
positioningOptions,
|
5756
6066
|
...this.identity
|
5757
6067
|
})
|
5758
6068
|
.then(() => undefined);
|
@@ -5785,13 +6095,12 @@ function requireInstance () {
|
|
5785
6095
|
* resizeBy(580, 300, 'top-right').then(() => console.log('Resized')).catch(err => console.log(err));
|
5786
6096
|
* ```
|
5787
6097
|
*/
|
5788
|
-
resizeBy(deltaWidth, deltaHeight, anchor
|
6098
|
+
resizeBy(deltaWidth, deltaHeight, anchor) {
|
5789
6099
|
return this.wire
|
5790
6100
|
.sendAction('resize-window-by', {
|
5791
6101
|
deltaWidth: Math.floor(deltaWidth),
|
5792
6102
|
deltaHeight: Math.floor(deltaHeight),
|
5793
6103
|
anchor,
|
5794
|
-
positioningOptions,
|
5795
6104
|
...this.identity
|
5796
6105
|
})
|
5797
6106
|
.then(() => undefined);
|
@@ -5824,13 +6133,12 @@ function requireInstance () {
|
|
5824
6133
|
* resizeTo(580, 300, 'top-left').then(() => console.log('Resized')).catch(err => console.log(err));
|
5825
6134
|
* ```
|
5826
6135
|
*/
|
5827
|
-
resizeTo(width, height, anchor
|
6136
|
+
resizeTo(width, height, anchor) {
|
5828
6137
|
return this.wire
|
5829
6138
|
.sendAction('resize-window', {
|
5830
6139
|
width: Math.floor(width),
|
5831
6140
|
height: Math.floor(height),
|
5832
6141
|
anchor,
|
5833
|
-
positioningOptions,
|
5834
6142
|
...this.identity
|
5835
6143
|
})
|
5836
6144
|
.then(() => undefined);
|
@@ -5889,6 +6197,7 @@ function requireInstance () {
|
|
5889
6197
|
}
|
5890
6198
|
/**
|
5891
6199
|
* Sets the window's size and position.
|
6200
|
+
* @property { Bounds } bounds This is a * @type {string} name - name of the window.object that holds the propertys of
|
5892
6201
|
*
|
5893
6202
|
* @example
|
5894
6203
|
* ```js
|
@@ -5915,10 +6224,8 @@ function requireInstance () {
|
|
5915
6224
|
* }).then(() => console.log('Bounds set to window')).catch(err => console.log(err));
|
5916
6225
|
* ```
|
5917
6226
|
*/
|
5918
|
-
setBounds(bounds
|
5919
|
-
return this.wire
|
5920
|
-
.sendAction('set-window-bounds', { ...bounds, ...this.identity, positioningOptions })
|
5921
|
-
.then(() => undefined);
|
6227
|
+
setBounds(bounds) {
|
6228
|
+
return this.wire.sendAction('set-window-bounds', { ...bounds, ...this.identity }).then(() => undefined);
|
5922
6229
|
}
|
5923
6230
|
/**
|
5924
6231
|
* Shows the window if it is hidden.
|
@@ -6060,10 +6367,7 @@ function requireInstance () {
|
|
6060
6367
|
* Calling this method will close previously opened menus.
|
6061
6368
|
* @experimental
|
6062
6369
|
* @param options
|
6063
|
-
*
|
6064
|
-
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
6065
|
-
* of all possible data shapes for the entire menu, and the click handler should process
|
6066
|
-
* these with a "reducer" pattern.
|
6370
|
+
*
|
6067
6371
|
* @example
|
6068
6372
|
* This could be used to show a drop down menu over views in a platform window:
|
6069
6373
|
* ```js
|
@@ -6153,7 +6457,6 @@ function requireInstance () {
|
|
6153
6457
|
return this.wire.sendAction('close-popup-menu', { ...this.identity }).then(() => undefined);
|
6154
6458
|
}
|
6155
6459
|
/**
|
6156
|
-
* @PORTED
|
6157
6460
|
* @typedef {object} PopupOptions
|
6158
6461
|
* @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.
|
6159
6462
|
* @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
|
@@ -6171,7 +6474,6 @@ function requireInstance () {
|
|
6171
6474
|
* @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.
|
6172
6475
|
*/
|
6173
6476
|
/**
|
6174
|
-
* @PORTED
|
6175
6477
|
* @typedef {object} PopupResult
|
6176
6478
|
* @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
|
6177
6479
|
* @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
|
@@ -6262,12 +6564,9 @@ function requireFactory$1 () {
|
|
6262
6564
|
hasRequiredFactory$1 = 1;
|
6263
6565
|
Object.defineProperty(Factory$8, "__esModule", { value: true });
|
6264
6566
|
Factory$8._WindowModule = void 0;
|
6265
|
-
const base_1 = base
|
6567
|
+
const base_1 = base;
|
6266
6568
|
const validate_1 = validate;
|
6267
6569
|
const Instance_1 = requireInstance();
|
6268
|
-
/**
|
6269
|
-
* Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
|
6270
|
-
*/
|
6271
6570
|
class _WindowModule extends base_1.Base {
|
6272
6571
|
/**
|
6273
6572
|
* Asynchronously returns a Window object that represents an existing window.
|
@@ -6404,7 +6703,7 @@ function requireFactory$1 () {
|
|
6404
6703
|
var hasRequiredWindow;
|
6405
6704
|
|
6406
6705
|
function requireWindow () {
|
6407
|
-
if (hasRequiredWindow) return window$
|
6706
|
+
if (hasRequiredWindow) return window$1;
|
6408
6707
|
hasRequiredWindow = 1;
|
6409
6708
|
(function (exports) {
|
6410
6709
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -6423,37 +6722,30 @@ function requireWindow () {
|
|
6423
6722
|
};
|
6424
6723
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6425
6724
|
/**
|
6426
|
-
* Entry points for the OpenFin `Window` API
|
6725
|
+
* Entry points for the OpenFin `Window` API.
|
6427
6726
|
*
|
6428
|
-
*
|
6429
|
-
*
|
6727
|
+
* In the previous version of the API documentation, both static methods involving `Window` and instance properties of the
|
6728
|
+
* `Window` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
6430
6729
|
*
|
6431
|
-
*
|
6432
|
-
*
|
6730
|
+
* * {@link _WindowModule} contains static methods relating to the `Window` type, accessible through `fin.Window`.
|
6731
|
+
* * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
|
6433
6732
|
*
|
6434
6733
|
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
6435
6734
|
*
|
6436
6735
|
* @packageDocumentation
|
6437
6736
|
*/
|
6438
6737
|
__exportStar(requireFactory$1(), exports);
|
6439
|
-
__exportStar(requireInstance(), exports);
|
6440
|
-
|
6441
|
-
return window$
|
6738
|
+
__exportStar(requireInstance(), exports);
|
6739
|
+
} (window$1));
|
6740
|
+
return window$1;
|
6442
6741
|
}
|
6443
6742
|
|
6444
|
-
|
6445
|
-
|
6446
|
-
|
6447
|
-
* * {@link System} contains static members of the `System` API (available under `fin.System`)
|
6448
|
-
*
|
6449
|
-
* @packageDocumentation
|
6450
|
-
*/
|
6451
|
-
Object.defineProperty(system$1, "__esModule", { value: true });
|
6452
|
-
system$1.System = void 0;
|
6453
|
-
const base_1$j = base$1;
|
6743
|
+
Object.defineProperty(system, "__esModule", { value: true });
|
6744
|
+
system.System = void 0;
|
6745
|
+
const base_1$j = base;
|
6454
6746
|
const transport_errors_1$2 = transportErrors;
|
6455
6747
|
const window_1 = requireWindow();
|
6456
|
-
const events_1$6 =
|
6748
|
+
const events_1$6 = eventsExports;
|
6457
6749
|
/**
|
6458
6750
|
* An object representing the core of OpenFin Runtime. Allows the developer
|
6459
6751
|
* to perform system-level actions, such as accessing logs, viewing processes,
|
@@ -7455,8 +7747,7 @@ class System extends base_1$j.EmitterBase {
|
|
7455
7747
|
}
|
7456
7748
|
/**
|
7457
7749
|
* Attempt to close an external process. The process will be terminated if it
|
7458
|
-
* has not closed after the elapsed timeout in milliseconds
|
7459
|
-
*
|
7750
|
+
* has not closed after the elapsed timeout in milliseconds.<br>
|
7460
7751
|
* Note: This method is restricted by default and must be enabled via
|
7461
7752
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
7462
7753
|
* @param options A object defined in the TerminateExternalRequestType interface
|
@@ -7492,8 +7783,7 @@ class System extends base_1$j.EmitterBase {
|
|
7492
7783
|
return this.wire.sendAction('update-proxy', options).then(() => undefined);
|
7493
7784
|
}
|
7494
7785
|
/**
|
7495
|
-
* Downloads the given application asset
|
7496
|
-
*
|
7786
|
+
* Downloads the given application asset<br>
|
7497
7787
|
* Note: This method is restricted by default and must be enabled via
|
7498
7788
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
7499
7789
|
* @param appAsset App asset object
|
@@ -8296,7 +8586,7 @@ class System extends base_1$j.EmitterBase {
|
|
8296
8586
|
await this.wire.sendAction('set-domain-settings', { domainSettings, ...this.identity });
|
8297
8587
|
}
|
8298
8588
|
}
|
8299
|
-
system
|
8589
|
+
system.System = System;
|
8300
8590
|
|
8301
8591
|
var interappbus = {};
|
8302
8592
|
|
@@ -8387,7 +8677,7 @@ class ChannelBase {
|
|
8387
8677
|
try {
|
8388
8678
|
const mainAction = this.subscriptions.has(topic)
|
8389
8679
|
? this.subscriptions.get(topic)
|
8390
|
-
: (currentPayload, id) => (this.defaultAction
|
8680
|
+
: (currentPayload, id) => { var _a; return ((_a = this.defaultAction) !== null && _a !== void 0 ? _a : ChannelBase.defaultAction)(topic, currentPayload, id); };
|
8391
8681
|
const preActionProcessed = this.preAction ? await this.preAction(topic, payload, senderIdentity) : payload;
|
8392
8682
|
const actionProcessed = await mainAction(preActionProcessed, senderIdentity);
|
8393
8683
|
return this.postAction ? await this.postAction(topic, actionProcessed, senderIdentity) : actionProcessed;
|
@@ -8716,17 +9006,17 @@ const channelClientsByEndpointId = new Map();
|
|
8716
9006
|
* provider via {@link ChannelClient#dispatch dispatch} and to listen for communication
|
8717
9007
|
* from the provider by registering an action via {@link ChannelClient#register register}.
|
8718
9008
|
*
|
8719
|
-
*
|
9009
|
+
* Synchronous Methods:
|
8720
9010
|
* * {@link ChannelClient#onDisconnection onDisconnection(listener)}
|
8721
9011
|
* * {@link ChannelClient#register register(action, listener)}
|
8722
9012
|
* * {@link ChannelClient#remove remove(action)}
|
8723
9013
|
*
|
8724
|
-
*
|
9014
|
+
* Asynchronous Methods:
|
8725
9015
|
* * {@link ChannelClient#disconnect disconnect()}
|
8726
9016
|
* * {@link ChannelClient#dispatch dispatch(action, payload)}
|
8727
9017
|
*
|
8728
|
-
*
|
8729
|
-
* Middleware functions receive the following arguments: (action, payload, senderId).
|
9018
|
+
* Middleware:
|
9019
|
+
* <br>Middleware functions receive the following arguments: (action, payload, senderId).
|
8730
9020
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
8731
9021
|
* unless it is undefined, in which case the original payload is used. Middleware can be used for side effects.
|
8732
9022
|
* * {@link ChannelClient#setDefaultAction setDefaultAction(middleware)}
|
@@ -8920,6 +9210,7 @@ class ClassicStrategy {
|
|
8920
9210
|
// connection problems occur
|
8921
9211
|
_ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map);
|
8922
9212
|
this.send = async (endpointId, action, payload) => {
|
9213
|
+
var _a;
|
8923
9214
|
const to = __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
|
8924
9215
|
if (!to) {
|
8925
9216
|
throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
|
@@ -8939,12 +9230,13 @@ class ClassicStrategy {
|
|
8939
9230
|
action,
|
8940
9231
|
payload
|
8941
9232
|
});
|
8942
|
-
__classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)
|
9233
|
+
(_a = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)) === null || _a === void 0 ? void 0 : _a.add(p);
|
8943
9234
|
const raw = await p.catch((error) => {
|
8944
9235
|
throw new Error(error.message);
|
8945
9236
|
}).finally(() => {
|
9237
|
+
var _a;
|
8946
9238
|
// clean up the pending promise
|
8947
|
-
__classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)
|
9239
|
+
(_a = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)) === null || _a === void 0 ? void 0 : _a.delete(p);
|
8948
9240
|
});
|
8949
9241
|
return raw.payload.data.result;
|
8950
9242
|
};
|
@@ -8965,8 +9257,8 @@ class ClassicStrategy {
|
|
8965
9257
|
const id = __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
|
8966
9258
|
__classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
|
8967
9259
|
const pendingSet = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
|
8968
|
-
pendingSet
|
8969
|
-
const errorMsg = `Channel connection with identity uuid: ${id
|
9260
|
+
pendingSet === null || pendingSet === void 0 ? void 0 : pendingSet.forEach((p) => {
|
9261
|
+
const errorMsg = `Channel connection with identity uuid: ${id === null || id === void 0 ? void 0 : id.uuid} / name: ${id === null || id === void 0 ? void 0 : id.name} / endpointId: ${endpointId} no longer connected.`;
|
8970
9262
|
p.cancel(new Error(errorMsg));
|
8971
9263
|
});
|
8972
9264
|
}
|
@@ -8978,8 +9270,9 @@ class ClassicStrategy {
|
|
8978
9270
|
__classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
|
8979
9271
|
}
|
8980
9272
|
isValidEndpointPayload(payload) {
|
8981
|
-
|
8982
|
-
|
9273
|
+
var _a, _b;
|
9274
|
+
return (typeof ((_a = payload === null || payload === void 0 ? void 0 : payload.endpointIdentity) === null || _a === void 0 ? void 0 : _a.endpointId) === 'string' ||
|
9275
|
+
typeof ((_b = payload === null || payload === void 0 ? void 0 : payload.endpointIdentity) === null || _b === void 0 ? void 0 : _b.channelId) === 'string');
|
8983
9276
|
}
|
8984
9277
|
}
|
8985
9278
|
strategy$2.ClassicStrategy = ClassicStrategy;
|
@@ -9056,12 +9349,13 @@ class RTCEndpoint {
|
|
9056
9349
|
this.rtc.rtcClient.close();
|
9057
9350
|
};
|
9058
9351
|
this.rtc.channels.response.addEventListener('message', (e) => {
|
9352
|
+
var _a;
|
9059
9353
|
let { data } = e;
|
9060
9354
|
if (e.data instanceof ArrayBuffer) {
|
9061
9355
|
data = new TextDecoder().decode(e.data);
|
9062
9356
|
}
|
9063
9357
|
const { messageId, payload, success, error } = JSON.parse(data);
|
9064
|
-
const { resolve, reject } = this.responseMap.get(messageId)
|
9358
|
+
const { resolve, reject } = (_a = this.responseMap.get(messageId)) !== null && _a !== void 0 ? _a : {};
|
9065
9359
|
if (resolve && reject) {
|
9066
9360
|
this.responseMap.delete(messageId);
|
9067
9361
|
if (success) {
|
@@ -9234,7 +9528,7 @@ var iceManager = {};
|
|
9234
9528
|
|
9235
9529
|
Object.defineProperty(iceManager, "__esModule", { value: true });
|
9236
9530
|
iceManager.RTCICEManager = void 0;
|
9237
|
-
const base_1$i = base
|
9531
|
+
const base_1$i = base;
|
9238
9532
|
/*
|
9239
9533
|
Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
|
9240
9534
|
*/
|
@@ -9310,8 +9604,9 @@ class RTCICEManager extends base_1$i.EmitterBase {
|
|
9310
9604
|
const rtcConnectionId = Math.random().toString();
|
9311
9605
|
const rtcClient = this.createRtcPeer();
|
9312
9606
|
rtcClient.addEventListener('icecandidate', async (e) => {
|
9607
|
+
var _a;
|
9313
9608
|
if (e.candidate) {
|
9314
|
-
await this.raiseClientIce(rtcConnectionId, { candidate: e.candidate
|
9609
|
+
await this.raiseClientIce(rtcConnectionId, { candidate: (_a = e.candidate) === null || _a === void 0 ? void 0 : _a.toJSON() });
|
9315
9610
|
}
|
9316
9611
|
});
|
9317
9612
|
await this.listenForProviderIce(rtcConnectionId, async (payload) => {
|
@@ -9336,8 +9631,9 @@ class RTCICEManager extends base_1$i.EmitterBase {
|
|
9336
9631
|
const requestChannelPromise = RTCICEManager.createDataChannelPromise('request', rtcClient);
|
9337
9632
|
const responseChannelPromise = RTCICEManager.createDataChannelPromise('response', rtcClient);
|
9338
9633
|
rtcClient.addEventListener('icecandidate', async (e) => {
|
9634
|
+
var _a;
|
9339
9635
|
if (e.candidate) {
|
9340
|
-
await this.raiseProviderIce(rtcConnectionId, { candidate: e.candidate
|
9636
|
+
await this.raiseProviderIce(rtcConnectionId, { candidate: (_a = e.candidate) === null || _a === void 0 ? void 0 : _a.toJSON() });
|
9341
9637
|
}
|
9342
9638
|
});
|
9343
9639
|
await this.listenForClientIce(rtcConnectionId, async (payload) => {
|
@@ -9410,20 +9706,20 @@ const runtimeVersioning_1 = runtimeVersioning;
|
|
9410
9706
|
* a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
|
9411
9707
|
* and to listen for communication from clients by registering an action via {@link ChannelProvider#register register}.
|
9412
9708
|
*
|
9413
|
-
*
|
9709
|
+
* Synchronous Methods:
|
9414
9710
|
* * {@link ChannelProvider#onConnection onConnection(listener)}
|
9415
9711
|
* * {@link ChannelProvider#onDisconnection onDisconnection(listener)}
|
9416
9712
|
* * {@link ChannelProvider#publish publish(action, payload)}
|
9417
9713
|
* * {@link ChannelProvider#register register(action, listener)}
|
9418
9714
|
* * {@link ChannelProvider#remove remove(action)}
|
9419
9715
|
*
|
9420
|
-
*
|
9716
|
+
* Asynchronous Methods:
|
9421
9717
|
* * {@link ChannelProvider#destroy destroy()}
|
9422
9718
|
* * {@link ChannelProvider#dispatch dispatch(to, action, payload)}
|
9423
9719
|
* * {@link ChannelProvider#getAllClientInfo getAllClientInfo()}
|
9424
9720
|
*
|
9425
|
-
*
|
9426
|
-
* Middleware functions receive the following arguments: (action, payload, senderId).
|
9721
|
+
* Middleware:
|
9722
|
+
* <br>Middleware functions receive the following arguments: (action, payload, senderId).
|
9427
9723
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
9428
9724
|
* unless it is undefined, in which case the most recently defined payload is used. Middleware can be used for side effects.
|
9429
9725
|
* * {@link ChannelProvider#setDefaultAction setDefaultAction(middleware)}
|
@@ -9519,7 +9815,8 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9519
9815
|
* ```
|
9520
9816
|
*/
|
9521
9817
|
dispatch(to, action, payload) {
|
9522
|
-
|
9818
|
+
var _a;
|
9819
|
+
const endpointId = (_a = to.endpointId) !== null && _a !== void 0 ? _a : this.getEndpointIdForOpenFinId(to, action);
|
9523
9820
|
if (endpointId && __classPrivateFieldGet$9(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
|
9524
9821
|
return __classPrivateFieldGet$9(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload);
|
9525
9822
|
}
|
@@ -9695,12 +9992,13 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9695
9992
|
}
|
9696
9993
|
}
|
9697
9994
|
getEndpointIdForOpenFinId(clientIdentity, action) {
|
9995
|
+
var _a;
|
9698
9996
|
const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
|
9699
9997
|
if (matchingConnections.length >= 2) {
|
9700
9998
|
const protectedObj = __classPrivateFieldGet$9(this, _ChannelProvider_protectedObj, "f");
|
9701
9999
|
const { uuid, name } = clientIdentity;
|
9702
|
-
const providerUuid = protectedObj
|
9703
|
-
const providerName = protectedObj
|
10000
|
+
const providerUuid = protectedObj === null || protectedObj === void 0 ? void 0 : protectedObj.providerIdentity.uuid;
|
10001
|
+
const providerName = protectedObj === null || protectedObj === void 0 ? void 0 : protectedObj.providerIdentity.name;
|
9704
10002
|
// eslint-disable-next-line no-console
|
9705
10003
|
console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the
|
9706
10004
|
"endpointId" parameter. The identity you are dispatching to ({uuid: ${uuid}, name: ${name}})
|
@@ -9708,7 +10006,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9708
10006
|
({uuid: ${providerUuid}, name: ${providerName}}) will only be processed by the most recently-created client.`);
|
9709
10007
|
}
|
9710
10008
|
// Pop to return the most recently created endpointId.
|
9711
|
-
return matchingConnections.pop()
|
10009
|
+
return (_a = matchingConnections.pop()) === null || _a === void 0 ? void 0 : _a.endpointId;
|
9712
10010
|
}
|
9713
10011
|
// eslint-disable-next-line class-methods-use-this
|
9714
10012
|
static clientIdentityIncludesEndpointId(subscriptionIdentity) {
|
@@ -9730,7 +10028,7 @@ var messageReceiver = {};
|
|
9730
10028
|
Object.defineProperty(messageReceiver, "__esModule", { value: true });
|
9731
10029
|
messageReceiver.MessageReceiver = void 0;
|
9732
10030
|
const client_1$1 = client;
|
9733
|
-
const base_1$h = base
|
10031
|
+
const base_1$h = base;
|
9734
10032
|
/*
|
9735
10033
|
This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
|
9736
10034
|
It needs to be a singleton because there can only be one per wire. It tracks both clients and providers' processAction passed in via the strategy.
|
@@ -9751,10 +10049,9 @@ class MessageReceiver extends base_1$h.Base {
|
|
9751
10049
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
9752
10050
|
}
|
9753
10051
|
async processChannelMessage(msg) {
|
10052
|
+
var _a, _b;
|
9754
10053
|
const { senderIdentity, providerIdentity, action, ackToSender, payload, intendedTargetIdentity } = msg.payload;
|
9755
|
-
const key = intendedTargetIdentity.channelId
|
9756
|
-
intendedTargetIdentity.endpointId ?? // The recipient is a client
|
9757
|
-
this.latestEndpointIdByChannelId.get(providerIdentity.channelId); // No endpointId was passed, make best attempt
|
10054
|
+
const key = (_b = (_a = intendedTargetIdentity.channelId) !== null && _a !== void 0 ? _a : intendedTargetIdentity.endpointId) !== null && _b !== void 0 ? _b : this.latestEndpointIdByChannelId.get(providerIdentity.channelId); // No endpointId was passed, make best attempt
|
9758
10055
|
const handler = this.endpointMap.get(key);
|
9759
10056
|
if (!handler) {
|
9760
10057
|
ackToSender.payload.success = false;
|
@@ -9834,9 +10131,12 @@ class ProtocolManager {
|
|
9834
10131
|
return supported;
|
9835
10132
|
};
|
9836
10133
|
this.getCompatibleProtocols = (providerProtocols, clientOffer) => {
|
9837
|
-
const supported = clientOffer.supportedProtocols.filter((clientProtocol) => providerProtocols.some((providerProtocol) =>
|
9838
|
-
|
9839
|
-
providerProtocol.
|
10134
|
+
const supported = clientOffer.supportedProtocols.filter((clientProtocol) => providerProtocols.some((providerProtocol) => {
|
10135
|
+
var _a;
|
10136
|
+
return providerProtocol.type === clientProtocol.type &&
|
10137
|
+
clientProtocol.version >= providerProtocol.minimumVersion &&
|
10138
|
+
providerProtocol.version >= ((_a = clientProtocol.minimumVersion) !== null && _a !== void 0 ? _a : 0);
|
10139
|
+
}));
|
9840
10140
|
return supported.slice(0, clientOffer.maxProtocols);
|
9841
10141
|
};
|
9842
10142
|
}
|
@@ -9918,7 +10218,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
|
|
9918
10218
|
Object.defineProperty(connectionManager, "__esModule", { value: true });
|
9919
10219
|
connectionManager.ConnectionManager = void 0;
|
9920
10220
|
const exhaustive_1 = exhaustive;
|
9921
|
-
const base_1$g = base
|
10221
|
+
const base_1$g = base;
|
9922
10222
|
const strategy_1 = strategy$2;
|
9923
10223
|
const strategy_2 = strategy$1;
|
9924
10224
|
const ice_manager_1 = iceManager;
|
@@ -9961,7 +10261,7 @@ class ConnectionManager extends base_1$g.Base {
|
|
9961
10261
|
}
|
9962
10262
|
createProvider(options, providerIdentity) {
|
9963
10263
|
const opts = Object.assign(this.wire.environment.getDefaultChannelOptions().create, options || {});
|
9964
|
-
const protocols = this.protocolManager.getProviderProtocols(opts
|
10264
|
+
const protocols = this.protocolManager.getProviderProtocols(opts === null || opts === void 0 ? void 0 : opts.protocols);
|
9965
10265
|
const createSingleStrategy = (stratType) => {
|
9966
10266
|
switch (stratType) {
|
9967
10267
|
case 'rtc':
|
@@ -9998,7 +10298,7 @@ class ConnectionManager extends base_1$g.Base {
|
|
9998
10298
|
return channel;
|
9999
10299
|
}
|
10000
10300
|
async createClientOffer(options) {
|
10001
|
-
const protocols = this.protocolManager.getClientProtocols(options
|
10301
|
+
const protocols = this.protocolManager.getClientProtocols(options === null || options === void 0 ? void 0 : options.protocols);
|
10002
10302
|
let rtcPacket;
|
10003
10303
|
const supportedProtocols = await Promise.all(protocols.map(async (type) => {
|
10004
10304
|
switch (type) {
|
@@ -10026,13 +10326,14 @@ class ConnectionManager extends base_1$g.Base {
|
|
10026
10326
|
};
|
10027
10327
|
}
|
10028
10328
|
async createClientStrategy(rtcPacket, routingInfo) {
|
10329
|
+
var _a;
|
10029
10330
|
if (!routingInfo.endpointId) {
|
10030
10331
|
routingInfo.endpointId = this.wire.environment.getNextMessageId();
|
10031
10332
|
// For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
|
10032
10333
|
// clients that are in the same context as the newly-connected client.
|
10033
10334
|
__classPrivateFieldGet$8(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
|
10034
10335
|
}
|
10035
|
-
const answer = routingInfo.answer
|
10336
|
+
const answer = (_a = routingInfo.answer) !== null && _a !== void 0 ? _a : {
|
10036
10337
|
supportedProtocols: [{ type: 'classic', version: 1 }]
|
10037
10338
|
};
|
10038
10339
|
const createStrategyFromAnswer = async (protocol) => {
|
@@ -10090,7 +10391,7 @@ class ConnectionManager extends base_1$g.Base {
|
|
10090
10391
|
if (!(provider instanceof provider_1$1.ChannelProvider)) {
|
10091
10392
|
throw Error('Cannot connect to a channel client');
|
10092
10393
|
}
|
10093
|
-
const offer = clientOffer
|
10394
|
+
const offer = clientOffer !== null && clientOffer !== void 0 ? clientOffer : {
|
10094
10395
|
supportedProtocols: [{ type: 'classic', version: 1 }],
|
10095
10396
|
maxProtocols: 1
|
10096
10397
|
};
|
@@ -10148,15 +10449,6 @@ class ConnectionManager extends base_1$g.Base {
|
|
10148
10449
|
connectionManager.ConnectionManager = ConnectionManager;
|
10149
10450
|
_ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnectionManager = new WeakMap();
|
10150
10451
|
|
10151
|
-
/**
|
10152
|
-
* Entry points for the `Channel` subset of the `InterApplicationBus` API (`fin.InterApplicationBus.Channel`).
|
10153
|
-
*
|
10154
|
-
* * {@link Channel} contains static members of the `Channel` API, accessible through `fin.InterApplicationBus.Channel`.
|
10155
|
-
* * {@link OpenFin.ChannelClient} describes a client of a channel, e.g. as returned by `fin.InterApplicationBus.Channel.connect`.
|
10156
|
-
* * {@link OpenFin.ChannelProvider} describes a provider of a channel, e.g. as returned by `fin.InterApplicationBus.Channel.create`.
|
10157
|
-
*
|
10158
|
-
* @packageDocumentation
|
10159
|
-
*/
|
10160
10452
|
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
10161
10453
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
10162
10454
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
@@ -10172,9 +10464,9 @@ var _Channel_connectionManager, _Channel_internalEmitter, _Channel_readyToConnec
|
|
10172
10464
|
Object.defineProperty(channel$1, "__esModule", { value: true });
|
10173
10465
|
channel$1.Channel = void 0;
|
10174
10466
|
/* eslint-disable no-console */
|
10175
|
-
const events_1$5 =
|
10467
|
+
const events_1$5 = eventsExports;
|
10176
10468
|
const lazy_1$1 = lazy;
|
10177
|
-
const base_1$f = base
|
10469
|
+
const base_1$f = base;
|
10178
10470
|
const client_1 = client;
|
10179
10471
|
const connection_manager_1 = connectionManager;
|
10180
10472
|
const provider_1 = provider;
|
@@ -10492,15 +10784,8 @@ _Channel_connectionManager = new WeakMap(), _Channel_internalEmitter = new WeakM
|
|
10492
10784
|
|
10493
10785
|
Object.defineProperty(interappbus, "__esModule", { value: true });
|
10494
10786
|
interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
|
10495
|
-
|
10496
|
-
|
10497
|
-
*
|
10498
|
-
* * {@link InterApplicationBus} contains static members of the `InterApplicationBus` API, accessible through `fin.InterApplicationBus`.
|
10499
|
-
*
|
10500
|
-
* @packageDocumentation
|
10501
|
-
*/
|
10502
|
-
const events_1$4 = require$$0;
|
10503
|
-
const base_1$e = base$1;
|
10787
|
+
const events_1$4 = eventsExports;
|
10788
|
+
const base_1$e = base;
|
10504
10789
|
const ref_counter_1 = refCounter;
|
10505
10790
|
const index_1$2 = channel$1;
|
10506
10791
|
const validate_1$3 = validate;
|
@@ -10707,16 +10992,9 @@ function createKey(...toHash) {
|
|
10707
10992
|
|
10708
10993
|
var clipboard = {};
|
10709
10994
|
|
10710
|
-
/**
|
10711
|
-
* Entry point for the OpenFin `Clipboard` API (`fin.Clipboard`).
|
10712
|
-
*
|
10713
|
-
* * {@link Clipboard} contains static members of the `Clipboard` API, accessible through `fin.Clipboard`.
|
10714
|
-
*
|
10715
|
-
* @packageDocumentation
|
10716
|
-
*/
|
10717
10995
|
Object.defineProperty(clipboard, "__esModule", { value: true });
|
10718
10996
|
clipboard.Clipboard = void 0;
|
10719
|
-
const base_1$d = base
|
10997
|
+
const base_1$d = base;
|
10720
10998
|
/**
|
10721
10999
|
* @PORTED
|
10722
11000
|
* WriteRequestType interface
|
@@ -10915,7 +11193,7 @@ class Clipboard extends base_1$d.Base {
|
|
10915
11193
|
}
|
10916
11194
|
clipboard.Clipboard = Clipboard;
|
10917
11195
|
|
10918
|
-
var externalApplication
|
11196
|
+
var externalApplication = {};
|
10919
11197
|
|
10920
11198
|
var Factory$5 = {};
|
10921
11199
|
|
@@ -10924,11 +11202,11 @@ var Instance$4 = {};
|
|
10924
11202
|
Object.defineProperty(Instance$4, "__esModule", { value: true });
|
10925
11203
|
Instance$4.ExternalApplication = void 0;
|
10926
11204
|
/* eslint-disable import/prefer-default-export */
|
10927
|
-
const base_1$c = base
|
11205
|
+
const base_1$c = base;
|
10928
11206
|
/**
|
10929
11207
|
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
10930
11208
|
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
10931
|
-
* Discovery of connections is provided by
|
11209
|
+
* Discovery of connections is provided by <a href="tutorial-System.getAllExternalApplications.html">getAllExternalApplications.</a>
|
10932
11210
|
*
|
10933
11211
|
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
10934
11212
|
* - Processes which have connected to an OpenFin runtime via an adapter
|
@@ -11040,11 +11318,8 @@ Instance$4.ExternalApplication = ExternalApplication;
|
|
11040
11318
|
|
11041
11319
|
Object.defineProperty(Factory$5, "__esModule", { value: true });
|
11042
11320
|
Factory$5.ExternalApplicationModule = void 0;
|
11043
|
-
const base_1$b = base
|
11321
|
+
const base_1$b = base;
|
11044
11322
|
const Instance_1$4 = Instance$4;
|
11045
|
-
/**
|
11046
|
-
* Static namespace for OpenFin API methods that interact with the {@link ExternalApplication} class, available under `fin.ExternalApplication`.
|
11047
|
-
*/
|
11048
11323
|
class ExternalApplicationModule extends base_1$b.Base {
|
11049
11324
|
/**
|
11050
11325
|
* Asynchronously returns an External Application object that represents an external application.
|
@@ -11104,21 +11379,21 @@ Factory$5.ExternalApplicationModule = ExternalApplicationModule;
|
|
11104
11379
|
};
|
11105
11380
|
Object.defineProperty(exports, "__esModule", { value: true });
|
11106
11381
|
/**
|
11107
|
-
* Entry points for the OpenFin `ExternalApplication` API
|
11382
|
+
* Entry points for the OpenFin `ExternalApplication` API.
|
11108
11383
|
*
|
11109
|
-
*
|
11110
|
-
*
|
11384
|
+
* In the previous version of the API documentation, both static methods involving `ExternalApplication` and instance properties of the
|
11385
|
+
* `ExternalApplication` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
11111
11386
|
*
|
11112
|
-
*
|
11113
|
-
*
|
11387
|
+
* * {@link ExternalApplicationModule} contains static methods relating to the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
|
11388
|
+
* * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
|
11114
11389
|
*
|
11115
11390
|
* @packageDocumentation
|
11116
11391
|
*/
|
11117
11392
|
__exportStar(Factory$5, exports);
|
11118
|
-
__exportStar(Instance$4, exports);
|
11119
|
-
} (externalApplication
|
11393
|
+
__exportStar(Instance$4, exports);
|
11394
|
+
} (externalApplication));
|
11120
11395
|
|
11121
|
-
var frame
|
11396
|
+
var frame = {};
|
11122
11397
|
|
11123
11398
|
var Factory$4 = {};
|
11124
11399
|
|
@@ -11127,7 +11402,7 @@ var Instance$3 = {};
|
|
11127
11402
|
Object.defineProperty(Instance$3, "__esModule", { value: true });
|
11128
11403
|
Instance$3._Frame = void 0;
|
11129
11404
|
/* eslint-disable import/prefer-default-export */
|
11130
|
-
const base_1$a = base
|
11405
|
+
const base_1$a = base;
|
11131
11406
|
/**
|
11132
11407
|
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
11133
11408
|
* has its own DOM and global JS context (which may or may not be linked to that of the parent depending
|
@@ -11269,12 +11544,9 @@ Instance$3._Frame = _Frame;
|
|
11269
11544
|
|
11270
11545
|
Object.defineProperty(Factory$4, "__esModule", { value: true });
|
11271
11546
|
Factory$4._FrameModule = void 0;
|
11272
|
-
const base_1$9 = base
|
11547
|
+
const base_1$9 = base;
|
11273
11548
|
const validate_1$2 = validate;
|
11274
11549
|
const Instance_1$3 = Instance$3;
|
11275
|
-
/**
|
11276
|
-
* Static namespace for OpenFin API methods that interact with the {@link _Frame} class, available under `fin.Frame`.
|
11277
|
-
*/
|
11278
11550
|
class _FrameModule extends base_1$9.Base {
|
11279
11551
|
/**
|
11280
11552
|
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
@@ -11355,13 +11627,13 @@ Factory$4._FrameModule = _FrameModule;
|
|
11355
11627
|
|
11356
11628
|
(function (exports) {
|
11357
11629
|
/**
|
11358
|
-
* Entry points for the OpenFin `Frame` API
|
11630
|
+
* Entry points for the OpenFin `Frame` API.
|
11359
11631
|
*
|
11360
|
-
*
|
11361
|
-
*
|
11632
|
+
* In the previous version of the API documentation, both static methods involving `Frame` and instance properties of the
|
11633
|
+
* `Frame` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
11362
11634
|
*
|
11363
|
-
*
|
11364
|
-
*
|
11635
|
+
* * {@link _FrameModule} contains static methods relating to the `Frame` type, accessible through `fin.Frame`.
|
11636
|
+
* * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
|
11365
11637
|
*
|
11366
11638
|
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
11367
11639
|
*
|
@@ -11383,14 +11655,14 @@ Factory$4._FrameModule = _FrameModule;
|
|
11383
11655
|
};
|
11384
11656
|
Object.defineProperty(exports, "__esModule", { value: true });
|
11385
11657
|
__exportStar(Factory$4, exports);
|
11386
|
-
__exportStar(Instance$3, exports);
|
11387
|
-
} (frame
|
11658
|
+
__exportStar(Instance$3, exports);
|
11659
|
+
} (frame));
|
11388
11660
|
|
11389
|
-
var globalHotkey
|
11661
|
+
var globalHotkey = {};
|
11390
11662
|
|
11391
|
-
Object.defineProperty(globalHotkey
|
11392
|
-
globalHotkey
|
11393
|
-
const base_1$8 = base
|
11663
|
+
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
11664
|
+
globalHotkey.GlobalHotkey = void 0;
|
11665
|
+
const base_1$8 = base;
|
11394
11666
|
/**
|
11395
11667
|
* The GlobalHotkey module can register/unregister a global hotkeys.
|
11396
11668
|
*
|
@@ -11519,9 +11791,9 @@ class GlobalHotkey extends base_1$8.EmitterBase {
|
|
11519
11791
|
return data;
|
11520
11792
|
}
|
11521
11793
|
}
|
11522
|
-
globalHotkey
|
11794
|
+
globalHotkey.GlobalHotkey = GlobalHotkey;
|
11523
11795
|
|
11524
|
-
var platform
|
11796
|
+
var platform = {};
|
11525
11797
|
|
11526
11798
|
var Factory$3 = {};
|
11527
11799
|
|
@@ -11536,14 +11808,16 @@ var _Platform_connectToProvider;
|
|
11536
11808
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
11537
11809
|
Instance$2.Platform = void 0;
|
11538
11810
|
/* eslint-disable import/prefer-default-export, no-undef */
|
11539
|
-
const base_1$7 = base
|
11811
|
+
const base_1$7 = base;
|
11540
11812
|
const validate_1$1 = validate;
|
11541
11813
|
// Reuse clients to avoid overwriting already-registered client in provider
|
11542
11814
|
const clientMap = new Map();
|
11543
11815
|
/** Manages the life cycle of windows and views in the application.
|
11544
11816
|
*
|
11545
|
-
* Enables taking snapshots of itself and
|
11817
|
+
* Enables taking snapshots of itself and applyi
|
11818
|
+
* ng them to restore a previous configuration
|
11546
11819
|
* as well as listen to {@link OpenFin.PlatformEvents platform events}.
|
11820
|
+
*
|
11547
11821
|
*/
|
11548
11822
|
class Platform extends base_1$7.EmitterBase {
|
11549
11823
|
/**
|
@@ -11902,13 +12176,15 @@ class Platform extends base_1$7.EmitterBase {
|
|
11902
12176
|
});
|
11903
12177
|
}
|
11904
12178
|
/**
|
11905
|
-
* ***DEPRECATED - please use
|
12179
|
+
* ***DEPRECATED - please use Platform.createView.***
|
11906
12180
|
* Reparents a specified view in a new target window.
|
11907
12181
|
* @param viewIdentity View identity
|
11908
12182
|
* @param target new owner window identity
|
11909
12183
|
*
|
12184
|
+
* @tutorial Platform.createView
|
11910
12185
|
*/
|
11911
12186
|
async reparentView(viewIdentity, target) {
|
12187
|
+
var _a;
|
11912
12188
|
// eslint-disable-next-line no-console
|
11913
12189
|
console.warn('Platform.reparentView has been deprecated, please use Platform.createView');
|
11914
12190
|
this.wire.sendAction('platform-reparent-view', this.identity).catch((e) => {
|
@@ -11916,7 +12192,7 @@ class Platform extends base_1$7.EmitterBase {
|
|
11916
12192
|
});
|
11917
12193
|
const normalizedViewIdentity = {
|
11918
12194
|
...viewIdentity,
|
11919
|
-
uuid: viewIdentity.uuid
|
12195
|
+
uuid: (_a = viewIdentity.uuid) !== null && _a !== void 0 ? _a : this.identity.uuid
|
11920
12196
|
};
|
11921
12197
|
const view = await this.fin.View.wrap(normalizedViewIdentity);
|
11922
12198
|
const viewOptions = await view.getOptions();
|
@@ -12395,142 +12671,10 @@ Object.defineProperty(Instance$1, "__esModule", { value: true });
|
|
12395
12671
|
Instance$1.Layout = void 0;
|
12396
12672
|
const lazy_1 = lazy;
|
12397
12673
|
const validate_1 = validate;
|
12398
|
-
const base_1$6 = base
|
12674
|
+
const base_1$6 = base;
|
12399
12675
|
const common_utils_1 = commonUtils;
|
12400
12676
|
const layout_entities_1 = layoutEntities;
|
12401
12677
|
const layout_constants_1 = layout_constants;
|
12402
|
-
/**
|
12403
|
-
*
|
12404
|
-
* Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
12405
|
-
* enables the initialization and manipulation of a window's Layout. A Layout will
|
12406
|
-
* emit events locally on the DOM element representing the layout-container.
|
12407
|
-
*
|
12408
|
-
*
|
12409
|
-
* ### Layout.DOMEvents
|
12410
|
-
*
|
12411
|
-
* When a Layout is created, it emits events onto the DOM element representing the Layout container.
|
12412
|
-
* This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
|
12413
|
-
* 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).
|
12414
|
-
* The events are emitted synchronously and only in the process where the Layout exists.
|
12415
|
-
* Any values returned by the called listeners are ignored and will be discarded.
|
12416
|
-
* If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
|
12417
|
-
*
|
12418
|
-
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
12419
|
-
*
|
12420
|
-
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
|
12421
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
12422
|
-
* @example
|
12423
|
-
* ```js
|
12424
|
-
* const myLayoutContainer = document.getElementById('layout-container');
|
12425
|
-
*
|
12426
|
-
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
12427
|
-
* const { tabSelector } = event.detail;
|
12428
|
-
* const tabElement = document.getElementById(tabSelector);
|
12429
|
-
* const existingColor = tabElement.style.backgroundColor;
|
12430
|
-
* tabElement.style.backgroundColor = "red";
|
12431
|
-
* setTimeout(() => {
|
12432
|
-
* tabElement.style.backgroundColor = existingColor;
|
12433
|
-
* }, 2000);
|
12434
|
-
* });
|
12435
|
-
* ```
|
12436
|
-
*
|
12437
|
-
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
|
12438
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
12439
|
-
* @example
|
12440
|
-
* ```js
|
12441
|
-
* const myLayoutContainer = document.getElementById('layout-container');
|
12442
|
-
*
|
12443
|
-
* const listener = function(event) {
|
12444
|
-
* console.log(event.detail);
|
12445
|
-
* console.log('container-created event fired once, removing listener');
|
12446
|
-
* myLayoutContainer.removeEventListener('container-created', listener);
|
12447
|
-
* };
|
12448
|
-
*
|
12449
|
-
* myLayoutContainer.addEventListener('container-created', listener);
|
12450
|
-
* ```
|
12451
|
-
*
|
12452
|
-
* ### Supported event types are:
|
12453
|
-
*
|
12454
|
-
* * tab-created
|
12455
|
-
* * container-created
|
12456
|
-
* * layout-state-changed
|
12457
|
-
* * tab-closed
|
12458
|
-
* * tab-dropped
|
12459
|
-
*
|
12460
|
-
* ### Layout DOM Node Events
|
12461
|
-
*
|
12462
|
-
* #### tab-created
|
12463
|
-
* 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.
|
12464
|
-
* ```js
|
12465
|
-
* // The response has the following shape in event.detail:
|
12466
|
-
* {
|
12467
|
-
* containerSelector: "container-component_A",
|
12468
|
-
* name: "component_A",
|
12469
|
-
* tabSelector: "tab-component_A",
|
12470
|
-
* topic: "openfin-DOM-event",
|
12471
|
-
* type: "tab-created",
|
12472
|
-
* uuid: "OpenFin POC"
|
12473
|
-
* }
|
12474
|
-
* ```
|
12475
|
-
*
|
12476
|
-
* #### container-created
|
12477
|
-
* 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.
|
12478
|
-
* ```js
|
12479
|
-
* // The response has the following shape in event.detail:
|
12480
|
-
* {
|
12481
|
-
* containerSelector: "container-component_A",
|
12482
|
-
* name: "component_A",
|
12483
|
-
* tabSelector: "tab-component_A",
|
12484
|
-
* topic: "openfin-DOM-event",
|
12485
|
-
* type: "container-created",
|
12486
|
-
* uuid: "OpenFin POC"
|
12487
|
-
* }
|
12488
|
-
* ```
|
12489
|
-
*
|
12490
|
-
* ### layout-state-changed
|
12491
|
-
* 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.
|
12492
|
-
* ```js
|
12493
|
-
* // The response has the following shape in event.detail
|
12494
|
-
* {
|
12495
|
-
* containerSelector: "container-component_A",
|
12496
|
-
* name: "component_A",
|
12497
|
-
* tabSelector: "tab-component_A",
|
12498
|
-
* topic: "openfin-DOM-event",
|
12499
|
-
* type: "layout-state-changed",
|
12500
|
-
* uuid: "OpenFin POC"
|
12501
|
-
* }
|
12502
|
-
* ```
|
12503
|
-
*
|
12504
|
-
* #### tab-closed
|
12505
|
-
* Generated when a tab is closed.
|
12506
|
-
* ```js
|
12507
|
-
* // The response has the following shape in event.detail:
|
12508
|
-
* {
|
12509
|
-
* containerSelector: "container-component_A",
|
12510
|
-
* name: "component_A",
|
12511
|
-
* tabSelector: "tab-component_A",
|
12512
|
-
* topic: "openfin-DOM-event",
|
12513
|
-
* type: "tab-closed",
|
12514
|
-
* uuid: "OpenFin POC",
|
12515
|
-
* url: "http://openfin.co" // The url of the view that was closed.
|
12516
|
-
* }
|
12517
|
-
* ```
|
12518
|
-
*
|
12519
|
-
* #### tab-dropped
|
12520
|
-
* Generated when a tab is dropped.
|
12521
|
-
* ```js
|
12522
|
-
* // The response has the following shape in event.detail:
|
12523
|
-
* {
|
12524
|
-
* containerSelector: "container-component_A",
|
12525
|
-
* name: "component_A",
|
12526
|
-
* tabSelector: "tab-component_A",
|
12527
|
-
* topic: "openfin-DOM-event",
|
12528
|
-
* type: "tab-dropped",
|
12529
|
-
* uuid: "OpenFin POC",
|
12530
|
-
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
12531
|
-
* }
|
12532
|
-
* ```
|
12533
|
-
*/
|
12534
12678
|
class Layout extends base_1$6.Base {
|
12535
12679
|
/**
|
12536
12680
|
* @internal
|
@@ -12708,25 +12852,6 @@ class Layout extends base_1$6.Base {
|
|
12708
12852
|
target: this.identity
|
12709
12853
|
});
|
12710
12854
|
}
|
12711
|
-
/**
|
12712
|
-
* Retrieves the attached views in current window layout.
|
12713
|
-
*
|
12714
|
-
* @example
|
12715
|
-
* ```js
|
12716
|
-
* const layout = fin.Platform.Layout.getCurrentSync();
|
12717
|
-
* const views = await layout.getCurrentViews();
|
12718
|
-
* ```
|
12719
|
-
*/
|
12720
|
-
async getCurrentViews() {
|
12721
|
-
this.wire.sendAction('layout-get-views').catch((e) => {
|
12722
|
-
// don't expose
|
12723
|
-
});
|
12724
|
-
const client = await this.platform.getClient();
|
12725
|
-
const viewIdentities = await client.dispatch('get-layout-views', {
|
12726
|
-
target: this.identity
|
12727
|
-
});
|
12728
|
-
return viewIdentities.map((identity) => this.fin.View.wrapSync(identity));
|
12729
|
-
}
|
12730
12855
|
/**
|
12731
12856
|
* Retrieves the top level content item of the layout.
|
12732
12857
|
*
|
@@ -12753,7 +12878,7 @@ class Layout extends base_1$6.Base {
|
|
12753
12878
|
// don't expose
|
12754
12879
|
});
|
12755
12880
|
const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
|
12756
|
-
const root = await client.getRoot(
|
12881
|
+
const root = await client.getRoot();
|
12757
12882
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
12758
12883
|
}
|
12759
12884
|
}
|
@@ -12775,11 +12900,8 @@ var _LayoutModule_layoutInitializationAttempted;
|
|
12775
12900
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
12776
12901
|
Factory$2.LayoutModule = void 0;
|
12777
12902
|
/* eslint-disable no-undef, import/prefer-default-export */
|
12778
|
-
const base_1$5 = base
|
12903
|
+
const base_1$5 = base;
|
12779
12904
|
const Instance_1$2 = Instance$1;
|
12780
|
-
/**
|
12781
|
-
* Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
|
12782
|
-
*/
|
12783
12905
|
class LayoutModule extends base_1$5.Base {
|
12784
12906
|
constructor() {
|
12785
12907
|
super(...arguments);
|
@@ -12833,7 +12955,6 @@ class LayoutModule extends base_1$5.Base {
|
|
12833
12955
|
throw new Error('Layout for this window already initialized, please use Layout.replace call to replace the layout.');
|
12834
12956
|
}
|
12835
12957
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
12836
|
-
// TODO: remove this.wire and always use this.fin
|
12837
12958
|
return this.wire.environment.initLayout(this.fin, this.wire, options);
|
12838
12959
|
};
|
12839
12960
|
}
|
@@ -12936,16 +13057,139 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
12936
13057
|
|
12937
13058
|
(function (exports) {
|
12938
13059
|
/**
|
12939
|
-
* Entry point for the OpenFin
|
12940
|
-
*
|
12941
|
-
* * {@link LayoutModule} contains static members of the `Layout` API, accessible through `fin.Platform.Layout`.
|
12942
|
-
* * {@link Layout} describes an instance of an OpenFin Layout, e.g. as returned by `fin.Platform.Layout.getCurrent`.
|
13060
|
+
* Entry point for the OpenFin Layout namespace.
|
12943
13061
|
*
|
12944
|
-
*
|
12945
|
-
*
|
13062
|
+
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "LayoutModule" is used for
|
13063
|
+
* the module containing static members of the `Layout` namespace (available under `fin.Platform.Layout`), while `Layout` documents
|
13064
|
+
* instances of the OpenFin `Layout` class.
|
12946
13065
|
*
|
12947
13066
|
* @packageDocumentation
|
12948
13067
|
*
|
13068
|
+
*
|
13069
|
+
* ### Layout.DOMEvents
|
13070
|
+
*
|
13071
|
+
* When a Layout is created, it emits events onto the DOM element representing the Layout container.
|
13072
|
+
* This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
|
13073
|
+
* 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).
|
13074
|
+
* The events are emitted synchronously and only in the process where the Layout exists.
|
13075
|
+
* Any values returned by the called listeners are ignored and will be discarded.
|
13076
|
+
* If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
|
13077
|
+
*
|
13078
|
+
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
13079
|
+
*
|
13080
|
+
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
|
13081
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
13082
|
+
* @example
|
13083
|
+
* ```js
|
13084
|
+
* const myLayoutContainer = document.getElementById('layout-container');
|
13085
|
+
*
|
13086
|
+
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
13087
|
+
* const { tabSelector } = event.detail;
|
13088
|
+
* const tabElement = document.getElementById(tabSelector);
|
13089
|
+
* const existingColor = tabElement.style.backgroundColor;
|
13090
|
+
* tabElement.style.backgroundColor = "red";
|
13091
|
+
* setTimeout(() => {
|
13092
|
+
* tabElement.style.backgroundColor = existingColor;
|
13093
|
+
* }, 2000);
|
13094
|
+
* });
|
13095
|
+
* ```
|
13096
|
+
*
|
13097
|
+
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
|
13098
|
+
* Adds a listener to the end of the listeners array for the specified event.
|
13099
|
+
* @example
|
13100
|
+
* ```js
|
13101
|
+
* const myLayoutContainer = document.getElementById('layout-container');
|
13102
|
+
*
|
13103
|
+
* const listener = function(event) {
|
13104
|
+
* console.log(event.detail);
|
13105
|
+
* console.log('container-created event fired once, removing listener');
|
13106
|
+
* myLayoutContainer.removeEventListener('container-created', listener);
|
13107
|
+
* };
|
13108
|
+
*
|
13109
|
+
* myLayoutContainer.addEventListener('container-created', listener);
|
13110
|
+
* ```
|
13111
|
+
*
|
13112
|
+
* ### Supported event types are:
|
13113
|
+
*
|
13114
|
+
* * tab-created
|
13115
|
+
* * container-created
|
13116
|
+
* * layout-state-changed
|
13117
|
+
* * tab-closed
|
13118
|
+
* * tab-dropped
|
13119
|
+
*
|
13120
|
+
* ### Layout DOM Node Events
|
13121
|
+
*
|
13122
|
+
* #### tab-created
|
13123
|
+
* 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.
|
13124
|
+
* ```js
|
13125
|
+
* // The response has the following shape in event.detail:
|
13126
|
+
* {
|
13127
|
+
* containerSelector: "container-component_A",
|
13128
|
+
* name: "component_A",
|
13129
|
+
* tabSelector: "tab-component_A",
|
13130
|
+
* topic: "openfin-DOM-event",
|
13131
|
+
* type: "tab-created",
|
13132
|
+
* uuid: "OpenFin POC"
|
13133
|
+
* }
|
13134
|
+
* ```
|
13135
|
+
*
|
13136
|
+
* #### container-created
|
13137
|
+
* 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.
|
13138
|
+
* ```js
|
13139
|
+
* // The response has the following shape in event.detail:
|
13140
|
+
* {
|
13141
|
+
* containerSelector: "container-component_A",
|
13142
|
+
* name: "component_A",
|
13143
|
+
* tabSelector: "tab-component_A",
|
13144
|
+
* topic: "openfin-DOM-event",
|
13145
|
+
* type: "container-created",
|
13146
|
+
* uuid: "OpenFin POC"
|
13147
|
+
* }
|
13148
|
+
* ```
|
13149
|
+
*
|
13150
|
+
* ### layout-state-changed
|
13151
|
+
* 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.
|
13152
|
+
* ```js
|
13153
|
+
* // The response has the following shape in event.detail
|
13154
|
+
* {
|
13155
|
+
* containerSelector: "container-component_A",
|
13156
|
+
* name: "component_A",
|
13157
|
+
* tabSelector: "tab-component_A",
|
13158
|
+
* topic: "openfin-DOM-event",
|
13159
|
+
* type: "layout-state-changed",
|
13160
|
+
* uuid: "OpenFin POC"
|
13161
|
+
* }
|
13162
|
+
* ```
|
13163
|
+
*
|
13164
|
+
* #### tab-closed
|
13165
|
+
* Generated when a tab is closed.
|
13166
|
+
* ```js
|
13167
|
+
* // The response has the following shape in event.detail:
|
13168
|
+
* {
|
13169
|
+
* containerSelector: "container-component_A",
|
13170
|
+
* name: "component_A",
|
13171
|
+
* tabSelector: "tab-component_A",
|
13172
|
+
* topic: "openfin-DOM-event",
|
13173
|
+
* type: "tab-closed",
|
13174
|
+
* uuid: "OpenFin POC",
|
13175
|
+
* url: "http://openfin.co" // The url of the view that was closed.
|
13176
|
+
* }
|
13177
|
+
* ```
|
13178
|
+
*
|
13179
|
+
* #### tab-dropped
|
13180
|
+
* Generated when a tab is dropped.
|
13181
|
+
* ```js
|
13182
|
+
* // The response has the following shape in event.detail:
|
13183
|
+
* {
|
13184
|
+
* containerSelector: "container-component_A",
|
13185
|
+
* name: "component_A",
|
13186
|
+
* tabSelector: "tab-component_A",
|
13187
|
+
* topic: "openfin-DOM-event",
|
13188
|
+
* type: "tab-dropped",
|
13189
|
+
* uuid: "OpenFin POC",
|
13190
|
+
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
13191
|
+
* }
|
13192
|
+
* ```
|
12949
13193
|
*/
|
12950
13194
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
12951
13195
|
if (k2 === undefined) k2 = k;
|
@@ -12963,17 +13207,14 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
12963
13207
|
};
|
12964
13208
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12965
13209
|
__exportStar(Factory$2, exports);
|
12966
|
-
__exportStar(Instance$1, exports);
|
13210
|
+
__exportStar(Instance$1, exports);
|
12967
13211
|
} (layout));
|
12968
13212
|
|
12969
13213
|
Object.defineProperty(Factory$3, "__esModule", { value: true });
|
12970
13214
|
Factory$3.PlatformModule = void 0;
|
12971
|
-
const base_1$4 = base
|
13215
|
+
const base_1$4 = base;
|
12972
13216
|
const Instance_1$1 = Instance$2;
|
12973
13217
|
const index_1$1 = layout;
|
12974
|
-
/**
|
12975
|
-
* Static namespace for OpenFin API methods that interact with the {@link Platform} class, available under `fin.Platform`.
|
12976
|
-
*/
|
12977
13218
|
class PlatformModule extends base_1$4.Base {
|
12978
13219
|
/**
|
12979
13220
|
* @internal
|
@@ -13217,19 +13458,19 @@ Factory$3.PlatformModule = PlatformModule;
|
|
13217
13458
|
};
|
13218
13459
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13219
13460
|
/**
|
13220
|
-
* Entry points for the OpenFin `Platform` API
|
13461
|
+
* Entry points for the OpenFin `Platform` API.
|
13221
13462
|
*
|
13222
|
-
*
|
13223
|
-
*
|
13463
|
+
* In the previous version of the API documentation, both static methods involving `Platform` and instance properties of the
|
13464
|
+
* `Platform` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
13224
13465
|
*
|
13225
|
-
*
|
13226
|
-
*
|
13466
|
+
* * {@link PlatformModule} contains static methods relating to the `Platform` type, accessible through `fin.Platform`.
|
13467
|
+
* * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
|
13227
13468
|
*
|
13228
13469
|
* @packageDocumentation
|
13229
13470
|
*/
|
13230
13471
|
__exportStar(Factory$3, exports);
|
13231
|
-
__exportStar(Instance$2, exports);
|
13232
|
-
} (platform
|
13472
|
+
__exportStar(Instance$2, exports);
|
13473
|
+
} (platform));
|
13233
13474
|
|
13234
13475
|
var me = {};
|
13235
13476
|
|
@@ -13237,9 +13478,9 @@ var me = {};
|
|
13237
13478
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13238
13479
|
exports.getMe = exports.getBaseMe = exports.environmentUnsupportedMessage = void 0;
|
13239
13480
|
const view_1 = requireView();
|
13240
|
-
const frame_1 = frame
|
13481
|
+
const frame_1 = frame;
|
13241
13482
|
const window_1 = requireWindow();
|
13242
|
-
const external_application_1 = externalApplication
|
13483
|
+
const external_application_1 = externalApplication;
|
13243
13484
|
exports.environmentUnsupportedMessage = 'You are not running in OpenFin.';
|
13244
13485
|
function getBaseMe(entityType, uuid, name) {
|
13245
13486
|
const entityTypeHelpers = {
|
@@ -13366,7 +13607,7 @@ var me = {};
|
|
13366
13607
|
};
|
13367
13608
|
}
|
13368
13609
|
}
|
13369
|
-
exports.getMe = getMe;
|
13610
|
+
exports.getMe = getMe;
|
13370
13611
|
} (me));
|
13371
13612
|
|
13372
13613
|
var interop = {};
|
@@ -13469,8 +13710,9 @@ function requireSessionContextGroupBroker () {
|
|
13469
13710
|
this.lastContext = context;
|
13470
13711
|
const clientSubscriptionStates = Array.from(this.clients.values());
|
13471
13712
|
clientSubscriptionStates.forEach((client) => {
|
13713
|
+
var _a;
|
13472
13714
|
// eslint-disable-next-line no-unused-expressions
|
13473
|
-
client.contextHandlers.get(context.type)
|
13715
|
+
(_a = client.contextHandlers.get(context.type)) === null || _a === void 0 ? void 0 : _a.forEach((handlerId) => {
|
13474
13716
|
this.provider.dispatch(client.clientIdentity, handlerId, context);
|
13475
13717
|
});
|
13476
13718
|
if (client.globalHandler) {
|
@@ -13604,7 +13846,7 @@ var utils$1 = {};
|
|
13604
13846
|
}
|
13605
13847
|
};
|
13606
13848
|
};
|
13607
|
-
exports.wrapIntentHandler = wrapIntentHandler;
|
13849
|
+
exports.wrapIntentHandler = wrapIntentHandler;
|
13608
13850
|
} (utils$1));
|
13609
13851
|
|
13610
13852
|
var PrivateChannelProvider = {};
|
@@ -13899,7 +14141,7 @@ function requireInteropBroker () {
|
|
13899
14141
|
hasRequiredInteropBroker = 1;
|
13900
14142
|
Object.defineProperty(InteropBroker, "__esModule", { value: true });
|
13901
14143
|
InteropBroker.InteropBroker = void 0;
|
13902
|
-
const base_1 = base
|
14144
|
+
const base_1 = base;
|
13903
14145
|
const SessionContextGroupBroker_1 = requireSessionContextGroupBroker();
|
13904
14146
|
const utils_1 = utils$1;
|
13905
14147
|
const lodash_1 = require$$3;
|
@@ -14077,10 +14319,10 @@ function requireInteropBroker () {
|
|
14077
14319
|
this.getProvider = getProvider;
|
14078
14320
|
this.interopClients = new Map();
|
14079
14321
|
this.contextGroupsById = new Map();
|
14080
|
-
if (options
|
14322
|
+
if (options === null || options === void 0 ? void 0 : options.contextGroups) {
|
14081
14323
|
contextGroups = options.contextGroups;
|
14082
14324
|
}
|
14083
|
-
if (options
|
14325
|
+
if (options === null || options === void 0 ? void 0 : options.logging) {
|
14084
14326
|
this.logging = options.logging;
|
14085
14327
|
}
|
14086
14328
|
this.intentClientMap = new Map();
|
@@ -14215,17 +14457,18 @@ function requireInteropBroker () {
|
|
14215
14457
|
*
|
14216
14458
|
*/
|
14217
14459
|
getCurrentContext(getCurrentContextOptions, clientIdentity) {
|
14460
|
+
var _a;
|
14218
14461
|
this.wire.sendAction('interop-broker-get-current-context').catch((e) => {
|
14219
14462
|
// don't expose, analytics-only call
|
14220
14463
|
});
|
14221
14464
|
const clientState = this.getClientState(clientIdentity);
|
14222
|
-
if (!clientState
|
14465
|
+
if (!(clientState === null || clientState === void 0 ? void 0 : clientState.contextGroupId)) {
|
14223
14466
|
throw new Error('You must be a member of a context group to call getCurrentContext');
|
14224
14467
|
}
|
14225
14468
|
const { contextGroupId } = clientState;
|
14226
14469
|
const contextGroupState = this.contextGroupsById.get(contextGroupId);
|
14227
14470
|
const lastContextType = this.lastContextMap.get(contextGroupId);
|
14228
|
-
const contextType = getCurrentContextOptions
|
14471
|
+
const contextType = (_a = getCurrentContextOptions === null || getCurrentContextOptions === void 0 ? void 0 : getCurrentContextOptions.contextType) !== null && _a !== void 0 ? _a : lastContextType;
|
14229
14472
|
return contextGroupState && contextType ? contextGroupState.get(contextType) : undefined;
|
14230
14473
|
}
|
14231
14474
|
/*
|
@@ -14473,8 +14716,7 @@ function requireInteropBroker () {
|
|
14473
14716
|
* ```
|
14474
14717
|
*/
|
14475
14718
|
// eslint-disable-next-line class-methods-use-this
|
14476
|
-
async handleFiredIntent(intent, clientIdentity
|
14477
|
-
) {
|
14719
|
+
async handleFiredIntent(intent, clientIdentity) {
|
14478
14720
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.raiseIntent', 'InteropBroker.handleFiredIntent', clientIdentity, 'interopClient.fireIntent');
|
14479
14721
|
console.warn(warning);
|
14480
14722
|
throw new Error(utils_1.BROKER_ERRORS.fireIntent);
|
@@ -14541,7 +14783,7 @@ function requireInteropBroker () {
|
|
14541
14783
|
* More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
|
14542
14784
|
*
|
14543
14785
|
* @param options
|
14544
|
-
* @param
|
14786
|
+
* @param clientIdentity Identity of the Client making the request.
|
14545
14787
|
*
|
14546
14788
|
* @example
|
14547
14789
|
* ```js
|
@@ -14558,8 +14800,7 @@ function requireInteropBroker () {
|
|
14558
14800
|
* ```
|
14559
14801
|
*/
|
14560
14802
|
// eslint-disable-next-line class-methods-use-this
|
14561
|
-
async handleInfoForIntent(options, clientIdentity
|
14562
|
-
) {
|
14803
|
+
async handleInfoForIntent(options, clientIdentity) {
|
14563
14804
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntent', 'InteropBroker.handleInfoForIntent', clientIdentity, 'interopClient.getInfoForIntent');
|
14564
14805
|
console.warn(warning);
|
14565
14806
|
throw new Error(utils_1.BROKER_ERRORS.getInfoForIntent);
|
@@ -14605,8 +14846,7 @@ function requireInteropBroker () {
|
|
14605
14846
|
* ```
|
14606
14847
|
*/
|
14607
14848
|
// eslint-disable-next-line class-methods-use-this
|
14608
|
-
async handleInfoForIntentsByContext(context, clientIdentity
|
14609
|
-
) {
|
14849
|
+
async handleInfoForIntentsByContext(context, clientIdentity) {
|
14610
14850
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntentsByContext', 'InteropBroker.handleInfoForIntentsByContext', clientIdentity, 'interopClient.getInfoForIntentsByContext');
|
14611
14851
|
console.warn(warning);
|
14612
14852
|
throw new Error(utils_1.BROKER_ERRORS.getInfoForIntentsByContext);
|
@@ -14632,7 +14872,7 @@ function requireInteropBroker () {
|
|
14632
14872
|
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
|
14633
14873
|
*
|
14634
14874
|
* @param contextForIntent Data passed between entities and applications.
|
14635
|
-
* @param
|
14875
|
+
* @param clientIdentity Identity of the Client making the request.
|
14636
14876
|
*
|
14637
14877
|
* @example
|
14638
14878
|
* ```js
|
@@ -14693,7 +14933,7 @@ function requireInteropBroker () {
|
|
14693
14933
|
/**
|
14694
14934
|
* Responsible for resolving the fdc3.findInstances call.
|
14695
14935
|
* Must be overridden
|
14696
|
-
* @param
|
14936
|
+
* @param app AppIdentifier that was passed to fdc3.findInstances
|
14697
14937
|
* @param clientIdentity Identity of the Client making the request.
|
14698
14938
|
*/
|
14699
14939
|
// eslint-disable-next-line class-methods-use-this
|
@@ -14728,7 +14968,7 @@ function requireInteropBroker () {
|
|
14728
14968
|
* fin.Platform.init({
|
14729
14969
|
* interopOverride: async (InteropBroker) => {
|
14730
14970
|
* class Override extends InteropBroker {
|
14731
|
-
* async invokeContextHandler(
|
14971
|
+
* async invokeContextHandler(options, clientIdentity) {
|
14732
14972
|
* return super.invokeContextHandler(clientIdentity, handlerId, {
|
14733
14973
|
* ...context,
|
14734
14974
|
* contextMetadata: {
|
@@ -14768,7 +15008,7 @@ function requireInteropBroker () {
|
|
14768
15008
|
* fin.Platform.init({
|
14769
15009
|
* interopOverride: async (InteropBroker) => {
|
14770
15010
|
* class Override extends InteropBroker {
|
14771
|
-
* async invokeIntentHandler(
|
15011
|
+
* async invokeIntentHandler(options, clientIdentity) {
|
14772
15012
|
* const { context } = intent;
|
14773
15013
|
* return super.invokeIntentHandler(clientIdentity, handlerId, {
|
14774
15014
|
* ...intent,
|
@@ -14876,9 +15116,10 @@ function requireInteropBroker () {
|
|
14876
15116
|
}
|
14877
15117
|
// Used to restore interop broker state in snapshots.
|
14878
15118
|
applySnapshot(snapshot, options) {
|
14879
|
-
|
15119
|
+
var _a;
|
15120
|
+
const contextGroupStates = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.interopSnapshotDetails) === null || _a === void 0 ? void 0 : _a.contextGroupStates;
|
14880
15121
|
if (contextGroupStates) {
|
14881
|
-
if (!options
|
15122
|
+
if (!(options === null || options === void 0 ? void 0 : options.closeExistingWindows)) {
|
14882
15123
|
this.updateExistingClients(contextGroupStates);
|
14883
15124
|
}
|
14884
15125
|
this.rehydrateContextGroupStates(contextGroupStates);
|
@@ -14929,7 +15170,7 @@ function requireInteropBroker () {
|
|
14929
15170
|
contextHandlerRegistered({ contextType, handlerId }, clientIdentity) {
|
14930
15171
|
const handlerInfo = { contextType, handlerId };
|
14931
15172
|
const clientState = this.getClientState(clientIdentity);
|
14932
|
-
clientState
|
15173
|
+
clientState === null || clientState === void 0 ? void 0 : clientState.contextHandlers.set(handlerId, handlerInfo);
|
14933
15174
|
if (clientState && clientState.contextGroupId) {
|
14934
15175
|
const { contextGroupId } = clientState;
|
14935
15176
|
const contextGroupMap = this.contextGroupsById.get(contextGroupId);
|
@@ -14951,7 +15192,7 @@ function requireInteropBroker () {
|
|
14951
15192
|
async intentHandlerRegistered(payload, clientIdentity) {
|
14952
15193
|
const { handlerId } = payload;
|
14953
15194
|
const clientIntentInfo = this.intentClientMap.get(clientIdentity.name);
|
14954
|
-
const handlerInfo = clientIntentInfo
|
15195
|
+
const handlerInfo = clientIntentInfo === null || clientIntentInfo === void 0 ? void 0 : clientIntentInfo.get(handlerId);
|
14955
15196
|
if (!clientIntentInfo) {
|
14956
15197
|
this.intentClientMap.set(clientIdentity.name, new Map());
|
14957
15198
|
const newHandlerInfoMap = this.intentClientMap.get(clientIdentity.name);
|
@@ -15106,8 +15347,7 @@ function requireInteropBroker () {
|
|
15106
15347
|
}
|
15107
15348
|
// Setup Channel Connection Logic
|
15108
15349
|
wireChannel(channel) {
|
15109
|
-
channel.onConnection(async (clientIdentity,
|
15110
|
-
payload) => {
|
15350
|
+
channel.onConnection(async (clientIdentity, payload) => {
|
15111
15351
|
if (!(await this.isConnectionAuthorized(clientIdentity, payload))) {
|
15112
15352
|
throw new Error(`Connection not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
|
15113
15353
|
}
|
@@ -15120,8 +15360,8 @@ function requireInteropBroker () {
|
|
15120
15360
|
clientIdentity
|
15121
15361
|
};
|
15122
15362
|
// Only allow the client to join a contextGroup that actually exists.
|
15123
|
-
if (payload
|
15124
|
-
clientSubscriptionState.contextGroupId = payload
|
15363
|
+
if ((payload === null || payload === void 0 ? void 0 : payload.currentContextGroup) && this.contextGroupsById.has(payload.currentContextGroup)) {
|
15364
|
+
clientSubscriptionState.contextGroupId = payload === null || payload === void 0 ? void 0 : payload.currentContextGroup;
|
15125
15365
|
}
|
15126
15366
|
this.interopClients.set(clientIdentity.endpointId, clientSubscriptionState);
|
15127
15367
|
});
|
@@ -15139,15 +15379,17 @@ function requireInteropBroker () {
|
|
15139
15379
|
this.clientDisconnected(clientIdentity);
|
15140
15380
|
});
|
15141
15381
|
channel.beforeAction(async (action, payload, clientIdentity) => {
|
15382
|
+
var _a, _b;
|
15142
15383
|
if (!(await this.isActionAuthorized(action, payload, clientIdentity))) {
|
15143
15384
|
throw new Error(`Action (${action}) not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
|
15144
15385
|
}
|
15145
|
-
if (this.logging
|
15386
|
+
if ((_b = (_a = this.logging) === null || _a === void 0 ? void 0 : _a.beforeAction) === null || _b === void 0 ? void 0 : _b.enabled) {
|
15146
15387
|
console.log(action, payload, clientIdentity);
|
15147
15388
|
}
|
15148
15389
|
});
|
15149
15390
|
channel.afterAction((action, payload, clientIdentity) => {
|
15150
|
-
|
15391
|
+
var _a, _b;
|
15392
|
+
if ((_b = (_a = this.logging) === null || _a === void 0 ? void 0 : _a.afterAction) === null || _b === void 0 ? void 0 : _b.enabled) {
|
15151
15393
|
console.log(action, payload, clientIdentity);
|
15152
15394
|
}
|
15153
15395
|
});
|
@@ -15229,7 +15471,7 @@ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
15229
15471
|
};
|
15230
15472
|
var _SessionContextGroupClient_clientPromise;
|
15231
15473
|
Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
|
15232
|
-
const base_1$3 = base
|
15474
|
+
const base_1$3 = base;
|
15233
15475
|
const utils_1$3 = utils$1;
|
15234
15476
|
class SessionContextGroupClient extends base_1$3.Base {
|
15235
15477
|
constructor(wire, client, id) {
|
@@ -15316,7 +15558,7 @@ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
15316
15558
|
var _InteropClient_clientPromise, _InteropClient_sessionContextGroups;
|
15317
15559
|
Object.defineProperty(InteropClient$1, "__esModule", { value: true });
|
15318
15560
|
InteropClient$1.InteropClient = void 0;
|
15319
|
-
const base_1$2 = base
|
15561
|
+
const base_1$2 = base;
|
15320
15562
|
const SessionContextGroupClient_1 = SessionContextGroupClient$1;
|
15321
15563
|
const utils_1$2 = utils$1;
|
15322
15564
|
/**
|
@@ -15985,45 +16227,39 @@ class InteropClient extends base_1$2.Base {
|
|
15985
16227
|
InteropClient$1.InteropClient = InteropClient;
|
15986
16228
|
_InteropClient_clientPromise = new WeakMap(), _InteropClient_sessionContextGroups = new WeakMap();
|
15987
16229
|
|
15988
|
-
var overrideCheck = {};
|
16230
|
+
var overrideCheck$1 = {};
|
15989
16231
|
|
15990
|
-
|
15991
|
-
|
15992
|
-
|
15993
|
-
|
15994
|
-
|
15995
|
-
|
15996
|
-
|
15997
|
-
const InteropBroker_1 = requireInteropBroker();
|
15998
|
-
function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
|
15999
|
-
const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
|
16000
|
-
return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
|
16001
|
-
}
|
16002
|
-
overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
|
16003
|
-
// TODO: Unit test this
|
16004
|
-
function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
|
16005
|
-
if (fdc3InteropApi && fdc3InteropApi === '2.0') {
|
16006
|
-
const mustOverrideAPIs = [
|
16007
|
-
'fdc3HandleFindInstances',
|
16008
|
-
'handleInfoForIntent',
|
16009
|
-
'handleInfoForIntentsByContext',
|
16010
|
-
'fdc3HandleGetAppMetadata',
|
16011
|
-
'fdc3HandleGetInfo',
|
16012
|
-
'fdc3HandleOpen',
|
16013
|
-
'handleFiredIntent',
|
16014
|
-
'handleFiredIntentForContext'
|
16015
|
-
];
|
16016
|
-
const notOverridden = mustOverrideAPIs.filter((api) => {
|
16017
|
-
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
16018
|
-
});
|
16019
|
-
if (notOverridden.length > 0) {
|
16020
|
-
console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
|
16021
|
-
}
|
16022
|
-
}
|
16023
|
-
}
|
16024
|
-
overrideCheck.overrideCheck = overrideCheck$1;
|
16025
|
-
return overrideCheck;
|
16232
|
+
Object.defineProperty(overrideCheck$1, "__esModule", { value: true });
|
16233
|
+
overrideCheck$1.overrideCheck = overrideCheck$1.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
16234
|
+
const InteropBroker_1 = requireInteropBroker();
|
16235
|
+
function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
|
16236
|
+
var _a, _b, _c, _d;
|
16237
|
+
const setVersion = (_c = (_b = (_a = manifest.platform) === null || _a === void 0 ? void 0 : _a.defaultViewOptions) === null || _b === void 0 ? void 0 : _b.fdc3InteropApi) !== null && _c !== void 0 ? _c : (_d = initialOptions.defaultViewOptions) === null || _d === void 0 ? void 0 : _d.fdc3InteropApi;
|
16238
|
+
return ['1.2', '2.0'].includes(setVersion !== null && setVersion !== void 0 ? setVersion : '') ? setVersion : undefined;
|
16026
16239
|
}
|
16240
|
+
overrideCheck$1.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
|
16241
|
+
// TODO: Unit test this
|
16242
|
+
function overrideCheck(overriddenBroker, fdc3InteropApi) {
|
16243
|
+
if (fdc3InteropApi && fdc3InteropApi === '2.0') {
|
16244
|
+
const mustOverrideAPIs = [
|
16245
|
+
'fdc3HandleFindInstances',
|
16246
|
+
'handleInfoForIntent',
|
16247
|
+
'handleInfoForIntentsByContext',
|
16248
|
+
'fdc3HandleGetAppMetadata',
|
16249
|
+
'fdc3HandleGetInfo',
|
16250
|
+
'fdc3HandleOpen',
|
16251
|
+
'handleFiredIntent',
|
16252
|
+
'handleFiredIntentForContext'
|
16253
|
+
];
|
16254
|
+
const notOverridden = mustOverrideAPIs.filter((api) => {
|
16255
|
+
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
16256
|
+
});
|
16257
|
+
if (notOverridden.length > 0) {
|
16258
|
+
console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
|
16259
|
+
}
|
16260
|
+
}
|
16261
|
+
}
|
16262
|
+
overrideCheck$1.overrideCheck = overrideCheck;
|
16027
16263
|
|
16028
16264
|
var hasRequiredFactory;
|
16029
16265
|
|
@@ -16034,10 +16270,10 @@ function requireFactory () {
|
|
16034
16270
|
Factory$1.InteropModule = void 0;
|
16035
16271
|
const lodash_1 = require$$3;
|
16036
16272
|
const inaccessibleObject_1 = inaccessibleObject;
|
16037
|
-
const base_1 = base
|
16273
|
+
const base_1 = base;
|
16038
16274
|
const InteropBroker_1 = requireInteropBroker();
|
16039
16275
|
const InteropClient_1 = InteropClient$1;
|
16040
|
-
const overrideCheck_1 =
|
16276
|
+
const overrideCheck_1 = overrideCheck$1;
|
16041
16277
|
const common_utils_1 = commonUtils;
|
16042
16278
|
const defaultOverride = (Class) => new Class();
|
16043
16279
|
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.';
|
@@ -16070,12 +16306,13 @@ function requireFactory () {
|
|
16070
16306
|
* ```
|
16071
16307
|
*/
|
16072
16308
|
async init(name, override = defaultOverride) {
|
16309
|
+
var _a;
|
16073
16310
|
this.wire.sendAction('interop-init').catch(() => {
|
16074
16311
|
// don't expose, analytics-only call
|
16075
16312
|
});
|
16076
16313
|
// Allows for manifest-level configuration, without having to override. (e.g. specifying custom context groups)
|
16077
16314
|
const options = await this.fin.Application.getCurrentSync().getInfo();
|
16078
|
-
const opts = options.initialOptions.interopBrokerConfiguration
|
16315
|
+
const opts = (_a = options.initialOptions.interopBrokerConfiguration) !== null && _a !== void 0 ? _a : {};
|
16079
16316
|
const objectThatThrows = (0, inaccessibleObject_1.createUnusableObject)(BrokerParamAccessError);
|
16080
16317
|
const warningOptsClone = (0, inaccessibleObject_1.createWarningObject)(BrokerParamAccessError, (0, lodash_1.cloneDeep)(opts));
|
16081
16318
|
let provider;
|
@@ -16143,9 +16380,9 @@ function requireInterop () {
|
|
16143
16380
|
hasRequiredInterop = 1;
|
16144
16381
|
(function (exports) {
|
16145
16382
|
/**
|
16146
|
-
* Entry point for the OpenFin
|
16383
|
+
* Entry point for the OpenFin Interop namespace.
|
16147
16384
|
*
|
16148
|
-
* * {@link InteropModule} contains static members of the `Interop`
|
16385
|
+
* * {@link InteropModule} contains static members of the `Interop` namespace (available under `fin.Interop`)
|
16149
16386
|
* * {@link InteropClient} and {@link InteropBroker} document instances of their respective classes.
|
16150
16387
|
*
|
16151
16388
|
* @packageDocumentation
|
@@ -16167,8 +16404,8 @@ function requireInterop () {
|
|
16167
16404
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16168
16405
|
__exportStar(requireFactory(), exports);
|
16169
16406
|
__exportStar(InteropClient$1, exports);
|
16170
|
-
__exportStar(requireInteropBroker(), exports);
|
16171
|
-
|
16407
|
+
__exportStar(requireInteropBroker(), exports);
|
16408
|
+
} (interop));
|
16172
16409
|
return interop;
|
16173
16410
|
}
|
16174
16411
|
|
@@ -16201,14 +16438,12 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
|
|
16201
16438
|
Object.defineProperty(Instance, "__esModule", { value: true });
|
16202
16439
|
Instance.SnapshotSource = void 0;
|
16203
16440
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
16204
|
-
const base_1$1 = base
|
16441
|
+
const base_1$1 = base;
|
16205
16442
|
const utils_1$1 = utils;
|
16206
16443
|
const connectionMap = new Map();
|
16207
16444
|
/**
|
16208
16445
|
* Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.
|
16209
16446
|
*
|
16210
|
-
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
16211
|
-
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
16212
16447
|
*/
|
16213
16448
|
class SnapshotSource extends base_1$1.Base {
|
16214
16449
|
/**
|
@@ -16344,19 +16579,13 @@ _SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new We
|
|
16344
16579
|
|
16345
16580
|
Object.defineProperty(Factory, "__esModule", { value: true });
|
16346
16581
|
Factory.SnapshotSourceModule = void 0;
|
16347
|
-
const base_1 = base
|
16582
|
+
const base_1 = base;
|
16348
16583
|
const Instance_1 = Instance;
|
16349
16584
|
const utils_1 = utils;
|
16350
|
-
/**
|
16351
|
-
* Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
|
16352
|
-
*/
|
16353
16585
|
class SnapshotSourceModule extends base_1.Base {
|
16354
16586
|
/**
|
16355
16587
|
* Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
|
16356
16588
|
*
|
16357
|
-
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
16358
|
-
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
16359
|
-
*
|
16360
16589
|
* @example
|
16361
16590
|
* ```js
|
16362
16591
|
* const snapshotProvider = {
|
@@ -16372,7 +16601,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16372
16601
|
*
|
16373
16602
|
* await fin.SnapshotSource.init(snapshotProvider);
|
16374
16603
|
* ```
|
16375
|
-
*
|
16376
16604
|
*/
|
16377
16605
|
async init(provider) {
|
16378
16606
|
this.wire.sendAction('snapshot-source-init').catch((e) => {
|
@@ -16427,13 +16655,13 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
16427
16655
|
|
16428
16656
|
(function (exports) {
|
16429
16657
|
/**
|
16430
|
-
* Entry points for the OpenFin `SnapshotSource` API
|
16658
|
+
* Entry points for the OpenFin `SnapshotSource` API.
|
16431
16659
|
*
|
16432
|
-
*
|
16433
|
-
*
|
16660
|
+
* In the previous version of the API documentation, both static methods involving `SnapshotSource` and instance properties of the
|
16661
|
+
* `SnapshotSource` type itself were documented on the same page. These are separate code entities, and are now documented separately:
|
16434
16662
|
*
|
16435
|
-
*
|
16436
|
-
*
|
16663
|
+
* * {@link SnapshotSourceModule} contains static methods relating to the `SnapshotSource` type, accessible through `fin.SnapshotSource`.
|
16664
|
+
* * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.getCurrent`.
|
16437
16665
|
*
|
16438
16666
|
* @packageDocumentation
|
16439
16667
|
*/
|
@@ -16453,29 +16681,26 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
16453
16681
|
};
|
16454
16682
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16455
16683
|
__exportStar(Factory, exports);
|
16456
|
-
__exportStar(Instance, exports);
|
16684
|
+
__exportStar(Instance, exports);
|
16457
16685
|
} (snapshotSource));
|
16458
16686
|
|
16459
16687
|
Object.defineProperty(fin, "__esModule", { value: true });
|
16460
16688
|
fin.Fin = void 0;
|
16461
|
-
const events_1$3 =
|
16689
|
+
const events_1$3 = eventsExports;
|
16462
16690
|
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
16463
|
-
const index_1 = system
|
16691
|
+
const index_1 = system;
|
16464
16692
|
const index_2 = requireWindow();
|
16465
16693
|
const index_3 = requireApplication();
|
16466
16694
|
const index_4 = interappbus;
|
16467
16695
|
const index_5 = clipboard;
|
16468
|
-
const index_6 = externalApplication
|
16469
|
-
const index_7 = frame
|
16470
|
-
const index_8 = globalHotkey
|
16696
|
+
const index_6 = externalApplication;
|
16697
|
+
const index_7 = frame;
|
16698
|
+
const index_8 = globalHotkey;
|
16471
16699
|
const index_9 = requireView();
|
16472
|
-
const index_10 = platform
|
16700
|
+
const index_10 = platform;
|
16473
16701
|
const me_1$1 = me;
|
16474
16702
|
const interop_1 = requireInterop();
|
16475
16703
|
const snapshot_source_1 = snapshotSource;
|
16476
|
-
/**
|
16477
|
-
* @internal
|
16478
|
-
*/
|
16479
16704
|
class Fin extends events_1$3.EventEmitter {
|
16480
16705
|
/**
|
16481
16706
|
* @internal
|
@@ -16564,8 +16789,8 @@ var http = {};
|
|
16564
16789
|
(function (exports) {
|
16565
16790
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16566
16791
|
exports.fetchJson = exports.downloadFile = exports.fetch = exports.getRequestOptions = exports.getProxy = void 0;
|
16567
|
-
const node_url_1 = require$$0
|
16568
|
-
const fs = require$$0$
|
16792
|
+
const node_url_1 = require$$0; // This must explicitly use node builtin to avoid accidentally bundling npm:url.
|
16793
|
+
const fs = require$$0$1;
|
16569
16794
|
const getProxyVar = () => {
|
16570
16795
|
return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
|
16571
16796
|
};
|
@@ -16650,13 +16875,13 @@ var http = {};
|
|
16650
16875
|
const res = await (0, exports.fetch)(url);
|
16651
16876
|
return JSON.parse(res);
|
16652
16877
|
};
|
16653
|
-
exports.fetchJson = fetchJson;
|
16878
|
+
exports.fetchJson = fetchJson;
|
16654
16879
|
} (http));
|
16655
16880
|
|
16656
16881
|
Object.defineProperty(util, "__esModule", { value: true });
|
16657
16882
|
util.resolveDir = util.first = util.resolveRuntimeVersion = util.rmDir = util.unzip = util.exists = void 0;
|
16658
|
-
const path$1 = require$$0$
|
16659
|
-
const fs$1 = require$$0$
|
16883
|
+
const path$1 = require$$0$2;
|
16884
|
+
const fs$1 = require$$0$1;
|
16660
16885
|
const child_process_1$1 = require$$2;
|
16661
16886
|
const promises_1$1 = promises;
|
16662
16887
|
const http_1$1 = http;
|
@@ -16758,7 +16983,7 @@ async function resolveDir(base, paths) {
|
|
16758
16983
|
util.resolveDir = resolveDir;
|
16759
16984
|
|
16760
16985
|
Object.defineProperty(winLaunch, "__esModule", { value: true });
|
16761
|
-
const path = require$$0$
|
16986
|
+
const path = require$$0$2;
|
16762
16987
|
const child_process_1 = require$$2;
|
16763
16988
|
const util_1 = util;
|
16764
16989
|
function launchRVM(config, manifestLocation, namedPipeName, rvm) {
|
@@ -16780,7 +17005,7 @@ function launchRVM(config, manifestLocation, namedPipeName, rvm) {
|
|
16780
17005
|
async function checkRvmPath() {
|
16781
17006
|
let rvmPath = path.resolve(process.env.LOCALAPPDATA, 'OpenFin', 'OpenFinRVM.exe');
|
16782
17007
|
if (!(await (0, util_1.exists)(rvmPath))) {
|
16783
|
-
rvmPath = path.join(__dirname, '..', 'resources', 'win', 'OpenFinRVM.exe');
|
17008
|
+
rvmPath = path.join(__dirname, '..', '..', 'resources', 'win', 'OpenFinRVM.exe');
|
16784
17009
|
}
|
16785
17010
|
return rvmPath;
|
16786
17011
|
}
|
@@ -16842,8 +17067,8 @@ function requireServices () {
|
|
16842
17067
|
const startServices = async (services) => {
|
16843
17068
|
await (0, promises_1.promiseMapSerial)(services, exports.launchService);
|
16844
17069
|
};
|
16845
|
-
exports.startServices = startServices;
|
16846
|
-
|
17070
|
+
exports.startServices = startServices;
|
17071
|
+
} (services));
|
16847
17072
|
return services;
|
16848
17073
|
}
|
16849
17074
|
|
@@ -16854,8 +17079,8 @@ function requireNixLaunch () {
|
|
16854
17079
|
hasRequiredNixLaunch = 1;
|
16855
17080
|
Object.defineProperty(nixLaunch, "__esModule", { value: true });
|
16856
17081
|
nixLaunch.install = nixLaunch.getRuntimePath = nixLaunch.download = nixLaunch.getUrl = void 0;
|
16857
|
-
const fs = require$$0$
|
16858
|
-
const path = require$$0$
|
17082
|
+
const fs = require$$0$1;
|
17083
|
+
const path = require$$0$2;
|
16859
17084
|
const child_process_1 = require$$2;
|
16860
17085
|
const promises_1 = promises;
|
16861
17086
|
const util_1 = util;
|
@@ -16962,8 +17187,8 @@ function requireLauncher () {
|
|
16962
17187
|
if (hasRequiredLauncher) return launcher;
|
16963
17188
|
hasRequiredLauncher = 1;
|
16964
17189
|
Object.defineProperty(launcher, "__esModule", { value: true });
|
16965
|
-
const os = require$$0$
|
16966
|
-
const path = require$$0$
|
17190
|
+
const os = require$$0$3;
|
17191
|
+
const path = require$$0$2;
|
16967
17192
|
const win_launch_1 = winLaunch;
|
16968
17193
|
const nix_launch_1 = requireNixLaunch();
|
16969
17194
|
class Launcher {
|
@@ -17038,10 +17263,10 @@ function requirePortDiscovery () {
|
|
17038
17263
|
hasRequiredPortDiscovery = 1;
|
17039
17264
|
Object.defineProperty(portDiscovery, "__esModule", { value: true });
|
17040
17265
|
/* eslint-disable @typescript-eslint/naming-convention */
|
17041
|
-
const fs = require$$0$
|
17266
|
+
const fs = require$$0$1;
|
17042
17267
|
const net = require$$1;
|
17043
|
-
const path = require$$0$
|
17044
|
-
const os = require$$0$
|
17268
|
+
const path = require$$0$2;
|
17269
|
+
const os = require$$0$3;
|
17045
17270
|
const timers_1 = require$$4;
|
17046
17271
|
const wire_1 = wire;
|
17047
17272
|
const launcher_1 = requireLauncher();
|
@@ -17316,17 +17541,12 @@ function requireNodeEnv () {
|
|
17316
17541
|
hasRequiredNodeEnv = 1;
|
17317
17542
|
Object.defineProperty(nodeEnv, "__esModule", { value: true });
|
17318
17543
|
/* eslint-disable class-methods-use-this */
|
17319
|
-
const fs_1 = require$$0$
|
17544
|
+
const fs_1 = require$$0$1;
|
17320
17545
|
const crypto_1 = require$$1$1;
|
17321
|
-
const
|
17546
|
+
const WS = require$$2$1;
|
17322
17547
|
const environment_1 = environment;
|
17323
17548
|
const port_discovery_1 = requirePortDiscovery();
|
17324
17549
|
const transport_errors_1 = transportErrors;
|
17325
|
-
// Due to https://github.com/rollup/rollup/issues/1267, we need this guard
|
17326
|
-
// to ensure the import works with and without the 'esModuleInterop' ts flag.
|
17327
|
-
// This is due to our mocha tests not being compatible with esModuleInterop,
|
17328
|
-
// whereas rollup enforces it.
|
17329
|
-
const WS = _WS.default || _WS;
|
17330
17550
|
class NodeEnvironment {
|
17331
17551
|
constructor() {
|
17332
17552
|
this.messageCounter = 0;
|
@@ -17401,7 +17621,7 @@ var emitterMap = {};
|
|
17401
17621
|
|
17402
17622
|
Object.defineProperty(emitterMap, "__esModule", { value: true });
|
17403
17623
|
emitterMap.EmitterMap = void 0;
|
17404
|
-
const events_1$2 =
|
17624
|
+
const events_1$2 = eventsExports;
|
17405
17625
|
class EmitterMap {
|
17406
17626
|
constructor() {
|
17407
17627
|
this.storage = new Map();
|
@@ -17483,7 +17703,7 @@ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFie
|
|
17483
17703
|
var _Transport_wire, _Transport_fin;
|
17484
17704
|
Object.defineProperty(transport, "__esModule", { value: true });
|
17485
17705
|
transport.Transport = void 0;
|
17486
|
-
const events_1$1 =
|
17706
|
+
const events_1$1 = eventsExports;
|
17487
17707
|
const wire_1$1 = wire;
|
17488
17708
|
const transport_errors_1$1 = transportErrors;
|
17489
17709
|
const eventAggregator_1 = eventAggregator;
|
@@ -17691,7 +17911,7 @@ _Transport_wire = new WeakMap(), _Transport_fin = new WeakMap();
|
|
17691
17911
|
var websocket = {};
|
17692
17912
|
|
17693
17913
|
Object.defineProperty(websocket, "__esModule", { value: true });
|
17694
|
-
const events_1 =
|
17914
|
+
const events_1 = eventsExports;
|
17695
17915
|
const transport_errors_1 = transportErrors;
|
17696
17916
|
/* `READY_STATE` is an instance var set by `constructor` to reference the `WebTransportSocket.READY_STATE` enum.
|
17697
17917
|
* This is syntactic sugar that makes the enum accessible through the `wire` property of the various `fin` singletons.
|
@@ -17751,8 +17971,8 @@ var normalizeConfig$1 = {};
|
|
17751
17971
|
|
17752
17972
|
Object.defineProperty(normalizeConfig$1, "__esModule", { value: true });
|
17753
17973
|
normalizeConfig$1.validateConfig = normalizeConfig$1.normalizeConfig = void 0;
|
17754
|
-
const fs = require$$0$
|
17755
|
-
const node_url_1 = require$$0
|
17974
|
+
const fs = require$$0$1;
|
17975
|
+
const node_url_1 = require$$0; // This must explicitly use node builtin to avoid accidentally bundling npm:url
|
17756
17976
|
const wire_1 = wire;
|
17757
17977
|
const promises_1 = promises;
|
17758
17978
|
const http_1 = http;
|
@@ -17821,9 +18041,9 @@ function requireMain () {
|
|
17821
18041
|
Object.defineProperty(exports, "ChannelClient", { enumerable: true, get: function () { return client_1.ChannelClient; } });
|
17822
18042
|
const provider_1 = provider;
|
17823
18043
|
Object.defineProperty(exports, "ChannelProvider", { enumerable: true, get: function () { return provider_1.ChannelProvider; } });
|
17824
|
-
const frame_1 = frame
|
18044
|
+
const frame_1 = frame;
|
17825
18045
|
Object.defineProperty(exports, "Frame", { enumerable: true, get: function () { return frame_1._Frame; } });
|
17826
|
-
const system_1 = system
|
18046
|
+
const system_1 = system;
|
17827
18047
|
Object.defineProperty(exports, "System", { enumerable: true, get: function () { return system_1.System; } });
|
17828
18048
|
const wire_1 = wire;
|
17829
18049
|
const node_env_1 = requireNodeEnv();
|
@@ -17834,10 +18054,11 @@ function requireMain () {
|
|
17834
18054
|
const environment = new node_env_1.default();
|
17835
18055
|
// Connect to an OpenFin Runtime
|
17836
18056
|
async function connect(config) {
|
18057
|
+
var _a;
|
17837
18058
|
const normalized = await (0, normalize_config_1.validateConfig)(config);
|
17838
18059
|
const wire = new transport_1.Transport(websocket_1.default, environment, {
|
17839
18060
|
...normalized,
|
17840
|
-
name: normalized.name
|
18061
|
+
name: (_a = normalized.name) !== null && _a !== void 0 ? _a : normalized.uuid
|
17841
18062
|
});
|
17842
18063
|
await wire.connect(normalized);
|
17843
18064
|
return new fin_1.Fin(wire);
|
@@ -17851,268 +18072,22 @@ function requireMain () {
|
|
17851
18072
|
const pd = new port_discovery_1.default(normalized, environment);
|
17852
18073
|
return pd.retrievePort();
|
17853
18074
|
}
|
17854
|
-
exports.launch = launch;
|
17855
|
-
|
18075
|
+
exports.launch = launch;
|
18076
|
+
} (main$1));
|
17856
18077
|
return main$1;
|
17857
18078
|
}
|
17858
18079
|
|
17859
18080
|
var mainExports = requireMain();
|
17860
18081
|
|
17861
|
-
var OpenFin$
|
17862
|
-
|
17863
|
-
var events = {};
|
17864
|
-
|
17865
|
-
var application = {};
|
17866
|
-
|
17867
|
-
/**
|
17868
|
-
* Namespace for events that can be emitted by an {@link OpenFin.Application}. Includes events
|
17869
|
-
* re-propagated from the {@link OpenFin.Window} (and, transitively, {@link OpenFin.View}) level, prefixed with `window-` (and also, if applicable, `view-`).
|
17870
|
-
* For example, a view's "attached" event will fire as 'window-view-attached' at the application level.
|
17871
|
-
*
|
17872
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
17873
|
-
*
|
17874
|
-
* This namespace contains only payload shapes for events that are unique to `Application`. Events that propagate to `Application` from
|
17875
|
-
* child {@link OpenFin.Window windows} and {@link OpenFin.View views} are defined in the {@link OpenFin.WindowEvents} and
|
17876
|
-
* {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all* application events, see {@link Application.on Application.on}.
|
17877
|
-
*
|
17878
|
-
* {@link NativeApplicationEvent Native application events} (i.e. those that have not propagated from {@link OpenFin.ViewEvents Views}
|
17879
|
-
* or {@link OpenFin.WindowEvents Windows} re-propagate to {@link OpenFin.SystemEvents System} with their type string prefixed with `application-`.
|
17880
|
-
* {@link OpenFin.ApplicationEvents.ApplicationWindowEvent Application events that are tied to Windows but do not propagate from them}
|
17881
|
-
* are propagated to `System` without any type string prefixing.
|
17882
|
-
*
|
17883
|
-
* "Requested" events (e.g. {@link RunRequestedEvent}) do not propagate.
|
17884
|
-
*
|
17885
|
-
* @packageDocumentation
|
17886
|
-
*/
|
17887
|
-
Object.defineProperty(application, "__esModule", { value: true });
|
17888
|
-
|
17889
|
-
var base = {};
|
17890
|
-
|
17891
|
-
/**
|
17892
|
-
* Namespace for shared event payloads and utility types common to all event emitters.
|
17893
|
-
*
|
17894
|
-
* @packageDocumentation
|
17895
|
-
*/
|
17896
|
-
Object.defineProperty(base, "__esModule", { value: true });
|
17897
|
-
|
17898
|
-
var externalApplication = {};
|
17899
|
-
|
17900
|
-
/**
|
17901
|
-
* Namespace for events that can be transmitted by an {@link OpenFin.ExternalApplication}.
|
17902
|
-
*
|
17903
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
17904
|
-
*
|
17905
|
-
* For a list of valid string keys for external application events, see {@link ExternalApplication.on ExternalApplication.on}.
|
17906
|
-
*
|
17907
|
-
* @packageDocumentation
|
17908
|
-
*/
|
17909
|
-
Object.defineProperty(externalApplication, "__esModule", { value: true });
|
17910
|
-
|
17911
|
-
var frame = {};
|
17912
|
-
|
17913
|
-
Object.defineProperty(frame, "__esModule", { value: true });
|
17914
|
-
|
17915
|
-
var globalHotkey = {};
|
17916
|
-
|
17917
|
-
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
17918
|
-
|
17919
|
-
var platform = {};
|
17920
|
-
|
17921
|
-
/**
|
17922
|
-
*
|
17923
|
-
* Namespace for events that can emitted by a {@link OpenFin.Platform}.
|
17924
|
-
*
|
17925
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
17926
|
-
*
|
17927
|
-
* The Platform `EventEmitter` is a superset of the {@link OpenFin.Application} `EventEmitter`,
|
17928
|
-
* meaning it can listen to all {@link OpenFin.ApplicationEvents Application events} in addition to the
|
17929
|
-
* Platform-specific events listed here. For a list of valid string keys for *all* platform events, see
|
17930
|
-
* {@link Platform.on Platform.on}.
|
17931
|
-
*
|
17932
|
-
* @packageDocumentation
|
17933
|
-
*/
|
17934
|
-
Object.defineProperty(platform, "__esModule", { value: true });
|
17935
|
-
|
17936
|
-
var system = {};
|
17937
|
-
|
17938
|
-
/**
|
17939
|
-
* Namespace for runtime-wide OpenFin events emitted by {@link System.System}. Includes events
|
17940
|
-
* re-propagated from {@link OpenFin.Application}, {@link OpenFin.Window}, and {@link OpenFin.View} (prefixed with `application-`, `window-`, and `view-`). All
|
17941
|
-
* event propagations are visible at the System level. Propagated events from WebContents (windows, views, frames) to the Application level will *not*
|
17942
|
-
* transitively re-propagate to the System level, because they are already visible at the system level and contain the identity
|
17943
|
-
* of the application. For example, an application's "closed" event will fire as 'application-closed' at the system level. A view's 'shown' event
|
17944
|
-
* will be visible as 'view-shown' at the system level, but *not* as `application-window-view-shown`.
|
17945
|
-
*
|
17946
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
17947
|
-
*
|
17948
|
-
* This namespace contains only payload shapes for events that are unique to `System`. Events that propagate to `System` from
|
17949
|
-
* child {@link OpenFin.Application applications}, {@link OpenFin.Window windows}, and {@link OpenFin.View views} are defined in the
|
17950
|
-
* {@link OpenFin.ApplicationEvents}, {@link OpenFin.WindowEvents}, and {@link OpenFin.ViewEvents} namespaces. For a list of valid string keys for *all*
|
17951
|
-
* system events, see {@link System.on System.on}.
|
17952
|
-
*
|
17953
|
-
* @packageDocumentation
|
17954
|
-
*/
|
17955
|
-
Object.defineProperty(system, "__esModule", { value: true });
|
17956
|
-
|
17957
|
-
var view = {};
|
17958
|
-
|
17959
|
-
/**
|
17960
|
-
* Namespace for events that can be emitted by a {@link OpenFin.View}.
|
17961
|
-
*
|
17962
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
17963
|
-
*
|
17964
|
-
* This namespace contains only payload shapes for events that are unique to `View`. Events that are shared between all `WebContents`
|
17965
|
-
* (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. For a list
|
17966
|
-
* of valid string keys for *all* View events, see {@link View.on View.on}.
|
17967
|
-
*
|
17968
|
-
* View events propagate to their parent {@link OpenFin.WindowEvents Window}, {@link OpenFin.ApplicationEvents Application},
|
17969
|
-
* and {@link OpenFin.SystemEvents System} with an added `viewIdentity` property and their event types prefixed with `'view-'`.
|
17970
|
-
*
|
17971
|
-
* @packageDocumentation
|
17972
|
-
*/
|
17973
|
-
Object.defineProperty(view, "__esModule", { value: true });
|
17974
|
-
|
17975
|
-
var webcontents = {};
|
17976
|
-
|
17977
|
-
/**
|
17978
|
-
* Namespace for events shared by all OpenFin WebContents elements (i.e. {@link OpenFin.Window},
|
17979
|
-
* {@link OpenFin.View}).
|
17980
|
-
*
|
17981
|
-
* WebContents events are divided into two groups: {@link WillPropagateWebContentsEvent} and {@link NonPropagatedWebContentsEvent}. Propagating events
|
17982
|
-
* will re-emit on parent entities - e.g., a propagating event in a view will also be emitted on the view's
|
17983
|
-
* parent window, and propagating events in a window will also be emitted on the window's parent {@link OpenFin.Application}.
|
17984
|
-
*
|
17985
|
-
* Non-propagating events will not re-emit on parent entities.
|
17986
|
-
*
|
17987
|
-
* @packageDocumentation
|
17988
|
-
*/
|
17989
|
-
Object.defineProperty(webcontents, "__esModule", { value: true });
|
17990
|
-
|
17991
|
-
var window$1 = {};
|
17992
|
-
|
17993
|
-
/**
|
17994
|
-
* Namespace for events that can be emitted by a {@link OpenFin.Window}.
|
17995
|
-
*
|
17996
|
-
* Event payloads are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
17997
|
-
*
|
17998
|
-
* This namespace contains only payload shapes for events that are unique to `Window`. Events that are shared between all `WebContents`
|
17999
|
-
* (i.e. {@link OpenFin.Window}, {@link OpenFin.View}) are defined in {@link OpenFin.WebContentsEvents}. Events that
|
18000
|
-
* propagate from `View` are defined in {@link OpenFin.ViewEvents}. For a list of valid string keys for *all* Window events, see
|
18001
|
-
* {@link Window.on Window.on}
|
18002
|
-
*
|
18003
|
-
* {@link OpenFin.WindowEvents.NativeWindowEvent Native window events} (i.e. those that are not propagated from a
|
18004
|
-
* {@link OpenFin.ViewEvents View}) propagate to their parent {@link OpenFin.ApplicationEvents Application} and
|
18005
|
-
* {@link OpenFin.SystemEvents System} with their event types prefixed with `'window-'`).
|
18006
|
-
*
|
18007
|
-
* "Requested" events (e.g. {@link AuthRequestedEvent}) do not propagate to `System. The {@link OpenFin.WindowEvents.WindowCloseRequestedEvent}
|
18008
|
-
* does not propagate at all.
|
18009
|
-
*
|
18010
|
-
* @packageDocumentation
|
18011
|
-
*/
|
18012
|
-
Object.defineProperty(window$1, "__esModule", { value: true });
|
18013
|
-
|
18014
|
-
/**
|
18015
|
-
* Namespace for OpenFin event types. Each entity that emits OpenFin events has its own sub-namespace. Event payloads
|
18016
|
-
* themselves are documented as interfaces, while algebraic helper types and derived types are documented as type aliases.
|
18017
|
-
*
|
18018
|
-
* #### Event emitters
|
18019
|
-
*
|
18020
|
-
* The following entities emit OpenFin events, and have corresponding sub-namespaces:
|
18021
|
-
*
|
18022
|
-
* * {@link OpenFin.Application}: {@link OpenFin.ApplicationEvents}
|
18023
|
-
* * {@link OpenFin.ExternalApplication}: {@link OpenFin.ExternalApplicationEvents}
|
18024
|
-
* * {@link OpenFin.Frame}: {@link OpenFin.FrameEvents}
|
18025
|
-
* * {@link OpenFin.GlobalHotkey}: {@link OpenFin.GlobalHotkeyEvents}
|
18026
|
-
* * {@link OpenFin.Platform}: {@link OpenFin.PlatformEvents}
|
18027
|
-
* * {@link OpenFin.System}: {@link OpenFin.SystemEvents}
|
18028
|
-
* * {@link OpenFin.View}: {@link OpenFin.ViewEvents}
|
18029
|
-
* * {@link OpenFin.Window}: {@link OpenFin.WindowEvents}
|
18030
|
-
*
|
18031
|
-
* These `EventEmitter` entities share a common set of methods for interacting with the OpenFin event bus, which can be
|
18032
|
-
* seen on the individual documentation pages for each entity type.
|
18033
|
-
*
|
18034
|
-
* Registering event handlers is an asynchronous operation. It is important to ensure that the returned Promises are awaited to reduce the
|
18035
|
-
* risk of race conditions.
|
18036
|
-
*
|
18037
|
-
* When the `EventEmitter` receives an event from the browser process and emits on the renderer, all of the functions attached to that
|
18038
|
-
* specific event are called synchronously. Any values returned by the called listeners are ignored and will be discarded. If the window document
|
18039
|
-
* is destroyed by page navigation or reload, its registered event listeners will be removed.
|
18040
|
-
*
|
18041
|
-
* We recommend using Arrow Functions for event listeners to ensure the this scope is consistent with the original function context.
|
18042
|
-
*
|
18043
|
-
* Events re-propagate from smaller/more-local scopes to larger/more-global scopes. For example, an event emitted on a specific
|
18044
|
-
* view will propagate to the window in which the view is embedded, and then to the application in which the window is running, and
|
18045
|
-
* finally to the OpenFin runtime itself at the "system" level. For details on propagation semantics, see the namespace for
|
18046
|
-
* the propagating (or propagated-to) entity.
|
18047
|
-
*
|
18048
|
-
* If you need the payload type for a specific type of event (especially propagated events), use the emitting topic's `EventPayload`
|
18049
|
-
* (e.g. {@link WindowEvents.WindowEventPayload}) generic with the event's `type` string. For example, the payload of
|
18050
|
-
* a {@link ViewEvents.CreatedEvent} after it has propagated to its parent {@link WindowEvents Window} can be found with
|
18051
|
-
* `WindowEventPayload<'view-created'>`.
|
18052
|
-
*
|
18053
|
-
* @packageDocumentation
|
18054
|
-
*/
|
18055
|
-
Object.defineProperty(events, "__esModule", { value: true });
|
18056
|
-
events.WindowEvents = events.WebContentsEvents = events.ViewEvents = events.SystemEvents = events.PlatformEvents = events.GlobalHotkeyEvents = events.FrameEvents = events.ExternalApplicationEvents = events.BaseEvents = events.ApplicationEvents = void 0;
|
18057
|
-
const ApplicationEvents = application;
|
18058
|
-
events.ApplicationEvents = ApplicationEvents;
|
18059
|
-
const BaseEvents = base;
|
18060
|
-
events.BaseEvents = BaseEvents;
|
18061
|
-
const ExternalApplicationEvents = externalApplication;
|
18062
|
-
events.ExternalApplicationEvents = ExternalApplicationEvents;
|
18063
|
-
const FrameEvents = frame;
|
18064
|
-
events.FrameEvents = FrameEvents;
|
18065
|
-
const GlobalHotkeyEvents = globalHotkey;
|
18066
|
-
events.GlobalHotkeyEvents = GlobalHotkeyEvents;
|
18067
|
-
const PlatformEvents = platform;
|
18068
|
-
events.PlatformEvents = PlatformEvents;
|
18069
|
-
const SystemEvents = system;
|
18070
|
-
events.SystemEvents = SystemEvents;
|
18071
|
-
const ViewEvents = view;
|
18072
|
-
events.ViewEvents = ViewEvents;
|
18073
|
-
const WebContentsEvents = webcontents;
|
18074
|
-
events.WebContentsEvents = WebContentsEvents;
|
18075
|
-
const WindowEvents = window$1;
|
18076
|
-
events.WindowEvents = WindowEvents;
|
18077
|
-
|
18078
|
-
(function (exports) {
|
18079
|
-
/**
|
18080
|
-
* Top-level namespace for types referenced by the OpenFin API. Contains:
|
18081
|
-
*
|
18082
|
-
* * The type of the global `fin` entry point ({@link FinApi})
|
18083
|
-
* * Classes that act as static namespaces returned from the `fin` global (e.g. {@link ApplicationModule}, accessible via `fin.Application`)
|
18084
|
-
* * Instance classes that are returned from API calls (e.g. {@link Application}, accessible via `fin.Application.getCurrentSync()`)
|
18085
|
-
* * Parameter shapes for API methods (e.g. {@link ApplicationOptions}, used in `fin.Application.start()`)
|
18086
|
-
* * Event namespaces and payload union types (e.g. {@link ApplicationEvents} and {@link ApplicationEvent})
|
18087
|
-
*
|
18088
|
-
* @packageDocumentation
|
18089
|
-
*/
|
18090
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18091
|
-
if (k2 === undefined) k2 = k;
|
18092
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
18093
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
18094
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
18095
|
-
}
|
18096
|
-
Object.defineProperty(o, k2, desc);
|
18097
|
-
}) : (function(o, m, k, k2) {
|
18098
|
-
if (k2 === undefined) k2 = k;
|
18099
|
-
o[k2] = m[k];
|
18100
|
-
}));
|
18101
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
18102
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
18103
|
-
};
|
18104
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
18105
|
-
// Deprecated shim to preserve v30 namespace names
|
18106
|
-
__exportStar(events, exports);
|
18107
|
-
} (OpenFin$2));
|
18082
|
+
var OpenFin$1 = {};
|
18108
18083
|
|
18109
|
-
|
18084
|
+
Object.defineProperty(OpenFin$1, "__esModule", { value: true });
|
18110
18085
|
|
18111
|
-
var OpenFin
|
18086
|
+
var OpenFin = /*#__PURE__*/_mergeNamespaces({
|
18112
18087
|
__proto__: null,
|
18113
|
-
default: OpenFin
|
18114
|
-
}, [OpenFin$
|
18088
|
+
default: OpenFin$1
|
18089
|
+
}, [OpenFin$1]);
|
18115
18090
|
|
18116
18091
|
exports.connect = mainExports.connect;
|
18117
|
-
exports.default = OpenFin
|
18092
|
+
exports.default = OpenFin;
|
18118
18093
|
exports.launch = mainExports.launch;
|