@openfin/core 35.78.2 → 35.78.3

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.
@@ -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 & {
@@ -94,6 +96,10 @@ declare type Api = {
94
96
  sameOriginInjection?: boolean;
95
97
  enableDeprecatedSharedName?: boolean;
96
98
  };
99
+ /**
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
+ */
102
+ fin?: InjectionType;
97
103
  };
98
104
 
99
105
  declare type ApiCall<Request, Response> = {
@@ -105,6 +111,13 @@ declare type ApiClient<T extends Record<any, any>> = {
105
111
  [key in keyof PickOfType<T, Function>]: (...args: Parameters<T[key]>) => ReturnType<T[key]> extends Promise<any> ? ReturnType<T[key]> : Promise<ReturnType<T[key]>>;
106
112
  };
107
113
 
114
+ /**
115
+ * @interface
116
+ */
117
+ declare type ApiInjection = {
118
+ fin: InjectionType;
119
+ };
120
+
108
121
  /**
109
122
  * Generated when a new Platform's API becomes responsive.
110
123
  * @interface
@@ -187,100 +200,6 @@ declare class Application extends EmitterBase<OpenFin_2.ApplicationEvent> {
187
200
  private window;
188
201
  /* Excluded from this release type: __constructor */
189
202
  private windowListFromIdentityList;
190
- /**
191
- * Adds a listener to the end of the listeners array for the specified event.
192
- * @param eventType - The type of the event.
193
- * @param listener - Called whenever an event of the specified type occurs.
194
- * @param options - Option to support event timestamps.
195
- *
196
- * @function addListener
197
- * @memberof Application
198
- * @instance
199
- * @tutorial Application.EventEmitter
200
- */
201
- /**
202
- * Adds a listener to the end of the listeners array for the specified event.
203
- * @param eventType - The type of the event.
204
- * @param listener - Called whenever an event of the specified type occurs.
205
- * @param options - Option to support event timestamps.
206
- *
207
- * @function on
208
- * @memberof Application
209
- * @instance
210
- * @tutorial Application.EventEmitter
211
- */
212
- /**
213
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
214
- * @param eventType - The type of the event.
215
- * @param listener - The callback function.
216
- * @param options - Option to support event timestamps.
217
- *
218
- * @function once
219
- * @memberof Application
220
- * @instance
221
- * @tutorial Application.EventEmitter
222
- */
223
- /**
224
- * Adds a listener to the beginning of the listeners array for the specified event.
225
- * @param eventType - The type of the event.
226
- * @param listener - The callback function.
227
- * @param options - Option to support event timestamps.
228
- *
229
- * @function prependListener
230
- * @memberof Application
231
- * @instance
232
- * @tutorial Application.EventEmitter
233
- */
234
- /**
235
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
236
- * The listener is added to the beginning of the listeners array.
237
- * @param eventType - The type of the event.
238
- * @param listener - The callback function.
239
- * @param options - Option to support event timestamps.
240
- *
241
- * @function prependOnceListener
242
- * @memberof Application
243
- * @instance
244
- * @tutorial Application.EventEmitter
245
- */
246
- /**
247
- * Remove a listener from the listener array for the specified event.
248
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
249
- * @param eventType - The type of the event.
250
- * @param listener - The callback function.
251
- * @param options - Option to support event timestamps.
252
- *
253
- * @function removeListener
254
- * @memberof Application
255
- * @instance
256
- * @tutorial Application.EventEmitter
257
- */
258
- /**
259
- * Removes all listeners, or those of the specified event.
260
- * @param eventType - The type of the event.
261
- *
262
- * @function removeAllListeners
263
- * @memberof Application
264
- * @instance
265
- * @tutorial Application.EventEmitter
266
- */
267
- /**
268
- * JumpListCategory interface
269
- * @typedef { object } JumpListCategory@typedef { object } JumpListCategory
270
- * @property { string } name The display title for the category. If omitted, items in this category will be placed into the standard 'Tasks' category. There can be only one such category, and it will always be displayed at the bottom of the JumpList.
271
- * @property { JumpListItem[] } items Array of JumpListItem objects
272
- */
273
- /**
274
- * @PORTED
275
- * JumpListItem interface
276
- * @typedef { object } JumpListItem@typedef { object } JumpListItem
277
- * @property { string } type One of the following: "task" or "separator". Defaults to task.
278
- * @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
279
- * @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
280
- * @property { string } deepLink Deep link to a manifest, i.e: fins://path.to/manifest.json?$$param1=value1. See {@link https://developers.openfin.co/docs/deep-linking deep-linking} for more information.
281
- * @property { string } iconPath The absolute path to an icon to be displayed for the item, which can be an arbitrary resource file that contains an icon (e.g. .ico, .exe, .dll).
282
- * @property { number } iconIndex The index of the icon in the resource file. If a resource file contains multiple icons this value can be used to specify the zero-based index of the icon that should be displayed for this task. If a resource file contains only one icon, this property should be set to zero.
283
- */
284
203
  /**
285
204
  * Determines if the application is currently running.
286
205
  *
@@ -918,7 +837,6 @@ declare namespace ApplicationEvents {
918
837
  WindowRespondingEvent,
919
838
  WindowStartLoadEvent,
920
839
  ApplicationWindowEvent,
921
- ApplicationWindowEventTypes,
922
840
  ClosedEvent,
923
841
  ConnectedEvent_2 as ConnectedEvent,
924
842
  ApplicationConnectedEvent,
@@ -928,6 +846,7 @@ declare namespace ApplicationEvents {
928
846
  RespondingEvent,
929
847
  StartedEvent,
930
848
  ApplicationSourcedEvent,
849
+ ApplicationSourcedEventType,
931
850
  Event_3 as Event,
932
851
  ApplicationEvent,
933
852
  EventType_3 as EventType,
@@ -1266,10 +1185,13 @@ declare type ApplicationOptions = LegacyWinOptionsInAppOptions & {
1266
1185
  */
1267
1186
  apiDiagnostics: boolean;
1268
1187
  /**
1269
- * Define the file download rules.
1270
- * See [here](https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads) for more details.
1188
+ * @deprecated Please use {@link domainSettings} instead
1271
1189
  */
1272
1190
  defaultDomainSettings: DefaultDomainSettings;
1191
+ /**
1192
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
1193
+ */
1194
+ domainSettings: DomainSettings;
1273
1195
  /**
1274
1196
  * @defaultValue false
1275
1197
  *
@@ -1300,6 +1222,11 @@ declare type ApplicationPermissions = {
1300
1222
  */
1301
1223
  declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1302
1224
 
1225
+ /**
1226
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1227
+ */
1228
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1229
+
1303
1230
  declare type ApplicationState = OpenFin_2.ApplicationState;
1304
1231
 
1305
1232
  /**
@@ -1337,11 +1264,6 @@ declare type ApplicationType = {
1337
1264
  */
1338
1265
  declare type ApplicationWindowEvent = WindowAlertRequestedEvent | WindowCreatedEvent | WindowEndLoadEvent | WindowNotRespondingEvent | WindowRespondingEvent | WindowStartLoadEvent;
1339
1266
 
1340
- /**
1341
- * Array of valid `type` values for an {@link ApplicationWindowEvent}.
1342
- */
1343
- declare const ApplicationWindowEventTypes: readonly ["window-alert-requested", "window-created", "window-end-load", "window-not-responding", "window-responding", "window-start-load"];
1344
-
1345
1267
  declare type ApplicationWindowInfo = OpenFin_2.ApplicationWindowInfo;
1346
1268
 
1347
1269
  /**
@@ -3108,20 +3030,6 @@ declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
3108
3030
  connectionUrl: string;
3109
3031
  };
3110
3032
 
3111
- /**
3112
- * @PORTED
3113
- * WriteRequestType interface
3114
- * @typedef { object } WriteRequestType@typedef { object } WriteRequestType
3115
- * @property { string } data Data to be written
3116
- * @property { string } [type] Clipboard Type
3117
- */
3118
- /**
3119
- * @PORTED
3120
- * OpenFin.WriteAnyClipboardRequest interface
3121
- * @typedef { object } OpenFin.WriteAnyClipboardRequest@typedef { object } OpenFin.WriteAnyClipboardRequest
3122
- * @property { string } data Data to be written
3123
- * @property { OpenFin.ClipboardSelectionType } [type] Clipboard Type defaults to 'clipboard', use 'selection' for linux
3124
- */
3125
3033
  /**
3126
3034
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
3127
3035
  *
@@ -3494,6 +3402,10 @@ declare type ConstructorOverride<T> = (Base: Constructor<T>) => Constructor<T>;
3494
3402
  * @interface
3495
3403
  */
3496
3404
  declare type ConstViewOptions = {
3405
+ /**
3406
+ * Configurations for API injection.
3407
+ */
3408
+ api: Api;
3497
3409
  /**
3498
3410
  * The name of the view.
3499
3411
  */
@@ -3574,9 +3486,13 @@ declare type ConstViewOptions = {
3574
3486
  /**
3575
3487
  * Controls interaction of the view with its parent window's download shelf.
3576
3488
  */
3577
- downloadShelf?: {
3489
+ downloadShelf: {
3578
3490
  /**
3579
- * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow
3491
+ * Whether downloads in this view trigger opening the download shelf on its parent BrowserWindow.
3492
+ *
3493
+ * @remarks If `enabled: true`, downloads from this view will cause the download shelf to display
3494
+ * on the parent window even if that parent window's {@link DownloadShelfOptions} specify
3495
+ * `enabled: false`.
3580
3496
  */
3581
3497
  enabled: boolean;
3582
3498
  };
@@ -3642,7 +3558,7 @@ declare type ConstWindowOptions = {
3642
3558
  /**
3643
3559
  * @defaultValue true
3644
3560
  *
3645
- * Toggling off would keep the Window alive even if all its Views were closed.
3561
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3646
3562
  * This is meant for advanced users and should be used with caution.
3647
3563
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3648
3564
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3652,7 +3568,8 @@ declare type ConstWindowOptions = {
3652
3568
  /**
3653
3569
  * @defaultValue 'all'
3654
3570
  *
3655
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3571
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3572
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3656
3573
  * **NOTE:** - This option is ignored in non-Platforms apps.
3657
3574
  */
3658
3575
  viewsPreventingClose: 'all' | 'layout';
@@ -3691,6 +3608,12 @@ declare type ConstWindowOptions = {
3691
3608
  * launches in favor of the cached value.
3692
3609
  */
3693
3610
  defaultWidth: number;
3611
+ /**
3612
+ * Controls the styling and behavior of the window download shelf.
3613
+ *
3614
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
3615
+ * triggered by the window itself, or a view targeting the window.
3616
+ */
3694
3617
  downloadShelf: DownloadShelfOptions;
3695
3618
  height: number;
3696
3619
  layout: any;
@@ -4459,7 +4382,7 @@ declare type CreateViewPayload = {
4459
4382
  /**
4460
4383
  * @interface
4461
4384
  */
4462
- declare type CreateViewTarget = LayoutIdentity & {
4385
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4463
4386
  /**
4464
4387
  * If specified, view creation will not attach to a window and caller must
4465
4388
  * insert the view into the layout explicitly
@@ -4528,21 +4451,15 @@ declare type CustomRequestHeaders = {
4528
4451
  declare type DataChannelReadyState = RTCDataChannel['readyState'];
4529
4452
 
4530
4453
  /**
4454
+ * @deprecated Use {@link OpenFin.DomainSettings} instead.
4531
4455
  * @interface
4532
4456
  */
4533
- declare type DefaultDomainSettings = {
4534
- rules: DefaultDomainSettingsRule[];
4535
- };
4457
+ declare type DefaultDomainSettings = DomainSettings;
4536
4458
 
4537
4459
  /**
4538
- * @interface
4460
+ * @deprecated Use {@link OpenFin.DomainSettingsRule} instead.
4539
4461
  */
4540
- declare type DefaultDomainSettingsRule = {
4541
- match: string[];
4542
- options: {
4543
- downloadSettings: FileDownloadSettings;
4544
- };
4545
- };
4462
+ declare type DefaultDomainSettingsRule = DomainSettingsRule;
4546
4463
 
4547
4464
  declare interface DesktopAgent {
4548
4465
  open(app: TargetApp, context?: Context): Promise<void>;
@@ -4599,6 +4516,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4599
4516
  type: 'destroyed';
4600
4517
  };
4601
4518
 
4519
+ /**
4520
+ * @interface
4521
+ */
4522
+ declare type DeviceInfo = {
4523
+ vendorId: string | number;
4524
+ productId: string | number;
4525
+ };
4526
+
4602
4527
  /**
4603
4528
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4604
4529
  * @interface
@@ -4779,6 +4704,25 @@ declare type DisplayMetadata_3 = {
4779
4704
  readonly glyph?: string;
4780
4705
  };
4781
4706
 
4707
+ /**
4708
+ * @interface
4709
+ * Define the {@link https://developers.openfin.co/of-docs/docs/file-download#manifest-properties-for-file-downloads file download rules} and domain-based api injection rules.
4710
+ */
4711
+ declare type DomainSettings = {
4712
+ rules: DomainSettingsRule[];
4713
+ };
4714
+
4715
+ /**
4716
+ * @interface
4717
+ */
4718
+ declare type DomainSettingsRule = {
4719
+ match: string[];
4720
+ options: {
4721
+ downloadSettings?: FileDownloadSettings;
4722
+ api?: ApiInjection;
4723
+ };
4724
+ };
4725
+
4782
4726
  /**
4783
4727
  * Metadata returned from a preload script download request.
4784
4728
  *
@@ -4823,14 +4767,24 @@ declare type DownloadRule = {
4823
4767
  * @interface
4824
4768
  *
4825
4769
  * Controls the styling and behavior of the window download shelf.
4770
+ *
4771
+ * @remarks This will control the styling for the download shelf regardless of whether its display was
4772
+ * triggered by the window itself, or a view targeting the window.
4826
4773
  */
4827
4774
  declare type DownloadShelfOptions = {
4828
4775
  /**
4829
- * Whether downloads in this window trigger opening the download shelf.
4776
+ * Whether downloads in this window trigger display of the download shelf.
4777
+ *
4778
+ * @remarks Setting this to false will *not* prevent the download shelf from opening if a child view
4779
+ * with `downloadShelf: { enabled: true }` initiates a download.
4830
4780
  */
4831
4781
  enabled: boolean;
4832
4782
  /**
4833
4783
  * Styling options for the download shelf border.
4784
+ *
4785
+ * @remarks These apply regardless of whether download shelf display was
4786
+ * triggered by this window itself, or a view targeting the window. Individual views
4787
+ * cannot control the rendering of their parent window's download shelf.
4834
4788
  */
4835
4789
  border?: {
4836
4790
  /**
@@ -4840,7 +4794,7 @@ declare type DownloadShelfOptions = {
4840
4794
  */
4841
4795
  size?: number;
4842
4796
  /**
4843
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4797
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4844
4798
  * if absent.
4845
4799
  */
4846
4800
  color?: string;
@@ -5059,9 +5013,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5059
5013
  } : never;
5060
5014
 
5061
5015
  declare interface Environment {
5062
- initLayout(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5016
+ initLayoutManager(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, wire: Transport, options: OpenFin_2.InitLayoutOptions): Promise<OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>>;
5063
5017
  createLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, options: OpenFin_2.CreateLayoutOptions): Promise<void>;
5064
5018
  destroyLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<void>;
5019
+ resolveLayout(layoutManager: OpenFin_2.LayoutManager<OpenFin_2.LayoutSnapshot>, layoutIdentity: OpenFin_2.LayoutIdentity): Promise<any>;
5065
5020
  initPlatform(fin: OpenFin_2.Fin<OpenFin_2.EntityType>, ...args: Parameters<OpenFin_2.Fin['Platform']['init']>): ReturnType<OpenFin_2.Fin['Platform']['init']>;
5066
5021
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5067
5022
  writeToken(path: string, token: string): Promise<string>;
@@ -5111,7 +5066,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5111
5066
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5112
5067
  * from which they propagate).
5113
5068
  */
5114
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ViewEvents.PropagatedEvent<'system'> | ApplicationEvents.PropagatedEvent<'system'> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleEvent | MonitorEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
5069
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
5115
5070
 
5116
5071
  /**
5117
5072
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
@@ -5283,7 +5238,7 @@ declare type EventType_7 = Event_10['type'];
5283
5238
  /**
5284
5239
  * Union of possible `type` values for a {@link SystemEvent}.
5285
5240
  */
5286
- declare type EventType_8 = SystemEvent['type'];
5241
+ declare type EventType_8 = Event_11['type'];
5287
5242
 
5288
5243
  /* Excluded from this release type: EventWithId */
5289
5244
 
@@ -5315,83 +5270,6 @@ declare type ExitCode = {
5315
5270
  declare class ExternalApplication extends EmitterBase<OpenFin_2.ExternalApplicationEvent> {
5316
5271
  identity: OpenFin_2.ApplicationIdentity;
5317
5272
  /* Excluded from this release type: __constructor */
5318
- /**
5319
- * Adds a listener to the end of the listeners array for the specified event.
5320
- * @param eventType - The type of the event.
5321
- * @param listener - Called whenever an event of the specified type occurs.
5322
- * @param options - Option to support event timestamps.
5323
- *
5324
- * @function addListener
5325
- * @memberof ExternalApplication
5326
- * @instance
5327
- * @tutorial ExternalApplication.EventEmitter
5328
- */
5329
- /**
5330
- * Adds a listener to the end of the listeners array for the specified event.
5331
- * @param eventType - The type of the event.
5332
- * @param listener - Called whenever an event of the specified type occurs.
5333
- * @param options - Option to support event timestamps.
5334
- *
5335
- * @function on
5336
- * @memberof ExternalApplication
5337
- * @instance
5338
- * @tutorial ExternalApplication.EventEmitter
5339
- */
5340
- /**
5341
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5342
- * @param eventType - The type of the event.
5343
- * @param listener - The callback function.
5344
- * @param options - Option to support event timestamps.
5345
- *
5346
- * @function once
5347
- * @memberof ExternalApplication
5348
- * @instance
5349
- * @tutorial ExternalApplication.EventEmitter
5350
- */
5351
- /**
5352
- * Adds a listener to the beginning of the listeners array for the specified event.
5353
- * @param eventType - The type of the event.
5354
- * @param listener - The callback function.
5355
- * @param options - Option to support event timestamps.
5356
- *
5357
- * @function prependListener
5358
- * @memberof ExternalApplication
5359
- * @instance
5360
- * @tutorial ExternalApplication.EventEmitter
5361
- */
5362
- /**
5363
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5364
- * The listener is added to the beginning of the listeners array.
5365
- * @param eventType - The type of the event.
5366
- * @param listener - The callback function.
5367
- * @param options - Option to support event timestamps.
5368
- *
5369
- * @function prependOnceListener
5370
- * @memberof ExternalApplication
5371
- * @instance
5372
- * @tutorial ExternalApplication.EventEmitter
5373
- */
5374
- /**
5375
- * Remove a listener from the listener array for the specified event.
5376
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
5377
- * @param eventType - The type of the event.
5378
- * @param listener - The callback function.
5379
- * @param options - Option to support event timestamps.
5380
- *
5381
- * @function removeListener
5382
- * @memberof ExternalApplication
5383
- * @instance
5384
- * @tutorial ExternalApplication.EventEmitter
5385
- */
5386
- /**
5387
- * Removes all listeners, or those of the specified event.
5388
- * @param eventType - The type of the event.
5389
- *
5390
- * @function removeAllListeners
5391
- * @memberof ExternalApplication
5392
- * @instance
5393
- * @tutorial ExternalApplication.EventEmitter
5394
- */
5395
5273
  /**
5396
5274
  * Retrieves information about the external application.
5397
5275
  *
@@ -5645,7 +5523,7 @@ declare type FileDownloadEvent = {
5645
5523
  *
5646
5524
  * @interface
5647
5525
  */
5648
- declare type FileDownloadLocationChangedEvent = BaseApplicationEvent & {
5526
+ declare type FileDownloadLocationChangedEvent = BaseEvent_3 & {
5649
5527
  type: 'file-download-location-changed';
5650
5528
  };
5651
5529
 
@@ -5807,83 +5685,6 @@ declare type FoundInPageEvent = NamedEvent & {
5807
5685
  declare class _Frame extends EmitterBase<OpenFin_2.FrameEvent> {
5808
5686
  identity: OpenFin_2.Identity;
5809
5687
  /* Excluded from this release type: __constructor */
5810
- /**
5811
- * Adds the listener function to the end of the listeners array for the specified event type.
5812
- * @param eventType - The type of the event.
5813
- * @param listener - Called whenever an event of the specified type occurs.
5814
- * @param options - Option to support event timestamps.
5815
- *
5816
- * @function addListener
5817
- * @memberof Frame
5818
- * @instance
5819
- * @tutorial Frame.EventEmitter
5820
- */
5821
- /**
5822
- * Adds a listener to the end of the listeners array for the specified event.
5823
- * @param eventType - The type of the event.
5824
- * @param listener - Called whenever an event of the specified type occurs.
5825
- * @param options - Option to support event timestamps.
5826
- *
5827
- * @function on
5828
- * @memberof Frame
5829
- * @instance
5830
- * @tutorial Frame.EventEmitter
5831
- */
5832
- /**
5833
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5834
- * @param eventType - The type of the event.
5835
- * @param listener - The callback function.
5836
- * @param options - Option to support event timestamps.
5837
- *
5838
- * @function once
5839
- * @memberof Frame
5840
- * @instance
5841
- * @tutorial Frame.EventEmitter
5842
- */
5843
- /**
5844
- * Adds a listener to the beginning of the listeners array for the specified event.
5845
- * @param eventType - The type of the event.
5846
- * @param listener - The callback function.
5847
- * @param options - Option to support event timestamps.
5848
- *
5849
- * @function prependListener
5850
- * @memberof Frame
5851
- * @instance
5852
- * @tutorial Frame.EventEmitter
5853
- */
5854
- /**
5855
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
5856
- * The listener is added to the beginning of the listeners array.
5857
- * @param eventType - The type of the event.
5858
- * @param listener - The callback function.
5859
- * @param options - Option to support event timestamps.
5860
- *
5861
- * @function prependOnceListener
5862
- * @memberof Frame
5863
- * @instance
5864
- * @tutorial Frame.EventEmitter
5865
- */
5866
- /**
5867
- * Remove a listener from the listener array for the specified event.
5868
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
5869
- * @param eventType - The type of the event.
5870
- * @param listener - The callback function.
5871
- * @param options - Option to support event timestamps.
5872
- *
5873
- * @function removeListener
5874
- * @memberof Frame
5875
- * @instance
5876
- * @tutorial Frame.EventEmitter
5877
- */
5878
- /**
5879
- * Removes all listeners, or those of the specified event.
5880
- * @param eventType - The type of the event.
5881
- *
5882
- * @function removeAllListeners
5883
- * @memberof Frame
5884
- * @instance
5885
- * @tutorial Frame.EventEmitter
5886
- */
5887
5688
  /**
5888
5689
  * Returns a frame info object for the represented frame.
5889
5690
  *
@@ -6652,6 +6453,11 @@ declare type IdentityEvent = BaseEvent & {
6652
6453
 
6653
6454
  /* Excluded from this release type: IdEventType */
6654
6455
 
6456
+ /**
6457
+ * @deprecated Renamed to {@link IdleStateChangedEvent}.
6458
+ */
6459
+ declare type IdleEvent = IdleStateChangedEvent;
6460
+
6655
6461
  /**
6656
6462
  * Generated when a user enters or returns from idle state.
6657
6463
  * @remarks This method is continuously generated every minute while the user is in idle.
@@ -6659,7 +6465,7 @@ declare type IdentityEvent = BaseEvent & {
6659
6465
  * A user returns from idle state when the computer is unlocked or keyboard/mouse activity has resumed.
6660
6466
  * @interface
6661
6467
  */
6662
- declare type IdleEvent = BaseEvent_8 & {
6468
+ declare type IdleStateChangedEvent = BaseEvent_8 & {
6663
6469
  type: 'idle-state-changed';
6664
6470
  elapsedTime: number;
6665
6471
  isIdle: boolean;
@@ -6797,6 +6603,13 @@ declare type InitPlatformOptions = {
6797
6603
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6798
6604
  };
6799
6605
 
6606
+ /**
6607
+ * * 'none': The `fin` API will be not available from within this context.
6608
+ * * 'global': The entire `fin` API will be available from within this context.
6609
+ * @defaultValue 'global'
6610
+ */
6611
+ declare type InjectionType = 'none' | 'global';
6612
+
6800
6613
  /**
6801
6614
  * Generated when the value of the element changes.
6802
6615
  * @interface
@@ -7141,56 +6954,6 @@ declare class InteropBroker extends Base {
7141
6954
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
7142
6955
  new (): InteropBroker;
7143
6956
  };
7144
- /**
7145
- * @REMOVED
7146
- * SetContextOptions interface
7147
- * @typedef { object } SetContextOptions@typedef { object } SetContextOptions
7148
- * @property { Context } {context} - New context to set.
7149
- */
7150
- /**
7151
- * @REMOVED
7152
- * GetContextOptions interface
7153
- * @typedef { object } GetContextOptions@typedef { object } GetContextOptions
7154
- * @property { string } [contextType] - Context Type
7155
- */
7156
- /**
7157
- * @REMOVED
7158
- * JoinContextGroupOptions interface
7159
- * @typedef { object } JoinContextGroupOptions@typedef { object } JoinContextGroupOptions
7160
- * @property { string } contextGroupId - Id of the context group.
7161
- * @property { Identity | ClientIdentity } [target] - Identity of the entity you wish to join to a context group.
7162
- */
7163
- /**
7164
- * @REMOVED
7165
- * AddClientToContextGroupOptions interface
7166
- * @typedef { object } AddClientToContextGroupOptions@typedef { object } AddClientToContextGroupOptions
7167
- * @property { string } contextGroupId - Name of the context group.
7168
- */
7169
- /**
7170
- * @REMOVED
7171
- * RemoveFromContextGroupOptions interface
7172
- * @typedef { object } RemoveFromContextGroupOptions@typedef { object } RemoveFromContextGroupOptions
7173
- * @property { Identity | ClientIdentity } target - Identity of the entity you wish to join to a context group.
7174
- */
7175
- /**
7176
- * @REMOVED
7177
- * GetInfoForContextGroupOptions interface
7178
- * @typedef { object } GetInfoForContextGroupOptions@typedef { object } GetInfoForContextGroupOptions
7179
- * @property { string } contextGroupId - Name of the context group to get info for.
7180
- */
7181
- /**
7182
- * @REMOVED
7183
- * GetAllClientsInContextGroupOptions interface
7184
- * @typedef { object } GetAllClientsInContextGroupOptions@typedef { object } GetAllClientsInContextGroupOptions
7185
- * @property { string } contextGroupId - Name of the context group to get info for.
7186
- */
7187
- /**
7188
- * @PORTED
7189
- * InfoForIntentOptions interface
7190
- * @typedef { object } InfoForIntentOptions@typedef { object } InfoForIntentOptions
7191
- * @property { string } name Name of the intent to get info for.
7192
- * @property { Context } [context] Optional context.
7193
- */
7194
6957
  /**
7195
6958
  * Sets a context for the context group of the incoming current entity.
7196
6959
  * @param setContextOptions - New context to set.
@@ -7434,7 +7197,7 @@ declare class InteropBroker extends Base {
7434
7197
  * // }
7435
7198
  * ```
7436
7199
  *
7437
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7200
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7438
7201
  *
7439
7202
  * @param contextForIntent Data passed between entities and applications.
7440
7203
  * @param clientIdentity Identity of the Client making the request.
@@ -7691,97 +7454,6 @@ declare type InteropBrokerOptions = {
7691
7454
  };
7692
7455
 
7693
7456
  /**
7694
- * @PORTED
7695
- * @typedef { object } Intent
7696
- * @summary The combination of an action and a context that is passed to an application for resolution.
7697
- * @property { string } name Name of the intent.
7698
- * @property { Context } context Data associated with the intent
7699
- */
7700
- /**
7701
- * @REMOVED
7702
- * @typedef { object } Subscription
7703
- * @summary Object returned when subscribing a handler.
7704
- * @property { function } unsubscribe Function to unsubscribe the handler.
7705
- */
7706
- /**
7707
- * @typedef { function } ContextHandler
7708
- * @summary Subscription function for addContextHandler.
7709
- */
7710
- /**
7711
- * @typedef { function } IntentHandler
7712
- * @summary Subscription function for registerIntentHandler
7713
- */
7714
- /**
7715
- * @PORTED
7716
- * @typedef { object } ClientIdentity
7717
- * @summary The Identity for a Channel Client. Includes endpointId to differentiate between different connections for an entity.
7718
- * @property {string} uuid GUID of an application.
7719
- * @property {string} name Name of an entity in an application.
7720
- * @property {string} endpointId Unique differentiator for different Channel connections for an entity.
7721
- */
7722
- /**
7723
- * @PORTED
7724
- * @typedef { object } ContextGroupInfo
7725
- * @summary Information for a Context Group. Contains metadata for displaying the group properly.
7726
- * @property {string} id Name of the context group
7727
- * @property {DisplayMetadata} displayMetadata Metadata for the Context Group. Contains the group's human-readable name, color, and an image, as defined by the Interop Broker.
7728
- */
7729
- /**
7730
- * @PORTED
7731
- * @typedef { object } DisplayMetadata
7732
- * @summary The display data for a Context Group.
7733
- * @property {string} name A user-readable name for this context group, e.g: `"Red"`
7734
- * @property {string} [color] The color that should be associated within this context group when displaying this context group in a UI, e.g: `0xFF0000`.
7735
- * @property {string} [glyph] A URL of an image that can be used to display this context group
7736
- */
7737
- /**
7738
- * @PORTED
7739
- * @typedef { object } Context
7740
- * @summary Data passed between entities and applications.
7741
- * @property {object} [id] An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
7742
- * @property {string} [name] User-readable name for the incoming context.
7743
- * @property {string} type Conserved type for the context (e.g. `instrument` or `country`)
7744
- */
7745
- /**
7746
- * @REMOVED
7747
- * @typedef { object } ContextForIntent
7748
- * @summary Data passed between entities and applications, including an optional metadata.
7749
- * @property {object} [id] An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
7750
- * @property {string} [name] User-readable name for the incoming context.
7751
- * @property {string} type Conserved type for the context (e.g. `instrument` or `country`)
7752
- * @property {any} [metadata]
7753
- */
7754
- /**
7755
- * @REMOVED
7756
- * @typedef { object } SessionContextGroup
7757
- * @summary An instance of a SessionContextGroup
7758
- * @property {string} id The SessionContextGroup's id.
7759
- * @property {setContext} setContext Sets a context of a certain type
7760
- * @property {getCurrentContext} getCurrentContext Gets the currently set context of a certain type
7761
- * @property {addContextHandler} addContextHandler Adds a handler for context change.
7762
- */
7763
- /**
7764
- * @typedef {function} setContext
7765
- * @summary A SessionContextGroup instance method for setting a context in the SessionContextGroup.
7766
- * @param context The Context to be set.
7767
- *
7768
- */
7769
- /**
7770
- * @typedef {function} getCurrentContext
7771
- * @summary A SessionContextGroup instance method for getting the current context of a certain type.
7772
- * @param contextType The Context Type to get. If not specified the last contextType set would get used.
7773
- *
7774
- */
7775
- /**
7776
- * @typedef {function} addContextHandler
7777
- * @summary A SessionContextGroup instance method for adding a handler for context change.
7778
- * @param contextHandler The callback to be invoked. Is invoked when (a) the context changes or (b) immediately after getting created if the context is already set.
7779
- * @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.
7780
- *
7781
- */
7782
- /**
7783
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7784
- *
7785
7457
  * The Interop Client API is broken up into two groups:
7786
7458
  *
7787
7459
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -8184,7 +7856,7 @@ declare class InteropClient extends Base {
8184
7856
  * ```
8185
7857
  */
8186
7858
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
8187
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7859
+ /* Excluded from this release type: ferryFdc3Call */
8188
7860
  }
8189
7861
 
8190
7862
  /**
@@ -8214,13 +7886,6 @@ declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
8214
7886
  */
8215
7887
  declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
8216
7888
 
8217
- /**
8218
- * @PORTED
8219
- * @typedef { object } InteropConfig
8220
- * @summary Information relevant to the Interop Broker.
8221
- * @property {string} [currentContextGroup] Context Group for the client. (green, yellow, red, etc.)
8222
- * @property {string} [providerId] When provided, automatically connects the client to the specified provider uuid
8223
- */
8224
7889
  /**
8225
7890
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
8226
7891
  *
@@ -8608,7 +8273,7 @@ declare type LaunchIntoPlatformPayload = {
8608
8273
  declare class Layout extends Base {
8609
8274
  #private;
8610
8275
  /* Excluded from this release type: init */
8611
- identity: OpenFin_2.LayoutIdentity;
8276
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8612
8277
  private platform;
8613
8278
  wire: Transport;
8614
8279
  /* Excluded from this release type: __constructor */
@@ -8824,25 +8489,24 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8824
8489
  */
8825
8490
  declare type LayoutIdentity = Identity_5 & {
8826
8491
  /**
8827
- * The name of the layout an action should be targeted to. When not provided,
8828
- * OpenFin attempts to resolve the instance via visibility checks.
8492
+ * The name of the layout in a given window.
8829
8493
  */
8830
- layoutName?: string;
8494
+ layoutName: string;
8831
8495
  };
8832
8496
 
8833
8497
  /**
8834
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8498
+ * Generated when the window is created, and all of its layout's views have either finished or failed
8499
+ * navigation, once per layout. Does not emit for any layouts added via Layout.create() call.
8835
8500
  * @interface
8836
8501
  */
8837
8502
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8838
8503
  type: 'layout-initialized';
8504
+ layoutIdentity: OpenFin_2.LayoutIdentity;
8839
8505
  ofViews: (OpenFin_2.Identity & {
8840
8506
  entityType: 'view';
8841
8507
  })[];
8842
8508
  };
8843
8509
 
8844
- /* Excluded from this release type: LayoutInstance */
8845
-
8846
8510
  /**
8847
8511
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8848
8512
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8870,7 +8534,7 @@ declare type LayoutItemConfig = {
8870
8534
  *
8871
8535
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8872
8536
  *
8873
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8537
+ * Responsible for aggregating all layout snapshots and storing layout instances
8874
8538
  */
8875
8539
  declare interface LayoutManager<T extends LayoutSnapshot> {
8876
8540
  /**
@@ -8894,16 +8558,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8894
8558
  * @throws if Object.keys(snapshot).length > 1
8895
8559
  */
8896
8560
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8897
- /**
8898
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8899
- * contains a single layout.
8900
- *
8901
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8902
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8903
- *
8904
- * @param snapshot
8905
- * @throws if Object.keys(snapshot).length > 1
8906
- */
8907
8561
  /**
8908
8562
  * @experimental
8909
8563
  *
@@ -8924,31 +8578,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8924
8578
  /**
8925
8579
  * @experimental
8926
8580
  *
8927
- * @param layoutIdentity
8928
- * @returns
8581
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8582
+ * this method to control the target layout for Layout API calls.
8583
+ *
8584
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8585
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8586
+ * "last visible" layout identity and return it.
8587
+ *
8588
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8589
+ * call must route to in this order of precedence:
8590
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8591
+ * - if there is only 1 layout, resolves that one
8592
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8593
+ * - returns undefined
8594
+ *
8595
+ * @param identity
8596
+ * @returns LayoutIdentity | undefined
8929
8597
  */
8930
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8598
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8931
8599
  /**
8932
8600
  * @experimental
8933
8601
  *
8934
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8935
- * Throws if it does not exist.
8936
- * @param layoutName
8937
- * @returns
8602
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8603
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8604
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8605
+ * signify to your application it's time to destroy this layout.
8606
+ *
8607
+ * 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.
8608
+ *
8609
+ * @param LayoutIdentity
8938
8610
  */
8939
- getLayoutByName(layoutName: string): LayoutInstance;
8611
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8940
8612
  /**
8941
8613
  * @experimental
8942
8614
  */
8943
- getLayouts(): Record<string, LayoutInstance>;
8615
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8944
8616
  /**
8945
8617
  * @experimental
8946
8618
  */
8947
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8619
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8948
8620
  /**
8949
8621
  * @experimental
8950
8622
  */
8951
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8623
+ size(): number;
8952
8624
  }
8953
8625
 
8954
8626
  /**
@@ -8995,7 +8667,7 @@ declare class LayoutModule extends Base {
8995
8667
  * const layoutConfig = await layout.getConfig();
8996
8668
  * ```
8997
8669
  */
8998
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8670
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8999
8671
  /**
9000
8672
  * Synchronously returns a Layout object that represents a Window's layout.
9001
8673
  *
@@ -9015,7 +8687,7 @@ declare class LayoutModule extends Base {
9015
8687
  * const layoutConfig = await layout.getConfig();
9016
8688
  * ```
9017
8689
  */
9018
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
8690
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9019
8691
  /**
9020
8692
  * Asynchronously returns a Layout object that represents a Window's layout.
9021
8693
  *
@@ -9112,7 +8784,7 @@ declare type LayoutOptions = {
9112
8784
  * @defaultValue false
9113
8785
  *
9114
8786
  * Limits the area to which tabs can be dragged.
9115
- * If true, stack headers are the only areas where tabs can be dropped.
8787
+ * If true, the layout container is the only area where tabs can be dropped.
9116
8788
  */
9117
8789
  constrainDragToContainer?: boolean;
9118
8790
  /**
@@ -9183,19 +8855,23 @@ declare type LayoutOptions = {
9183
8855
  };
9184
8856
  };
9185
8857
 
8858
+ /**
8859
+ * Represents the position of an item in a layout relative to another.
8860
+ */
9186
8861
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9187
8862
 
9188
8863
  /**
9189
- * @interface
8864
+ * Layout preset type.
9190
8865
  */
9191
8866
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9192
8867
 
9193
8868
  /**
9194
- * Generated when a window and all of its layout's views have been created and can receive API calls.
8869
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9195
8870
  * @interface
9196
8871
  */
9197
8872
  declare type LayoutReadyEvent = BaseEvent_5 & {
9198
8873
  type: 'layout-ready';
8874
+ layoutIdentity: OpenFin_2.LayoutIdentity;
9199
8875
  views: (OpenFin_2.Identity & {
9200
8876
  success: boolean;
9201
8877
  })[];
@@ -9542,14 +9218,9 @@ declare type MonitorDetails = {
9542
9218
  };
9543
9219
 
9544
9220
  /**
9545
- * Generated on changes of a monitor's size/location.
9546
- * @remarks A monitor's size changes when the taskbar is resized or relocated.
9547
- * The available space of a monitor defines a rectangle that is not occupied by the taskbar
9548
- * @interface
9221
+ * @deprecated Renamed to {@link MonitorInfoChangedEvent}.
9549
9222
  */
9550
- declare type MonitorEvent = BaseEvent_8 & OpenFin_2.MonitorInfo & {
9551
- type: 'monitor-info-changed';
9552
- };
9223
+ declare type MonitorEvent = MonitorInfoChangedEvent;
9553
9224
 
9554
9225
  /**
9555
9226
  * @interface
@@ -9573,6 +9244,16 @@ declare type MonitorInfo = {
9573
9244
  virtualScreen: DipRect;
9574
9245
  };
9575
9246
 
9247
+ /**
9248
+ * Generated on changes of a monitor's size/location.
9249
+ * @remarks A monitor's size changes when the taskbar is resized or relocated.
9250
+ * The available space of a monitor defines a rectangle that is not occupied by the taskbar
9251
+ * @interface
9252
+ */
9253
+ declare type MonitorInfoChangedEvent = BaseEvent_8 & OpenFin_2.MonitorInfo & {
9254
+ type: 'monitor-info-changed';
9255
+ };
9256
+
9576
9257
  /**
9577
9258
  * @interface
9578
9259
  */
@@ -9895,7 +9576,7 @@ declare type MutableWindowOptions = {
9895
9576
  showTaskbarIcon: boolean;
9896
9577
  interop: InteropConfig;
9897
9578
  /* Excluded from this release type: _internalWorkspaceData */
9898
- workspacePlatform: WorkspacePlatformOptions;
9579
+ /* Excluded from this release type: workspacePlatform */
9899
9580
  };
9900
9581
 
9901
9582
  declare type NackHandler = (payloadOrMessage: RuntimeErrorPayload | string) => void;
@@ -10083,6 +9764,7 @@ declare namespace OpenFin_2 {
10083
9764
  ResizeRegion,
10084
9765
  Accelerator,
10085
9766
  Api,
9767
+ InjectionType,
10086
9768
  NavigationRules,
10087
9769
  ContentNavigation,
10088
9770
  ContentRedirect,
@@ -10128,6 +9810,7 @@ declare namespace OpenFin_2 {
10128
9810
  WebPermission,
10129
9811
  VerboseWebPermission,
10130
9812
  OpenExternalPermission,
9813
+ DeviceInfo,
10131
9814
  Permissions_2 as Permissions,
10132
9815
  PlatformWindowCreationOptions,
10133
9816
  PlatformWindowOptions,
@@ -10229,6 +9912,9 @@ declare namespace OpenFin_2 {
10229
9912
  RuntimeInfo,
10230
9913
  DefaultDomainSettings,
10231
9914
  DefaultDomainSettingsRule,
9915
+ DomainSettings,
9916
+ ApiInjection,
9917
+ DomainSettingsRule,
10232
9918
  FileDownloadBehaviorNames,
10233
9919
  FileDownloadSettings,
10234
9920
  DownloadRule,
@@ -10285,7 +9971,6 @@ declare namespace OpenFin_2 {
10285
9971
  InitLayoutOptions,
10286
9972
  LayoutManagerConstructor,
10287
9973
  LayoutManagerOverride,
10288
- LayoutInstance,
10289
9974
  LayoutManager,
10290
9975
  CreateLayoutOptions,
10291
9976
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10477,6 +10162,7 @@ declare type Permissions_2 = {
10477
10162
  Application?: Partial<ApplicationPermissions>;
10478
10163
  System?: Partial<SystemPermissions>;
10479
10164
  webAPIs?: WebPermission[];
10165
+ devices?: DeviceInfo[];
10480
10166
  };
10481
10167
 
10482
10168
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -11389,7 +11075,17 @@ declare interface PlatformProvider {
11389
11075
  */
11390
11076
  getSnapshot(payload: undefined, identity: OpenFin_2.Identity): Promise<OpenFin_2.Snapshot>;
11391
11077
  /* Excluded from this release type: getInitialLayoutSnapshot */
11392
- /* Excluded from this release type: createViewsForLayout */
11078
+ /**
11079
+ * @experimental
11080
+ *
11081
+ * This API is called during the {@link PlatformProvider.getSnapshot()} call.
11082
+ * Gets the current state of a particular window and its views and returns an object that
11083
+ * can be added to the {@link OpenFin.Snapshot.windows} property. Override this function if
11084
+ * you wish to mutate each window snapshot during the {@link PlatformProvider.getSnapshot()} call
11085
+ * @param identity
11086
+ * @param callerIdentity
11087
+ */
11088
+ getWindowSnapshot(identity: OpenFin_2.Identity, callerIdentity: OpenFin_2.Identity): Promise<OpenFin_2.WindowCreationOptions>;
11393
11089
  /* Excluded from this release type: getViewSnapshot */
11394
11090
  /**
11395
11091
  * Called when a snapshot is being applied and some windows in that snapshot would be fully or partially off-screen.
@@ -12817,7 +12513,7 @@ declare type ReplaceLayoutPayload = {
12817
12513
  /**
12818
12514
  * Identity of the window whose layout will be replaced.
12819
12515
  */
12820
- target: LayoutIdentity;
12516
+ target: Identity_5 | LayoutIdentity;
12821
12517
  };
12822
12518
 
12823
12519
  /**
@@ -13649,97 +13345,20 @@ declare class System extends EmitterBase<OpenFin_2.SystemEvent> {
13649
13345
  /* Excluded from this release type: __constructor */
13650
13346
  private sendExternalProcessRequest;
13651
13347
  /**
13652
- * Adds a listener to the end of the listeners array for the specified event.
13653
- * @param eventType - The type of the event.
13654
- * @param listener - Called whenever an event of the specified type occurs.
13655
- * @param options - Option to support event timestamps.
13348
+ * Returns the version of the runtime. The version contains the major, minor,
13349
+ * build and revision numbers.
13656
13350
  *
13657
- * @function addListener
13658
- * @memberof System
13659
- * @instance
13660
- * @tutorial System.EventEmitter
13351
+ * @example
13352
+ * ```js
13353
+ * fin.System.getVersion().then(v => console.log(v)).catch(err => console.log(err));
13354
+ * ```
13661
13355
  */
13356
+ getVersion(): Promise<string>;
13662
13357
  /**
13663
- * Adds a listener to the end of the listeners array for the specified event.
13664
- * @param eventType - The type of the event.
13665
- * @param listener - Called whenever an event of the specified type occurs.
13666
- * @param options - Option to support event timestamps.
13667
- *
13668
- * @function on
13669
- * @memberof System
13670
- * @instance
13671
- * @tutorial System.EventEmitter
13672
- */
13673
- /**
13674
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
13675
- * @param eventType - The type of the event.
13676
- * @param listener - The callback function.
13677
- * @param options - Option to support event timestamps.
13678
- *
13679
- * @function once
13680
- * @memberof System
13681
- * @instance
13682
- * @tutorial System.EventEmitter
13683
- */
13684
- /**
13685
- * Adds a listener to the beginning of the listeners array for the specified event.
13686
- * @param eventType - The type of the event.
13687
- * @param listener - The callback function.
13688
- * @param options - Option to support event timestamps.
13689
- *
13690
- * @function prependListener
13691
- * @memberof System
13692
- * @instance
13693
- * @tutorial System.EventEmitter
13694
- */
13695
- /**
13696
- * Adds a one time listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
13697
- * The listener is added to the beginning of the listeners array.
13698
- * @param eventType - The type of the event.
13699
- * @param listener - The callback function.
13700
- * @param options - Option to support event timestamps.
13701
- *
13702
- * @function prependOnceListener
13703
- * @memberof System
13704
- * @instance
13705
- * @tutorial System.EventEmitter
13706
- */
13707
- /**
13708
- * Remove a listener from the listener array for the specified event.
13709
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
13710
- * @param eventType - The type of the event.
13711
- * @param listener - The callback function.
13712
- * @param options - Option to support event timestamps.
13713
- *
13714
- * @function removeListener
13715
- * @memberof System
13716
- * @instance
13717
- * @tutorial System.EventEmitter
13718
- */
13719
- /**
13720
- * Removes all listeners, or those of the specified event.
13721
- * @param eventType - The type of the event.
13722
- *
13723
- * @function removeAllListeners
13724
- * @memberof System
13725
- * @instance
13726
- * @tutorial System.EventEmitter
13727
- */
13728
- /**
13729
- * Returns the version of the runtime. The version contains the major, minor,
13730
- * build and revision numbers.
13731
- *
13732
- * @example
13733
- * ```js
13734
- * fin.System.getVersion().then(v => console.log(v)).catch(err => console.log(err));
13735
- * ```
13736
- */
13737
- getVersion(): Promise<string>;
13738
- /**
13739
- * Clears cached data containing application resource
13740
- * files (images, HTML, JavaScript files), cookies, and items stored in the
13741
- * Local Storage.
13742
- * @param options - See below for details.
13358
+ * Clears cached data containing application resource
13359
+ * files (images, HTML, JavaScript files), cookies, and items stored in the
13360
+ * Local Storage.
13361
+ * @param options - See below for details.
13743
13362
  *
13744
13363
  * @remarks For more information on the accepted options, see the following pages:
13745
13364
  * * cache: browsing data cache for html files and images ([caching](https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching))
@@ -15168,7 +14787,9 @@ declare namespace SystemEvents {
15168
14787
  NotRequested,
15169
14788
  ExcludeRequested,
15170
14789
  BaseEvent_8 as BaseEvent,
14790
+ IdleStateChangedEvent,
15171
14791
  IdleEvent,
14792
+ MonitorInfoChangedEvent,
15172
14793
  MonitorEvent,
15173
14794
  SessionChangedEvent,
15174
14795
  AppVersionEvent,
@@ -15306,20 +14927,6 @@ declare interface TabDragListener extends EventEmitter_2 {
15306
14927
  contentItem: ContentItem;
15307
14928
  }
15308
14929
 
15309
- /**
15310
- * @typedef {string} LayoutPosition
15311
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
15312
- */
15313
- /**
15314
- * @typedef {object} StackCreationOptions
15315
- * @summary Stack creation options.
15316
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
15317
- */
15318
- /**
15319
- * @typedef {object} TabStack~AddViewOptions
15320
- * @summary Options to use when adding a view to a {@link TabStack}
15321
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
15322
- */
15323
14930
  /**
15324
14931
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15325
14932
  */
@@ -15764,169 +15371,6 @@ declare type VerboseWebPermission = {
15764
15371
 
15765
15372
  declare type View = OpenFin_2.View;
15766
15373
 
15767
- /**
15768
- * @PORTED
15769
- * @typedef {object} View~options
15770
- * @summary View creation options.
15771
- * @desc This is the options object required by {@link View.create View.create}.
15772
- *
15773
- * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
15774
- * (defaults to `"about:blank"` when omitted).
15775
- *
15776
- * @property {object} [experimental]
15777
- * Configurations for API injection.
15778
- *
15779
- * @property {boolean} [experimental.childWindows] Configure if the runtime should enable child windows for views.
15780
- *
15781
- * @property {object} [accelerator]
15782
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
15783
- *
15784
- * @property {boolean} [accelerator.devtools=false]
15785
- * If `true`, enables the devtools keyboard shortcut:<br>
15786
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
15787
- *
15788
- * @property {boolean} [accelerator.reload=false]
15789
- * If `true`, enables the reload keyboard shortcuts:<br>
15790
- * `Ctrl` + `R` _(Windows)_<br>
15791
- * `F5` _(Windows)_<br>
15792
- * `Command` + `R` _(Mac)_
15793
- *
15794
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
15795
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
15796
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
15797
- * `Shift` + `F5` _(Windows)_<br>
15798
- * `Command` + `Shift` + `R` _(Mac)_
15799
- *
15800
- * @property {boolean} [accelerator.zoom=false]
15801
- * If `true`, enables the zoom keyboard shortcuts:<br>
15802
- * `Ctrl` + `+` _(Zoom In)_<br>
15803
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
15804
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
15805
- * `Ctrl` + `-` _(Zoom Out)_<br>
15806
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
15807
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
15808
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
15809
- * `Ctrl` + `0` _(Restore to 100%)_
15810
- *
15811
- * @property {object} [api]
15812
- * Configurations for API injection.
15813
- *
15814
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
15815
- *
15816
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
15817
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
15818
- *
15819
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
15820
- * Autoplay policy to apply to content in the window, can be
15821
- * `no-user-gesture-required`, `user-gesture-required`,
15822
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
15823
- *
15824
- * @property {object} [autoResize] AutoResize options
15825
- *
15826
- * @property {object} [bounds] initial bounds given relative to the window.
15827
- *
15828
- * @property {string} [backgroundColor="#FFF"] - _Updatable._
15829
- * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
15830
- * (`document.body.style.backgroundColor`),
15831
- * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
15832
- * areas when growing a window. Setting
15833
- * this value to the anticipated content background color can help improve user experience.
15834
- * Default is white.
15835
- *
15836
- * @property {object} [contentNavigation]
15837
- * Restrict navigation to URLs that match an allowed pattern.
15838
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
15839
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
15840
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
15841
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
15842
- *
15843
- * @property {object} [contentRedirect]
15844
- * Restrict redirects to URLs that match an allowed pattern.
15845
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
15846
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
15847
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
15848
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
15849
- *
15850
- * @property {object} [contextMenuSettings] - _Updatable._
15851
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
15852
- * Configure the context menu when right-clicking on a view.
15853
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
15854
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
15855
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
15856
- *
15857
- * @property {object} [contextMenuOptions] - _Updatable._
15858
- * Configure the context menu when right-clicking on a view. Supported menu items:
15859
- * 'separator'
15860
- * 'cut'
15861
- * 'copy'
15862
- * 'copyImage',
15863
- * 'paste'
15864
- * 'spellCheck'
15865
- * 'inspect'
15866
- * 'reload'
15867
- * 'navigateForward'
15868
- * 'navigateBack'
15869
- * 'print'
15870
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
15871
- * @property {string[]} [contextMenuOptions.template=[]] List of context menu items to display on right-click.
15872
- *
15873
- * @property {any} [customData=""] - _Updatable._
15874
- * A field that the user can attach serializable data to be ferried around with the view options.
15875
- * _When omitted, the default value of this property is the empty string (`""`)._
15876
- *
15877
- * @property {any} [customContext=""] - _Updatable._
15878
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
15879
- * is called.
15880
- * When omitted, the default value of this property is the empty string (`""`).
15881
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
15882
- *
15883
- * @property {object[]} [hotkeys=[]] - _Updatable._
15884
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
15885
- * Within Platform, OpenFin also implements a set of pre-defined actions called
15886
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
15887
- * that can be assigned to a specific hotkey in the platform manifest.
15888
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
15889
- * @property {boolean} [hotkeys.preventDefault=false] preventDefault will prevent the page keydown/keyup events from being emitted.
15890
- *
15891
- * @property {boolean} [isClosable=true] **Platforms Only.** If false, the view will be persistent and can't be closed through
15892
- * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
15893
- * if the view isn't part of the new layout when running `Layout.replace`.
15894
- *
15895
- * @property {string} name
15896
- * The name of the view.
15897
- *
15898
- * @property {boolean} [detachOnClose=false] - _Updatable._
15899
- * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
15900
- * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
15901
- *
15902
- * @property {string} [manifestUrl] **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
15903
- * but the properties in the manifest will take precedence if there is any collision.
15904
- *
15905
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
15906
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
15907
- * from the parent application.
15908
- *
15909
- * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
15910
- *
15911
- * @property {string} [processAffinity=<application uuid>]
15912
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
15913
- *
15914
- * @property {boolean} [spellCheck=false]
15915
- * Enable spell check in input text fields for the view.
15916
- *
15917
- * @property {Identity} [target]
15918
- * The identity of the window this view should be attached to.
15919
- *
15920
- * @property {string} [url="about:blank"]
15921
- * The URL of the view.
15922
- *
15923
- * @property {string} [uuid=<application uuid>]
15924
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
15925
- * If omitted, defaults to the `uuid` of the application spawning the view.
15926
- * If given, must match the `uuid` of the application spawning the view.
15927
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
15928
- * really no need to provide it.
15929
- */
15930
15374
  /**
15931
15375
  * A View can be used to embed additional web content into a Window.
15932
15376
  * It is like a child window, except it is positioned relative to its owning window.
@@ -16405,7 +15849,7 @@ declare type ViewCreationOrReference = OpenFin_2.Identity | OpenFin_2.PlatformVi
16405
15849
  */
16406
15850
  declare type ViewDetachedEvent = BaseEvent_5 & {
16407
15851
  type: 'view-detached';
16408
- target: OpenFin_2.Identity;
15852
+ target: OpenFin_2.Identity | null;
16409
15853
  previousTarget: OpenFin_2.Identity;
16410
15854
  viewIdentity: OpenFin_2.Identity;
16411
15855
  };
@@ -17641,7 +17085,7 @@ declare namespace WebContentsEvents {
17641
17085
  * `clipboard-read`: Request access to read from the clipboard.<br>
17642
17086
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17643
17087
  */
17644
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17088
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17645
17089
 
17646
17090
  /**
17647
17091
  * Object representing headers and their values, where the
@@ -17719,476 +17163,6 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
17719
17163
  type: 'will-resize';
17720
17164
  };
17721
17165
 
17722
- /**
17723
- * @PORTED
17724
- * @typedef { object } Margins@typedef { object } Margins
17725
- * @property { string } [marginType]
17726
- * Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
17727
- * you will also need to specify `top`, `bottom`, `left`, and `right`.
17728
- *
17729
- * @property { number } [top] The top margin of the printed web page, in pixels.
17730
- * @property { number } [bottom] The bottom margin of the printed web page, in pixels.
17731
- * @property { number } [left] The left margin of the printed web page, in pixels.
17732
- * @property { number } [right] The right margin of the printed web page, in pixels.
17733
- */
17734
- /**
17735
- * @PORTED
17736
- * @typedef { object } Dpi@typedef { object } Dpi
17737
- * @property { number } [horizontal] The horizontal dpi
17738
- * @property { number } [vertical] The vertical dpi
17739
- */
17740
- /**
17741
- * @PORTED
17742
- * @typedef { object } PrintOptions@typedef { object } PrintOptions
17743
- * @property { boolean } [silent=false] Don't ask user for print settings.
17744
- * @property { boolean } [printBackground=false] Prints the background color and image of the web page.
17745
- * @property { string } [deviceName=''] Set the printer device name to use.
17746
- * @property { boolean } [color=true] Set whether the printed web page will be in color or grayscale.
17747
- * @property { Margins } [margins] Set margins for the printed web page
17748
- * @property { boolean } [landscape=false] Whether the web page should be printed in landscape mode.
17749
- * @property { number } [scaleFactor] The scale factor of the web page.
17750
- * @property { number } [pagesPerSheet] The number of pages to print per page sheet.
17751
- * @property { boolean } [collate] Whether the web page should be collated.
17752
- * @property { number } [copies] The number of copies of the web page to print.
17753
- * @property { Record<string, number> } [pageRanges] The page range to print. Should have two keys: from and to.
17754
- * @property { string } [duplexMode] Set the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge.
17755
- * @property { Dpi } [dpi] Set dpi for the printed web page
17756
- */
17757
- /**
17758
- * @REMOVED
17759
- * PrinterInfo interface
17760
- * @typedef { object } PrinterInfo@typedef { object } PrinterInfo
17761
- * @property { string } name Printer Name
17762
- * @property { string } description Printer Description
17763
- * @property { number } status Printer Status
17764
- * @property { boolean } isDefault Indicates that system's default printer
17765
- */
17766
- /**
17767
- * @REMOVED
17768
- * SharedWorkerInfo interface
17769
- * @typedef { object } SharedWorkerInfo@typedef { object } SharedWorkerInfo
17770
- * @property { string } id The unique id of the shared worker.
17771
- * @property { string } url The url of the shared worker.
17772
- */
17773
- /**
17774
- * @PORTED
17775
- * ContentCreationRule interface
17776
- * @typedef { object } ContentCreationRule@typedef { object } ContentCreationRule
17777
- * @property { string } behavior 'view' | 'window' | 'browser' | 'block'
17778
- * @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
17779
- * @property { object } options Window creation options or View creation options.
17780
- */
17781
- /**
17782
- * @PORTED
17783
- * @typedef {object} Window~options
17784
- * @summary Window creation options.
17785
- * @desc This is the options object required by {@link Window.create Window.create}.
17786
- *
17787
- * Note that `name` is the only required property — albeit the `url` property is usually provided as well
17788
- * (defaults to `"about:blank"` when omitted).
17789
- *
17790
- * _This jsdoc typedef mirrors the `WindowOptions` TypeScript interface in `@types/openfin`._
17791
- *
17792
- * @property {object} [accelerator]
17793
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
17794
- *
17795
- * @property {boolean} [accelerator.devtools=false]
17796
- * If `true`, enables the devtools keyboard shortcut:<br>
17797
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
17798
- *
17799
- * @property {boolean} [accelerator.reload=false]
17800
- * If `true`, enables the reload keyboard shortcuts:<br>
17801
- * `Ctrl` + `R` _(Windows)_<br>
17802
- * `F5` _(Windows)_<br>
17803
- * `Command` + `R` _(Mac)_
17804
- *
17805
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
17806
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
17807
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
17808
- * `Shift` + `F5` _(Windows)_<br>
17809
- * `Command` + `Shift` + `R` _(Mac)_
17810
- *
17811
- * @property {boolean} [accelerator.zoom=false]
17812
- * NOTE: It is not recommended to set this value to true for Windows in Platforms as that may lead to unexpected visual shifts in layout.
17813
- * If `true`, enables the zoom keyboard shortcuts:<br>
17814
- * `Ctrl` + `+` _(Zoom In)_<br>
17815
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
17816
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
17817
- * `Ctrl` + `-` _(Zoom Out)_<br>
17818
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
17819
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
17820
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
17821
- * `Ctrl` + `0` _(Restore to 100%)_
17822
- *
17823
- * @property {object} [alphaMask] - _Experimental._ _Updatable._
17824
- * <br>
17825
- * alphaMask turns anything of matching RGB value transparent.
17826
- * <br>
17827
- * Caveats:
17828
- * * Runtime flags --disable-gpu and --allow-unsafe-compositing are required. Note: Unclear behavior on remote Desktop support
17829
- * * User cannot click-through transparent regions
17830
- * * Not supported on Mac
17831
- * * Windows Aero must be enabled
17832
- * * Won't make visual sense on Pixel-pushed environments such as Citrix
17833
- * * Not supported on rounded corner windows
17834
- * @property {number} [alphaMask.red=-1] 0-255
17835
- * @property {number} [alphaMask.green=-1] 0-255
17836
- * @property {number} [alphaMask.blue=-1] 0-255
17837
- *
17838
- * @property {boolean} [alwaysOnTop=false] - _Updatable._
17839
- * A flag to always position the window at the top of the window stack.
17840
- *
17841
- * @property {object} [api]
17842
- * Configurations for API injection.
17843
- *
17844
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
17845
- *
17846
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
17847
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
17848
- *
17849
- * @property {string} [applicationIcon = ""] - _Deprecated_ - use `icon` instead.
17850
- *
17851
- * @property {number} [aspectRatio=0] - _Updatable._
17852
- * The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero,
17853
- * an aspect ratio will not be enforced.
17854
- *
17855
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
17856
- * Autoplay policy to apply to content in the window, can be
17857
- * `no-user-gesture-required`, `user-gesture-required`,
17858
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
17859
- *
17860
- * @property {boolean} [autoShow=true]
17861
- * A flag to automatically show the window when it is created.
17862
- *
17863
- * @property {string} [backgroundColor="#FFF"]
17864
- * The window’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
17865
- * (`document.body.style.backgroundColor`),
17866
- * this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed
17867
- * areas when growing a window. Setting
17868
- * this value to the anticipated content background color can help improve user experience.
17869
- * Default is white.
17870
- *
17871
- * @property {object} [contentCreation]
17872
- * Apply rules that determine how user interaction (`window.open` and links) creates content.
17873
- * @property {ContentCreationRule[]} [contentCreation.rules = []] List of content creation rules.
17874
- *
17875
- * @property {object} [contentNavigation]
17876
- * Restrict navigation to URLs that match an allowed pattern.
17877
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
17878
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
17879
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
17880
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
17881
- *
17882
- * @property {object} [contentRedirect]
17883
- * Restrict redirects to URLs that match an allowed pattern.
17884
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
17885
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
17886
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
17887
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
17888
- *
17889
- * @property {boolean} [contextMenu=true] - _Updatable._
17890
- * A flag to show the context menu when right-clicking on a window.
17891
- * Gives access to the devtools for the window.
17892
- *
17893
- * @property {object} [contextMenuSettings] - _Updatable._
17894
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
17895
- * Configure the context menu when right-clicking on a window.
17896
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
17897
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
17898
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
17899
- *
17900
- * @property {object} [contextMenuOptions] - _Updatable._
17901
- * Configure the context menu when right-clicking on a window. Supported menu items:
17902
- * 'separator'
17903
- * 'cut'
17904
- * 'copy'
17905
- * 'paste'
17906
- * 'spellCheck'
17907
- * 'inspect'
17908
- * 'reload'
17909
- * 'navigateForward'
17910
- * 'navigateBack'
17911
- * 'print'
17912
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
17913
- * @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
17914
- *
17915
- * @property {object} [cornerRounding] - _Updatable._
17916
- * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
17917
- * average of _height_ and _width_.
17918
- * @property {number} [cornerRounding.height=0] The height in pixels.
17919
- * @property {number} [cornerRounding.width=0] The width in pixels.
17920
- *
17921
- * @property {any} [customContext=""] - _Updatable. Inheritable._
17922
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
17923
- * is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
17924
- * {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
17925
- * _When omitted, _inherits_ from the parent application._
17926
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
17927
- *
17928
- * @property {any} [customData=""] - _Updatable. Inheritable._
17929
- * A field that the user can attach serializable data to be ferried around with the window options.
17930
- * _When omitted, _inherits_ from the parent application._
17931
- *
17932
- * @property {object[]} [customRequestHeaders]
17933
- * Defines list of custom headers for requests sent by the window.
17934
- * @property {string[]} [customRequestHeaders.urlPatterns=[]] The URL patterns for which the headers will be applied
17935
- * @property {object[]} [customRequestHeaders.headers=[]] Objects representing headers and their values,
17936
- * where the object key is the name of header and value at key is the value of the header
17937
- *
17938
- * @property {boolean} [closeOnLastViewRemoved=true] - _Experimental._ _Updatable._
17939
- * Toggling off would keep the Window alive even if all its Views were closed.
17940
- * This is meant for advanced users and should be used with caution.
17941
- * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
17942
- * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
17943
- * ** note ** - This option is ignored in non-Platforms apps.
17944
- *
17945
- * @property {boolean} [defaultCentered=false]
17946
- * Centers the window in the primary monitor. This option overrides `defaultLeft` and `defaultTop`. When `saveWindowState` is `true`,
17947
- * this value will be ignored for subsequent launches in favor of the cached value. **NOTE:** On macOS _defaultCenter_ is
17948
- * somewhat above center vertically.
17949
- *
17950
- * @property {number} [defaultHeight=500]
17951
- * The default height of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent launches
17952
- * in favor of the cached value.
17953
- *
17954
- * @property {number} [defaultLeft=100]
17955
- * The default left position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
17956
- * launches in favor of the cached value.
17957
- *
17958
- * @property {number} [defaultTop=100]
17959
- * The default top position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
17960
- * launches in favor of the cached value.
17961
- *
17962
- * @property {number} [defaultWidth=800]
17963
- * The default width of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
17964
- * launches in favor of the cached value.
17965
- *
17966
- * @property {boolean} [includeInSnapshots=true] - _Updatable._
17967
- * When true, the window will be be included in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with
17968
- * inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.
17969
- *
17970
- * @property {boolean} [frame=true] - _Updatable._
17971
- * A flag to show the frame.
17972
- *
17973
- * @hidden-property {boolean} [hideOnClose=false] - A flag to allow a window to be hidden when the close button is clicked.
17974
- *
17975
- * @property {object[]} [hotkeys=[]] - _Updatable._
17976
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the window. For usage example see [example]{@tutorial hotkeys}.
17977
- * Within Platform, OpenFin also implements a set of pre-defined actions called
17978
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
17979
- * that can be assigned to a specific hotkey in the platform manifest.
17980
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
17981
- * @property {boolean} [hotkeys.preventDefault=false] Whether or not to prevent default key handling before emitting the event
17982
- *
17983
- * @property {string} [icon] - _Updatable. Inheritable._
17984
- * A URL for the icon to be shown in the window title bar and the taskbar.
17985
- * When omitted, inherits from the parent application._
17986
- * note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
17987
- *
17988
- * @property {number} [maxHeight=-1] - _Updatable._
17989
- * The maximum height of a window. Will default to the OS defined value if set to -1.
17990
- *
17991
- * @property {boolean} [maximizable=true] - _Updatable._
17992
- * A flag that lets the window be maximized.
17993
- *
17994
- * @property {number} [maxWidth=-1] - _Updatable._
17995
- * The maximum width of a window. Will default to the OS defined value if set to -1.
17996
- *
17997
- * @property {number} [minHeight=0] - _Updatable._
17998
- * The minimum height of a window.
17999
- *
18000
- * @property {boolean} [minimizable=true] - _Updatable._
18001
- * A flag that lets the window be minimized.
18002
- *
18003
- * @property {number} [minWidth=0] - _Updatable._
18004
- * The minimum width of a window.
18005
- *
18006
- * @property {Identity} [modalParentIdentity]
18007
- * Parent identity of a modal window. It will create a modal child window when this option is set.
18008
- *
18009
- * @property {string} name
18010
- * The name of the window.
18011
- *
18012
- * @property {number} [opacity=1.0] - _Updatable._
18013
- * A flag that specifies how transparent the window will be.
18014
- * Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
18015
- * This value is clamped between `0.0` and `1.0`.
18016
- * * In software composition mode, the runtime flag --allow-unsafe-compositing is required.
18017
- *
18018
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
18019
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
18020
- * from the parent application.
18021
- *
18022
- * @property {string} [processAffinity]
18023
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
18024
- *
18025
- * @property {boolean} [resizable=true] - _Updatable._
18026
- * A flag to allow the user to resize the window.
18027
- *
18028
- * @property {object} [resizeRegion] - _Updatable._
18029
- * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
18030
- * @property {number} [resizeRegion.bottomRightCorner=9]
18031
- * The size in pixels of an additional square resizable region located at the bottom right corner of a frameless window.
18032
- * @property {number} [resizeRegion.size=7]
18033
- * The size in pixels.
18034
- * @property {object} [resizeRegion.sides={top:true,right:true,bottom:true,left:true}]
18035
- * Sides that a window can be resized from.
18036
- *
18037
- * @property {boolean} [saveWindowState=true]
18038
- * A flag to cache the location of the window.
18039
- * ** note ** - This option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
18040
- *
18041
- * @property {boolean} [ignoreSavedWindowState]
18042
- * A flag to ignore previously cached state of the window. It defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
18043
- *
18044
- * @property {boolean} [shadow=false]
18045
- * A flag to display a shadow on frameless windows.
18046
- * `shadow` and `cornerRounding` are mutually exclusive.
18047
- * On Windows 7, Aero theme is required.
18048
- *
18049
- * @property {boolean} [showBackgroundImages=false] - _Updatable._
18050
- * Platforms Only. If true, will show background images in the layout when the Views are hidden.
18051
- * This occurs when the window is resizing or a tab is being dragged within the layout.
18052
- *
18053
- * @property {boolean} [showTaskbarIcon=true] - _Updatable._ _Windows_.
18054
- * A flag to show the window's icon in the taskbar.
18055
- *
18056
- * @property {boolean} [smallWindow=false]
18057
- * A flag to specify a frameless window that can be be created and resized to less than 41x36 px (width x height).
18058
- * _Note: Caveats of small windows are no Aero Snap and drag to/from maximize._
18059
- * _Windows 10: Requires `maximizable` to be false. Resizing with the mouse is only possible down to 38x39 px._
18060
- *
18061
- * @property {boolean} [spellCheck=false]
18062
- * Enable spell check in input text fields for the window.
18063
- *
18064
- * @property {string} [state="normal"]
18065
- * The visible state of the window on creation.
18066
- * One of:
18067
- * * `"maximized"`
18068
- * * `"minimized"`
18069
- * * `"normal"`
18070
- *
18071
- * @property {string} [taskbarIcon=string] - Deprecated - use `icon` instead._Windows_.
18072
- *
18073
- * @property {string} [taskbarIconGroup=<application uuid>] - _Windows_.
18074
- * Specify a taskbar group for the window.
18075
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
18076
- *
18077
- * @property {string} [url="about:blank"]
18078
- * The URL of the window.
18079
- *
18080
- * @property {string} [uuid=<application uuid>]
18081
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
18082
- * If omitted, defaults to the `uuid` of the application spawning the window.
18083
- * If given, must match the `uuid` of the application spawning the window.
18084
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
18085
- * really no need to provide it.
18086
- *
18087
- * @property {boolean} [waitForPageLoad=false]
18088
- * When set to `true`, the window will not appear until the `window` object's `load` event fires.
18089
- * When set to `false`, the window will appear immediately without waiting for content to be loaded.
18090
- *
18091
- * @property {ViewVisibility} [viewVisibility]
18092
- * _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
18093
- */
18094
- /**
18095
- * @PORTED
18096
- * @typedef {Object} ViewVisibility@typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
18097
- * @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
18098
- * @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
18099
- * @property {ShowViewsOnTabDrag} [showViewsOnTabDrag] _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
18100
- */
18101
- /**
18102
- * @PORTED
18103
- * @typedef {Object} ShowViewsOnWindowResize@typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
18104
- * @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
18105
- * @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
18106
- */
18107
- /**
18108
- * @REMOVED
18109
- * @typedef {Object} ShowViewsOnSplitterDrag@typedef {Object} ShowViewsOnSplitterDrag _Platform Windows Only_. Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
18110
- * @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
18111
- */
18112
- /**
18113
- * @REMOVED
18114
- * @typedef {Object} ShowViewsOnTabDrag@typedef {Object} ShowViewsOnTabDrag _Platform Windows Only_. Allows views to be shown when the user is manipulating the layout by repositioning a tab.
18115
- * @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
18116
- */
18117
- /**
18118
- * @PORTED
18119
- * @typedef {object} CapturePageOptions@typedef {object} CapturePageOptions
18120
- * @property { Area } [area] The area of the window to be captured.
18121
- * @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
18122
- * @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
18123
- */
18124
- /**
18125
- * @PORTED
18126
- * @typedef { object } Area@typedef { object } Area
18127
- * @property { number } height Area's height
18128
- * @property { number } width Area's width
18129
- * @property { number } x X coordinate of area's starting point
18130
- * @property { number } y Y coordinate of area's starting point
18131
- */
18132
- /**
18133
- * @PORTED
18134
- * @typedef {object} FindInPageOptions@typedef {object} FindInPageOptions
18135
- * @property {boolean} [forward=true] Whether to search forward or backward.
18136
- * @property {boolean} [findNext=false] Whether to begin a new text finding session. Should be true for first requests, and false for subsequent requests. Defaults to false.
18137
- * @property {boolean} [matchCase=false] Whether search should be case-sensitive.
18138
- * @property {boolean} [wordStart=false] Whether to look only at the start of words.
18139
- * @property {boolean} [medialCapitalAsWordStart=false]
18140
- * When combined with wordStart, accepts a match in the middle of a word if the match begins with an uppercase letter followed by a<br>
18141
- * lowercase or non-letter. Accepts several other intra-word matches.
18142
- */
18143
- /**
18144
- * @REMOVED
18145
- * @typedef {object} Transition@typedef {object} Transition
18146
- * @property {Opacity} opacity - The Opacity transition
18147
- * @property {Position} position - The Position transition
18148
- * @property {Size} size - The Size transition
18149
- */
18150
- /**
18151
- * @PORTED
18152
- * @typedef {object} TransitionOptions@typedef {object} TransitionOptions
18153
- * @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
18154
- this animation onto the end of the animation queue.
18155
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18156
- */
18157
- /**
18158
- * @PORTED
18159
- * @typedef {object} Size@typedef {object} Size
18160
- * @property {number} duration - The total time in milliseconds this transition should take.
18161
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18162
- * @property {number} width - Optional if height is present. Defaults to the window's current width.
18163
- * @property {number} height - Optional if width is present. Defaults to the window's current height.
18164
- */
18165
- /**
18166
- * @PORTED
18167
- * @typedef {object} Position@typedef {object} Position
18168
- * @property {number} duration - The total time in milliseconds this transition should take.
18169
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18170
- * @property {number} left - Defaults to the window's current left position in virtual screen coordinates.
18171
- * @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
18172
- */
18173
- /**
18174
- * @PORTED
18175
- * @typedef {object} Opacity@typedef {object} Opacity
18176
- * @property {number} duration - The total time in milliseconds this transition should take.
18177
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18178
- * @property {number} opacity - This value is clamped from 0.0 to 1.0.
18179
- */
18180
- /**
18181
- * @REMOVED
18182
- * Bounds is a interface that has the properties of height,
18183
- * width, left, top which are all numbers
18184
- * @typedef { object } Bounds@typedef { object } Bounds
18185
- * @property { number } height Get the application height bound
18186
- * @property { number } width Get the application width bound
18187
- * @property { number } top Get the application top bound
18188
- * @property { number } left Get the application left bound
18189
- * @property { number } right Get the application right bound
18190
- * @property { number } bottom Get the application bottom bound
18191
- */
18192
17166
  /**
18193
17167
  * A basic window that wraps a native HTML window. Provides more fine-grained
18194
17168
  * control over the window state such as the ability to minimize, maximize, restore, etc.
@@ -18974,10 +17948,9 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
18974
17948
  show(force?: boolean): Promise<void>;
18975
17949
  /**
18976
17950
  * Shows the window if it is hidden at the specified location.
18977
- * If the toggle parameter is set to true, the window will
18978
- * alternate between showing and hiding.
18979
- * @param left The left position of the window
18980
- * @param top The right position of the window
17951
+ *
17952
+ * @param left The left position of the window in pixels
17953
+ * @param top The top position of the window in pixels
18981
17954
  * @param force Show will be prevented from closing when force is false and
18982
17955
  * ‘show-requested’ has been subscribed to for application’s main window
18983
17956
  *
@@ -19039,28 +18012,6 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19039
18012
  * ```
19040
18013
  */
19041
18014
  authenticate(userName: string, password: string): Promise<void>;
19042
- /**
19043
- * @typedef {object} ShowPopupMenuOptions@typedef {object} ShowPopupMenuOptions
19044
- * @property {Array<MenuItemTemplate>} template - An array describing the menu to show.
19045
- * @property {number} [x] - The window x coordinate where to show the menu. Defaults to mouse position. If using must also use `y`.
19046
- * @property {number} [y] - The window y coordinate where to show the menu. Defaults to mouse position. If using must also use `x`
19047
- */
19048
- /**
19049
- * @typedef {object} MenuItemTemplate@typedef {object} MenuItemTemplate
19050
- * @property {*} data - Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
19051
- * @property {'normal' | 'separator' | 'submenu' | 'checkbox'} [type] - Defaults to 'normal' unless a 'submenu' key exists
19052
- * @property {string} [label] - The text to show on the menu item. Should be left undefined for `type: 'separator'`
19053
- * @property {boolean} [enabled] - If false, the menu item will be greyed out and unclickable.
19054
- * @property {boolean} [visible] - If false, the menu item will be entirely hidden.
19055
- * @property {boolean} [checked] - Should only be specified for `checkbox` type menu items.
19056
- * @property {string} [icon] - Image Data URI with image dimensions inferred from the encoded string
19057
- * @property {Array<MenuItemTemplate>} [submenu] Should be specified for `submenu` type menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.
19058
- */
19059
- /**
19060
- * @typedef {object} MenuResult@typedef {object} MenuResult
19061
- * @property {'clicked' | 'closed'} result - Whether the user clicked on a menu item or the menu was closed (user clicked elsewhere).
19062
- * @property {* | undefined} [data] - The data property of the menu item clicked by the user. Only defined if result was `clicked`.
19063
- */
19064
18015
  /**
19065
18016
  * Shows a menu on the window.
19066
18017
  *
@@ -19157,577 +18108,552 @@ declare class _Window extends WebContents<OpenFin_2.WindowEvent> {
19157
18108
  */
19158
18109
  closePopupMenu(): Promise<void>;
19159
18110
  /**
19160
- * @PORTED
19161
- * @typedef {object} PopupOptions@typedef {object} PopupOptions
19162
- * @property {string} [name] - If a window with this `name` exists, it will be shown as a popup. Otherwise, a new window with this `name` will be created. If this `name` is undefined, `initialOptions.name` will be used. If this `name` and `intialOptions.name` are both undefined, a `name` will be generated.
19163
- * @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
19164
- * @property {Window~options} [initialOptions] - Window creation options when using `showPopupWindow` to create a new window.
19165
- * @property {Window~options} [additionalOptions] - Updatable window options applied to new and existing windows when shown as popups.
19166
- * @property {function} [onPopupResult] - Executed when this window's popup calls `dispatchPopupResult`. Note: if this is defined, `showPopupWindow` will not return a `PopupResult`.
19167
- * @property {function} [onPopupReady] - Executed when the popup window is shown. Provides the popup window to the provided function, and allows for easy access the popup window for additional behavior customization.
19168
- * @property {number} [height] - Height of the popup window (takes priority over `intialOptions` size properties).
19169
- * @property {number} [width] - Width of the popup window (takes priority over `intialOptions` size properties).
19170
- * @property {number} [x] - Left position where the popup window will be shown (relative to the window calling `showPopupWindow`).
19171
- * @property {number} [y] - Top position where the popup window will be shown (relative to the window calling `showPopupWindow`).
19172
- * @property {'modal' | 'hide' | 'close'} [blurBehavior] - Determines what happens if the popup window is blurred. 'modal' restricts resizing and positioning in the caller, 'hide' hides the popup window on blur and 'close' closes the popup window on blur.
19173
- * @property {'none' | 'hide' | 'close'} [resultDispatchBehavior] - Determines what happens when the popup window calls `dispatchPopupResult`. 'none' will do nothing, 'hide' hides the popup window on `dispatchPopupResult` and 'close' closes the popup window on `dispatchPopupResult`.
19174
- * @property {boolean} [focus] - Determines if the popup window should or should not be focused when it is shown.
19175
- * @property {boolean} [hideOnClose] - Hide the popup window instead of closing whenever `close` is called on it. Note: if this is `true` and `blurBehavior` and/or `resultDispatchBehavior` are set to `close`, the window will be hidden.
19176
- */
19177
- /**
19178
- * @PORTED
19179
- * @typedef {object} PopupResult@typedef {object} PopupResult
19180
- * @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
19181
- * @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
19182
- * @property {* | undefined} [data] - Data passed to `dispatchPopupResult`.
19183
- */
19184
- /**
19185
- * Dispatch a result to the caller of `showPopupWindow`.
19186
- *
19187
- * @remarks If this window isn't currently being shown as a popup, this call will silently fail.
19188
- * @param data Serializable data to send to the caller window.
19189
- *
19190
- * @example
19191
- * ```js
19192
- * await fin.me.dispatchPopupResult({
19193
- * foo: 'bar'
19194
- * });
19195
- * ```
19196
- */
19197
- dispatchPopupResult(data: any): Promise<void>;
19198
- /**
19199
- * Prints the contents of the window.
19200
- *
19201
- * @param options Configuration for the print task.
19202
- * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName is empty
19203
- * and the default settings for printing.
19204
- *
19205
- * Use the CSS style `page-break-before: always;` to force print to a new page.
19206
- *
19207
- * @example
19208
- * ```js
19209
- * const win = fin.Window.getCurrentSync();
19210
- *
19211
- * win.print({ silent: false, deviceName: 'system-printer-name' }).then(() => {
19212
- * console.log('print call has been sent to the system');
19213
- * });
19214
- * ```
19215
- *
19216
- * If a window has embedded views, those views will not print by default. To print a window's contents including embedded views,
19217
- * use the `content` option:
19218
- *
19219
- * ```js
19220
- * const win = fin.Window.getCurrentSync();
19221
- *
19222
- * // Print embedded views
19223
- * win.print({ content: 'views' });
19224
- *
19225
- * // Print screenshot of current window
19226
- * win.print({ content: 'screenshot' })
19227
- * ```
19228
- *
19229
- * When `content` is set to `views`, the embedded views in the platform window will be concatenated and printed as
19230
- * individual pages. If `includeSelf` is set to `true`, the platform window itself will be printed as the first
19231
- * page - be aware that this page will *not* include the embedded views - it will only include the contents of
19232
- * the platform window itself (e.g. tab stacks), with blank spaces where the view contents would be embedded.
19233
- *
19234
- * Due to a known issue, view contents that are not visible at the time `print` is called will not appear when
19235
- * printing `contents: views`. This includes views that are obscured behind other active UI elements.
19236
- *
19237
- * To print the views embedded in their page context, set `content` to `screenshot`.
19238
- */
19239
- print(options?: OpenFin_2.WindowPrintOptions): Promise<void>;
19240
- }
19241
-
19242
- /**
19243
- * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
19244
- * @interface
19245
- */
19246
- declare type WindowAlertRequestedEvent = BaseApplicationEvent & {
19247
- type: 'window-alert-requested';
19248
- };
19249
-
19250
- /**
19251
- * Returned from getBounds call. bottom and right are never used for setting.
19252
- * @interface
19253
- */
19254
- declare type WindowBounds = Bounds & {
19255
- bottom: number;
19256
- right: number;
19257
- };
19258
-
19259
- /**
19260
- * @deprecated Renamed to {@link ClosedEvent}.
19261
- */
19262
- declare type WindowClosedEvent = ClosedEvent_2;
19263
-
19264
- /**
19265
- * @deprecated Renamed to {@link CloseRequestedEvent}.
19266
- */
19267
- declare type WindowCloseRequestedEvent = CloseRequestedEvent;
19268
-
19269
- /**
19270
- * @deprecated Renamed to {@link ClosingEvent}.
19271
- */
19272
- declare type WindowClosingEvent = ClosingEvent;
19273
-
19274
- /**
19275
- * A rule prescribing content creation in a {@link OpenFin.Window}.
19276
- *
19277
- * @interface
19278
- */
19279
- declare type WindowContentCreationRule = BaseContentCreationRule & {
19280
- /**
19281
- * Behavior to use when opening matched content.
19282
- */
19283
- behavior: 'window';
19284
- /**
19285
- * Options for newly-created window.
19286
- */
19287
- options?: Partial<WindowOptions>;
19288
- };
19289
-
19290
- /**
19291
- * Generated when a child window is created.
19292
- * @interface
19293
- */
19294
- declare type WindowCreatedEvent = BaseApplicationEvent & {
19295
- type: 'window-created';
19296
- };
19297
-
19298
- /**
19299
- * Options required to create a new window with {@link Window._WindowModule.create Window.create}.
19300
- *
19301
- * Note that `name` is the only required property — albeit the `url` property is usually provided as well
19302
- * (defaults to `"about:blank"` when omitted).
19303
- * @interface
19304
- */
19305
- declare type WindowCreationOptions = Partial<WindowOptions> & {
19306
- name: string;
19307
- };
19308
-
19309
- declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
19310
-
19311
- /**
19312
- * @interface
19313
- */
19314
- declare type WindowDetail = {
19315
- /**
19316
- * The bottom-most coordinate of the window.
19317
- */
19318
- bottom: number;
19319
- /**
19320
- * The height of the window.
19321
- */
19322
- height: number;
19323
- isShowing: boolean;
19324
- /**
19325
- * The left-most coordinate of the window.
19326
- */
19327
- left: number;
19328
- /**
19329
- * The name of the window.
19330
- */
19331
- name: string;
19332
- /**
19333
- * The right-most coordinate of the window.
19334
- */
19335
- right: number;
19336
- state: string;
19337
- /**
19338
- * The top-most coordinate of the window.
19339
- */
19340
- top: number;
19341
- /**
19342
- * The width of the window.
19343
- */
19344
- width: number;
19345
- };
19346
-
19347
- /**
19348
- * Generated when a child window ends loading.
19349
- * @interface
19350
- */
19351
- declare type WindowEndLoadEvent = BaseApplicationEvent & {
19352
- type: 'window-end-load';
19353
- };
19354
-
19355
- /**
19356
- * @deprecated, Renamed to {@link Event}.
19357
- */
19358
- declare type WindowEvent = Event_6;
19359
-
19360
- declare type WindowEvent_2 = Events.WindowEvents.WindowEvent;
19361
-
19362
- declare namespace WindowEvents {
19363
- export {
19364
- BaseEvent_5 as BaseEvent,
19365
- BaseWindowEvent,
19366
- ViewAttachedEvent,
19367
- ViewDetachedEvent,
19368
- WindowViewEvent,
19369
- AlertRequestedEvent,
19370
- AuthRequestedEvent,
19371
- EndLoadEvent,
19372
- WillRedirectEvent,
19373
- ReloadedEvent,
19374
- OptionsChangedEvent,
19375
- WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
19376
- ExternalProcessExitedEvent,
19377
- ExternalProcessStartedEvent,
19378
- HiddenEvent_2 as HiddenEvent,
19379
- WindowHiddenEvent,
19380
- PreloadScriptInfoRunning,
19381
- PreloadScriptInfo,
19382
- PreloadScriptsStateChangeEvent,
19383
- UserBoundsChangeEvent,
19384
- BoundsChangeEvent,
19385
- WillMoveOrResizeEvent,
19386
- PerformanceReportEvent,
19387
- InputEvent_2 as InputEvent,
19388
- LayoutInitializedEvent,
19389
- LayoutReadyEvent,
19390
- BeginUserBoundsChangingEvent,
19391
- BoundsChangedEvent,
19392
- BoundsChangingEvent,
19393
- CloseRequestedEvent,
19394
- WindowCloseRequestedEvent,
19395
- ContextChangedEvent,
19396
- ClosedEvent_2 as ClosedEvent,
19397
- WindowClosedEvent,
19398
- ClosingEvent,
19399
- WindowClosingEvent,
19400
- DisabledMovementBoundsChangedEvent,
19401
- DisabledMovementBoundsChangingEvent,
19402
- EmbeddedEvent,
19403
- EndUserBoundsChangingEvent,
19404
- HotkeyEvent_2 as HotkeyEvent,
19405
- WindowHotkeyEvent,
19406
- InitializedEvent_2 as InitializedEvent,
19407
- WindowInitializedEvent,
19408
- MaximizedEvent,
19409
- MinimizedEvent,
19410
- PreloadScriptsStateChangedEvent,
19411
- PreloadScriptsStateChangingEvent,
19412
- RestoredEvent,
19413
- WindowRestoredEvent,
19414
- ShowRequestedEvent,
19415
- WindowShowRequestedEvent,
19416
- ShownEvent_2 as ShownEvent,
19417
- WindowShownEvent,
19418
- UserMovementEnabledEvent,
19419
- UserMovementDisabledEvent,
19420
- WillMoveEvent,
19421
- WillResizeEvent,
19422
- NonPropagatedWindowEvent,
19423
- ShowAllDownloadsEvent,
19424
- DownloadShelfVisibilityChangedEvent,
19425
- WindowSourcedEvent,
19426
- WillPropagateWindowEvent,
19427
- Event_6 as Event,
19428
- WindowEvent,
19429
- EventType_2 as EventType,
19430
- WindowEventType,
19431
- PropagatedEvent_3 as PropagatedEvent,
19432
- PropagatedWindowEvent,
19433
- PropagatedWindowEventType,
19434
- Payload_3 as Payload,
19435
- ByType_2 as ByType
19436
- }
19437
- }
19438
-
19439
- /**
19440
- * @deprecated Renamed to {@link EventType}.
19441
- */
19442
- declare type WindowEventType = WindowEvent['type'];
19443
-
19444
- /**
19445
- * @deprecated Renamed to {@link HiddenEvent}.
19446
- */
19447
- declare type WindowHiddenEvent = HiddenEvent_2;
19448
-
19449
- /**
19450
- * @deprecated Renamed to {@link HotkeyEvent}.
19451
- */
19452
- declare type WindowHotkeyEvent = HotkeyEvent_2;
19453
-
19454
- /**
19455
- * @interface
19456
- */
19457
- declare type WindowInfo = {
19458
- canNavigateBack: boolean;
19459
- canNavigateForward: boolean;
19460
- preloadScripts: Array<any>;
19461
- title: string;
19462
- url: string;
19463
- };
19464
-
19465
- /**
19466
- * @deprecated Renamed to {@link InitializedEvent}.
19467
- */
19468
- declare type WindowInitializedEvent = InitializedEvent_2;
19469
-
19470
- /**
19471
- * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
19472
- */
19473
- declare class _WindowModule extends Base {
19474
- /**
19475
- * Asynchronously returns a Window object that represents an existing window.
19476
- *
19477
- * @example
19478
- * ```js
19479
- * async function createWin() {
19480
- * const app = await fin.Application.start({
19481
- * name: 'myApp',
19482
- * uuid: 'app-1',
19483
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
19484
- * autoShow: true
19485
- * });
19486
- * return await app.getWindow();
19487
- * }
19488
- * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
19489
- * .then(win => console.log('wrapped window'))
19490
- * .catch(err => console.log(err));
19491
- * ```
19492
- */
19493
- wrap(identity: OpenFin_2.Identity): Promise<OpenFin_2.Window>;
19494
- /**
19495
- * Synchronously returns a Window object that represents an existing window.
19496
- *
19497
- * @example
19498
- * ```js
19499
- * async function createWin() {
19500
- * const app = await fin.Application.start({
19501
- * name: 'myApp',
19502
- * uuid: 'app-1',
19503
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
19504
- * autoShow: true
19505
- * });
19506
- * return await app.getWindow();
19507
- * }
19508
- * await createWin();
19509
- * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
19510
- * ```
19511
- */
19512
- wrapSync(identity: OpenFin_2.Identity): OpenFin_2.Window;
19513
- /**
19514
- * Creates a new Window.
19515
- * @param options - Window creation options
19516
- *
19517
- * @example
19518
- * ```js
19519
- * async function createWindow() {
19520
- * const winOption = {
19521
- * name:'child',
19522
- * defaultWidth: 300,
19523
- * defaultHeight: 300,
19524
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
19525
- * frame: true,
19526
- * autoShow: true
19527
- * };
19528
- * return await fin.Window.create(winOption);
19529
- * }
19530
- *
19531
- * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
19532
- * ```
19533
- */
19534
- create(options: OpenFin_2.WindowCreationOptions): Promise<OpenFin_2.Window>;
19535
- /**
19536
- * Asynchronously returns a Window object that represents the current window
19537
- *
19538
- * @example
19539
- * ```js
19540
- * fin.Window.getCurrent()
19541
- * .then(wnd => console.log('current window'))
19542
- * .catch(err => console.log(err));
19543
- *
19544
- * ```
19545
- */
19546
- getCurrent(): Promise<OpenFin_2.Window>;
19547
- /**
19548
- * Synchronously returns a Window object that represents the current window
19549
- *
19550
- * @example
19551
- * ```js
19552
- * const wnd = fin.Window.getCurrentSync();
19553
- * const info = await wnd.getInfo();
19554
- * console.log(info);
19555
- *
19556
- * ```
19557
- */
19558
- getCurrentSync(): OpenFin_2.Window;
19559
- }
19560
-
19561
- /**
19562
- * Generated when a child window is not responding.
19563
- * @interface
19564
- */
19565
- declare type WindowNotRespondingEvent = BaseApplicationEvent & {
19566
- type: 'window-not-responding';
19567
- };
19568
-
19569
- /**
19570
- * @interface
19571
- */
19572
- declare type WindowOptionDiff = {
19573
- [key in keyof WindowOptions]: {
19574
- oldVal: WindowOptions[key];
19575
- newVal: WindowOptions[key];
19576
- };
19577
- };
19578
-
19579
- /**
19580
- * @interface
19581
- */
19582
- declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
19583
-
19584
- declare type WindowOptionsChangedEvent = OpenFin_2.WindowEvents.WindowOptionsChangedEvent;
19585
-
19586
- /**
19587
- * @deprecated Renamed to {@link OptionsChangedEvent}.
19588
- */
19589
- declare type WindowOptionsChangedEvent_2 = OptionsChangedEvent;
19590
-
19591
- declare type WindowPrintOptions = PrintOptions | ScreenshotPrintOptions | WindowViewsPrintOptions;
19592
-
19593
- /**
19594
- * Generated when a child window is responding.
19595
- * @interface
19596
- */
19597
- declare type WindowRespondingEvent = BaseApplicationEvent & {
19598
- type: 'window-responding';
19599
- };
19600
-
19601
- /**
19602
- * @deprecated Renamed to {@link RestoredEvent}.
19603
- */
19604
- declare type WindowRestoredEvent = RestoredEvent;
19605
-
19606
- /**
19607
- * @deprecated Renamed to {@link ShownEvent}.
19608
- */
19609
- declare type WindowShownEvent = ShownEvent_2;
19610
-
19611
- /**
19612
- * @deprecated Renamed to {@link ShowRequestedEvent}.
19613
- */
19614
- declare type WindowShowRequestedEvent = ShowRequestedEvent;
19615
-
19616
- /**
19617
- * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
19618
- * from {@link OpenFin.ViewEvents}.
19619
- */
19620
- declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
19621
-
19622
- /**
19623
- * Generated when a child window starts loading.
19624
- * @interface
19625
- */
19626
- declare type WindowStartLoadEvent = BaseApplicationEvent & {
19627
- type: 'window-start-load';
19628
- };
19629
-
19630
- /**
19631
- * Visibility state of a window.
19632
- */
19633
- declare type WindowState = 'maximized' | 'minimized' | 'normal';
19634
-
19635
- /**
19636
- * A view-related event that fires natively on the `Window` topic. This means that these events *do* propagate
19637
- * to the `Application` level, with the name pattern `window-view-eventname`.
19638
- */
19639
- declare type WindowViewEvent = {
19640
- viewIdentity: OpenFin_2.Identity;
19641
- } & (ViewAttachedEvent | ViewDetachedEvent);
19642
-
19643
- /**
19644
- * @interface
19645
- */
19646
- declare type WindowViewsPrintOptions = {
19647
- content: 'views';
19648
- includeSelf?: boolean;
19649
- };
19650
-
19651
- declare type Wire = EventEmitter & {
19652
- connect(messageReciever: MessageReceiver): Promise<any>;
19653
- connectSync(): any;
19654
- send(data: any): Promise<any>;
19655
- shutdown(): Promise<void>;
19656
- getPort(): string;
19657
- };
19658
-
19659
- declare type WireConstructor = {
19660
- new (onmessage: (data: any) => void): Wire;
19661
- };
19662
-
19663
- /* Excluded from this release type: WithId */
19664
-
19665
- declare interface WithInterop {
19666
- interop: InteropClient;
19667
- }
19668
-
19669
- /* Excluded from this release type: WithoutId */
19670
-
19671
- declare type WithPositioningOptions<T extends {} = {}> = T & {
19672
- positioningOptions?: OpenFin_2.PositioningOptions;
19673
- };
19674
-
19675
- /* Excluded from this release type: WorkspacePlatformOptions */
19676
-
19677
- /**
19678
- * A generic request to write any supported data to the clipboard.
19679
- * @interface
19680
- */
19681
- declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
19682
- /**
19683
- * Data to be written
19684
- */
19685
- data: {
19686
- text?: string;
19687
- html?: string;
19688
- rtf?: string;
19689
- } & Partial<Pick<WriteImageClipboardRequest, 'image'>>;
19690
- };
19691
-
19692
- /**
19693
- * @deprecated - instead use WriteAnyClipboardRequest
19694
- *
19695
- * A generic request to write any supported data to the clipboard.
19696
- *
19697
- * @interface
19698
- */
19699
- declare type WriteAnyRequestType = WriteAnyClipboardRequest;
19700
-
19701
- /**
19702
- * A request to write data to the clipboard.
19703
- * @interface
19704
- */
19705
- declare type WriteClipboardRequest = BaseClipboardRequest & {
19706
- /**
19707
- * Data to write to the clipboard.
19708
- */
19709
- data: string;
19710
- };
19711
-
19712
- /**
19713
- * @interface
19714
- */
19715
- declare type WriteImageClipboardRequest = BaseClipboardRequest & {
19716
- /**
19717
- * Can be either a base64 string, or a DataURL string. If using DataURL, the
19718
- * supported formats are `data:image/png[;base64],` and `data:image/jpeg[;base64],`.
19719
- * Using other image/<format> DataURLs will throw an Error.
19720
- */
19721
- image: string;
19722
- };
19723
-
19724
- /**
19725
- * @deprecated - instead use OpenFin.WriteClipboardRequest
19726
- *
19727
- * A request to write data to the clipboard.
19728
- *
19729
- * @interface
19730
- */
19731
- declare type WriteRequestType = WriteClipboardRequest;
19732
-
19733
- export { }
18111
+ * Dispatch a result to the caller of `showPopupWindow`.
18112
+ *
18113
+ * @remarks If this window isn't currently being shown as a popup, this call will silently fail.
18114
+ * @param data Serializable data to send to the caller window.
18115
+ *
18116
+ * @example
18117
+ * ```js
18118
+ * await fin.me.dispatchPopupResult({
18119
+ * foo: 'bar'
18120
+ * });
18121
+ * ```
18122
+ */
18123
+ dispatchPopupResult(data: any): Promise<void>;
18124
+ /**
18125
+ * Prints the contents of the window.
18126
+ *
18127
+ * @param options Configuration for the print task.
18128
+ * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName is empty
18129
+ * and the default settings for printing.
18130
+ *
18131
+ * Use the CSS style `page-break-before: always;` to force print to a new page.
18132
+ *
18133
+ * @example
18134
+ * ```js
18135
+ * const win = fin.Window.getCurrentSync();
18136
+ *
18137
+ * win.print({ silent: false, deviceName: 'system-printer-name' }).then(() => {
18138
+ * console.log('print call has been sent to the system');
18139
+ * });
18140
+ * ```
18141
+ *
18142
+ * If a window has embedded views, those views will not print by default. To print a window's contents including embedded views,
18143
+ * use the `content` option:
18144
+ *
18145
+ * ```js
18146
+ * const win = fin.Window.getCurrentSync();
18147
+ *
18148
+ * // Print embedded views
18149
+ * win.print({ content: 'views' });
18150
+ *
18151
+ * // Print screenshot of current window
18152
+ * win.print({ content: 'screenshot' })
18153
+ * ```
18154
+ *
18155
+ * When `content` is set to `views`, the embedded views in the platform window will be concatenated and printed as
18156
+ * individual pages. If `includeSelf` is set to `true`, the platform window itself will be printed as the first
18157
+ * page - be aware that this page will *not* include the embedded views - it will only include the contents of
18158
+ * the platform window itself (e.g. tab stacks), with blank spaces where the view contents would be embedded.
18159
+ *
18160
+ * Due to a known issue, view contents that are not visible at the time `print` is called will not appear when
18161
+ * printing `contents: views`. This includes views that are obscured behind other active UI elements.
18162
+ *
18163
+ * To print the views embedded in their page context, set `content` to `screenshot`.
18164
+ */
18165
+ print(options?: OpenFin_2.WindowPrintOptions): Promise<void>;
18166
+ }
18167
+
18168
+ /**
18169
+ * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
18170
+ * @interface
18171
+ */
18172
+ declare type WindowAlertRequestedEvent = BaseEvent_3 & {
18173
+ type: 'window-alert-requested';
18174
+ };
18175
+
18176
+ /**
18177
+ * Returned from getBounds call. bottom and right are never used for setting.
18178
+ * @interface
18179
+ */
18180
+ declare type WindowBounds = Bounds & {
18181
+ bottom: number;
18182
+ right: number;
18183
+ };
18184
+
18185
+ /**
18186
+ * @deprecated Renamed to {@link ClosedEvent}.
18187
+ */
18188
+ declare type WindowClosedEvent = ClosedEvent_2;
18189
+
18190
+ /**
18191
+ * @deprecated Renamed to {@link CloseRequestedEvent}.
18192
+ */
18193
+ declare type WindowCloseRequestedEvent = CloseRequestedEvent;
18194
+
18195
+ /**
18196
+ * @deprecated Renamed to {@link ClosingEvent}.
18197
+ */
18198
+ declare type WindowClosingEvent = ClosingEvent;
18199
+
18200
+ /**
18201
+ * A rule prescribing content creation in a {@link OpenFin.Window}.
18202
+ *
18203
+ * @interface
18204
+ */
18205
+ declare type WindowContentCreationRule = BaseContentCreationRule & {
18206
+ /**
18207
+ * Behavior to use when opening matched content.
18208
+ */
18209
+ behavior: 'window';
18210
+ /**
18211
+ * Options for newly-created window.
18212
+ */
18213
+ options?: Partial<WindowOptions>;
18214
+ };
18215
+
18216
+ /**
18217
+ * Generated when a child window is created.
18218
+ * @interface
18219
+ */
18220
+ declare type WindowCreatedEvent = BaseEvent_3 & {
18221
+ type: 'window-created';
18222
+ };
18223
+
18224
+ /**
18225
+ * Options required to create a new window with {@link Window._WindowModule.create Window.create}.
18226
+ *
18227
+ * Note that `name` is the only required property — albeit the `url` property is usually provided as well
18228
+ * (defaults to `"about:blank"` when omitted).
18229
+ * @interface
18230
+ */
18231
+ declare type WindowCreationOptions = Partial<WindowOptions> & {
18232
+ name: string;
18233
+ };
18234
+
18235
+ declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
18236
+
18237
+ /**
18238
+ * @interface
18239
+ */
18240
+ declare type WindowDetail = {
18241
+ /**
18242
+ * The bottom-most coordinate of the window.
18243
+ */
18244
+ bottom: number;
18245
+ /**
18246
+ * The height of the window.
18247
+ */
18248
+ height: number;
18249
+ isShowing: boolean;
18250
+ /**
18251
+ * The left-most coordinate of the window.
18252
+ */
18253
+ left: number;
18254
+ /**
18255
+ * The name of the window.
18256
+ */
18257
+ name: string;
18258
+ /**
18259
+ * The right-most coordinate of the window.
18260
+ */
18261
+ right: number;
18262
+ state: string;
18263
+ /**
18264
+ * The top-most coordinate of the window.
18265
+ */
18266
+ top: number;
18267
+ /**
18268
+ * The width of the window.
18269
+ */
18270
+ width: number;
18271
+ };
18272
+
18273
+ /**
18274
+ * Generated when a child window ends loading.
18275
+ * @interface
18276
+ */
18277
+ declare type WindowEndLoadEvent = BaseEvent_3 & {
18278
+ type: 'window-end-load';
18279
+ };
18280
+
18281
+ /**
18282
+ * @deprecated, Renamed to {@link Event}.
18283
+ */
18284
+ declare type WindowEvent = Event_6;
18285
+
18286
+ declare type WindowEvent_2 = Events.WindowEvents.WindowEvent;
18287
+
18288
+ declare namespace WindowEvents {
18289
+ export {
18290
+ BaseEvent_5 as BaseEvent,
18291
+ BaseWindowEvent,
18292
+ ViewAttachedEvent,
18293
+ ViewDetachedEvent,
18294
+ WindowViewEvent,
18295
+ AlertRequestedEvent,
18296
+ AuthRequestedEvent,
18297
+ EndLoadEvent,
18298
+ WillRedirectEvent,
18299
+ ReloadedEvent,
18300
+ OptionsChangedEvent,
18301
+ WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
18302
+ ExternalProcessExitedEvent,
18303
+ ExternalProcessStartedEvent,
18304
+ HiddenEvent_2 as HiddenEvent,
18305
+ WindowHiddenEvent,
18306
+ PreloadScriptInfoRunning,
18307
+ PreloadScriptInfo,
18308
+ PreloadScriptsStateChangeEvent,
18309
+ UserBoundsChangeEvent,
18310
+ BoundsChangeEvent,
18311
+ WillMoveOrResizeEvent,
18312
+ PerformanceReportEvent,
18313
+ InputEvent_2 as InputEvent,
18314
+ LayoutInitializedEvent,
18315
+ LayoutReadyEvent,
18316
+ BeginUserBoundsChangingEvent,
18317
+ BoundsChangedEvent,
18318
+ BoundsChangingEvent,
18319
+ CloseRequestedEvent,
18320
+ WindowCloseRequestedEvent,
18321
+ ContextChangedEvent,
18322
+ ClosedEvent_2 as ClosedEvent,
18323
+ WindowClosedEvent,
18324
+ ClosingEvent,
18325
+ WindowClosingEvent,
18326
+ DisabledMovementBoundsChangedEvent,
18327
+ DisabledMovementBoundsChangingEvent,
18328
+ EmbeddedEvent,
18329
+ EndUserBoundsChangingEvent,
18330
+ HotkeyEvent_2 as HotkeyEvent,
18331
+ WindowHotkeyEvent,
18332
+ InitializedEvent_2 as InitializedEvent,
18333
+ WindowInitializedEvent,
18334
+ MaximizedEvent,
18335
+ MinimizedEvent,
18336
+ PreloadScriptsStateChangedEvent,
18337
+ PreloadScriptsStateChangingEvent,
18338
+ RestoredEvent,
18339
+ WindowRestoredEvent,
18340
+ ShowRequestedEvent,
18341
+ WindowShowRequestedEvent,
18342
+ ShownEvent_2 as ShownEvent,
18343
+ WindowShownEvent,
18344
+ UserMovementEnabledEvent,
18345
+ UserMovementDisabledEvent,
18346
+ WillMoveEvent,
18347
+ WillResizeEvent,
18348
+ NonPropagatedWindowEvent,
18349
+ ShowAllDownloadsEvent,
18350
+ DownloadShelfVisibilityChangedEvent,
18351
+ WindowSourcedEvent,
18352
+ WillPropagateWindowEvent,
18353
+ Event_6 as Event,
18354
+ WindowEvent,
18355
+ EventType_2 as EventType,
18356
+ WindowEventType,
18357
+ PropagatedEvent_3 as PropagatedEvent,
18358
+ PropagatedWindowEvent,
18359
+ PropagatedWindowEventType,
18360
+ Payload_3 as Payload,
18361
+ ByType_2 as ByType
18362
+ }
18363
+ }
18364
+
18365
+ /**
18366
+ * @deprecated Renamed to {@link EventType}.
18367
+ */
18368
+ declare type WindowEventType = WindowEvent['type'];
18369
+
18370
+ /**
18371
+ * @deprecated Renamed to {@link HiddenEvent}.
18372
+ */
18373
+ declare type WindowHiddenEvent = HiddenEvent_2;
18374
+
18375
+ /**
18376
+ * @deprecated Renamed to {@link HotkeyEvent}.
18377
+ */
18378
+ declare type WindowHotkeyEvent = HotkeyEvent_2;
18379
+
18380
+ /**
18381
+ * @interface
18382
+ */
18383
+ declare type WindowInfo = {
18384
+ canNavigateBack: boolean;
18385
+ canNavigateForward: boolean;
18386
+ preloadScripts: Array<any>;
18387
+ title: string;
18388
+ url: string;
18389
+ };
18390
+
18391
+ /**
18392
+ * @deprecated Renamed to {@link InitializedEvent}.
18393
+ */
18394
+ declare type WindowInitializedEvent = InitializedEvent_2;
18395
+
18396
+ /**
18397
+ * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
18398
+ */
18399
+ declare class _WindowModule extends Base {
18400
+ /**
18401
+ * Asynchronously returns a Window object that represents an existing window.
18402
+ *
18403
+ * @example
18404
+ * ```js
18405
+ * async function createWin() {
18406
+ * const app = await fin.Application.start({
18407
+ * name: 'myApp',
18408
+ * uuid: 'app-1',
18409
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
18410
+ * autoShow: true
18411
+ * });
18412
+ * return await app.getWindow();
18413
+ * }
18414
+ * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
18415
+ * .then(win => console.log('wrapped window'))
18416
+ * .catch(err => console.log(err));
18417
+ * ```
18418
+ */
18419
+ wrap(identity: OpenFin_2.Identity): Promise<OpenFin_2.Window>;
18420
+ /**
18421
+ * Synchronously returns a Window object that represents an existing window.
18422
+ *
18423
+ * @example
18424
+ * ```js
18425
+ * async function createWin() {
18426
+ * const app = await fin.Application.start({
18427
+ * name: 'myApp',
18428
+ * uuid: 'app-1',
18429
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
18430
+ * autoShow: true
18431
+ * });
18432
+ * return await app.getWindow();
18433
+ * }
18434
+ * await createWin();
18435
+ * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
18436
+ * ```
18437
+ */
18438
+ wrapSync(identity: OpenFin_2.Identity): OpenFin_2.Window;
18439
+ /**
18440
+ * Creates a new Window.
18441
+ * @param options - Window creation options
18442
+ *
18443
+ * @example
18444
+ * ```js
18445
+ * async function createWindow() {
18446
+ * const winOption = {
18447
+ * name:'child',
18448
+ * defaultWidth: 300,
18449
+ * defaultHeight: 300,
18450
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
18451
+ * frame: true,
18452
+ * autoShow: true
18453
+ * };
18454
+ * return await fin.Window.create(winOption);
18455
+ * }
18456
+ *
18457
+ * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
18458
+ * ```
18459
+ */
18460
+ create(options: OpenFin_2.WindowCreationOptions): Promise<OpenFin_2.Window>;
18461
+ /**
18462
+ * Asynchronously returns a Window object that represents the current window
18463
+ *
18464
+ * @example
18465
+ * ```js
18466
+ * fin.Window.getCurrent()
18467
+ * .then(wnd => console.log('current window'))
18468
+ * .catch(err => console.log(err));
18469
+ *
18470
+ * ```
18471
+ */
18472
+ getCurrent(): Promise<OpenFin_2.Window>;
18473
+ /**
18474
+ * Synchronously returns a Window object that represents the current window
18475
+ *
18476
+ * @example
18477
+ * ```js
18478
+ * const wnd = fin.Window.getCurrentSync();
18479
+ * const info = await wnd.getInfo();
18480
+ * console.log(info);
18481
+ *
18482
+ * ```
18483
+ */
18484
+ getCurrentSync(): OpenFin_2.Window;
18485
+ }
18486
+
18487
+ /**
18488
+ * Generated when a child window is not responding.
18489
+ * @interface
18490
+ */
18491
+ declare type WindowNotRespondingEvent = BaseEvent_3 & {
18492
+ type: 'window-not-responding';
18493
+ };
18494
+
18495
+ /**
18496
+ * @interface
18497
+ */
18498
+ declare type WindowOptionDiff = {
18499
+ [key in keyof WindowOptions]: {
18500
+ oldVal: WindowOptions[key];
18501
+ newVal: WindowOptions[key];
18502
+ };
18503
+ };
18504
+
18505
+ /**
18506
+ * @interface
18507
+ */
18508
+ declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
18509
+
18510
+ declare type WindowOptionsChangedEvent = OpenFin_2.WindowEvents.WindowOptionsChangedEvent;
18511
+
18512
+ /**
18513
+ * @deprecated Renamed to {@link OptionsChangedEvent}.
18514
+ */
18515
+ declare type WindowOptionsChangedEvent_2 = OptionsChangedEvent;
18516
+
18517
+ declare type WindowPrintOptions = PrintOptions | ScreenshotPrintOptions | WindowViewsPrintOptions;
18518
+
18519
+ /**
18520
+ * Generated when a child window is responding.
18521
+ * @interface
18522
+ */
18523
+ declare type WindowRespondingEvent = BaseEvent_3 & {
18524
+ type: 'window-responding';
18525
+ };
18526
+
18527
+ /**
18528
+ * @deprecated Renamed to {@link RestoredEvent}.
18529
+ */
18530
+ declare type WindowRestoredEvent = RestoredEvent;
18531
+
18532
+ /**
18533
+ * @deprecated Renamed to {@link ShownEvent}.
18534
+ */
18535
+ declare type WindowShownEvent = ShownEvent_2;
18536
+
18537
+ /**
18538
+ * @deprecated Renamed to {@link ShowRequestedEvent}.
18539
+ */
18540
+ declare type WindowShowRequestedEvent = ShowRequestedEvent;
18541
+
18542
+ /**
18543
+ * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18544
+ * from {@link OpenFin.ViewEvents}.
18545
+ */
18546
+ declare type WindowSourcedEvent = WebContentsEvents.Event<'window'> | WindowViewEvent | AuthRequestedEvent | BeginUserBoundsChangingEvent | BoundsChangedEvent | BoundsChangingEvent | ContextChangedEvent | CloseRequestedEvent | ClosedEvent_2 | ClosingEvent | DisabledMovementBoundsChangedEvent | DisabledMovementBoundsChangingEvent | EmbeddedEvent | EndUserBoundsChangingEvent | ExternalProcessExitedEvent | ExternalProcessStartedEvent | HiddenEvent_2 | HotkeyEvent_2 | InitializedEvent_2 | LayoutInitializedEvent | LayoutReadyEvent | MaximizedEvent | MinimizedEvent | OptionsChangedEvent | PerformanceReportEvent | PreloadScriptsStateChangedEvent | PreloadScriptsStateChangingEvent | ReloadedEvent | RestoredEvent | ShowRequestedEvent | ShownEvent_2 | UserMovementDisabledEvent | UserMovementEnabledEvent | WillMoveEvent | WillRedirectEvent | WillResizeEvent | ShowAllDownloadsEvent | DownloadShelfVisibilityChangedEvent;
18547
+
18548
+ /**
18549
+ * Generated when a child window starts loading.
18550
+ * @interface
18551
+ */
18552
+ declare type WindowStartLoadEvent = BaseEvent_3 & {
18553
+ type: 'window-start-load';
18554
+ };
18555
+
18556
+ /**
18557
+ * Visibility state of a window.
18558
+ */
18559
+ declare type WindowState = 'maximized' | 'minimized' | 'normal';
18560
+
18561
+ /**
18562
+ * A view-related event that fires natively on the `Window` topic. This means that these events *do* propagate
18563
+ * to the `Application` level, with the name pattern `window-view-eventname`.
18564
+ */
18565
+ declare type WindowViewEvent = {
18566
+ viewIdentity: OpenFin_2.Identity;
18567
+ } & (ViewAttachedEvent | ViewDetachedEvent);
18568
+
18569
+ /**
18570
+ * @interface
18571
+ */
18572
+ declare type WindowViewsPrintOptions = {
18573
+ content: 'views';
18574
+ includeSelf?: boolean;
18575
+ };
18576
+
18577
+ declare type Wire = EventEmitter & {
18578
+ connect(messageReciever: MessageReceiver): Promise<any>;
18579
+ connectSync(): any;
18580
+ send(data: any): Promise<any>;
18581
+ shutdown(): Promise<void>;
18582
+ getPort(): string;
18583
+ };
18584
+
18585
+ declare type WireConstructor = {
18586
+ new (onmessage: (data: any) => void): Wire;
18587
+ };
18588
+
18589
+ /* Excluded from this release type: WithId */
18590
+
18591
+ declare interface WithInterop {
18592
+ interop: InteropClient;
18593
+ }
18594
+
18595
+ /* Excluded from this release type: WithoutId */
18596
+
18597
+ declare type WithPositioningOptions<T extends {} = {}> = T & {
18598
+ positioningOptions?: OpenFin_2.PositioningOptions;
18599
+ };
18600
+
18601
+ /* Excluded from this release type: WorkspacePlatformOptions */
18602
+
18603
+ /**
18604
+ * A generic request to write any supported data to the clipboard.
18605
+ * @interface
18606
+ */
18607
+ declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
18608
+ /**
18609
+ * Data to be written
18610
+ */
18611
+ data: {
18612
+ text?: string;
18613
+ html?: string;
18614
+ rtf?: string;
18615
+ } & Partial<Pick<WriteImageClipboardRequest, 'image'>>;
18616
+ };
18617
+
18618
+ /**
18619
+ * @deprecated - instead use WriteAnyClipboardRequest
18620
+ *
18621
+ * A generic request to write any supported data to the clipboard.
18622
+ *
18623
+ * @interface
18624
+ */
18625
+ declare type WriteAnyRequestType = WriteAnyClipboardRequest;
18626
+
18627
+ /**
18628
+ * A request to write data to the clipboard.
18629
+ * @interface
18630
+ */
18631
+ declare type WriteClipboardRequest = BaseClipboardRequest & {
18632
+ /**
18633
+ * Data to write to the clipboard.
18634
+ */
18635
+ data: string;
18636
+ };
18637
+
18638
+ /**
18639
+ * @interface
18640
+ */
18641
+ declare type WriteImageClipboardRequest = BaseClipboardRequest & {
18642
+ /**
18643
+ * Can be either a base64 string, or a DataURL string. If using DataURL, the
18644
+ * supported formats are `data:image/png[;base64],` and `data:image/jpeg[;base64],`.
18645
+ * Using other image/<format> DataURLs will throw an Error.
18646
+ */
18647
+ image: string;
18648
+ };
18649
+
18650
+ /**
18651
+ * @deprecated - instead use OpenFin.WriteClipboardRequest
18652
+ *
18653
+ * A request to write data to the clipboard.
18654
+ *
18655
+ * @interface
18656
+ */
18657
+ declare type WriteRequestType = WriteClipboardRequest;
18658
+
18659
+ export { }