@openfin/core 33.77.5 → 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 +185 -56
- package/out/mock-beta.d.ts +185 -56
- package/out/mock-public.d.ts +185 -56
- package/out/mock.d.ts +185 -53
- package/out/mock.js +160 -7
- package/package.json +1 -1
package/out/mock-beta.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
|
/**
|
|
@@ -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
|
/**
|
|
@@ -9072,6 +9191,15 @@ declare interface PlatformProvider {
|
|
|
9072
9191
|
*
|
|
9073
9192
|
*/
|
|
9074
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>;
|
|
9075
9203
|
}
|
|
9076
9204
|
|
|
9077
9205
|
/**
|
|
@@ -9939,13 +10067,15 @@ declare interface RTCStrategyEndpointPayload {
|
|
|
9939
10067
|
rtc: RTCPacket;
|
|
9940
10068
|
}
|
|
9941
10069
|
|
|
10070
|
+
declare type RunRequestedEvent = OpenFin_2.ApplicationEvents.RunRequestedEvent;
|
|
10071
|
+
|
|
9942
10072
|
/**
|
|
9943
10073
|
* Generated when Application.run() is called for an already running application.
|
|
9944
10074
|
*/
|
|
9945
|
-
declare type
|
|
10075
|
+
declare type RunRequestedEvent_2 = IdentityEvent & {
|
|
9946
10076
|
type: 'run-requested';
|
|
9947
10077
|
userAppConfigArgs: Record<string, any>;
|
|
9948
|
-
manifest: OpenFin_2.
|
|
10078
|
+
manifest: OpenFin_2.Manifest;
|
|
9949
10079
|
};
|
|
9950
10080
|
|
|
9951
10081
|
declare type RuntimeConfig = {
|
|
@@ -12499,7 +12629,6 @@ declare class View_2 extends WebContents<ViewEvent> {
|
|
|
12499
12629
|
* Attaches the current view to the given window identity.
|
|
12500
12630
|
* Identity must be the identity of a window in the same application.
|
|
12501
12631
|
* This detaches the view from its current window, and sets the view to be destroyed when its new window closes.
|
|
12502
|
-
* @param target {Identity}
|
|
12503
12632
|
*
|
|
12504
12633
|
* @example
|
|
12505
12634
|
* ```js
|
|
@@ -12620,7 +12749,6 @@ declare class View_2 extends WebContents<ViewEvent> {
|
|
|
12620
12749
|
hide: () => Promise<void>;
|
|
12621
12750
|
/**
|
|
12622
12751
|
* Sets the bounds (top, left, width, height) of the view relative to its window.
|
|
12623
|
-
* @param bounds {ViewBounds}
|
|
12624
12752
|
*
|
|
12625
12753
|
* @remarks View position is relative to the bounds of the window.
|
|
12626
12754
|
* ({top: 0, left: 0} represents the top left corner of the window)
|
|
@@ -14135,12 +14263,12 @@ declare type WillMoveOrResizeEvent = NamedEvent & {
|
|
|
14135
14263
|
/**
|
|
14136
14264
|
* An Application event that does propagate to (republish on) parent topics.
|
|
14137
14265
|
*/
|
|
14138
|
-
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;
|
|
14139
14267
|
|
|
14140
14268
|
/**
|
|
14141
14269
|
* A View event that does propagate to (republish on) parent topics.
|
|
14142
14270
|
*/
|
|
14143
|
-
declare type WillPropagateViewEvent = WillPropagateWebContentsEvent | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent_2 | HotkeyEvent | ShownEvent | TargetChangedEvent;
|
|
14271
|
+
declare type WillPropagateViewEvent = (WillPropagateWebContentsEvent & BaseViewEvent) | AttachedEvent | CreatedEvent | DestroyedEvent | HiddenEvent_2 | HotkeyEvent | ShownEvent | TargetChangedEvent;
|
|
14144
14272
|
|
|
14145
14273
|
/**
|
|
14146
14274
|
* A WebContents event that does propagate to (republish on) parent topics.
|
|
@@ -14277,7 +14405,7 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
|
|
|
14277
14405
|
* alphaMask turns anything of matching RGB value transparent.
|
|
14278
14406
|
* <br>
|
|
14279
14407
|
* Caveats:
|
|
14280
|
-
* *
|
|
14408
|
+
* * Runtime flags --disable-gpu and --allow-unsafe-compositing are required. Note: Unclear behavior on remote Desktop support
|
|
14281
14409
|
* * User cannot click-through transparent regions
|
|
14282
14410
|
* * Not supported on Mac
|
|
14283
14411
|
* * Windows Aero must be enabled
|
|
@@ -14465,6 +14593,7 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
|
|
|
14465
14593
|
* A flag that specifies how transparent the window will be.
|
|
14466
14594
|
* Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
|
|
14467
14595
|
* This value is clamped between `0.0` and `1.0`.
|
|
14596
|
+
* * In software composition mode, the runtime flag --allow-unsafe-compositing is required.
|
|
14468
14597
|
*
|
|
14469
14598
|
* @property {preloadScript[]} [preloadScripts] - _Inheritable_
|
|
14470
14599
|
* A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
|