@openfin/node-adapter 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/node-adapter-alpha.d.ts +220 -20
- package/out/node-adapter-beta.d.ts +220 -20
- package/out/node-adapter-public.d.ts +220 -20
- package/out/node-adapter.d.ts +220 -20
- package/out/node-adapter.js +15 -1
- package/package.json +1 -1
@@ -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.Fin<OpenFin.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 & {
|
@@ -3091,6 +3134,11 @@ declare type ConstViewOptions = {
|
|
3091
3134
|
zoomLevel: number;
|
3092
3135
|
experimental: any;
|
3093
3136
|
fdc3InteropApi?: string;
|
3137
|
+
/**
|
3138
|
+
* @defaultValue false
|
3139
|
+
*
|
3140
|
+
* When set to `true`, any `beforeunload` handler set on Views will fire.
|
3141
|
+
*/
|
3094
3142
|
enableBeforeUnload: boolean;
|
3095
3143
|
/**
|
3096
3144
|
* Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
|
@@ -3323,15 +3371,12 @@ declare type ContentCreationOptions = {
|
|
3323
3371
|
* A rule for creating content in OpenFin; maps a content type to the way in which
|
3324
3372
|
* newly-opened content of that type will be handled.
|
3325
3373
|
*
|
3326
|
-
* @property { string } behavior 'view' | 'window' | 'browser' | 'block'
|
3327
|
-
* @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
|
3328
|
-
* @property { object } options Window creation options or View creation options.
|
3329
3374
|
*
|
3330
3375
|
* @interface
|
3331
3376
|
*/
|
3332
3377
|
declare type ContentCreationRule<T = ContentCreationBehaviorNames> = {
|
3333
3378
|
/**
|
3334
|
-
* Behavior to use when opening matched content.
|
3379
|
+
* Behavior to use when opening matched content. The value could be 'view' | 'window' | 'browser' | 'block'.
|
3335
3380
|
*/
|
3336
3381
|
behavior: T;
|
3337
3382
|
/**
|
@@ -3423,6 +3468,9 @@ declare type ContextForIntent<MetadataType = any> = Context & {
|
|
3423
3468
|
metadata?: MetadataType;
|
3424
3469
|
};
|
3425
3470
|
|
3471
|
+
/**
|
3472
|
+
* Information for a Context Group. Contains metadata for displaying the group properly.
|
3473
|
+
*/
|
3426
3474
|
/**
|
3427
3475
|
* @interface
|
3428
3476
|
*/
|
@@ -3443,6 +3491,9 @@ declare type ContextGroupStates = {
|
|
3443
3491
|
};
|
3444
3492
|
};
|
3445
3493
|
|
3494
|
+
/**
|
3495
|
+
* Subscription function for addContextHandler.
|
3496
|
+
*/
|
3446
3497
|
declare type ContextHandler = (context: Context) => void;
|
3447
3498
|
|
3448
3499
|
/**
|
@@ -5168,8 +5219,14 @@ declare type Intent<MetadataType = IntentMetadata> = {
|
|
5168
5219
|
metadata?: MetadataType;
|
5169
5220
|
};
|
5170
5221
|
|
5222
|
+
/**
|
5223
|
+
* Subscription function for registerIntentHandler.
|
5224
|
+
*/
|
5171
5225
|
declare type IntentHandler = (intent: Intent) => void;
|
5172
5226
|
|
5227
|
+
/**
|
5228
|
+
* The type used to describe an intent within the platform.
|
5229
|
+
*/
|
5173
5230
|
/**
|
5174
5231
|
* @interface
|
5175
5232
|
*/
|
@@ -6477,6 +6534,9 @@ declare class InteropClient extends Base {
|
|
6477
6534
|
*/
|
6478
6535
|
declare type InteropClientOnDisconnectionListener = (InteropBrokerDisconnectionEvent: InteropBrokerDisconnectionEvent) => any;
|
6479
6536
|
|
6537
|
+
/**
|
6538
|
+
* Information relevant to the Interop Broker.
|
6539
|
+
*/
|
6480
6540
|
/**
|
6481
6541
|
* @interface
|
6482
6542
|
*/
|
@@ -6978,7 +7038,13 @@ declare type LayoutColumn = LayoutItemConfig & {
|
|
6978
7038
|
* @interface
|
6979
7039
|
*/
|
6980
7040
|
declare type LayoutComponent = LayoutItemConfig & {
|
7041
|
+
/**
|
7042
|
+
* Only a component type will have this property and it should be set to view.
|
7043
|
+
*/
|
6981
7044
|
componentName: 'view';
|
7045
|
+
/**
|
7046
|
+
* Only a component type will have this property and it represents the view options of a given component.
|
7047
|
+
*/
|
6982
7048
|
componentState?: Partial<ViewCreationOptions>;
|
6983
7049
|
};
|
6984
7050
|
|
@@ -7020,7 +7086,7 @@ declare type LayoutInitializedEvent = NamedEvent & {
|
|
7020
7086
|
};
|
7021
7087
|
|
7022
7088
|
/**
|
7023
|
-
* Represents the arrangement of Views within a Platform window's Layout.
|
7089
|
+
* Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
|
7024
7090
|
* to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
7025
7091
|
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
|
7026
7092
|
*
|
@@ -7289,6 +7355,11 @@ declare type LayoutOptions = {
|
|
7289
7355
|
* (not to be confused with close button on every tab).
|
7290
7356
|
*/
|
7291
7357
|
showCloseIcon?: boolean;
|
7358
|
+
/**
|
7359
|
+
* @defaultValue false
|
7360
|
+
*
|
7361
|
+
* Limits the area to which tabs can be dragged. If true, stack headers are the only areas where tabs can be dropped.
|
7362
|
+
*/
|
7292
7363
|
constrainDragToHeaders?: boolean;
|
7293
7364
|
/**
|
7294
7365
|
* @defaultValue true
|
@@ -7317,6 +7388,11 @@ declare type LayoutOptions = {
|
|
7317
7388
|
*/
|
7318
7389
|
preventDragIn?: boolean;
|
7319
7390
|
};
|
7391
|
+
/**
|
7392
|
+
* Content of the layout. There can only be one top-level LayoutItem in the content array.
|
7393
|
+
* We do not recommend trying to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot} or our
|
7394
|
+
* {@link https://openfin.github.io/golden-prototype/config-gen Layout Config Generation Tool }.
|
7395
|
+
*/
|
7320
7396
|
content?: LayoutContent;
|
7321
7397
|
dimensions?: {
|
7322
7398
|
borderWidth?: number;
|
@@ -7481,6 +7557,9 @@ declare type ManifestInfo = {
|
|
7481
7557
|
* @interface
|
7482
7558
|
*/
|
7483
7559
|
declare type Margins = {
|
7560
|
+
/**
|
7561
|
+
* The margin type. If `custom` is chosen, you will also need to specify top, bottom, left, and right.
|
7562
|
+
*/
|
7484
7563
|
marginType?: 'default' | 'none' | 'printableArea' | 'custom';
|
7485
7564
|
/**
|
7486
7565
|
* The top margin of the printed webpage, in pixels.
|
@@ -7510,20 +7589,36 @@ declare type MaximizedEvent = NamedEvent & {
|
|
7510
7589
|
type: 'maximized';
|
7511
7590
|
};
|
7512
7591
|
|
7592
|
+
/**
|
7593
|
+
* Type of the OpenFin `me` API handle, which provides access to the OpenFin representation of the current
|
7594
|
+
* code context (usually a document such as a {@link OpenFin.View} or {@link OpenFin.Window}), as well as
|
7595
|
+
* to the current `Interop` context.
|
7596
|
+
*
|
7597
|
+
* Useful for debugging in the devtools console, where this will intelligently type itself based
|
7598
|
+
* on the context in which the devtools panel was opened.
|
7599
|
+
*/
|
7513
7600
|
declare type Me<MeType extends EntityType_3> = OpenFin.EntityInfo & (MeType extends 'view' ? EntityTypeHelpers<'view'> & OpenFin.View & WithInterop : MeType extends 'window' ? EntityTypeHelpers<'window'> & OpenFin.Window & WithInterop : MeType extends 'iframe' ? EntityTypeHelpers<'iframe'> & OpenFin.Frame & WithInterop : MeType extends 'external connection' ? EntityTypeHelpers<'external connection'> & OpenFin.ExternalApplication & WithInterop : EntityTypeHelpers<MeType> & WithInterop) & {
|
7514
7601
|
isOpenFin: boolean;
|
7515
7602
|
};
|
7516
7603
|
|
7517
7604
|
/**
|
7518
7605
|
* @interface
|
7606
|
+
*
|
7607
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
7608
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
7609
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
7610
|
+
* these with a "reducer" pattern.
|
7519
7611
|
*/
|
7520
|
-
declare type MenuItemTemplate<
|
7612
|
+
declare type MenuItemTemplate<Data extends unknown = unknown> = {
|
7521
7613
|
/**
|
7522
7614
|
* Can be `normal`, `separator`, `submenu`, or `checkbox`.
|
7523
7615
|
* Defaults to 'normal' unless a 'submenu' key exists
|
7524
7616
|
*/
|
7525
7617
|
type?: 'normal' | 'separator' | 'submenu' | 'checkbox';
|
7526
7618
|
role?: 'cut' | 'copy' | 'paste' | 'toggleDevTools' | 'reload';
|
7619
|
+
/**
|
7620
|
+
* The text to show on the menu item. Should be left undefined for type: 'separator'
|
7621
|
+
*/
|
7527
7622
|
label?: string;
|
7528
7623
|
/**
|
7529
7624
|
* If false, the menu item will be greyed out and unclickable.
|
@@ -7541,18 +7636,26 @@ declare type MenuItemTemplate<T extends unknown = unknown> = {
|
|
7541
7636
|
* Should be specified for `submenu` type menu items. If `submenu` is specified,
|
7542
7637
|
* the `type: 'submenu'` can be omitted.
|
7543
7638
|
*/
|
7544
|
-
submenu?: MenuItemTemplate<
|
7639
|
+
submenu?: MenuItemTemplate<Data>[];
|
7545
7640
|
/**
|
7546
7641
|
* Data to be returned if the user selects the element. Must be serializable
|
7547
7642
|
*/
|
7548
|
-
data?:
|
7643
|
+
data?: Data;
|
7549
7644
|
/**
|
7550
7645
|
* Image Data URI with image dimensions inferred from the encoded string
|
7551
7646
|
*/
|
7552
7647
|
icon?: string;
|
7553
7648
|
};
|
7554
7649
|
|
7555
|
-
|
7650
|
+
/**
|
7651
|
+
* Whether the user clicked on a menu item or the menu was closed (user clicked elsewhere).
|
7652
|
+
*
|
7653
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
7654
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
7655
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
7656
|
+
* these with a "reducer" pattern.
|
7657
|
+
*/
|
7658
|
+
declare type MenuResult<Data extends unknown = unknown> = ClickedMenuResult<Data> | ClosedMenuResult;
|
7556
7659
|
|
7557
7660
|
declare interface Message<T> {
|
7558
7661
|
action: string;
|
@@ -9253,9 +9356,17 @@ declare type PlatformOptions = ApplicationCreationOptions & {
|
|
9253
9356
|
disableDefaultCommands?: boolean;
|
9254
9357
|
/**
|
9255
9358
|
* Strategy to assign views to process affinity by domain.
|
9359
|
+
* * `same` - The views in the same domain will have same renderer processes.
|
9360
|
+
* * `different` - The views in the same domain will have their own renderer processes.
|
9256
9361
|
*/
|
9257
9362
|
viewProcessAffinityStrategy?: ProcessAffinityStrategy;
|
9363
|
+
/**
|
9364
|
+
* The provider url.
|
9365
|
+
*/
|
9258
9366
|
providerUrl?: string;
|
9367
|
+
/**
|
9368
|
+
* The permissions for secured APIs.
|
9369
|
+
*/
|
9259
9370
|
permissions?: Partial<Permissions_2>;
|
9260
9371
|
};
|
9261
9372
|
|
@@ -10052,9 +10163,21 @@ declare type PrinterInfo = OpenFin.PrinterInfo;
|
|
10052
10163
|
* @interface
|
10053
10164
|
*/
|
10054
10165
|
declare type PrinterInfo_2 = {
|
10166
|
+
/**
|
10167
|
+
* Printer Name
|
10168
|
+
*/
|
10055
10169
|
name: string;
|
10170
|
+
/**
|
10171
|
+
* Printer Description
|
10172
|
+
*/
|
10056
10173
|
description: string;
|
10174
|
+
/**
|
10175
|
+
* Printer Status
|
10176
|
+
*/
|
10057
10177
|
status: number;
|
10178
|
+
/**
|
10179
|
+
* Indicates that system's default printer.
|
10180
|
+
*/
|
10058
10181
|
isDefault: boolean;
|
10059
10182
|
};
|
10060
10183
|
|
@@ -10066,10 +10189,14 @@ declare type PrinterInfo_2 = {
|
|
10066
10189
|
declare type PrintOptions = {
|
10067
10190
|
content?: 'self';
|
10068
10191
|
/**
|
10192
|
+
* @defaultValue false
|
10193
|
+
*
|
10069
10194
|
* Disables prompting the user for print settings.
|
10070
10195
|
*/
|
10071
10196
|
silent?: boolean;
|
10072
10197
|
/**
|
10198
|
+
* @defaultValue false
|
10199
|
+
*
|
10073
10200
|
* Includes the webpage background color and image when printing.
|
10074
10201
|
*/
|
10075
10202
|
printBackground?: boolean;
|
@@ -10078,6 +10205,8 @@ declare type PrintOptions = {
|
|
10078
10205
|
*/
|
10079
10206
|
deviceName?: string;
|
10080
10207
|
/**
|
10208
|
+
* @defaultValue true
|
10209
|
+
*
|
10081
10210
|
* Prints in full color (greyscale otherwise).
|
10082
10211
|
*/
|
10083
10212
|
color?: boolean;
|
@@ -10086,6 +10215,8 @@ declare type PrintOptions = {
|
|
10086
10215
|
*/
|
10087
10216
|
margins?: Margins;
|
10088
10217
|
/**
|
10218
|
+
* @defaultValue true
|
10219
|
+
*
|
10089
10220
|
* Prints in landscape mode (portrait otherwise).
|
10090
10221
|
*/
|
10091
10222
|
landscape?: boolean;
|
@@ -11015,13 +11146,33 @@ declare type SessionChangedEvent = {
|
|
11015
11146
|
reason: 'lock' | 'unlock' | 'remote-connect' | 'remote-disconnect' | 'unknown';
|
11016
11147
|
};
|
11017
11148
|
|
11149
|
+
/**
|
11150
|
+
* An instance of a SessionContextGroup
|
11151
|
+
*/
|
11018
11152
|
/**
|
11019
11153
|
* @interface
|
11020
11154
|
*/
|
11021
11155
|
declare type SessionContextGroup = {
|
11156
|
+
/**
|
11157
|
+
* The SessionContextGroup's id.
|
11158
|
+
*/
|
11022
11159
|
id: string;
|
11160
|
+
/**
|
11161
|
+
* A SessionContextGroup instance method for setting a context in the SessionContextGroup.
|
11162
|
+
* @param context The Context to be set.
|
11163
|
+
*/
|
11023
11164
|
setContext: (context: Context) => Promise<void>;
|
11165
|
+
/**
|
11166
|
+
* A SessionContextGroup instance method for getting the current context of a certain type.
|
11167
|
+
* @param type The Context Type to get. If not specified the last contextType set would get used.
|
11168
|
+
*/
|
11024
11169
|
getCurrentContext: (type?: string) => Promise<Context>;
|
11170
|
+
/**
|
11171
|
+
* A SessionContextGroup instance method for adding a handler for context change.
|
11172
|
+
* @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.
|
11173
|
+
* @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.
|
11174
|
+
*
|
11175
|
+
*/
|
11025
11176
|
addContextHandler: (handler: ContextHandler, contextType?: string) => Promise<{
|
11026
11177
|
unsubscribe: () => void;
|
11027
11178
|
}>;
|
@@ -11049,7 +11200,13 @@ declare type SetWindowContextPayload = {
|
|
11049
11200
|
* @interface
|
11050
11201
|
*/
|
11051
11202
|
declare type SharedWorkerInfo = {
|
11203
|
+
/**
|
11204
|
+
* The unique id of the shared worker.
|
11205
|
+
*/
|
11052
11206
|
id: string;
|
11207
|
+
/**
|
11208
|
+
* The url of the shared worker.
|
11209
|
+
*/
|
11053
11210
|
url: string;
|
11054
11211
|
};
|
11055
11212
|
|
@@ -11087,11 +11244,27 @@ declare type ShownEvent = BaseViewEvent & {
|
|
11087
11244
|
};
|
11088
11245
|
|
11089
11246
|
/**
|
11247
|
+
* Options for showing a popup menu
|
11248
|
+
*
|
11249
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
11250
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
11251
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
11252
|
+
* these with a "reducer" pattern.
|
11253
|
+
*
|
11090
11254
|
* @interface
|
11091
11255
|
*/
|
11092
|
-
declare type ShowPopupMenuOptions<
|
11093
|
-
|
11256
|
+
declare type ShowPopupMenuOptions<Data extends unknown = unknown> = {
|
11257
|
+
/**
|
11258
|
+
* An array describing the menu to show.
|
11259
|
+
*/
|
11260
|
+
template: MenuItemTemplate<Data>[];
|
11261
|
+
/**
|
11262
|
+
* The window x coordinate where to show the menu. Defaults to mouse position. If using must also use y.
|
11263
|
+
*/
|
11094
11264
|
x?: number;
|
11265
|
+
/**
|
11266
|
+
* The window y coordinate where to show the menu. Defaults to mouse position. If using must also use x
|
11267
|
+
*/
|
11095
11268
|
y?: number;
|
11096
11269
|
};
|
11097
11270
|
|
@@ -11133,6 +11306,9 @@ declare type Size = TransitionBase & {
|
|
11133
11306
|
* @interface
|
11134
11307
|
*/
|
11135
11308
|
declare type Snapshot = {
|
11309
|
+
/**
|
11310
|
+
* The array of window options objects
|
11311
|
+
*/
|
11136
11312
|
windows: WindowCreationOptions[];
|
11137
11313
|
snapshotDetails?: {
|
11138
11314
|
monitorInfo: MonitorInfo;
|
@@ -13097,8 +13273,17 @@ declare type Time = {
|
|
13097
13273
|
* @interface
|
13098
13274
|
*/
|
13099
13275
|
declare type Transition = {
|
13276
|
+
/**
|
13277
|
+
* The Opacity transition
|
13278
|
+
*/
|
13100
13279
|
opacity?: Opacity;
|
13280
|
+
/**
|
13281
|
+
* The Position transition
|
13282
|
+
*/
|
13101
13283
|
position?: Position;
|
13284
|
+
/**
|
13285
|
+
* The Size transition
|
13286
|
+
*/
|
13102
13287
|
size?: Size;
|
13103
13288
|
};
|
13104
13289
|
|
@@ -14104,6 +14289,11 @@ declare interface ViewStatuses {
|
|
14104
14289
|
* @interface
|
14105
14290
|
*/
|
14106
14291
|
declare type ViewVisibilityOption = {
|
14292
|
+
/**
|
14293
|
+
* @defaultValue false
|
14294
|
+
*
|
14295
|
+
* Enables or disables showing views when the layout splitter or a tab is being dragged.
|
14296
|
+
*/
|
14107
14297
|
enabled?: boolean;
|
14108
14298
|
};
|
14109
14299
|
|
@@ -14133,8 +14323,12 @@ declare type WebContent = View_2 | _Window;
|
|
14133
14323
|
|
14134
14324
|
declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
|
14135
14325
|
identity: OpenFin.Identity;
|
14136
|
-
entityType:
|
14137
|
-
|
14326
|
+
entityType: 'window' | 'view';
|
14327
|
+
/**
|
14328
|
+
* @param identity The identity of the {@link OpenFin.WebContentsEvents WebContents}.
|
14329
|
+
* @param entityType The type of the {@link OpenFin.WebContentsEvents WebContents}.
|
14330
|
+
*/
|
14331
|
+
constructor(wire: Transport, identity: OpenFin.Identity, entityType: 'window' | 'view');
|
14138
14332
|
/**
|
14139
14333
|
* Gets a base64 encoded image of all or part of the WebContents.
|
14140
14334
|
* @param options Options for the capturePage call.
|
@@ -16463,7 +16657,10 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
16463
16657
|
* Calling this method will close previously opened menus.
|
16464
16658
|
* @experimental
|
16465
16659
|
* @param options
|
16466
|
-
*
|
16660
|
+
* @typeParam Data User-defined shape for data returned upon menu item click. Should be a
|
16661
|
+
* [union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types)
|
16662
|
+
* of all possible data shapes for the entire menu, and the click handler should process
|
16663
|
+
* these with a "reducer" pattern.
|
16467
16664
|
* @example
|
16468
16665
|
* This could be used to show a drop down menu over views in a platform window:
|
16469
16666
|
* ```js
|
@@ -16530,7 +16727,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
16530
16727
|
* })
|
16531
16728
|
* ```
|
16532
16729
|
*/
|
16533
|
-
showPopupMenu<
|
16730
|
+
showPopupMenu<Data>(options: OpenFin.ShowPopupMenuOptions<Data>): Promise<OpenFin.MenuResult<Data>>;
|
16534
16731
|
/**
|
16535
16732
|
* Closes the window's popup menu, if one exists.
|
16536
16733
|
* @experimental
|
@@ -17059,6 +17256,9 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
|
|
17059
17256
|
* @interface
|
17060
17257
|
*/
|
17061
17258
|
declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
|
17259
|
+
/**
|
17260
|
+
* Data to be written
|
17261
|
+
*/
|
17062
17262
|
data: {
|
17063
17263
|
text?: string;
|
17064
17264
|
html?: string;
|