@openfin/core 41.100.73 → 41.100.79
Sign up to get free protection for your applications and to get access to all the features.
- package/out/GlobalOpenFin.d.ts +2 -1
- package/out/mock-alpha.d.ts +38 -2
- package/out/mock-beta.d.ts +38 -2
- package/out/mock-public.d.ts +38 -2
- package/out/{mock.d.ts → stub.d.ts} +38 -2
- package/out/{mock.js → stub.js} +44 -20
- package/package.json +3 -3
package/out/GlobalOpenFin.d.ts
CHANGED
package/out/mock-alpha.d.ts
CHANGED
@@ -4676,6 +4676,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
4676
4676
|
eventNames: () => (string | symbol)[];
|
4677
4677
|
/* Excluded from this release type: emit */
|
4678
4678
|
private hasEmitter;
|
4679
|
+
/**
|
4680
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
4681
|
+
* `once` subscription.
|
4682
|
+
*
|
4683
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
4684
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
4685
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
4686
|
+
*/
|
4687
|
+
private cleanUpRemovedListener;
|
4679
4688
|
private getOrCreateEmitter;
|
4680
4689
|
listeners: (type: string | symbol) => Function[];
|
4681
4690
|
listenerCount: (type: string | symbol) => number;
|
@@ -5754,6 +5763,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5754
5763
|
entityType: string;
|
5755
5764
|
};
|
5756
5765
|
|
5766
|
+
/**
|
5767
|
+
* @interface
|
5768
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5769
|
+
*/
|
5770
|
+
declare interface GetBoundsOptions {
|
5771
|
+
/**
|
5772
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5773
|
+
*
|
5774
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5775
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5776
|
+
*
|
5777
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5778
|
+
*
|
5779
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5780
|
+
*
|
5781
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5782
|
+
*
|
5783
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5784
|
+
*
|
5785
|
+
* @default 'normal'
|
5786
|
+
*/
|
5787
|
+
boundsType?: 'normal' | 'current';
|
5788
|
+
}
|
5789
|
+
|
5757
5790
|
/**
|
5758
5791
|
* @interface
|
5759
5792
|
*/
|
@@ -9405,6 +9438,7 @@ declare namespace OpenFin_2 {
|
|
9405
9438
|
ScreenCapturePermission,
|
9406
9439
|
Bounds,
|
9407
9440
|
WindowBounds,
|
9441
|
+
GetBoundsOptions,
|
9408
9442
|
Rectangle,
|
9409
9443
|
ApplicationCreationOptions,
|
9410
9444
|
TimeZones,
|
@@ -12127,7 +12161,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12127
12161
|
options: OpenFin_2.TransitionOptions;
|
12128
12162
|
}>;
|
12129
12163
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12130
|
-
'get-window-bounds': IdentityCall<{
|
12164
|
+
'get-window-bounds': IdentityCall<{
|
12165
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12166
|
+
}, OpenFin_2.WindowBounds>;
|
12131
12167
|
'center-window': IdentityCall;
|
12132
12168
|
'blur-window': IdentityCall;
|
12133
12169
|
'bring-window-to-front': IdentityCall;
|
@@ -17656,7 +17692,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17656
17692
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17657
17693
|
* ```
|
17658
17694
|
*/
|
17659
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17695
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17660
17696
|
/**
|
17661
17697
|
* Centers the window on its current screen.
|
17662
17698
|
*
|
package/out/mock-beta.d.ts
CHANGED
@@ -4676,6 +4676,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
4676
4676
|
eventNames: () => (string | symbol)[];
|
4677
4677
|
/* Excluded from this release type: emit */
|
4678
4678
|
private hasEmitter;
|
4679
|
+
/**
|
4680
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
4681
|
+
* `once` subscription.
|
4682
|
+
*
|
4683
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
4684
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
4685
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
4686
|
+
*/
|
4687
|
+
private cleanUpRemovedListener;
|
4679
4688
|
private getOrCreateEmitter;
|
4680
4689
|
listeners: (type: string | symbol) => Function[];
|
4681
4690
|
listenerCount: (type: string | symbol) => number;
|
@@ -5754,6 +5763,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5754
5763
|
entityType: string;
|
5755
5764
|
};
|
5756
5765
|
|
5766
|
+
/**
|
5767
|
+
* @interface
|
5768
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5769
|
+
*/
|
5770
|
+
declare interface GetBoundsOptions {
|
5771
|
+
/**
|
5772
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5773
|
+
*
|
5774
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5775
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5776
|
+
*
|
5777
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5778
|
+
*
|
5779
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5780
|
+
*
|
5781
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5782
|
+
*
|
5783
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5784
|
+
*
|
5785
|
+
* @default 'normal'
|
5786
|
+
*/
|
5787
|
+
boundsType?: 'normal' | 'current';
|
5788
|
+
}
|
5789
|
+
|
5757
5790
|
/**
|
5758
5791
|
* @interface
|
5759
5792
|
*/
|
@@ -9405,6 +9438,7 @@ declare namespace OpenFin_2 {
|
|
9405
9438
|
ScreenCapturePermission,
|
9406
9439
|
Bounds,
|
9407
9440
|
WindowBounds,
|
9441
|
+
GetBoundsOptions,
|
9408
9442
|
Rectangle,
|
9409
9443
|
ApplicationCreationOptions,
|
9410
9444
|
TimeZones,
|
@@ -12127,7 +12161,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12127
12161
|
options: OpenFin_2.TransitionOptions;
|
12128
12162
|
}>;
|
12129
12163
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12130
|
-
'get-window-bounds': IdentityCall<{
|
12164
|
+
'get-window-bounds': IdentityCall<{
|
12165
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12166
|
+
}, OpenFin_2.WindowBounds>;
|
12131
12167
|
'center-window': IdentityCall;
|
12132
12168
|
'blur-window': IdentityCall;
|
12133
12169
|
'bring-window-to-front': IdentityCall;
|
@@ -17656,7 +17692,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17656
17692
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17657
17693
|
* ```
|
17658
17694
|
*/
|
17659
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17695
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17660
17696
|
/**
|
17661
17697
|
* Centers the window on its current screen.
|
17662
17698
|
*
|
package/out/mock-public.d.ts
CHANGED
@@ -4676,6 +4676,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
4676
4676
|
eventNames: () => (string | symbol)[];
|
4677
4677
|
/* Excluded from this release type: emit */
|
4678
4678
|
private hasEmitter;
|
4679
|
+
/**
|
4680
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
4681
|
+
* `once` subscription.
|
4682
|
+
*
|
4683
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
4684
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
4685
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
4686
|
+
*/
|
4687
|
+
private cleanUpRemovedListener;
|
4679
4688
|
private getOrCreateEmitter;
|
4680
4689
|
listeners: (type: string | symbol) => Function[];
|
4681
4690
|
listenerCount: (type: string | symbol) => number;
|
@@ -5754,6 +5763,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5754
5763
|
entityType: string;
|
5755
5764
|
};
|
5756
5765
|
|
5766
|
+
/**
|
5767
|
+
* @interface
|
5768
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5769
|
+
*/
|
5770
|
+
declare interface GetBoundsOptions {
|
5771
|
+
/**
|
5772
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5773
|
+
*
|
5774
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5775
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5776
|
+
*
|
5777
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5778
|
+
*
|
5779
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5780
|
+
*
|
5781
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5782
|
+
*
|
5783
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5784
|
+
*
|
5785
|
+
* @default 'normal'
|
5786
|
+
*/
|
5787
|
+
boundsType?: 'normal' | 'current';
|
5788
|
+
}
|
5789
|
+
|
5757
5790
|
/**
|
5758
5791
|
* @interface
|
5759
5792
|
*/
|
@@ -9405,6 +9438,7 @@ declare namespace OpenFin_2 {
|
|
9405
9438
|
ScreenCapturePermission,
|
9406
9439
|
Bounds,
|
9407
9440
|
WindowBounds,
|
9441
|
+
GetBoundsOptions,
|
9408
9442
|
Rectangle,
|
9409
9443
|
ApplicationCreationOptions,
|
9410
9444
|
TimeZones,
|
@@ -12127,7 +12161,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12127
12161
|
options: OpenFin_2.TransitionOptions;
|
12128
12162
|
}>;
|
12129
12163
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12130
|
-
'get-window-bounds': IdentityCall<{
|
12164
|
+
'get-window-bounds': IdentityCall<{
|
12165
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12166
|
+
}, OpenFin_2.WindowBounds>;
|
12131
12167
|
'center-window': IdentityCall;
|
12132
12168
|
'blur-window': IdentityCall;
|
12133
12169
|
'bring-window-to-front': IdentityCall;
|
@@ -17656,7 +17692,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
17656
17692
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
17657
17693
|
* ```
|
17658
17694
|
*/
|
17659
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
17695
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
17660
17696
|
/**
|
17661
17697
|
* Centers the window on its current screen.
|
17662
17698
|
*
|
@@ -4740,6 +4740,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
4740
4740
|
type: EventType;
|
4741
4741
|
}>, ...args: any[]) => boolean;
|
4742
4742
|
private hasEmitter;
|
4743
|
+
/**
|
4744
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
4745
|
+
* `once` subscription.
|
4746
|
+
*
|
4747
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
4748
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
4749
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
4750
|
+
*/
|
4751
|
+
private cleanUpRemovedListener;
|
4743
4752
|
private getOrCreateEmitter;
|
4744
4753
|
listeners: (type: string | symbol) => Function[];
|
4745
4754
|
listenerCount: (type: string | symbol) => number;
|
@@ -5842,6 +5851,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
5842
5851
|
entityType: string;
|
5843
5852
|
};
|
5844
5853
|
|
5854
|
+
/**
|
5855
|
+
* @interface
|
5856
|
+
* Options for the {@link Window._Window.getBounds} method.
|
5857
|
+
*/
|
5858
|
+
declare interface GetBoundsOptions {
|
5859
|
+
/**
|
5860
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
5861
|
+
*
|
5862
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
5863
|
+
* - `'current'`: Returns the bounds of the window in its current state. For a minimized window, this returns the bounds from its previous state before being minimized.
|
5864
|
+
*
|
5865
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
5866
|
+
*
|
5867
|
+
* If a window is `maximized`, `current` will return the dimensions of the screen while `normal` will return the bounds the window will be restored to.
|
5868
|
+
*
|
5869
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
5870
|
+
*
|
5871
|
+
* **Edge case:** On MacOS, if a window is maximized, then minimized, calling `getBounds` with `boundsType: 'current'` will return the bounds of the window when it was maximized while `normal` will return the normal bounds.
|
5872
|
+
*
|
5873
|
+
* @default 'normal'
|
5874
|
+
*/
|
5875
|
+
boundsType?: 'normal' | 'current';
|
5876
|
+
}
|
5877
|
+
|
5845
5878
|
/**
|
5846
5879
|
* @interface
|
5847
5880
|
*/
|
@@ -9723,6 +9756,7 @@ declare namespace OpenFin_2 {
|
|
9723
9756
|
ScreenCapturePermission,
|
9724
9757
|
Bounds,
|
9725
9758
|
WindowBounds,
|
9759
|
+
GetBoundsOptions,
|
9726
9760
|
Rectangle,
|
9727
9761
|
ApplicationCreationOptions,
|
9728
9762
|
TimeZones,
|
@@ -12528,7 +12562,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
12528
12562
|
options: OpenFin_2.TransitionOptions;
|
12529
12563
|
}>;
|
12530
12564
|
'get-all-frames': IdentityCall<{}, OpenFin_2.FrameInfo[]>;
|
12531
|
-
'get-window-bounds': IdentityCall<{
|
12565
|
+
'get-window-bounds': IdentityCall<{
|
12566
|
+
options?: OpenFin_2.GetBoundsOptions;
|
12567
|
+
}, OpenFin_2.WindowBounds>;
|
12532
12568
|
'center-window': IdentityCall;
|
12533
12569
|
'blur-window': IdentityCall;
|
12534
12570
|
'bring-window-to-front': IdentityCall;
|
@@ -18110,7 +18146,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
18110
18146
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
18111
18147
|
* ```
|
18112
18148
|
*/
|
18113
|
-
getBounds(): Promise<OpenFin_2.WindowBounds>;
|
18149
|
+
getBounds(options?: OpenFin_2.GetBoundsOptions): Promise<OpenFin_2.WindowBounds>;
|
18114
18150
|
/**
|
18115
18151
|
* Centers the window on its current screen.
|
18116
18152
|
*
|
package/out/{mock.js → stub.js}
RENAMED
@@ -372,7 +372,7 @@ var __classPrivateFieldGet$h = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
372
372
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
373
373
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
374
374
|
};
|
375
|
-
var _EmitterBase_emitterAccessor;
|
375
|
+
var _EmitterBase_emitterAccessor, _EmitterBase_deregisterOnceListeners;
|
376
376
|
Object.defineProperty(base, "__esModule", { value: true });
|
377
377
|
base.Reply = base.EmitterBase = base.Base = void 0;
|
378
378
|
const promises_1 = promises;
|
@@ -444,6 +444,7 @@ class EmitterBase extends Base {
|
|
444
444
|
super(wire);
|
445
445
|
this.topic = topic;
|
446
446
|
_EmitterBase_emitterAccessor.set(this, void 0);
|
447
|
+
_EmitterBase_deregisterOnceListeners.set(this, void 0);
|
447
448
|
this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
|
448
449
|
/**
|
449
450
|
* @internal
|
@@ -452,7 +453,28 @@ class EmitterBase extends Base {
|
|
452
453
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
453
454
|
};
|
454
455
|
this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
|
455
|
-
|
456
|
+
/**
|
457
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
458
|
+
* `once` subscription.
|
459
|
+
*
|
460
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
461
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
462
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
463
|
+
*/
|
464
|
+
this.cleanUpRemovedListener = (eventType, listener) => {
|
465
|
+
const deregister = __classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
|
466
|
+
if (deregister) {
|
467
|
+
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
|
468
|
+
emitter.removeListener(eventType, deregister);
|
469
|
+
}
|
470
|
+
};
|
471
|
+
this.getOrCreateEmitter = () => {
|
472
|
+
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
|
473
|
+
if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
|
474
|
+
emitter.on('removeListener', this.cleanUpRemovedListener);
|
475
|
+
}
|
476
|
+
return emitter;
|
477
|
+
};
|
456
478
|
this.listeners = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(type) : [];
|
457
479
|
this.listenerCount = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listenerCount(type) : 0;
|
458
480
|
this.registerEventListener = async (eventType, options = {}, applySubscription, undoSubscription) => {
|
@@ -484,13 +506,13 @@ class EmitterBase extends Base {
|
|
484
506
|
type: eventType
|
485
507
|
};
|
486
508
|
await this.wire.sendAction('unsubscribe-to-desktop-event', runtimeEvent).catch(() => null);
|
487
|
-
|
488
|
-
return emitter;
|
509
|
+
return this.getOrCreateEmitter();
|
489
510
|
}
|
490
511
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
491
512
|
return Promise.resolve();
|
492
513
|
};
|
493
514
|
__classPrivateFieldSet$g(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
515
|
+
__classPrivateFieldSet$g(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
|
494
516
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
495
517
|
}
|
496
518
|
/**
|
@@ -519,6 +541,7 @@ class EmitterBase extends Base {
|
|
519
541
|
*/
|
520
542
|
async once(eventType, listener, options) {
|
521
543
|
const deregister = () => this.deregisterEventListener(eventType);
|
544
|
+
__classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
522
545
|
await this.registerEventListener(eventType, options, (emitter) => {
|
523
546
|
emitter.once(eventType, deregister);
|
524
547
|
emitter.once(eventType, listener);
|
@@ -549,6 +572,7 @@ class EmitterBase extends Base {
|
|
549
572
|
*/
|
550
573
|
async prependOnceListener(eventType, listener, options) {
|
551
574
|
const deregister = () => this.deregisterEventListener(eventType);
|
575
|
+
__classPrivateFieldGet$h(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
552
576
|
await this.registerEventListener(eventType, options, (emitter) => {
|
553
577
|
emitter.prependOnceListener(eventType, listener);
|
554
578
|
emitter.once(eventType, deregister);
|
@@ -607,13 +631,13 @@ class EmitterBase extends Base {
|
|
607
631
|
return this;
|
608
632
|
}
|
609
633
|
deleteEmitterIfNothingRegistered(emitter) {
|
610
|
-
if (emitter.eventNames().
|
634
|
+
if (emitter.eventNames().every((type) => type === 'removeListener')) {
|
611
635
|
this.wire.eventAggregator.delete(__classPrivateFieldGet$h(this, _EmitterBase_emitterAccessor, "f"));
|
612
636
|
}
|
613
637
|
}
|
614
638
|
}
|
615
639
|
base.EmitterBase = EmitterBase;
|
616
|
-
_EmitterBase_emitterAccessor = new WeakMap();
|
640
|
+
_EmitterBase_emitterAccessor = new WeakMap(), _EmitterBase_deregisterOnceListeners = new WeakMap();
|
617
641
|
class Reply {
|
618
642
|
}
|
619
643
|
base.Reply = Reply;
|
@@ -4039,9 +4063,9 @@ function requireInstance () {
|
|
4039
4063
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
4040
4064
|
* ```
|
4041
4065
|
*/
|
4042
|
-
getBounds() {
|
4066
|
+
getBounds(options) {
|
4043
4067
|
return this.wire
|
4044
|
-
.sendAction('get-window-bounds', this.identity)
|
4068
|
+
.sendAction('get-window-bounds', { ...this.identity, options })
|
4045
4069
|
.then(({ payload }) => payload.data);
|
4046
4070
|
}
|
4047
4071
|
/**
|
@@ -17603,12 +17627,12 @@ class Transport extends events_1$1.EventEmitter {
|
|
17603
17627
|
Transport_1 = transport.Transport = Transport;
|
17604
17628
|
_Transport_wire = new WeakMap(), _Transport_fin = new WeakMap();
|
17605
17629
|
|
17606
|
-
var
|
17630
|
+
var stubEnvironment = {};
|
17607
17631
|
|
17608
|
-
Object.defineProperty(
|
17609
|
-
var
|
17632
|
+
Object.defineProperty(stubEnvironment, "__esModule", { value: true });
|
17633
|
+
var StubEnvironment_1 = stubEnvironment.StubEnvironment = void 0;
|
17610
17634
|
const me_1 = me;
|
17611
|
-
class
|
17635
|
+
class StubEnvironment {
|
17612
17636
|
constructor() {
|
17613
17637
|
this.type = 'other';
|
17614
17638
|
this.childViews = true;
|
@@ -17689,15 +17713,15 @@ class MockEnvironment {
|
|
17689
17713
|
throw new Error('Method not implemented.');
|
17690
17714
|
}
|
17691
17715
|
}
|
17692
|
-
|
17716
|
+
StubEnvironment_1 = stubEnvironment.StubEnvironment = StubEnvironment;
|
17693
17717
|
|
17694
|
-
var
|
17718
|
+
var stubWire = {};
|
17695
17719
|
|
17696
|
-
Object.defineProperty(
|
17697
|
-
var
|
17720
|
+
Object.defineProperty(stubWire, "__esModule", { value: true });
|
17721
|
+
var StubWire_1 = stubWire.StubWire = void 0;
|
17698
17722
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
17699
17723
|
const events_1 = require$$0;
|
17700
|
-
class
|
17724
|
+
class StubWire extends events_1.EventEmitter {
|
17701
17725
|
connect() {
|
17702
17726
|
throw new Error('You are not running in OpenFin.');
|
17703
17727
|
}
|
@@ -17718,12 +17742,12 @@ class MockWire extends events_1.EventEmitter {
|
|
17718
17742
|
super();
|
17719
17743
|
}
|
17720
17744
|
}
|
17721
|
-
|
17745
|
+
StubWire_1 = stubWire.StubWire = StubWire;
|
17722
17746
|
|
17723
17747
|
const fin$1 = ((typeof window !== 'undefined' && window?.fin) ||
|
17724
17748
|
(() => {
|
17725
|
-
const environment = new
|
17726
|
-
const transport = new Transport_1(
|
17749
|
+
const environment = new StubEnvironment_1();
|
17750
|
+
const transport = new Transport_1(StubWire_1, environment, {
|
17727
17751
|
uuid: '',
|
17728
17752
|
name: ''
|
17729
17753
|
});
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "@openfin/core",
|
3
|
-
"version": "41.100.
|
3
|
+
"version": "41.100.79",
|
4
4
|
"description": "The core renderer entry point of OpenFin",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
|
-
"main": "out/
|
7
|
-
"types": "out/
|
6
|
+
"main": "out/stub.js",
|
7
|
+
"types": "out/stub.d.ts",
|
8
8
|
"private": false,
|
9
9
|
"scripts": {
|
10
10
|
"prebuild": "rimraf ./out",
|