@openfin/node-adapter 33.77.7 → 34.78.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/node-adapter-alpha.d.ts +183 -56
- package/out/node-adapter-beta.d.ts +183 -56
- package/out/node-adapter-public.d.ts +183 -56
- package/out/node-adapter.d.ts +183 -53
- package/out/node-adapter.js +197 -38
- package/package.json +1 -1
@@ -855,7 +855,7 @@ declare namespace ApplicationEvents {
|
|
855
855
|
export {
|
856
856
|
CrashedEvent,
|
857
857
|
FileDownloadLocationChangedEvent,
|
858
|
-
RunRequestedEvent,
|
858
|
+
RunRequestedEvent_2 as RunRequestedEvent,
|
859
859
|
TrayIconClickedEvent,
|
860
860
|
WindowAlertRequestedEvent,
|
861
861
|
WindowCreatedEvent,
|
@@ -2956,9 +2956,9 @@ declare type ConstViewOptions = {
|
|
2956
2956
|
*/
|
2957
2957
|
processAffinity: string;
|
2958
2958
|
/**
|
2959
|
-
* Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example see
|
2959
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example, see {@link MutableWindowOptions hotkeys Example}.
|
2960
2960
|
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
2961
|
-
*
|
2961
|
+
* {@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands keyboard commands}
|
2962
2962
|
* that can be assigned to a specific hotkey in the platform manifest.
|
2963
2963
|
*/
|
2964
2964
|
hotkeys: Hotkey[];
|
@@ -6315,6 +6315,64 @@ export declare function launch(config: ConnectConfig): Promise<number>;
|
|
6315
6315
|
|
6316
6316
|
/**
|
6317
6317
|
* The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
|
6318
|
+
*
|
6319
|
+
*
|
6320
|
+
* ### Supported event types:
|
6321
|
+
*
|
6322
|
+
* * app-version-progress
|
6323
|
+
* * runtime-status
|
6324
|
+
* * app-version-complete
|
6325
|
+
* * app-version-error
|
6326
|
+
*
|
6327
|
+
* ### App version resolver events
|
6328
|
+
*
|
6329
|
+
* #### app-version-progress
|
6330
|
+
* Generated when RVM tries each manifest in the list of fallbackManifests, validate it and see if it's compatible with the system app.
|
6331
|
+
* ```js
|
6332
|
+
* //This response has the following shape:
|
6333
|
+
* {
|
6334
|
+
* type: 'app-version-progress',
|
6335
|
+
* manifest: 'https://cdn.openfin.co/release/system-apps/notifications/1.13.0/app.json', // A manifest in the fallbackManifest list
|
6336
|
+
* srcManifest: 'https://cdn.openfin.co/myapp.json' // To keep track of the original manifest url
|
6337
|
+
* }
|
6338
|
+
* ```
|
6339
|
+
*
|
6340
|
+
* #### runtime-status
|
6341
|
+
* Generated when RVM checks runtime availability.
|
6342
|
+
* ```js
|
6343
|
+
* //This response has the following shape:
|
6344
|
+
* {
|
6345
|
+
* type: 'runtime-status',
|
6346
|
+
* version: '29.105.71.32', // runtime version
|
6347
|
+
* exists: false, // check if the runtime already exists on the machine
|
6348
|
+
* writeAccess: true, // check if the runtime directory has write access
|
6349
|
+
* reachable: true, // check if the runtime asset location is reachable/downloadable
|
6350
|
+
* healthCheck: true, // check if there is runtime health check
|
6351
|
+
* error: 'Not able to resolve runtime version' // give an error message if runtime version cannot be resolved
|
6352
|
+
* }
|
6353
|
+
* ```
|
6354
|
+
*
|
6355
|
+
* #### app-version-complete
|
6356
|
+
* Generated when RVM has successfully found the target runtime version and (about to) delegate launch to the runtime.
|
6357
|
+
* ```js
|
6358
|
+
* //This response has the following shape:
|
6359
|
+
* {
|
6360
|
+
* type: 'app-version-complete',
|
6361
|
+
* manifest: 'https://cdn.openfin.co/release/system-apps/notifications/1.13.0/app.json', // A manifest in the fallbackManifest list
|
6362
|
+
* srcManifest: 'https://cdn.openfin.co/myapp.json' // To keep track of the original manifest url
|
6363
|
+
* }
|
6364
|
+
* ```
|
6365
|
+
*
|
6366
|
+
* #### app-version-error
|
6367
|
+
* Generated when RVM failed to find an available runtime version after trying each manifest in the list of fallbackManifests.
|
6368
|
+
* ```js
|
6369
|
+
* //This response has the following shape:
|
6370
|
+
* {
|
6371
|
+
* type: 'app-version-error',
|
6372
|
+
* srcManifest: 'https://cdn.openfin.co/myapp.json', // To keep track of the original manifest url
|
6373
|
+
* error: 'All fallback manifest URLs failed' // error message
|
6374
|
+
* }
|
6375
|
+
* ```
|
6318
6376
|
*/
|
6319
6377
|
declare type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
|
6320
6378
|
|
@@ -6333,44 +6391,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
6333
6391
|
|
6334
6392
|
declare class Layout extends Base {
|
6335
6393
|
#private;
|
6336
|
-
|
6337
|
-
* Initialize the window's Layout.
|
6338
|
-
*
|
6339
|
-
* @remarks Must be called from a custom window that has a 'layout' option set upon creation of that window. If a containerId
|
6340
|
-
* is not provided, this method attempts to find an element with the id `layout-container`.
|
6341
|
-
*
|
6342
|
-
* A Layout will emit events locally on the DOM element representing the layout-container. In order to capture the relevant
|
6343
|
-
* events during Layout initiation, set up the listeners on the DOM element prior to calling init.
|
6344
|
-
*
|
6345
|
-
* @example
|
6346
|
-
* ```js
|
6347
|
-
* // if no options are included, the layout in the window options is initialized in an element with the id `layout-container`
|
6348
|
-
* const layout = await fin.Platform.Layout.init();
|
6349
|
-
* ```
|
6350
|
-
* <br /><br />
|
6351
|
-
* # Example
|
6352
|
-
* To target a different HTML element use the options object.
|
6353
|
-
* ```js
|
6354
|
-
* const containerId = 'my-custom-container-id';
|
6355
|
-
*
|
6356
|
-
* const myLayoutContainer = document.getElementById(containerId);
|
6357
|
-
*
|
6358
|
-
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
6359
|
-
* const { tabSelector } = event.detail;
|
6360
|
-
* const tabElement = document.getElementById(tabSelector);
|
6361
|
-
* const existingColor = tabElement.style.backgroundColor;
|
6362
|
-
* tabElement.style.backgroundColor = "red";
|
6363
|
-
* setTimeout(() => {
|
6364
|
-
* tabElement.style.backgroundColor = existingColor;
|
6365
|
-
* }, 2000);
|
6366
|
-
* });
|
6367
|
-
*
|
6368
|
-
* // initialize the layout into an existing HTML element with the div `my-custom-container-id`
|
6369
|
-
* // the window must have been created with a layout in its window options
|
6370
|
-
* const layout = await fin.Platform.Layout.init({ containerId });
|
6371
|
-
* ```
|
6372
|
-
*/
|
6373
|
-
init: (options?: InitLayoutOptions_2) => Promise<Layout>;
|
6394
|
+
/* Excluded from this release type: init */
|
6374
6395
|
identity: Identity_4;
|
6375
6396
|
private platform;
|
6376
6397
|
wire: Transport;
|
@@ -6739,15 +6760,43 @@ declare class LayoutModule extends Base {
|
|
6739
6760
|
*/
|
6740
6761
|
getCurrentSync(): OpenFin.Layout;
|
6741
6762
|
/**
|
6742
|
-
* Initialize the window's Layout.
|
6763
|
+
* Initialize the window's Layout.
|
6764
|
+
*
|
6765
|
+
* @remarks Must be called from a custom window that has a 'layout' option set upon creation of that window.
|
6743
6766
|
* If a containerId is not provided, this method attempts to find an element with the id `layout-container`.
|
6744
|
-
* A Layout will
|
6767
|
+
* A Layout will emit events locally on the DOM element representing the layout-container.
|
6745
6768
|
* In order to capture the relevant events during Layout initiation, set up the listeners on the DOM element prior to calling `init`.
|
6746
6769
|
* @param options - Layout init options.
|
6747
6770
|
*
|
6748
|
-
* @static
|
6749
6771
|
* @experimental
|
6750
|
-
*
|
6772
|
+
*
|
6773
|
+
* @example
|
6774
|
+
* ```js
|
6775
|
+
* // If no options are included, the layout in the window options is initialized in an element with the id `layout-container`
|
6776
|
+
* const layout = await fin.Platform.Layout.init();
|
6777
|
+
* ```
|
6778
|
+
* <br>
|
6779
|
+
*
|
6780
|
+
* ```js
|
6781
|
+
* const containerId = 'my-custom-container-id';
|
6782
|
+
*
|
6783
|
+
* const myLayoutContainer = document.getElementById(containerId);
|
6784
|
+
*
|
6785
|
+
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
6786
|
+
* const { tabSelector } = event.detail;
|
6787
|
+
* const tabElement = document.getElementById(tabSelector);
|
6788
|
+
* const existingColor = tabElement.style.backgroundColor;
|
6789
|
+
* tabElement.style.backgroundColor = "red";
|
6790
|
+
* setTimeout(() => {
|
6791
|
+
* tabElement.style.backgroundColor = existingColor;
|
6792
|
+
* }, 2000);
|
6793
|
+
* });
|
6794
|
+
*
|
6795
|
+
* // initialize the layout into an existing HTML element with the div `my-custom-container-id`
|
6796
|
+
* // the window must have been created with a layout in its window options
|
6797
|
+
* const layout = await fin.Platform.Layout.init({ containerId });
|
6798
|
+
* ```
|
6799
|
+
* @static
|
6751
6800
|
*/
|
6752
6801
|
init: (options?: InitLayoutOptions) => Promise<OpenFin.Layout>;
|
6753
6802
|
}
|
@@ -7171,7 +7220,7 @@ declare type MutableViewOptions = {
|
|
7171
7220
|
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
7172
7221
|
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
7173
7222
|
* _When omitted, _inherits_ from the parent application._
|
7174
|
-
* As opposed to customData, this is meant for frequent updates and sharing with other contexts.
|
7223
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. For usage example, see {@link MutableWindowOptions customContext Example}.
|
7175
7224
|
*/
|
7176
7225
|
customContext: any;
|
7177
7226
|
/**
|
@@ -7218,7 +7267,7 @@ declare type MutableWindowOptions = {
|
|
7218
7267
|
* Turns anything of matching RGB value transparent.
|
7219
7268
|
*
|
7220
7269
|
* Caveats:
|
7221
|
-
* *
|
7270
|
+
* * runtime key --disable-gpu is required. Note: Unclear behavior on remote Desktop support
|
7222
7271
|
* * User cannot click-through transparent regions
|
7223
7272
|
* * Not supported on Mac
|
7224
7273
|
* * Windows Aero must be enabled
|
@@ -7268,7 +7317,42 @@ declare type MutableWindowOptions = {
|
|
7268
7317
|
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
7269
7318
|
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
7270
7319
|
* _When omitted, _inherits_ from the parent application._
|
7271
|
-
* As opposed to customData, this is meant for frequent updates and sharing with other contexts.
|
7320
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts.
|
7321
|
+
*
|
7322
|
+
* @example
|
7323
|
+
* This Example shows a window sharing context to all it's views.
|
7324
|
+
* By executing the code here in the correct context, the view will have global `broadcastContext` and `addContextListener` methods available.
|
7325
|
+
* The window will synchronize context between views such that calling `broadcastContext` in any of the views will invoke any listeners added with `addContextListener` in all attached views.
|
7326
|
+
*
|
7327
|
+
* ### In Window (frame)
|
7328
|
+
* ```js
|
7329
|
+
* const me = fin.Window.getCurrentSync();
|
7330
|
+
* me.on('options-changed', async (event) => {
|
7331
|
+
* if (event.diff.customContext) {
|
7332
|
+
* const myViews = await me.getCurrentViews();
|
7333
|
+
* const customContext = event.diff.customContext.newVal;
|
7334
|
+
* myViews.forEach(v => {
|
7335
|
+
* v.updateOptions({customContext});
|
7336
|
+
* });
|
7337
|
+
* }
|
7338
|
+
* })
|
7339
|
+
*
|
7340
|
+
* ```
|
7341
|
+
* ### in View (content)
|
7342
|
+
* ```js
|
7343
|
+
* const me = fin.View.getCurrentSync();
|
7344
|
+
* const broadcastContext = async (customContext) => {
|
7345
|
+
* const myWindow = await me.getCurrentWindow()
|
7346
|
+
* await myWindow.updateOptions({customContext})
|
7347
|
+
* };
|
7348
|
+
* const addContextListener = async (listener) => {
|
7349
|
+
* await me.on('options-changed', (event) => {
|
7350
|
+
* if (event.diff.customContext) {
|
7351
|
+
* listener(event.diff.customContext.newVal);
|
7352
|
+
* }
|
7353
|
+
* });
|
7354
|
+
* }
|
7355
|
+
* ```
|
7272
7356
|
*/
|
7273
7357
|
customContext: any;
|
7274
7358
|
/**
|
@@ -7289,10 +7373,45 @@ declare type MutableWindowOptions = {
|
|
7289
7373
|
*/
|
7290
7374
|
hideOnClose: boolean;
|
7291
7375
|
/**
|
7292
|
-
* Defines the hotkeys that will be emitted as a `hotkey` event on the window.
|
7376
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the window.
|
7293
7377
|
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
7294
|
-
*
|
7378
|
+
* {@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands keyboard commands}
|
7295
7379
|
* that can be assigned to a specific hotkey in the platform manifest.
|
7380
|
+
*
|
7381
|
+
* @example
|
7382
|
+
*
|
7383
|
+
* This example shows the example of using the `hotkeys` option on Windows/Views and the corresponding `hotkey` event emitted when a specified hotkey is pressed.
|
7384
|
+
* ### Defining the hotkey
|
7385
|
+
* ```js
|
7386
|
+
* const myMagicWindow = await fin.Window.create({
|
7387
|
+
* name: 'magicWin',
|
7388
|
+
* hotkeys: [
|
7389
|
+
* {
|
7390
|
+
* keys: 'Ctrl+M',
|
7391
|
+
* }
|
7392
|
+
* ]
|
7393
|
+
* });
|
7394
|
+
*
|
7395
|
+
* ```
|
7396
|
+
* ### Listening to the hotkey
|
7397
|
+
* ```js
|
7398
|
+
* myMagicWindow.on('hotkey', (hotkeyEvent) => {
|
7399
|
+
* console.log(`A hotkey was pressed in the magic window!: ${JSON.stringify(hotkeyEvent)}`);
|
7400
|
+
* });
|
7401
|
+
* ```
|
7402
|
+
*
|
7403
|
+
* ### Removing a hotkey
|
7404
|
+
* After the following change, the `hotkey` event will no longer be emitted when Ctrl+M is pressed:
|
7405
|
+
* ```js
|
7406
|
+
* const currentHotkeys = (await myMagicWindow.getOptions()).hotkeys;
|
7407
|
+
* const newHotkeys = currentHotkeys.filter(hotkey => hotkey.keys !== 'Ctrl+M');
|
7408
|
+
* myMagicWindow.updateOptions({
|
7409
|
+
* hotkeys: newHotkeys
|
7410
|
+
* });
|
7411
|
+
* ```
|
7412
|
+
*
|
7413
|
+
* @remarks The `hotkeys` option is configured per-instance and isn't passed down to the children of Window/View.
|
7414
|
+
* Therefore, if you want a Window/View *and* all of its children to support hotkeys, you must configure the `hotkeys` option for every created child.
|
7296
7415
|
*/
|
7297
7416
|
hotkeys: Hotkey[];
|
7298
7417
|
/**
|
@@ -7350,7 +7469,6 @@ declare type MutableWindowOptions = {
|
|
7350
7469
|
* A flag that specifies how transparent the window will be.
|
7351
7470
|
* Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
|
7352
7471
|
* This value is clamped between `0.0` and `1.0`.
|
7353
|
-
* In software composition mode, the runtime flag --allow-unsafe-compositing is required.
|
7354
7472
|
*/
|
7355
7473
|
opacity: number;
|
7356
7474
|
/**
|
@@ -9099,6 +9217,15 @@ declare interface PlatformProvider {
|
|
9099
9217
|
*
|
9100
9218
|
*/
|
9101
9219
|
handleViewsAndWindowClose(windowId: OpenFin.Identity, userDecision: OpenFin.BeforeUnloadUserDecision): Promise<void>;
|
9220
|
+
/**
|
9221
|
+
* Handles subsequent launch attempts of the current platform.
|
9222
|
+
* Attempts to launch appManifestUrl passed as userAppConfigArgs.
|
9223
|
+
* If no appManifestUrl is present will attempt to launch using the requesting manifest snapshot.
|
9224
|
+
* If no appManifestUrl or snapshot is available nothing will be launched.
|
9225
|
+
* @param { RunRequestedEvent<'application', 'run-requested'> } payload
|
9226
|
+
* @returns {Promise<void>}
|
9227
|
+
*/
|
9228
|
+
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
9102
9229
|
}
|
9103
9230
|
|
9104
9231
|
/**
|
@@ -9966,13 +10093,15 @@ declare interface RTCStrategyEndpointPayload {
|
|
9966
10093
|
rtc: RTCPacket;
|
9967
10094
|
}
|
9968
10095
|
|
10096
|
+
declare type RunRequestedEvent = OpenFin.ApplicationEvents.RunRequestedEvent;
|
10097
|
+
|
9969
10098
|
/**
|
9970
10099
|
* Generated when Application.run() is called for an already running application.
|
9971
10100
|
*/
|
9972
|
-
declare type
|
10101
|
+
declare type RunRequestedEvent_2 = IdentityEvent & {
|
9973
10102
|
type: 'run-requested';
|
9974
10103
|
userAppConfigArgs: Record<string, any>;
|
9975
|
-
manifest: OpenFin.
|
10104
|
+
manifest: OpenFin.Manifest;
|
9976
10105
|
};
|
9977
10106
|
|
9978
10107
|
declare type RuntimeConfig = {
|
@@ -12526,7 +12655,6 @@ declare class View_2 extends WebContents<ViewEvent> {
|
|
12526
12655
|
* Attaches the current view to the given window identity.
|
12527
12656
|
* Identity must be the identity of a window in the same application.
|
12528
12657
|
* This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
|
12529
|
-
* @param target {Identity}
|
12530
12658
|
*
|
12531
12659
|
* @example
|
12532
12660
|
* ```js
|
@@ -12647,7 +12775,6 @@ declare class View_2 extends WebContents<ViewEvent> {
|
|
12647
12775
|
hide: () => Promise<void>;
|
12648
12776
|
/**
|
12649
12777
|
* Sets the bounds (top, left, width, height) of the view relative to its window.
|
12650
|
-
* @param bounds {ViewBounds}
|
12651
12778
|
*
|
12652
12779
|
* @remarks View position is relative to the bounds of the window.
|
12653
12780
|
* ({top: 0, left: 0} represents the top left corner of the window)
|
@@ -14162,7 +14289,7 @@ declare type WillMoveOrResizeEvent = NamedEvent & {
|
|
14162
14289
|
/**
|
14163
14290
|
* An Application event that does propagate to (republish on) parent topics.
|
14164
14291
|
*/
|
14165
|
-
declare type WillPropagateApplicationEvent = ClosedEvent | ApplicationConnectedEvent | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent |
|
14292
|
+
declare type WillPropagateApplicationEvent = ClosedEvent | ApplicationConnectedEvent | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
|
14166
14293
|
|
14167
14294
|
/**
|
14168
14295
|
* A View event that does propagate to (republish on) parent topics.
|