@openfin/fdc3-api 44.100.61 → 45.100.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/fdc3-api-alpha.d.ts +113 -12
- package/out/fdc3-api-beta.d.ts +113 -12
- package/out/fdc3-api-public.d.ts +113 -12
- package/out/fdc3-api.d.ts +113 -12
- package/out/fdc3-api.js +186 -22
- package/package.json +4 -4
package/out/fdc3-api-alpha.d.ts
CHANGED
|
@@ -1418,29 +1418,26 @@ declare type ApplicationWindowInfo = {
|
|
|
1418
1418
|
};
|
|
1419
1419
|
|
|
1420
1420
|
/**
|
|
1421
|
-
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled
|
|
1421
|
+
* The `appLogLevel` option allows the verbosity of app logs that are collected for a Window or View to be controlled for its application.
|
|
1422
1422
|
*
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1426
|
-
*
|
|
1427
|
-
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1428
|
-
* controlling a url's appLogLevel, its options will be ignored.
|
|
1423
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note, when a domain setting is actively
|
|
1424
|
+
* controlling a url's appLogLevel, its view/window options will be ignored.
|
|
1429
1425
|
*
|
|
1430
1426
|
* @default 'debug'
|
|
1431
1427
|
*
|
|
1428
|
+
* Please note, if the manifest setting `platform.enableAppLogging` or `startup_app.enableAppLogging` is set to `false`, this feature will be disabled.
|
|
1429
|
+
*
|
|
1432
1430
|
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1433
1431
|
*
|
|
1434
1432
|
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1435
1433
|
*
|
|
1436
|
-
* We also use domain settings to suppress logs
|
|
1434
|
+
* We also use domain settings to suppress logs for an example URL, and to lower verbosity to 'debug' for another.
|
|
1437
1435
|
*
|
|
1438
1436
|
* ```ts
|
|
1439
1437
|
* {
|
|
1440
1438
|
* <rest of settings>
|
|
1441
1439
|
* "platform": {
|
|
1442
1440
|
* <rest of settings>
|
|
1443
|
-
* "enableAppLogging": "true",
|
|
1444
1441
|
* "defaultViewOptions": {
|
|
1445
1442
|
* "appLogLevel": "warn"
|
|
1446
1443
|
* },
|
|
@@ -3129,6 +3126,25 @@ declare type ClickedMenuResult<Data extends unknown = unknown> = {
|
|
|
3129
3126
|
data: Data;
|
|
3130
3127
|
};
|
|
3131
3128
|
|
|
3129
|
+
/**
|
|
3130
|
+
* client-changed-context-group is emitted whenever a client connected to the same InteropBroker
|
|
3131
|
+
* (including the current client) change or leave a context group.
|
|
3132
|
+
*/
|
|
3133
|
+
declare type ClientChangedContextGroup = InteropClientEvent<'client-changed-context-group', {
|
|
3134
|
+
/**
|
|
3135
|
+
* The identity of the affected InteropClient
|
|
3136
|
+
*/
|
|
3137
|
+
identity: ClientIdentity;
|
|
3138
|
+
/**
|
|
3139
|
+
* The new context group id, or null if removed from a group.
|
|
3140
|
+
*/
|
|
3141
|
+
contextGroupId: string | null;
|
|
3142
|
+
/**
|
|
3143
|
+
* The previous context group id, or null if none exists.
|
|
3144
|
+
*/
|
|
3145
|
+
previousContextGroupId: string | null;
|
|
3146
|
+
}>;
|
|
3147
|
+
|
|
3132
3148
|
/**
|
|
3133
3149
|
* @interface
|
|
3134
3150
|
*/
|
|
@@ -3675,6 +3691,12 @@ declare type ConstViewOptions = {
|
|
|
3675
3691
|
* Control which options to ignore when creating a Platform View.
|
|
3676
3692
|
*/
|
|
3677
3693
|
excludeOptions: ExcludeOptions;
|
|
3694
|
+
/**
|
|
3695
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3696
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3697
|
+
* When false, the target name passed to window.open is respected.
|
|
3698
|
+
*/
|
|
3699
|
+
ignoreChildFrameName?: boolean;
|
|
3678
3700
|
};
|
|
3679
3701
|
|
|
3680
3702
|
/**
|
|
@@ -3942,6 +3964,12 @@ declare type ConstWindowOptions = {
|
|
|
3942
3964
|
* Controls whether frameless window should have rounded corners. Default is false for Windows and true for MacOS. Setting this property to false will prevent the window from being fullscreenable on macOS. On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
|
|
3943
3965
|
*/
|
|
3944
3966
|
roundedCorners: boolean;
|
|
3967
|
+
/**
|
|
3968
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3969
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3970
|
+
* When false, the target name passed to window.open is respected.
|
|
3971
|
+
*/
|
|
3972
|
+
ignoreChildFrameName?: boolean;
|
|
3945
3973
|
/**
|
|
3946
3974
|
* Configuration for download bubble UI.
|
|
3947
3975
|
*/
|
|
@@ -5136,7 +5164,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
|
|
|
5136
5164
|
*/
|
|
5137
5165
|
declare type Event_4 = (WebContentsEvents.Event<'view'> & {
|
|
5138
5166
|
target: OpenFin.Identity;
|
|
5139
|
-
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
|
|
5167
|
+
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
|
|
5140
5168
|
|
|
5141
5169
|
/**
|
|
5142
5170
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
|
|
@@ -6624,7 +6652,28 @@ declare type Hotkey = {
|
|
|
6624
6652
|
*/
|
|
6625
6653
|
keys: string;
|
|
6626
6654
|
/**
|
|
6627
|
-
*
|
|
6655
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6656
|
+
*
|
|
6657
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6658
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6659
|
+
*
|
|
6660
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6661
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6662
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6663
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6664
|
+
*
|
|
6665
|
+
* @default 'capture'
|
|
6666
|
+
*/
|
|
6667
|
+
phase?: 'capture' | 'bubble';
|
|
6668
|
+
/**
|
|
6669
|
+
* Determines if the event should continue to the renderer.
|
|
6670
|
+
*
|
|
6671
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6672
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6673
|
+
*
|
|
6674
|
+
* @remarks
|
|
6675
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6676
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6628
6677
|
*
|
|
6629
6678
|
* @default false
|
|
6630
6679
|
*/
|
|
@@ -7678,6 +7727,20 @@ declare type InteropBrokerOptions = {
|
|
|
7678
7727
|
declare class InteropClient extends Base {
|
|
7679
7728
|
#private;
|
|
7680
7729
|
/* Excluded from this release type: __constructor */
|
|
7730
|
+
/**
|
|
7731
|
+
* `addListener` allows the InteropClient to subscribe to events emitted by the connected InteropBroker.
|
|
7732
|
+
* @param type The event type to subscribe to.
|
|
7733
|
+
* @param listener Callback invoked whenever the event occurs.
|
|
7734
|
+
* @returns Promise resolving with void once the listener is registered.
|
|
7735
|
+
*/
|
|
7736
|
+
addListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7737
|
+
/**
|
|
7738
|
+
* `removeListener` removes a registered event listener.
|
|
7739
|
+
* @param type The event type to subscribe to.
|
|
7740
|
+
* @param listener Callback to be removed.
|
|
7741
|
+
* @returns Promise resolving with void even if no callback was found.
|
|
7742
|
+
*/
|
|
7743
|
+
removeListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7681
7744
|
/**
|
|
7682
7745
|
* Sets a context for the context group of the current entity.
|
|
7683
7746
|
*
|
|
@@ -8047,6 +8110,16 @@ declare class InteropClient extends Base {
|
|
|
8047
8110
|
/* Excluded from this release type: ferryFdc3Call */
|
|
8048
8111
|
}
|
|
8049
8112
|
|
|
8113
|
+
/**
|
|
8114
|
+
* Interop Client Events
|
|
8115
|
+
*/
|
|
8116
|
+
declare type InteropClientEvent<TName, TEventType = void> = {
|
|
8117
|
+
type: TName;
|
|
8118
|
+
event: TEventType;
|
|
8119
|
+
};
|
|
8120
|
+
|
|
8121
|
+
declare type InteropClientEvents = ClientChangedContextGroup;
|
|
8122
|
+
|
|
8050
8123
|
/**
|
|
8051
8124
|
* @interface
|
|
8052
8125
|
*/
|
|
@@ -9838,10 +9911,12 @@ declare type MutableWindowOptions = {
|
|
|
9838
9911
|
*/
|
|
9839
9912
|
customData: any;
|
|
9840
9913
|
/**
|
|
9841
|
-
* @deprecated Will be removed in runtime version 45
|
|
9842
9914
|
*
|
|
9843
9915
|
* Show the window's frame.
|
|
9844
9916
|
*
|
|
9917
|
+
* @remarks
|
|
9918
|
+
* This property will not be updatable starting runtime version 45.
|
|
9919
|
+
*
|
|
9845
9920
|
* @default true
|
|
9846
9921
|
*/
|
|
9847
9922
|
frame: boolean;
|
|
@@ -10730,6 +10805,9 @@ declare namespace OpenFin {
|
|
|
10730
10805
|
ServeAssetOptions,
|
|
10731
10806
|
ServedAssetInfo,
|
|
10732
10807
|
ResolvedDomainSettings,
|
|
10808
|
+
InteropClientEvent,
|
|
10809
|
+
ClientChangedContextGroup,
|
|
10810
|
+
InteropClientEvents,
|
|
10733
10811
|
ApplicationEvents,
|
|
10734
10812
|
BaseEvents,
|
|
10735
10813
|
ExternalApplicationEvents,
|
|
@@ -15266,6 +15344,11 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
|
|
|
15266
15344
|
/**
|
|
15267
15345
|
* Returns a unique identifier (UUID) provided by the machine.
|
|
15268
15346
|
*
|
|
15347
|
+
* On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
|
|
15348
|
+
* `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
|
|
15349
|
+
*
|
|
15350
|
+
* On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
|
|
15351
|
+
*
|
|
15269
15352
|
* @example
|
|
15270
15353
|
* ```js
|
|
15271
15354
|
* fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
|
|
@@ -17924,6 +18007,7 @@ declare namespace ViewEvents {
|
|
|
17924
18007
|
HotkeyEvent,
|
|
17925
18008
|
ShownEvent,
|
|
17926
18009
|
HostContextChangedEvent,
|
|
18010
|
+
ViewOptionsChangedEvent,
|
|
17927
18011
|
Event_4 as Event,
|
|
17928
18012
|
ViewEvent,
|
|
17929
18013
|
WillPropagateViewEvent,
|
|
@@ -18052,6 +18136,23 @@ declare class ViewModule extends Base {
|
|
|
18052
18136
|
*/
|
|
18053
18137
|
declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
18054
18138
|
|
|
18139
|
+
/**
|
|
18140
|
+
* Generated whenever a view's options are changed.
|
|
18141
|
+
* @remarks Will not emit if an updateOptions call does not result in a new diff.
|
|
18142
|
+
* @interface
|
|
18143
|
+
*/
|
|
18144
|
+
declare type ViewOptionsChangedEvent = BaseEvent_4 & {
|
|
18145
|
+
type: 'options-changed';
|
|
18146
|
+
/**
|
|
18147
|
+
* The new state of the view's options.
|
|
18148
|
+
*/
|
|
18149
|
+
options: OpenFin.ViewOptions;
|
|
18150
|
+
/**
|
|
18151
|
+
* Diff between the previous value of options and new.
|
|
18152
|
+
*/
|
|
18153
|
+
diff: OpenFin.ViewOptions;
|
|
18154
|
+
};
|
|
18155
|
+
|
|
18055
18156
|
/**
|
|
18056
18157
|
* @interface
|
|
18057
18158
|
*/
|
package/out/fdc3-api-beta.d.ts
CHANGED
|
@@ -1418,29 +1418,26 @@ declare type ApplicationWindowInfo = {
|
|
|
1418
1418
|
};
|
|
1419
1419
|
|
|
1420
1420
|
/**
|
|
1421
|
-
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled
|
|
1421
|
+
* The `appLogLevel` option allows the verbosity of app logs that are collected for a Window or View to be controlled for its application.
|
|
1422
1422
|
*
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1426
|
-
*
|
|
1427
|
-
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1428
|
-
* controlling a url's appLogLevel, its options will be ignored.
|
|
1423
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note, when a domain setting is actively
|
|
1424
|
+
* controlling a url's appLogLevel, its view/window options will be ignored.
|
|
1429
1425
|
*
|
|
1430
1426
|
* @default 'debug'
|
|
1431
1427
|
*
|
|
1428
|
+
* Please note, if the manifest setting `platform.enableAppLogging` or `startup_app.enableAppLogging` is set to `false`, this feature will be disabled.
|
|
1429
|
+
*
|
|
1432
1430
|
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1433
1431
|
*
|
|
1434
1432
|
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1435
1433
|
*
|
|
1436
|
-
* We also use domain settings to suppress logs
|
|
1434
|
+
* We also use domain settings to suppress logs for an example URL, and to lower verbosity to 'debug' for another.
|
|
1437
1435
|
*
|
|
1438
1436
|
* ```ts
|
|
1439
1437
|
* {
|
|
1440
1438
|
* <rest of settings>
|
|
1441
1439
|
* "platform": {
|
|
1442
1440
|
* <rest of settings>
|
|
1443
|
-
* "enableAppLogging": "true",
|
|
1444
1441
|
* "defaultViewOptions": {
|
|
1445
1442
|
* "appLogLevel": "warn"
|
|
1446
1443
|
* },
|
|
@@ -3129,6 +3126,25 @@ declare type ClickedMenuResult<Data extends unknown = unknown> = {
|
|
|
3129
3126
|
data: Data;
|
|
3130
3127
|
};
|
|
3131
3128
|
|
|
3129
|
+
/**
|
|
3130
|
+
* client-changed-context-group is emitted whenever a client connected to the same InteropBroker
|
|
3131
|
+
* (including the current client) change or leave a context group.
|
|
3132
|
+
*/
|
|
3133
|
+
declare type ClientChangedContextGroup = InteropClientEvent<'client-changed-context-group', {
|
|
3134
|
+
/**
|
|
3135
|
+
* The identity of the affected InteropClient
|
|
3136
|
+
*/
|
|
3137
|
+
identity: ClientIdentity;
|
|
3138
|
+
/**
|
|
3139
|
+
* The new context group id, or null if removed from a group.
|
|
3140
|
+
*/
|
|
3141
|
+
contextGroupId: string | null;
|
|
3142
|
+
/**
|
|
3143
|
+
* The previous context group id, or null if none exists.
|
|
3144
|
+
*/
|
|
3145
|
+
previousContextGroupId: string | null;
|
|
3146
|
+
}>;
|
|
3147
|
+
|
|
3132
3148
|
/**
|
|
3133
3149
|
* @interface
|
|
3134
3150
|
*/
|
|
@@ -3675,6 +3691,12 @@ declare type ConstViewOptions = {
|
|
|
3675
3691
|
* Control which options to ignore when creating a Platform View.
|
|
3676
3692
|
*/
|
|
3677
3693
|
excludeOptions: ExcludeOptions;
|
|
3694
|
+
/**
|
|
3695
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3696
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3697
|
+
* When false, the target name passed to window.open is respected.
|
|
3698
|
+
*/
|
|
3699
|
+
ignoreChildFrameName?: boolean;
|
|
3678
3700
|
};
|
|
3679
3701
|
|
|
3680
3702
|
/**
|
|
@@ -3942,6 +3964,12 @@ declare type ConstWindowOptions = {
|
|
|
3942
3964
|
* Controls whether frameless window should have rounded corners. Default is false for Windows and true for MacOS. Setting this property to false will prevent the window from being fullscreenable on macOS. On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
|
|
3943
3965
|
*/
|
|
3944
3966
|
roundedCorners: boolean;
|
|
3967
|
+
/**
|
|
3968
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3969
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3970
|
+
* When false, the target name passed to window.open is respected.
|
|
3971
|
+
*/
|
|
3972
|
+
ignoreChildFrameName?: boolean;
|
|
3945
3973
|
/**
|
|
3946
3974
|
* Configuration for download bubble UI.
|
|
3947
3975
|
*/
|
|
@@ -5136,7 +5164,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
|
|
|
5136
5164
|
*/
|
|
5137
5165
|
declare type Event_4 = (WebContentsEvents.Event<'view'> & {
|
|
5138
5166
|
target: OpenFin.Identity;
|
|
5139
|
-
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
|
|
5167
|
+
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
|
|
5140
5168
|
|
|
5141
5169
|
/**
|
|
5142
5170
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
|
|
@@ -6624,7 +6652,28 @@ declare type Hotkey = {
|
|
|
6624
6652
|
*/
|
|
6625
6653
|
keys: string;
|
|
6626
6654
|
/**
|
|
6627
|
-
*
|
|
6655
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6656
|
+
*
|
|
6657
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6658
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6659
|
+
*
|
|
6660
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6661
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6662
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6663
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6664
|
+
*
|
|
6665
|
+
* @default 'capture'
|
|
6666
|
+
*/
|
|
6667
|
+
phase?: 'capture' | 'bubble';
|
|
6668
|
+
/**
|
|
6669
|
+
* Determines if the event should continue to the renderer.
|
|
6670
|
+
*
|
|
6671
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6672
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6673
|
+
*
|
|
6674
|
+
* @remarks
|
|
6675
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6676
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6628
6677
|
*
|
|
6629
6678
|
* @default false
|
|
6630
6679
|
*/
|
|
@@ -7678,6 +7727,20 @@ declare type InteropBrokerOptions = {
|
|
|
7678
7727
|
declare class InteropClient extends Base {
|
|
7679
7728
|
#private;
|
|
7680
7729
|
/* Excluded from this release type: __constructor */
|
|
7730
|
+
/**
|
|
7731
|
+
* `addListener` allows the InteropClient to subscribe to events emitted by the connected InteropBroker.
|
|
7732
|
+
* @param type The event type to subscribe to.
|
|
7733
|
+
* @param listener Callback invoked whenever the event occurs.
|
|
7734
|
+
* @returns Promise resolving with void once the listener is registered.
|
|
7735
|
+
*/
|
|
7736
|
+
addListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7737
|
+
/**
|
|
7738
|
+
* `removeListener` removes a registered event listener.
|
|
7739
|
+
* @param type The event type to subscribe to.
|
|
7740
|
+
* @param listener Callback to be removed.
|
|
7741
|
+
* @returns Promise resolving with void even if no callback was found.
|
|
7742
|
+
*/
|
|
7743
|
+
removeListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7681
7744
|
/**
|
|
7682
7745
|
* Sets a context for the context group of the current entity.
|
|
7683
7746
|
*
|
|
@@ -8047,6 +8110,16 @@ declare class InteropClient extends Base {
|
|
|
8047
8110
|
/* Excluded from this release type: ferryFdc3Call */
|
|
8048
8111
|
}
|
|
8049
8112
|
|
|
8113
|
+
/**
|
|
8114
|
+
* Interop Client Events
|
|
8115
|
+
*/
|
|
8116
|
+
declare type InteropClientEvent<TName, TEventType = void> = {
|
|
8117
|
+
type: TName;
|
|
8118
|
+
event: TEventType;
|
|
8119
|
+
};
|
|
8120
|
+
|
|
8121
|
+
declare type InteropClientEvents = ClientChangedContextGroup;
|
|
8122
|
+
|
|
8050
8123
|
/**
|
|
8051
8124
|
* @interface
|
|
8052
8125
|
*/
|
|
@@ -9838,10 +9911,12 @@ declare type MutableWindowOptions = {
|
|
|
9838
9911
|
*/
|
|
9839
9912
|
customData: any;
|
|
9840
9913
|
/**
|
|
9841
|
-
* @deprecated Will be removed in runtime version 45
|
|
9842
9914
|
*
|
|
9843
9915
|
* Show the window's frame.
|
|
9844
9916
|
*
|
|
9917
|
+
* @remarks
|
|
9918
|
+
* This property will not be updatable starting runtime version 45.
|
|
9919
|
+
*
|
|
9845
9920
|
* @default true
|
|
9846
9921
|
*/
|
|
9847
9922
|
frame: boolean;
|
|
@@ -10730,6 +10805,9 @@ declare namespace OpenFin {
|
|
|
10730
10805
|
ServeAssetOptions,
|
|
10731
10806
|
ServedAssetInfo,
|
|
10732
10807
|
ResolvedDomainSettings,
|
|
10808
|
+
InteropClientEvent,
|
|
10809
|
+
ClientChangedContextGroup,
|
|
10810
|
+
InteropClientEvents,
|
|
10733
10811
|
ApplicationEvents,
|
|
10734
10812
|
BaseEvents,
|
|
10735
10813
|
ExternalApplicationEvents,
|
|
@@ -15266,6 +15344,11 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
|
|
|
15266
15344
|
/**
|
|
15267
15345
|
* Returns a unique identifier (UUID) provided by the machine.
|
|
15268
15346
|
*
|
|
15347
|
+
* On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
|
|
15348
|
+
* `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
|
|
15349
|
+
*
|
|
15350
|
+
* On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
|
|
15351
|
+
*
|
|
15269
15352
|
* @example
|
|
15270
15353
|
* ```js
|
|
15271
15354
|
* fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
|
|
@@ -17924,6 +18007,7 @@ declare namespace ViewEvents {
|
|
|
17924
18007
|
HotkeyEvent,
|
|
17925
18008
|
ShownEvent,
|
|
17926
18009
|
HostContextChangedEvent,
|
|
18010
|
+
ViewOptionsChangedEvent,
|
|
17927
18011
|
Event_4 as Event,
|
|
17928
18012
|
ViewEvent,
|
|
17929
18013
|
WillPropagateViewEvent,
|
|
@@ -18052,6 +18136,23 @@ declare class ViewModule extends Base {
|
|
|
18052
18136
|
*/
|
|
18053
18137
|
declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
18054
18138
|
|
|
18139
|
+
/**
|
|
18140
|
+
* Generated whenever a view's options are changed.
|
|
18141
|
+
* @remarks Will not emit if an updateOptions call does not result in a new diff.
|
|
18142
|
+
* @interface
|
|
18143
|
+
*/
|
|
18144
|
+
declare type ViewOptionsChangedEvent = BaseEvent_4 & {
|
|
18145
|
+
type: 'options-changed';
|
|
18146
|
+
/**
|
|
18147
|
+
* The new state of the view's options.
|
|
18148
|
+
*/
|
|
18149
|
+
options: OpenFin.ViewOptions;
|
|
18150
|
+
/**
|
|
18151
|
+
* Diff between the previous value of options and new.
|
|
18152
|
+
*/
|
|
18153
|
+
diff: OpenFin.ViewOptions;
|
|
18154
|
+
};
|
|
18155
|
+
|
|
18055
18156
|
/**
|
|
18056
18157
|
* @interface
|
|
18057
18158
|
*/
|
package/out/fdc3-api-public.d.ts
CHANGED
|
@@ -1418,29 +1418,26 @@ declare type ApplicationWindowInfo = {
|
|
|
1418
1418
|
};
|
|
1419
1419
|
|
|
1420
1420
|
/**
|
|
1421
|
-
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled
|
|
1421
|
+
* The `appLogLevel` option allows the verbosity of app logs that are collected for a Window or View to be controlled for its application.
|
|
1422
1422
|
*
|
|
1423
|
-
*
|
|
1424
|
-
*
|
|
1425
|
-
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1426
|
-
*
|
|
1427
|
-
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1428
|
-
* controlling a url's appLogLevel, its options will be ignored.
|
|
1423
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note, when a domain setting is actively
|
|
1424
|
+
* controlling a url's appLogLevel, its view/window options will be ignored.
|
|
1429
1425
|
*
|
|
1430
1426
|
* @default 'debug'
|
|
1431
1427
|
*
|
|
1428
|
+
* Please note, if the manifest setting `platform.enableAppLogging` or `startup_app.enableAppLogging` is set to `false`, this feature will be disabled.
|
|
1429
|
+
*
|
|
1432
1430
|
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1433
1431
|
*
|
|
1434
1432
|
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1435
1433
|
*
|
|
1436
|
-
* We also use domain settings to suppress logs
|
|
1434
|
+
* We also use domain settings to suppress logs for an example URL, and to lower verbosity to 'debug' for another.
|
|
1437
1435
|
*
|
|
1438
1436
|
* ```ts
|
|
1439
1437
|
* {
|
|
1440
1438
|
* <rest of settings>
|
|
1441
1439
|
* "platform": {
|
|
1442
1440
|
* <rest of settings>
|
|
1443
|
-
* "enableAppLogging": "true",
|
|
1444
1441
|
* "defaultViewOptions": {
|
|
1445
1442
|
* "appLogLevel": "warn"
|
|
1446
1443
|
* },
|
|
@@ -3129,6 +3126,25 @@ declare type ClickedMenuResult<Data extends unknown = unknown> = {
|
|
|
3129
3126
|
data: Data;
|
|
3130
3127
|
};
|
|
3131
3128
|
|
|
3129
|
+
/**
|
|
3130
|
+
* client-changed-context-group is emitted whenever a client connected to the same InteropBroker
|
|
3131
|
+
* (including the current client) change or leave a context group.
|
|
3132
|
+
*/
|
|
3133
|
+
declare type ClientChangedContextGroup = InteropClientEvent<'client-changed-context-group', {
|
|
3134
|
+
/**
|
|
3135
|
+
* The identity of the affected InteropClient
|
|
3136
|
+
*/
|
|
3137
|
+
identity: ClientIdentity;
|
|
3138
|
+
/**
|
|
3139
|
+
* The new context group id, or null if removed from a group.
|
|
3140
|
+
*/
|
|
3141
|
+
contextGroupId: string | null;
|
|
3142
|
+
/**
|
|
3143
|
+
* The previous context group id, or null if none exists.
|
|
3144
|
+
*/
|
|
3145
|
+
previousContextGroupId: string | null;
|
|
3146
|
+
}>;
|
|
3147
|
+
|
|
3132
3148
|
/**
|
|
3133
3149
|
* @interface
|
|
3134
3150
|
*/
|
|
@@ -3675,6 +3691,12 @@ declare type ConstViewOptions = {
|
|
|
3675
3691
|
* Control which options to ignore when creating a Platform View.
|
|
3676
3692
|
*/
|
|
3677
3693
|
excludeOptions: ExcludeOptions;
|
|
3694
|
+
/**
|
|
3695
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3696
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3697
|
+
* When false, the target name passed to window.open is respected.
|
|
3698
|
+
*/
|
|
3699
|
+
ignoreChildFrameName?: boolean;
|
|
3678
3700
|
};
|
|
3679
3701
|
|
|
3680
3702
|
/**
|
|
@@ -3942,6 +3964,12 @@ declare type ConstWindowOptions = {
|
|
|
3942
3964
|
* Controls whether frameless window should have rounded corners. Default is false for Windows and true for MacOS. Setting this property to false will prevent the window from being fullscreenable on macOS. On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
|
|
3943
3965
|
*/
|
|
3944
3966
|
roundedCorners: boolean;
|
|
3967
|
+
/**
|
|
3968
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3969
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3970
|
+
* When false, the target name passed to window.open is respected.
|
|
3971
|
+
*/
|
|
3972
|
+
ignoreChildFrameName?: boolean;
|
|
3945
3973
|
/**
|
|
3946
3974
|
* Configuration for download bubble UI.
|
|
3947
3975
|
*/
|
|
@@ -5136,7 +5164,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
|
|
|
5136
5164
|
*/
|
|
5137
5165
|
declare type Event_4 = (WebContentsEvents.Event<'view'> & {
|
|
5138
5166
|
target: OpenFin.Identity;
|
|
5139
|
-
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
|
|
5167
|
+
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
|
|
5140
5168
|
|
|
5141
5169
|
/**
|
|
5142
5170
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
|
|
@@ -6624,7 +6652,28 @@ declare type Hotkey = {
|
|
|
6624
6652
|
*/
|
|
6625
6653
|
keys: string;
|
|
6626
6654
|
/**
|
|
6627
|
-
*
|
|
6655
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6656
|
+
*
|
|
6657
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6658
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6659
|
+
*
|
|
6660
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6661
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6662
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6663
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6664
|
+
*
|
|
6665
|
+
* @default 'capture'
|
|
6666
|
+
*/
|
|
6667
|
+
phase?: 'capture' | 'bubble';
|
|
6668
|
+
/**
|
|
6669
|
+
* Determines if the event should continue to the renderer.
|
|
6670
|
+
*
|
|
6671
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6672
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6673
|
+
*
|
|
6674
|
+
* @remarks
|
|
6675
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6676
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6628
6677
|
*
|
|
6629
6678
|
* @default false
|
|
6630
6679
|
*/
|
|
@@ -7678,6 +7727,20 @@ declare type InteropBrokerOptions = {
|
|
|
7678
7727
|
declare class InteropClient extends Base {
|
|
7679
7728
|
#private;
|
|
7680
7729
|
/* Excluded from this release type: __constructor */
|
|
7730
|
+
/**
|
|
7731
|
+
* `addListener` allows the InteropClient to subscribe to events emitted by the connected InteropBroker.
|
|
7732
|
+
* @param type The event type to subscribe to.
|
|
7733
|
+
* @param listener Callback invoked whenever the event occurs.
|
|
7734
|
+
* @returns Promise resolving with void once the listener is registered.
|
|
7735
|
+
*/
|
|
7736
|
+
addListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7737
|
+
/**
|
|
7738
|
+
* `removeListener` removes a registered event listener.
|
|
7739
|
+
* @param type The event type to subscribe to.
|
|
7740
|
+
* @param listener Callback to be removed.
|
|
7741
|
+
* @returns Promise resolving with void even if no callback was found.
|
|
7742
|
+
*/
|
|
7743
|
+
removeListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7681
7744
|
/**
|
|
7682
7745
|
* Sets a context for the context group of the current entity.
|
|
7683
7746
|
*
|
|
@@ -8047,6 +8110,16 @@ declare class InteropClient extends Base {
|
|
|
8047
8110
|
/* Excluded from this release type: ferryFdc3Call */
|
|
8048
8111
|
}
|
|
8049
8112
|
|
|
8113
|
+
/**
|
|
8114
|
+
* Interop Client Events
|
|
8115
|
+
*/
|
|
8116
|
+
declare type InteropClientEvent<TName, TEventType = void> = {
|
|
8117
|
+
type: TName;
|
|
8118
|
+
event: TEventType;
|
|
8119
|
+
};
|
|
8120
|
+
|
|
8121
|
+
declare type InteropClientEvents = ClientChangedContextGroup;
|
|
8122
|
+
|
|
8050
8123
|
/**
|
|
8051
8124
|
* @interface
|
|
8052
8125
|
*/
|
|
@@ -9838,10 +9911,12 @@ declare type MutableWindowOptions = {
|
|
|
9838
9911
|
*/
|
|
9839
9912
|
customData: any;
|
|
9840
9913
|
/**
|
|
9841
|
-
* @deprecated Will be removed in runtime version 45
|
|
9842
9914
|
*
|
|
9843
9915
|
* Show the window's frame.
|
|
9844
9916
|
*
|
|
9917
|
+
* @remarks
|
|
9918
|
+
* This property will not be updatable starting runtime version 45.
|
|
9919
|
+
*
|
|
9845
9920
|
* @default true
|
|
9846
9921
|
*/
|
|
9847
9922
|
frame: boolean;
|
|
@@ -10730,6 +10805,9 @@ declare namespace OpenFin {
|
|
|
10730
10805
|
ServeAssetOptions,
|
|
10731
10806
|
ServedAssetInfo,
|
|
10732
10807
|
ResolvedDomainSettings,
|
|
10808
|
+
InteropClientEvent,
|
|
10809
|
+
ClientChangedContextGroup,
|
|
10810
|
+
InteropClientEvents,
|
|
10733
10811
|
ApplicationEvents,
|
|
10734
10812
|
BaseEvents,
|
|
10735
10813
|
ExternalApplicationEvents,
|
|
@@ -15266,6 +15344,11 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
|
|
|
15266
15344
|
/**
|
|
15267
15345
|
* Returns a unique identifier (UUID) provided by the machine.
|
|
15268
15346
|
*
|
|
15347
|
+
* On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
|
|
15348
|
+
* `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
|
|
15349
|
+
*
|
|
15350
|
+
* On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
|
|
15351
|
+
*
|
|
15269
15352
|
* @example
|
|
15270
15353
|
* ```js
|
|
15271
15354
|
* fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
|
|
@@ -17924,6 +18007,7 @@ declare namespace ViewEvents {
|
|
|
17924
18007
|
HotkeyEvent,
|
|
17925
18008
|
ShownEvent,
|
|
17926
18009
|
HostContextChangedEvent,
|
|
18010
|
+
ViewOptionsChangedEvent,
|
|
17927
18011
|
Event_4 as Event,
|
|
17928
18012
|
ViewEvent,
|
|
17929
18013
|
WillPropagateViewEvent,
|
|
@@ -18052,6 +18136,23 @@ declare class ViewModule extends Base {
|
|
|
18052
18136
|
*/
|
|
18053
18137
|
declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
18054
18138
|
|
|
18139
|
+
/**
|
|
18140
|
+
* Generated whenever a view's options are changed.
|
|
18141
|
+
* @remarks Will not emit if an updateOptions call does not result in a new diff.
|
|
18142
|
+
* @interface
|
|
18143
|
+
*/
|
|
18144
|
+
declare type ViewOptionsChangedEvent = BaseEvent_4 & {
|
|
18145
|
+
type: 'options-changed';
|
|
18146
|
+
/**
|
|
18147
|
+
* The new state of the view's options.
|
|
18148
|
+
*/
|
|
18149
|
+
options: OpenFin.ViewOptions;
|
|
18150
|
+
/**
|
|
18151
|
+
* Diff between the previous value of options and new.
|
|
18152
|
+
*/
|
|
18153
|
+
diff: OpenFin.ViewOptions;
|
|
18154
|
+
};
|
|
18155
|
+
|
|
18055
18156
|
/**
|
|
18056
18157
|
* @interface
|
|
18057
18158
|
*/
|
package/out/fdc3-api.d.ts
CHANGED
|
@@ -1424,29 +1424,26 @@ declare type ApplicationWindowInfo = {
|
|
|
1424
1424
|
};
|
|
1425
1425
|
|
|
1426
1426
|
/**
|
|
1427
|
-
* `appLogLevel` allows the verbosity of app logs that are collected for a Window or View to be controlled
|
|
1427
|
+
* The `appLogLevel` option allows the verbosity of app logs that are collected for a Window or View to be controlled for its application.
|
|
1428
1428
|
*
|
|
1429
|
-
*
|
|
1430
|
-
*
|
|
1431
|
-
* If not specified, and `enableAppLogging` is true for the application, the default level will be 'silent'.
|
|
1432
|
-
*
|
|
1433
|
-
* This setting can also be specified in a Domain Setting Rule, allowing per url exceptions to the default behavior to be made. Please note, when a domain setting is actively
|
|
1434
|
-
* controlling a url's appLogLevel, its options will be ignored.
|
|
1429
|
+
* This setting can also be specified in a Domain Setting Rule, allowing per url overrides to be defined. Please note, when a domain setting is actively
|
|
1430
|
+
* controlling a url's appLogLevel, its view/window options will be ignored.
|
|
1435
1431
|
*
|
|
1436
1432
|
* @default 'debug'
|
|
1437
1433
|
*
|
|
1434
|
+
* Please note, if the manifest setting `platform.enableAppLogging` or `startup_app.enableAppLogging` is set to `false`, this feature will be disabled.
|
|
1435
|
+
*
|
|
1438
1436
|
* @example Controlling App Logs With DefaultViewOptions + Domain Settings
|
|
1439
1437
|
*
|
|
1440
1438
|
* In this example manifest, we use `defaultViewOptions to set the default verbosity to 'warn'.
|
|
1441
1439
|
*
|
|
1442
|
-
* We also use domain settings to suppress logs
|
|
1440
|
+
* We also use domain settings to suppress logs for an example URL, and to lower verbosity to 'debug' for another.
|
|
1443
1441
|
*
|
|
1444
1442
|
* ```ts
|
|
1445
1443
|
* {
|
|
1446
1444
|
* <rest of settings>
|
|
1447
1445
|
* "platform": {
|
|
1448
1446
|
* <rest of settings>
|
|
1449
|
-
* "enableAppLogging": "true",
|
|
1450
1447
|
* "defaultViewOptions": {
|
|
1451
1448
|
* "appLogLevel": "warn"
|
|
1452
1449
|
* },
|
|
@@ -3185,6 +3182,25 @@ declare type ClickedMenuResult<Data extends unknown = unknown> = {
|
|
|
3185
3182
|
data: Data;
|
|
3186
3183
|
};
|
|
3187
3184
|
|
|
3185
|
+
/**
|
|
3186
|
+
* client-changed-context-group is emitted whenever a client connected to the same InteropBroker
|
|
3187
|
+
* (including the current client) change or leave a context group.
|
|
3188
|
+
*/
|
|
3189
|
+
declare type ClientChangedContextGroup = InteropClientEvent<'client-changed-context-group', {
|
|
3190
|
+
/**
|
|
3191
|
+
* The identity of the affected InteropClient
|
|
3192
|
+
*/
|
|
3193
|
+
identity: ClientIdentity;
|
|
3194
|
+
/**
|
|
3195
|
+
* The new context group id, or null if removed from a group.
|
|
3196
|
+
*/
|
|
3197
|
+
contextGroupId: string | null;
|
|
3198
|
+
/**
|
|
3199
|
+
* The previous context group id, or null if none exists.
|
|
3200
|
+
*/
|
|
3201
|
+
previousContextGroupId: string | null;
|
|
3202
|
+
}>;
|
|
3203
|
+
|
|
3188
3204
|
/**
|
|
3189
3205
|
* @interface
|
|
3190
3206
|
*/
|
|
@@ -3734,6 +3750,12 @@ declare type ConstViewOptions = {
|
|
|
3734
3750
|
* Control which options to ignore when creating a Platform View.
|
|
3735
3751
|
*/
|
|
3736
3752
|
excludeOptions: ExcludeOptions;
|
|
3753
|
+
/**
|
|
3754
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
3755
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
3756
|
+
* When false, the target name passed to window.open is respected.
|
|
3757
|
+
*/
|
|
3758
|
+
ignoreChildFrameName?: boolean;
|
|
3737
3759
|
};
|
|
3738
3760
|
|
|
3739
3761
|
/**
|
|
@@ -4001,6 +4023,12 @@ declare type ConstWindowOptions = {
|
|
|
4001
4023
|
* Controls whether frameless window should have rounded corners. Default is false for Windows and true for MacOS. Setting this property to false will prevent the window from being fullscreenable on macOS. On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
|
|
4002
4024
|
*/
|
|
4003
4025
|
roundedCorners: boolean;
|
|
4026
|
+
/**
|
|
4027
|
+
* Determines whether window.open calls from web contents should use the specified target name as provided, or automatically generate a unique name.
|
|
4028
|
+
* When true, each call generates a new unique target name, ensuring a new window is always created.
|
|
4029
|
+
* When false, the target name passed to window.open is respected.
|
|
4030
|
+
*/
|
|
4031
|
+
ignoreChildFrameName?: boolean;
|
|
4004
4032
|
/**
|
|
4005
4033
|
* Configuration for download bubble UI.
|
|
4006
4034
|
*/
|
|
@@ -5200,7 +5228,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
|
|
|
5200
5228
|
*/
|
|
5201
5229
|
declare type Event_4 = (WebContentsEvents.Event<'view'> & {
|
|
5202
5230
|
target: OpenFin.Identity;
|
|
5203
|
-
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
|
|
5231
|
+
}) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent | ViewOptionsChangedEvent;
|
|
5204
5232
|
|
|
5205
5233
|
/**
|
|
5206
5234
|
* [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
|
|
@@ -6715,7 +6743,28 @@ declare type Hotkey = {
|
|
|
6715
6743
|
*/
|
|
6716
6744
|
keys: string;
|
|
6717
6745
|
/**
|
|
6718
|
-
*
|
|
6746
|
+
* Controls the event phase at which the hotkey is triggered.
|
|
6747
|
+
*
|
|
6748
|
+
* - `'capture'`: The hotkey fires **before** the event is sent to the renderer/page.
|
|
6749
|
+
* This is the only phase where the `preventDefault` property is effective.
|
|
6750
|
+
*
|
|
6751
|
+
* - `'bubble'`: The hotkey fires **after** the page has processed the key event.
|
|
6752
|
+
* This behaves exactly like a standard JavaScript event listener attached to the window:
|
|
6753
|
+
* 1. If the page calls `event.preventDefault()` (on either **keydown** or **keyup**), this hotkey will **not** fire.
|
|
6754
|
+
* 2. If the hotkey is browser-reserved (e.g. `Ctrl+Tab` to switch tabs for which keyup/keydown do not fire in a web browser), that action takes precedence and this hotkey will **not** fire.
|
|
6755
|
+
*
|
|
6756
|
+
* @default 'capture'
|
|
6757
|
+
*/
|
|
6758
|
+
phase?: 'capture' | 'bubble';
|
|
6759
|
+
/**
|
|
6760
|
+
* Determines if the event should continue to the renderer.
|
|
6761
|
+
*
|
|
6762
|
+
* - `true`: The event is consumed immediately. It will **never** reach the renderer/page.
|
|
6763
|
+
* - `false`: The event is sent to the renderer after this hotkey executes.
|
|
6764
|
+
*
|
|
6765
|
+
* @remarks
|
|
6766
|
+
* This property is **only valid** when `phase` is set to `'capture'`.
|
|
6767
|
+
* If `phase` is `'bubble'`, this property is ignored (as the renderer has already received and processed the event).
|
|
6719
6768
|
*
|
|
6720
6769
|
* @default false
|
|
6721
6770
|
*/
|
|
@@ -7790,6 +7839,20 @@ declare class InteropClient extends Base {
|
|
|
7790
7839
|
* @internal
|
|
7791
7840
|
*/
|
|
7792
7841
|
constructor(wire: Transport, clientPromise: Promise<OpenFin.ChannelClient>, fdc3Factory: FDC3Factory);
|
|
7842
|
+
/**
|
|
7843
|
+
* `addListener` allows the InteropClient to subscribe to events emitted by the connected InteropBroker.
|
|
7844
|
+
* @param type The event type to subscribe to.
|
|
7845
|
+
* @param listener Callback invoked whenever the event occurs.
|
|
7846
|
+
* @returns Promise resolving with void once the listener is registered.
|
|
7847
|
+
*/
|
|
7848
|
+
addListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7849
|
+
/**
|
|
7850
|
+
* `removeListener` removes a registered event listener.
|
|
7851
|
+
* @param type The event type to subscribe to.
|
|
7852
|
+
* @param listener Callback to be removed.
|
|
7853
|
+
* @returns Promise resolving with void even if no callback was found.
|
|
7854
|
+
*/
|
|
7855
|
+
removeListener: (type: OpenFin.InteropClientEvents['type'], listener: (event: OpenFin.InteropClientEvents['event']) => void) => Promise<void>;
|
|
7793
7856
|
/**
|
|
7794
7857
|
* Sets a context for the context group of the current entity.
|
|
7795
7858
|
*
|
|
@@ -8164,6 +8227,16 @@ declare class InteropClient extends Base {
|
|
|
8164
8227
|
static ferryFdc3Call(interopClient: OpenFin.InteropClient, action: string, payload?: any): Promise<any>;
|
|
8165
8228
|
}
|
|
8166
8229
|
|
|
8230
|
+
/**
|
|
8231
|
+
* Interop Client Events
|
|
8232
|
+
*/
|
|
8233
|
+
declare type InteropClientEvent<TName, TEventType = void> = {
|
|
8234
|
+
type: TName;
|
|
8235
|
+
event: TEventType;
|
|
8236
|
+
};
|
|
8237
|
+
|
|
8238
|
+
declare type InteropClientEvents = ClientChangedContextGroup;
|
|
8239
|
+
|
|
8167
8240
|
/**
|
|
8168
8241
|
* @interface
|
|
8169
8242
|
*/
|
|
@@ -10151,10 +10224,12 @@ declare type MutableWindowOptions = {
|
|
|
10151
10224
|
*/
|
|
10152
10225
|
customData: any;
|
|
10153
10226
|
/**
|
|
10154
|
-
* @deprecated Will be removed in runtime version 45
|
|
10155
10227
|
*
|
|
10156
10228
|
* Show the window's frame.
|
|
10157
10229
|
*
|
|
10230
|
+
* @remarks
|
|
10231
|
+
* This property will not be updatable starting runtime version 45.
|
|
10232
|
+
*
|
|
10158
10233
|
* @default true
|
|
10159
10234
|
*/
|
|
10160
10235
|
frame: boolean;
|
|
@@ -11064,6 +11139,9 @@ declare namespace OpenFin {
|
|
|
11064
11139
|
ServeAssetOptions,
|
|
11065
11140
|
ServedAssetInfo,
|
|
11066
11141
|
ResolvedDomainSettings,
|
|
11142
|
+
InteropClientEvent,
|
|
11143
|
+
ClientChangedContextGroup,
|
|
11144
|
+
InteropClientEvents,
|
|
11067
11145
|
ApplicationEvents,
|
|
11068
11146
|
BaseEvents,
|
|
11069
11147
|
ExternalApplicationEvents,
|
|
@@ -15689,6 +15767,11 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
|
|
|
15689
15767
|
/**
|
|
15690
15768
|
* Returns a unique identifier (UUID) provided by the machine.
|
|
15691
15769
|
*
|
|
15770
|
+
* On Windows, the machine ID is the `MachineGuid` value located in the Windows Registry at:
|
|
15771
|
+
* `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`.
|
|
15772
|
+
*
|
|
15773
|
+
* On macOS, the machine ID is the hardware UUID of the machine, obtained via native OS APIs.
|
|
15774
|
+
*
|
|
15692
15775
|
* @example
|
|
15693
15776
|
* ```js
|
|
15694
15777
|
* fin.System.getMachineId().then(id => console.log(id)).catch(err => console.log(err));
|
|
@@ -18391,6 +18474,7 @@ declare namespace ViewEvents {
|
|
|
18391
18474
|
HotkeyEvent,
|
|
18392
18475
|
ShownEvent,
|
|
18393
18476
|
HostContextChangedEvent,
|
|
18477
|
+
ViewOptionsChangedEvent,
|
|
18394
18478
|
Event_4 as Event,
|
|
18395
18479
|
ViewEvent,
|
|
18396
18480
|
WillPropagateViewEvent,
|
|
@@ -18519,6 +18603,23 @@ declare class ViewModule extends Base {
|
|
|
18519
18603
|
*/
|
|
18520
18604
|
declare type ViewOptions = ConstViewOptions & MutableViewOptions;
|
|
18521
18605
|
|
|
18606
|
+
/**
|
|
18607
|
+
* Generated whenever a view's options are changed.
|
|
18608
|
+
* @remarks Will not emit if an updateOptions call does not result in a new diff.
|
|
18609
|
+
* @interface
|
|
18610
|
+
*/
|
|
18611
|
+
declare type ViewOptionsChangedEvent = BaseEvent_4 & {
|
|
18612
|
+
type: 'options-changed';
|
|
18613
|
+
/**
|
|
18614
|
+
* The new state of the view's options.
|
|
18615
|
+
*/
|
|
18616
|
+
options: OpenFin.ViewOptions;
|
|
18617
|
+
/**
|
|
18618
|
+
* Diff between the previous value of options and new.
|
|
18619
|
+
*/
|
|
18620
|
+
diff: OpenFin.ViewOptions;
|
|
18621
|
+
};
|
|
18622
|
+
|
|
18522
18623
|
/**
|
|
18523
18624
|
* @interface
|
|
18524
18625
|
*/
|
package/out/fdc3-api.js
CHANGED
|
@@ -495,13 +495,13 @@ var InteropClient$1 = {};
|
|
|
495
495
|
|
|
496
496
|
var base = {};
|
|
497
497
|
|
|
498
|
-
var __classPrivateFieldSet$
|
|
498
|
+
var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
499
499
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
500
500
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
501
501
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
502
502
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
503
503
|
};
|
|
504
|
-
var __classPrivateFieldGet$
|
|
504
|
+
var __classPrivateFieldGet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
505
505
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
506
506
|
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");
|
|
507
507
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -585,9 +585,9 @@ class EmitterBase extends Base {
|
|
|
585
585
|
this.emit = (eventType, payload, ...args) => {
|
|
586
586
|
return this.hasEmitter() ? this.getOrCreateEmitter().emit(eventType, payload, ...args) : false;
|
|
587
587
|
};
|
|
588
|
-
this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$
|
|
588
|
+
this.hasEmitter = () => this.wire.eventAggregator.has(__classPrivateFieldGet$4(this, _EmitterBase_emitterAccessor, "f"));
|
|
589
589
|
this.getOrCreateEmitter = () => {
|
|
590
|
-
return this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$
|
|
590
|
+
return this.wire.eventAggregator.getOrCreate(__classPrivateFieldGet$4(this, _EmitterBase_emitterAccessor, "f"));
|
|
591
591
|
};
|
|
592
592
|
this.listeners = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listeners(type) : [];
|
|
593
593
|
this.listenerCount = (type) => this.hasEmitter() ? this.getOrCreateEmitter().listenerCount(type) : 0;
|
|
@@ -625,8 +625,8 @@ class EmitterBase extends Base {
|
|
|
625
625
|
// This will only be reached if unsubscribe from event that does not exist but do not want to error here
|
|
626
626
|
return Promise.resolve();
|
|
627
627
|
};
|
|
628
|
-
__classPrivateFieldSet$
|
|
629
|
-
__classPrivateFieldSet$
|
|
628
|
+
__classPrivateFieldSet$4(this, _EmitterBase_emitterAccessor, [topic, ...additionalAccessors], "f");
|
|
629
|
+
__classPrivateFieldSet$4(this, _EmitterBase_deregisterOnceListeners, new WeakMap(), "f");
|
|
630
630
|
}
|
|
631
631
|
/**
|
|
632
632
|
* Adds a listener to the end of the listeners array for the specified event.
|
|
@@ -654,7 +654,7 @@ class EmitterBase extends Base {
|
|
|
654
654
|
*/
|
|
655
655
|
async once(eventType, listener, options) {
|
|
656
656
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
657
|
-
__classPrivateFieldGet$
|
|
657
|
+
__classPrivateFieldGet$4(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
|
658
658
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
659
659
|
emitter.once(eventType, deregister);
|
|
660
660
|
emitter.once(eventType, listener);
|
|
@@ -685,7 +685,7 @@ class EmitterBase extends Base {
|
|
|
685
685
|
*/
|
|
686
686
|
async prependOnceListener(eventType, listener, options) {
|
|
687
687
|
const deregister = () => this.deregisterEventListener(eventType);
|
|
688
|
-
__classPrivateFieldGet$
|
|
688
|
+
__classPrivateFieldGet$4(this, _EmitterBase_deregisterOnceListeners, "f").set(listener, deregister);
|
|
689
689
|
await this.registerEventListener(eventType, options, (emitter) => {
|
|
690
690
|
emitter.prependOnceListener(eventType, listener);
|
|
691
691
|
emitter.once(eventType, deregister);
|
|
@@ -704,7 +704,7 @@ class EmitterBase extends Base {
|
|
|
704
704
|
const emitter = await this.deregisterEventListener(eventType, options);
|
|
705
705
|
if (emitter) {
|
|
706
706
|
emitter.removeListener(eventType, listener);
|
|
707
|
-
const deregister = __classPrivateFieldGet$
|
|
707
|
+
const deregister = __classPrivateFieldGet$4(this, _EmitterBase_deregisterOnceListeners, "f").get(listener);
|
|
708
708
|
if (deregister) {
|
|
709
709
|
emitter.removeListener(eventType, deregister);
|
|
710
710
|
}
|
|
@@ -750,7 +750,7 @@ class EmitterBase extends Base {
|
|
|
750
750
|
deleteEmitterIfNothingRegistered(emitter) {
|
|
751
751
|
// TODO: maybe emitterMap should clean up itself..
|
|
752
752
|
if (emitter.eventNames().length === 0) {
|
|
753
|
-
this.wire.eventAggregator.delete(__classPrivateFieldGet$
|
|
753
|
+
this.wire.eventAggregator.delete(__classPrivateFieldGet$4(this, _EmitterBase_emitterAccessor, "f"));
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
}
|
|
@@ -762,13 +762,13 @@ base.Reply = Reply;
|
|
|
762
762
|
|
|
763
763
|
var SessionContextGroupClient$1 = {};
|
|
764
764
|
|
|
765
|
-
var __classPrivateFieldSet$
|
|
765
|
+
var __classPrivateFieldSet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
766
766
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
767
767
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
768
768
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
769
769
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
770
770
|
};
|
|
771
|
-
var __classPrivateFieldGet$
|
|
771
|
+
var __classPrivateFieldGet$3 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
772
772
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
773
773
|
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");
|
|
774
774
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
@@ -782,7 +782,7 @@ class SessionContextGroupClient extends base_1$1.Base {
|
|
|
782
782
|
super(wire);
|
|
783
783
|
_SessionContextGroupClient_clientPromise.set(this, void 0);
|
|
784
784
|
this.id = id;
|
|
785
|
-
__classPrivateFieldSet$
|
|
785
|
+
__classPrivateFieldSet$3(this, _SessionContextGroupClient_clientPromise, client, "f");
|
|
786
786
|
}
|
|
787
787
|
/**
|
|
788
788
|
* Sets a context for the session context group.
|
|
@@ -794,7 +794,7 @@ class SessionContextGroupClient extends base_1$1.Base {
|
|
|
794
794
|
this.wire.sendAction('interop-session-context-group-set-context').catch((e) => {
|
|
795
795
|
// don't expose, analytics-only call
|
|
796
796
|
});
|
|
797
|
-
const client = await __classPrivateFieldGet$
|
|
797
|
+
const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
|
|
798
798
|
return client.dispatch(`sessionContextGroup:setContext-${this.id}`, {
|
|
799
799
|
sessionContextGroupId: this.id,
|
|
800
800
|
context
|
|
@@ -804,7 +804,7 @@ class SessionContextGroupClient extends base_1$1.Base {
|
|
|
804
804
|
this.wire.sendAction('interop-session-context-group-get-context').catch((e) => {
|
|
805
805
|
// don't expose, analytics-only call
|
|
806
806
|
});
|
|
807
|
-
const client = await __classPrivateFieldGet$
|
|
807
|
+
const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
|
|
808
808
|
return client.dispatch(`sessionContextGroup:getContext-${this.id}`, {
|
|
809
809
|
sessionContextGroupId: this.id,
|
|
810
810
|
type
|
|
@@ -817,7 +817,7 @@ class SessionContextGroupClient extends base_1$1.Base {
|
|
|
817
817
|
if (typeof contextHandler !== 'function') {
|
|
818
818
|
throw new Error("Non-function argument passed to the first parameter 'handler'. Be aware that the argument order does not match the FDC3 standard.");
|
|
819
819
|
}
|
|
820
|
-
const client = await __classPrivateFieldGet$
|
|
820
|
+
const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
|
|
821
821
|
let handlerId;
|
|
822
822
|
if (contextType) {
|
|
823
823
|
handlerId = `sessionContextHandler:invoke-${this.id}-${contextType}-${(0, utils_1$4.generateId)()}`;
|
|
@@ -830,7 +830,7 @@ class SessionContextGroupClient extends base_1$1.Base {
|
|
|
830
830
|
return { unsubscribe: await this.createUnsubscribeCb(handlerId) };
|
|
831
831
|
}
|
|
832
832
|
async createUnsubscribeCb(handlerId) {
|
|
833
|
-
const client = await __classPrivateFieldGet$
|
|
833
|
+
const client = await __classPrivateFieldGet$3(this, _SessionContextGroupClient_clientPromise, "f");
|
|
834
834
|
return async () => {
|
|
835
835
|
client.remove(handlerId);
|
|
836
836
|
await client.dispatch(`sessionContextGroup:handlerRemoved-${this.id}`, { handlerId });
|
|
@@ -848,6 +848,139 @@ class SessionContextGroupClient extends base_1$1.Base {
|
|
|
848
848
|
SessionContextGroupClient$1.default = SessionContextGroupClient;
|
|
849
849
|
_SessionContextGroupClient_clientPromise = new WeakMap();
|
|
850
850
|
|
|
851
|
+
var channelEvents = {};
|
|
852
|
+
|
|
853
|
+
var __classPrivateFieldSet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
854
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
855
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
856
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
857
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
858
|
+
};
|
|
859
|
+
var __classPrivateFieldGet$2 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
860
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
861
|
+
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");
|
|
862
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
863
|
+
};
|
|
864
|
+
var _a, _ChannelEvents_channelClient, _ChannelEvents_isChannelReady, _ChannelEvents_actionsByClient, _ChannelEvents_getActions, _ChannelEvents_createRegistration, _ChannelEvents_getRegistration, _ChannelEvents_getOrCreateRegistration;
|
|
865
|
+
Object.defineProperty(channelEvents, "__esModule", { value: true });
|
|
866
|
+
channelEvents.ChannelEvents = void 0;
|
|
867
|
+
/**
|
|
868
|
+
* Channel events creates a event like syntax out of a channel action, allowing multiple events to be triggered
|
|
869
|
+
* from a single action (normally only one callback can be created per action).
|
|
870
|
+
*
|
|
871
|
+
* This Class essentially allows us to multiplex channel actions to multiple callbacks.
|
|
872
|
+
*/
|
|
873
|
+
class ChannelEvents {
|
|
874
|
+
constructor(channelClient) {
|
|
875
|
+
// eslint-disable-next-line
|
|
876
|
+
_ChannelEvents_channelClient.set(this, void 0);
|
|
877
|
+
_ChannelEvents_isChannelReady.set(this, false);
|
|
878
|
+
_ChannelEvents_getActions.set(this, async () => {
|
|
879
|
+
const channelClient = await __classPrivateFieldGet$2(this, _ChannelEvents_channelClient, "f");
|
|
880
|
+
let actions = __classPrivateFieldGet$2(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).get(channelClient);
|
|
881
|
+
if (!actions) {
|
|
882
|
+
actions = {};
|
|
883
|
+
__classPrivateFieldGet$2(ChannelEvents, _a, "f", _ChannelEvents_actionsByClient).set(channelClient, actions);
|
|
884
|
+
}
|
|
885
|
+
return actions;
|
|
886
|
+
});
|
|
887
|
+
_ChannelEvents_createRegistration.set(this, (actionId) => {
|
|
888
|
+
const callbacks = [];
|
|
889
|
+
let registrationPromise;
|
|
890
|
+
const onChannelAction = (data) => {
|
|
891
|
+
callbacks.forEach((callback) => callback(data));
|
|
892
|
+
};
|
|
893
|
+
return {
|
|
894
|
+
callbacks,
|
|
895
|
+
dispose: async (callback) => {
|
|
896
|
+
const index = callbacks.indexOf(callback);
|
|
897
|
+
if (index >= 0) {
|
|
898
|
+
callbacks.splice(index, 1);
|
|
899
|
+
if (callbacks.length === 0) {
|
|
900
|
+
const client = await __classPrivateFieldGet$2(this, _ChannelEvents_channelClient, "f");
|
|
901
|
+
client.remove(actionId);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
waitForRegistration: async () => {
|
|
906
|
+
// Use lazy eval to only setup and register the channel on first attempt.
|
|
907
|
+
if (!registrationPromise) {
|
|
908
|
+
registrationPromise = (async () => {
|
|
909
|
+
const client = await __classPrivateFieldGet$2(this, _ChannelEvents_channelClient, "f");
|
|
910
|
+
await client.register(actionId, onChannelAction);
|
|
911
|
+
})();
|
|
912
|
+
}
|
|
913
|
+
await registrationPromise;
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
});
|
|
917
|
+
_ChannelEvents_getRegistration.set(this, async (actionId) => {
|
|
918
|
+
const actions = await __classPrivateFieldGet$2(this, _ChannelEvents_getActions, "f").call(this);
|
|
919
|
+
return actions[actionId];
|
|
920
|
+
});
|
|
921
|
+
_ChannelEvents_getOrCreateRegistration.set(this, async (actionId) => {
|
|
922
|
+
const actions = await __classPrivateFieldGet$2(this, _ChannelEvents_getActions, "f").call(this);
|
|
923
|
+
const registration = await __classPrivateFieldGet$2(this, _ChannelEvents_getRegistration, "f").call(this, actionId);
|
|
924
|
+
if (!registration) {
|
|
925
|
+
actions[actionId] = __classPrivateFieldGet$2(this, _ChannelEvents_createRegistration, "f").call(this, actionId);
|
|
926
|
+
}
|
|
927
|
+
return actions[actionId];
|
|
928
|
+
});
|
|
929
|
+
/**
|
|
930
|
+
* Add a listener for the given channel action.
|
|
931
|
+
*
|
|
932
|
+
* This will register a handler for the specified channel action if this is the first time we have requested one, or reuse an existing one if it exists.
|
|
933
|
+
*
|
|
934
|
+
* Note, only void channel actions are currently supported.
|
|
935
|
+
*
|
|
936
|
+
* @param action Action ID, must match the underlying channel action.
|
|
937
|
+
* @param callback Callback to be called whenever the action is dispatched.
|
|
938
|
+
*/
|
|
939
|
+
this.addListener = async (action, callback) => {
|
|
940
|
+
const event = await __classPrivateFieldGet$2(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
|
|
941
|
+
event.callbacks.push(callback);
|
|
942
|
+
// This ensures we only resolve the subscription once the action is registered
|
|
943
|
+
await event.waitForRegistration();
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* Removes a callback associated with a given action if it exists.
|
|
947
|
+
*
|
|
948
|
+
* If this callback is the last one associated with the specified action, the underlying channel action registration is
|
|
949
|
+
* also removed.
|
|
950
|
+
* @param action Action ID to remove
|
|
951
|
+
* @param callback Callback to remove.
|
|
952
|
+
*/
|
|
953
|
+
this.removeListener = async (action, callback) => {
|
|
954
|
+
if (!__classPrivateFieldGet$2(this, _ChannelEvents_isChannelReady, "f")) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
const registration = await __classPrivateFieldGet$2(this, _ChannelEvents_getRegistration, "f").call(this, action);
|
|
958
|
+
if (registration) {
|
|
959
|
+
const event = await __classPrivateFieldGet$2(this, _ChannelEvents_getOrCreateRegistration, "f").call(this, action);
|
|
960
|
+
await event.dispose(callback);
|
|
961
|
+
}
|
|
962
|
+
};
|
|
963
|
+
__classPrivateFieldSet$2(this, _ChannelEvents_channelClient, channelClient, "f");
|
|
964
|
+
Promise.resolve(channelClient)
|
|
965
|
+
.then(() => {
|
|
966
|
+
__classPrivateFieldSet$2(this, _ChannelEvents_isChannelReady, true, "f");
|
|
967
|
+
})
|
|
968
|
+
.catch(() => {
|
|
969
|
+
// eslint-disable-next-line
|
|
970
|
+
console.warn('Channel Connection error occurred in channel client. Channel-events registrations will fail.');
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
channelEvents.ChannelEvents = ChannelEvents;
|
|
975
|
+
_a = ChannelEvents, _ChannelEvents_channelClient = new WeakMap(), _ChannelEvents_isChannelReady = new WeakMap(), _ChannelEvents_getActions = new WeakMap(), _ChannelEvents_createRegistration = new WeakMap(), _ChannelEvents_getRegistration = new WeakMap(), _ChannelEvents_getOrCreateRegistration = new WeakMap();
|
|
976
|
+
/**
|
|
977
|
+
* Static map of actions by channel client. This ensures we can reuse the same event and keep track of all its callbacks.
|
|
978
|
+
*
|
|
979
|
+
* Weak map will also ensure that when a channel is GC'ed we also tear down the actions/callbacks associated
|
|
980
|
+
* with it.
|
|
981
|
+
*/
|
|
982
|
+
_ChannelEvents_actionsByClient = { value: new WeakMap() };
|
|
983
|
+
|
|
851
984
|
var __classPrivateFieldSet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
852
985
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
853
986
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -862,12 +995,13 @@ var __classPrivateFieldGet$1 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
862
995
|
var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
863
996
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
864
997
|
};
|
|
865
|
-
var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory;
|
|
998
|
+
var _InteropClient_clientPromise, _InteropClient_sessionContextGroups, _InteropClient_fdc3Factory, _InteropClient_channelEvents;
|
|
866
999
|
Object.defineProperty(InteropClient$1, "__esModule", { value: true });
|
|
867
1000
|
InteropClient$1.InteropClient = void 0;
|
|
868
1001
|
const base_1 = base;
|
|
869
1002
|
const SessionContextGroupClient_1 = __importDefault$1(SessionContextGroupClient$1);
|
|
870
1003
|
const utils_1$3 = utils$2;
|
|
1004
|
+
const channel_events_1 = channelEvents;
|
|
871
1005
|
/**
|
|
872
1006
|
* The Interop Client API is broken up into two groups:
|
|
873
1007
|
*
|
|
@@ -926,13 +1060,43 @@ class InteropClient extends base_1.Base {
|
|
|
926
1060
|
_InteropClient_clientPromise.set(this, void 0);
|
|
927
1061
|
_InteropClient_sessionContextGroups.set(this, void 0);
|
|
928
1062
|
_InteropClient_fdc3Factory.set(this, void 0);
|
|
1063
|
+
_InteropClient_channelEvents.set(this, void 0);
|
|
1064
|
+
/*
|
|
1065
|
+
Client APIs
|
|
1066
|
+
*/
|
|
1067
|
+
/**
|
|
1068
|
+
* `addListener` allows the InteropClient to subscribe to events emitted by the connected InteropBroker.
|
|
1069
|
+
* @param type The event type to subscribe to.
|
|
1070
|
+
* @param listener Callback invoked whenever the event occurs.
|
|
1071
|
+
* @returns Promise resolving with void once the listener is registered.
|
|
1072
|
+
*/
|
|
1073
|
+
this.addListener = async (type, listener) => {
|
|
1074
|
+
try {
|
|
1075
|
+
await __classPrivateFieldGet$1(this, _InteropClient_channelEvents, "f").addListener(type, listener);
|
|
1076
|
+
}
|
|
1077
|
+
catch (error) {
|
|
1078
|
+
throw new Error(`An unexpected error occurred when adding a listener to the event ${type}. \n${error.stack}.`);
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
/**
|
|
1082
|
+
* `removeListener` removes a registered event listener.
|
|
1083
|
+
* @param type The event type to subscribe to.
|
|
1084
|
+
* @param listener Callback to be removed.
|
|
1085
|
+
* @returns Promise resolving with void even if no callback was found.
|
|
1086
|
+
*/
|
|
1087
|
+
this.removeListener = async (type, listener) => {
|
|
1088
|
+
try {
|
|
1089
|
+
await __classPrivateFieldGet$1(this, _InteropClient_channelEvents, "f").removeListener(type, listener);
|
|
1090
|
+
}
|
|
1091
|
+
catch (error) {
|
|
1092
|
+
throw new Error(`An unexpected error occurred when removing a listener for the event ${type}. \n${error.stack}.`);
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
929
1095
|
__classPrivateFieldSet$1(this, _InteropClient_sessionContextGroups, new Map(), "f");
|
|
930
1096
|
__classPrivateFieldSet$1(this, _InteropClient_clientPromise, clientPromise, "f");
|
|
931
1097
|
__classPrivateFieldSet$1(this, _InteropClient_fdc3Factory, fdc3Factory, "f");
|
|
1098
|
+
__classPrivateFieldSet$1(this, _InteropClient_channelEvents, new channel_events_1.ChannelEvents(clientPromise), "f");
|
|
932
1099
|
}
|
|
933
|
-
/*
|
|
934
|
-
Client APIs
|
|
935
|
-
*/
|
|
936
1100
|
/**
|
|
937
1101
|
* Sets a context for the context group of the current entity.
|
|
938
1102
|
*
|
|
@@ -1446,7 +1610,7 @@ class InteropClient extends base_1.Base {
|
|
|
1446
1610
|
}
|
|
1447
1611
|
}
|
|
1448
1612
|
InteropClient$1.InteropClient = InteropClient;
|
|
1449
|
-
_InteropClient_clientPromise = new WeakMap(), _InteropClient_sessionContextGroups = new WeakMap(), _InteropClient_fdc3Factory = new WeakMap();
|
|
1613
|
+
_InteropClient_clientPromise = new WeakMap(), _InteropClient_sessionContextGroups = new WeakMap(), _InteropClient_fdc3Factory = new WeakMap(), _InteropClient_channelEvents = new WeakMap();
|
|
1450
1614
|
|
|
1451
1615
|
var __classPrivateFieldGet = (commonjsGlobal && commonjsGlobal.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
1452
1616
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfin/fdc3-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "45.100.18",
|
|
4
4
|
"description": "OpenFin fdc3 module utilities and types.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"private": false,
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"build": "rollup -c --bundleConfigAsCjs",
|
|
15
15
|
"dev": "npm run build -- --environment MODE:development",
|
|
16
16
|
"watch": "npm run dev -- --watch",
|
|
17
|
-
"ci:
|
|
18
|
-
"ci:
|
|
19
|
-
"ci:
|
|
17
|
+
"ci:prepack": "of-npm prepack",
|
|
18
|
+
"ci:pack": "npm pack",
|
|
19
|
+
"ci:postpack": "of-npm postpack",
|
|
20
20
|
"version:update": "of-npm version --allow-same-version '$RMAJOR.$RMINOR.$RPATCH'"
|
|
21
21
|
},
|
|
22
22
|
"author": "OpenFin",
|