@openfin/core 34.78.12 → 34.78.13
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 +220 -20
- package/out/mock-beta.d.ts +220 -20
- package/out/mock-public.d.ts +220 -20
- package/out/mock.d.ts +220 -20
- package/out/mock.js +15 -1
- package/package.json +1 -1
package/out/mock-beta.d.ts
CHANGED
|
@@ -1175,17 +1175,30 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
|
|
|
1175
1175
|
* When set to `false` it will disable the same-origin policy for the app.
|
|
1176
1176
|
*/
|
|
1177
1177
|
webSecurity: boolean;
|
|
1178
|
+
/**
|
|
1179
|
+
* Configuration for keyboard commands.
|
|
1180
|
+
* For details and usage, see {@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands Using Keyboard Commands}.
|
|
1181
|
+
*/
|
|
1178
1182
|
commands: ShortcutOverride[];
|
|
1179
1183
|
isPlatformController: boolean;
|
|
1180
1184
|
/**
|
|
1181
1185
|
* @defaultValue 1000
|
|
1182
1186
|
*
|
|
1183
|
-
* Platforms Only.
|
|
1187
|
+
* Platforms Only. The maximum number of "detached" or "pooled" Views that can exist in the Platform before being closed.
|
|
1184
1188
|
* If you do not wish for views to be pooled on your platform, set this property to zero.
|
|
1185
1189
|
*/
|
|
1186
1190
|
maxViewPoolSize: number;
|
|
1191
|
+
/**
|
|
1192
|
+
* Platforms Only. Default window options apply to all platform windows.
|
|
1193
|
+
*/
|
|
1187
1194
|
defaultWindowOptions: Partial<WindowOptions>;
|
|
1195
|
+
/**
|
|
1196
|
+
* Platforms Only. Default view options apply to all platform views.
|
|
1197
|
+
*/
|
|
1188
1198
|
defaultViewOptions: Partial<ViewOptions>;
|
|
1199
|
+
/**
|
|
1200
|
+
* Platforms Only. The snapshot to be applied.
|
|
1201
|
+
*/
|
|
1189
1202
|
snapshot: Snapshot;
|
|
1190
1203
|
/**
|
|
1191
1204
|
* @defaultValue false
|
|
@@ -1195,15 +1208,33 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
|
|
|
1195
1208
|
* If you want a hidden Platform Provider to remain open after the last Platform Window has been closed, set this property to true.
|
|
1196
1209
|
*/
|
|
1197
1210
|
preventQuitOnLastWindowClosed: boolean;
|
|
1211
|
+
/**
|
|
1212
|
+
* Configuration for interop broker.
|
|
1213
|
+
*/
|
|
1198
1214
|
interopBrokerConfiguration: InteropBrokerOptions;
|
|
1215
|
+
/**
|
|
1216
|
+
* @defaultValue true
|
|
1217
|
+
*
|
|
1218
|
+
* When set to `false` it will disable OpenFin Diagnostics for the app.
|
|
1219
|
+
*/
|
|
1199
1220
|
apiDiagnostics: boolean;
|
|
1221
|
+
/**
|
|
1222
|
+
* Define the file download rules.
|
|
1223
|
+
* See [here](https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads) for more details.
|
|
1224
|
+
*/
|
|
1200
1225
|
defaultDomainSettings: DefaultDomainSettings;
|
|
1201
1226
|
/**
|
|
1202
1227
|
* @defaultValue false
|
|
1228
|
+
*
|
|
1203
1229
|
* Enables the use of the Jumplists API and the 'pin to taskbar' functionality.
|
|
1204
1230
|
* Only relevant in Windows.
|
|
1205
1231
|
*/
|
|
1206
1232
|
enableJumpList: boolean;
|
|
1233
|
+
/**
|
|
1234
|
+
* @defaultValue false
|
|
1235
|
+
*
|
|
1236
|
+
* When set to `true`, any `beforeunload` handler set on the app will fire.
|
|
1237
|
+
*/
|
|
1207
1238
|
enableBeforeUnload: boolean;
|
|
1208
1239
|
};
|
|
1209
1240
|
|
|
@@ -1301,7 +1332,7 @@ declare type ApplySnapshotOptions = {
|
|
|
1301
1332
|
*/
|
|
1302
1333
|
declare type ApplySnapshotPayload = {
|
|
1303
1334
|
/**
|
|
1304
|
-
*
|
|
1335
|
+
* The snapshot to be applied.
|
|
1305
1336
|
*/
|
|
1306
1337
|
snapshot: Snapshot;
|
|
1307
1338
|
/**
|
|
@@ -1523,6 +1554,13 @@ declare class Base {
|
|
|
1523
1554
|
/* Excluded from this release type: wire */
|
|
1524
1555
|
/* Excluded from this release type: __constructor */
|
|
1525
1556
|
protected get fin(): OpenFin_2.Fin<OpenFin_2.EntityType>;
|
|
1557
|
+
/**
|
|
1558
|
+
* Provides access to the OpenFin representation of the current code context (usually a document
|
|
1559
|
+
* such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as to the current `Interop` context.
|
|
1560
|
+
*
|
|
1561
|
+
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
|
1562
|
+
* on the context in which the devtools panel was opened.
|
|
1563
|
+
*/
|
|
1526
1564
|
get me(): Identity;
|
|
1527
1565
|
protected isNodeEnvironment: () => boolean;
|
|
1528
1566
|
protected isOpenFinEnvironment: () => boolean;
|
|
@@ -2704,11 +2742,16 @@ declare type ClearCacheOption = {
|
|
|
2704
2742
|
};
|
|
2705
2743
|
|
|
2706
2744
|
/**
|
|
2745
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
2746
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
2747
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
2748
|
+
* these with a "reducer" pattern.
|
|
2749
|
+
*
|
|
2707
2750
|
* @interface
|
|
2708
2751
|
*/
|
|
2709
|
-
declare type ClickedMenuResult<
|
|
2752
|
+
declare type ClickedMenuResult<Data extends unknown = unknown> = {
|
|
2710
2753
|
result: 'clicked';
|
|
2711
|
-
data:
|
|
2754
|
+
data: Data;
|
|
2712
2755
|
};
|
|
2713
2756
|
|
|
2714
2757
|
/**
|
|
@@ -2717,7 +2760,7 @@ declare type ClickedMenuResult<T extends unknown = unknown> = {
|
|
|
2717
2760
|
declare type ClientConnectionPayload = ClientIdentity & ClientInfo;
|
|
2718
2761
|
|
|
2719
2762
|
/**
|
|
2720
|
-
* Identity of a channel client
|
|
2763
|
+
* Identity of a channel client. Includes endpointId to differentiate between different connections for an entity.
|
|
2721
2764
|
* @interface
|
|
2722
2765
|
*/
|
|
2723
2766
|
declare type ClientIdentity = Identity_5 & {
|
|
@@ -3087,6 +3130,11 @@ declare type ConstViewOptions = {
|
|
|
3087
3130
|
zoomLevel: number;
|
|
3088
3131
|
experimental: any;
|
|
3089
3132
|
fdc3InteropApi?: string;
|
|
3133
|
+
/**
|
|
3134
|
+
* @defaultValue false
|
|
3135
|
+
*
|
|
3136
|
+
* When set to `true`, any `beforeunload` handler set on Views will fire.
|
|
3137
|
+
*/
|
|
3090
3138
|
enableBeforeUnload: boolean;
|
|
3091
3139
|
/**
|
|
3092
3140
|
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
|
@@ -3319,15 +3367,12 @@ declare type ContentCreationOptions = {
|
|
|
3319
3367
|
* A rule for creating content in OpenFin; maps a content type to the way in which
|
|
3320
3368
|
* newly-opened content of that type will be handled.
|
|
3321
3369
|
*
|
|
3322
|
-
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
|
3323
|
-
* @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
|
|
3324
|
-
* @property { object } options Window creation options or View creation options.
|
|
3325
3370
|
*
|
|
3326
3371
|
* @interface
|
|
3327
3372
|
*/
|
|
3328
3373
|
declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
|
|
3329
3374
|
/**
|
|
3330
|
-
* Behavior to use when opening matched content.
|
|
3375
|
+
* Behavior to use when opening matched content. The value could be 'view' | 'window' | 'browser' | 'block'.
|
|
3331
3376
|
*/
|
|
3332
3377
|
behavior: T;
|
|
3333
3378
|
/**
|
|
@@ -3419,6 +3464,9 @@ declare type ContextForIntent<MetadataType = any> = Context & {
|
|
|
3419
3464
|
metadata?: MetadataType;
|
|
3420
3465
|
};
|
|
3421
3466
|
|
|
3467
|
+
/**
|
|
3468
|
+
* Information for a Context Group. Contains metadata for displaying the group properly.
|
|
3469
|
+
*/
|
|
3422
3470
|
/**
|
|
3423
3471
|
* @interface
|
|
3424
3472
|
*/
|
|
@@ -3439,6 +3487,9 @@ declare type ContextGroupStates = {
|
|
|
3439
3487
|
};
|
|
3440
3488
|
};
|
|
3441
3489
|
|
|
3490
|
+
/**
|
|
3491
|
+
* Subscription function for addContextHandler.
|
|
3492
|
+
*/
|
|
3442
3493
|
declare type ContextHandler = (context: Context) => void;
|
|
3443
3494
|
|
|
3444
3495
|
/**
|
|
@@ -5160,8 +5211,14 @@ declare type Intent<MetadataType = IntentMetadata> = {
|
|
|
5160
5211
|
metadata?: MetadataType;
|
|
5161
5212
|
};
|
|
5162
5213
|
|
|
5214
|
+
/**
|
|
5215
|
+
* Subscription function for registerIntentHandler.
|
|
5216
|
+
*/
|
|
5163
5217
|
declare type IntentHandler = (intent: Intent) => void;
|
|
5164
5218
|
|
|
5219
|
+
/**
|
|
5220
|
+
* The type used to describe an intent within the platform.
|
|
5221
|
+
*/
|
|
5165
5222
|
/**
|
|
5166
5223
|
* @interface
|
|
5167
5224
|
*/
|
|
@@ -6469,6 +6526,9 @@ declare class InteropClient extends Base {
|
|
|
6469
6526
|
*/
|
|
6470
6527
|
declare type InteropClientOnDisconnectionListener = (InteropBrokerDisconnectionEvent: InteropBrokerDisconnectionEvent) => any;
|
|
6471
6528
|
|
|
6529
|
+
/**
|
|
6530
|
+
* Information relevant to the Interop Broker.
|
|
6531
|
+
*/
|
|
6472
6532
|
/**
|
|
6473
6533
|
* @interface
|
|
6474
6534
|
*/
|
|
@@ -6968,7 +7028,13 @@ declare type LayoutColumn = LayoutItemConfig & {
|
|
|
6968
7028
|
* @interface
|
|
6969
7029
|
*/
|
|
6970
7030
|
declare type LayoutComponent = LayoutItemConfig & {
|
|
7031
|
+
/**
|
|
7032
|
+
* Only a component type will have this property and it should be set to view.
|
|
7033
|
+
*/
|
|
6971
7034
|
componentName: 'view';
|
|
7035
|
+
/**
|
|
7036
|
+
* Only a component type will have this property and it represents the view options of a given component.
|
|
7037
|
+
*/
|
|
6972
7038
|
componentState?: Partial<ViewCreationOptions>;
|
|
6973
7039
|
};
|
|
6974
7040
|
|
|
@@ -7010,7 +7076,7 @@ declare type LayoutInitializedEvent = NamedEvent & {
|
|
|
7010
7076
|
};
|
|
7011
7077
|
|
|
7012
7078
|
/**
|
|
7013
|
-
* Represents the arrangement of Views within a Platform window's Layout.
|
|
7079
|
+
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
|
7014
7080
|
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
|
7015
7081
|
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
|
|
7016
7082
|
*
|
|
@@ -7279,6 +7345,11 @@ declare type LayoutOptions = {
|
|
|
7279
7345
|
* (not to be confused with close button on every tab).
|
|
7280
7346
|
*/
|
|
7281
7347
|
showCloseIcon?: boolean;
|
|
7348
|
+
/**
|
|
7349
|
+
* @defaultValue false
|
|
7350
|
+
*
|
|
7351
|
+
* Limits the area to which tabs can be dragged. If true, stack headers are the only areas where tabs can be dropped.
|
|
7352
|
+
*/
|
|
7282
7353
|
constrainDragToHeaders?: boolean;
|
|
7283
7354
|
/**
|
|
7284
7355
|
* @defaultValue true
|
|
@@ -7307,6 +7378,11 @@ declare type LayoutOptions = {
|
|
|
7307
7378
|
*/
|
|
7308
7379
|
preventDragIn?: boolean;
|
|
7309
7380
|
};
|
|
7381
|
+
/**
|
|
7382
|
+
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
|
7383
|
+
* We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
|
7384
|
+
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
|
|
7385
|
+
*/
|
|
7310
7386
|
content?: LayoutContent;
|
|
7311
7387
|
dimensions?: {
|
|
7312
7388
|
borderWidth?: number;
|
|
@@ -7471,6 +7547,9 @@ declare type ManifestInfo = {
|
|
|
7471
7547
|
* @interface
|
|
7472
7548
|
*/
|
|
7473
7549
|
declare type Margins = {
|
|
7550
|
+
/**
|
|
7551
|
+
* The margin type. If `custom` is chosen, you will also need to specify top, bottom, left, and right.
|
|
7552
|
+
*/
|
|
7474
7553
|
marginType?: 'default' | 'none' | 'printableArea' | 'custom';
|
|
7475
7554
|
/**
|
|
7476
7555
|
* The top margin of the printed webpage, in pixels.
|
|
@@ -7500,20 +7579,36 @@ declare type MaximizedEvent = NamedEvent & {
|
|
|
7500
7579
|
type: 'maximized';
|
|
7501
7580
|
};
|
|
7502
7581
|
|
|
7582
|
+
/**
|
|
7583
|
+
* Type of the OpenFin `me` API handle, which provides access to the OpenFin representation of the current
|
|
7584
|
+
* code context (usually a document such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as
|
|
7585
|
+
* to the current `Interop` context.
|
|
7586
|
+
*
|
|
7587
|
+
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
|
7588
|
+
* on the context in which the devtools panel was opened.
|
|
7589
|
+
*/
|
|
7503
7590
|
declare type Me<MeType extends EntityType_3> = OpenFin_2.EntityInfo & (MeType extends 'view' ? EntityTypeHelpers<'view'> & OpenFin_2.View & WithInterop : MeType extends 'window' ? EntityTypeHelpers<'window'> & OpenFin_2.Window & WithInterop : MeType extends 'iframe' ? EntityTypeHelpers<'iframe'> & OpenFin_2.Frame & WithInterop : MeType extends 'external connection' ? EntityTypeHelpers<'external connection'> & OpenFin_2.ExternalApplication & WithInterop : EntityTypeHelpers<MeType> & WithInterop) & {
|
|
7504
7591
|
isOpenFin: boolean;
|
|
7505
7592
|
};
|
|
7506
7593
|
|
|
7507
7594
|
/**
|
|
7508
7595
|
* @interface
|
|
7596
|
+
*
|
|
7597
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
7598
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
7599
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
7600
|
+
* these with a "reducer" pattern.
|
|
7509
7601
|
*/
|
|
7510
|
-
declare type MenuItemTemplate<
|
|
7602
|
+
declare type MenuItemTemplate<Data extends unknown = unknown> = {
|
|
7511
7603
|
/**
|
|
7512
7604
|
* Can be `normal`, `separator`, `submenu`, or `checkbox`.
|
|
7513
7605
|
* Defaults to 'normal' unless a 'submenu' key exists
|
|
7514
7606
|
*/
|
|
7515
7607
|
type?: 'normal' | 'separator' | 'submenu' | 'checkbox';
|
|
7516
7608
|
role?: 'cut' | 'copy' | 'paste' | 'toggleDevTools' | 'reload';
|
|
7609
|
+
/**
|
|
7610
|
+
* The text to show on the menu item. Should be left undefined for type: 'separator'
|
|
7611
|
+
*/
|
|
7517
7612
|
label?: string;
|
|
7518
7613
|
/**
|
|
7519
7614
|
* If false, the menu item will be greyed out and unclickable.
|
|
@@ -7531,18 +7626,26 @@ declare type MenuItemTemplate<T extends unknown = unknown> = {
|
|
|
7531
7626
|
* Should be specified for `submenu` type menu items. If `submenu` is specified,
|
|
7532
7627
|
* the `type: 'submenu'` can be omitted.
|
|
7533
7628
|
*/
|
|
7534
|
-
submenu?: MenuItemTemplate<
|
|
7629
|
+
submenu?: MenuItemTemplate<Data>[];
|
|
7535
7630
|
/**
|
|
7536
7631
|
* Data to be returned if the user selects the element. Must be serializable
|
|
7537
7632
|
*/
|
|
7538
|
-
data?:
|
|
7633
|
+
data?: Data;
|
|
7539
7634
|
/**
|
|
7540
7635
|
* Image Data URI with image dimensions inferred from the encoded string
|
|
7541
7636
|
*/
|
|
7542
7637
|
icon?: string;
|
|
7543
7638
|
};
|
|
7544
7639
|
|
|
7545
|
-
|
|
7640
|
+
/**
|
|
7641
|
+
* Whether the user clicked on a menu item or the menu was closed (user clicked elsewhere).
|
|
7642
|
+
*
|
|
7643
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
7644
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
7645
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
7646
|
+
* these with a "reducer" pattern.
|
|
7647
|
+
*/
|
|
7648
|
+
declare type MenuResult<Data extends unknown = unknown> = ClickedMenuResult<Data> | ClosedMenuResult;
|
|
7546
7649
|
|
|
7547
7650
|
declare interface Message<T> {
|
|
7548
7651
|
action: string;
|
|
@@ -9243,9 +9346,17 @@ declare type PlatformOptions = ApplicationCreationOptions & {
|
|
|
9243
9346
|
disableDefaultCommands?: boolean;
|
|
9244
9347
|
/**
|
|
9245
9348
|
* Strategy to assign views to process affinity by domain.
|
|
9349
|
+
* * `same` - The views in the same domain will have same renderer processes.
|
|
9350
|
+
* * `different` - The views in the same domain will have their own renderer processes.
|
|
9246
9351
|
*/
|
|
9247
9352
|
viewProcessAffinityStrategy?: ProcessAffinityStrategy;
|
|
9353
|
+
/**
|
|
9354
|
+
* The provider url.
|
|
9355
|
+
*/
|
|
9248
9356
|
providerUrl?: string;
|
|
9357
|
+
/**
|
|
9358
|
+
* The permissions for secured APIs.
|
|
9359
|
+
*/
|
|
9249
9360
|
permissions?: Partial<Permissions_2>;
|
|
9250
9361
|
};
|
|
9251
9362
|
|
|
@@ -10042,9 +10153,21 @@ declare type PrinterInfo = OpenFin_2.PrinterInfo;
|
|
|
10042
10153
|
* @interface
|
|
10043
10154
|
*/
|
|
10044
10155
|
declare type PrinterInfo_2 = {
|
|
10156
|
+
/**
|
|
10157
|
+
* Printer Name
|
|
10158
|
+
*/
|
|
10045
10159
|
name: string;
|
|
10160
|
+
/**
|
|
10161
|
+
* Printer Description
|
|
10162
|
+
*/
|
|
10046
10163
|
description: string;
|
|
10164
|
+
/**
|
|
10165
|
+
* Printer Status
|
|
10166
|
+
*/
|
|
10047
10167
|
status: number;
|
|
10168
|
+
/**
|
|
10169
|
+
* Indicates that system's default printer.
|
|
10170
|
+
*/
|
|
10048
10171
|
isDefault: boolean;
|
|
10049
10172
|
};
|
|
10050
10173
|
|
|
@@ -10056,10 +10179,14 @@ declare type PrinterInfo_2 = {
|
|
|
10056
10179
|
declare type PrintOptions = {
|
|
10057
10180
|
content?: 'self';
|
|
10058
10181
|
/**
|
|
10182
|
+
* @defaultValue false
|
|
10183
|
+
*
|
|
10059
10184
|
* Disables prompting the user for print settings.
|
|
10060
10185
|
*/
|
|
10061
10186
|
silent?: boolean;
|
|
10062
10187
|
/**
|
|
10188
|
+
* @defaultValue false
|
|
10189
|
+
*
|
|
10063
10190
|
* Includes the webpage background color and image when printing.
|
|
10064
10191
|
*/
|
|
10065
10192
|
printBackground?: boolean;
|
|
@@ -10068,6 +10195,8 @@ declare type PrintOptions = {
|
|
|
10068
10195
|
*/
|
|
10069
10196
|
deviceName?: string;
|
|
10070
10197
|
/**
|
|
10198
|
+
* @defaultValue true
|
|
10199
|
+
*
|
|
10071
10200
|
* Prints in full color (greyscale otherwise).
|
|
10072
10201
|
*/
|
|
10073
10202
|
color?: boolean;
|
|
@@ -10076,6 +10205,8 @@ declare type PrintOptions = {
|
|
|
10076
10205
|
*/
|
|
10077
10206
|
margins?: Margins;
|
|
10078
10207
|
/**
|
|
10208
|
+
* @defaultValue true
|
|
10209
|
+
*
|
|
10079
10210
|
* Prints in landscape mode (portrait otherwise).
|
|
10080
10211
|
*/
|
|
10081
10212
|
landscape?: boolean;
|
|
@@ -11005,13 +11136,33 @@ declare type SessionChangedEvent = {
|
|
|
11005
11136
|
reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
|
|
11006
11137
|
};
|
|
11007
11138
|
|
|
11139
|
+
/**
|
|
11140
|
+
* An instance of a SessionContextGroup
|
|
11141
|
+
*/
|
|
11008
11142
|
/**
|
|
11009
11143
|
* @interface
|
|
11010
11144
|
*/
|
|
11011
11145
|
declare type SessionContextGroup = {
|
|
11146
|
+
/**
|
|
11147
|
+
* The SessionContextGroup's id.
|
|
11148
|
+
*/
|
|
11012
11149
|
id: string;
|
|
11150
|
+
/**
|
|
11151
|
+
* A SessionContextGroup instance method for setting a context in the SessionContextGroup.
|
|
11152
|
+
* @param context The Context to be set.
|
|
11153
|
+
*/
|
|
11013
11154
|
setContext: (context: Context) => Promise<void>;
|
|
11155
|
+
/**
|
|
11156
|
+
* A SessionContextGroup instance method for getting the current context of a certain type.
|
|
11157
|
+
* @param type The Context Type to get. If not specified the last contextType set would get used.
|
|
11158
|
+
*/
|
|
11014
11159
|
getCurrentContext: (type?: string) => Promise<Context>;
|
|
11160
|
+
/**
|
|
11161
|
+
* A SessionContextGroup instance method for adding a handler for context change.
|
|
11162
|
+
* @param handler The callback to be invoked. Is invoked when (a) the context changes or (b) immediately after getting created if the context is already set.
|
|
11163
|
+
* @param contextType The context type this handler should listen to. If not specified, a global handler for all context types will get created. Only one global handler is allowed per SessionContextGroup.
|
|
11164
|
+
*
|
|
11165
|
+
*/
|
|
11015
11166
|
addContextHandler: (handler: ContextHandler, contextType?: string) => Promise<{
|
|
11016
11167
|
unsubscribe: () => void;
|
|
11017
11168
|
}>;
|
|
@@ -11039,7 +11190,13 @@ declare type SetWindowContextPayload = {
|
|
|
11039
11190
|
* @interface
|
|
11040
11191
|
*/
|
|
11041
11192
|
declare type SharedWorkerInfo = {
|
|
11193
|
+
/**
|
|
11194
|
+
* The unique id of the shared worker.
|
|
11195
|
+
*/
|
|
11042
11196
|
id: string;
|
|
11197
|
+
/**
|
|
11198
|
+
* The url of the shared worker.
|
|
11199
|
+
*/
|
|
11043
11200
|
url: string;
|
|
11044
11201
|
};
|
|
11045
11202
|
|
|
@@ -11077,11 +11234,27 @@ declare type ShownEvent = BaseViewEvent & {
|
|
|
11077
11234
|
};
|
|
11078
11235
|
|
|
11079
11236
|
/**
|
|
11237
|
+
* Options for showing a popup menu
|
|
11238
|
+
*
|
|
11239
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
11240
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
11241
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
11242
|
+
* these with a "reducer" pattern.
|
|
11243
|
+
*
|
|
11080
11244
|
* @interface
|
|
11081
11245
|
*/
|
|
11082
|
-
declare type ShowPopupMenuOptions<
|
|
11083
|
-
|
|
11246
|
+
declare type ShowPopupMenuOptions<Data extends unknown = unknown> = {
|
|
11247
|
+
/**
|
|
11248
|
+
* An array describing the menu to show.
|
|
11249
|
+
*/
|
|
11250
|
+
template: MenuItemTemplate<Data>[];
|
|
11251
|
+
/**
|
|
11252
|
+
* The window x coordinate where to show the menu. Defaults to mouse position. If using must also use y.
|
|
11253
|
+
*/
|
|
11084
11254
|
x?: number;
|
|
11255
|
+
/**
|
|
11256
|
+
* The window y coordinate where to show the menu. Defaults to mouse position. If using must also use x
|
|
11257
|
+
*/
|
|
11085
11258
|
y?: number;
|
|
11086
11259
|
};
|
|
11087
11260
|
|
|
@@ -11123,6 +11296,9 @@ declare type Size = TransitionBase & {
|
|
|
11123
11296
|
* @interface
|
|
11124
11297
|
*/
|
|
11125
11298
|
declare type Snapshot = {
|
|
11299
|
+
/**
|
|
11300
|
+
* The array of window options objects
|
|
11301
|
+
*/
|
|
11126
11302
|
windows: WindowCreationOptions[];
|
|
11127
11303
|
snapshotDetails?: {
|
|
11128
11304
|
monitorInfo: MonitorInfo;
|
|
@@ -13087,8 +13263,17 @@ declare type Time = {
|
|
|
13087
13263
|
* @interface
|
|
13088
13264
|
*/
|
|
13089
13265
|
declare type Transition = {
|
|
13266
|
+
/**
|
|
13267
|
+
* The Opacity transition
|
|
13268
|
+
*/
|
|
13090
13269
|
opacity?: Opacity;
|
|
13270
|
+
/**
|
|
13271
|
+
* The Position transition
|
|
13272
|
+
*/
|
|
13091
13273
|
position?: Position;
|
|
13274
|
+
/**
|
|
13275
|
+
* The Size transition
|
|
13276
|
+
*/
|
|
13092
13277
|
size?: Size;
|
|
13093
13278
|
};
|
|
13094
13279
|
|
|
@@ -14094,6 +14279,11 @@ declare interface ViewStatuses {
|
|
|
14094
14279
|
* @interface
|
|
14095
14280
|
*/
|
|
14096
14281
|
declare type ViewVisibilityOption = {
|
|
14282
|
+
/**
|
|
14283
|
+
* @defaultValue false
|
|
14284
|
+
*
|
|
14285
|
+
* Enables or disables showing views when the layout splitter or a tab is being dragged.
|
|
14286
|
+
*/
|
|
14097
14287
|
enabled?: boolean;
|
|
14098
14288
|
};
|
|
14099
14289
|
|
|
@@ -14123,8 +14313,12 @@ declare type WebContent = View_2 | _Window;
|
|
|
14123
14313
|
|
|
14124
14314
|
declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
|
|
14125
14315
|
identity: OpenFin_2.Identity;
|
|
14126
|
-
entityType:
|
|
14127
|
-
|
|
14316
|
+
entityType: 'window' | 'view';
|
|
14317
|
+
/**
|
|
14318
|
+
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
14319
|
+
* @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
|
|
14320
|
+
*/
|
|
14321
|
+
constructor(wire: Transport, identity: OpenFin_2.Identity, entityType: 'window' | 'view');
|
|
14128
14322
|
/**
|
|
14129
14323
|
* Gets a base64 encoded image of all or part of the WebContents.
|
|
14130
14324
|
* @param options Options for the capturePage call.
|
|
@@ -16453,7 +16647,10 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
16453
16647
|
* Calling this method will close previously opened menus.
|
|
16454
16648
|
* @experimental
|
|
16455
16649
|
* @param options
|
|
16456
|
-
*
|
|
16650
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
|
16651
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
|
16652
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
|
16653
|
+
* these with a "reducer" pattern.
|
|
16457
16654
|
* @example
|
|
16458
16655
|
* This could be used to show a drop down menu over views in a platform window:
|
|
16459
16656
|
* ```js
|
|
@@ -16520,7 +16717,7 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
16520
16717
|
* })
|
|
16521
16718
|
* ```
|
|
16522
16719
|
*/
|
|
16523
|
-
showPopupMenu<
|
|
16720
|
+
showPopupMenu<Data>(options: OpenFin_2.ShowPopupMenuOptions<Data>): Promise<OpenFin_2.MenuResult<Data>>;
|
|
16524
16721
|
/**
|
|
16525
16722
|
* Closes the window's popup menu, if one exists.
|
|
16526
16723
|
* @experimental
|
|
@@ -17049,6 +17246,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
|
|
|
17049
17246
|
* @interface
|
|
17050
17247
|
*/
|
|
17051
17248
|
declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
|
|
17249
|
+
/**
|
|
17250
|
+
* Data to be written
|
|
17251
|
+
*/
|
|
17052
17252
|
data: {
|
|
17053
17253
|
text?: string;
|
|
17054
17254
|
html?: string;
|