@openfin/core 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/mock-alpha.d.ts +183 -56
- package/out/mock-beta.d.ts +183 -56
- package/out/mock-public.d.ts +183 -56
- package/out/mock.d.ts +183 -53
- package/out/mock.js +197 -38
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -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,
|
|
@@ -2952,9 +2952,9 @@ declare type ConstViewOptions = {
|
|
|
2952
2952
|
*/
|
|
2953
2953
|
processAffinity: string;
|
|
2954
2954
|
/**
|
|
2955
|
-
* Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example see
|
|
2955
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the view. For usage example, see {@link MutableWindowOptions hotkeys Example}.
|
|
2956
2956
|
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
|
2957
|
-
*
|
|
2957
|
+
* {@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands keyboard commands}
|
|
2958
2958
|
* that can be assigned to a specific hotkey in the platform manifest.
|
|
2959
2959
|
*/
|
|
2960
2960
|
hotkeys: Hotkey[];
|
|
@@ -6289,6 +6289,64 @@ declare type JumpListTask = {
|
|
|
6289
6289
|
|
|
6290
6290
|
/**
|
|
6291
6291
|
* The LaunchEmitter is an `EventEmitter`. It can listen to app version resolver events.
|
|
6292
|
+
*
|
|
6293
|
+
*
|
|
6294
|
+
* ### Supported event types:
|
|
6295
|
+
*
|
|
6296
|
+
* * app-version-progress
|
|
6297
|
+
* * runtime-status
|
|
6298
|
+
* * app-version-complete
|
|
6299
|
+
* * app-version-error
|
|
6300
|
+
*
|
|
6301
|
+
* ### App version resolver events
|
|
6302
|
+
*
|
|
6303
|
+
* #### app-version-progress
|
|
6304
|
+
* Generated when RVM tries each manifest in the list of fallbackManifests, validate it and see if it's compatible with the system app.
|
|
6305
|
+
* ```js
|
|
6306
|
+
* //This response has the following shape:
|
|
6307
|
+
* {
|
|
6308
|
+
* type: 'app-version-progress',
|
|
6309
|
+
* manifest: 'https://cdn.openfin.co/release/system-apps/notifications/1.13.0/app.json', // A manifest in the fallbackManifest list
|
|
6310
|
+
* srcManifest: 'https://cdn.openfin.co/myapp.json' // To keep track of the original manifest url
|
|
6311
|
+
* }
|
|
6312
|
+
* ```
|
|
6313
|
+
*
|
|
6314
|
+
* #### runtime-status
|
|
6315
|
+
* Generated when RVM checks runtime availability.
|
|
6316
|
+
* ```js
|
|
6317
|
+
* //This response has the following shape:
|
|
6318
|
+
* {
|
|
6319
|
+
* type: 'runtime-status',
|
|
6320
|
+
* version: '29.105.71.32', // runtime version
|
|
6321
|
+
* exists: false, // check if the runtime already exists on the machine
|
|
6322
|
+
* writeAccess: true, // check if the runtime directory has write access
|
|
6323
|
+
* reachable: true, // check if the runtime asset location is reachable/downloadable
|
|
6324
|
+
* healthCheck: true, // check if there is runtime health check
|
|
6325
|
+
* error: 'Not able to resolve runtime version' // give an error message if runtime version cannot be resolved
|
|
6326
|
+
* }
|
|
6327
|
+
* ```
|
|
6328
|
+
*
|
|
6329
|
+
* #### app-version-complete
|
|
6330
|
+
* Generated when RVM has successfully found the target runtime version and (about to) delegate launch to the runtime.
|
|
6331
|
+
* ```js
|
|
6332
|
+
* //This response has the following shape:
|
|
6333
|
+
* {
|
|
6334
|
+
* type: 'app-version-complete',
|
|
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
|
+
* #### app-version-error
|
|
6341
|
+
* Generated when RVM failed to find an available runtime version after trying each manifest in the list of fallbackManifests.
|
|
6342
|
+
* ```js
|
|
6343
|
+
* //This response has the following shape:
|
|
6344
|
+
* {
|
|
6345
|
+
* type: 'app-version-error',
|
|
6346
|
+
* srcManifest: 'https://cdn.openfin.co/myapp.json', // To keep track of the original manifest url
|
|
6347
|
+
* error: 'All fallback manifest URLs failed' // error message
|
|
6348
|
+
* }
|
|
6349
|
+
* ```
|
|
6292
6350
|
*/
|
|
6293
6351
|
declare type LaunchEmitter = TypedEventEmitter<AppVersionEvent>;
|
|
6294
6352
|
|
|
@@ -6307,44 +6365,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
6307
6365
|
|
|
6308
6366
|
declare class Layout extends Base {
|
|
6309
6367
|
#private;
|
|
6310
|
-
|
|
6311
|
-
* Initialize the window's Layout.
|
|
6312
|
-
*
|
|
6313
|
-
* @remarks Must be called from a custom window that has a 'layout' option set upon creation of that window. If a containerId
|
|
6314
|
-
* is not provided, this method attempts to find an element with the id `layout-container`.
|
|
6315
|
-
*
|
|
6316
|
-
* A Layout will emit events locally on the DOM element representing the layout-container. In order to capture the relevant
|
|
6317
|
-
* events during Layout initiation, set up the listeners on the DOM element prior to calling init.
|
|
6318
|
-
*
|
|
6319
|
-
* @example
|
|
6320
|
-
* ```js
|
|
6321
|
-
* // if no options are included, the layout in the window options is initialized in an element with the id `layout-container`
|
|
6322
|
-
* const layout = await fin.Platform.Layout.init();
|
|
6323
|
-
* ```
|
|
6324
|
-
* <br /><br />
|
|
6325
|
-
* # Example
|
|
6326
|
-
* To target a different HTML element use the options object.
|
|
6327
|
-
* ```js
|
|
6328
|
-
* const containerId = 'my-custom-container-id';
|
|
6329
|
-
*
|
|
6330
|
-
* const myLayoutContainer = document.getElementById(containerId);
|
|
6331
|
-
*
|
|
6332
|
-
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
6333
|
-
* const { tabSelector } = event.detail;
|
|
6334
|
-
* const tabElement = document.getElementById(tabSelector);
|
|
6335
|
-
* const existingColor = tabElement.style.backgroundColor;
|
|
6336
|
-
* tabElement.style.backgroundColor = "red";
|
|
6337
|
-
* setTimeout(() => {
|
|
6338
|
-
* tabElement.style.backgroundColor = existingColor;
|
|
6339
|
-
* }, 2000);
|
|
6340
|
-
* });
|
|
6341
|
-
*
|
|
6342
|
-
* // initialize the layout into an existing HTML element with the div `my-custom-container-id`
|
|
6343
|
-
* // the window must have been created with a layout in its window options
|
|
6344
|
-
* const layout = await fin.Platform.Layout.init({ containerId });
|
|
6345
|
-
* ```
|
|
6346
|
-
*/
|
|
6347
|
-
init: (options?: InitLayoutOptions_2) => Promise<Layout>;
|
|
6368
|
+
/* Excluded from this release type: init */
|
|
6348
6369
|
identity: Identity_4;
|
|
6349
6370
|
private platform;
|
|
6350
6371
|
wire: Transport;
|
|
@@ -6713,15 +6734,43 @@ declare class LayoutModule extends Base {
|
|
|
6713
6734
|
*/
|
|
6714
6735
|
getCurrentSync(): OpenFin_2.Layout;
|
|
6715
6736
|
/**
|
|
6716
|
-
* Initialize the window's Layout.
|
|
6737
|
+
* Initialize the window's Layout.
|
|
6738
|
+
*
|
|
6739
|
+
* @remarks Must be called from a custom window that has a 'layout' option set upon creation of that window.
|
|
6717
6740
|
* If a containerId is not provided, this method attempts to find an element with the id `layout-container`.
|
|
6718
|
-
* A Layout will
|
|
6741
|
+
* A Layout will emit events locally on the DOM element representing the layout-container.
|
|
6719
6742
|
* In order to capture the relevant events during Layout initiation, set up the listeners on the DOM element prior to calling `init`.
|
|
6720
6743
|
* @param options - Layout init options.
|
|
6721
6744
|
*
|
|
6722
|
-
* @static
|
|
6723
6745
|
* @experimental
|
|
6724
|
-
*
|
|
6746
|
+
*
|
|
6747
|
+
* @example
|
|
6748
|
+
* ```js
|
|
6749
|
+
* // If no options are included, the layout in the window options is initialized in an element with the id `layout-container`
|
|
6750
|
+
* const layout = await fin.Platform.Layout.init();
|
|
6751
|
+
* ```
|
|
6752
|
+
* <br>
|
|
6753
|
+
*
|
|
6754
|
+
* ```js
|
|
6755
|
+
* const containerId = 'my-custom-container-id';
|
|
6756
|
+
*
|
|
6757
|
+
* const myLayoutContainer = document.getElementById(containerId);
|
|
6758
|
+
*
|
|
6759
|
+
* myLayoutContainer.addEventListener('tab-created', function(event) {
|
|
6760
|
+
* const { tabSelector } = event.detail;
|
|
6761
|
+
* const tabElement = document.getElementById(tabSelector);
|
|
6762
|
+
* const existingColor = tabElement.style.backgroundColor;
|
|
6763
|
+
* tabElement.style.backgroundColor = "red";
|
|
6764
|
+
* setTimeout(() => {
|
|
6765
|
+
* tabElement.style.backgroundColor = existingColor;
|
|
6766
|
+
* }, 2000);
|
|
6767
|
+
* });
|
|
6768
|
+
*
|
|
6769
|
+
* // initialize the layout into an existing HTML element with the div `my-custom-container-id`
|
|
6770
|
+
* // the window must have been created with a layout in its window options
|
|
6771
|
+
* const layout = await fin.Platform.Layout.init({ containerId });
|
|
6772
|
+
* ```
|
|
6773
|
+
* @static
|
|
6725
6774
|
*/
|
|
6726
6775
|
init: (options?: InitLayoutOptions) => Promise<OpenFin_2.Layout>;
|
|
6727
6776
|
}
|
|
@@ -7145,7 +7194,7 @@ declare type MutableViewOptions = {
|
|
|
7145
7194
|
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
7146
7195
|
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
7147
7196
|
* _When omitted, _inherits_ from the parent application._
|
|
7148
|
-
* As opposed to customData, this is meant for frequent updates and sharing with other contexts.
|
|
7197
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts. For usage example, see {@link MutableWindowOptions customContext Example}.
|
|
7149
7198
|
*/
|
|
7150
7199
|
customContext: any;
|
|
7151
7200
|
/**
|
|
@@ -7192,7 +7241,7 @@ declare type MutableWindowOptions = {
|
|
|
7192
7241
|
* Turns anything of matching RGB value transparent.
|
|
7193
7242
|
*
|
|
7194
7243
|
* Caveats:
|
|
7195
|
-
* *
|
|
7244
|
+
* * runtime key --disable-gpu is required. Note: Unclear behavior on remote Desktop support
|
|
7196
7245
|
* * User cannot click-through transparent regions
|
|
7197
7246
|
* * Not supported on Mac
|
|
7198
7247
|
* * Windows Aero must be enabled
|
|
@@ -7242,7 +7291,42 @@ declare type MutableWindowOptions = {
|
|
|
7242
7291
|
* is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
|
|
7243
7292
|
* {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
|
|
7244
7293
|
* _When omitted, _inherits_ from the parent application._
|
|
7245
|
-
* As opposed to customData, this is meant for frequent updates and sharing with other contexts.
|
|
7294
|
+
* As opposed to customData, this is meant for frequent updates and sharing with other contexts.
|
|
7295
|
+
*
|
|
7296
|
+
* @example
|
|
7297
|
+
* This Example shows a window sharing context to all it's views.
|
|
7298
|
+
* By executing the code here in the correct context, the view will have global `broadcastContext` and `addContextListener` methods available.
|
|
7299
|
+
* 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.
|
|
7300
|
+
*
|
|
7301
|
+
* ### In Window (frame)
|
|
7302
|
+
* ```js
|
|
7303
|
+
* const me = fin.Window.getCurrentSync();
|
|
7304
|
+
* me.on('options-changed', async (event) => {
|
|
7305
|
+
* if (event.diff.customContext) {
|
|
7306
|
+
* const myViews = await me.getCurrentViews();
|
|
7307
|
+
* const customContext = event.diff.customContext.newVal;
|
|
7308
|
+
* myViews.forEach(v => {
|
|
7309
|
+
* v.updateOptions({customContext});
|
|
7310
|
+
* });
|
|
7311
|
+
* }
|
|
7312
|
+
* })
|
|
7313
|
+
*
|
|
7314
|
+
* ```
|
|
7315
|
+
* ### in View (content)
|
|
7316
|
+
* ```js
|
|
7317
|
+
* const me = fin.View.getCurrentSync();
|
|
7318
|
+
* const broadcastContext = async (customContext) => {
|
|
7319
|
+
* const myWindow = await me.getCurrentWindow()
|
|
7320
|
+
* await myWindow.updateOptions({customContext})
|
|
7321
|
+
* };
|
|
7322
|
+
* const addContextListener = async (listener) => {
|
|
7323
|
+
* await me.on('options-changed', (event) => {
|
|
7324
|
+
* if (event.diff.customContext) {
|
|
7325
|
+
* listener(event.diff.customContext.newVal);
|
|
7326
|
+
* }
|
|
7327
|
+
* });
|
|
7328
|
+
* }
|
|
7329
|
+
* ```
|
|
7246
7330
|
*/
|
|
7247
7331
|
customContext: any;
|
|
7248
7332
|
/**
|
|
@@ -7263,10 +7347,45 @@ declare type MutableWindowOptions = {
|
|
|
7263
7347
|
*/
|
|
7264
7348
|
hideOnClose: boolean;
|
|
7265
7349
|
/**
|
|
7266
|
-
* Defines the hotkeys that will be emitted as a `hotkey` event on the window.
|
|
7350
|
+
* Defines the hotkeys that will be emitted as a `hotkey` event on the window.
|
|
7267
7351
|
* Within Platform, OpenFin also implements a set of pre-defined actions called
|
|
7268
|
-
*
|
|
7352
|
+
* {@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands keyboard commands}
|
|
7269
7353
|
* that can be assigned to a specific hotkey in the platform manifest.
|
|
7354
|
+
*
|
|
7355
|
+
* @example
|
|
7356
|
+
*
|
|
7357
|
+
* 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.
|
|
7358
|
+
* ### Defining the hotkey
|
|
7359
|
+
* ```js
|
|
7360
|
+
* const myMagicWindow = await fin.Window.create({
|
|
7361
|
+
* name: 'magicWin',
|
|
7362
|
+
* hotkeys: [
|
|
7363
|
+
* {
|
|
7364
|
+
* keys: 'Ctrl+M',
|
|
7365
|
+
* }
|
|
7366
|
+
* ]
|
|
7367
|
+
* });
|
|
7368
|
+
*
|
|
7369
|
+
* ```
|
|
7370
|
+
* ### Listening to the hotkey
|
|
7371
|
+
* ```js
|
|
7372
|
+
* myMagicWindow.on('hotkey', (hotkeyEvent) => {
|
|
7373
|
+
* console.log(`A hotkey was pressed in the magic window!: ${JSON.stringify(hotkeyEvent)}`);
|
|
7374
|
+
* });
|
|
7375
|
+
* ```
|
|
7376
|
+
*
|
|
7377
|
+
* ### Removing a hotkey
|
|
7378
|
+
* After the following change, the `hotkey` event will no longer be emitted when Ctrl+M is pressed:
|
|
7379
|
+
* ```js
|
|
7380
|
+
* const currentHotkeys = (await myMagicWindow.getOptions()).hotkeys;
|
|
7381
|
+
* const newHotkeys = currentHotkeys.filter(hotkey => hotkey.keys !== 'Ctrl+M');
|
|
7382
|
+
* myMagicWindow.updateOptions({
|
|
7383
|
+
* hotkeys: newHotkeys
|
|
7384
|
+
* });
|
|
7385
|
+
* ```
|
|
7386
|
+
*
|
|
7387
|
+
* @remarks The `hotkeys` option is configured per-instance and isn't passed down to the children of Window/View.
|
|
7388
|
+
* 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.
|
|
7270
7389
|
*/
|
|
7271
7390
|
hotkeys: Hotkey[];
|
|
7272
7391
|
/**
|
|
@@ -7324,7 +7443,6 @@ declare type MutableWindowOptions = {
|
|
|
7324
7443
|
* A flag that specifies how transparent the window will be.
|
|
7325
7444
|
* Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
|
|
7326
7445
|
* This value is clamped between `0.0` and `1.0`.
|
|
7327
|
-
* In software composition mode, the runtime flag --allow-unsafe-compositing is required.
|
|
7328
7446
|
*/
|
|
7329
7447
|
opacity: number;
|
|
7330
7448
|
/**
|
|
@@ -9073,6 +9191,15 @@ declare interface PlatformProvider {
|
|
|
9073
9191
|
*
|
|
9074
9192
|
*/
|
|
9075
9193
|
handleViewsAndWindowClose(windowId: OpenFin_2.Identity, userDecision: OpenFin_2.BeforeUnloadUserDecision): Promise<void>;
|
|
9194
|
+
/**
|
|
9195
|
+
* Handles subsequent launch attempts of the current platform.
|
|
9196
|
+
* Attempts to launch appManifestUrl passed as userAppConfigArgs.
|
|
9197
|
+
* If no appManifestUrl is present will attempt to launch using the requesting manifest snapshot.
|
|
9198
|
+
* If no appManifestUrl or snapshot is available nothing will be launched.
|
|
9199
|
+
* @param { RunRequestedEvent<'application', 'run-requested'> } payload
|
|
9200
|
+
* @returns {Promise<void>}
|
|
9201
|
+
*/
|
|
9202
|
+
handleRunRequested({ manifest, userAppConfigArgs }: RunRequestedEvent): Promise<void>;
|
|
9076
9203
|
}
|
|
9077
9204
|
|
|
9078
9205
|
/**
|
|
@@ -9940,13 +10067,15 @@ declare interface RTCStrategyEndpointPayload {
|
|
|
9940
10067
|
rtc: RTCPacket;
|
|
9941
10068
|
}
|
|
9942
10069
|
|
|
10070
|
+
declare type RunRequestedEvent = OpenFin_2.ApplicationEvents.RunRequestedEvent;
|
|
10071
|
+
|
|
9943
10072
|
/**
|
|
9944
10073
|
* Generated when Application.run() is called for an already running application.
|
|
9945
10074
|
*/
|
|
9946
|
-
declare type
|
|
10075
|
+
declare type RunRequestedEvent_2 = IdentityEvent & {
|
|
9947
10076
|
type: 'run-requested';
|
|
9948
10077
|
userAppConfigArgs: Record<string, any>;
|
|
9949
|
-
manifest: OpenFin_2.
|
|
10078
|
+
manifest: OpenFin_2.Manifest;
|
|
9950
10079
|
};
|
|
9951
10080
|
|
|
9952
10081
|
declare type RuntimeConfig = {
|
|
@@ -12500,7 +12629,6 @@ declare class View_2 extends WebContents<ViewEvent> {
|
|
|
12500
12629
|
* Attaches the current view to the given window identity.
|
|
12501
12630
|
* Identity must be the identity of a window in the same application.
|
|
12502
12631
|
* This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
|
|
12503
|
-
* @param target {Identity}
|
|
12504
12632
|
*
|
|
12505
12633
|
* @example
|
|
12506
12634
|
* ```js
|
|
@@ -12621,7 +12749,6 @@ declare class View_2 extends WebContents<ViewEvent> {
|
|
|
12621
12749
|
hide: () => Promise<void>;
|
|
12622
12750
|
/**
|
|
12623
12751
|
* Sets the bounds (top, left, width, height) of the view relative to its window.
|
|
12624
|
-
* @param bounds {ViewBounds}
|
|
12625
12752
|
*
|
|
12626
12753
|
* @remarks View position is relative to the bounds of the window.
|
|
12627
12754
|
* ({top: 0, left: 0} represents the top left corner of the window)
|
|
@@ -14136,7 +14263,7 @@ declare type WillMoveOrResizeEvent = NamedEvent & {
|
|
|
14136
14263
|
/**
|
|
14137
14264
|
* An Application event that does propagate to (republish on) parent topics.
|
|
14138
14265
|
*/
|
|
14139
|
-
declare type WillPropagateApplicationEvent = ClosedEvent | ApplicationConnectedEvent | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent |
|
|
14266
|
+
declare type WillPropagateApplicationEvent = ClosedEvent | ApplicationConnectedEvent | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
|
|
14140
14267
|
|
|
14141
14268
|
/**
|
|
14142
14269
|
* A View event that does propagate to (republish on) parent topics.
|