@openfin/fdc3-api 41.100.72 → 41.100.78
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/fdc3-api-alpha.d.ts +43 -6
- package/out/fdc3-api-beta.d.ts +43 -6
- package/out/fdc3-api-public.d.ts +43 -6
- package/out/fdc3-api.d.ts +43 -6
- package/out/fdc3-api.js +30 -6
- package/package.json +1 -1
package/out/fdc3-api-alpha.d.ts
CHANGED
|
@@ -4673,6 +4673,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
|
4673
4673
|
eventNames: () => (string | symbol)[];
|
|
4674
4674
|
/* Excluded from this release type: emit */
|
|
4675
4675
|
private hasEmitter;
|
|
4676
|
+
/**
|
|
4677
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
|
4678
|
+
* `once` subscription.
|
|
4679
|
+
*
|
|
4680
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
|
4681
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
|
4682
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
|
4683
|
+
*/
|
|
4684
|
+
private cleanUpRemovedListener;
|
|
4676
4685
|
private getOrCreateEmitter;
|
|
4677
4686
|
listeners: (type: string | symbol) => Function[];
|
|
4678
4687
|
listenerCount: (type: string | symbol) => number;
|
|
@@ -6096,6 +6105,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
|
6096
6105
|
entityType: string;
|
|
6097
6106
|
};
|
|
6098
6107
|
|
|
6108
|
+
/**
|
|
6109
|
+
* @interface
|
|
6110
|
+
* Options for the {@link Window._Window.getBounds} method.
|
|
6111
|
+
*/
|
|
6112
|
+
declare interface GetBoundsOptions {
|
|
6113
|
+
/**
|
|
6114
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
|
6115
|
+
*
|
|
6116
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
|
6117
|
+
* - `'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.
|
|
6118
|
+
*
|
|
6119
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
|
6120
|
+
*
|
|
6121
|
+
* 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.
|
|
6122
|
+
*
|
|
6123
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
|
6124
|
+
*
|
|
6125
|
+
* **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.
|
|
6126
|
+
*
|
|
6127
|
+
* @default 'normal'
|
|
6128
|
+
*/
|
|
6129
|
+
boundsType?: 'normal' | 'current';
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6099
6132
|
/**
|
|
6100
6133
|
* @interface
|
|
6101
6134
|
*/
|
|
@@ -8003,7 +8036,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8003
8036
|
*
|
|
8004
8037
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
8005
8038
|
*
|
|
8006
|
-
* ####
|
|
8039
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
|
8007
8040
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8008
8041
|
* @example
|
|
8009
8042
|
* ```js
|
|
@@ -8020,7 +8053,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8020
8053
|
* });
|
|
8021
8054
|
* ```
|
|
8022
8055
|
*
|
|
8023
|
-
* ####
|
|
8056
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
|
8024
8057
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8025
8058
|
* @example
|
|
8026
8059
|
* ```js
|
|
@@ -8284,7 +8317,7 @@ declare class Layout extends Base {
|
|
|
8284
8317
|
*/
|
|
8285
8318
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
|
8286
8319
|
/**
|
|
8287
|
-
* Adds a view to the platform layout. Behaves like @link
|
|
8320
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
|
8288
8321
|
*
|
|
8289
8322
|
* @param viewOptions - The options for creating the view.
|
|
8290
8323
|
* @param options - Optional parameters for adding the view.
|
|
@@ -8300,7 +8333,7 @@ declare class Layout extends Base {
|
|
|
8300
8333
|
}>;
|
|
8301
8334
|
/**
|
|
8302
8335
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
|
8303
|
-
* Behaves like @link
|
|
8336
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
|
8304
8337
|
*
|
|
8305
8338
|
* @param viewIdentity - The identity of the view to close.
|
|
8306
8339
|
* @returns A promise that resolves when the view is closed.
|
|
@@ -9747,6 +9780,7 @@ declare namespace OpenFin {
|
|
|
9747
9780
|
ScreenCapturePermission,
|
|
9748
9781
|
Bounds,
|
|
9749
9782
|
WindowBounds,
|
|
9783
|
+
GetBoundsOptions,
|
|
9750
9784
|
Rectangle,
|
|
9751
9785
|
ApplicationCreationOptions,
|
|
9752
9786
|
TimeZones,
|
|
@@ -12467,7 +12501,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
|
12467
12501
|
options: OpenFin.TransitionOptions;
|
|
12468
12502
|
}>;
|
|
12469
12503
|
'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
|
|
12470
|
-
'get-window-bounds': IdentityCall<{
|
|
12504
|
+
'get-window-bounds': IdentityCall<{
|
|
12505
|
+
options?: OpenFin.GetBoundsOptions;
|
|
12506
|
+
}, OpenFin.WindowBounds>;
|
|
12471
12507
|
'center-window': IdentityCall;
|
|
12472
12508
|
'blur-window': IdentityCall;
|
|
12473
12509
|
'bring-window-to-front': IdentityCall;
|
|
@@ -13874,6 +13910,7 @@ declare type Snapshot = {
|
|
|
13874
13910
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
|
13875
13911
|
topic: 'application';
|
|
13876
13912
|
type: 'platform-snapshot-applied';
|
|
13913
|
+
snapshot: Snapshot;
|
|
13877
13914
|
};
|
|
13878
13915
|
|
|
13879
13916
|
/**
|
|
@@ -18101,7 +18138,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
|
18101
18138
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
|
18102
18139
|
* ```
|
|
18103
18140
|
*/
|
|
18104
|
-
getBounds(): Promise<OpenFin.WindowBounds>;
|
|
18141
|
+
getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
|
|
18105
18142
|
/**
|
|
18106
18143
|
* Centers the window on its current screen.
|
|
18107
18144
|
*
|
package/out/fdc3-api-beta.d.ts
CHANGED
|
@@ -4673,6 +4673,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
|
4673
4673
|
eventNames: () => (string | symbol)[];
|
|
4674
4674
|
/* Excluded from this release type: emit */
|
|
4675
4675
|
private hasEmitter;
|
|
4676
|
+
/**
|
|
4677
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
|
4678
|
+
* `once` subscription.
|
|
4679
|
+
*
|
|
4680
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
|
4681
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
|
4682
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
|
4683
|
+
*/
|
|
4684
|
+
private cleanUpRemovedListener;
|
|
4676
4685
|
private getOrCreateEmitter;
|
|
4677
4686
|
listeners: (type: string | symbol) => Function[];
|
|
4678
4687
|
listenerCount: (type: string | symbol) => number;
|
|
@@ -6096,6 +6105,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
|
6096
6105
|
entityType: string;
|
|
6097
6106
|
};
|
|
6098
6107
|
|
|
6108
|
+
/**
|
|
6109
|
+
* @interface
|
|
6110
|
+
* Options for the {@link Window._Window.getBounds} method.
|
|
6111
|
+
*/
|
|
6112
|
+
declare interface GetBoundsOptions {
|
|
6113
|
+
/**
|
|
6114
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
|
6115
|
+
*
|
|
6116
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
|
6117
|
+
* - `'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.
|
|
6118
|
+
*
|
|
6119
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
|
6120
|
+
*
|
|
6121
|
+
* 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.
|
|
6122
|
+
*
|
|
6123
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
|
6124
|
+
*
|
|
6125
|
+
* **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.
|
|
6126
|
+
*
|
|
6127
|
+
* @default 'normal'
|
|
6128
|
+
*/
|
|
6129
|
+
boundsType?: 'normal' | 'current';
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6099
6132
|
/**
|
|
6100
6133
|
* @interface
|
|
6101
6134
|
*/
|
|
@@ -8003,7 +8036,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8003
8036
|
*
|
|
8004
8037
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
8005
8038
|
*
|
|
8006
|
-
* ####
|
|
8039
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
|
8007
8040
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8008
8041
|
* @example
|
|
8009
8042
|
* ```js
|
|
@@ -8020,7 +8053,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8020
8053
|
* });
|
|
8021
8054
|
* ```
|
|
8022
8055
|
*
|
|
8023
|
-
* ####
|
|
8056
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
|
8024
8057
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8025
8058
|
* @example
|
|
8026
8059
|
* ```js
|
|
@@ -8284,7 +8317,7 @@ declare class Layout extends Base {
|
|
|
8284
8317
|
*/
|
|
8285
8318
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
|
8286
8319
|
/**
|
|
8287
|
-
* Adds a view to the platform layout. Behaves like @link
|
|
8320
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
|
8288
8321
|
*
|
|
8289
8322
|
* @param viewOptions - The options for creating the view.
|
|
8290
8323
|
* @param options - Optional parameters for adding the view.
|
|
@@ -8300,7 +8333,7 @@ declare class Layout extends Base {
|
|
|
8300
8333
|
}>;
|
|
8301
8334
|
/**
|
|
8302
8335
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
|
8303
|
-
* Behaves like @link
|
|
8336
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
|
8304
8337
|
*
|
|
8305
8338
|
* @param viewIdentity - The identity of the view to close.
|
|
8306
8339
|
* @returns A promise that resolves when the view is closed.
|
|
@@ -9747,6 +9780,7 @@ declare namespace OpenFin {
|
|
|
9747
9780
|
ScreenCapturePermission,
|
|
9748
9781
|
Bounds,
|
|
9749
9782
|
WindowBounds,
|
|
9783
|
+
GetBoundsOptions,
|
|
9750
9784
|
Rectangle,
|
|
9751
9785
|
ApplicationCreationOptions,
|
|
9752
9786
|
TimeZones,
|
|
@@ -12467,7 +12501,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
|
12467
12501
|
options: OpenFin.TransitionOptions;
|
|
12468
12502
|
}>;
|
|
12469
12503
|
'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
|
|
12470
|
-
'get-window-bounds': IdentityCall<{
|
|
12504
|
+
'get-window-bounds': IdentityCall<{
|
|
12505
|
+
options?: OpenFin.GetBoundsOptions;
|
|
12506
|
+
}, OpenFin.WindowBounds>;
|
|
12471
12507
|
'center-window': IdentityCall;
|
|
12472
12508
|
'blur-window': IdentityCall;
|
|
12473
12509
|
'bring-window-to-front': IdentityCall;
|
|
@@ -13874,6 +13910,7 @@ declare type Snapshot = {
|
|
|
13874
13910
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
|
13875
13911
|
topic: 'application';
|
|
13876
13912
|
type: 'platform-snapshot-applied';
|
|
13913
|
+
snapshot: Snapshot;
|
|
13877
13914
|
};
|
|
13878
13915
|
|
|
13879
13916
|
/**
|
|
@@ -18101,7 +18138,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
|
18101
18138
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
|
18102
18139
|
* ```
|
|
18103
18140
|
*/
|
|
18104
|
-
getBounds(): Promise<OpenFin.WindowBounds>;
|
|
18141
|
+
getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
|
|
18105
18142
|
/**
|
|
18106
18143
|
* Centers the window on its current screen.
|
|
18107
18144
|
*
|
package/out/fdc3-api-public.d.ts
CHANGED
|
@@ -4673,6 +4673,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
|
4673
4673
|
eventNames: () => (string | symbol)[];
|
|
4674
4674
|
/* Excluded from this release type: emit */
|
|
4675
4675
|
private hasEmitter;
|
|
4676
|
+
/**
|
|
4677
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
|
4678
|
+
* `once` subscription.
|
|
4679
|
+
*
|
|
4680
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
|
4681
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
|
4682
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
|
4683
|
+
*/
|
|
4684
|
+
private cleanUpRemovedListener;
|
|
4676
4685
|
private getOrCreateEmitter;
|
|
4677
4686
|
listeners: (type: string | symbol) => Function[];
|
|
4678
4687
|
listenerCount: (type: string | symbol) => number;
|
|
@@ -6096,6 +6105,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
|
6096
6105
|
entityType: string;
|
|
6097
6106
|
};
|
|
6098
6107
|
|
|
6108
|
+
/**
|
|
6109
|
+
* @interface
|
|
6110
|
+
* Options for the {@link Window._Window.getBounds} method.
|
|
6111
|
+
*/
|
|
6112
|
+
declare interface GetBoundsOptions {
|
|
6113
|
+
/**
|
|
6114
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
|
6115
|
+
*
|
|
6116
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
|
6117
|
+
* - `'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.
|
|
6118
|
+
*
|
|
6119
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
|
6120
|
+
*
|
|
6121
|
+
* 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.
|
|
6122
|
+
*
|
|
6123
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
|
6124
|
+
*
|
|
6125
|
+
* **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.
|
|
6126
|
+
*
|
|
6127
|
+
* @default 'normal'
|
|
6128
|
+
*/
|
|
6129
|
+
boundsType?: 'normal' | 'current';
|
|
6130
|
+
}
|
|
6131
|
+
|
|
6099
6132
|
/**
|
|
6100
6133
|
* @interface
|
|
6101
6134
|
*/
|
|
@@ -8003,7 +8036,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8003
8036
|
*
|
|
8004
8037
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
8005
8038
|
*
|
|
8006
|
-
* ####
|
|
8039
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
|
8007
8040
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8008
8041
|
* @example
|
|
8009
8042
|
* ```js
|
|
@@ -8020,7 +8053,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8020
8053
|
* });
|
|
8021
8054
|
* ```
|
|
8022
8055
|
*
|
|
8023
|
-
* ####
|
|
8056
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
|
8024
8057
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8025
8058
|
* @example
|
|
8026
8059
|
* ```js
|
|
@@ -8284,7 +8317,7 @@ declare class Layout extends Base {
|
|
|
8284
8317
|
*/
|
|
8285
8318
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
|
8286
8319
|
/**
|
|
8287
|
-
* Adds a view to the platform layout. Behaves like @link
|
|
8320
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
|
8288
8321
|
*
|
|
8289
8322
|
* @param viewOptions - The options for creating the view.
|
|
8290
8323
|
* @param options - Optional parameters for adding the view.
|
|
@@ -8300,7 +8333,7 @@ declare class Layout extends Base {
|
|
|
8300
8333
|
}>;
|
|
8301
8334
|
/**
|
|
8302
8335
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
|
8303
|
-
* Behaves like @link
|
|
8336
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
|
8304
8337
|
*
|
|
8305
8338
|
* @param viewIdentity - The identity of the view to close.
|
|
8306
8339
|
* @returns A promise that resolves when the view is closed.
|
|
@@ -9747,6 +9780,7 @@ declare namespace OpenFin {
|
|
|
9747
9780
|
ScreenCapturePermission,
|
|
9748
9781
|
Bounds,
|
|
9749
9782
|
WindowBounds,
|
|
9783
|
+
GetBoundsOptions,
|
|
9750
9784
|
Rectangle,
|
|
9751
9785
|
ApplicationCreationOptions,
|
|
9752
9786
|
TimeZones,
|
|
@@ -12467,7 +12501,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
|
12467
12501
|
options: OpenFin.TransitionOptions;
|
|
12468
12502
|
}>;
|
|
12469
12503
|
'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
|
|
12470
|
-
'get-window-bounds': IdentityCall<{
|
|
12504
|
+
'get-window-bounds': IdentityCall<{
|
|
12505
|
+
options?: OpenFin.GetBoundsOptions;
|
|
12506
|
+
}, OpenFin.WindowBounds>;
|
|
12471
12507
|
'center-window': IdentityCall;
|
|
12472
12508
|
'blur-window': IdentityCall;
|
|
12473
12509
|
'bring-window-to-front': IdentityCall;
|
|
@@ -13874,6 +13910,7 @@ declare type Snapshot = {
|
|
|
13874
13910
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
|
13875
13911
|
topic: 'application';
|
|
13876
13912
|
type: 'platform-snapshot-applied';
|
|
13913
|
+
snapshot: Snapshot;
|
|
13877
13914
|
};
|
|
13878
13915
|
|
|
13879
13916
|
/**
|
|
@@ -18101,7 +18138,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
|
18101
18138
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
|
18102
18139
|
* ```
|
|
18103
18140
|
*/
|
|
18104
|
-
getBounds(): Promise<OpenFin.WindowBounds>;
|
|
18141
|
+
getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
|
|
18105
18142
|
/**
|
|
18106
18143
|
* Centers the window on its current screen.
|
|
18107
18144
|
*
|
package/out/fdc3-api.d.ts
CHANGED
|
@@ -4737,6 +4737,15 @@ declare class EmitterBase<EmitterEvent extends BaseEvent, EmitterEventType exten
|
|
|
4737
4737
|
type: EventType;
|
|
4738
4738
|
}>, ...args: any[]) => boolean;
|
|
4739
4739
|
private hasEmitter;
|
|
4740
|
+
/**
|
|
4741
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
|
4742
|
+
* `once` subscription.
|
|
4743
|
+
*
|
|
4744
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
|
4745
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
|
4746
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
|
4747
|
+
*/
|
|
4748
|
+
private cleanUpRemovedListener;
|
|
4740
4749
|
private getOrCreateEmitter;
|
|
4741
4750
|
listeners: (type: string | symbol) => Function[];
|
|
4742
4751
|
listenerCount: (type: string | symbol) => number;
|
|
@@ -6184,6 +6193,30 @@ declare type FrameProcessDetails = ProcessDetails & {
|
|
|
6184
6193
|
entityType: string;
|
|
6185
6194
|
};
|
|
6186
6195
|
|
|
6196
|
+
/**
|
|
6197
|
+
* @interface
|
|
6198
|
+
* Options for the {@link Window._Window.getBounds} method.
|
|
6199
|
+
*/
|
|
6200
|
+
declare interface GetBoundsOptions {
|
|
6201
|
+
/**
|
|
6202
|
+
* Specifies the state of the window for which to retrieve the bounds.
|
|
6203
|
+
*
|
|
6204
|
+
* - `'normal'`: Returns the bounds of the window in its 'normal' state (not maximized or minimized).
|
|
6205
|
+
* - `'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.
|
|
6206
|
+
*
|
|
6207
|
+
* If a window is in `normal` state, `current` and `normal` will return the same bounds.
|
|
6208
|
+
*
|
|
6209
|
+
* 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.
|
|
6210
|
+
*
|
|
6211
|
+
* If a window is `minimized`, both `current` and `normal` will return the bounds of the window prior to it being minimized.
|
|
6212
|
+
*
|
|
6213
|
+
* **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.
|
|
6214
|
+
*
|
|
6215
|
+
* @default 'normal'
|
|
6216
|
+
*/
|
|
6217
|
+
boundsType?: 'normal' | 'current';
|
|
6218
|
+
}
|
|
6219
|
+
|
|
6187
6220
|
/**
|
|
6188
6221
|
* @interface
|
|
6189
6222
|
*/
|
|
@@ -8120,7 +8153,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8120
8153
|
*
|
|
8121
8154
|
* @remarks The built-in event emitter is not an OpenFin event emitter so it doesn't share propagation semantics.
|
|
8122
8155
|
*
|
|
8123
|
-
* ####
|
|
8156
|
+
* #### [addEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener)
|
|
8124
8157
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8125
8158
|
* @example
|
|
8126
8159
|
* ```js
|
|
@@ -8137,7 +8170,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8137
8170
|
* });
|
|
8138
8171
|
* ```
|
|
8139
8172
|
*
|
|
8140
|
-
* ####
|
|
8173
|
+
* #### [removeEventListener(type, listener [, options]);](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/removeEventListener)
|
|
8141
8174
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
8142
8175
|
* @example
|
|
8143
8176
|
* ```js
|
|
@@ -8410,7 +8443,7 @@ declare class Layout extends Base {
|
|
|
8410
8443
|
*/
|
|
8411
8444
|
applyPreset: (options: PresetLayoutOptions) => Promise<void>;
|
|
8412
8445
|
/**
|
|
8413
|
-
* Adds a view to the platform layout. Behaves like @link
|
|
8446
|
+
* Adds a view to the platform layout. Behaves like {@link Platform#createView Platform.createView} with the current layout as the target.
|
|
8414
8447
|
*
|
|
8415
8448
|
* @param viewOptions - The options for creating the view.
|
|
8416
8449
|
* @param options - Optional parameters for adding the view.
|
|
@@ -8426,7 +8459,7 @@ declare class Layout extends Base {
|
|
|
8426
8459
|
}>;
|
|
8427
8460
|
/**
|
|
8428
8461
|
* Closes a view by its identity. Throws an error if the view does not belong to the current layout.
|
|
8429
|
-
* Behaves like @link
|
|
8462
|
+
* Behaves like {@link Platform#closeView Platform.closeView} but only closes the view if it belongs the current layout.
|
|
8430
8463
|
*
|
|
8431
8464
|
* @param viewIdentity - The identity of the view to close.
|
|
8432
8465
|
* @returns A promise that resolves when the view is closed.
|
|
@@ -10065,6 +10098,7 @@ declare namespace OpenFin {
|
|
|
10065
10098
|
ScreenCapturePermission,
|
|
10066
10099
|
Bounds,
|
|
10067
10100
|
WindowBounds,
|
|
10101
|
+
GetBoundsOptions,
|
|
10068
10102
|
Rectangle,
|
|
10069
10103
|
ApplicationCreationOptions,
|
|
10070
10104
|
TimeZones,
|
|
@@ -12868,7 +12902,9 @@ declare interface ProtocolMap extends ProtocolMapBase {
|
|
|
12868
12902
|
options: OpenFin.TransitionOptions;
|
|
12869
12903
|
}>;
|
|
12870
12904
|
'get-all-frames': IdentityCall<{}, OpenFin.FrameInfo[]>;
|
|
12871
|
-
'get-window-bounds': IdentityCall<{
|
|
12905
|
+
'get-window-bounds': IdentityCall<{
|
|
12906
|
+
options?: OpenFin.GetBoundsOptions;
|
|
12907
|
+
}, OpenFin.WindowBounds>;
|
|
12872
12908
|
'center-window': IdentityCall;
|
|
12873
12909
|
'blur-window': IdentityCall;
|
|
12874
12910
|
'bring-window-to-front': IdentityCall;
|
|
@@ -14275,6 +14311,7 @@ declare type Snapshot = {
|
|
|
14275
14311
|
declare type SnapshotAppliedEvent = BaseEvents.BaseEvent & {
|
|
14276
14312
|
topic: 'application';
|
|
14277
14313
|
type: 'platform-snapshot-applied';
|
|
14314
|
+
snapshot: Snapshot;
|
|
14278
14315
|
};
|
|
14279
14316
|
|
|
14280
14317
|
/**
|
|
@@ -18555,7 +18592,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
|
18555
18592
|
* getBounds().then(bounds => console.log(bounds)).catch(err => console.log(err));
|
|
18556
18593
|
* ```
|
|
18557
18594
|
*/
|
|
18558
|
-
getBounds(): Promise<OpenFin.WindowBounds>;
|
|
18595
|
+
getBounds(options?: OpenFin.GetBoundsOptions): Promise<OpenFin.WindowBounds>;
|
|
18559
18596
|
/**
|
|
18560
18597
|
* Centers the window on its current screen.
|
|
18561
18598
|
*
|
package/out/fdc3-api.js
CHANGED
|
@@ -489,7 +489,7 @@ var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
489
489
|
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");
|
|
490
490
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
491
491
|
};
|
|
492
|
-
var _EmitterBase_emitterAccessor;
|
|
492
|
+
var _EmitterBase_emitterAccessor, _EmitterBase_deregisterOnceListeners;
|
|
493
493
|
Object.defineProperty(base, "__esModule", { value: true });
|
|
494
494
|
base.Reply = base.EmitterBase = base.Base = void 0;
|
|
495
495
|
const promises_1 = promises;
|
|
@@ -561,6 +561,7 @@ class EmitterBase extends Base {
|
|
|
561
561
|
super(wire);
|
|
562
562
|
this.topic = topic;
|
|
563
563
|
_EmitterBase_emitterAccessor.set(this, void 0);
|
|
564
|
+
_EmitterBase_deregisterOnceListeners.set(this, void 0);
|
|
564
565
|
this.eventNames = () => (this.hasEmitter() ? this.getOrCreateEmitter().eventNames() : []);
|
|
565
566
|
/**
|
|
566
567
|
* @internal
|
|
@@ -569,7 +570,28 @@ class EmitterBase extends Base {
|
|
|
569
570
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
|
570
571
|
};
|
|
571
572
|
this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$3(this, _EmitterBase_emitterAccessor, "f"));
|
|
572
|
-
|
|
573
|
+
/**
|
|
574
|
+
* Cleans up after removal of a listener, e.g. deleting any lingering deregistration handlers for a
|
|
575
|
+
* `once` subscription.
|
|
576
|
+
*
|
|
577
|
+
* @remarks Implementing this as a `removeListener` handler ensures that direct removal of a listener
|
|
578
|
+
* on the base emitter will not leak additional core handlers. We could do this in the forwarding method,
|
|
579
|
+
* which would involve less "magic," but would be more-vulnerable to accidental re-introduction of a leak.
|
|
580
|
+
*/
|
|
581
|
+
this.cleanUpRemovedListener = (eventType, listener) => {
|
|
582
|
+
const deregister = __classPrivateFieldGet$3(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
|
|
583
|
+
if (deregister) {
|
|
584
|
+
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$3(this, _EmitterBase_emitterAccessor, "f"));
|
|
585
|
+
emitter.removeListener(eventType, deregister);
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
this.getOrCreateEmitter = () => {
|
|
589
|
+
const emitter = this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$3(this, _EmitterBase_emitterAccessor, "f"));
|
|
590
|
+
if (!emitter.listeners('removeListener').includes(this.cleanUpRemovedListener)) {
|
|
591
|
+
emitter.on('removeListener', this.cleanUpRemovedListener);
|
|
592
|
+
}
|
|
593
|
+
return emitter;
|
|
594
|
+
};
|
|
573
595
|
this.listeners = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(type) : [];
|
|
574
596
|
this.listenerCount = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listenerCount(type) : 0;
|
|
575
597
|
this.registerEventListener = async (eventType, options = {}, applySubscription, undoSubscription) => {
|
|
@@ -601,13 +623,13 @@ class EmitterBase extends Base {
|
|
|
601
623
|
type: eventType
|
|
602
624
|
};
|
|
603
625
|
await this.wire.sendAction('unsubscribe-to-desktop-event', runtimeEvent).catch(() => null);
|
|
604
|
-
|
|
605
|
-
return emitter;
|
|
626
|
+
return this.getOrCreateEmitter();
|
|
606
627
|
}
|
|
607
628
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
|
608
629
|
return Promise.resolve();
|
|
609
630
|
};
|
|
610
631
|
__classPrivateFieldSet$3(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
|
632
|
+
__classPrivateFieldSet$3(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
|
|
611
633
|
this.listeners = (event) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(event) : [];
|
|
612
634
|
}
|
|
613
635
|
/**
|
|
@@ -636,6 +658,7 @@ class EmitterBase extends Base {
|
|
|
636
658
|
*/
|
|
637
659
|
async once(eventType, listener, options) {
|
|
638
660
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
661
|
+
__classPrivateFieldGet$3(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
|
639
662
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
640
663
|
emitter.once(eventType, deregister);
|
|
641
664
|
emitter.once(eventType, listener);
|
|
@@ -666,6 +689,7 @@ class EmitterBase extends Base {
|
|
|
666
689
|
*/
|
|
667
690
|
async prependOnceListener(eventType, listener, options) {
|
|
668
691
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
692
|
+
__classPrivateFieldGet$3(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
|
669
693
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
670
694
|
emitter.prependOnceListener(eventType, listener);
|
|
671
695
|
emitter.once(eventType, deregister);
|
|
@@ -724,13 +748,13 @@ class EmitterBase extends Base {
|
|
|
724
748
|
return this;
|
|
725
749
|
}
|
|
726
750
|
deleteEmitterIfNothingRegistered(emitter) {
|
|
727
|
-
if (emitter.eventNames().
|
|
751
|
+
if (emitter.eventNames().every((type) => type === 'removeListener')) {
|
|
728
752
|
this.wire.eventAggregator.delete(__classPrivateFieldGet$3(this, _EmitterBase_emitterAccessor, "f"));
|
|
729
753
|
}
|
|
730
754
|
}
|
|
731
755
|
}
|
|
732
756
|
base.EmitterBase = EmitterBase;
|
|
733
|
-
_EmitterBase_emitterAccessor = new WeakMap();
|
|
757
|
+
_EmitterBase_emitterAccessor = new WeakMap(), _EmitterBase_deregisterOnceListeners = new WeakMap();
|
|
734
758
|
class Reply {
|
|
735
759
|
}
|
|
736
760
|
base.Reply = Reply;
|