@openfin/node-adapter 34.78.2 → 34.78.4
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 +3651 -850
- package/out/node-adapter-beta.d.ts +3651 -850
- package/out/node-adapter-public.d.ts +3651 -850
- package/out/node-adapter.d.ts +3640 -903
- package/out/node-adapter.js +1033 -1124
- package/package.json +9 -6
- package/resources/win/OpenFinRVM.exe +0 -0
package/out/node-adapter.js
CHANGED
@@ -2,16 +2,17 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
+
var require$$0 = require('events');
|
5
6
|
var require$$3 = require('lodash');
|
6
|
-
var require$$0$
|
7
|
+
var require$$0$2 = require('fs');
|
7
8
|
var require$$1$1 = require('crypto');
|
8
9
|
var require$$2$1 = require('ws');
|
9
10
|
var require$$1 = require('net');
|
10
|
-
var require$$0$
|
11
|
-
var require$$0$
|
11
|
+
var require$$0$3 = require('path');
|
12
|
+
var require$$0$4 = require('os');
|
12
13
|
var require$$4 = require('timers');
|
13
14
|
var require$$2 = require('child_process');
|
14
|
-
var require$$0 = require('node:url');
|
15
|
+
var require$$0$1 = require('node:url');
|
15
16
|
|
16
17
|
function _mergeNamespaces(n, m) {
|
17
18
|
m.forEach(function (e) {
|
@@ -30,493 +31,17 @@ function _mergeNamespaces(n, m) {
|
|
30
31
|
|
31
32
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
var fin = {};
|
36
|
-
|
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
|
-
};
|
34
|
+
function getDefaultExportFromCjs (x) {
|
35
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
62
36
|
}
|
63
37
|
|
64
|
-
|
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
|
-
}
|
165
|
-
|
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
|
-
}
|
38
|
+
var main$1 = {};
|
493
39
|
|
494
|
-
|
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
|
-
}
|
40
|
+
var fin = {};
|
516
41
|
|
517
|
-
var system = {};
|
42
|
+
var system$1 = {};
|
518
43
|
|
519
|
-
var base = {};
|
44
|
+
var base$1 = {};
|
520
45
|
|
521
46
|
var promises = {};
|
522
47
|
|
@@ -559,8 +84,8 @@ var __classPrivateFieldGet$f = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
559
84
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
560
85
|
};
|
561
86
|
var _EmitterBase_emitterAccessor;
|
562
|
-
Object.defineProperty(base, "__esModule", { value: true });
|
563
|
-
base.Reply = base.EmitterBase = base.Base = void 0;
|
87
|
+
Object.defineProperty(base$1, "__esModule", { value: true });
|
88
|
+
base$1.Reply = base$1.EmitterBase = base$1.Base = void 0;
|
564
89
|
const promises_1$2 = promises;
|
565
90
|
class Base {
|
566
91
|
/**
|
@@ -581,11 +106,18 @@ class Base {
|
|
581
106
|
get fin() {
|
582
107
|
return this.wire.getFin();
|
583
108
|
}
|
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
|
+
*/
|
584
116
|
get me() {
|
585
117
|
return this.wire.me;
|
586
118
|
}
|
587
119
|
}
|
588
|
-
base.Base = Base;
|
120
|
+
base$1.Base = Base;
|
589
121
|
/**
|
590
122
|
* An entity that emits OpenFin events.
|
591
123
|
*
|
@@ -615,6 +147,9 @@ class EmitterBase extends Base {
|
|
615
147
|
this.topic = topic;
|
616
148
|
_EmitterBase_emitterAccessor.set(this, void 0);
|
617
149
|
this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
|
150
|
+
/**
|
151
|
+
* @internal
|
152
|
+
*/
|
618
153
|
this.emit = (eventType, payload, ...args) => {
|
619
154
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
620
155
|
};
|
@@ -657,16 +192,13 @@ class EmitterBase extends Base {
|
|
657
192
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
658
193
|
return Promise.resolve();
|
659
194
|
};
|
660
|
-
this.addListener = this.on;
|
661
195
|
__classPrivateFieldSet$d(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
662
196
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
663
197
|
}
|
664
198
|
/**
|
665
199
|
* Adds a listener to the end of the listeners array for the specified event.
|
666
200
|
*
|
667
|
-
* @
|
668
|
-
* @param listener
|
669
|
-
* @param options
|
201
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
670
202
|
*/
|
671
203
|
async on(eventType, listener, options) {
|
672
204
|
await this.registerEventListener(eventType, options, (emitter) => {
|
@@ -676,12 +208,16 @@ class EmitterBase extends Base {
|
|
676
208
|
});
|
677
209
|
return this;
|
678
210
|
}
|
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
|
+
}
|
679
217
|
/**
|
680
218
|
* 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.
|
681
219
|
*
|
682
|
-
* @
|
683
|
-
* @param listener
|
684
|
-
* @param options
|
220
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
685
221
|
*/
|
686
222
|
async once(eventType, listener, options) {
|
687
223
|
const deregister = () => this.deregisterEventListener(eventType);
|
@@ -697,9 +233,7 @@ class EmitterBase extends Base {
|
|
697
233
|
/**
|
698
234
|
* Adds a listener to the beginning of the listeners array for the specified event.
|
699
235
|
*
|
700
|
-
* @
|
701
|
-
* @param listener
|
702
|
-
* @param options
|
236
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
703
237
|
*/
|
704
238
|
async prependListener(eventType, listener, options) {
|
705
239
|
await this.registerEventListener(eventType, options, (emitter) => {
|
@@ -713,9 +247,7 @@ class EmitterBase extends Base {
|
|
713
247
|
* Adds a one time listener for the event. The listener is invoked only the first time the event is fired,
|
714
248
|
* after which it is removed. The listener is added to the beginning of the listeners array.
|
715
249
|
*
|
716
|
-
* @
|
717
|
-
* @param listener
|
718
|
-
* @param options
|
250
|
+
* @remarks Event payloads are documented in the {@link OpenFin.Events} namespace.
|
719
251
|
*/
|
720
252
|
async prependOnceListener(eventType, listener, options) {
|
721
253
|
const deregister = () => this.deregisterEventListener(eventType);
|
@@ -732,10 +264,6 @@ class EmitterBase extends Base {
|
|
732
264
|
* Remove a listener from the listener array for the specified event.
|
733
265
|
*
|
734
266
|
* @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
|
739
267
|
*/
|
740
268
|
async removeListener(eventType, listener, options) {
|
741
269
|
const emitter = await this.deregisterEventListener(eventType, options);
|
@@ -762,7 +290,6 @@ class EmitterBase extends Base {
|
|
762
290
|
/**
|
763
291
|
* Removes all listeners, or those of the specified event.
|
764
292
|
*
|
765
|
-
* @param eventType
|
766
293
|
*/
|
767
294
|
async removeAllListeners(eventType) {
|
768
295
|
const removeByEvent = async (event) => {
|
@@ -787,11 +314,11 @@ class EmitterBase extends Base {
|
|
787
314
|
}
|
788
315
|
}
|
789
316
|
}
|
790
|
-
base.EmitterBase = EmitterBase;
|
317
|
+
base$1.EmitterBase = EmitterBase;
|
791
318
|
_EmitterBase_emitterAccessor = new WeakMap();
|
792
319
|
class Reply {
|
793
320
|
}
|
794
|
-
base.Reply = Reply;
|
321
|
+
base$1.Reply = Reply;
|
795
322
|
|
796
323
|
var transportErrors = {};
|
797
324
|
|
@@ -824,7 +351,7 @@ class InternalError extends Error {
|
|
824
351
|
const { message, name, stack, ...rest } = err;
|
825
352
|
super(message);
|
826
353
|
this.name = name || 'Error';
|
827
|
-
this.stack = stack
|
354
|
+
this.stack = stack ?? this.toString();
|
828
355
|
Object.keys(rest).forEach(key => {
|
829
356
|
this[key] = rest[key];
|
830
357
|
});
|
@@ -833,7 +360,6 @@ class InternalError extends Error {
|
|
833
360
|
// For documentation of the error methods being used see here: https://v8.dev/docs/stack-trace-api
|
834
361
|
class RuntimeError extends Error {
|
835
362
|
static getCallSite(callsToRemove = 0) {
|
836
|
-
var _a, _b;
|
837
363
|
const length = Error.stackTraceLimit;
|
838
364
|
const realCallsToRemove = callsToRemove + 1; // remove this call;
|
839
365
|
Error.stackTraceLimit = length + realCallsToRemove;
|
@@ -842,7 +368,7 @@ class RuntimeError extends Error {
|
|
842
368
|
// This will be called when we access the `stack` property
|
843
369
|
Error.prepareStackTrace = (_, stack) => stack;
|
844
370
|
// stack is optional in non chromium contexts
|
845
|
-
const stack =
|
371
|
+
const stack = new Error().stack?.slice(realCallsToRemove) ?? [];
|
846
372
|
Error.prepareStackTrace = _prepareStackTrace;
|
847
373
|
Error.stackTraceLimit = length;
|
848
374
|
return stack;
|
@@ -864,7 +390,7 @@ class RuntimeError extends Error {
|
|
864
390
|
const { reason, error } = payload;
|
865
391
|
super(reason);
|
866
392
|
this.name = 'RuntimeError';
|
867
|
-
if (error
|
393
|
+
if (error?.stack) {
|
868
394
|
this.cause = new InternalError(error);
|
869
395
|
}
|
870
396
|
if (callSites) {
|
@@ -874,7 +400,7 @@ class RuntimeError extends Error {
|
|
874
400
|
}
|
875
401
|
transportErrors.RuntimeError = RuntimeError;
|
876
402
|
|
877
|
-
var window$
|
403
|
+
var window$2 = {};
|
878
404
|
|
879
405
|
var Factory$8 = {};
|
880
406
|
|
@@ -893,25 +419,44 @@ validate.validateIdentity = validateIdentity;
|
|
893
419
|
|
894
420
|
var Instance$7 = {};
|
895
421
|
|
896
|
-
var application = {};
|
422
|
+
var application$1 = {};
|
897
423
|
|
898
424
|
var Factory$7 = {};
|
899
425
|
|
900
426
|
var Instance$6 = {};
|
901
427
|
|
902
|
-
var view = {};
|
428
|
+
var view$1 = {};
|
903
429
|
|
904
430
|
var Factory$6 = {};
|
905
431
|
|
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
|
+
|
906
446
|
var hasRequiredFactory$3;
|
907
447
|
|
908
448
|
function requireFactory$3 () {
|
909
449
|
if (hasRequiredFactory$3) return Factory$6;
|
910
450
|
hasRequiredFactory$3 = 1;
|
911
451
|
Object.defineProperty(Factory$6, "__esModule", { value: true });
|
912
|
-
|
452
|
+
Factory$6.ViewModule = void 0;
|
453
|
+
const base_1 = base$1;
|
913
454
|
const validate_1 = validate;
|
914
455
|
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
|
+
*/
|
915
460
|
class ViewModule extends base_1.Base {
|
916
461
|
/**
|
917
462
|
* Creates a new View.
|
@@ -940,13 +485,13 @@ function requireFactory$3 () {
|
|
940
485
|
* ```
|
941
486
|
* Note that created views needs to navigate somewhere for them to actually render a website.
|
942
487
|
* @experimental
|
943
|
-
* @static
|
944
488
|
*/
|
945
489
|
async create(options) {
|
946
490
|
const { uuid } = this.wire.me;
|
947
491
|
if (!options.name || typeof options.name !== 'string') {
|
948
492
|
throw new Error('Please provide a name property as a string in order to create a View.');
|
949
493
|
}
|
494
|
+
(0, warnings_1.handleDeprecatedWarnings)(options);
|
950
495
|
if (this.wire.environment.childViews) {
|
951
496
|
await this.wire.environment.createChildContent({
|
952
497
|
entityType: 'view',
|
@@ -960,7 +505,6 @@ function requireFactory$3 () {
|
|
960
505
|
}
|
961
506
|
/**
|
962
507
|
* Asynchronously returns a View object that represents an existing view.
|
963
|
-
* @param identity
|
964
508
|
*
|
965
509
|
* @example
|
966
510
|
* ```js
|
@@ -969,7 +513,6 @@ function requireFactory$3 () {
|
|
969
513
|
* .catch(err => console.log(err));
|
970
514
|
* ```
|
971
515
|
* @experimental
|
972
|
-
* @static
|
973
516
|
*/
|
974
517
|
async wrap(identity) {
|
975
518
|
this.wire.sendAction('view-wrap');
|
@@ -981,7 +524,6 @@ function requireFactory$3 () {
|
|
981
524
|
}
|
982
525
|
/**
|
983
526
|
* Synchronously returns a View object that represents an existing view.
|
984
|
-
* @param identity
|
985
527
|
*
|
986
528
|
* @example
|
987
529
|
* ```js
|
@@ -989,7 +531,6 @@ function requireFactory$3 () {
|
|
989
531
|
* await view.hide();
|
990
532
|
* ```
|
991
533
|
* @experimental
|
992
|
-
* @static
|
993
534
|
*/
|
994
535
|
wrapSync(identity) {
|
995
536
|
this.wire.sendAction('view-wrap-sync').catch((e) => {
|
@@ -1012,7 +553,6 @@ function requireFactory$3 () {
|
|
1012
553
|
*
|
1013
554
|
* ```
|
1014
555
|
* @experimental
|
1015
|
-
* @static
|
1016
556
|
*/
|
1017
557
|
getCurrent() {
|
1018
558
|
this.wire.sendAction('view-get-current').catch((e) => {
|
@@ -1034,7 +574,6 @@ function requireFactory$3 () {
|
|
1034
574
|
*
|
1035
575
|
* ```
|
1036
576
|
* @experimental
|
1037
|
-
* @static
|
1038
577
|
*/
|
1039
578
|
getCurrentSync() {
|
1040
579
|
this.wire.sendAction('view-get-current-sync').catch((e) => {
|
@@ -1047,7 +586,7 @@ function requireFactory$3 () {
|
|
1047
586
|
return this.wrapSync({ uuid, name });
|
1048
587
|
}
|
1049
588
|
}
|
1050
|
-
Factory$6.
|
589
|
+
Factory$6.ViewModule = ViewModule;
|
1051
590
|
return Factory$6;
|
1052
591
|
}
|
1053
592
|
|
@@ -1240,7 +779,7 @@ class ChannelsExposer {
|
|
1240
779
|
this.exposeFunction = async (target, config) => {
|
1241
780
|
const { key, options, meta } = config;
|
1242
781
|
const { id } = meta;
|
1243
|
-
const action = `${id}.${
|
782
|
+
const action = `${id}.${options?.action || key}`;
|
1244
783
|
await this.channelProviderOrClient.register(action, async ({ args }) => {
|
1245
784
|
return target(...args);
|
1246
785
|
});
|
@@ -1271,7 +810,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
|
|
1271
810
|
};
|
1272
811
|
Object.defineProperty(exports, "__esModule", { value: true });
|
1273
812
|
__exportStar(channelsConsumer, exports);
|
1274
|
-
__exportStar(channelsExposer, exports);
|
813
|
+
__exportStar(channelsExposer, exports);
|
1275
814
|
} (openfinChannels));
|
1276
815
|
|
1277
816
|
(function (exports) {
|
@@ -1290,7 +829,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
|
|
1290
829
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
1291
830
|
};
|
1292
831
|
Object.defineProperty(exports, "__esModule", { value: true });
|
1293
|
-
__exportStar(openfinChannels, exports);
|
832
|
+
__exportStar(openfinChannels, exports);
|
1294
833
|
} (strategies));
|
1295
834
|
|
1296
835
|
(function (exports) {
|
@@ -1312,7 +851,7 @@ channelsExposer.ChannelsExposer = ChannelsExposer;
|
|
1312
851
|
__exportStar(apiConsumer, exports);
|
1313
852
|
__exportStar(apiExposer, exports);
|
1314
853
|
__exportStar(strategies, exports);
|
1315
|
-
__exportStar(decorators, exports);
|
854
|
+
__exportStar(decorators, exports);
|
1316
855
|
} (apiExposer$1));
|
1317
856
|
|
1318
857
|
var channelApiRelay = {};
|
@@ -1553,14 +1092,14 @@ _LayoutNode_client = new WeakMap();
|
|
1553
1092
|
/**
|
1554
1093
|
* @ignore
|
1555
1094
|
* @internal
|
1556
|
-
* Encapsulates Api consumption of {@link
|
1095
|
+
* Encapsulates Api consumption of {@link LayoutEntitiesClient} with a relayed dispatch
|
1557
1096
|
* @param client
|
1558
1097
|
* @param controllerId
|
1559
1098
|
* @param identity
|
1560
1099
|
* @returns a new instance of {@link LayoutEntitiesClient} with bound to the controllerId
|
1561
1100
|
*/
|
1562
1101
|
LayoutNode.newLayoutEntitiesClient = async (client, controllerId, identity) => {
|
1563
|
-
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.');
|
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 does not exist or has been destroyed.');
|
1564
1103
|
const consumer = new api_exposer_1.ApiConsumer(new api_exposer_1.ChannelsConsumer({ dispatch }));
|
1565
1104
|
return consumer.consume({ id: controllerId });
|
1566
1105
|
};
|
@@ -1870,15 +1409,20 @@ _ColumnOrRow_client = new WeakMap();
|
|
1870
1409
|
var layout_constants = {};
|
1871
1410
|
|
1872
1411
|
Object.defineProperty(layout_constants, "__esModule", { value: true });
|
1873
|
-
layout_constants.LAYOUT_CONTROLLER_ID = void 0;
|
1412
|
+
layout_constants.DEFAULT_LAYOUT_KEY = layout_constants.LAYOUT_CONTROLLER_ID = void 0;
|
1874
1413
|
layout_constants.LAYOUT_CONTROLLER_ID = 'layout-entities';
|
1414
|
+
layout_constants.DEFAULT_LAYOUT_KEY = 'default';
|
1875
1415
|
|
1876
1416
|
var main = {};
|
1877
1417
|
|
1878
1418
|
Object.defineProperty(main, "__esModule", { value: true });
|
1879
1419
|
main.WebContents = void 0;
|
1880
|
-
const base_1$k = base;
|
1420
|
+
const base_1$k = base$1;
|
1881
1421
|
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
|
+
*/
|
1882
1426
|
constructor(wire, identity, entityType) {
|
1883
1427
|
super(wire, entityType, identity.uuid, identity.name);
|
1884
1428
|
this.identity = identity;
|
@@ -1886,10 +1430,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1886
1430
|
}
|
1887
1431
|
/**
|
1888
1432
|
* Gets a base64 encoded image of all or part of the WebContents.
|
1889
|
-
* @function capturePage
|
1890
1433
|
* @param options Options for the capturePage call.
|
1891
|
-
* @memberOf View
|
1892
|
-
* @instance
|
1893
1434
|
*
|
1894
1435
|
* @example
|
1895
1436
|
*
|
@@ -1934,6 +1475,11 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1934
1475
|
* }
|
1935
1476
|
* console.log(await wnd.capturePage(options));
|
1936
1477
|
* ```
|
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}.
|
1937
1483
|
*/
|
1938
1484
|
capturePage(options) {
|
1939
1485
|
return this.wire.sendAction('capture-page', { options, ...this.identity }).then(({ payload }) => payload.data);
|
@@ -1942,9 +1488,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1942
1488
|
* Executes Javascript on the WebContents, restricted to contents you own or contents owned by
|
1943
1489
|
* applications you have created.
|
1944
1490
|
* @param code JavaScript code to be executed on the view.
|
1945
|
-
* @function executeJavaScript
|
1946
|
-
* @memberOf View
|
1947
|
-
* @instance
|
1948
1491
|
*
|
1949
1492
|
* @example
|
1950
1493
|
* View:
|
@@ -1972,6 +1515,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1972
1515
|
*
|
1973
1516
|
* executeJavaScript(`console.log('Hello, Openfin')`).then(() => console.log('Javascript excuted')).catch(err => console.log(err));
|
1974
1517
|
* ```
|
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}.
|
1975
1522
|
*/
|
1976
1523
|
executeJavaScript(code) {
|
1977
1524
|
return this.wire
|
@@ -1980,9 +1527,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
1980
1527
|
}
|
1981
1528
|
/**
|
1982
1529
|
* Returns the zoom level of the WebContents.
|
1983
|
-
* @function getZoomLevel
|
1984
|
-
* @memberOf View
|
1985
|
-
* @instance
|
1986
1530
|
*
|
1987
1531
|
* @example
|
1988
1532
|
* View:
|
@@ -2014,6 +1558,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2014
1558
|
*
|
2015
1559
|
* getZoomLevel().then(zoomLevel => console.log(zoomLevel)).catch(err => console.log(err));
|
2016
1560
|
* ```
|
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}.
|
2017
1565
|
*/
|
2018
1566
|
getZoomLevel() {
|
2019
1567
|
return this.wire.sendAction('get-zoom-level', this.identity).then(({ payload }) => payload.data);
|
@@ -2021,9 +1569,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2021
1569
|
/**
|
2022
1570
|
* Sets the zoom level of the WebContents.
|
2023
1571
|
* @param level The zoom level
|
2024
|
-
* @function setZoomLevel
|
2025
|
-
* @memberOf View
|
2026
|
-
* @instance
|
2027
1572
|
*
|
2028
1573
|
* @example
|
2029
1574
|
* View:
|
@@ -2055,6 +1600,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2055
1600
|
*
|
2056
1601
|
* setZoomLevel(4).then(() => console.log('Setting a zoom level')).catch(err => console.log(err));
|
2057
1602
|
* ```
|
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}.
|
2058
1607
|
*/
|
2059
1608
|
setZoomLevel(level) {
|
2060
1609
|
return this.wire.sendAction('set-zoom-level', { ...this.identity, level }).then(() => undefined);
|
@@ -2062,12 +1611,9 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2062
1611
|
/**
|
2063
1612
|
* Navigates the WebContents to a specified URL.
|
2064
1613
|
*
|
2065
|
-
*
|
1614
|
+
* Note: The url must contain the protocol prefix such as http:// or https://.
|
2066
1615
|
* @param url - The URL to navigate the WebContents to.
|
2067
1616
|
*
|
2068
|
-
* @function navigate
|
2069
|
-
* @memberof View
|
2070
|
-
* @instance
|
2071
1617
|
* @example
|
2072
1618
|
* View:
|
2073
1619
|
* ```js
|
@@ -2095,15 +1641,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2095
1641
|
* navigate().then(() => console.log('Navigate to tutorial')).catch(err => console.log(err));
|
2096
1642
|
* ```
|
2097
1643
|
* @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}.
|
2098
1648
|
*/
|
2099
1649
|
navigate(url) {
|
2100
1650
|
return this.wire.sendAction('navigate-window', { ...this.identity, url }).then(() => undefined);
|
2101
1651
|
}
|
2102
1652
|
/**
|
2103
1653
|
* Navigates the WebContents back one page.
|
2104
|
-
* @function navigateBack
|
2105
|
-
* @memberOf View
|
2106
|
-
* @instance
|
2107
1654
|
*
|
2108
1655
|
* @example
|
2109
1656
|
* View:
|
@@ -2125,15 +1672,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2125
1672
|
* }
|
2126
1673
|
* navigateBack().then(() => console.log('Navigated back')).catch(err => console.log(err));
|
2127
1674
|
* ```
|
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}.
|
2128
1679
|
*/
|
2129
1680
|
navigateBack() {
|
2130
1681
|
return this.wire.sendAction('navigate-window-back', { ...this.identity }).then(() => undefined);
|
2131
1682
|
}
|
2132
1683
|
/**
|
2133
1684
|
* Navigates the WebContents forward one page.
|
2134
|
-
* @function navigateForward
|
2135
|
-
* @memberOf View
|
2136
|
-
* @instance
|
2137
1685
|
*
|
2138
1686
|
* @example
|
2139
1687
|
* View:
|
@@ -2157,15 +1705,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2157
1705
|
* }
|
2158
1706
|
* navigateForward().then(() => console.log('Navigated forward')).catch(err => console.log(err));
|
2159
1707
|
* ```
|
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}.
|
2160
1712
|
*/
|
2161
1713
|
async navigateForward() {
|
2162
1714
|
await this.wire.sendAction('navigate-window-forward', { ...this.identity });
|
2163
1715
|
}
|
2164
1716
|
/**
|
2165
1717
|
* Stops any current navigation the WebContents is performing.
|
2166
|
-
* @function stopNavigation
|
2167
|
-
* @memberOf View
|
2168
|
-
* @instance
|
2169
1718
|
*
|
2170
1719
|
* @example
|
2171
1720
|
* View:
|
@@ -2187,15 +1736,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2187
1736
|
* }
|
2188
1737
|
* stopNavigation().then(() => console.log('you shall not navigate')).catch(err => console.log(err));
|
2189
1738
|
* ```
|
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}.
|
2190
1743
|
*/
|
2191
1744
|
stopNavigation() {
|
2192
1745
|
return this.wire.sendAction('stop-window-navigation', { ...this.identity }).then(() => undefined);
|
2193
1746
|
}
|
2194
1747
|
/**
|
2195
1748
|
* Reloads the WebContents
|
2196
|
-
* @function reload
|
2197
|
-
* @memberOf View
|
2198
|
-
* @instance
|
2199
1749
|
*
|
2200
1750
|
* @example
|
2201
1751
|
* View:
|
@@ -2227,6 +1777,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2227
1777
|
* console.log('Reloaded window')
|
2228
1778
|
* }).catch(err => console.log(err));
|
2229
1779
|
* ```
|
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}.
|
2230
1784
|
*/
|
2231
1785
|
reload(ignoreCache = false) {
|
2232
1786
|
return this.wire
|
@@ -2239,11 +1793,8 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2239
1793
|
/**
|
2240
1794
|
* Prints the WebContents.
|
2241
1795
|
* @param options Printer Options
|
2242
|
-
* @function print
|
2243
|
-
* @memberOf View
|
2244
|
-
* @instance
|
2245
1796
|
*
|
2246
|
-
*
|
1797
|
+
* Note: When `silent` is set to `true`, the API will pick the system's default printer if deviceName
|
2247
1798
|
* is empty and the default settings for printing.
|
2248
1799
|
*
|
2249
1800
|
* Use the CSS style `page-break-before: always;` to force print to a new page.
|
@@ -2256,6 +1807,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2256
1807
|
* console.log('print call has been sent to the system');
|
2257
1808
|
* });
|
2258
1809
|
* ```
|
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}.
|
2259
1814
|
*/
|
2260
1815
|
print(options = {}) {
|
2261
1816
|
return this.wire.sendAction('print', { ...this.identity, options }).then(() => undefined);
|
@@ -2264,11 +1819,8 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2264
1819
|
* Find and highlight text on a page.
|
2265
1820
|
* @param searchTerm Term to find in page
|
2266
1821
|
* @param options Search options
|
2267
|
-
* @function findInPage
|
2268
|
-
* @memberOf View
|
2269
|
-
* @instance
|
2270
1822
|
*
|
2271
|
-
*
|
1823
|
+
* Note: By default, each subsequent call will highlight the next text that matches the search term.
|
2272
1824
|
*
|
2273
1825
|
* Returns a promise with the results for the request. By subscribing to the
|
2274
1826
|
* found-in-page event, you can get the results of this call as well.
|
@@ -2303,6 +1855,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2303
1855
|
* console.log(result)
|
2304
1856
|
* });
|
2305
1857
|
* ```
|
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}.
|
2306
1862
|
*/
|
2307
1863
|
findInPage(searchTerm, options) {
|
2308
1864
|
return this.wire
|
@@ -2346,6 +1902,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2346
1902
|
* console.log(results);
|
2347
1903
|
* });
|
2348
1904
|
* ```
|
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}.
|
2349
1909
|
*/
|
2350
1910
|
stopFindInPage(action) {
|
2351
1911
|
return this.wire.sendAction('stop-find-in-page', { ...this.identity, action }).then(() => undefined);
|
@@ -2353,9 +1913,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2353
1913
|
/**
|
2354
1914
|
* Returns an array with all system printers
|
2355
1915
|
* @deprecated use System.getPrinters instead
|
2356
|
-
* @function getPrinters
|
2357
|
-
* @memberOf View
|
2358
|
-
* @instance
|
2359
1916
|
*
|
2360
1917
|
* @example
|
2361
1918
|
* View:
|
@@ -2391,6 +1948,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2391
1948
|
* console.log(err);
|
2392
1949
|
* });
|
2393
1950
|
* ```
|
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}.
|
2394
1955
|
*/
|
2395
1956
|
getPrinters() {
|
2396
1957
|
return this.wire.sendAction('get-printers', { ...this.identity }).then(({ payload }) => payload.data);
|
@@ -2398,10 +1959,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2398
1959
|
/**
|
2399
1960
|
* Gives focus to the WebContents.
|
2400
1961
|
*
|
2401
|
-
* @function focus
|
2402
|
-
* @emits focused
|
2403
|
-
* @memberOf Window
|
2404
|
-
* @instance
|
2405
1962
|
* @example
|
2406
1963
|
* ```js
|
2407
1964
|
* async function focusWindow() {
|
@@ -2417,15 +1974,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2417
1974
|
*
|
2418
1975
|
* focusWindow().then(() => console.log('Window focused')).catch(err => console.log(err));
|
2419
1976
|
* ```
|
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}.
|
2420
1981
|
*/
|
2421
1982
|
async focus({ emitSynthFocused } = { emitSynthFocused: true }) {
|
2422
1983
|
await this.wire.sendAction('focus-window', { emitSynthFocused, ...this.identity });
|
2423
1984
|
}
|
2424
1985
|
/**
|
2425
1986
|
* Shows the Chromium Developer Tools
|
2426
|
-
* @function showDeveloperTools
|
2427
|
-
* @memberOf View
|
2428
|
-
* @instance
|
2429
1987
|
*
|
2430
1988
|
* @example
|
2431
1989
|
* View:
|
@@ -2451,6 +2009,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2451
2009
|
* .then(() => console.log('Showing dev tools'))
|
2452
2010
|
* .catch(err => console.error(err));
|
2453
2011
|
* ```
|
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}.
|
2454
2016
|
*/
|
2455
2017
|
async showDeveloperTools() {
|
2456
2018
|
// Note this hits the system action map in core state for legacy reasons.
|
@@ -2459,11 +2021,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2459
2021
|
/**
|
2460
2022
|
* Retrieves the process information associated with a WebContents.
|
2461
2023
|
*
|
2462
|
-
*
|
2463
|
-
*
|
2464
|
-
* @function getProcessInfo
|
2465
|
-
* @memberOf View
|
2466
|
-
* @instance
|
2024
|
+
* Note: This includes any iframes associated with the WebContents
|
2467
2025
|
*
|
2468
2026
|
* @example
|
2469
2027
|
* View:
|
@@ -2477,6 +2035,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2477
2035
|
* const win = await fin.Window.getCurrent();
|
2478
2036
|
* const processInfo = await win.getProcessInfo();
|
2479
2037
|
* ```
|
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}.
|
2480
2042
|
*/
|
2481
2043
|
async getProcessInfo() {
|
2482
2044
|
const { payload: { data } } = await this.wire.sendAction('get-process-info', this.identity);
|
@@ -2484,9 +2046,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2484
2046
|
}
|
2485
2047
|
/**
|
2486
2048
|
* Retrieves information on all Shared Workers.
|
2487
|
-
* @function getSharedWorkers
|
2488
|
-
* @memberOf View
|
2489
|
-
* @instance
|
2490
2049
|
*
|
2491
2050
|
* @example
|
2492
2051
|
* View:
|
@@ -2515,15 +2074,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2515
2074
|
* const win = await fin.Window.create(winOption);
|
2516
2075
|
* const sharedWorkers = await win.getSharedWorkers();
|
2517
2076
|
* ```
|
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}.
|
2518
2081
|
*/
|
2519
2082
|
async getSharedWorkers() {
|
2520
2083
|
return this.wire.sendAction('get-shared-workers', this.identity).then(({ payload }) => payload.data);
|
2521
2084
|
}
|
2522
2085
|
/**
|
2523
2086
|
* Opens the developer tools for the shared worker context.
|
2524
|
-
* @function inspectSharedWorker
|
2525
|
-
* @memberOf View
|
2526
|
-
* @instance
|
2527
2087
|
*
|
2528
2088
|
* @example
|
2529
2089
|
* View:
|
@@ -2552,6 +2112,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2552
2112
|
* const win = await fin.Window.create(winOption);
|
2553
2113
|
* await win.inspectSharedWorker();
|
2554
2114
|
* ```
|
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}.
|
2555
2119
|
*/
|
2556
2120
|
async inspectSharedWorker() {
|
2557
2121
|
await this.wire.sendAction('inspect-shared-worker', { ...this.identity });
|
@@ -2559,9 +2123,6 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2559
2123
|
/**
|
2560
2124
|
* Inspects the shared worker based on its ID.
|
2561
2125
|
* @param workerId - The id of the shared worker.
|
2562
|
-
* @function inspectSharedWorkerById
|
2563
|
-
* @memberOf View
|
2564
|
-
* @instance
|
2565
2126
|
*
|
2566
2127
|
* @example
|
2567
2128
|
* View:
|
@@ -2592,15 +2153,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2592
2153
|
* const sharedWorkers = await win.getSharedWorkers();
|
2593
2154
|
* await win.inspectSharedWorkerById(sharedWorkers[0].id);
|
2594
2155
|
* ```
|
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}.
|
2595
2160
|
*/
|
2596
2161
|
async inspectSharedWorkerById(workerId) {
|
2597
2162
|
await this.wire.sendAction('inspect-shared-worker-by-id', { ...this.identity, workerId });
|
2598
2163
|
}
|
2599
2164
|
/**
|
2600
2165
|
* Opens the developer tools for the service worker context.
|
2601
|
-
* @function inspectServiceWorker
|
2602
|
-
* @memberOf View
|
2603
|
-
* @instance
|
2604
2166
|
*
|
2605
2167
|
* @example
|
2606
2168
|
* View:
|
@@ -2629,6 +2191,10 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2629
2191
|
* const win = await fin.Window.create(winOption);
|
2630
2192
|
* await win.inspectServiceWorker();
|
2631
2193
|
* ```
|
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}.
|
2632
2198
|
*/
|
2633
2199
|
async inspectServiceWorker() {
|
2634
2200
|
await this.wire.sendAction('inspect-service-worker', { ...this.identity });
|
@@ -2636,7 +2202,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2636
2202
|
/**
|
2637
2203
|
* Shows a popup window.
|
2638
2204
|
*
|
2639
|
-
*
|
2205
|
+
* Note: If this WebContents is a view and its attached window has a popup open, this will close it.
|
2640
2206
|
*
|
2641
2207
|
* Shows a popup window. Including a `name` in `options` will attempt to show an existing window as a popup, if
|
2642
2208
|
* that window doesn't exist or no `name` is included a window will be created. If the caller view or the caller
|
@@ -2644,7 +2210,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2644
2210
|
* open popup window before showing the new popup window. Also, if the caller view is destroyed or detached, the popup
|
2645
2211
|
* will be dismissed.
|
2646
2212
|
*
|
2647
|
-
*
|
2213
|
+
* 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.
|
2648
2214
|
*
|
2649
2215
|
* @example
|
2650
2216
|
*
|
@@ -2839,17 +2405,16 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2839
2405
|
* onPopupReady: popupWindowCallback;
|
2840
2406
|
* });
|
2841
2407
|
* ```
|
2842
|
-
* @
|
2843
|
-
* @
|
2844
|
-
*
|
2845
|
-
* @
|
2846
|
-
*
|
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}.
|
2847
2412
|
*/
|
2848
2413
|
async showPopupWindow(options) {
|
2849
2414
|
this.wire.sendAction(`${this.entityType}-show-popup-window`, this.identity).catch(() => {
|
2850
2415
|
// we do not want to expose this error, just continue if this analytics-only call fails
|
2851
2416
|
});
|
2852
|
-
if (options
|
2417
|
+
if (options?.onPopupReady) {
|
2853
2418
|
const readyListener = async ({ popupName }) => {
|
2854
2419
|
try {
|
2855
2420
|
const popupWindow = this.fin.Window.wrapSync({ uuid: this.fin.me.uuid, name: popupName });
|
@@ -2868,8 +2433,8 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2868
2433
|
...options,
|
2869
2434
|
// Internal use only.
|
2870
2435
|
// @ts-expect-error
|
2871
|
-
hasResultCallback: !!
|
2872
|
-
hasReadyCallback: !!
|
2436
|
+
hasResultCallback: !!options?.onPopupResult,
|
2437
|
+
hasReadyCallback: !!options?.onPopupReady
|
2873
2438
|
},
|
2874
2439
|
...this.identity
|
2875
2440
|
});
|
@@ -2894,7 +2459,7 @@ class WebContents extends base_1$k.EmitterBase {
|
|
2894
2459
|
}
|
2895
2460
|
return popupResult;
|
2896
2461
|
};
|
2897
|
-
if (options
|
2462
|
+
if (options?.onPopupResult) {
|
2898
2463
|
const dispatchResultListener = async (payload) => {
|
2899
2464
|
await options.onPopupResult(normalizePopupResult(payload));
|
2900
2465
|
};
|
@@ -3220,6 +2785,49 @@ function requireInstance$2 () {
|
|
3220
2785
|
this.show = async () => {
|
3221
2786
|
await this.wire.sendAction('show-view', { ...this.identity });
|
3222
2787
|
};
|
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
|
+
};
|
3223
2831
|
/**
|
3224
2832
|
* Hides the current view if it is currently visible.
|
3225
2833
|
*
|
@@ -3379,8 +2987,11 @@ function requireInstance$2 () {
|
|
3379
2987
|
this.wire.sendAction('view-get-parent-layout', { ...this.identity }).catch(() => {
|
3380
2988
|
// don't expose
|
3381
2989
|
});
|
3382
|
-
const
|
3383
|
-
|
2990
|
+
const layoutWindow = await this.getCurrentWindow();
|
2991
|
+
const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
|
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);
|
3384
2995
|
};
|
3385
2996
|
/**
|
3386
2997
|
* Gets the View's options.
|
@@ -3420,7 +3031,6 @@ function requireInstance$2 () {
|
|
3420
3031
|
};
|
3421
3032
|
/**
|
3422
3033
|
* Updates the view's options.
|
3423
|
-
* @param options
|
3424
3034
|
*
|
3425
3035
|
* @example
|
3426
3036
|
* ```js
|
@@ -3461,7 +3071,6 @@ function requireInstance$2 () {
|
|
3461
3071
|
/**
|
3462
3072
|
* Retrieves the window the view is currently attached to.
|
3463
3073
|
*
|
3464
|
-
* @experimental
|
3465
3074
|
* @example
|
3466
3075
|
* ```js
|
3467
3076
|
* const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
|
@@ -3469,6 +3078,7 @@ function requireInstance$2 () {
|
|
3469
3078
|
* .then(win => console.log('current window', win))
|
3470
3079
|
* .catch(err => console.log(err));)
|
3471
3080
|
* ```
|
3081
|
+
* @experimental
|
3472
3082
|
*/
|
3473
3083
|
this.getCurrentWindow = async () => {
|
3474
3084
|
const { payload: { data } } = await this.wire.sendAction('get-view-window', { ...this.identity });
|
@@ -3574,10 +3184,6 @@ function requireInstance$2 () {
|
|
3574
3184
|
/**
|
3575
3185
|
* Focuses the view
|
3576
3186
|
*
|
3577
|
-
* @function focus
|
3578
|
-
* @memberof View
|
3579
|
-
* @emits focused
|
3580
|
-
* @instance
|
3581
3187
|
* @example
|
3582
3188
|
* ```js
|
3583
3189
|
* const view = fin.View.wrapSync({ uuid: 'viewUuid', name: 'viewName' });
|
@@ -3600,7 +3206,7 @@ function requireInstance$2 () {
|
|
3600
3206
|
var hasRequiredView;
|
3601
3207
|
|
3602
3208
|
function requireView () {
|
3603
|
-
if (hasRequiredView) return view;
|
3209
|
+
if (hasRequiredView) return view$1;
|
3604
3210
|
hasRequiredView = 1;
|
3605
3211
|
(function (exports) {
|
3606
3212
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -3619,19 +3225,20 @@ function requireView () {
|
|
3619
3225
|
};
|
3620
3226
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3621
3227
|
/**
|
3622
|
-
* Entry
|
3228
|
+
* Entry points for the OpenFin `View` API (`fin.View`).
|
3229
|
+
*
|
3230
|
+
* * {@link ViewModule} contains static members of the `View` API, accessible through `fin.View`.
|
3231
|
+
* * {@link View} describes an instance of an OpenFin View, e.g. as returned by `fin.View.getCurrent`.
|
3623
3232
|
*
|
3624
|
-
*
|
3625
|
-
*
|
3626
|
-
* instances of the OpenFin `View` class.
|
3233
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
3234
|
+
* both of these were documented on the same page.
|
3627
3235
|
*
|
3628
3236
|
* @packageDocumentation
|
3629
3237
|
*/
|
3630
|
-
|
3631
|
-
exports
|
3632
|
-
|
3633
|
-
|
3634
|
-
return view;
|
3238
|
+
__exportStar(requireFactory$3(), exports);
|
3239
|
+
__exportStar(requireInstance$2(), exports);
|
3240
|
+
} (view$1));
|
3241
|
+
return view$1;
|
3635
3242
|
}
|
3636
3243
|
|
3637
3244
|
var hasRequiredInstance$1;
|
@@ -3642,7 +3249,7 @@ function requireInstance$1 () {
|
|
3642
3249
|
Object.defineProperty(Instance$6, "__esModule", { value: true });
|
3643
3250
|
Instance$6.Application = void 0;
|
3644
3251
|
/* eslint-disable import/prefer-default-export */
|
3645
|
-
const base_1 = base;
|
3252
|
+
const base_1 = base$1;
|
3646
3253
|
const window_1 = requireWindow();
|
3647
3254
|
const view_1 = requireView();
|
3648
3255
|
/**
|
@@ -4117,6 +3724,7 @@ function requireInstance$1 () {
|
|
4117
3724
|
/**
|
4118
3725
|
* Sets or removes a custom JumpList for the application. Only applicable in Windows OS.
|
4119
3726
|
* 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
|
+
*
|
4120
3728
|
* Note: If the "name" property is omitted it defaults to "tasks".
|
4121
3729
|
* @param jumpListCategories An array of JumpList Categories to populate. If null, remove any existing JumpList configuration and set to Windows default.
|
4122
3730
|
*
|
@@ -4417,6 +4025,7 @@ function requireInstance$1 () {
|
|
4417
4025
|
}
|
4418
4026
|
/**
|
4419
4027
|
* Sets file auto download location. It's only allowed in the same application.
|
4028
|
+
*
|
4420
4029
|
* Note: This method is restricted by default and must be enabled via
|
4421
4030
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
4422
4031
|
* @param downloadLocation file auto download location
|
@@ -4442,6 +4051,7 @@ function requireInstance$1 () {
|
|
4442
4051
|
}
|
4443
4052
|
/**
|
4444
4053
|
* 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
|
+
*
|
4445
4055
|
* Note: This method is restricted by default and must be enabled via
|
4446
4056
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
4447
4057
|
*
|
@@ -4468,13 +4078,16 @@ function requireFactory$2 () {
|
|
4468
4078
|
if (hasRequiredFactory$2) return Factory$7;
|
4469
4079
|
hasRequiredFactory$2 = 1;
|
4470
4080
|
Object.defineProperty(Factory$7, "__esModule", { value: true });
|
4471
|
-
|
4081
|
+
Factory$7.ApplicationModule = void 0;
|
4082
|
+
const base_1 = base$1;
|
4472
4083
|
const validate_1 = validate;
|
4473
4084
|
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
|
+
*/
|
4474
4088
|
class ApplicationModule extends base_1.Base {
|
4475
4089
|
/**
|
4476
4090
|
* Asynchronously returns an Application object that represents an existing application.
|
4477
|
-
* @param identity
|
4478
4091
|
*
|
4479
4092
|
* @example
|
4480
4093
|
*
|
@@ -4485,7 +4098,6 @@ function requireFactory$2 () {
|
|
4485
4098
|
* .catch(err => console.log(err));
|
4486
4099
|
* ```
|
4487
4100
|
*
|
4488
|
-
* @static
|
4489
4101
|
*/
|
4490
4102
|
async wrap(identity) {
|
4491
4103
|
this.wire.sendAction('wrap-application').catch((e) => {
|
@@ -4499,7 +4111,6 @@ function requireFactory$2 () {
|
|
4499
4111
|
}
|
4500
4112
|
/**
|
4501
4113
|
* Synchronously returns an Application object that represents an existing application.
|
4502
|
-
* @param identity
|
4503
4114
|
*
|
4504
4115
|
* @example
|
4505
4116
|
*
|
@@ -4508,7 +4119,6 @@ function requireFactory$2 () {
|
|
4508
4119
|
* await app.close();
|
4509
4120
|
* ```
|
4510
4121
|
*
|
4511
|
-
* @static
|
4512
4122
|
*/
|
4513
4123
|
wrapSync(identity) {
|
4514
4124
|
this.wire.sendAction('wrap-application-sync').catch((e) => {
|
@@ -4533,8 +4143,6 @@ function requireFactory$2 () {
|
|
4533
4143
|
}
|
4534
4144
|
/**
|
4535
4145
|
* DEPRECATED method to create a new Application. Use {@link Application.ApplicationModule.start Application.start} instead.
|
4536
|
-
* @param appOptions
|
4537
|
-
*
|
4538
4146
|
*
|
4539
4147
|
* @example
|
4540
4148
|
*
|
@@ -4563,7 +4171,6 @@ function requireFactory$2 () {
|
|
4563
4171
|
}
|
4564
4172
|
/**
|
4565
4173
|
* Creates and starts a new Application.
|
4566
|
-
* @param appOptions
|
4567
4174
|
*
|
4568
4175
|
* @example
|
4569
4176
|
*
|
@@ -4579,8 +4186,6 @@ function requireFactory$2 () {
|
|
4579
4186
|
* start().then(() => console.log('Application is running')).catch(err => console.log(err));
|
4580
4187
|
* ```
|
4581
4188
|
*
|
4582
|
-
*
|
4583
|
-
* @static
|
4584
4189
|
*/
|
4585
4190
|
async start(appOptions) {
|
4586
4191
|
this.wire.sendAction('start-application').catch((e) => {
|
@@ -4593,10 +4198,8 @@ function requireFactory$2 () {
|
|
4593
4198
|
/**
|
4594
4199
|
* Asynchronously starts a batch of applications given an array of application identifiers and manifestUrls.
|
4595
4200
|
* Returns once the RVM is finished attempting to launch the applications.
|
4596
|
-
* @param applications
|
4597
4201
|
* @param opts - Parameters that the RVM will use.
|
4598
4202
|
*
|
4599
|
-
* @static
|
4600
4203
|
* @example
|
4601
4204
|
*
|
4602
4205
|
* ```js
|
@@ -4648,8 +4251,6 @@ function requireFactory$2 () {
|
|
4648
4251
|
* });
|
4649
4252
|
*
|
4650
4253
|
* ```
|
4651
|
-
*
|
4652
|
-
* @static
|
4653
4254
|
*/
|
4654
4255
|
getCurrent() {
|
4655
4256
|
this.wire.sendAction('get-current-application').catch((e) => {
|
@@ -4675,8 +4276,6 @@ function requireFactory$2 () {
|
|
4675
4276
|
* });
|
4676
4277
|
*
|
4677
4278
|
* ```
|
4678
|
-
*
|
4679
|
-
* @static
|
4680
4279
|
*/
|
4681
4280
|
getCurrentSync() {
|
4682
4281
|
this.wire.sendAction('get-current-application-sync').catch((e) => {
|
@@ -4697,8 +4296,6 @@ function requireFactory$2 () {
|
|
4697
4296
|
* // For a local manifest file:
|
4698
4297
|
* fin.Application.startFromManifest('file:///C:/somefolder/app.json').then(app => console.log('App is running')).catch(err => console.log(err));
|
4699
4298
|
* ```
|
4700
|
-
*
|
4701
|
-
* @static
|
4702
4299
|
*/
|
4703
4300
|
async startFromManifest(manifestUrl, opts) {
|
4704
4301
|
this.wire.sendAction('application-start-from-manifest').catch((e) => {
|
@@ -4743,14 +4340,14 @@ function requireFactory$2 () {
|
|
4743
4340
|
});
|
4744
4341
|
}
|
4745
4342
|
}
|
4746
|
-
Factory$7.
|
4343
|
+
Factory$7.ApplicationModule = ApplicationModule;
|
4747
4344
|
return Factory$7;
|
4748
4345
|
}
|
4749
4346
|
|
4750
4347
|
var hasRequiredApplication;
|
4751
4348
|
|
4752
4349
|
function requireApplication () {
|
4753
|
-
if (hasRequiredApplication) return application;
|
4350
|
+
if (hasRequiredApplication) return application$1;
|
4754
4351
|
hasRequiredApplication = 1;
|
4755
4352
|
(function (exports) {
|
4756
4353
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -4769,19 +4366,20 @@ function requireApplication () {
|
|
4769
4366
|
};
|
4770
4367
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4771
4368
|
/**
|
4772
|
-
* Entry
|
4369
|
+
* Entry points for the OpenFin `Application` API (`fin.Application`).
|
4370
|
+
*
|
4371
|
+
* * {@link ApplicationModule} contains static members of the `Application` API, accessible through `fin.Application`.
|
4372
|
+
* * {@link Application} describes an instance of an OpenFin Application, e.g. as returned by `fin.Application.getCurrent`.
|
4773
4373
|
*
|
4774
|
-
*
|
4775
|
-
*
|
4776
|
-
* instances of the OpenFin `Application` class.
|
4374
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
4375
|
+
* both of these were documented on the same page.
|
4777
4376
|
*
|
4778
4377
|
* @packageDocumentation
|
4779
4378
|
*/
|
4780
|
-
|
4781
|
-
__exportStar(requireInstance$1(), exports);
|
4782
|
-
|
4783
|
-
|
4784
|
-
return application;
|
4379
|
+
__exportStar(requireFactory$2(), exports);
|
4380
|
+
__exportStar(requireInstance$1(), exports);
|
4381
|
+
} (application$1));
|
4382
|
+
return application$1;
|
4785
4383
|
}
|
4786
4384
|
|
4787
4385
|
var hasRequiredInstance;
|
@@ -4798,6 +4396,7 @@ function requireInstance () {
|
|
4798
4396
|
const application_1 = requireApplication();
|
4799
4397
|
const main_1 = main;
|
4800
4398
|
const view_1 = requireView();
|
4399
|
+
const warnings_1 = warnings;
|
4801
4400
|
/**
|
4802
4401
|
* @PORTED
|
4803
4402
|
* @typedef { object } Margins
|
@@ -5282,7 +4881,6 @@ function requireInstance () {
|
|
5282
4881
|
*/
|
5283
4882
|
constructor(wire, identity) {
|
5284
4883
|
super(wire, identity, 'window');
|
5285
|
-
this.identity = identity;
|
5286
4884
|
}
|
5287
4885
|
/**
|
5288
4886
|
* Adds a listener to the end of the listeners array for the specified event.
|
@@ -5408,6 +5006,7 @@ function requireInstance () {
|
|
5408
5006
|
if (options.autoShow === undefined) {
|
5409
5007
|
options.autoShow = true;
|
5410
5008
|
}
|
5009
|
+
(0, warnings_1.handleDeprecatedWarnings)(options);
|
5411
5010
|
const windowCreation = this.wire.environment.createChildContent({ entityType: 'window', options });
|
5412
5011
|
Promise.all([pageResponse, windowCreation])
|
5413
5012
|
.then((resolvedArr) => {
|
@@ -5824,15 +5423,15 @@ function requireInstance () {
|
|
5824
5423
|
* ```
|
5825
5424
|
* @experimental
|
5826
5425
|
*/
|
5827
|
-
async getLayout() {
|
5426
|
+
async getLayout(layoutIdentity) {
|
5828
5427
|
this.wire.sendAction('window-get-layout', this.identity).catch((e) => {
|
5829
5428
|
// don't expose
|
5830
5429
|
});
|
5831
5430
|
const opts = await this.getOptions();
|
5832
|
-
if (!opts.layout) {
|
5431
|
+
if (!opts.layout /* TODO || !opts.layoutSnapshot */) {
|
5833
5432
|
throw new Error('Window does not have a Layout');
|
5834
5433
|
}
|
5835
|
-
return this.fin.Platform.Layout.wrap(this.identity);
|
5434
|
+
return this.fin.Platform.Layout.wrap(layoutIdentity ?? this.identity);
|
5836
5435
|
}
|
5837
5436
|
/**
|
5838
5437
|
* Gets the current settings of the window.
|
@@ -6113,11 +5712,12 @@ function requireInstance () {
|
|
6113
5712
|
* moveBy(580, 300).then(() => console.log('Moved')).catch(err => console.log(err));
|
6114
5713
|
* ```
|
6115
5714
|
*/
|
6116
|
-
moveBy(deltaLeft, deltaTop) {
|
5715
|
+
moveBy(deltaLeft, deltaTop, positioningOptions) {
|
6117
5716
|
return this.wire
|
6118
5717
|
.sendAction('move-window-by', {
|
6119
5718
|
deltaLeft,
|
6120
5719
|
deltaTop,
|
5720
|
+
positioningOptions,
|
6121
5721
|
...this.identity
|
6122
5722
|
})
|
6123
5723
|
.then(() => undefined);
|
@@ -6147,11 +5747,12 @@ function requireInstance () {
|
|
6147
5747
|
* moveTo(580, 300).then(() => console.log('Moved')).catch(err => console.log(err))
|
6148
5748
|
* ```
|
6149
5749
|
*/
|
6150
|
-
moveTo(left, top) {
|
5750
|
+
moveTo(left, top, positioningOptions) {
|
6151
5751
|
return this.wire
|
6152
5752
|
.sendAction('move-window', {
|
6153
5753
|
left,
|
6154
5754
|
top,
|
5755
|
+
positioningOptions,
|
6155
5756
|
...this.identity
|
6156
5757
|
})
|
6157
5758
|
.then(() => undefined);
|
@@ -6184,12 +5785,13 @@ function requireInstance () {
|
|
6184
5785
|
* resizeBy(580, 300, 'top-right').then(() => console.log('Resized')).catch(err => console.log(err));
|
6185
5786
|
* ```
|
6186
5787
|
*/
|
6187
|
-
resizeBy(deltaWidth, deltaHeight, anchor) {
|
5788
|
+
resizeBy(deltaWidth, deltaHeight, anchor, positioningOptions) {
|
6188
5789
|
return this.wire
|
6189
5790
|
.sendAction('resize-window-by', {
|
6190
5791
|
deltaWidth: Math.floor(deltaWidth),
|
6191
5792
|
deltaHeight: Math.floor(deltaHeight),
|
6192
5793
|
anchor,
|
5794
|
+
positioningOptions,
|
6193
5795
|
...this.identity
|
6194
5796
|
})
|
6195
5797
|
.then(() => undefined);
|
@@ -6222,12 +5824,13 @@ function requireInstance () {
|
|
6222
5824
|
* resizeTo(580, 300, 'top-left').then(() => console.log('Resized')).catch(err => console.log(err));
|
6223
5825
|
* ```
|
6224
5826
|
*/
|
6225
|
-
resizeTo(width, height, anchor) {
|
5827
|
+
resizeTo(width, height, anchor, positioningOptions) {
|
6226
5828
|
return this.wire
|
6227
5829
|
.sendAction('resize-window', {
|
6228
5830
|
width: Math.floor(width),
|
6229
5831
|
height: Math.floor(height),
|
6230
5832
|
anchor,
|
5833
|
+
positioningOptions,
|
6231
5834
|
...this.identity
|
6232
5835
|
})
|
6233
5836
|
.then(() => undefined);
|
@@ -6286,7 +5889,6 @@ function requireInstance () {
|
|
6286
5889
|
}
|
6287
5890
|
/**
|
6288
5891
|
* Sets the window's size and position.
|
6289
|
-
* @property { Bounds } bounds This is a * @type {string} name - name of the window.object that holds the propertys of
|
6290
5892
|
*
|
6291
5893
|
* @example
|
6292
5894
|
* ```js
|
@@ -6313,8 +5915,10 @@ function requireInstance () {
|
|
6313
5915
|
* }).then(() => console.log('Bounds set to window')).catch(err => console.log(err));
|
6314
5916
|
* ```
|
6315
5917
|
*/
|
6316
|
-
setBounds(bounds) {
|
6317
|
-
return this.wire
|
5918
|
+
setBounds(bounds, positioningOptions) {
|
5919
|
+
return this.wire
|
5920
|
+
.sendAction('set-window-bounds', { ...bounds, ...this.identity, positioningOptions })
|
5921
|
+
.then(() => undefined);
|
6318
5922
|
}
|
6319
5923
|
/**
|
6320
5924
|
* Shows the window if it is hidden.
|
@@ -6456,7 +6060,10 @@ function requireInstance () {
|
|
6456
6060
|
* Calling this method will close previously opened menus.
|
6457
6061
|
* @experimental
|
6458
6062
|
* @param options
|
6459
|
-
*
|
6063
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
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.
|
6460
6067
|
* @example
|
6461
6068
|
* This could be used to show a drop down menu over views in a platform window:
|
6462
6069
|
* ```js
|
@@ -6546,6 +6153,7 @@ function requireInstance () {
|
|
6546
6153
|
return this.wire.sendAction('close-popup-menu', { ...this.identity }).then(() => undefined);
|
6547
6154
|
}
|
6548
6155
|
/**
|
6156
|
+
* @PORTED
|
6549
6157
|
* @typedef {object} PopupOptions
|
6550
6158
|
* @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.
|
6551
6159
|
* @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
|
@@ -6563,6 +6171,7 @@ function requireInstance () {
|
|
6563
6171
|
* @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.
|
6564
6172
|
*/
|
6565
6173
|
/**
|
6174
|
+
* @PORTED
|
6566
6175
|
* @typedef {object} PopupResult
|
6567
6176
|
* @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
|
6568
6177
|
* @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
|
@@ -6652,13 +6261,16 @@ function requireFactory$1 () {
|
|
6652
6261
|
if (hasRequiredFactory$1) return Factory$8;
|
6653
6262
|
hasRequiredFactory$1 = 1;
|
6654
6263
|
Object.defineProperty(Factory$8, "__esModule", { value: true });
|
6655
|
-
|
6264
|
+
Factory$8._WindowModule = void 0;
|
6265
|
+
const base_1 = base$1;
|
6656
6266
|
const validate_1 = validate;
|
6657
6267
|
const Instance_1 = requireInstance();
|
6268
|
+
/**
|
6269
|
+
* Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
|
6270
|
+
*/
|
6658
6271
|
class _WindowModule extends base_1.Base {
|
6659
6272
|
/**
|
6660
6273
|
* Asynchronously returns a Window object that represents an existing window.
|
6661
|
-
* @param identity
|
6662
6274
|
*
|
6663
6275
|
* @example
|
6664
6276
|
* ```js
|
@@ -6675,7 +6287,6 @@ function requireFactory$1 () {
|
|
6675
6287
|
* .then(win => console.log('wrapped window'))
|
6676
6288
|
* .catch(err => console.log(err));
|
6677
6289
|
* ```
|
6678
|
-
* @static
|
6679
6290
|
*/
|
6680
6291
|
async wrap(identity) {
|
6681
6292
|
this.wire.sendAction('window-wrap').catch((e) => {
|
@@ -6689,7 +6300,6 @@ function requireFactory$1 () {
|
|
6689
6300
|
}
|
6690
6301
|
/**
|
6691
6302
|
* Synchronously returns a Window object that represents an existing window.
|
6692
|
-
* @param identity
|
6693
6303
|
*
|
6694
6304
|
* @example
|
6695
6305
|
* ```js
|
@@ -6705,7 +6315,6 @@ function requireFactory$1 () {
|
|
6705
6315
|
* await createWin();
|
6706
6316
|
* let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
|
6707
6317
|
* ```
|
6708
|
-
* @static
|
6709
6318
|
*/
|
6710
6319
|
wrapSync(identity) {
|
6711
6320
|
this.wire.sendAction('window-wrap-sync').catch((e) => {
|
@@ -6737,7 +6346,6 @@ function requireFactory$1 () {
|
|
6737
6346
|
*
|
6738
6347
|
* createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
|
6739
6348
|
* ```
|
6740
|
-
* @static
|
6741
6349
|
*/
|
6742
6350
|
create(options) {
|
6743
6351
|
this.wire.sendAction('create-window').catch((e) => {
|
@@ -6756,7 +6364,6 @@ function requireFactory$1 () {
|
|
6756
6364
|
* .catch(err => console.log(err));
|
6757
6365
|
*
|
6758
6366
|
* ```
|
6759
|
-
* @static
|
6760
6367
|
*/
|
6761
6368
|
getCurrent() {
|
6762
6369
|
this.wire.sendAction('get-current-window').catch((e) => {
|
@@ -6778,7 +6385,6 @@ function requireFactory$1 () {
|
|
6778
6385
|
* console.log(info);
|
6779
6386
|
*
|
6780
6387
|
* ```
|
6781
|
-
* @static
|
6782
6388
|
*/
|
6783
6389
|
getCurrentSync() {
|
6784
6390
|
this.wire.sendAction('get-current-window-sync').catch((e) => {
|
@@ -6791,14 +6397,14 @@ function requireFactory$1 () {
|
|
6791
6397
|
return this.wrapSync({ uuid, name });
|
6792
6398
|
}
|
6793
6399
|
}
|
6794
|
-
Factory$8.
|
6400
|
+
Factory$8._WindowModule = _WindowModule;
|
6795
6401
|
return Factory$8;
|
6796
6402
|
}
|
6797
6403
|
|
6798
6404
|
var hasRequiredWindow;
|
6799
6405
|
|
6800
6406
|
function requireWindow () {
|
6801
|
-
if (hasRequiredWindow) return window$
|
6407
|
+
if (hasRequiredWindow) return window$2;
|
6802
6408
|
hasRequiredWindow = 1;
|
6803
6409
|
(function (exports) {
|
6804
6410
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
@@ -6817,28 +6423,37 @@ function requireWindow () {
|
|
6817
6423
|
};
|
6818
6424
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6819
6425
|
/**
|
6820
|
-
* Entry
|
6426
|
+
* Entry points for the OpenFin `Window` API (`fin.Window`).
|
6427
|
+
*
|
6428
|
+
* * {@link _WindowModule} contains static members of the `Window` API, accessible through `fin.Window`.
|
6429
|
+
* * {@link _Window} describes an instance of an OpenFin Window, e.g. as returned by `fin.Window.getCurrent`.
|
6821
6430
|
*
|
6822
|
-
*
|
6823
|
-
*
|
6824
|
-
* instances of the OpenFin `Window` class.
|
6431
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
6432
|
+
* both of these were documented on the same page.
|
6825
6433
|
*
|
6826
|
-
*
|
6434
|
+
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
6827
6435
|
*
|
6828
6436
|
* @packageDocumentation
|
6829
6437
|
*/
|
6830
|
-
|
6831
|
-
exports
|
6832
|
-
|
6833
|
-
|
6834
|
-
return window$1;
|
6438
|
+
__exportStar(requireFactory$1(), exports);
|
6439
|
+
__exportStar(requireInstance(), exports);
|
6440
|
+
} (window$2));
|
6441
|
+
return window$2;
|
6835
6442
|
}
|
6836
6443
|
|
6837
|
-
|
6838
|
-
|
6444
|
+
/**
|
6445
|
+
* Entry point for the OpenFin `System` API (`fin.System`).
|
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;
|
6839
6454
|
const transport_errors_1$2 = transportErrors;
|
6840
6455
|
const window_1 = requireWindow();
|
6841
|
-
const events_1$6 =
|
6456
|
+
const events_1$6 = require$$0;
|
6842
6457
|
/**
|
6843
6458
|
* An object representing the core of OpenFin Runtime. Allows the developer
|
6844
6459
|
* to perform system-level actions, such as accessing logs, viewing processes,
|
@@ -7150,7 +6765,6 @@ class System extends base_1$j.EmitterBase {
|
|
7150
6765
|
* ```js
|
7151
6766
|
* fin.System.getUniqueUserId().then(id => console.log(id)).catch(err => console.log(err));
|
7152
6767
|
* ```
|
7153
|
-
* @static
|
7154
6768
|
*/
|
7155
6769
|
getUniqueUserId() {
|
7156
6770
|
return this.wire.sendAction('get-unique-user-id').then(({ payload }) => payload.data);
|
@@ -7841,7 +7455,8 @@ class System extends base_1$j.EmitterBase {
|
|
7841
7455
|
}
|
7842
7456
|
/**
|
7843
7457
|
* Attempt to close an external process. The process will be terminated if it
|
7844
|
-
* has not closed after the elapsed timeout in milliseconds
|
7458
|
+
* has not closed after the elapsed timeout in milliseconds.
|
7459
|
+
*
|
7845
7460
|
* Note: This method is restricted by default and must be enabled via
|
7846
7461
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
7847
7462
|
* @param options A object defined in the TerminateExternalRequestType interface
|
@@ -7877,7 +7492,8 @@ class System extends base_1$j.EmitterBase {
|
|
7877
7492
|
return this.wire.sendAction('update-proxy', options).then(() => undefined);
|
7878
7493
|
}
|
7879
7494
|
/**
|
7880
|
-
* Downloads the given application asset
|
7495
|
+
* Downloads the given application asset.
|
7496
|
+
*
|
7881
7497
|
* Note: This method is restricted by default and must be enabled via
|
7882
7498
|
* <a href="https://developers.openfin.co/docs/api-security">API security settings</a>.
|
7883
7499
|
* @param appAsset App asset object
|
@@ -8421,7 +8037,6 @@ class System extends base_1$j.EmitterBase {
|
|
8421
8037
|
* }
|
8422
8038
|
* });
|
8423
8039
|
* ```
|
8424
|
-
* @static
|
8425
8040
|
*/
|
8426
8041
|
async launchManifest(manifestUrl, opts = {}) {
|
8427
8042
|
const { subscribe, ..._sendOpts } = opts;
|
@@ -8681,7 +8296,7 @@ class System extends base_1$j.EmitterBase {
|
|
8681
8296
|
await this.wire.sendAction('set-domain-settings', { domainSettings, ...this.identity });
|
8682
8297
|
}
|
8683
8298
|
}
|
8684
|
-
system.
|
8299
|
+
system$1.System = System;
|
8685
8300
|
|
8686
8301
|
var interappbus = {};
|
8687
8302
|
|
@@ -8772,7 +8387,7 @@ class ChannelBase {
|
|
8772
8387
|
try {
|
8773
8388
|
const mainAction = this.subscriptions.has(topic)
|
8774
8389
|
? this.subscriptions.get(topic)
|
8775
|
-
: (currentPayload, id) =>
|
8390
|
+
: (currentPayload, id) => (this.defaultAction ?? ChannelBase.defaultAction)(topic, currentPayload, id);
|
8776
8391
|
const preActionProcessed = this.preAction ? await this.preAction(topic, payload, senderIdentity) : payload;
|
8777
8392
|
const actionProcessed = await mainAction(preActionProcessed, senderIdentity);
|
8778
8393
|
return this.postAction ? await this.postAction(topic, actionProcessed, senderIdentity) : actionProcessed;
|
@@ -9092,6 +8707,7 @@ var __classPrivateFieldSet$b = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
9092
8707
|
};
|
9093
8708
|
var _ChannelClient_protectedObj, _ChannelClient_strategy, _ChannelClient_close;
|
9094
8709
|
Object.defineProperty(client, "__esModule", { value: true });
|
8710
|
+
client.ChannelClient = void 0;
|
9095
8711
|
const channel_1$1 = channel;
|
9096
8712
|
const channelClientsByEndpointId = new Map();
|
9097
8713
|
/**
|
@@ -9100,17 +8716,17 @@ const channelClientsByEndpointId = new Map();
|
|
9100
8716
|
* provider via {@link ChannelClient#dispatch dispatch} and to listen for communication
|
9101
8717
|
* from the provider by registering an action via {@link ChannelClient#register register}.
|
9102
8718
|
*
|
9103
|
-
* Synchronous Methods:
|
8719
|
+
* ### Synchronous Methods:
|
9104
8720
|
* * {@link ChannelClient#onDisconnection onDisconnection(listener)}
|
9105
8721
|
* * {@link ChannelClient#register register(action, listener)}
|
9106
8722
|
* * {@link ChannelClient#remove remove(action)}
|
9107
8723
|
*
|
9108
|
-
* Asynchronous Methods:
|
8724
|
+
* ### Asynchronous Methods:
|
9109
8725
|
* * {@link ChannelClient#disconnect disconnect()}
|
9110
8726
|
* * {@link ChannelClient#dispatch dispatch(action, payload)}
|
9111
8727
|
*
|
9112
|
-
* Middleware:
|
9113
|
-
*
|
8728
|
+
* ### Middleware:
|
8729
|
+
* Middleware functions receive the following arguments: (action, payload, senderId).
|
9114
8730
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
9115
8731
|
* unless it is undefined, in which case the original payload is used. Middleware can be used for side effects.
|
9116
8732
|
* * {@link ChannelClient#setDefaultAction setDefaultAction(middleware)}
|
@@ -9257,7 +8873,7 @@ class ChannelClient extends channel_1$1.ChannelBase {
|
|
9257
8873
|
});
|
9258
8874
|
}
|
9259
8875
|
}
|
9260
|
-
client.
|
8876
|
+
client.ChannelClient = ChannelClient;
|
9261
8877
|
_ChannelClient_protectedObj = new WeakMap(), _ChannelClient_strategy = new WeakMap(), _ChannelClient_close = new WeakMap();
|
9262
8878
|
|
9263
8879
|
var connectionManager = {};
|
@@ -9304,7 +8920,6 @@ class ClassicStrategy {
|
|
9304
8920
|
// connection problems occur
|
9305
8921
|
_ClassicStrategy_pendingMessagesByEndpointId.set(this, new Map);
|
9306
8922
|
this.send = async (endpointId, action, payload) => {
|
9307
|
-
var _a;
|
9308
8923
|
const to = __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
|
9309
8924
|
if (!to) {
|
9310
8925
|
throw new Error(`Could not locate routing info for endpoint ${endpointId}`);
|
@@ -9324,13 +8939,12 @@ class ClassicStrategy {
|
|
9324
8939
|
action,
|
9325
8940
|
payload
|
9326
8941
|
});
|
9327
|
-
|
8942
|
+
__classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.add(p);
|
9328
8943
|
const raw = await p.catch((error) => {
|
9329
8944
|
throw new Error(error.message);
|
9330
8945
|
}).finally(() => {
|
9331
|
-
var _a;
|
9332
8946
|
// clean up the pending promise
|
9333
|
-
|
8947
|
+
__classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId)?.delete(p);
|
9334
8948
|
});
|
9335
8949
|
return raw.payload.data.result;
|
9336
8950
|
};
|
@@ -9351,8 +8965,8 @@ class ClassicStrategy {
|
|
9351
8965
|
const id = __classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").get(endpointId);
|
9352
8966
|
__classPrivateFieldGet$c(this, _ClassicStrategy_endpointIdentityMap, "f").delete(endpointId);
|
9353
8967
|
const pendingSet = __classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").get(endpointId);
|
9354
|
-
pendingSet
|
9355
|
-
const errorMsg = `Channel connection with identity uuid: ${id
|
8968
|
+
pendingSet?.forEach((p) => {
|
8969
|
+
const errorMsg = `Channel connection with identity uuid: ${id?.uuid} / name: ${id?.name} / endpointId: ${endpointId} no longer connected.`;
|
9356
8970
|
p.cancel(new Error(errorMsg));
|
9357
8971
|
});
|
9358
8972
|
}
|
@@ -9364,9 +8978,8 @@ class ClassicStrategy {
|
|
9364
8978
|
__classPrivateFieldGet$c(this, _ClassicStrategy_pendingMessagesByEndpointId, "f").set(endpointId, new Set());
|
9365
8979
|
}
|
9366
8980
|
isValidEndpointPayload(payload) {
|
9367
|
-
|
9368
|
-
|
9369
|
-
typeof ((_b = payload === null || payload === void 0 ? void 0 : payload.endpointIdentity) === null || _b === void 0 ? void 0 : _b.channelId) === 'string');
|
8981
|
+
return (typeof payload?.endpointIdentity?.endpointId === 'string' ||
|
8982
|
+
typeof payload?.endpointIdentity?.channelId === 'string');
|
9370
8983
|
}
|
9371
8984
|
}
|
9372
8985
|
strategy$2.ClassicStrategy = ClassicStrategy;
|
@@ -9443,13 +9056,12 @@ class RTCEndpoint {
|
|
9443
9056
|
this.rtc.rtcClient.close();
|
9444
9057
|
};
|
9445
9058
|
this.rtc.channels.response.addEventListener('message', (e) => {
|
9446
|
-
var _a;
|
9447
9059
|
let { data } = e;
|
9448
9060
|
if (e.data instanceof ArrayBuffer) {
|
9449
9061
|
data = new TextDecoder().decode(e.data);
|
9450
9062
|
}
|
9451
9063
|
const { messageId, payload, success, error } = JSON.parse(data);
|
9452
|
-
const { resolve, reject } =
|
9064
|
+
const { resolve, reject } = this.responseMap.get(messageId) ?? {};
|
9453
9065
|
if (resolve && reject) {
|
9454
9066
|
this.responseMap.delete(messageId);
|
9455
9067
|
if (success) {
|
@@ -9622,7 +9234,7 @@ var iceManager = {};
|
|
9622
9234
|
|
9623
9235
|
Object.defineProperty(iceManager, "__esModule", { value: true });
|
9624
9236
|
iceManager.RTCICEManager = void 0;
|
9625
|
-
const base_1$i = base;
|
9237
|
+
const base_1$i = base$1;
|
9626
9238
|
/*
|
9627
9239
|
Singleton that facilitates Offer and Answer exchange required for establishing RTC connections.
|
9628
9240
|
*/
|
@@ -9698,9 +9310,8 @@ class RTCICEManager extends base_1$i.EmitterBase {
|
|
9698
9310
|
const rtcConnectionId = Math.random().toString();
|
9699
9311
|
const rtcClient = this.createRtcPeer();
|
9700
9312
|
rtcClient.addEventListener('icecandidate', async (e) => {
|
9701
|
-
var _a;
|
9702
9313
|
if (e.candidate) {
|
9703
|
-
await this.raiseClientIce(rtcConnectionId, { candidate:
|
9314
|
+
await this.raiseClientIce(rtcConnectionId, { candidate: e.candidate?.toJSON() });
|
9704
9315
|
}
|
9705
9316
|
});
|
9706
9317
|
await this.listenForProviderIce(rtcConnectionId, async (payload) => {
|
@@ -9725,9 +9336,8 @@ class RTCICEManager extends base_1$i.EmitterBase {
|
|
9725
9336
|
const requestChannelPromise = RTCICEManager.createDataChannelPromise('request', rtcClient);
|
9726
9337
|
const responseChannelPromise = RTCICEManager.createDataChannelPromise('response', rtcClient);
|
9727
9338
|
rtcClient.addEventListener('icecandidate', async (e) => {
|
9728
|
-
var _a;
|
9729
9339
|
if (e.candidate) {
|
9730
|
-
await this.raiseProviderIce(rtcConnectionId, { candidate:
|
9340
|
+
await this.raiseProviderIce(rtcConnectionId, { candidate: e.candidate?.toJSON() });
|
9731
9341
|
}
|
9732
9342
|
});
|
9733
9343
|
await this.listenForClientIce(rtcConnectionId, async (payload) => {
|
@@ -9800,20 +9410,20 @@ const runtimeVersioning_1 = runtimeVersioning;
|
|
9800
9410
|
* a single client via {@link ChannelProvider#dispatch dispatch} or all clients via {@link ChannelProvider#publish publish}
|
9801
9411
|
* and to listen for communication from clients by registering an action via {@link ChannelProvider#register register}.
|
9802
9412
|
*
|
9803
|
-
* Synchronous Methods:
|
9413
|
+
* ### Synchronous Methods:
|
9804
9414
|
* * {@link ChannelProvider#onConnection onConnection(listener)}
|
9805
9415
|
* * {@link ChannelProvider#onDisconnection onDisconnection(listener)}
|
9806
9416
|
* * {@link ChannelProvider#publish publish(action, payload)}
|
9807
9417
|
* * {@link ChannelProvider#register register(action, listener)}
|
9808
9418
|
* * {@link ChannelProvider#remove remove(action)}
|
9809
9419
|
*
|
9810
|
-
* Asynchronous Methods:
|
9420
|
+
* ### Asynchronous Methods:
|
9811
9421
|
* * {@link ChannelProvider#destroy destroy()}
|
9812
9422
|
* * {@link ChannelProvider#dispatch dispatch(to, action, payload)}
|
9813
9423
|
* * {@link ChannelProvider#getAllClientInfo getAllClientInfo()}
|
9814
9424
|
*
|
9815
|
-
* Middleware:
|
9816
|
-
*
|
9425
|
+
* ### Middleware:
|
9426
|
+
* Middleware functions receive the following arguments: (action, payload, senderId).
|
9817
9427
|
* The return value of the middleware function will be passed on as the payload from beforeAction, to the action listener, to afterAction
|
9818
9428
|
* unless it is undefined, in which case the most recently defined payload is used. Middleware can be used for side effects.
|
9819
9429
|
* * {@link ChannelProvider#setDefaultAction setDefaultAction(middleware)}
|
@@ -9909,8 +9519,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
9909
9519
|
* ```
|
9910
9520
|
*/
|
9911
9521
|
dispatch(to, action, payload) {
|
9912
|
-
|
9913
|
-
const endpointId = (_a = to.endpointId) !== null && _a !== void 0 ? _a : this.getEndpointIdForOpenFinId(to, action);
|
9522
|
+
const endpointId = to.endpointId ?? this.getEndpointIdForOpenFinId(to, action);
|
9914
9523
|
if (endpointId && __classPrivateFieldGet$9(this, _ChannelProvider_strategy, "f").isEndpointConnected(endpointId)) {
|
9915
9524
|
return __classPrivateFieldGet$9(this, _ChannelProvider_strategy, "f").send(endpointId, action, payload);
|
9916
9525
|
}
|
@@ -10086,13 +9695,12 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
10086
9695
|
}
|
10087
9696
|
}
|
10088
9697
|
getEndpointIdForOpenFinId(clientIdentity, action) {
|
10089
|
-
var _a;
|
10090
9698
|
const matchingConnections = this.connections.filter((c) => c.name === clientIdentity.name && c.uuid === clientIdentity.uuid);
|
10091
9699
|
if (matchingConnections.length >= 2) {
|
10092
9700
|
const protectedObj = __classPrivateFieldGet$9(this, _ChannelProvider_protectedObj, "f");
|
10093
9701
|
const { uuid, name } = clientIdentity;
|
10094
|
-
const providerUuid = protectedObj
|
10095
|
-
const providerName = protectedObj
|
9702
|
+
const providerUuid = protectedObj?.providerIdentity.uuid;
|
9703
|
+
const providerName = protectedObj?.providerIdentity.name;
|
10096
9704
|
// eslint-disable-next-line no-console
|
10097
9705
|
console.warn(`WARNING: Dispatch call may have unintended results. The "to" argument of your dispatch call is missing the
|
10098
9706
|
"endpointId" parameter. The identity you are dispatching to ({uuid: ${uuid}, name: ${name}})
|
@@ -10100,7 +9708,7 @@ class ChannelProvider extends channel_1.ChannelBase {
|
|
10100
9708
|
({uuid: ${providerUuid}, name: ${providerName}}) will only be processed by the most recently-created client.`);
|
10101
9709
|
}
|
10102
9710
|
// Pop to return the most recently created endpointId.
|
10103
|
-
return
|
9711
|
+
return matchingConnections.pop()?.endpointId;
|
10104
9712
|
}
|
10105
9713
|
// eslint-disable-next-line class-methods-use-this
|
10106
9714
|
static clientIdentityIncludesEndpointId(subscriptionIdentity) {
|
@@ -10122,7 +9730,7 @@ var messageReceiver = {};
|
|
10122
9730
|
Object.defineProperty(messageReceiver, "__esModule", { value: true });
|
10123
9731
|
messageReceiver.MessageReceiver = void 0;
|
10124
9732
|
const client_1$1 = client;
|
10125
|
-
const base_1$h = base;
|
9733
|
+
const base_1$h = base$1;
|
10126
9734
|
/*
|
10127
9735
|
This is a singleton (per fin object) tasked with routing messages coming off the ipc to the correct endpoint.
|
10128
9736
|
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.
|
@@ -10143,9 +9751,10 @@ class MessageReceiver extends base_1$h.Base {
|
|
10143
9751
|
wire.registerMessageHandler(this.onmessage.bind(this));
|
10144
9752
|
}
|
10145
9753
|
async processChannelMessage(msg) {
|
10146
|
-
var _a, _b;
|
10147
9754
|
const { senderIdentity, providerIdentity, action, ackToSender, payload, intendedTargetIdentity } = msg.payload;
|
10148
|
-
const key =
|
9755
|
+
const key = intendedTargetIdentity.channelId ?? // The recipient is a provider
|
9756
|
+
intendedTargetIdentity.endpointId ?? // The recipient is a client
|
9757
|
+
this.latestEndpointIdByChannelId.get(providerIdentity.channelId); // No endpointId was passed, make best attempt
|
10149
9758
|
const handler = this.endpointMap.get(key);
|
10150
9759
|
if (!handler) {
|
10151
9760
|
ackToSender.payload.success = false;
|
@@ -10182,7 +9791,7 @@ class MessageReceiver extends base_1$h.Base {
|
|
10182
9791
|
const endpointIdFromPreviousConnection = this.latestEndpointIdByChannelId.get(channelId);
|
10183
9792
|
if (endpointIdFromPreviousConnection) {
|
10184
9793
|
// Not convinced by this way of doing things, but pushing up for now.
|
10185
|
-
client_1$1.
|
9794
|
+
client_1$1.ChannelClient.closeChannelByEndpointId(endpointIdFromPreviousConnection);
|
10186
9795
|
// eslint-disable-next-line no-console
|
10187
9796
|
console.warn('You have created a second connection to an older provider. First connection has been removed from the clientMap');
|
10188
9797
|
// eslint-disable-next-line no-console
|
@@ -10225,12 +9834,9 @@ class ProtocolManager {
|
|
10225
9834
|
return supported;
|
10226
9835
|
};
|
10227
9836
|
this.getCompatibleProtocols = (providerProtocols, clientOffer) => {
|
10228
|
-
const supported = clientOffer.supportedProtocols.filter((clientProtocol) => providerProtocols.some((providerProtocol) =>
|
10229
|
-
|
10230
|
-
|
10231
|
-
clientProtocol.version >= providerProtocol.minimumVersion &&
|
10232
|
-
providerProtocol.version >= ((_a = clientProtocol.minimumVersion) !== null && _a !== void 0 ? _a : 0);
|
10233
|
-
}));
|
9837
|
+
const supported = clientOffer.supportedProtocols.filter((clientProtocol) => providerProtocols.some((providerProtocol) => providerProtocol.type === clientProtocol.type &&
|
9838
|
+
clientProtocol.version >= providerProtocol.minimumVersion &&
|
9839
|
+
providerProtocol.version >= (clientProtocol.minimumVersion ?? 0)));
|
10234
9840
|
return supported.slice(0, clientOffer.maxProtocols);
|
10235
9841
|
};
|
10236
9842
|
}
|
@@ -10312,7 +9918,7 @@ var _ConnectionManager_messageReceiver, _ConnectionManager_rtcConnectionManager;
|
|
10312
9918
|
Object.defineProperty(connectionManager, "__esModule", { value: true });
|
10313
9919
|
connectionManager.ConnectionManager = void 0;
|
10314
9920
|
const exhaustive_1 = exhaustive;
|
10315
|
-
const base_1$g = base;
|
9921
|
+
const base_1$g = base$1;
|
10316
9922
|
const strategy_1 = strategy$2;
|
10317
9923
|
const strategy_2 = strategy$1;
|
10318
9924
|
const ice_manager_1 = iceManager;
|
@@ -10355,7 +9961,7 @@ class ConnectionManager extends base_1$g.Base {
|
|
10355
9961
|
}
|
10356
9962
|
createProvider(options, providerIdentity) {
|
10357
9963
|
const opts = Object.assign(this.wire.environment.getDefaultChannelOptions().create, options || {});
|
10358
|
-
const protocols = this.protocolManager.getProviderProtocols(opts
|
9964
|
+
const protocols = this.protocolManager.getProviderProtocols(opts?.protocols);
|
10359
9965
|
const createSingleStrategy = (stratType) => {
|
10360
9966
|
switch (stratType) {
|
10361
9967
|
case 'rtc':
|
@@ -10392,7 +9998,7 @@ class ConnectionManager extends base_1$g.Base {
|
|
10392
9998
|
return channel;
|
10393
9999
|
}
|
10394
10000
|
async createClientOffer(options) {
|
10395
|
-
const protocols = this.protocolManager.getClientProtocols(options
|
10001
|
+
const protocols = this.protocolManager.getClientProtocols(options?.protocols);
|
10396
10002
|
let rtcPacket;
|
10397
10003
|
const supportedProtocols = await Promise.all(protocols.map(async (type) => {
|
10398
10004
|
switch (type) {
|
@@ -10420,14 +10026,13 @@ class ConnectionManager extends base_1$g.Base {
|
|
10420
10026
|
};
|
10421
10027
|
}
|
10422
10028
|
async createClientStrategy(rtcPacket, routingInfo) {
|
10423
|
-
var _a;
|
10424
10029
|
if (!routingInfo.endpointId) {
|
10425
10030
|
routingInfo.endpointId = this.wire.environment.getNextMessageId();
|
10426
10031
|
// For New Clients connecting to Old Providers. To prevent multi-dispatching and publishing, we delete previously-connected
|
10427
10032
|
// clients that are in the same context as the newly-connected client.
|
10428
10033
|
__classPrivateFieldGet$8(this, _ConnectionManager_messageReceiver, "f").checkForPreviousClientConnection(routingInfo.channelId);
|
10429
10034
|
}
|
10430
|
-
const answer =
|
10035
|
+
const answer = routingInfo.answer ?? {
|
10431
10036
|
supportedProtocols: [{ type: 'classic', version: 1 }]
|
10432
10037
|
};
|
10433
10038
|
const createStrategyFromAnswer = async (protocol) => {
|
@@ -10485,7 +10090,7 @@ class ConnectionManager extends base_1$g.Base {
|
|
10485
10090
|
if (!(provider instanceof provider_1$1.ChannelProvider)) {
|
10486
10091
|
throw Error('Cannot connect to a channel client');
|
10487
10092
|
}
|
10488
|
-
const offer = clientOffer
|
10093
|
+
const offer = clientOffer ?? {
|
10489
10094
|
supportedProtocols: [{ type: 'classic', version: 1 }],
|
10490
10095
|
maxProtocols: 1
|
10491
10096
|
};
|
@@ -10543,6 +10148,15 @@ class ConnectionManager extends base_1$g.Base {
|
|
10543
10148
|
connectionManager.ConnectionManager = ConnectionManager;
|
10544
10149
|
_ConnectionManager_messageReceiver = new WeakMap(), _ConnectionManager_rtcConnectionManager = new WeakMap();
|
10545
10150
|
|
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
|
+
*/
|
10546
10160
|
var __classPrivateFieldSet$5 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
10547
10161
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
10548
10162
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
@@ -10558,9 +10172,9 @@ var _Channel_connectionManager, _Channel_internalEmitter, _Channel_readyToConnec
|
|
10558
10172
|
Object.defineProperty(channel$1, "__esModule", { value: true });
|
10559
10173
|
channel$1.Channel = void 0;
|
10560
10174
|
/* eslint-disable no-console */
|
10561
|
-
const events_1$5 =
|
10175
|
+
const events_1$5 = require$$0;
|
10562
10176
|
const lazy_1$1 = lazy;
|
10563
|
-
const base_1$f = base;
|
10177
|
+
const base_1$f = base$1;
|
10564
10178
|
const client_1 = client;
|
10565
10179
|
const connection_manager_1 = connectionManager;
|
10566
10180
|
const provider_1 = provider;
|
@@ -10603,7 +10217,7 @@ class Channel extends base_1$f.EmitterBase {
|
|
10603
10217
|
_Channel_readyToConnect.set(this, new lazy_1$1.AsyncRetryableLazy(async () => {
|
10604
10218
|
await Promise.all([
|
10605
10219
|
this.on('disconnected', (eventPayload) => {
|
10606
|
-
client_1.
|
10220
|
+
client_1.ChannelClient.handleProviderDisconnect(eventPayload);
|
10607
10221
|
}),
|
10608
10222
|
this.on('connected', (...args) => {
|
10609
10223
|
__classPrivateFieldGet$7(this, _Channel_internalEmitter, "f").emit('connected', ...args);
|
@@ -10794,7 +10408,7 @@ class Channel extends base_1$f.EmitterBase {
|
|
10794
10408
|
};
|
10795
10409
|
const routingInfo = await this.safeConnect(channelName, opts.wait, connectPayload);
|
10796
10410
|
const strategy = await __classPrivateFieldGet$7(this, _Channel_connectionManager, "f").createClientStrategy(rtcPacket, routingInfo);
|
10797
|
-
const channel = new client_1.
|
10411
|
+
const channel = new client_1.ChannelClient(routingInfo, this.wire, strategy);
|
10798
10412
|
// It is the client's responsibility to handle endpoint disconnection to the provider.
|
10799
10413
|
// If the endpoint dies, the client will force a disconnection through the core.
|
10800
10414
|
// The provider does not care about endpoint disconnection.
|
@@ -10806,7 +10420,7 @@ class Channel extends base_1$f.EmitterBase {
|
|
10806
10420
|
console.warn(`Something went wrong during disconnect for client with uuid: ${routingInfo.uuid} / name: ${routingInfo.name} / endpointId: ${routingInfo.endpointId}.`);
|
10807
10421
|
}
|
10808
10422
|
finally {
|
10809
|
-
client_1.
|
10423
|
+
client_1.ChannelClient.handleProviderDisconnect(routingInfo);
|
10810
10424
|
}
|
10811
10425
|
});
|
10812
10426
|
return channel;
|
@@ -10877,9 +10491,16 @@ channel$1.Channel = Channel;
|
|
10877
10491
|
_Channel_connectionManager = new WeakMap(), _Channel_internalEmitter = new WeakMap(), _Channel_readyToConnect = new WeakMap();
|
10878
10492
|
|
10879
10493
|
Object.defineProperty(interappbus, "__esModule", { value: true });
|
10880
|
-
interappbus.InterAppPayload = void 0;
|
10881
|
-
|
10882
|
-
|
10494
|
+
interappbus.InterAppPayload = interappbus.InterApplicationBus = void 0;
|
10495
|
+
/**
|
10496
|
+
* Entry point for the OpenFin `InterApplicationBus` API (`fin.InterApplicationBus`).
|
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;
|
10883
10504
|
const ref_counter_1 = refCounter;
|
10884
10505
|
const index_1$2 = channel$1;
|
10885
10506
|
const validate_1$3 = validate;
|
@@ -11069,7 +10690,7 @@ class InterApplicationBus extends base_1$e.Base {
|
|
11069
10690
|
return true;
|
11070
10691
|
}
|
11071
10692
|
}
|
11072
|
-
interappbus.
|
10693
|
+
interappbus.InterApplicationBus = InterApplicationBus;
|
11073
10694
|
/**
|
11074
10695
|
* @internal
|
11075
10696
|
*/
|
@@ -11086,8 +10707,16 @@ function createKey(...toHash) {
|
|
11086
10707
|
|
11087
10708
|
var clipboard = {};
|
11088
10709
|
|
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
|
+
*/
|
11089
10717
|
Object.defineProperty(clipboard, "__esModule", { value: true });
|
11090
|
-
|
10718
|
+
clipboard.Clipboard = void 0;
|
10719
|
+
const base_1$d = base$1;
|
11091
10720
|
/**
|
11092
10721
|
* @PORTED
|
11093
10722
|
* WriteRequestType interface
|
@@ -11284,9 +10913,9 @@ class Clipboard extends base_1$d.Base {
|
|
11284
10913
|
return payload.data;
|
11285
10914
|
}
|
11286
10915
|
}
|
11287
|
-
clipboard.
|
10916
|
+
clipboard.Clipboard = Clipboard;
|
11288
10917
|
|
11289
|
-
var externalApplication = {};
|
10918
|
+
var externalApplication$1 = {};
|
11290
10919
|
|
11291
10920
|
var Factory$5 = {};
|
11292
10921
|
|
@@ -11295,11 +10924,11 @@ var Instance$4 = {};
|
|
11295
10924
|
Object.defineProperty(Instance$4, "__esModule", { value: true });
|
11296
10925
|
Instance$4.ExternalApplication = void 0;
|
11297
10926
|
/* eslint-disable import/prefer-default-export */
|
11298
|
-
const base_1$c = base;
|
10927
|
+
const base_1$c = base$1;
|
11299
10928
|
/**
|
11300
10929
|
* An ExternalApplication object representing native language adapter connections to the runtime. Allows
|
11301
10930
|
* the developer to listen to {@link OpenFin.ExternalApplicationEvents external application events}.
|
11302
|
-
* Discovery of connections is provided by
|
10931
|
+
* Discovery of connections is provided by {@link System.System.getAllExternalApplications getAllExternalApplications}.</a>
|
11303
10932
|
*
|
11304
10933
|
* Processes that can be wrapped as `ExternalApplication`s include the following:
|
11305
10934
|
* - Processes which have connected to an OpenFin runtime via an adapter
|
@@ -11410,8 +11039,12 @@ class ExternalApplication extends base_1$c.EmitterBase {
|
|
11410
11039
|
Instance$4.ExternalApplication = ExternalApplication;
|
11411
11040
|
|
11412
11041
|
Object.defineProperty(Factory$5, "__esModule", { value: true });
|
11413
|
-
|
11042
|
+
Factory$5.ExternalApplicationModule = void 0;
|
11043
|
+
const base_1$b = base$1;
|
11414
11044
|
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
|
+
*/
|
11415
11048
|
class ExternalApplicationModule extends base_1$b.Base {
|
11416
11049
|
/**
|
11417
11050
|
* Asynchronously returns an External Application object that represents an external application.
|
@@ -11425,7 +11058,6 @@ class ExternalApplicationModule extends base_1$b.Base {
|
|
11425
11058
|
* .then(extApp => console.log('wrapped external application'))
|
11426
11059
|
* .catch(err => console.log(err));
|
11427
11060
|
* ```
|
11428
|
-
* @static
|
11429
11061
|
*/
|
11430
11062
|
wrap(uuid) {
|
11431
11063
|
this.wire.sendAction('external-application-wrap').catch((e) => {
|
@@ -11445,7 +11077,6 @@ class ExternalApplicationModule extends base_1$b.Base {
|
|
11445
11077
|
* const info = await extApp.getInfo();
|
11446
11078
|
* console.log(info);
|
11447
11079
|
* ```
|
11448
|
-
* @static
|
11449
11080
|
*/
|
11450
11081
|
wrapSync(uuid) {
|
11451
11082
|
this.wire.sendAction('external-application-wrap-sync').catch((e) => {
|
@@ -11454,18 +11085,9 @@ class ExternalApplicationModule extends base_1$b.Base {
|
|
11454
11085
|
return new Instance_1$4.ExternalApplication(this.wire, { uuid });
|
11455
11086
|
}
|
11456
11087
|
}
|
11457
|
-
Factory$5.
|
11088
|
+
Factory$5.ExternalApplicationModule = ExternalApplicationModule;
|
11458
11089
|
|
11459
11090
|
(function (exports) {
|
11460
|
-
/**
|
11461
|
-
* Entry point for the OpenFin ExternalApplication namespace.
|
11462
|
-
*
|
11463
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "ExternalApplicationModule" is used for
|
11464
|
-
* the module containing static members of the `ExternalApplication` namespace (available under `fin.ExternalApplication`), while `ExternalApplication`
|
11465
|
-
* documents instances of the OpenFin `ExternalApplication` class.
|
11466
|
-
*
|
11467
|
-
* @packageDocumentation
|
11468
|
-
*/
|
11469
11091
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
11470
11092
|
if (k2 === undefined) k2 = k;
|
11471
11093
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
@@ -11481,12 +11103,22 @@ Factory$5.default = ExternalApplicationModule;
|
|
11481
11103
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11482
11104
|
};
|
11483
11105
|
Object.defineProperty(exports, "__esModule", { value: true });
|
11484
|
-
|
11485
|
-
|
11486
|
-
|
11487
|
-
}
|
11106
|
+
/**
|
11107
|
+
* Entry points for the OpenFin `ExternalApplication` API (`fin.ExternalApplication`).
|
11108
|
+
*
|
11109
|
+
* * {@link ExternalApplicationModule} contains static members of the `ExternalApplication` type, accessible through `fin.ExternalApplication`.
|
11110
|
+
* * {@link ExternalApplication} describes an instance of an OpenFin ExternalApplication, e.g. as returned by `fin.ExternalApplication.getCurrent`.
|
11111
|
+
*
|
11112
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
11113
|
+
* both of these were documented on the same page.
|
11114
|
+
*
|
11115
|
+
* @packageDocumentation
|
11116
|
+
*/
|
11117
|
+
__exportStar(Factory$5, exports);
|
11118
|
+
__exportStar(Instance$4, exports);
|
11119
|
+
} (externalApplication$1));
|
11488
11120
|
|
11489
|
-
var frame = {};
|
11121
|
+
var frame$1 = {};
|
11490
11122
|
|
11491
11123
|
var Factory$4 = {};
|
11492
11124
|
|
@@ -11495,7 +11127,7 @@ var Instance$3 = {};
|
|
11495
11127
|
Object.defineProperty(Instance$3, "__esModule", { value: true });
|
11496
11128
|
Instance$3._Frame = void 0;
|
11497
11129
|
/* eslint-disable import/prefer-default-export */
|
11498
|
-
const base_1$a = base;
|
11130
|
+
const base_1$a = base$1;
|
11499
11131
|
/**
|
11500
11132
|
* An iframe represents an embedded HTML page within a parent HTML page. Because this embedded page
|
11501
11133
|
* has its own DOM and global JS context (which may or may not be linked to that of the parent depending
|
@@ -11636,9 +11268,13 @@ class _Frame extends base_1$a.EmitterBase {
|
|
11636
11268
|
Instance$3._Frame = _Frame;
|
11637
11269
|
|
11638
11270
|
Object.defineProperty(Factory$4, "__esModule", { value: true });
|
11639
|
-
|
11271
|
+
Factory$4._FrameModule = void 0;
|
11272
|
+
const base_1$9 = base$1;
|
11640
11273
|
const validate_1$2 = validate;
|
11641
11274
|
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
|
+
*/
|
11642
11278
|
class _FrameModule extends base_1$9.Base {
|
11643
11279
|
/**
|
11644
11280
|
* Asynchronously returns a reference to the specified frame. The frame does not have to exist
|
@@ -11650,7 +11286,6 @@ class _FrameModule extends base_1$9.Base {
|
|
11650
11286
|
* .then(frm => console.log('wrapped frame'))
|
11651
11287
|
* .catch(err => console.log(err));
|
11652
11288
|
* ```
|
11653
|
-
* @static
|
11654
11289
|
*/
|
11655
11290
|
async wrap(identity) {
|
11656
11291
|
this.wire.sendAction('frame-wrap').catch((e) => {
|
@@ -11672,7 +11307,6 @@ class _FrameModule extends base_1$9.Base {
|
|
11672
11307
|
* const info = await frm.getInfo();
|
11673
11308
|
* console.log(info);
|
11674
11309
|
* ```
|
11675
|
-
* @static
|
11676
11310
|
*/
|
11677
11311
|
wrapSync(identity) {
|
11678
11312
|
this.wire.sendAction('frame-wrap-sync').catch((e) => {
|
@@ -11693,7 +11327,6 @@ class _FrameModule extends base_1$9.Base {
|
|
11693
11327
|
* .then(frm => console.log('current frame'))
|
11694
11328
|
* .catch(err => console.log(err));
|
11695
11329
|
* ```
|
11696
|
-
* @static
|
11697
11330
|
*/
|
11698
11331
|
getCurrent() {
|
11699
11332
|
this.wire.sendAction('frame-get-current').catch((e) => {
|
@@ -11710,7 +11343,6 @@ class _FrameModule extends base_1$9.Base {
|
|
11710
11343
|
* const info = await frm.getInfo();
|
11711
11344
|
* console.log(info);
|
11712
11345
|
* ```
|
11713
|
-
* @static
|
11714
11346
|
*/
|
11715
11347
|
getCurrentSync() {
|
11716
11348
|
this.wire.sendAction('frame-get-current-sync').catch((e) => {
|
@@ -11719,17 +11351,19 @@ class _FrameModule extends base_1$9.Base {
|
|
11719
11351
|
return new Instance_1$3._Frame(this.wire, this.wire.environment.getCurrentEntityIdentity());
|
11720
11352
|
}
|
11721
11353
|
}
|
11722
|
-
Factory$4.
|
11354
|
+
Factory$4._FrameModule = _FrameModule;
|
11723
11355
|
|
11724
11356
|
(function (exports) {
|
11725
11357
|
/**
|
11726
|
-
* Entry
|
11358
|
+
* Entry points for the OpenFin `Frame` API (`fin.Frame`).
|
11359
|
+
*
|
11360
|
+
* * {@link _FrameModule} contains static members of the `Frame` API, accessible through `fin.Frame`.
|
11361
|
+
* * {@link _Frame} describes an instance of an OpenFin Frame, e.g. as returned by `fin.Frame.getCurrent`.
|
11727
11362
|
*
|
11728
|
-
*
|
11729
|
-
*
|
11730
|
-
* instances of the OpenFin `Frame` class.
|
11363
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
11364
|
+
* both of these were documented on the same page.
|
11731
11365
|
*
|
11732
|
-
*
|
11366
|
+
* Underscore prefixing of OpenFin types that alias DOM entities will be fixed in a future version.
|
11733
11367
|
*
|
11734
11368
|
* @packageDocumentation
|
11735
11369
|
*/
|
@@ -11748,15 +11382,15 @@ Factory$4.default = _FrameModule;
|
|
11748
11382
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11749
11383
|
};
|
11750
11384
|
Object.defineProperty(exports, "__esModule", { value: true });
|
11751
|
-
|
11752
|
-
exports
|
11753
|
-
|
11754
|
-
} (frame));
|
11385
|
+
__exportStar(Factory$4, exports);
|
11386
|
+
__exportStar(Instance$3, exports);
|
11387
|
+
} (frame$1));
|
11755
11388
|
|
11756
|
-
var globalHotkey = {};
|
11389
|
+
var globalHotkey$1 = {};
|
11757
11390
|
|
11758
|
-
Object.defineProperty(globalHotkey, "__esModule", { value: true });
|
11759
|
-
|
11391
|
+
Object.defineProperty(globalHotkey$1, "__esModule", { value: true });
|
11392
|
+
globalHotkey$1.GlobalHotkey = void 0;
|
11393
|
+
const base_1$8 = base$1;
|
11760
11394
|
/**
|
11761
11395
|
* The GlobalHotkey module can register/unregister a global hotkeys.
|
11762
11396
|
*
|
@@ -11885,9 +11519,9 @@ class GlobalHotkey extends base_1$8.EmitterBase {
|
|
11885
11519
|
return data;
|
11886
11520
|
}
|
11887
11521
|
}
|
11888
|
-
globalHotkey.
|
11522
|
+
globalHotkey$1.GlobalHotkey = GlobalHotkey;
|
11889
11523
|
|
11890
|
-
var platform = {};
|
11524
|
+
var platform$1 = {};
|
11891
11525
|
|
11892
11526
|
var Factory$3 = {};
|
11893
11527
|
|
@@ -11902,16 +11536,14 @@ var _Platform_connectToProvider;
|
|
11902
11536
|
Object.defineProperty(Instance$2, "__esModule", { value: true });
|
11903
11537
|
Instance$2.Platform = void 0;
|
11904
11538
|
/* eslint-disable import/prefer-default-export, no-undef */
|
11905
|
-
const base_1$7 = base;
|
11539
|
+
const base_1$7 = base$1;
|
11906
11540
|
const validate_1$1 = validate;
|
11907
11541
|
// Reuse clients to avoid overwriting already-registered client in provider
|
11908
11542
|
const clientMap = new Map();
|
11909
11543
|
/** Manages the life cycle of windows and views in the application.
|
11910
11544
|
*
|
11911
|
-
* Enables taking snapshots of itself and
|
11912
|
-
* ng them to restore a previous configuration
|
11545
|
+
* Enables taking snapshots of itself and applying them to restore a previous configuration
|
11913
11546
|
* as well as listen to {@link OpenFin.PlatformEvents platform events}.
|
11914
|
-
*
|
11915
11547
|
*/
|
11916
11548
|
class Platform extends base_1$7.EmitterBase {
|
11917
11549
|
/**
|
@@ -12270,15 +11902,13 @@ class Platform extends base_1$7.EmitterBase {
|
|
12270
11902
|
});
|
12271
11903
|
}
|
12272
11904
|
/**
|
12273
|
-
* ***DEPRECATED - please use Platform.createView.***
|
11905
|
+
* ***DEPRECATED - please use {@link Platform.createView Platform.createView}.***
|
12274
11906
|
* Reparents a specified view in a new target window.
|
12275
11907
|
* @param viewIdentity View identity
|
12276
11908
|
* @param target new owner window identity
|
12277
11909
|
*
|
12278
|
-
* @tutorial Platform.createView
|
12279
11910
|
*/
|
12280
11911
|
async reparentView(viewIdentity, target) {
|
12281
|
-
var _a;
|
12282
11912
|
// eslint-disable-next-line no-console
|
12283
11913
|
console.warn('Platform.reparentView has been deprecated, please use Platform.createView');
|
12284
11914
|
this.wire.sendAction('platform-reparent-view', this.identity).catch((e) => {
|
@@ -12286,7 +11916,7 @@ class Platform extends base_1$7.EmitterBase {
|
|
12286
11916
|
});
|
12287
11917
|
const normalizedViewIdentity = {
|
12288
11918
|
...viewIdentity,
|
12289
|
-
uuid:
|
11919
|
+
uuid: viewIdentity.uuid ?? this.identity.uuid
|
12290
11920
|
};
|
12291
11921
|
const view = await this.fin.View.wrap(normalizedViewIdentity);
|
12292
11922
|
const viewOptions = await view.getOptions();
|
@@ -12765,10 +12395,142 @@ Object.defineProperty(Instance$1, "__esModule", { value: true });
|
|
12765
12395
|
Instance$1.Layout = void 0;
|
12766
12396
|
const lazy_1 = lazy;
|
12767
12397
|
const validate_1 = validate;
|
12768
|
-
const base_1$6 = base;
|
12398
|
+
const base_1$6 = base$1;
|
12769
12399
|
const common_utils_1 = commonUtils;
|
12770
12400
|
const layout_entities_1 = layoutEntities;
|
12771
12401
|
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
|
+
*/
|
12772
12534
|
class Layout extends base_1$6.Base {
|
12773
12535
|
/**
|
12774
12536
|
* @internal
|
@@ -12946,6 +12708,25 @@ class Layout extends base_1$6.Base {
|
|
12946
12708
|
target: this.identity
|
12947
12709
|
});
|
12948
12710
|
}
|
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
|
+
}
|
12949
12730
|
/**
|
12950
12731
|
* Retrieves the top level content item of the layout.
|
12951
12732
|
*
|
@@ -12972,7 +12753,7 @@ class Layout extends base_1$6.Base {
|
|
12972
12753
|
// don't expose
|
12973
12754
|
});
|
12974
12755
|
const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
|
12975
|
-
const root = await client.getRoot();
|
12756
|
+
const root = await client.getRoot(this.identity);
|
12976
12757
|
return layout_entities_1.LayoutNode.getEntity(root, client);
|
12977
12758
|
}
|
12978
12759
|
}
|
@@ -12994,8 +12775,11 @@ var _LayoutModule_layoutInitializationAttempted;
|
|
12994
12775
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
12995
12776
|
Factory$2.LayoutModule = void 0;
|
12996
12777
|
/* eslint-disable no-undef, import/prefer-default-export */
|
12997
|
-
const base_1$5 = base;
|
12778
|
+
const base_1$5 = base$1;
|
12998
12779
|
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
|
+
*/
|
12999
12783
|
class LayoutModule extends base_1$5.Base {
|
13000
12784
|
constructor() {
|
13001
12785
|
super(...arguments);
|
@@ -13037,7 +12821,6 @@ class LayoutModule extends base_1$5.Base {
|
|
13037
12821
|
* // the window must have been created with a layout in its window options
|
13038
12822
|
* const layout = await fin.Platform.Layout.init({ containerId });
|
13039
12823
|
* ```
|
13040
|
-
* @static
|
13041
12824
|
*/
|
13042
12825
|
this.init = async (options = {}) => {
|
13043
12826
|
this.wire.sendAction('layout-init').catch((e) => {
|
@@ -13050,12 +12833,12 @@ class LayoutModule extends base_1$5.Base {
|
|
13050
12833
|
throw new Error('Layout for this window already initialized, please use Layout.replace call to replace the layout.');
|
13051
12834
|
}
|
13052
12835
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
12836
|
+
// TODO: remove this.wire and always use this.fin
|
13053
12837
|
return this.wire.environment.initLayout(this.fin, this.wire, options);
|
13054
12838
|
};
|
13055
12839
|
}
|
13056
12840
|
/**
|
13057
12841
|
* Asynchronously returns a Layout object that represents a Window's layout.
|
13058
|
-
* @param identity
|
13059
12842
|
*
|
13060
12843
|
* @example
|
13061
12844
|
* ```js
|
@@ -13072,9 +12855,7 @@ class LayoutModule extends base_1$5.Base {
|
|
13072
12855
|
* // Use wrapped instance to control layout, e.g.:
|
13073
12856
|
* const layoutConfig = await layout.getConfig();
|
13074
12857
|
* ```
|
13075
|
-
* @static
|
13076
12858
|
*/
|
13077
|
-
// eslint-disable-next-line class-methods-use-this
|
13078
12859
|
async wrap(identity) {
|
13079
12860
|
this.wire.sendAction('layout-wrap').catch((e) => {
|
13080
12861
|
// don't expose
|
@@ -13083,7 +12864,6 @@ class LayoutModule extends base_1$5.Base {
|
|
13083
12864
|
}
|
13084
12865
|
/**
|
13085
12866
|
* Synchronously returns a Layout object that represents a Window's layout.
|
13086
|
-
* @param identity
|
13087
12867
|
*
|
13088
12868
|
* @example
|
13089
12869
|
* ```js
|
@@ -13100,9 +12880,7 @@ class LayoutModule extends base_1$5.Base {
|
|
13100
12880
|
* // Use wrapped instance to control layout, e.g.:
|
13101
12881
|
* const layoutConfig = await layout.getConfig();
|
13102
12882
|
* ```
|
13103
|
-
* @static
|
13104
12883
|
*/
|
13105
|
-
// eslint-disable-next-line class-methods-use-this
|
13106
12884
|
wrapSync(identity) {
|
13107
12885
|
this.wire.sendAction('layout-wrap-sync').catch((e) => {
|
13108
12886
|
// don't expose
|
@@ -13118,7 +12896,6 @@ class LayoutModule extends base_1$5.Base {
|
|
13118
12896
|
* // Use wrapped instance to control layout, e.g.:
|
13119
12897
|
* const layoutConfig = await layout.getConfig();
|
13120
12898
|
* ```
|
13121
|
-
* @static
|
13122
12899
|
*/
|
13123
12900
|
async getCurrent() {
|
13124
12901
|
this.wire.sendAction('layout-get-current').catch((e) => {
|
@@ -13142,7 +12919,6 @@ class LayoutModule extends base_1$5.Base {
|
|
13142
12919
|
* // Use wrapped instance to control layout, e.g.:
|
13143
12920
|
* const layoutConfig = await layout.getConfig();
|
13144
12921
|
* ```
|
13145
|
-
* @static
|
13146
12922
|
*/
|
13147
12923
|
getCurrentSync() {
|
13148
12924
|
this.wire.sendAction('layout-get-current-sync').catch((e) => {
|
@@ -13160,139 +12936,16 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
13160
12936
|
|
13161
12937
|
(function (exports) {
|
13162
12938
|
/**
|
13163
|
-
* Entry point for the OpenFin Layout
|
13164
|
-
*
|
13165
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "LayoutModule" is used for
|
13166
|
-
* the module containing static members of the `Layout` namespace (available under `fin.Platform.Layout`), while `Layout` documents
|
13167
|
-
* instances of the OpenFin `Layout` class.
|
12939
|
+
* Entry point for the OpenFin `Layout` subset of the `Platform` API (`fin.Platform.Layout`).
|
13168
12940
|
*
|
13169
|
-
* @
|
13170
|
-
*
|
13171
|
-
*
|
13172
|
-
* ### Layout.DOMEvents
|
13173
|
-
*
|
13174
|
-
* When a Layout is created, it emits events onto the DOM element representing the Layout container.
|
13175
|
-
* This Layout container is the DOM element referenced by containerId in {@link Layout.LayoutModule#init Layout.init}.
|
13176
|
-
* 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).
|
13177
|
-
* The events are emitted synchronously and only in the process where the Layout exists.
|
13178
|
-
* Any values returned by the called listeners are ignored and will be discarded.
|
13179
|
-
* If the target DOM element is destroyed, any events that have been set up on that element will be destroyed.
|
13180
|
-
*
|
13181
|
-
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
13182
|
-
*
|
13183
|
-
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener addEventListener(type, listener [, options]);}
|
13184
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
13185
|
-
* @example
|
13186
|
-
* ```js
|
13187
|
-
* const myLayoutContainer = document.getElementById('layout-container');
|
13188
|
-
*
|
13189
|
-
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
13190
|
-
* const { tabSelector } = event.detail;
|
13191
|
-
* const tabElement = document.getElementById(tabSelector);
|
13192
|
-
* const existingColor = tabElement.style.backgroundColor;
|
13193
|
-
* tabElement.style.backgroundColor = "red";
|
13194
|
-
* setTimeout(() => {
|
13195
|
-
* tabElement.style.backgroundColor = existingColor;
|
13196
|
-
* }, 2000);
|
13197
|
-
* });
|
13198
|
-
* ```
|
13199
|
-
*
|
13200
|
-
* #### {@link https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener removeEventListener(type, listener [, options]);}
|
13201
|
-
* Adds a listener to the end of the listeners array for the specified event.
|
13202
|
-
* @example
|
13203
|
-
* ```js
|
13204
|
-
* const myLayoutContainer = document.getElementById('layout-container');
|
13205
|
-
*
|
13206
|
-
* const listener = function(event) {
|
13207
|
-
* console.log(event.detail);
|
13208
|
-
* console.log('container-created event fired once, removing listener');
|
13209
|
-
* myLayoutContainer.removeEventListener('container-created', listener);
|
13210
|
-
* };
|
13211
|
-
*
|
13212
|
-
* myLayoutContainer.addEventListener('container-created', listener);
|
13213
|
-
* ```
|
13214
|
-
*
|
13215
|
-
* ### Supported event types are:
|
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`.
|
13216
12943
|
*
|
13217
|
-
*
|
13218
|
-
*
|
13219
|
-
* * layout-state-changed
|
13220
|
-
* * tab-closed
|
13221
|
-
* * tab-dropped
|
13222
|
-
*
|
13223
|
-
* ### Layout DOM Node Events
|
13224
|
-
*
|
13225
|
-
* #### tab-created
|
13226
|
-
* 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.
|
13227
|
-
* ```js
|
13228
|
-
* // The response has the following shape in event.detail:
|
13229
|
-
* {
|
13230
|
-
* containerSelector: "container-component_A",
|
13231
|
-
* name: "component_A",
|
13232
|
-
* tabSelector: "tab-component_A",
|
13233
|
-
* topic: "openfin-DOM-event",
|
13234
|
-
* type: "tab-created",
|
13235
|
-
* uuid: "OpenFin POC"
|
13236
|
-
* }
|
13237
|
-
* ```
|
13238
|
-
*
|
13239
|
-
* #### container-created
|
13240
|
-
* 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.
|
13241
|
-
* ```js
|
13242
|
-
* // The response has the following shape in event.detail:
|
13243
|
-
* {
|
13244
|
-
* containerSelector: "container-component_A",
|
13245
|
-
* name: "component_A",
|
13246
|
-
* tabSelector: "tab-component_A",
|
13247
|
-
* topic: "openfin-DOM-event",
|
13248
|
-
* type: "container-created",
|
13249
|
-
* uuid: "OpenFin POC"
|
13250
|
-
* }
|
13251
|
-
* ```
|
13252
|
-
*
|
13253
|
-
* ### layout-state-changed
|
13254
|
-
* 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.
|
13255
|
-
* ```js
|
13256
|
-
* // The response has the following shape in event.detail
|
13257
|
-
* {
|
13258
|
-
* containerSelector: "container-component_A",
|
13259
|
-
* name: "component_A",
|
13260
|
-
* tabSelector: "tab-component_A",
|
13261
|
-
* topic: "openfin-DOM-event",
|
13262
|
-
* type: "layout-state-changed",
|
13263
|
-
* uuid: "OpenFin POC"
|
13264
|
-
* }
|
13265
|
-
* ```
|
12944
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
12945
|
+
* both of these were documented on the same page.
|
13266
12946
|
*
|
13267
|
-
*
|
13268
|
-
* Generated when a tab is closed.
|
13269
|
-
* ```js
|
13270
|
-
* // The response has the following shape in event.detail:
|
13271
|
-
* {
|
13272
|
-
* containerSelector: "container-component_A",
|
13273
|
-
* name: "component_A",
|
13274
|
-
* tabSelector: "tab-component_A",
|
13275
|
-
* topic: "openfin-DOM-event",
|
13276
|
-
* type: "tab-closed",
|
13277
|
-
* uuid: "OpenFin POC",
|
13278
|
-
* url: "http://openfin.co" // The url of the view that was closed.
|
13279
|
-
* }
|
13280
|
-
* ```
|
12947
|
+
* @packageDocumentation
|
13281
12948
|
*
|
13282
|
-
* #### tab-dropped
|
13283
|
-
* Generated when a tab is dropped.
|
13284
|
-
* ```js
|
13285
|
-
* // The response has the following shape in event.detail:
|
13286
|
-
* {
|
13287
|
-
* containerSelector: "container-component_A",
|
13288
|
-
* name: "component_A",
|
13289
|
-
* tabSelector: "tab-component_A",
|
13290
|
-
* topic: "openfin-DOM-event",
|
13291
|
-
* type: "tab-dropped",
|
13292
|
-
* uuid: "OpenFin POC",
|
13293
|
-
* url: "http://openfin.co" // The url of the view linked to the dropped tab.
|
13294
|
-
* }
|
13295
|
-
* ```
|
13296
12949
|
*/
|
13297
12950
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
13298
12951
|
if (k2 === undefined) k2 = k;
|
@@ -13310,13 +12963,17 @@ _LayoutModule_layoutInitializationAttempted = new WeakMap();
|
|
13310
12963
|
};
|
13311
12964
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13312
12965
|
__exportStar(Factory$2, exports);
|
13313
|
-
__exportStar(Instance$1, exports);
|
12966
|
+
__exportStar(Instance$1, exports);
|
13314
12967
|
} (layout));
|
13315
12968
|
|
13316
12969
|
Object.defineProperty(Factory$3, "__esModule", { value: true });
|
13317
|
-
|
12970
|
+
Factory$3.PlatformModule = void 0;
|
12971
|
+
const base_1$4 = base$1;
|
13318
12972
|
const Instance_1$1 = Instance$2;
|
13319
12973
|
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
|
+
*/
|
13320
12977
|
class PlatformModule extends base_1$4.Base {
|
13321
12978
|
/**
|
13322
12979
|
* @internal
|
@@ -13382,14 +13039,12 @@ class PlatformModule extends base_1$4.Base {
|
|
13382
13039
|
* fin.Platform.init({overrideCallback});
|
13383
13040
|
* ```
|
13384
13041
|
* @experimental
|
13385
|
-
* @static
|
13386
13042
|
*/
|
13387
13043
|
async init(options) {
|
13388
13044
|
return this.wire.environment.initPlatform(this.fin, options);
|
13389
13045
|
}
|
13390
13046
|
/**
|
13391
13047
|
* Asynchronously returns a Platform object that represents an existing platform.
|
13392
|
-
* @param identity
|
13393
13048
|
*
|
13394
13049
|
* @example
|
13395
13050
|
* ```js
|
@@ -13398,7 +13053,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13398
13053
|
* // Use wrapped instance to control layout, e.g.:
|
13399
13054
|
* const snapshot = await platform.getSnapshot();
|
13400
13055
|
* ```
|
13401
|
-
* @static
|
13402
13056
|
*/
|
13403
13057
|
async wrap(identity) {
|
13404
13058
|
this.wire.sendAction('platform-wrap').catch((e) => {
|
@@ -13408,7 +13062,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13408
13062
|
}
|
13409
13063
|
/**
|
13410
13064
|
* Synchronously returns a Platform object that represents an existing platform.
|
13411
|
-
* @param identity
|
13412
13065
|
*
|
13413
13066
|
* @example
|
13414
13067
|
* ```js
|
@@ -13417,7 +13070,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13417
13070
|
* // Use wrapped instance to control layout, e.g.:
|
13418
13071
|
* const snapshot = await platform.getSnapshot();
|
13419
13072
|
* ```
|
13420
|
-
* @static
|
13421
13073
|
*/
|
13422
13074
|
wrapSync(identity) {
|
13423
13075
|
this.wire.sendAction('platform-wrap-sync').catch((e) => {
|
@@ -13434,7 +13086,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13434
13086
|
* // Use wrapped instance to control layout, e.g.:
|
13435
13087
|
* const snapshot = await platform.getSnapshot();
|
13436
13088
|
* ```
|
13437
|
-
* @static
|
13438
13089
|
*/
|
13439
13090
|
async getCurrent() {
|
13440
13091
|
this.wire.sendAction('platform-get-current').catch((e) => {
|
@@ -13451,7 +13102,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13451
13102
|
* // Use wrapped instance to control layout, e.g.:
|
13452
13103
|
* const snapshot = await platform.getSnapshot();
|
13453
13104
|
* ```
|
13454
|
-
* @static
|
13455
13105
|
*/
|
13456
13106
|
getCurrentSync() {
|
13457
13107
|
this.wire.sendAction('platform-get-current-sync').catch((e) => {
|
@@ -13462,7 +13112,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13462
13112
|
/**
|
13463
13113
|
* Creates and starts a Platform and returns a wrapped and running Platform instance. The wrapped Platform methods can
|
13464
13114
|
* be used to launch content into the platform. Promise will reject if the platform is already running.
|
13465
|
-
* @param platformOptions
|
13466
13115
|
*
|
13467
13116
|
* @example
|
13468
13117
|
* ```js
|
@@ -13483,7 +13132,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13483
13132
|
* console.error(e);
|
13484
13133
|
* }
|
13485
13134
|
* ```
|
13486
|
-
* @static
|
13487
13135
|
*/
|
13488
13136
|
start(platformOptions) {
|
13489
13137
|
this.wire.sendAction('platform-start').catch((e) => {
|
@@ -13528,7 +13176,6 @@ class PlatformModule extends base_1$4.Base {
|
|
13528
13176
|
* console.error(e);
|
13529
13177
|
* }
|
13530
13178
|
* ```
|
13531
|
-
* @static
|
13532
13179
|
*/
|
13533
13180
|
startFromManifest(manifestUrl, opts) {
|
13534
13181
|
this.wire.sendAction('platform-start-from-manifest').catch((e) => {
|
@@ -13551,18 +13198,9 @@ class PlatformModule extends base_1$4.Base {
|
|
13551
13198
|
});
|
13552
13199
|
}
|
13553
13200
|
}
|
13554
|
-
Factory$3.
|
13201
|
+
Factory$3.PlatformModule = PlatformModule;
|
13555
13202
|
|
13556
13203
|
(function (exports) {
|
13557
|
-
/**
|
13558
|
-
* Entry point for the OpenFin Platform namespace.
|
13559
|
-
*
|
13560
|
-
* Because TypeDoc does not currently support multiple modules with the same name, the module alias "PlatformModule" is used for
|
13561
|
-
* the module containing static members of the `Platform` namespace (available under `fin.Platform`), while `Platform` documents
|
13562
|
-
* instances of the OpenFin `Platform` class.
|
13563
|
-
*
|
13564
|
-
* @packageDocumentation
|
13565
|
-
*/
|
13566
13204
|
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
13567
13205
|
if (k2 === undefined) k2 = k;
|
13568
13206
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
@@ -13578,10 +13216,20 @@ Factory$3.default = PlatformModule;
|
|
13578
13216
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
13579
13217
|
};
|
13580
13218
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13581
|
-
|
13582
|
-
|
13583
|
-
|
13584
|
-
}
|
13219
|
+
/**
|
13220
|
+
* Entry points for the OpenFin `Platform` API (`fin.Platform`)
|
13221
|
+
*
|
13222
|
+
* * {@link PlatformModule} contains static members of the `Platform` API, accessible through `fin.Platform`.
|
13223
|
+
* * {@link Platform} describes an instance of an OpenFin Platform, e.g. as returned by `fin.Platform.getCurrent`.
|
13224
|
+
*
|
13225
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
13226
|
+
* both of these were documented on the same page.
|
13227
|
+
*
|
13228
|
+
* @packageDocumentation
|
13229
|
+
*/
|
13230
|
+
__exportStar(Factory$3, exports);
|
13231
|
+
__exportStar(Instance$2, exports);
|
13232
|
+
} (platform$1));
|
13585
13233
|
|
13586
13234
|
var me = {};
|
13587
13235
|
|
@@ -13589,9 +13237,9 @@ var me = {};
|
|
13589
13237
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13590
13238
|
exports.getMe = exports.getBaseMe = exports.environmentUnsupportedMessage = void 0;
|
13591
13239
|
const view_1 = requireView();
|
13592
|
-
const frame_1 = frame;
|
13240
|
+
const frame_1 = frame$1;
|
13593
13241
|
const window_1 = requireWindow();
|
13594
|
-
const external_application_1 = externalApplication;
|
13242
|
+
const external_application_1 = externalApplication$1;
|
13595
13243
|
exports.environmentUnsupportedMessage = 'You are not running in OpenFin.';
|
13596
13244
|
function getBaseMe(entityType, uuid, name) {
|
13597
13245
|
const entityTypeHelpers = {
|
@@ -13718,7 +13366,7 @@ var me = {};
|
|
13718
13366
|
};
|
13719
13367
|
}
|
13720
13368
|
}
|
13721
|
-
exports.getMe = getMe;
|
13369
|
+
exports.getMe = getMe;
|
13722
13370
|
} (me));
|
13723
13371
|
|
13724
13372
|
var interop = {};
|
@@ -13821,9 +13469,8 @@ function requireSessionContextGroupBroker () {
|
|
13821
13469
|
this.lastContext = context;
|
13822
13470
|
const clientSubscriptionStates = Array.from(this.clients.values());
|
13823
13471
|
clientSubscriptionStates.forEach((client) => {
|
13824
|
-
var _a;
|
13825
13472
|
// eslint-disable-next-line no-unused-expressions
|
13826
|
-
|
13473
|
+
client.contextHandlers.get(context.type)?.forEach((handlerId) => {
|
13827
13474
|
this.provider.dispatch(client.clientIdentity, handlerId, context);
|
13828
13475
|
});
|
13829
13476
|
if (client.globalHandler) {
|
@@ -13957,7 +13604,7 @@ var utils$1 = {};
|
|
13957
13604
|
}
|
13958
13605
|
};
|
13959
13606
|
};
|
13960
|
-
exports.wrapIntentHandler = wrapIntentHandler;
|
13607
|
+
exports.wrapIntentHandler = wrapIntentHandler;
|
13961
13608
|
} (utils$1));
|
13962
13609
|
|
13963
13610
|
var PrivateChannelProvider = {};
|
@@ -14252,7 +13899,7 @@ function requireInteropBroker () {
|
|
14252
13899
|
hasRequiredInteropBroker = 1;
|
14253
13900
|
Object.defineProperty(InteropBroker, "__esModule", { value: true });
|
14254
13901
|
InteropBroker.InteropBroker = void 0;
|
14255
|
-
const base_1 = base;
|
13902
|
+
const base_1 = base$1;
|
14256
13903
|
const SessionContextGroupBroker_1 = requireSessionContextGroupBroker();
|
14257
13904
|
const utils_1 = utils$1;
|
14258
13905
|
const lodash_1 = require$$3;
|
@@ -14430,10 +14077,10 @@ function requireInteropBroker () {
|
|
14430
14077
|
this.getProvider = getProvider;
|
14431
14078
|
this.interopClients = new Map();
|
14432
14079
|
this.contextGroupsById = new Map();
|
14433
|
-
if (options
|
14080
|
+
if (options?.contextGroups) {
|
14434
14081
|
contextGroups = options.contextGroups;
|
14435
14082
|
}
|
14436
|
-
if (options
|
14083
|
+
if (options?.logging) {
|
14437
14084
|
this.logging = options.logging;
|
14438
14085
|
}
|
14439
14086
|
this.intentClientMap = new Map();
|
@@ -14568,18 +14215,17 @@ function requireInteropBroker () {
|
|
14568
14215
|
*
|
14569
14216
|
*/
|
14570
14217
|
getCurrentContext(getCurrentContextOptions, clientIdentity) {
|
14571
|
-
var _a;
|
14572
14218
|
this.wire.sendAction('interop-broker-get-current-context').catch((e) => {
|
14573
14219
|
// don't expose, analytics-only call
|
14574
14220
|
});
|
14575
14221
|
const clientState = this.getClientState(clientIdentity);
|
14576
|
-
if (!
|
14222
|
+
if (!clientState?.contextGroupId) {
|
14577
14223
|
throw new Error('You must be a member of a context group to call getCurrentContext');
|
14578
14224
|
}
|
14579
14225
|
const { contextGroupId } = clientState;
|
14580
14226
|
const contextGroupState = this.contextGroupsById.get(contextGroupId);
|
14581
14227
|
const lastContextType = this.lastContextMap.get(contextGroupId);
|
14582
|
-
const contextType =
|
14228
|
+
const contextType = getCurrentContextOptions?.contextType ?? lastContextType;
|
14583
14229
|
return contextGroupState && contextType ? contextGroupState.get(contextType) : undefined;
|
14584
14230
|
}
|
14585
14231
|
/*
|
@@ -14827,7 +14473,8 @@ function requireInteropBroker () {
|
|
14827
14473
|
* ```
|
14828
14474
|
*/
|
14829
14475
|
// eslint-disable-next-line class-methods-use-this
|
14830
|
-
async handleFiredIntent(intent, clientIdentity)
|
14476
|
+
async handleFiredIntent(intent, clientIdentity // TODO(CORE-811): remove inline intersected type
|
14477
|
+
) {
|
14831
14478
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.raiseIntent', 'InteropBroker.handleFiredIntent', clientIdentity, 'interopClient.fireIntent');
|
14832
14479
|
console.warn(warning);
|
14833
14480
|
throw new Error(utils_1.BROKER_ERRORS.fireIntent);
|
@@ -14894,7 +14541,7 @@ function requireInteropBroker () {
|
|
14894
14541
|
* More information on the AppIntent type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/AppIntent).
|
14895
14542
|
*
|
14896
14543
|
* @param options
|
14897
|
-
* @param
|
14544
|
+
* @param clientIdentity Identity of the Client making the request.
|
14898
14545
|
*
|
14899
14546
|
* @example
|
14900
14547
|
* ```js
|
@@ -14911,7 +14558,8 @@ function requireInteropBroker () {
|
|
14911
14558
|
* ```
|
14912
14559
|
*/
|
14913
14560
|
// eslint-disable-next-line class-methods-use-this
|
14914
|
-
async handleInfoForIntent(options, clientIdentity)
|
14561
|
+
async handleInfoForIntent(options, clientIdentity // TODO(CORE-811): remove inline intersected type
|
14562
|
+
) {
|
14915
14563
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntent', 'InteropBroker.handleInfoForIntent', clientIdentity, 'interopClient.getInfoForIntent');
|
14916
14564
|
console.warn(warning);
|
14917
14565
|
throw new Error(utils_1.BROKER_ERRORS.getInfoForIntent);
|
@@ -14957,7 +14605,8 @@ function requireInteropBroker () {
|
|
14957
14605
|
* ```
|
14958
14606
|
*/
|
14959
14607
|
// eslint-disable-next-line class-methods-use-this
|
14960
|
-
async handleInfoForIntentsByContext(context, clientIdentity)
|
14608
|
+
async handleInfoForIntentsByContext(context, clientIdentity // TODO(CORE-811): remove inline intersected type
|
14609
|
+
) {
|
14961
14610
|
const warning = (0, utils_1.generateOverrideWarning)('fdc3.findIntentsByContext', 'InteropBroker.handleInfoForIntentsByContext', clientIdentity, 'interopClient.getInfoForIntentsByContext');
|
14962
14611
|
console.warn(warning);
|
14963
14612
|
throw new Error(utils_1.BROKER_ERRORS.getInfoForIntentsByContext);
|
@@ -14983,7 +14632,7 @@ function requireInteropBroker () {
|
|
14983
14632
|
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
|
14984
14633
|
*
|
14985
14634
|
* @param contextForIntent Data passed between entities and applications.
|
14986
|
-
* @param
|
14635
|
+
* @param clientIdentity Identity of the Client making the request.
|
14987
14636
|
*
|
14988
14637
|
* @example
|
14989
14638
|
* ```js
|
@@ -15044,7 +14693,7 @@ function requireInteropBroker () {
|
|
15044
14693
|
/**
|
15045
14694
|
* Responsible for resolving the fdc3.findInstances call.
|
15046
14695
|
* Must be overridden
|
15047
|
-
* @param
|
14696
|
+
* @param app AppIdentifier that was passed to fdc3.findInstances
|
15048
14697
|
* @param clientIdentity Identity of the Client making the request.
|
15049
14698
|
*/
|
15050
14699
|
// eslint-disable-next-line class-methods-use-this
|
@@ -15079,7 +14728,7 @@ function requireInteropBroker () {
|
|
15079
14728
|
* fin.Platform.init({
|
15080
14729
|
* interopOverride: async (InteropBroker) => {
|
15081
14730
|
* class Override extends InteropBroker {
|
15082
|
-
* async invokeContextHandler(
|
14731
|
+
* async invokeContextHandler(clientIdentity, handlerId, context) {
|
15083
14732
|
* return super.invokeContextHandler(clientIdentity, handlerId, {
|
15084
14733
|
* ...context,
|
15085
14734
|
* contextMetadata: {
|
@@ -15119,7 +14768,7 @@ function requireInteropBroker () {
|
|
15119
14768
|
* fin.Platform.init({
|
15120
14769
|
* interopOverride: async (InteropBroker) => {
|
15121
14770
|
* class Override extends InteropBroker {
|
15122
|
-
* async invokeIntentHandler(
|
14771
|
+
* async invokeIntentHandler(clientIdentity, handlerId, context) {
|
15123
14772
|
* const { context } = intent;
|
15124
14773
|
* return super.invokeIntentHandler(clientIdentity, handlerId, {
|
15125
14774
|
* ...intent,
|
@@ -15227,10 +14876,9 @@ function requireInteropBroker () {
|
|
15227
14876
|
}
|
15228
14877
|
// Used to restore interop broker state in snapshots.
|
15229
14878
|
applySnapshot(snapshot, options) {
|
15230
|
-
|
15231
|
-
const contextGroupStates = (_a = snapshot === null || snapshot === void 0 ? void 0 : snapshot.interopSnapshotDetails) === null || _a === void 0 ? void 0 : _a.contextGroupStates;
|
14879
|
+
const contextGroupStates = snapshot?.interopSnapshotDetails?.contextGroupStates;
|
15232
14880
|
if (contextGroupStates) {
|
15233
|
-
if (!
|
14881
|
+
if (!options?.closeExistingWindows) {
|
15234
14882
|
this.updateExistingClients(contextGroupStates);
|
15235
14883
|
}
|
15236
14884
|
this.rehydrateContextGroupStates(contextGroupStates);
|
@@ -15281,7 +14929,7 @@ function requireInteropBroker () {
|
|
15281
14929
|
contextHandlerRegistered({ contextType, handlerId }, clientIdentity) {
|
15282
14930
|
const handlerInfo = { contextType, handlerId };
|
15283
14931
|
const clientState = this.getClientState(clientIdentity);
|
15284
|
-
clientState
|
14932
|
+
clientState?.contextHandlers.set(handlerId, handlerInfo);
|
15285
14933
|
if (clientState && clientState.contextGroupId) {
|
15286
14934
|
const { contextGroupId } = clientState;
|
15287
14935
|
const contextGroupMap = this.contextGroupsById.get(contextGroupId);
|
@@ -15303,7 +14951,7 @@ function requireInteropBroker () {
|
|
15303
14951
|
async intentHandlerRegistered(payload, clientIdentity) {
|
15304
14952
|
const { handlerId } = payload;
|
15305
14953
|
const clientIntentInfo = this.intentClientMap.get(clientIdentity.name);
|
15306
|
-
const handlerInfo = clientIntentInfo
|
14954
|
+
const handlerInfo = clientIntentInfo?.get(handlerId);
|
15307
14955
|
if (!clientIntentInfo) {
|
15308
14956
|
this.intentClientMap.set(clientIdentity.name, new Map());
|
15309
14957
|
const newHandlerInfoMap = this.intentClientMap.get(clientIdentity.name);
|
@@ -15458,7 +15106,8 @@ function requireInteropBroker () {
|
|
15458
15106
|
}
|
15459
15107
|
// Setup Channel Connection Logic
|
15460
15108
|
wireChannel(channel) {
|
15461
|
-
channel.onConnection(async (clientIdentity,
|
15109
|
+
channel.onConnection(async (clientIdentity, // TODO(CORE-811): remove inline intersected type
|
15110
|
+
payload) => {
|
15462
15111
|
if (!(await this.isConnectionAuthorized(clientIdentity, payload))) {
|
15463
15112
|
throw new Error(`Connection not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
|
15464
15113
|
}
|
@@ -15471,8 +15120,8 @@ function requireInteropBroker () {
|
|
15471
15120
|
clientIdentity
|
15472
15121
|
};
|
15473
15122
|
// Only allow the client to join a contextGroup that actually exists.
|
15474
|
-
if (
|
15475
|
-
clientSubscriptionState.contextGroupId = payload
|
15123
|
+
if (payload?.currentContextGroup && this.contextGroupsById.has(payload.currentContextGroup)) {
|
15124
|
+
clientSubscriptionState.contextGroupId = payload?.currentContextGroup;
|
15476
15125
|
}
|
15477
15126
|
this.interopClients.set(clientIdentity.endpointId, clientSubscriptionState);
|
15478
15127
|
});
|
@@ -15490,17 +15139,15 @@ function requireInteropBroker () {
|
|
15490
15139
|
this.clientDisconnected(clientIdentity);
|
15491
15140
|
});
|
15492
15141
|
channel.beforeAction(async (action, payload, clientIdentity) => {
|
15493
|
-
var _a, _b;
|
15494
15142
|
if (!(await this.isActionAuthorized(action, payload, clientIdentity))) {
|
15495
15143
|
throw new Error(`Action (${action}) not authorized for ${clientIdentity.uuid}, ${clientIdentity.name}`);
|
15496
15144
|
}
|
15497
|
-
if (
|
15145
|
+
if (this.logging?.beforeAction?.enabled) {
|
15498
15146
|
console.log(action, payload, clientIdentity);
|
15499
15147
|
}
|
15500
15148
|
});
|
15501
15149
|
channel.afterAction((action, payload, clientIdentity) => {
|
15502
|
-
|
15503
|
-
if ((_b = (_a = this.logging) === null || _a === void 0 ? void 0 : _a.afterAction) === null || _b === void 0 ? void 0 : _b.enabled) {
|
15150
|
+
if (this.logging?.afterAction?.enabled) {
|
15504
15151
|
console.log(action, payload, clientIdentity);
|
15505
15152
|
}
|
15506
15153
|
});
|
@@ -15582,7 +15229,7 @@ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
15582
15229
|
};
|
15583
15230
|
var _SessionContextGroupClient_clientPromise;
|
15584
15231
|
Object.defineProperty(SessionContextGroupClient$1, "__esModule", { value: true });
|
15585
|
-
const base_1$3 = base;
|
15232
|
+
const base_1$3 = base$1;
|
15586
15233
|
const utils_1$3 = utils$1;
|
15587
15234
|
class SessionContextGroupClient extends base_1$3.Base {
|
15588
15235
|
constructor(wire, client, id) {
|
@@ -15669,7 +15316,7 @@ var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
15669
15316
|
var _InteropClient_clientPromise, _InteropClient_sessionContextGroups;
|
15670
15317
|
Object.defineProperty(InteropClient$1, "__esModule", { value: true });
|
15671
15318
|
InteropClient$1.InteropClient = void 0;
|
15672
|
-
const base_1$2 = base;
|
15319
|
+
const base_1$2 = base$1;
|
15673
15320
|
const SessionContextGroupClient_1 = SessionContextGroupClient$1;
|
15674
15321
|
const utils_1$2 = utils$1;
|
15675
15322
|
/**
|
@@ -16338,39 +15985,45 @@ class InteropClient extends base_1$2.Base {
|
|
16338
15985
|
InteropClient$1.InteropClient = InteropClient;
|
16339
15986
|
_InteropClient_clientPromise = new WeakMap(), _InteropClient_sessionContextGroups = new WeakMap();
|
16340
15987
|
|
16341
|
-
var overrideCheck
|
15988
|
+
var overrideCheck = {};
|
16342
15989
|
|
16343
|
-
|
16344
|
-
|
16345
|
-
|
16346
|
-
|
16347
|
-
|
16348
|
-
|
16349
|
-
|
16350
|
-
|
16351
|
-
|
16352
|
-
|
16353
|
-
|
16354
|
-
|
16355
|
-
|
16356
|
-
|
16357
|
-
|
16358
|
-
|
16359
|
-
|
16360
|
-
|
16361
|
-
|
16362
|
-
|
16363
|
-
|
16364
|
-
|
16365
|
-
|
16366
|
-
|
16367
|
-
|
16368
|
-
|
16369
|
-
|
16370
|
-
|
16371
|
-
|
15990
|
+
var hasRequiredOverrideCheck;
|
15991
|
+
|
15992
|
+
function requireOverrideCheck () {
|
15993
|
+
if (hasRequiredOverrideCheck) return overrideCheck;
|
15994
|
+
hasRequiredOverrideCheck = 1;
|
15995
|
+
Object.defineProperty(overrideCheck, "__esModule", { value: true });
|
15996
|
+
overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
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;
|
16372
16026
|
}
|
16373
|
-
overrideCheck$1.overrideCheck = overrideCheck;
|
16374
16027
|
|
16375
16028
|
var hasRequiredFactory;
|
16376
16029
|
|
@@ -16378,12 +16031,13 @@ function requireFactory () {
|
|
16378
16031
|
if (hasRequiredFactory) return Factory$1;
|
16379
16032
|
hasRequiredFactory = 1;
|
16380
16033
|
Object.defineProperty(Factory$1, "__esModule", { value: true });
|
16034
|
+
Factory$1.InteropModule = void 0;
|
16381
16035
|
const lodash_1 = require$$3;
|
16382
16036
|
const inaccessibleObject_1 = inaccessibleObject;
|
16383
|
-
const base_1 = base;
|
16037
|
+
const base_1 = base$1;
|
16384
16038
|
const InteropBroker_1 = requireInteropBroker();
|
16385
16039
|
const InteropClient_1 = InteropClient$1;
|
16386
|
-
const overrideCheck_1 =
|
16040
|
+
const overrideCheck_1 = requireOverrideCheck();
|
16387
16041
|
const common_utils_1 = commonUtils;
|
16388
16042
|
const defaultOverride = (Class) => new Class();
|
16389
16043
|
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.';
|
@@ -16414,16 +16068,14 @@ function requireFactory () {
|
|
16414
16068
|
* const contextGroups = await interopBroker.getContextGroups();
|
16415
16069
|
* console.log(contextGroups);
|
16416
16070
|
* ```
|
16417
|
-
* @static
|
16418
16071
|
*/
|
16419
16072
|
async init(name, override = defaultOverride) {
|
16420
|
-
var _a;
|
16421
16073
|
this.wire.sendAction('interop-init').catch(() => {
|
16422
16074
|
// don't expose, analytics-only call
|
16423
16075
|
});
|
16424
16076
|
// Allows for manifest-level configuration, without having to override. (e.g. specifying custom context groups)
|
16425
16077
|
const options = await this.fin.Application.getCurrentSync().getInfo();
|
16426
|
-
const opts =
|
16078
|
+
const opts = options.initialOptions.interopBrokerConfiguration ?? {};
|
16427
16079
|
const objectThatThrows = (0, inaccessibleObject_1.createUnusableObject)(BrokerParamAccessError);
|
16428
16080
|
const warningOptsClone = (0, inaccessibleObject_1.createWarningObject)(BrokerParamAccessError, (0, lodash_1.cloneDeep)(opts));
|
16429
16081
|
let provider;
|
@@ -16472,7 +16124,6 @@ function requireFactory () {
|
|
16472
16124
|
* const contextGroupInfo = await client.getInfoForContextGroup();
|
16473
16125
|
* console.log(contextGroupInfo);
|
16474
16126
|
* ```
|
16475
|
-
* @static
|
16476
16127
|
*/
|
16477
16128
|
connectSync(name, interopConfig) {
|
16478
16129
|
this.wire.sendAction('interop-connect-sync').catch(() => {
|
@@ -16481,7 +16132,7 @@ function requireFactory () {
|
|
16481
16132
|
return new InteropClient_1.InteropClient(this.wire, name, interopConfig);
|
16482
16133
|
}
|
16483
16134
|
}
|
16484
|
-
Factory$1.
|
16135
|
+
Factory$1.InteropModule = InteropModule;
|
16485
16136
|
return Factory$1;
|
16486
16137
|
}
|
16487
16138
|
|
@@ -16492,10 +16143,10 @@ function requireInterop () {
|
|
16492
16143
|
hasRequiredInterop = 1;
|
16493
16144
|
(function (exports) {
|
16494
16145
|
/**
|
16495
|
-
* Entry point for the OpenFin Interop
|
16146
|
+
* Entry point for the OpenFin `Interop` API (`fin.Interop`).
|
16496
16147
|
*
|
16497
|
-
*
|
16498
|
-
*
|
16148
|
+
* * {@link InteropModule} contains static members of the `Interop` API (available under `fin.Interop`)
|
16149
|
+
* * {@link InteropClient} and {@link InteropBroker} document instances of their respective classes.
|
16499
16150
|
*
|
16500
16151
|
* @packageDocumentation
|
16501
16152
|
*/
|
@@ -16514,11 +16165,10 @@ function requireInterop () {
|
|
16514
16165
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
16515
16166
|
};
|
16516
16167
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16517
|
-
|
16518
|
-
exports.default = Factory_1.default;
|
16168
|
+
__exportStar(requireFactory(), exports);
|
16519
16169
|
__exportStar(InteropClient$1, exports);
|
16520
|
-
__exportStar(requireInteropBroker(), exports);
|
16521
|
-
} (interop));
|
16170
|
+
__exportStar(requireInteropBroker(), exports);
|
16171
|
+
} (interop));
|
16522
16172
|
return interop;
|
16523
16173
|
}
|
16524
16174
|
|
@@ -16551,12 +16201,14 @@ var _SnapshotSource_identity, _SnapshotSource_getConnection, _SnapshotSource_get
|
|
16551
16201
|
Object.defineProperty(Instance, "__esModule", { value: true });
|
16552
16202
|
Instance.SnapshotSource = void 0;
|
16553
16203
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
16554
|
-
const base_1$1 = base;
|
16204
|
+
const base_1$1 = base$1;
|
16555
16205
|
const utils_1$1 = utils;
|
16556
16206
|
const connectionMap = new Map();
|
16557
16207
|
/**
|
16558
16208
|
* Enables configuring a SnapshotSource with custom getSnapshot and applySnapshot methods.
|
16559
16209
|
*
|
16210
|
+
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
16211
|
+
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
16560
16212
|
*/
|
16561
16213
|
class SnapshotSource extends base_1$1.Base {
|
16562
16214
|
/**
|
@@ -16691,13 +16343,19 @@ Instance.SnapshotSource = SnapshotSource;
|
|
16691
16343
|
_SnapshotSource_identity = new WeakMap(), _SnapshotSource_getConnection = new WeakMap(), _SnapshotSource_getClient = new WeakMap(), _SnapshotSource_startConnection = new WeakMap(), _SnapshotSource_setUpConnectionListener = new WeakMap();
|
16692
16344
|
|
16693
16345
|
Object.defineProperty(Factory, "__esModule", { value: true });
|
16694
|
-
|
16346
|
+
Factory.SnapshotSourceModule = void 0;
|
16347
|
+
const base_1 = base$1;
|
16695
16348
|
const Instance_1 = Instance;
|
16696
16349
|
const utils_1 = utils;
|
16350
|
+
/**
|
16351
|
+
* Static namespace for OpenFin API methods that interact with the {@link SnapshotSource} class, available under `fin.SnapshotSource`.
|
16352
|
+
*/
|
16697
16353
|
class SnapshotSourceModule extends base_1.Base {
|
16698
16354
|
/**
|
16699
16355
|
* Initializes a SnapshotSource with the getSnapshot and applySnapshot methods defined.
|
16700
|
-
*
|
16356
|
+
*
|
16357
|
+
* @typeParam Snapshot Implementation-defined shape of an application snapshot. Allows
|
16358
|
+
* custom snapshot implementations for legacy applications to define their own snapshot format.
|
16701
16359
|
*
|
16702
16360
|
* @example
|
16703
16361
|
* ```js
|
@@ -16714,7 +16372,7 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16714
16372
|
*
|
16715
16373
|
* await fin.SnapshotSource.init(snapshotProvider);
|
16716
16374
|
* ```
|
16717
|
-
*
|
16375
|
+
*
|
16718
16376
|
*/
|
16719
16377
|
async init(provider) {
|
16720
16378
|
this.wire.sendAction('snapshot-source-init').catch((e) => {
|
@@ -16734,7 +16392,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16734
16392
|
}
|
16735
16393
|
/**
|
16736
16394
|
* Synchronously returns a SnapshotSource object that represents the current SnapshotSource.
|
16737
|
-
* @param identity
|
16738
16395
|
*
|
16739
16396
|
* @example
|
16740
16397
|
* ```js
|
@@ -16742,7 +16399,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16742
16399
|
* // Use wrapped instance's getSnapshot method, e.g.:
|
16743
16400
|
* const snapshot = await snapshotSource.getSnapshot();
|
16744
16401
|
* ```
|
16745
|
-
* @static
|
16746
16402
|
*/
|
16747
16403
|
wrapSync(identity) {
|
16748
16404
|
this.wire.sendAction('snapshot-source-wrap-sync').catch((e) => {
|
@@ -16752,7 +16408,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16752
16408
|
}
|
16753
16409
|
/**
|
16754
16410
|
* Asynchronously returns a SnapshotSource object that represents the current SnapshotSource.
|
16755
|
-
* @param identity
|
16756
16411
|
*
|
16757
16412
|
* @example
|
16758
16413
|
* ```js
|
@@ -16760,7 +16415,6 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16760
16415
|
* // Use wrapped instance's getSnapshot method, e.g.:
|
16761
16416
|
* const snapshot = await snapshotSource.getSnapshot();
|
16762
16417
|
* ```
|
16763
|
-
* @static
|
16764
16418
|
*/
|
16765
16419
|
async wrap(identity) {
|
16766
16420
|
this.wire.sendAction('snapshot-source-wrap').catch((e) => {
|
@@ -16769,15 +16423,17 @@ class SnapshotSourceModule extends base_1.Base {
|
|
16769
16423
|
return this.wrapSync(identity);
|
16770
16424
|
}
|
16771
16425
|
}
|
16772
|
-
Factory.
|
16426
|
+
Factory.SnapshotSourceModule = SnapshotSourceModule;
|
16773
16427
|
|
16774
16428
|
(function (exports) {
|
16775
16429
|
/**
|
16776
|
-
* Entry
|
16430
|
+
* Entry points for the OpenFin `SnapshotSource` API (`fin.SnapshotSource`).
|
16777
16431
|
*
|
16778
|
-
*
|
16779
|
-
*
|
16780
|
-
*
|
16432
|
+
* * {@link SnapshotSourceModule} contains static members of the `SnapshotSource` API, accessible through `fin.SnapshotSource`.
|
16433
|
+
* * {@link SnapshotSource} describes an instance of an OpenFin SnapshotSource, e.g. as returned by `fin.SnapshotSource.wrap`.
|
16434
|
+
*
|
16435
|
+
* These are separate code entities, and are documented separately. In the [previous version of the API documentation](https://cdn.openfin.co/docs/javascript/canary/index.html),
|
16436
|
+
* both of these were documented on the same page.
|
16781
16437
|
*
|
16782
16438
|
* @packageDocumentation
|
16783
16439
|
*/
|
@@ -16796,27 +16452,30 @@ Factory.default = SnapshotSourceModule;
|
|
16796
16452
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
16797
16453
|
};
|
16798
16454
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16799
|
-
|
16800
|
-
exports
|
16801
|
-
__exportStar(Instance, exports);
|
16455
|
+
__exportStar(Factory, exports);
|
16456
|
+
__exportStar(Instance, exports);
|
16802
16457
|
} (snapshotSource));
|
16803
16458
|
|
16804
16459
|
Object.defineProperty(fin, "__esModule", { value: true });
|
16805
|
-
|
16460
|
+
fin.Fin = void 0;
|
16461
|
+
const events_1$3 = require$$0;
|
16806
16462
|
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
16807
|
-
const index_1 = system;
|
16463
|
+
const index_1 = system$1;
|
16808
16464
|
const index_2 = requireWindow();
|
16809
16465
|
const index_3 = requireApplication();
|
16810
16466
|
const index_4 = interappbus;
|
16811
16467
|
const index_5 = clipboard;
|
16812
|
-
const index_6 = externalApplication;
|
16813
|
-
const index_7 = frame;
|
16814
|
-
const index_8 = globalHotkey;
|
16468
|
+
const index_6 = externalApplication$1;
|
16469
|
+
const index_7 = frame$1;
|
16470
|
+
const index_8 = globalHotkey$1;
|
16815
16471
|
const index_9 = requireView();
|
16816
|
-
const index_10 = platform;
|
16472
|
+
const index_10 = platform$1;
|
16817
16473
|
const me_1$1 = me;
|
16818
16474
|
const interop_1 = requireInterop();
|
16819
16475
|
const snapshot_source_1 = snapshotSource;
|
16476
|
+
/**
|
16477
|
+
* @internal
|
16478
|
+
*/
|
16820
16479
|
class Fin extends events_1$3.EventEmitter {
|
16821
16480
|
/**
|
16822
16481
|
* @internal
|
@@ -16824,18 +16483,18 @@ class Fin extends events_1$3.EventEmitter {
|
|
16824
16483
|
constructor(wire) {
|
16825
16484
|
super();
|
16826
16485
|
this.wire = wire;
|
16827
|
-
this.System = new index_1.
|
16828
|
-
this.Window = new index_2.
|
16829
|
-
this.Application = new index_3.
|
16830
|
-
this.InterApplicationBus = new index_4.
|
16831
|
-
this.Clipboard = new index_5.
|
16832
|
-
this.ExternalApplication = new index_6.
|
16833
|
-
this.Frame = new index_7.
|
16834
|
-
this.GlobalHotkey = new index_8.
|
16835
|
-
this.Platform = new index_10.
|
16836
|
-
this.View = new index_9.
|
16837
|
-
this.Interop = new interop_1.
|
16838
|
-
this.SnapshotSource = new snapshot_source_1.
|
16486
|
+
this.System = new index_1.System(wire);
|
16487
|
+
this.Window = new index_2._WindowModule(wire);
|
16488
|
+
this.Application = new index_3.ApplicationModule(wire);
|
16489
|
+
this.InterApplicationBus = new index_4.InterApplicationBus(wire);
|
16490
|
+
this.Clipboard = new index_5.Clipboard(wire);
|
16491
|
+
this.ExternalApplication = new index_6.ExternalApplicationModule(wire);
|
16492
|
+
this.Frame = new index_7._FrameModule(wire);
|
16493
|
+
this.GlobalHotkey = new index_8.GlobalHotkey(wire);
|
16494
|
+
this.Platform = new index_10.PlatformModule(wire, this.InterApplicationBus.Channel);
|
16495
|
+
this.View = new index_9.ViewModule(wire);
|
16496
|
+
this.Interop = new interop_1.InteropModule(wire);
|
16497
|
+
this.SnapshotSource = new snapshot_source_1.SnapshotSourceModule(wire);
|
16839
16498
|
wire.registerFin(this);
|
16840
16499
|
this.me = (0, me_1$1.getMe)(wire);
|
16841
16500
|
// Handle disconnect events
|
@@ -16844,7 +16503,7 @@ class Fin extends events_1$3.EventEmitter {
|
|
16844
16503
|
});
|
16845
16504
|
}
|
16846
16505
|
}
|
16847
|
-
fin.
|
16506
|
+
fin.Fin = Fin;
|
16848
16507
|
|
16849
16508
|
var wire = {};
|
16850
16509
|
|
@@ -16905,8 +16564,8 @@ var http = {};
|
|
16905
16564
|
(function (exports) {
|
16906
16565
|
Object.defineProperty(exports, "__esModule", { value: true });
|
16907
16566
|
exports.fetchJson = exports.downloadFile = exports.fetch = exports.getRequestOptions = exports.getProxy = void 0;
|
16908
|
-
const node_url_1 = require$$0; // This must explicitly use node builtin to avoid accidentally bundling npm:url.
|
16909
|
-
const fs = require$$0$
|
16567
|
+
const node_url_1 = require$$0$1; // This must explicitly use node builtin to avoid accidentally bundling npm:url.
|
16568
|
+
const fs = require$$0$2;
|
16910
16569
|
const getProxyVar = () => {
|
16911
16570
|
return process.env.HTTPS_PROXY || process.env.https_proxy || process.env.HTTP_PROXY || process.env.http_proxy;
|
16912
16571
|
};
|
@@ -16991,13 +16650,13 @@ var http = {};
|
|
16991
16650
|
const res = await (0, exports.fetch)(url);
|
16992
16651
|
return JSON.parse(res);
|
16993
16652
|
};
|
16994
|
-
exports.fetchJson = fetchJson;
|
16653
|
+
exports.fetchJson = fetchJson;
|
16995
16654
|
} (http));
|
16996
16655
|
|
16997
16656
|
Object.defineProperty(util, "__esModule", { value: true });
|
16998
16657
|
util.resolveDir = util.first = util.resolveRuntimeVersion = util.rmDir = util.unzip = util.exists = void 0;
|
16999
|
-
const path$1 = require$$0$
|
17000
|
-
const fs$1 = require$$0$
|
16658
|
+
const path$1 = require$$0$3;
|
16659
|
+
const fs$1 = require$$0$2;
|
17001
16660
|
const child_process_1$1 = require$$2;
|
17002
16661
|
const promises_1$1 = promises;
|
17003
16662
|
const http_1$1 = http;
|
@@ -17099,7 +16758,7 @@ async function resolveDir(base, paths) {
|
|
17099
16758
|
util.resolveDir = resolveDir;
|
17100
16759
|
|
17101
16760
|
Object.defineProperty(winLaunch, "__esModule", { value: true });
|
17102
|
-
const path = require$$0$
|
16761
|
+
const path = require$$0$3;
|
17103
16762
|
const child_process_1 = require$$2;
|
17104
16763
|
const util_1 = util;
|
17105
16764
|
function launchRVM(config, manifestLocation, namedPipeName, rvm) {
|
@@ -17121,7 +16780,7 @@ function launchRVM(config, manifestLocation, namedPipeName, rvm) {
|
|
17121
16780
|
async function checkRvmPath() {
|
17122
16781
|
let rvmPath = path.resolve(process.env.LOCALAPPDATA, 'OpenFin', 'OpenFinRVM.exe');
|
17123
16782
|
if (!(await (0, util_1.exists)(rvmPath))) {
|
17124
|
-
rvmPath = path.join(__dirname, '..', '
|
16783
|
+
rvmPath = path.join(__dirname, '..', 'resources', 'win', 'OpenFinRVM.exe');
|
17125
16784
|
}
|
17126
16785
|
return rvmPath;
|
17127
16786
|
}
|
@@ -17183,8 +16842,8 @@ function requireServices () {
|
|
17183
16842
|
const startServices = async (services) => {
|
17184
16843
|
await (0, promises_1.promiseMapSerial)(services, exports.launchService);
|
17185
16844
|
};
|
17186
|
-
exports.startServices = startServices;
|
17187
|
-
} (services));
|
16845
|
+
exports.startServices = startServices;
|
16846
|
+
} (services));
|
17188
16847
|
return services;
|
17189
16848
|
}
|
17190
16849
|
|
@@ -17195,8 +16854,8 @@ function requireNixLaunch () {
|
|
17195
16854
|
hasRequiredNixLaunch = 1;
|
17196
16855
|
Object.defineProperty(nixLaunch, "__esModule", { value: true });
|
17197
16856
|
nixLaunch.install = nixLaunch.getRuntimePath = nixLaunch.download = nixLaunch.getUrl = void 0;
|
17198
|
-
const fs = require$$0$
|
17199
|
-
const path = require$$0$
|
16857
|
+
const fs = require$$0$2;
|
16858
|
+
const path = require$$0$3;
|
17200
16859
|
const child_process_1 = require$$2;
|
17201
16860
|
const promises_1 = promises;
|
17202
16861
|
const util_1 = util;
|
@@ -17303,8 +16962,8 @@ function requireLauncher () {
|
|
17303
16962
|
if (hasRequiredLauncher) return launcher;
|
17304
16963
|
hasRequiredLauncher = 1;
|
17305
16964
|
Object.defineProperty(launcher, "__esModule", { value: true });
|
17306
|
-
const os = require$$0$
|
17307
|
-
const path = require$$0$
|
16965
|
+
const os = require$$0$4;
|
16966
|
+
const path = require$$0$3;
|
17308
16967
|
const win_launch_1 = winLaunch;
|
17309
16968
|
const nix_launch_1 = requireNixLaunch();
|
17310
16969
|
class Launcher {
|
@@ -17379,10 +17038,10 @@ function requirePortDiscovery () {
|
|
17379
17038
|
hasRequiredPortDiscovery = 1;
|
17380
17039
|
Object.defineProperty(portDiscovery, "__esModule", { value: true });
|
17381
17040
|
/* eslint-disable @typescript-eslint/naming-convention */
|
17382
|
-
const fs = require$$0$
|
17041
|
+
const fs = require$$0$2;
|
17383
17042
|
const net = require$$1;
|
17384
|
-
const path = require$$0$
|
17385
|
-
const os = require$$0$
|
17043
|
+
const path = require$$0$3;
|
17044
|
+
const os = require$$0$4;
|
17386
17045
|
const timers_1 = require$$4;
|
17387
17046
|
const wire_1 = wire;
|
17388
17047
|
const launcher_1 = requireLauncher();
|
@@ -17657,12 +17316,17 @@ function requireNodeEnv () {
|
|
17657
17316
|
hasRequiredNodeEnv = 1;
|
17658
17317
|
Object.defineProperty(nodeEnv, "__esModule", { value: true });
|
17659
17318
|
/* eslint-disable class-methods-use-this */
|
17660
|
-
const fs_1 = require$$0$
|
17319
|
+
const fs_1 = require$$0$2;
|
17661
17320
|
const crypto_1 = require$$1$1;
|
17662
|
-
const
|
17321
|
+
const _WS = require$$2$1;
|
17663
17322
|
const environment_1 = environment;
|
17664
17323
|
const port_discovery_1 = requirePortDiscovery();
|
17665
17324
|
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;
|
17666
17330
|
class NodeEnvironment {
|
17667
17331
|
constructor() {
|
17668
17332
|
this.messageCounter = 0;
|
@@ -17737,7 +17401,7 @@ var emitterMap = {};
|
|
17737
17401
|
|
17738
17402
|
Object.defineProperty(emitterMap, "__esModule", { value: true });
|
17739
17403
|
emitterMap.EmitterMap = void 0;
|
17740
|
-
const events_1$2 =
|
17404
|
+
const events_1$2 = require$$0;
|
17741
17405
|
class EmitterMap {
|
17742
17406
|
constructor() {
|
17743
17407
|
this.storage = new Map();
|
@@ -17819,7 +17483,7 @@ var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFie
|
|
17819
17483
|
var _Transport_wire, _Transport_fin;
|
17820
17484
|
Object.defineProperty(transport, "__esModule", { value: true });
|
17821
17485
|
transport.Transport = void 0;
|
17822
|
-
const events_1$1 =
|
17486
|
+
const events_1$1 = require$$0;
|
17823
17487
|
const wire_1$1 = wire;
|
17824
17488
|
const transport_errors_1$1 = transportErrors;
|
17825
17489
|
const eventAggregator_1 = eventAggregator;
|
@@ -18027,7 +17691,7 @@ _Transport_wire = new WeakMap(), _Transport_fin = new WeakMap();
|
|
18027
17691
|
var websocket = {};
|
18028
17692
|
|
18029
17693
|
Object.defineProperty(websocket, "__esModule", { value: true });
|
18030
|
-
const events_1 =
|
17694
|
+
const events_1 = require$$0;
|
18031
17695
|
const transport_errors_1 = transportErrors;
|
18032
17696
|
/* `READY_STATE` is an instance var set by `constructor` to reference the `WebTransportSocket.READY_STATE` enum.
|
18033
17697
|
* This is syntactic sugar that makes the enum accessible through the `wire` property of the various `fin` singletons.
|
@@ -18087,8 +17751,8 @@ var normalizeConfig$1 = {};
|
|
18087
17751
|
|
18088
17752
|
Object.defineProperty(normalizeConfig$1, "__esModule", { value: true });
|
18089
17753
|
normalizeConfig$1.validateConfig = normalizeConfig$1.normalizeConfig = void 0;
|
18090
|
-
const fs = require$$0$
|
18091
|
-
const node_url_1 = require$$0; // This must explicitly use node builtin to avoid accidentally bundling npm:url
|
17754
|
+
const fs = require$$0$2;
|
17755
|
+
const node_url_1 = require$$0$1; // This must explicitly use node builtin to avoid accidentally bundling npm:url
|
18092
17756
|
const wire_1 = wire;
|
18093
17757
|
const promises_1 = promises;
|
18094
17758
|
const http_1 = http;
|
@@ -18146,7 +17810,7 @@ function requireMain () {
|
|
18146
17810
|
Object.defineProperty(exports, "__esModule", { value: true });
|
18147
17811
|
exports.ChannelProvider = exports.ChannelClient = exports.Frame = exports.View = exports.System = exports.Window = exports.Application = exports.Fin = exports.launch = exports.connect = void 0;
|
18148
17812
|
const fin_1 = fin;
|
18149
|
-
exports
|
17813
|
+
Object.defineProperty(exports, "Fin", { enumerable: true, get: function () { return fin_1.Fin; } });
|
18150
17814
|
const index_1 = requireApplication();
|
18151
17815
|
Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return index_1.Application; } });
|
18152
17816
|
const window_1 = requireWindow();
|
@@ -18154,13 +17818,13 @@ function requireMain () {
|
|
18154
17818
|
const view_1 = requireView();
|
18155
17819
|
Object.defineProperty(exports, "View", { enumerable: true, get: function () { return view_1.View; } });
|
18156
17820
|
const client_1 = client;
|
18157
|
-
exports
|
17821
|
+
Object.defineProperty(exports, "ChannelClient", { enumerable: true, get: function () { return client_1.ChannelClient; } });
|
18158
17822
|
const provider_1 = provider;
|
18159
17823
|
Object.defineProperty(exports, "ChannelProvider", { enumerable: true, get: function () { return provider_1.ChannelProvider; } });
|
18160
|
-
const frame_1 = frame;
|
17824
|
+
const frame_1 = frame$1;
|
18161
17825
|
Object.defineProperty(exports, "Frame", { enumerable: true, get: function () { return frame_1._Frame; } });
|
18162
|
-
const system_1 = system;
|
18163
|
-
exports
|
17826
|
+
const system_1 = system$1;
|
17827
|
+
Object.defineProperty(exports, "System", { enumerable: true, get: function () { return system_1.System; } });
|
18164
17828
|
const wire_1 = wire;
|
18165
17829
|
const node_env_1 = requireNodeEnv();
|
18166
17830
|
const transport_1 = transport;
|
@@ -18170,14 +17834,13 @@ function requireMain () {
|
|
18170
17834
|
const environment = new node_env_1.default();
|
18171
17835
|
// Connect to an OpenFin Runtime
|
18172
17836
|
async function connect(config) {
|
18173
|
-
var _a;
|
18174
17837
|
const normalized = await (0, normalize_config_1.validateConfig)(config);
|
18175
17838
|
const wire = new transport_1.Transport(websocket_1.default, environment, {
|
18176
17839
|
...normalized,
|
18177
|
-
name:
|
17840
|
+
name: normalized.name ?? normalized.uuid
|
18178
17841
|
});
|
18179
17842
|
await wire.connect(normalized);
|
18180
|
-
return new fin_1.
|
17843
|
+
return new fin_1.Fin(wire);
|
18181
17844
|
}
|
18182
17845
|
exports.connect = connect;
|
18183
17846
|
async function launch(config) {
|
@@ -18188,22 +17851,268 @@ function requireMain () {
|
|
18188
17851
|
const pd = new port_discovery_1.default(normalized, environment);
|
18189
17852
|
return pd.retrievePort();
|
18190
17853
|
}
|
18191
|
-
exports.launch = launch;
|
18192
|
-
} (main$1));
|
17854
|
+
exports.launch = launch;
|
17855
|
+
} (main$1));
|
18193
17856
|
return main$1;
|
18194
17857
|
}
|
18195
17858
|
|
18196
17859
|
var mainExports = requireMain();
|
18197
17860
|
|
18198
|
-
var OpenFin$
|
17861
|
+
var OpenFin$2 = {};
|
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));
|
18199
18108
|
|
18200
|
-
|
18109
|
+
var OpenFin = /*@__PURE__*/getDefaultExportFromCjs(OpenFin$2);
|
18201
18110
|
|
18202
|
-
var OpenFin = /*#__PURE__*/_mergeNamespaces({
|
18111
|
+
var OpenFin$1 = /*#__PURE__*/_mergeNamespaces({
|
18203
18112
|
__proto__: null,
|
18204
|
-
default: OpenFin
|
18205
|
-
}, [OpenFin$
|
18113
|
+
default: OpenFin
|
18114
|
+
}, [OpenFin$2]);
|
18206
18115
|
|
18207
18116
|
exports.connect = mainExports.connect;
|
18208
|
-
exports.default = OpenFin;
|
18117
|
+
exports.default = OpenFin$1;
|
18209
18118
|
exports.launch = mainExports.launch;
|