@openfin/core 34.78.54 → 34.78.57
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 +76 -55
- package/out/mock-beta.d.ts +76 -55
- package/out/mock-public.d.ts +76 -55
- package/out/mock.d.ts +91 -178
- package/out/mock.js +61 -146
- package/package.json +1 -1
package/out/mock-alpha.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ declare type Accelerator = {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
+
* Options to use when adding a view to a {@link TabStack}.
|
|
47
|
+
*
|
|
46
48
|
* @interface
|
|
47
49
|
*/
|
|
48
50
|
declare type AddViewOptions = CreateViewTarget & {
|
|
@@ -3636,7 +3638,7 @@ declare type ConstWindowOptions = {
|
|
|
3636
3638
|
/**
|
|
3637
3639
|
* @defaultValue true
|
|
3638
3640
|
*
|
|
3639
|
-
*
|
|
3641
|
+
* Setting this to false would keep the Window alive even if all its Views were closed.
|
|
3640
3642
|
* This is meant for advanced users and should be used with caution.
|
|
3641
3643
|
* Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
|
|
3642
3644
|
* Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
|
|
@@ -3646,7 +3648,8 @@ declare type ConstWindowOptions = {
|
|
|
3646
3648
|
/**
|
|
3647
3649
|
* @defaultValue 'all'
|
|
3648
3650
|
*
|
|
3649
|
-
*
|
|
3651
|
+
* When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
|
|
3652
|
+
+ * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
|
|
3650
3653
|
* **NOTE:** - This option is ignored in non-Platforms apps.
|
|
3651
3654
|
*/
|
|
3652
3655
|
viewsPreventingClose: 'all' | 'layout';
|
|
@@ -4453,7 +4456,7 @@ declare type CreateViewPayload = {
|
|
|
4453
4456
|
/**
|
|
4454
4457
|
* @interface
|
|
4455
4458
|
*/
|
|
4456
|
-
declare type CreateViewTarget = LayoutIdentity & {
|
|
4459
|
+
declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
|
|
4457
4460
|
/**
|
|
4458
4461
|
* If specified, view creation will not attach to a window and caller must
|
|
4459
4462
|
* insert the view into the layout explicitly
|
|
@@ -4593,6 +4596,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
|
|
|
4593
4596
|
type: 'destroyed';
|
|
4594
4597
|
};
|
|
4595
4598
|
|
|
4599
|
+
/**
|
|
4600
|
+
* @interface
|
|
4601
|
+
*/
|
|
4602
|
+
declare type DeviceInfo = {
|
|
4603
|
+
vendorId: string | number;
|
|
4604
|
+
productId: string | number;
|
|
4605
|
+
};
|
|
4606
|
+
|
|
4596
4607
|
/**
|
|
4597
4608
|
* Generated when a page's theme color changes. This is usually due to encountering a meta tag.
|
|
4598
4609
|
* @interface
|
|
@@ -5053,9 +5064,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
|
5053
5064
|
} : never;
|
|
5054
5065
|
|
|
5055
5066
|
declare interface Environment {
|
|
5056
|
-
|
|
5067
|
+
initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
|
|
5057
5068
|
createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
|
|
5058
5069
|
destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
|
|
5070
|
+
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5059
5071
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
5060
5072
|
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
5061
5073
|
writeToken(path: string, token: string): Promise<string>;
|
|
@@ -7433,7 +7445,7 @@ declare class InteropBroker extends Base {
|
|
|
7433
7445
|
* // }
|
|
7434
7446
|
* ```
|
|
7435
7447
|
*
|
|
7436
|
-
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/
|
|
7448
|
+
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
|
|
7437
7449
|
*
|
|
7438
7450
|
* @param contextForIntent Data passed between entities and applications.
|
|
7439
7451
|
* @param clientIdentity Identity of the Client making the request.
|
|
@@ -8607,7 +8619,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8607
8619
|
declare class Layout extends Base {
|
|
8608
8620
|
#private;
|
|
8609
8621
|
/* Excluded from this release type: init */
|
|
8610
|
-
identity: OpenFin_2.LayoutIdentity;
|
|
8622
|
+
identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
|
|
8611
8623
|
private platform;
|
|
8612
8624
|
wire: Transport;
|
|
8613
8625
|
/* Excluded from this release type: __constructor */
|
|
@@ -8823,25 +8835,24 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
|
|
|
8823
8835
|
*/
|
|
8824
8836
|
declare type LayoutIdentity = Identity_5 & {
|
|
8825
8837
|
/**
|
|
8826
|
-
* The name of the layout
|
|
8827
|
-
* OpenFin attempts to resolve the instance via visibility checks.
|
|
8838
|
+
* The name of the layout in a given window.
|
|
8828
8839
|
*/
|
|
8829
|
-
layoutName
|
|
8840
|
+
layoutName: string;
|
|
8830
8841
|
};
|
|
8831
8842
|
|
|
8832
8843
|
/**
|
|
8833
|
-
* Generated when
|
|
8844
|
+
* Generated when the window is created, and all of its layout's views have either finished or failed
|
|
8845
|
+
* navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
|
|
8834
8846
|
* @interface
|
|
8835
8847
|
*/
|
|
8836
8848
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
|
8837
8849
|
type: 'layout-initialized';
|
|
8850
|
+
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
8838
8851
|
ofViews: (OpenFin_2.Identity & {
|
|
8839
8852
|
entityType: 'view';
|
|
8840
8853
|
})[];
|
|
8841
8854
|
};
|
|
8842
8855
|
|
|
8843
|
-
/* Excluded from this release type: LayoutInstance */
|
|
8844
|
-
|
|
8845
8856
|
/**
|
|
8846
8857
|
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
|
8847
8858
|
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
|
|
@@ -8869,7 +8880,7 @@ declare type LayoutItemConfig = {
|
|
|
8869
8880
|
*
|
|
8870
8881
|
* **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
|
|
8871
8882
|
*
|
|
8872
|
-
* Responsible for
|
|
8883
|
+
* Responsible for aggregating all layout snapshots and storing layout instances
|
|
8873
8884
|
*/
|
|
8874
8885
|
declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
8875
8886
|
/**
|
|
@@ -8893,16 +8904,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
|
8893
8904
|
* @throws if Object.keys(snapshot).length > 1
|
|
8894
8905
|
*/
|
|
8895
8906
|
applyLayoutSnapshot(snapshot: T): Promise<void>;
|
|
8896
|
-
/**
|
|
8897
|
-
* Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
|
|
8898
|
-
* contains a single layout.
|
|
8899
|
-
*
|
|
8900
|
-
* Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
|
|
8901
|
-
* fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
|
|
8902
|
-
*
|
|
8903
|
-
* @param snapshot
|
|
8904
|
-
* @throws if Object.keys(snapshot).length > 1
|
|
8905
|
-
*/
|
|
8906
8907
|
/**
|
|
8907
8908
|
* @experimental
|
|
8908
8909
|
*
|
|
@@ -8923,31 +8924,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
|
8923
8924
|
/**
|
|
8924
8925
|
* @experimental
|
|
8925
8926
|
*
|
|
8926
|
-
*
|
|
8927
|
-
*
|
|
8927
|
+
* A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
|
|
8928
|
+
* this method to control the target layout for Layout API calls.
|
|
8929
|
+
*
|
|
8930
|
+
* Example use case: You have hidden all the layouts and are showing a dialog that will
|
|
8931
|
+
* execute an API call (ex: Layout.replace()) - override this method and save the
|
|
8932
|
+
* "last visible" layout identity and return it.
|
|
8933
|
+
*
|
|
8934
|
+
* By default, OpenFin will use a series of checks to determine which Layout the API
|
|
8935
|
+
* call must route to in this order of precedence:
|
|
8936
|
+
* - try to resolve the layout from the layoutIdentity, throws if missing
|
|
8937
|
+
* - if there is only 1 layout, resolves that one
|
|
8938
|
+
* - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
|
|
8939
|
+
* - returns undefined
|
|
8940
|
+
*
|
|
8941
|
+
* @param identity
|
|
8942
|
+
* @returns LayoutIdentity | undefined
|
|
8928
8943
|
*/
|
|
8929
|
-
|
|
8944
|
+
resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
|
|
8930
8945
|
/**
|
|
8931
8946
|
* @experimental
|
|
8932
8947
|
*
|
|
8933
|
-
*
|
|
8934
|
-
*
|
|
8935
|
-
*
|
|
8936
|
-
*
|
|
8948
|
+
* A hook provided to the consumer when it's time to remove a layout. Use this hook to
|
|
8949
|
+
* update your local state and remove the layout for the given LayoutIdentity. Note that
|
|
8950
|
+
* this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
|
|
8951
|
+
* signify to your application it's time to destroy this layout.
|
|
8952
|
+
*
|
|
8953
|
+
* Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
|
|
8954
|
+
*
|
|
8955
|
+
* @param LayoutIdentity
|
|
8937
8956
|
*/
|
|
8938
|
-
|
|
8957
|
+
removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
|
|
8939
8958
|
/**
|
|
8940
8959
|
* @experimental
|
|
8941
8960
|
*/
|
|
8942
|
-
|
|
8961
|
+
getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
|
|
8943
8962
|
/**
|
|
8944
8963
|
* @experimental
|
|
8945
8964
|
*/
|
|
8946
|
-
|
|
8965
|
+
isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
|
|
8947
8966
|
/**
|
|
8948
8967
|
* @experimental
|
|
8949
8968
|
*/
|
|
8950
|
-
|
|
8969
|
+
size(): number;
|
|
8951
8970
|
}
|
|
8952
8971
|
|
|
8953
8972
|
/**
|
|
@@ -8994,7 +9013,7 @@ declare class LayoutModule extends Base {
|
|
|
8994
9013
|
* const layoutConfig = await layout.getConfig();
|
|
8995
9014
|
* ```
|
|
8996
9015
|
*/
|
|
8997
|
-
wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
|
|
9016
|
+
wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
|
|
8998
9017
|
/**
|
|
8999
9018
|
* Synchronously returns a Layout object that represents a Window's layout.
|
|
9000
9019
|
*
|
|
@@ -9014,7 +9033,7 @@ declare class LayoutModule extends Base {
|
|
|
9014
9033
|
* const layoutConfig = await layout.getConfig();
|
|
9015
9034
|
* ```
|
|
9016
9035
|
*/
|
|
9017
|
-
wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
|
|
9036
|
+
wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
|
|
9018
9037
|
/**
|
|
9019
9038
|
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
9020
9039
|
*
|
|
@@ -9182,6 +9201,9 @@ declare type LayoutOptions = {
|
|
|
9182
9201
|
};
|
|
9183
9202
|
};
|
|
9184
9203
|
|
|
9204
|
+
/**
|
|
9205
|
+
* Represents the position of an item in a layout relative to another.
|
|
9206
|
+
*/
|
|
9185
9207
|
declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
9186
9208
|
|
|
9187
9209
|
/**
|
|
@@ -9190,11 +9212,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
|
9190
9212
|
declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
9191
9213
|
|
|
9192
9214
|
/**
|
|
9193
|
-
* Generated when
|
|
9215
|
+
* Generated when the layout and all of the its views have been created and can receive API calls.
|
|
9194
9216
|
* @interface
|
|
9195
9217
|
*/
|
|
9196
9218
|
declare type LayoutReadyEvent = BaseEvent_5 & {
|
|
9197
9219
|
type: 'layout-ready';
|
|
9220
|
+
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
9198
9221
|
views: (OpenFin_2.Identity & {
|
|
9199
9222
|
success: boolean;
|
|
9200
9223
|
})[];
|
|
@@ -10132,6 +10155,7 @@ declare namespace OpenFin_2 {
|
|
|
10132
10155
|
WebPermission,
|
|
10133
10156
|
VerboseWebPermission,
|
|
10134
10157
|
OpenExternalPermission,
|
|
10158
|
+
DeviceInfo,
|
|
10135
10159
|
Permissions_2 as Permissions,
|
|
10136
10160
|
PlatformWindowCreationOptions,
|
|
10137
10161
|
PlatformWindowOptions,
|
|
@@ -10289,7 +10313,6 @@ declare namespace OpenFin_2 {
|
|
|
10289
10313
|
InitLayoutOptions,
|
|
10290
10314
|
LayoutManagerConstructor,
|
|
10291
10315
|
LayoutManagerOverride,
|
|
10292
|
-
LayoutInstance,
|
|
10293
10316
|
LayoutManager,
|
|
10294
10317
|
CreateLayoutOptions,
|
|
10295
10318
|
PresetLayoutOptions_2 as PresetLayoutOptions,
|
|
@@ -10481,6 +10504,7 @@ declare type Permissions_2 = {
|
|
|
10481
10504
|
Application?: Partial<ApplicationPermissions>;
|
|
10482
10505
|
System?: Partial<SystemPermissions>;
|
|
10483
10506
|
webAPIs?: WebPermission[];
|
|
10507
|
+
devices?: DeviceInfo[];
|
|
10484
10508
|
};
|
|
10485
10509
|
|
|
10486
10510
|
declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
|
|
@@ -11393,6 +11417,17 @@ declare interface PlatformProvider {
|
|
|
11393
11417
|
*/
|
|
11394
11418
|
getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
|
|
11395
11419
|
/* Excluded from this release type: getInitialLayoutSnapshot */
|
|
11420
|
+
/**
|
|
11421
|
+
* @experimental
|
|
11422
|
+
*
|
|
11423
|
+
* This API is called during the {@link PlatformProvider.getSnapshot()} call.
|
|
11424
|
+
* Gets the current state of a particular window and its views and returns an object that
|
|
11425
|
+
* can be added to the {@link OpenFin.Snapshot.windows} property. Override this function if
|
|
11426
|
+
* you wish to mutate each window snapshot during the {@link PlatformProvider.getSnapshot()} call
|
|
11427
|
+
* @param identity
|
|
11428
|
+
* @param callerIdentity
|
|
11429
|
+
*/
|
|
11430
|
+
getWindowSnapshot(identity: OpenFin_2.Identity, callerIdentity: OpenFin_2.Identity): Promise<OpenFin_2.WindowCreationOptions>;
|
|
11396
11431
|
/* Excluded from this release type: createViewsForLayout */
|
|
11397
11432
|
/* Excluded from this release type: getViewSnapshot */
|
|
11398
11433
|
/**
|
|
@@ -12821,7 +12856,7 @@ declare type ReplaceLayoutPayload = {
|
|
|
12821
12856
|
/**
|
|
12822
12857
|
* Identity of the window whose layout will be replaced.
|
|
12823
12858
|
*/
|
|
12824
|
-
target: LayoutIdentity;
|
|
12859
|
+
target: Identity_5 | LayoutIdentity;
|
|
12825
12860
|
};
|
|
12826
12861
|
|
|
12827
12862
|
/**
|
|
@@ -15312,20 +15347,6 @@ declare interface TabDragListener extends EventEmitter_2 {
|
|
|
15312
15347
|
contentItem: ContentItem;
|
|
15313
15348
|
}
|
|
15314
15349
|
|
|
15315
|
-
/**
|
|
15316
|
-
* @typedef {string} LayoutPosition
|
|
15317
|
-
* @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
|
|
15318
|
-
*/
|
|
15319
|
-
/**
|
|
15320
|
-
* @typedef {object} StackCreationOptions
|
|
15321
|
-
* @summary Stack creation options.
|
|
15322
|
-
* @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
|
|
15323
|
-
*/
|
|
15324
|
-
/**
|
|
15325
|
-
* @typedef {object} TabStack~AddViewOptions
|
|
15326
|
-
* @summary Options to use when adding a view to a {@link TabStack}
|
|
15327
|
-
* @property {number} [index] - Insertion index when adding the view. Defaults to 0.
|
|
15328
|
-
*/
|
|
15329
15350
|
/**
|
|
15330
15351
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
15331
15352
|
*/
|
|
@@ -16411,7 +16432,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
|
|
|
16411
16432
|
*/
|
|
16412
16433
|
declare type ViewDetachedEvent = BaseEvent_5 & {
|
|
16413
16434
|
type: 'view-detached';
|
|
16414
|
-
target: OpenFin_2.Identity;
|
|
16435
|
+
target: OpenFin_2.Identity | null;
|
|
16415
16436
|
previousTarget: OpenFin_2.Identity;
|
|
16416
16437
|
viewIdentity: OpenFin_2.Identity;
|
|
16417
16438
|
};
|
|
@@ -17647,7 +17668,7 @@ declare namespace WebContentsEvents {
|
|
|
17647
17668
|
* `clipboard-read`: Request access to read from the clipboard.<br>
|
|
17648
17669
|
* `clipboard-sanitized-write`: Request access to write to the clipboard.
|
|
17649
17670
|
*/
|
|
17650
|
-
declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
|
|
17671
|
+
declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
|
|
17651
17672
|
|
|
17652
17673
|
/**
|
|
17653
17674
|
* Object representing headers and their values, where the
|
package/out/mock-beta.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ declare type Accelerator = {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
+
* Options to use when adding a view to a {@link TabStack}.
|
|
47
|
+
*
|
|
46
48
|
* @interface
|
|
47
49
|
*/
|
|
48
50
|
declare type AddViewOptions = CreateViewTarget & {
|
|
@@ -3636,7 +3638,7 @@ declare type ConstWindowOptions = {
|
|
|
3636
3638
|
/**
|
|
3637
3639
|
* @defaultValue true
|
|
3638
3640
|
*
|
|
3639
|
-
*
|
|
3641
|
+
* Setting this to false would keep the Window alive even if all its Views were closed.
|
|
3640
3642
|
* This is meant for advanced users and should be used with caution.
|
|
3641
3643
|
* Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
|
|
3642
3644
|
* Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
|
|
@@ -3646,7 +3648,8 @@ declare type ConstWindowOptions = {
|
|
|
3646
3648
|
/**
|
|
3647
3649
|
* @defaultValue 'all'
|
|
3648
3650
|
*
|
|
3649
|
-
*
|
|
3651
|
+
* When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
|
|
3652
|
+
+ * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
|
|
3650
3653
|
* **NOTE:** - This option is ignored in non-Platforms apps.
|
|
3651
3654
|
*/
|
|
3652
3655
|
viewsPreventingClose: 'all' | 'layout';
|
|
@@ -4453,7 +4456,7 @@ declare type CreateViewPayload = {
|
|
|
4453
4456
|
/**
|
|
4454
4457
|
* @interface
|
|
4455
4458
|
*/
|
|
4456
|
-
declare type CreateViewTarget = LayoutIdentity & {
|
|
4459
|
+
declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
|
|
4457
4460
|
/**
|
|
4458
4461
|
* If specified, view creation will not attach to a window and caller must
|
|
4459
4462
|
* insert the view into the layout explicitly
|
|
@@ -4593,6 +4596,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
|
|
|
4593
4596
|
type: 'destroyed';
|
|
4594
4597
|
};
|
|
4595
4598
|
|
|
4599
|
+
/**
|
|
4600
|
+
* @interface
|
|
4601
|
+
*/
|
|
4602
|
+
declare type DeviceInfo = {
|
|
4603
|
+
vendorId: string | number;
|
|
4604
|
+
productId: string | number;
|
|
4605
|
+
};
|
|
4606
|
+
|
|
4596
4607
|
/**
|
|
4597
4608
|
* Generated when a page's theme color changes. This is usually due to encountering a meta tag.
|
|
4598
4609
|
* @interface
|
|
@@ -5053,9 +5064,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
|
|
|
5053
5064
|
} : never;
|
|
5054
5065
|
|
|
5055
5066
|
declare interface Environment {
|
|
5056
|
-
|
|
5067
|
+
initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
|
|
5057
5068
|
createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
|
|
5058
5069
|
destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
|
|
5070
|
+
resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
|
|
5059
5071
|
initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
|
|
5060
5072
|
observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
|
|
5061
5073
|
writeToken(path: string, token: string): Promise<string>;
|
|
@@ -7433,7 +7445,7 @@ declare class InteropBroker extends Base {
|
|
|
7433
7445
|
* // }
|
|
7434
7446
|
* ```
|
|
7435
7447
|
*
|
|
7436
|
-
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/
|
|
7448
|
+
* More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
|
|
7437
7449
|
*
|
|
7438
7450
|
* @param contextForIntent Data passed between entities and applications.
|
|
7439
7451
|
* @param clientIdentity Identity of the Client making the request.
|
|
@@ -8607,7 +8619,7 @@ declare type LaunchIntoPlatformPayload = {
|
|
|
8607
8619
|
declare class Layout extends Base {
|
|
8608
8620
|
#private;
|
|
8609
8621
|
/* Excluded from this release type: init */
|
|
8610
|
-
identity: OpenFin_2.LayoutIdentity;
|
|
8622
|
+
identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
|
|
8611
8623
|
private platform;
|
|
8612
8624
|
wire: Transport;
|
|
8613
8625
|
/* Excluded from this release type: __constructor */
|
|
@@ -8823,25 +8835,24 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
|
|
|
8823
8835
|
*/
|
|
8824
8836
|
declare type LayoutIdentity = Identity_5 & {
|
|
8825
8837
|
/**
|
|
8826
|
-
* The name of the layout
|
|
8827
|
-
* OpenFin attempts to resolve the instance via visibility checks.
|
|
8838
|
+
* The name of the layout in a given window.
|
|
8828
8839
|
*/
|
|
8829
|
-
layoutName
|
|
8840
|
+
layoutName: string;
|
|
8830
8841
|
};
|
|
8831
8842
|
|
|
8832
8843
|
/**
|
|
8833
|
-
* Generated when
|
|
8844
|
+
* Generated when the window is created, and all of its layout's views have either finished or failed
|
|
8845
|
+
* navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
|
|
8834
8846
|
* @interface
|
|
8835
8847
|
*/
|
|
8836
8848
|
declare type LayoutInitializedEvent = BaseEvent_5 & {
|
|
8837
8849
|
type: 'layout-initialized';
|
|
8850
|
+
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
8838
8851
|
ofViews: (OpenFin_2.Identity & {
|
|
8839
8852
|
entityType: 'view';
|
|
8840
8853
|
})[];
|
|
8841
8854
|
};
|
|
8842
8855
|
|
|
8843
|
-
/* Excluded from this release type: LayoutInstance */
|
|
8844
|
-
|
|
8845
8856
|
/**
|
|
8846
8857
|
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
|
8847
8858
|
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
|
|
@@ -8869,7 +8880,7 @@ declare type LayoutItemConfig = {
|
|
|
8869
8880
|
*
|
|
8870
8881
|
* **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
|
|
8871
8882
|
*
|
|
8872
|
-
* Responsible for
|
|
8883
|
+
* Responsible for aggregating all layout snapshots and storing layout instances
|
|
8873
8884
|
*/
|
|
8874
8885
|
declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
8875
8886
|
/**
|
|
@@ -8893,16 +8904,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
|
8893
8904
|
* @throws if Object.keys(snapshot).length > 1
|
|
8894
8905
|
*/
|
|
8895
8906
|
applyLayoutSnapshot(snapshot: T): Promise<void>;
|
|
8896
|
-
/**
|
|
8897
|
-
* Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
|
|
8898
|
-
* contains a single layout.
|
|
8899
|
-
*
|
|
8900
|
-
* Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
|
|
8901
|
-
* fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
|
|
8902
|
-
*
|
|
8903
|
-
* @param snapshot
|
|
8904
|
-
* @throws if Object.keys(snapshot).length > 1
|
|
8905
|
-
*/
|
|
8906
8907
|
/**
|
|
8907
8908
|
* @experimental
|
|
8908
8909
|
*
|
|
@@ -8923,31 +8924,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
|
|
|
8923
8924
|
/**
|
|
8924
8925
|
* @experimental
|
|
8925
8926
|
*
|
|
8926
|
-
*
|
|
8927
|
-
*
|
|
8927
|
+
* A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
|
|
8928
|
+
* this method to control the target layout for Layout API calls.
|
|
8929
|
+
*
|
|
8930
|
+
* Example use case: You have hidden all the layouts and are showing a dialog that will
|
|
8931
|
+
* execute an API call (ex: Layout.replace()) - override this method and save the
|
|
8932
|
+
* "last visible" layout identity and return it.
|
|
8933
|
+
*
|
|
8934
|
+
* By default, OpenFin will use a series of checks to determine which Layout the API
|
|
8935
|
+
* call must route to in this order of precedence:
|
|
8936
|
+
* - try to resolve the layout from the layoutIdentity, throws if missing
|
|
8937
|
+
* - if there is only 1 layout, resolves that one
|
|
8938
|
+
* - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
|
|
8939
|
+
* - returns undefined
|
|
8940
|
+
*
|
|
8941
|
+
* @param identity
|
|
8942
|
+
* @returns LayoutIdentity | undefined
|
|
8928
8943
|
*/
|
|
8929
|
-
|
|
8944
|
+
resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
|
|
8930
8945
|
/**
|
|
8931
8946
|
* @experimental
|
|
8932
8947
|
*
|
|
8933
|
-
*
|
|
8934
|
-
*
|
|
8935
|
-
*
|
|
8936
|
-
*
|
|
8948
|
+
* A hook provided to the consumer when it's time to remove a layout. Use this hook to
|
|
8949
|
+
* update your local state and remove the layout for the given LayoutIdentity. Note that
|
|
8950
|
+
* this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
|
|
8951
|
+
* signify to your application it's time to destroy this layout.
|
|
8952
|
+
*
|
|
8953
|
+
* Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
|
|
8954
|
+
*
|
|
8955
|
+
* @param LayoutIdentity
|
|
8937
8956
|
*/
|
|
8938
|
-
|
|
8957
|
+
removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
|
|
8939
8958
|
/**
|
|
8940
8959
|
* @experimental
|
|
8941
8960
|
*/
|
|
8942
|
-
|
|
8961
|
+
getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
|
|
8943
8962
|
/**
|
|
8944
8963
|
* @experimental
|
|
8945
8964
|
*/
|
|
8946
|
-
|
|
8965
|
+
isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
|
|
8947
8966
|
/**
|
|
8948
8967
|
* @experimental
|
|
8949
8968
|
*/
|
|
8950
|
-
|
|
8969
|
+
size(): number;
|
|
8951
8970
|
}
|
|
8952
8971
|
|
|
8953
8972
|
/**
|
|
@@ -8994,7 +9013,7 @@ declare class LayoutModule extends Base {
|
|
|
8994
9013
|
* const layoutConfig = await layout.getConfig();
|
|
8995
9014
|
* ```
|
|
8996
9015
|
*/
|
|
8997
|
-
wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
|
|
9016
|
+
wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
|
|
8998
9017
|
/**
|
|
8999
9018
|
* Synchronously returns a Layout object that represents a Window's layout.
|
|
9000
9019
|
*
|
|
@@ -9014,7 +9033,7 @@ declare class LayoutModule extends Base {
|
|
|
9014
9033
|
* const layoutConfig = await layout.getConfig();
|
|
9015
9034
|
* ```
|
|
9016
9035
|
*/
|
|
9017
|
-
wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
|
|
9036
|
+
wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
|
|
9018
9037
|
/**
|
|
9019
9038
|
* Asynchronously returns a Layout object that represents a Window's layout.
|
|
9020
9039
|
*
|
|
@@ -9182,6 +9201,9 @@ declare type LayoutOptions = {
|
|
|
9182
9201
|
};
|
|
9183
9202
|
};
|
|
9184
9203
|
|
|
9204
|
+
/**
|
|
9205
|
+
* Represents the position of an item in a layout relative to another.
|
|
9206
|
+
*/
|
|
9185
9207
|
declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
9186
9208
|
|
|
9187
9209
|
/**
|
|
@@ -9190,11 +9212,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
|
9190
9212
|
declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
|
|
9191
9213
|
|
|
9192
9214
|
/**
|
|
9193
|
-
* Generated when
|
|
9215
|
+
* Generated when the layout and all of the its views have been created and can receive API calls.
|
|
9194
9216
|
* @interface
|
|
9195
9217
|
*/
|
|
9196
9218
|
declare type LayoutReadyEvent = BaseEvent_5 & {
|
|
9197
9219
|
type: 'layout-ready';
|
|
9220
|
+
layoutIdentity: OpenFin_2.LayoutIdentity;
|
|
9198
9221
|
views: (OpenFin_2.Identity & {
|
|
9199
9222
|
success: boolean;
|
|
9200
9223
|
})[];
|
|
@@ -10132,6 +10155,7 @@ declare namespace OpenFin_2 {
|
|
|
10132
10155
|
WebPermission,
|
|
10133
10156
|
VerboseWebPermission,
|
|
10134
10157
|
OpenExternalPermission,
|
|
10158
|
+
DeviceInfo,
|
|
10135
10159
|
Permissions_2 as Permissions,
|
|
10136
10160
|
PlatformWindowCreationOptions,
|
|
10137
10161
|
PlatformWindowOptions,
|
|
@@ -10289,7 +10313,6 @@ declare namespace OpenFin_2 {
|
|
|
10289
10313
|
InitLayoutOptions,
|
|
10290
10314
|
LayoutManagerConstructor,
|
|
10291
10315
|
LayoutManagerOverride,
|
|
10292
|
-
LayoutInstance,
|
|
10293
10316
|
LayoutManager,
|
|
10294
10317
|
CreateLayoutOptions,
|
|
10295
10318
|
PresetLayoutOptions_2 as PresetLayoutOptions,
|
|
@@ -10481,6 +10504,7 @@ declare type Permissions_2 = {
|
|
|
10481
10504
|
Application?: Partial<ApplicationPermissions>;
|
|
10482
10505
|
System?: Partial<SystemPermissions>;
|
|
10483
10506
|
webAPIs?: WebPermission[];
|
|
10507
|
+
devices?: DeviceInfo[];
|
|
10484
10508
|
};
|
|
10485
10509
|
|
|
10486
10510
|
declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
|
|
@@ -11393,6 +11417,17 @@ declare interface PlatformProvider {
|
|
|
11393
11417
|
*/
|
|
11394
11418
|
getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
|
|
11395
11419
|
/* Excluded from this release type: getInitialLayoutSnapshot */
|
|
11420
|
+
/**
|
|
11421
|
+
* @experimental
|
|
11422
|
+
*
|
|
11423
|
+
* This API is called during the {@link PlatformProvider.getSnapshot()} call.
|
|
11424
|
+
* Gets the current state of a particular window and its views and returns an object that
|
|
11425
|
+
* can be added to the {@link OpenFin.Snapshot.windows} property. Override this function if
|
|
11426
|
+
* you wish to mutate each window snapshot during the {@link PlatformProvider.getSnapshot()} call
|
|
11427
|
+
* @param identity
|
|
11428
|
+
* @param callerIdentity
|
|
11429
|
+
*/
|
|
11430
|
+
getWindowSnapshot(identity: OpenFin_2.Identity, callerIdentity: OpenFin_2.Identity): Promise<OpenFin_2.WindowCreationOptions>;
|
|
11396
11431
|
/* Excluded from this release type: createViewsForLayout */
|
|
11397
11432
|
/* Excluded from this release type: getViewSnapshot */
|
|
11398
11433
|
/**
|
|
@@ -12821,7 +12856,7 @@ declare type ReplaceLayoutPayload = {
|
|
|
12821
12856
|
/**
|
|
12822
12857
|
* Identity of the window whose layout will be replaced.
|
|
12823
12858
|
*/
|
|
12824
|
-
target: LayoutIdentity;
|
|
12859
|
+
target: Identity_5 | LayoutIdentity;
|
|
12825
12860
|
};
|
|
12826
12861
|
|
|
12827
12862
|
/**
|
|
@@ -15312,20 +15347,6 @@ declare interface TabDragListener extends EventEmitter_2 {
|
|
|
15312
15347
|
contentItem: ContentItem;
|
|
15313
15348
|
}
|
|
15314
15349
|
|
|
15315
|
-
/**
|
|
15316
|
-
* @typedef {string} LayoutPosition
|
|
15317
|
-
* @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
|
|
15318
|
-
*/
|
|
15319
|
-
/**
|
|
15320
|
-
* @typedef {object} StackCreationOptions
|
|
15321
|
-
* @summary Stack creation options.
|
|
15322
|
-
* @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
|
|
15323
|
-
*/
|
|
15324
|
-
/**
|
|
15325
|
-
* @typedef {object} TabStack~AddViewOptions
|
|
15326
|
-
* @summary Options to use when adding a view to a {@link TabStack}
|
|
15327
|
-
* @property {number} [index] - Insertion index when adding the view. Defaults to 0.
|
|
15328
|
-
*/
|
|
15329
15350
|
/**
|
|
15330
15351
|
* A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
|
|
15331
15352
|
*/
|
|
@@ -16411,7 +16432,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
|
|
|
16411
16432
|
*/
|
|
16412
16433
|
declare type ViewDetachedEvent = BaseEvent_5 & {
|
|
16413
16434
|
type: 'view-detached';
|
|
16414
|
-
target: OpenFin_2.Identity;
|
|
16435
|
+
target: OpenFin_2.Identity | null;
|
|
16415
16436
|
previousTarget: OpenFin_2.Identity;
|
|
16416
16437
|
viewIdentity: OpenFin_2.Identity;
|
|
16417
16438
|
};
|
|
@@ -17647,7 +17668,7 @@ declare namespace WebContentsEvents {
|
|
|
17647
17668
|
* `clipboard-read`: Request access to read from the clipboard.<br>
|
|
17648
17669
|
* `clipboard-sanitized-write`: Request access to write to the clipboard.
|
|
17649
17670
|
*/
|
|
17650
|
-
declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
|
|
17671
|
+
declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
|
|
17651
17672
|
|
|
17652
17673
|
/**
|
|
17653
17674
|
* Object representing headers and their values, where the
|