@openfin/node-adapter 34.78.62 → 35.78.4

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.
@@ -96,6 +96,10 @@ declare type Api = {
96
96
  sameOriginInjection?: boolean;
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
+ /**
100
+ * Prevent fin API injection. If true `fin` won't be available in this context.
101
+ */
102
+ preventInjection?: boolean;
99
103
  };
100
104
 
101
105
  declare type ApiCall<Request, Response> = {
@@ -195,100 +199,6 @@ declare class Application extends EmitterBase<OpenFin.ApplicationEvent> {
195
199
  */
196
200
  constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
197
201
  private windowListFromIdentityList;
198
- /**
199
- * Adds a listener to the end of the listeners array for the specified event.
200
- * @param eventType - The type of the event.
201
- * @param listener - Called whenever an event of the specified type occurs.
202
- * @param options - Option to support event timestamps.
203
- *
204
- * @function addListener
205
- * @memberof Application
206
- * @instance
207
- * @tutorial Application.EventEmitter
208
- */
209
- /**
210
- * Adds a listener to the end of the listeners array for the specified event.
211
- * @param eventType - The type of the event.
212
- * @param listener - Called whenever an event of the specified type occurs.
213
- * @param options - Option to support event timestamps.
214
- *
215
- * @function on
216
- * @memberof Application
217
- * @instance
218
- * @tutorial Application.EventEmitter
219
- */
220
- /**
221
- * 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.
222
- * @param eventType - The type of the event.
223
- * @param listener - The callback function.
224
- * @param options - Option to support event timestamps.
225
- *
226
- * @function once
227
- * @memberof Application
228
- * @instance
229
- * @tutorial Application.EventEmitter
230
- */
231
- /**
232
- * Adds a listener to the beginning of the listeners array for the specified event.
233
- * @param eventType - The type of the event.
234
- * @param listener - The callback function.
235
- * @param options - Option to support event timestamps.
236
- *
237
- * @function prependListener
238
- * @memberof Application
239
- * @instance
240
- * @tutorial Application.EventEmitter
241
- */
242
- /**
243
- * 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.
244
- * The listener is added to the beginning of the listeners array.
245
- * @param eventType - The type of the event.
246
- * @param listener - The callback function.
247
- * @param options - Option to support event timestamps.
248
- *
249
- * @function prependOnceListener
250
- * @memberof Application
251
- * @instance
252
- * @tutorial Application.EventEmitter
253
- */
254
- /**
255
- * Remove a listener from the listener array for the specified event.
256
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
257
- * @param eventType - The type of the event.
258
- * @param listener - The callback function.
259
- * @param options - Option to support event timestamps.
260
- *
261
- * @function removeListener
262
- * @memberof Application
263
- * @instance
264
- * @tutorial Application.EventEmitter
265
- */
266
- /**
267
- * Removes all listeners, or those of the specified event.
268
- * @param eventType - The type of the event.
269
- *
270
- * @function removeAllListeners
271
- * @memberof Application
272
- * @instance
273
- * @tutorial Application.EventEmitter
274
- */
275
- /**
276
- * JumpListCategory interface
277
- * @typedef { object } JumpListCategory@typedef { object } JumpListCategory
278
- * @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.
279
- * @property { JumpListItem[] } items Array of JumpListItem objects
280
- */
281
- /**
282
- * @PORTED
283
- * JumpListItem interface
284
- * @typedef { object } JumpListItem@typedef { object } JumpListItem
285
- * @property { string } type One of the following: "task" or "separator". Defaults to task.
286
- * @property { string } title The text to be displayed for the JumpList Item. Should only be set if type is "task".
287
- * @property { string } description Description of the task (displayed in a tooltip). Should only be set if type is "task".
288
- * @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.
289
- * @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).
290
- * @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.
291
- */
292
202
  /**
293
203
  * Determines if the application is currently running.
294
204
  *
@@ -935,6 +845,7 @@ declare namespace ApplicationEvents {
935
845
  RespondingEvent,
936
846
  StartedEvent,
937
847
  ApplicationSourcedEvent,
848
+ ApplicationSourcedEventType,
938
849
  Event_3 as Event,
939
850
  ApplicationEvent,
940
851
  EventType_3 as EventType,
@@ -1307,6 +1218,11 @@ declare type ApplicationPermissions = {
1307
1218
  */
1308
1219
  declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1309
1220
 
1221
+ /**
1222
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1223
+ */
1224
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1225
+
1310
1226
  declare type ApplicationState = OpenFin.ApplicationState;
1311
1227
 
1312
1228
  /**
@@ -3144,20 +3060,6 @@ declare type ClientInfo = Omit<ClientIdentity, 'isLocalEndpointId'> & {
3144
3060
  connectionUrl: string;
3145
3061
  };
3146
3062
 
3147
- /**
3148
- * @PORTED
3149
- * WriteRequestType interface
3150
- * @typedef { object } WriteRequestType@typedef { object } WriteRequestType
3151
- * @property { string } data Data to be written
3152
- * @property { string } [type] Clipboard Type
3153
- */
3154
- /**
3155
- * @PORTED
3156
- * OpenFin.WriteAnyClipboardRequest interface
3157
- * @typedef { object } OpenFin.WriteAnyClipboardRequest@typedef { object } OpenFin.WriteAnyClipboardRequest
3158
- * @property { string } data Data to be written
3159
- * @property { OpenFin.ClipboardSelectionType } [type] Clipboard Type defaults to 'clipboard', use 'selection' for linux
3160
- */
3161
3063
  /**
3162
3064
  * The Clipboard API allows reading and writing to the clipboard in multiple formats.
3163
3065
  *
@@ -3537,6 +3439,10 @@ declare type ConstructorOverride<T> = (Base: Constructor<T>) => Constructor<T>;
3537
3439
  * @interface
3538
3440
  */
3539
3441
  declare type ConstViewOptions = {
3442
+ /**
3443
+ * Configurations for API injection.
3444
+ */
3445
+ api: Api;
3540
3446
  /**
3541
3447
  * The name of the view.
3542
3448
  */
@@ -4892,7 +4798,7 @@ declare type DownloadShelfOptions = {
4892
4798
  */
4893
4799
  size?: number;
4894
4800
  /**
4895
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4801
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4896
4802
  * if absent.
4897
4803
  */
4898
4804
  color?: string;
@@ -5341,7 +5247,7 @@ declare type EventType_7 = Event_10['type'];
5341
5247
  /**
5342
5248
  * Union of possible `type` values for a {@link SystemEvent}.
5343
5249
  */
5344
- declare type EventType_8 = SystemEvent['type'];
5250
+ declare type EventType_8 = Event_11['type'];
5345
5251
 
5346
5252
  /**
5347
5253
  * @internal
@@ -5394,83 +5300,6 @@ declare class ExternalApplication extends EmitterBase<OpenFin.ExternalApplicatio
5394
5300
  * @internal
5395
5301
  */
5396
5302
  constructor(wire: Transport, identity: OpenFin.ApplicationIdentity);
5397
- /**
5398
- * Adds a listener to the end of the listeners array for the specified event.
5399
- * @param eventType - The type of the event.
5400
- * @param listener - Called whenever an event of the specified type occurs.
5401
- * @param options - Option to support event timestamps.
5402
- *
5403
- * @function addListener
5404
- * @memberof ExternalApplication
5405
- * @instance
5406
- * @tutorial ExternalApplication.EventEmitter
5407
- */
5408
- /**
5409
- * Adds a listener to the end of the listeners array for the specified event.
5410
- * @param eventType - The type of the event.
5411
- * @param listener - Called whenever an event of the specified type occurs.
5412
- * @param options - Option to support event timestamps.
5413
- *
5414
- * @function on
5415
- * @memberof ExternalApplication
5416
- * @instance
5417
- * @tutorial ExternalApplication.EventEmitter
5418
- */
5419
- /**
5420
- * 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.
5421
- * @param eventType - The type of the event.
5422
- * @param listener - The callback function.
5423
- * @param options - Option to support event timestamps.
5424
- *
5425
- * @function once
5426
- * @memberof ExternalApplication
5427
- * @instance
5428
- * @tutorial ExternalApplication.EventEmitter
5429
- */
5430
- /**
5431
- * Adds a listener to the beginning of the listeners array for the specified event.
5432
- * @param eventType - The type of the event.
5433
- * @param listener - The callback function.
5434
- * @param options - Option to support event timestamps.
5435
- *
5436
- * @function prependListener
5437
- * @memberof ExternalApplication
5438
- * @instance
5439
- * @tutorial ExternalApplication.EventEmitter
5440
- */
5441
- /**
5442
- * 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.
5443
- * The listener is added to the beginning of the listeners array.
5444
- * @param eventType - The type of the event.
5445
- * @param listener - The callback function.
5446
- * @param options - Option to support event timestamps.
5447
- *
5448
- * @function prependOnceListener
5449
- * @memberof ExternalApplication
5450
- * @instance
5451
- * @tutorial ExternalApplication.EventEmitter
5452
- */
5453
- /**
5454
- * Remove a listener from the listener array for the specified event.
5455
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
5456
- * @param eventType - The type of the event.
5457
- * @param listener - The callback function.
5458
- * @param options - Option to support event timestamps.
5459
- *
5460
- * @function removeListener
5461
- * @memberof ExternalApplication
5462
- * @instance
5463
- * @tutorial ExternalApplication.EventEmitter
5464
- */
5465
- /**
5466
- * Removes all listeners, or those of the specified event.
5467
- * @param eventType - The type of the event.
5468
- *
5469
- * @function removeAllListeners
5470
- * @memberof ExternalApplication
5471
- * @instance
5472
- * @tutorial ExternalApplication.EventEmitter
5473
- */
5474
5303
  /**
5475
5304
  * Retrieves information about the external application.
5476
5305
  *
@@ -5915,83 +5744,6 @@ declare class _Frame extends EmitterBase<OpenFin.FrameEvent> {
5915
5744
  * @internal
5916
5745
  */
5917
5746
  constructor(wire: Transport, identity: OpenFin.Identity);
5918
- /**
5919
- * Adds the listener function to the end of the listeners array for the specified event type.
5920
- * @param eventType - The type of the event.
5921
- * @param listener - Called whenever an event of the specified type occurs.
5922
- * @param options - Option to support event timestamps.
5923
- *
5924
- * @function addListener
5925
- * @memberof Frame
5926
- * @instance
5927
- * @tutorial Frame.EventEmitter
5928
- */
5929
- /**
5930
- * Adds a listener to the end of the listeners array for the specified event.
5931
- * @param eventType - The type of the event.
5932
- * @param listener - Called whenever an event of the specified type occurs.
5933
- * @param options - Option to support event timestamps.
5934
- *
5935
- * @function on
5936
- * @memberof Frame
5937
- * @instance
5938
- * @tutorial Frame.EventEmitter
5939
- */
5940
- /**
5941
- * 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.
5942
- * @param eventType - The type of the event.
5943
- * @param listener - The callback function.
5944
- * @param options - Option to support event timestamps.
5945
- *
5946
- * @function once
5947
- * @memberof Frame
5948
- * @instance
5949
- * @tutorial Frame.EventEmitter
5950
- */
5951
- /**
5952
- * Adds a listener to the beginning of the listeners array for the specified event.
5953
- * @param eventType - The type of the event.
5954
- * @param listener - The callback function.
5955
- * @param options - Option to support event timestamps.
5956
- *
5957
- * @function prependListener
5958
- * @memberof Frame
5959
- * @instance
5960
- * @tutorial Frame.EventEmitter
5961
- */
5962
- /**
5963
- * 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.
5964
- * The listener is added to the beginning of the listeners array.
5965
- * @param eventType - The type of the event.
5966
- * @param listener - The callback function.
5967
- * @param options - Option to support event timestamps.
5968
- *
5969
- * @function prependOnceListener
5970
- * @memberof Frame
5971
- * @instance
5972
- * @tutorial Frame.EventEmitter
5973
- */
5974
- /**
5975
- * Remove a listener from the listener array for the specified event.
5976
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
5977
- * @param eventType - The type of the event.
5978
- * @param listener - The callback function.
5979
- * @param options - Option to support event timestamps.
5980
- *
5981
- * @function removeListener
5982
- * @memberof Frame
5983
- * @instance
5984
- * @tutorial Frame.EventEmitter
5985
- */
5986
- /**
5987
- * Removes all listeners, or those of the specified event.
5988
- * @param eventType - The type of the event.
5989
- *
5990
- * @function removeAllListeners
5991
- * @memberof Frame
5992
- * @instance
5993
- * @tutorial Frame.EventEmitter
5994
- */
5995
5747
  /**
5996
5748
  * Returns a frame info object for the represented frame.
5997
5749
  *
@@ -7275,56 +7027,6 @@ declare class InteropBroker extends Base {
7275
7027
  static createClosedConstructor(...args: ConstructorParameters<typeof InteropBroker>): {
7276
7028
  new (): InteropBroker;
7277
7029
  };
7278
- /**
7279
- * @REMOVED
7280
- * SetContextOptions interface
7281
- * @typedef { object } SetContextOptions@typedef { object } SetContextOptions
7282
- * @property { Context } {context} - New context to set.
7283
- */
7284
- /**
7285
- * @REMOVED
7286
- * GetContextOptions interface
7287
- * @typedef { object } GetContextOptions@typedef { object } GetContextOptions
7288
- * @property { string } [contextType] - Context Type
7289
- */
7290
- /**
7291
- * @REMOVED
7292
- * JoinContextGroupOptions interface
7293
- * @typedef { object } JoinContextGroupOptions@typedef { object } JoinContextGroupOptions
7294
- * @property { string } contextGroupId - Id of the context group.
7295
- * @property { Identity | ClientIdentity } [target] - Identity of the entity you wish to join to a context group.
7296
- */
7297
- /**
7298
- * @REMOVED
7299
- * AddClientToContextGroupOptions interface
7300
- * @typedef { object } AddClientToContextGroupOptions@typedef { object } AddClientToContextGroupOptions
7301
- * @property { string } contextGroupId - Name of the context group.
7302
- */
7303
- /**
7304
- * @REMOVED
7305
- * RemoveFromContextGroupOptions interface
7306
- * @typedef { object } RemoveFromContextGroupOptions@typedef { object } RemoveFromContextGroupOptions
7307
- * @property { Identity | ClientIdentity } target - Identity of the entity you wish to join to a context group.
7308
- */
7309
- /**
7310
- * @REMOVED
7311
- * GetInfoForContextGroupOptions interface
7312
- * @typedef { object } GetInfoForContextGroupOptions@typedef { object } GetInfoForContextGroupOptions
7313
- * @property { string } contextGroupId - Name of the context group to get info for.
7314
- */
7315
- /**
7316
- * @REMOVED
7317
- * GetAllClientsInContextGroupOptions interface
7318
- * @typedef { object } GetAllClientsInContextGroupOptions@typedef { object } GetAllClientsInContextGroupOptions
7319
- * @property { string } contextGroupId - Name of the context group to get info for.
7320
- */
7321
- /**
7322
- * @PORTED
7323
- * InfoForIntentOptions interface
7324
- * @typedef { object } InfoForIntentOptions@typedef { object } InfoForIntentOptions
7325
- * @property { string } name Name of the intent to get info for.
7326
- * @property { Context } [context] Optional context.
7327
- */
7328
7030
  /**
7329
7031
  * Sets a context for the context group of the incoming current entity.
7330
7032
  * @param setContextOptions - New context to set.
@@ -7824,95 +7526,6 @@ declare type InteropBrokerOptions = {
7824
7526
  logging?: InteropLoggingOptions;
7825
7527
  };
7826
7528
 
7827
- /**
7828
- * @PORTED
7829
- * @typedef { object } Intent
7830
- * @summary The combination of an action and a context that is passed to an application for resolution.
7831
- * @property { string } name Name of the intent.
7832
- * @property { Context } context Data associated with the intent
7833
- */
7834
- /**
7835
- * @REMOVED
7836
- * @typedef { object } Subscription
7837
- * @summary Object returned when subscribing a handler.
7838
- * @property { function } unsubscribe Function to unsubscribe the handler.
7839
- */
7840
- /**
7841
- * @typedef { function } ContextHandler
7842
- * @summary Subscription function for addContextHandler.
7843
- */
7844
- /**
7845
- * @typedef { function } IntentHandler
7846
- * @summary Subscription function for registerIntentHandler
7847
- */
7848
- /**
7849
- * @PORTED
7850
- * @typedef { object } ClientIdentity
7851
- * @summary The Identity for a Channel Client. Includes endpointId to differentiate between different connections for an entity.
7852
- * @property {string} uuid GUID of an application.
7853
- * @property {string} name Name of an entity in an application.
7854
- * @property {string} endpointId Unique differentiator for different Channel connections for an entity.
7855
- */
7856
- /**
7857
- * @PORTED
7858
- * @typedef { object } ContextGroupInfo
7859
- * @summary Information for a Context Group. Contains metadata for displaying the group properly.
7860
- * @property {string} id Name of the context group
7861
- * @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.
7862
- */
7863
- /**
7864
- * @PORTED
7865
- * @typedef { object } DisplayMetadata
7866
- * @summary The display data for a Context Group.
7867
- * @property {string} name A user-readable name for this context group, e.g: `"Red"`
7868
- * @property {string} [color] The color that should be associated within this context group when displaying this context group in a UI, e.g: `0xFF0000`.
7869
- * @property {string} [glyph] A URL of an image that can be used to display this context group
7870
- */
7871
- /**
7872
- * @PORTED
7873
- * @typedef { object } Context
7874
- * @summary Data passed between entities and applications.
7875
- * @property {object} [id] An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
7876
- * @property {string} [name] User-readable name for the incoming context.
7877
- * @property {string} type Conserved type for the context (e.g. `instrument` or `country`)
7878
- */
7879
- /**
7880
- * @REMOVED
7881
- * @typedef { object } ContextForIntent
7882
- * @summary Data passed between entities and applications, including an optional metadata.
7883
- * @property {object} [id] An object containing string key-value pairs for the bulk of the data for the context. Differs between context types.
7884
- * @property {string} [name] User-readable name for the incoming context.
7885
- * @property {string} type Conserved type for the context (e.g. `instrument` or `country`)
7886
- * @property {any} [metadata]
7887
- */
7888
- /**
7889
- * @REMOVED
7890
- * @typedef { object } SessionContextGroup
7891
- * @summary An instance of a SessionContextGroup
7892
- * @property {string} id The SessionContextGroup's id.
7893
- * @property {setContext} setContext Sets a context of a certain type
7894
- * @property {getCurrentContext} getCurrentContext Gets the currently set context of a certain type
7895
- * @property {addContextHandler} addContextHandler Adds a handler for context change.
7896
- */
7897
- /**
7898
- * @typedef {function} setContext
7899
- * @summary A SessionContextGroup instance method for setting a context in the SessionContextGroup.
7900
- * @param context The Context to be set.
7901
- *
7902
- */
7903
- /**
7904
- * @typedef {function} getCurrentContext
7905
- * @summary A SessionContextGroup instance method for getting the current context of a certain type.
7906
- * @param contextType The Context Type to get. If not specified the last contextType set would get used.
7907
- *
7908
- */
7909
- /**
7910
- * @typedef {function} addContextHandler
7911
- * @summary A SessionContextGroup instance method for adding a handler for context change.
7912
- * @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.
7913
- * @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.
7914
- *
7915
- */
7916
7529
  /**
7917
7530
  * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7918
7531
  *
@@ -8351,13 +7964,6 @@ declare type InteropLoggingActions = 'beforeAction' | 'afterAction';
8351
7964
  */
8352
7965
  declare type InteropLoggingOptions = Record<InteropLoggingActions, InteropActionLoggingOption>;
8353
7966
 
8354
- /**
8355
- * @PORTED
8356
- * @typedef { object } InteropConfig
8357
- * @summary Information relevant to the Interop Broker.
8358
- * @property {string} [currentContextGroup] Context Group for the client. (green, yellow, red, etc.)
8359
- * @property {string} [providerId] When provided, automatically connects the client to the specified provider uuid
8360
- */
8361
7967
  /**
8362
7968
  * Manages creation of Interop Brokers and Interop Clients. These APIs are called under-the-hood in Platforms.
8363
7969
  *
@@ -9434,7 +9040,7 @@ declare type LayoutOptions = {
9434
9040
  * @defaultValue false
9435
9041
  *
9436
9042
  * Limits the area to which tabs can be dragged.
9437
- * If true, stack headers are the only areas where tabs can be dropped.
9043
+ * If true, the layout container is the only area where tabs can be dropped.
9438
9044
  */
9439
9045
  constrainDragToContainer?: boolean;
9440
9046
  /**
@@ -10320,7 +9926,7 @@ declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'c
10320
9926
  *
10321
9927
  * Ensures that an event type key doesn't include any `-requested` events. Distributes over unions.
10322
9928
  */
10323
- declare type NotRequested<EventType extends String> = EventType extends `${infer U}-requested` ? never : EventType;
9929
+ declare type NotRequested<EventType extends String> = EventType extends `${string}-requested` ? never : EventType;
10324
9930
 
10325
9931
  /**
10326
9932
  * Generated when an application is not responding.
@@ -14092,83 +13698,6 @@ declare class System extends EmitterBase<OpenFin.SystemEvent> {
14092
13698
  */
14093
13699
  constructor(wire: Transport);
14094
13700
  private sendExternalProcessRequest;
14095
- /**
14096
- * Adds a listener to the end of the listeners array for the specified event.
14097
- * @param eventType - The type of the event.
14098
- * @param listener - Called whenever an event of the specified type occurs.
14099
- * @param options - Option to support event timestamps.
14100
- *
14101
- * @function addListener
14102
- * @memberof System
14103
- * @instance
14104
- * @tutorial System.EventEmitter
14105
- */
14106
- /**
14107
- * Adds a listener to the end of the listeners array for the specified event.
14108
- * @param eventType - The type of the event.
14109
- * @param listener - Called whenever an event of the specified type occurs.
14110
- * @param options - Option to support event timestamps.
14111
- *
14112
- * @function on
14113
- * @memberof System
14114
- * @instance
14115
- * @tutorial System.EventEmitter
14116
- */
14117
- /**
14118
- * 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.
14119
- * @param eventType - The type of the event.
14120
- * @param listener - The callback function.
14121
- * @param options - Option to support event timestamps.
14122
- *
14123
- * @function once
14124
- * @memberof System
14125
- * @instance
14126
- * @tutorial System.EventEmitter
14127
- */
14128
- /**
14129
- * Adds a listener to the beginning of the listeners array for the specified event.
14130
- * @param eventType - The type of the event.
14131
- * @param listener - The callback function.
14132
- * @param options - Option to support event timestamps.
14133
- *
14134
- * @function prependListener
14135
- * @memberof System
14136
- * @instance
14137
- * @tutorial System.EventEmitter
14138
- */
14139
- /**
14140
- * 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.
14141
- * The listener is added to the beginning of the listeners array.
14142
- * @param eventType - The type of the event.
14143
- * @param listener - The callback function.
14144
- * @param options - Option to support event timestamps.
14145
- *
14146
- * @function prependOnceListener
14147
- * @memberof System
14148
- * @instance
14149
- * @tutorial System.EventEmitter
14150
- */
14151
- /**
14152
- * Remove a listener from the listener array for the specified event.
14153
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
14154
- * @param eventType - The type of the event.
14155
- * @param listener - The callback function.
14156
- * @param options - Option to support event timestamps.
14157
- *
14158
- * @function removeListener
14159
- * @memberof System
14160
- * @instance
14161
- * @tutorial System.EventEmitter
14162
- */
14163
- /**
14164
- * Removes all listeners, or those of the specified event.
14165
- * @param eventType - The type of the event.
14166
- *
14167
- * @function removeAllListeners
14168
- * @memberof System
14169
- * @instance
14170
- * @tutorial System.EventEmitter
14171
- */
14172
13701
  /**
14173
13702
  * Returns the version of the runtime. The version contains the major, minor,
14174
13703
  * build and revision numbers.
@@ -16203,169 +15732,6 @@ declare type VerboseWebPermission = {
16203
15732
 
16204
15733
  declare type View = OpenFin.View;
16205
15734
 
16206
- /**
16207
- * @PORTED
16208
- * @typedef {object} View~options
16209
- * @summary View creation options.
16210
- * @desc This is the options object required by {@link View.create View.create}.
16211
- *
16212
- * Note that `name` and `target` are the only required properties — albeit the `url` property is usually provided as well
16213
- * (defaults to `"about:blank"` when omitted).
16214
- *
16215
- * @property {object} [experimental]
16216
- * Configurations for API injection.
16217
- *
16218
- * @property {boolean} [experimental.childWindows] Configure if the runtime should enable child windows for views.
16219
- *
16220
- * @property {object} [accelerator]
16221
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
16222
- *
16223
- * @property {boolean} [accelerator.devtools=false]
16224
- * If `true`, enables the devtools keyboard shortcut:<br>
16225
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
16226
- *
16227
- * @property {boolean} [accelerator.reload=false]
16228
- * If `true`, enables the reload keyboard shortcuts:<br>
16229
- * `Ctrl` + `R` _(Windows)_<br>
16230
- * `F5` _(Windows)_<br>
16231
- * `Command` + `R` _(Mac)_
16232
- *
16233
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
16234
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
16235
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
16236
- * `Shift` + `F5` _(Windows)_<br>
16237
- * `Command` + `Shift` + `R` _(Mac)_
16238
- *
16239
- * @property {boolean} [accelerator.zoom=false]
16240
- * If `true`, enables the zoom keyboard shortcuts:<br>
16241
- * `Ctrl` + `+` _(Zoom In)_<br>
16242
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
16243
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
16244
- * `Ctrl` + `-` _(Zoom Out)_<br>
16245
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
16246
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
16247
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
16248
- * `Ctrl` + `0` _(Restore to 100%)_
16249
- *
16250
- * @property {object} [api]
16251
- * Configurations for API injection.
16252
- *
16253
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
16254
- *
16255
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
16256
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
16257
- *
16258
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
16259
- * Autoplay policy to apply to content in the window, can be
16260
- * `no-user-gesture-required`, `user-gesture-required`,
16261
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
16262
- *
16263
- * @property {object} [autoResize] AutoResize options
16264
- *
16265
- * @property {object} [bounds] initial bounds given relative to the window.
16266
- *
16267
- * @property {string} [backgroundColor="#FFF"] - _Updatable._
16268
- * The view’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
16269
- * (`document.body.style.backgroundColor`),
16270
- * this color briefly fills a view’s (a) content area before its content is loaded as well as (b) newly exposed
16271
- * areas when growing a window. Setting
16272
- * this value to the anticipated content background color can help improve user experience.
16273
- * Default is white.
16274
- *
16275
- * @property {object} [contentNavigation]
16276
- * Restrict navigation to URLs that match an allowed pattern.
16277
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
16278
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
16279
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
16280
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
16281
- *
16282
- * @property {object} [contentRedirect]
16283
- * Restrict redirects to URLs that match an allowed pattern.
16284
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
16285
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
16286
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
16287
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
16288
- *
16289
- * @property {object} [contextMenuSettings] - _Updatable._
16290
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
16291
- * Configure the context menu when right-clicking on a view.
16292
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
16293
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
16294
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
16295
- *
16296
- * @property {object} [contextMenuOptions] - _Updatable._
16297
- * Configure the context menu when right-clicking on a view. Supported menu items:
16298
- * 'separator'
16299
- * 'cut'
16300
- * 'copy'
16301
- * 'copyImage',
16302
- * 'paste'
16303
- * 'spellCheck'
16304
- * 'inspect'
16305
- * 'reload'
16306
- * 'navigateForward'
16307
- * 'navigateBack'
16308
- * 'print'
16309
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
16310
- * @property {string[]} [contextMenuOptions.template=[]] List of context menu items to display on right-click.
16311
- *
16312
- * @property {any} [customData=""] - _Updatable._
16313
- * A field that the user can attach serializable data to be ferried around with the view options.
16314
- * _When omitted, the default value of this property is the empty string (`""`)._
16315
- *
16316
- * @property {any} [customContext=""] - _Updatable._
16317
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
16318
- * is called.
16319
- * When omitted, the default value of this property is the empty string (`""`).
16320
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
16321
- *
16322
- * @property {object[]} [hotkeys=[]] - _Updatable._
16323
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the view. For usage example see [example]{@tutorial hotkeys}.
16324
- * Within Platform, OpenFin also implements a set of pre-defined actions called
16325
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
16326
- * that can be assigned to a specific hotkey in the platform manifest.
16327
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
16328
- * @property {boolean} [hotkeys.preventDefault=false] preventDefault will prevent the page keydown/keyup events from being emitted.
16329
- *
16330
- * @property {boolean} [isClosable=true] **Platforms Only.** If false, the view will be persistent and can't be closed through
16331
- * either UI or `Platform.closeView`. Note that the view will still be closed if the host window is closed or
16332
- * if the view isn't part of the new layout when running `Layout.replace`.
16333
- *
16334
- * @property {string} name
16335
- * The name of the view.
16336
- *
16337
- * @property {boolean} [detachOnClose=false] - _Updatable._
16338
- * Platforms Only. If true, will hide and detach the View from the window for later use instead of closing,
16339
- * allowing the state of the View to be saved and the View to be immediately shown in a new Layout.
16340
- *
16341
- * @property {string} [manifestUrl] **Platforms Only.** Url to a manifest that contains View Options. Properties other than manifestUrl can still be used
16342
- * but the properties in the manifest will take precedence if there is any collision.
16343
- *
16344
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
16345
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
16346
- * from the parent application.
16347
- *
16348
- * @property {boolean} [preventDragOut=false] **Platforms Only.** If true, the tab of the view can't be dragged out of its host window.
16349
- *
16350
- * @property {string} [processAffinity=<application uuid>]
16351
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
16352
- *
16353
- * @property {boolean} [spellCheck=false]
16354
- * Enable spell check in input text fields for the view.
16355
- *
16356
- * @property {Identity} [target]
16357
- * The identity of the window this view should be attached to.
16358
- *
16359
- * @property {string} [url="about:blank"]
16360
- * The URL of the view.
16361
- *
16362
- * @property {string} [uuid=<application uuid>]
16363
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
16364
- * If omitted, defaults to the `uuid` of the application spawning the view.
16365
- * If given, must match the `uuid` of the application spawning the view.
16366
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
16367
- * really no need to provide it.
16368
- */
16369
15735
  /**
16370
15736
  * A View can be used to embed additional web content into a Window.
16371
15737
  * It is like a child window, except it is positioned relative to its owning window.
@@ -18195,476 +17561,6 @@ declare type WillResizeEvent = WillMoveOrResizeEvent & {
18195
17561
  type: 'will-resize';
18196
17562
  };
18197
17563
 
18198
- /**
18199
- * @PORTED
18200
- * @typedef { object } Margins@typedef { object } Margins
18201
- * @property { string } [marginType]
18202
- * Can be `default`, `none`, `printableArea`, or `custom`. If `custom` is chosen,
18203
- * you will also need to specify `top`, `bottom`, `left`, and `right`.
18204
- *
18205
- * @property { number } [top] The top margin of the printed web page, in pixels.
18206
- * @property { number } [bottom] The bottom margin of the printed web page, in pixels.
18207
- * @property { number } [left] The left margin of the printed web page, in pixels.
18208
- * @property { number } [right] The right margin of the printed web page, in pixels.
18209
- */
18210
- /**
18211
- * @PORTED
18212
- * @typedef { object } Dpi@typedef { object } Dpi
18213
- * @property { number } [horizontal] The horizontal dpi
18214
- * @property { number } [vertical] The vertical dpi
18215
- */
18216
- /**
18217
- * @PORTED
18218
- * @typedef { object } PrintOptions@typedef { object } PrintOptions
18219
- * @property { boolean } [silent=false] Don't ask user for print settings.
18220
- * @property { boolean } [printBackground=false] Prints the background color and image of the web page.
18221
- * @property { string } [deviceName=''] Set the printer device name to use.
18222
- * @property { boolean } [color=true] Set whether the printed web page will be in color or grayscale.
18223
- * @property { Margins } [margins] Set margins for the printed web page
18224
- * @property { boolean } [landscape=false] Whether the web page should be printed in landscape mode.
18225
- * @property { number } [scaleFactor] The scale factor of the web page.
18226
- * @property { number } [pagesPerSheet] The number of pages to print per page sheet.
18227
- * @property { boolean } [collate] Whether the web page should be collated.
18228
- * @property { number } [copies] The number of copies of the web page to print.
18229
- * @property { Record<string, number> } [pageRanges] The page range to print. Should have two keys: from and to.
18230
- * @property { string } [duplexMode] Set the duplex mode of the printed web page. Can be simplex, shortEdge, or longEdge.
18231
- * @property { Dpi } [dpi] Set dpi for the printed web page
18232
- */
18233
- /**
18234
- * @REMOVED
18235
- * PrinterInfo interface
18236
- * @typedef { object } PrinterInfo@typedef { object } PrinterInfo
18237
- * @property { string } name Printer Name
18238
- * @property { string } description Printer Description
18239
- * @property { number } status Printer Status
18240
- * @property { boolean } isDefault Indicates that system's default printer
18241
- */
18242
- /**
18243
- * @REMOVED
18244
- * SharedWorkerInfo interface
18245
- * @typedef { object } SharedWorkerInfo@typedef { object } SharedWorkerInfo
18246
- * @property { string } id The unique id of the shared worker.
18247
- * @property { string } url The url of the shared worker.
18248
- */
18249
- /**
18250
- * @PORTED
18251
- * ContentCreationRule interface
18252
- * @typedef { object } ContentCreationRule@typedef { object } ContentCreationRule
18253
- * @property { string } behavior 'view' | 'window' | 'browser' | 'block'
18254
- * @property { string[] } match List of [match patterns](https://developer.chrome.com/extensions/match_patterns).
18255
- * @property { object } options Window creation options or View creation options.
18256
- */
18257
- /**
18258
- * @PORTED
18259
- * @typedef {object} Window~options
18260
- * @summary Window creation options.
18261
- * @desc This is the options object required by {@link Window.create Window.create}.
18262
- *
18263
- * Note that `name` is the only required property — albeit the `url` property is usually provided as well
18264
- * (defaults to `"about:blank"` when omitted).
18265
- *
18266
- * _This jsdoc typedef mirrors the `WindowOptions` TypeScript interface in `@types/openfin`._
18267
- *
18268
- * @property {object} [accelerator]
18269
- * Enable keyboard shortcuts for devtools, zoom, reload, and reload ignoring cache.
18270
- *
18271
- * @property {boolean} [accelerator.devtools=false]
18272
- * If `true`, enables the devtools keyboard shortcut:<br>
18273
- * `Ctrl` + `Shift` + `I` _(Toggles Devtools)_
18274
- *
18275
- * @property {boolean} [accelerator.reload=false]
18276
- * If `true`, enables the reload keyboard shortcuts:<br>
18277
- * `Ctrl` + `R` _(Windows)_<br>
18278
- * `F5` _(Windows)_<br>
18279
- * `Command` + `R` _(Mac)_
18280
- *
18281
- * @property {boolean} [accelerator.reloadIgnoringCache=false]
18282
- * If `true`, enables the reload-from-source keyboard shortcuts:<br>
18283
- * `Ctrl` + `Shift` + `R` _(Windows)_<br>
18284
- * `Shift` + `F5` _(Windows)_<br>
18285
- * `Command` + `Shift` + `R` _(Mac)_
18286
- *
18287
- * @property {boolean} [accelerator.zoom=false]
18288
- * 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.
18289
- * If `true`, enables the zoom keyboard shortcuts:<br>
18290
- * `Ctrl` + `+` _(Zoom In)_<br>
18291
- * `Ctrl` + `Shift` + `+` _(Zoom In)_<br>
18292
- * `Ctrl` + `NumPad+` _(Zoom In)_<br>
18293
- * `Ctrl` + `-` _(Zoom Out)_<br>
18294
- * `Ctrl` + `Shift` + `-` _(Zoom Out)_<br>
18295
- * `Ctrl` + `NumPad-` _(Zoom Out)_<br>
18296
- * `Ctrl` + `Scroll` _(Zoom In & Out)_<br>
18297
- * `Ctrl` + `0` _(Restore to 100%)_
18298
- *
18299
- * @property {object} [alphaMask] - _Experimental._ _Updatable._
18300
- * <br>
18301
- * alphaMask turns anything of matching RGB value transparent.
18302
- * <br>
18303
- * Caveats:
18304
- * * Runtime flags --disable-gpu and --allow-unsafe-compositing are required. Note: Unclear behavior on remote Desktop support
18305
- * * User cannot click-through transparent regions
18306
- * * Not supported on Mac
18307
- * * Windows Aero must be enabled
18308
- * * Won't make visual sense on Pixel-pushed environments such as Citrix
18309
- * * Not supported on rounded corner windows
18310
- * @property {number} [alphaMask.red=-1] 0-255
18311
- * @property {number} [alphaMask.green=-1] 0-255
18312
- * @property {number} [alphaMask.blue=-1] 0-255
18313
- *
18314
- * @property {boolean} [alwaysOnTop=false] - _Updatable._
18315
- * A flag to always position the window at the top of the window stack.
18316
- *
18317
- * @property {object} [api]
18318
- * Configurations for API injection.
18319
- *
18320
- * @property {object} [api.iframe] Configure if the the API should be injected into iframes based on domain.
18321
- *
18322
- * @property {boolean} [api.iframe.crossOriginInjection=false] Controls if the `fin` API object is present for cross origin iframes.
18323
- * @property {boolean} [api.iframe.sameOriginInjection=true] Controls if the `fin` API object is present for same origin iframes.
18324
- *
18325
- * @property {string} [applicationIcon = ""] - _Deprecated_ - use `icon` instead.
18326
- *
18327
- * @property {number} [aspectRatio=0] - _Updatable._
18328
- * The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero,
18329
- * an aspect ratio will not be enforced.
18330
- *
18331
- * @property {string} [autoplayPolicy="no-user-gesture-required"]
18332
- * Autoplay policy to apply to content in the window, can be
18333
- * `no-user-gesture-required`, `user-gesture-required`,
18334
- * `document-user-activation-required`. Defaults to `no-user-gesture-required`.
18335
- *
18336
- * @property {boolean} [autoShow=true]
18337
- * A flag to automatically show the window when it is created.
18338
- *
18339
- * @property {string} [backgroundColor="#FFF"]
18340
- * The window’s _backfill_ color as a hexadecimal value. Not to be confused with the content background color
18341
- * (`document.body.style.backgroundColor`),
18342
- * this color briefly fills a window’s (a) content area before its content is loaded as well as (b) newly exposed
18343
- * areas when growing a window. Setting
18344
- * this value to the anticipated content background color can help improve user experience.
18345
- * Default is white.
18346
- *
18347
- * @property {object} [contentCreation]
18348
- * Apply rules that determine how user interaction (`window.open` and links) creates content.
18349
- * @property {ContentCreationRule[]} [contentCreation.rules = []] List of content creation rules.
18350
- *
18351
- * @property {object} [contentNavigation]
18352
- * Restrict navigation to URLs that match an allowed pattern.
18353
- * In the lack of an allowlist, navigation to URLs that match a denied pattern would be prohibited.
18354
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
18355
- * @property {string[]} [contentNavigation.allowlist=[]] List of allowed URLs.
18356
- * @property {string[]} [contentNavigation.denylist=[]] List of denied URLs.
18357
- *
18358
- * @property {object} [contentRedirect]
18359
- * Restrict redirects to URLs that match an allowed pattern.
18360
- * In the lack of an allowlist, redirects to URLs that match a denied pattern would be prohibited.
18361
- * See [here](https://developer.chrome.com/extensions/match_patterns) for more details.
18362
- * @property {string[]} [contentRedirect.allowlist=[]] List of allowed URLs.
18363
- * @property {string[]} [contentRedirect.denylist=[]] List of denied URLs.
18364
- *
18365
- * @property {boolean} [contextMenu=true] - _Updatable._
18366
- * A flag to show the context menu when right-clicking on a window.
18367
- * Gives access to the devtools for the window.
18368
- *
18369
- * @property {object} [contextMenuSettings] - _Updatable._
18370
- * Deprecated - superseded by {@link contextMenuOptions}, which offers a larger feature-set and cleaner syntax.
18371
- * Configure the context menu when right-clicking on a window.
18372
- * @property {boolean} [contextMenuSettings.enable=true] Should the context menu display on right click.
18373
- * @property {boolean} [contextMenuSettings.devtools=true] Should the context menu contain a button for opening devtools.
18374
- * @property {boolean} [contextMenuSettings.reload=true] Should the context menu contain a button for reloading the page.
18375
- *
18376
- * @property {object} [contextMenuOptions] - _Updatable._
18377
- * Configure the context menu when right-clicking on a window. Supported menu items:
18378
- * 'separator'
18379
- * 'cut'
18380
- * 'copy'
18381
- * 'paste'
18382
- * 'spellCheck'
18383
- * 'inspect'
18384
- * 'reload'
18385
- * 'navigateForward'
18386
- * 'navigateBack'
18387
- * 'print'
18388
- * @property {boolean} [contextMenuOptions.enabled = true] Should the context menu display on right click.
18389
- * @property {string[]} [contextMenuSettings.template=[]] List of context menu items to display on right-click.
18390
- *
18391
- * @property {object} [cornerRounding] - _Updatable._
18392
- * Defines and applies rounded corners for a frameless window. **NOTE:** On macOS corner is not ellipse but circle rounded by the
18393
- * average of _height_ and _width_.
18394
- * @property {number} [cornerRounding.height=0] The height in pixels.
18395
- * @property {number} [cornerRounding.width=0] The width in pixels.
18396
- *
18397
- * @property {any} [customContext=""] - _Updatable. Inheritable._
18398
- * A field that the user can use to attach serializable data that will be saved when {@link Platform#getSnapshot Platform.getSnapshot}
18399
- * is called. If a window in a Platform is trying to update or retrieve its own context, it can use the
18400
- * {@link Platform#setWindowContext Platform.setWindowContext} and {@link Platform#getWindowContext Platform.getWindowContext} calls.
18401
- * _When omitted, _inherits_ from the parent application._
18402
- * As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}
18403
- *
18404
- * @property {any} [customData=""] - _Updatable. Inheritable._
18405
- * A field that the user can attach serializable data to be ferried around with the window options.
18406
- * _When omitted, _inherits_ from the parent application._
18407
- *
18408
- * @property {object[]} [customRequestHeaders]
18409
- * Defines list of custom headers for requests sent by the window.
18410
- * @property {string[]} [customRequestHeaders.urlPatterns=[]] The URL patterns for which the headers will be applied
18411
- * @property {object[]} [customRequestHeaders.headers=[]] Objects representing headers and their values,
18412
- * where the object key is the name of header and value at key is the value of the header
18413
- *
18414
- * @property {boolean} [closeOnLastViewRemoved=true] - _Experimental._ _Updatable._
18415
- * Toggling off would keep the Window alive even if all its Views were closed.
18416
- * This is meant for advanced users and should be used with caution.
18417
- * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
18418
- * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
18419
- * ** note ** - This option is ignored in non-Platforms apps.
18420
- *
18421
- * @property {boolean} [defaultCentered=false]
18422
- * Centers the window in the primary monitor. This option overrides `defaultLeft` and `defaultTop`. When `saveWindowState` is `true`,
18423
- * this value will be ignored for subsequent launches in favor of the cached value. **NOTE:** On macOS _defaultCenter_ is
18424
- * somewhat above center vertically.
18425
- *
18426
- * @property {number} [defaultHeight=500]
18427
- * The default height of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent launches
18428
- * in favor of the cached value.
18429
- *
18430
- * @property {number} [defaultLeft=100]
18431
- * The default left position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
18432
- * launches in favor of the cached value.
18433
- *
18434
- * @property {number} [defaultTop=100]
18435
- * The default top position of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
18436
- * launches in favor of the cached value.
18437
- *
18438
- * @property {number} [defaultWidth=800]
18439
- * The default width of the window. When `saveWindowState` is `true`, this value will be ignored for subsequent
18440
- * launches in favor of the cached value.
18441
- *
18442
- * @property {boolean} [includeInSnapshots=true] - _Updatable._
18443
- * When true, the window will be be included in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with
18444
- * inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.
18445
- *
18446
- * @property {boolean} [frame=true] - _Updatable._
18447
- * A flag to show the frame.
18448
- *
18449
- * @hidden-property {boolean} [hideOnClose=false] - A flag to allow a window to be hidden when the close button is clicked.
18450
- *
18451
- * @property {object[]} [hotkeys=[]] - _Updatable._
18452
- * Defines the list of hotkeys that will be emitted as a `hotkey` event on the window. For usage example see [example]{@tutorial hotkeys}.
18453
- * Within Platform, OpenFin also implements a set of pre-defined actions called
18454
- * [keyboard commands]{@link https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands}
18455
- * that can be assigned to a specific hotkey in the platform manifest.
18456
- * @property {string} hotkeys.keys The key combination of the hotkey, i.e. "Ctrl+T"
18457
- * @property {boolean} [hotkeys.preventDefault=false] Whether or not to prevent default key handling before emitting the event
18458
- *
18459
- * @property {string} [icon] - _Updatable. Inheritable._
18460
- * A URL for the icon to be shown in the window title bar and the taskbar.
18461
- * When omitted, inherits from the parent application._
18462
- * note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.
18463
- *
18464
- * @property {number} [maxHeight=-1] - _Updatable._
18465
- * The maximum height of a window. Will default to the OS defined value if set to -1.
18466
- *
18467
- * @property {boolean} [maximizable=true] - _Updatable._
18468
- * A flag that lets the window be maximized.
18469
- *
18470
- * @property {number} [maxWidth=-1] - _Updatable._
18471
- * The maximum width of a window. Will default to the OS defined value if set to -1.
18472
- *
18473
- * @property {number} [minHeight=0] - _Updatable._
18474
- * The minimum height of a window.
18475
- *
18476
- * @property {boolean} [minimizable=true] - _Updatable._
18477
- * A flag that lets the window be minimized.
18478
- *
18479
- * @property {number} [minWidth=0] - _Updatable._
18480
- * The minimum width of a window.
18481
- *
18482
- * @property {Identity} [modalParentIdentity]
18483
- * Parent identity of a modal window. It will create a modal child window when this option is set.
18484
- *
18485
- * @property {string} name
18486
- * The name of the window.
18487
- *
18488
- * @property {number} [opacity=1.0] - _Updatable._
18489
- * A flag that specifies how transparent the window will be.
18490
- * Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there.
18491
- * This value is clamped between `0.0` and `1.0`.
18492
- * * In software composition mode, the runtime flag --allow-unsafe-compositing is required.
18493
- *
18494
- * @property {preloadScript[]} [preloadScripts] - _Inheritable_
18495
- * A list of scripts that are eval'ed before other scripts in the page. When omitted, _inherits_
18496
- * from the parent application.
18497
- *
18498
- * @property {string} [processAffinity]
18499
- * A string to attempt to group renderers together. Will only be used if pages are on the same origin.
18500
- *
18501
- * @property {boolean} [resizable=true] - _Updatable._
18502
- * A flag to allow the user to resize the window.
18503
- *
18504
- * @property {object} [resizeRegion] - _Updatable._
18505
- * Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.
18506
- * @property {number} [resizeRegion.bottomRightCorner=9]
18507
- * The size in pixels of an additional square resizable region located at the bottom right corner of a frameless window.
18508
- * @property {number} [resizeRegion.size=7]
18509
- * The size in pixels.
18510
- * @property {object} [resizeRegion.sides={top:true,right:true,bottom:true,left:true}]
18511
- * Sides that a window can be resized from.
18512
- *
18513
- * @property {boolean} [saveWindowState=true]
18514
- * A flag to cache the location of the window.
18515
- * ** note ** - This option is ignored in Platforms as it would cause inconsistent {@link Platform#applySnapshot applySnapshot} behavior.
18516
- *
18517
- * @property {boolean} [ignoreSavedWindowState]
18518
- * A flag to ignore previously cached state of the window. It defaults the opposite value of `saveWindowState` to maintain backwards compatibility.
18519
- *
18520
- * @property {boolean} [shadow=false]
18521
- * A flag to display a shadow on frameless windows.
18522
- * `shadow` and `cornerRounding` are mutually exclusive.
18523
- * On Windows 7, Aero theme is required.
18524
- *
18525
- * @property {boolean} [showBackgroundImages=false] - _Updatable._
18526
- * Platforms Only. If true, will show background images in the layout when the Views are hidden.
18527
- * This occurs when the window is resizing or a tab is being dragged within the layout.
18528
- *
18529
- * @property {boolean} [showTaskbarIcon=true] - _Updatable._ _Windows_.
18530
- * A flag to show the window's icon in the taskbar.
18531
- *
18532
- * @property {boolean} [smallWindow=false]
18533
- * A flag to specify a frameless window that can be be created and resized to less than 41x36 px (width x height).
18534
- * _Note: Caveats of small windows are no Aero Snap and drag to/from maximize._
18535
- * _Windows 10: Requires `maximizable` to be false. Resizing with the mouse is only possible down to 38x39 px._
18536
- *
18537
- * @property {boolean} [spellCheck=false]
18538
- * Enable spell check in input text fields for the window.
18539
- *
18540
- * @property {string} [state="normal"]
18541
- * The visible state of the window on creation.
18542
- * One of:
18543
- * * `"maximized"`
18544
- * * `"minimized"`
18545
- * * `"normal"`
18546
- *
18547
- * @property {string} [taskbarIcon=string] - Deprecated - use `icon` instead._Windows_.
18548
- *
18549
- * @property {string} [taskbarIconGroup=<application uuid>] - _Windows_.
18550
- * Specify a taskbar group for the window.
18551
- * _If omitted, defaults to app's uuid (`fin.Application.getCurrentSync().identity.uuid`)._
18552
- *
18553
- * @property {string} [url="about:blank"]
18554
- * The URL of the window.
18555
- *
18556
- * @property {string} [uuid=<application uuid>]
18557
- * The `uuid` of the application, unique within the set of all `Application`s running in OpenFin Runtime.
18558
- * If omitted, defaults to the `uuid` of the application spawning the window.
18559
- * If given, must match the `uuid` of the application spawning the window.
18560
- * In other words, the application's `uuid` is the only acceptable value, but is the default, so there's
18561
- * really no need to provide it.
18562
- *
18563
- * @property {boolean} [waitForPageLoad=false]
18564
- * When set to `true`, the window will not appear until the `window` object's `load` event fires.
18565
- * When set to `false`, the window will appear immediately without waiting for content to be loaded.
18566
- *
18567
- * @property {ViewVisibility} [viewVisibility]
18568
- * _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
18569
- */
18570
- /**
18571
- * @PORTED
18572
- * @typedef {Object} ViewVisibility@typedef {Object} ViewVisibility _Platform Windows Only_. Controls behavior for showing views when they are being resized by the user.
18573
- * @property {ShowViewsOnWindowResize} [showViewsOnWindowResize] Enables views to be shown when a Platform Window is being resized by the user.
18574
- * @property {ShowViewsOnSplitterDrag} [showViewsOnSplitterDrag] Allows views to be shown when they are resized by the user dragging the splitter between layout stacks.
18575
- * @property {ShowViewsOnTabDrag} [showViewsOnTabDrag] _Supported on Windows Operating Systems only_. Allows views to be shown when the user is dragging a tab around a layout.
18576
- */
18577
- /**
18578
- * @PORTED
18579
- * @typedef {Object} ShowViewsOnWindowResize@typedef {Object} ShowViewsOnWindowResize _Platform Windows Only_. Enables views to be shown when a Platform Window is being resized by the user.
18580
- * @property {boolean} [enabled=false] Enables or disables showing Views when a Platform Window is being resized.
18581
- * @property {number} [paintIntervalMs=0] Number of miliseconds to wait between view repaints.
18582
- */
18583
- /**
18584
- * @REMOVED
18585
- * @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.
18586
- * @property {boolean} [enabled=false] Enables or disables showing views when the layout splitter is being dragged.
18587
- */
18588
- /**
18589
- * @REMOVED
18590
- * @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.
18591
- * @property {boolean} [enabled=false] Enables or disables showing views when a tab is being dragged.
18592
- */
18593
- /**
18594
- * @PORTED
18595
- * @typedef {object} CapturePageOptions@typedef {object} CapturePageOptions
18596
- * @property { Area } [area] The area of the window to be captured.
18597
- * @property { string } [format='png'] The format of the captured image. Can be 'png', 'jpg', or 'bmp'.
18598
- * @property { number } [quality=100] Number representing quality of JPEG image only. Between 0 - 100.
18599
- */
18600
- /**
18601
- * @PORTED
18602
- * @typedef { object } Area@typedef { object } Area
18603
- * @property { number } height Area's height
18604
- * @property { number } width Area's width
18605
- * @property { number } x X coordinate of area's starting point
18606
- * @property { number } y Y coordinate of area's starting point
18607
- */
18608
- /**
18609
- * @PORTED
18610
- * @typedef {object} FindInPageOptions@typedef {object} FindInPageOptions
18611
- * @property {boolean} [forward=true] Whether to search forward or backward.
18612
- * @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.
18613
- * @property {boolean} [matchCase=false] Whether search should be case-sensitive.
18614
- * @property {boolean} [wordStart=false] Whether to look only at the start of words.
18615
- * @property {boolean} [medialCapitalAsWordStart=false]
18616
- * 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>
18617
- * lowercase or non-letter. Accepts several other intra-word matches.
18618
- */
18619
- /**
18620
- * @REMOVED
18621
- * @typedef {object} Transition@typedef {object} Transition
18622
- * @property {Opacity} opacity - The Opacity transition
18623
- * @property {Position} position - The Position transition
18624
- * @property {Size} size - The Size transition
18625
- */
18626
- /**
18627
- * @PORTED
18628
- * @typedef {object} TransitionOptions@typedef {object} TransitionOptions
18629
- * @property {boolean} interrupt - This option interrupts the current animation. When false it pushes
18630
- this animation onto the end of the animation queue.
18631
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18632
- */
18633
- /**
18634
- * @PORTED
18635
- * @typedef {object} Size@typedef {object} Size
18636
- * @property {number} duration - The total time in milliseconds this transition should take.
18637
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18638
- * @property {number} width - Optional if height is present. Defaults to the window's current width.
18639
- * @property {number} height - Optional if width is present. Defaults to the window's current height.
18640
- */
18641
- /**
18642
- * @PORTED
18643
- * @typedef {object} Position@typedef {object} Position
18644
- * @property {number} duration - The total time in milliseconds this transition should take.
18645
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18646
- * @property {number} left - Defaults to the window's current left position in virtual screen coordinates.
18647
- * @property {number} top - Defaults to the window's current top position in virtual screen coordinates.
18648
- */
18649
- /**
18650
- * @PORTED
18651
- * @typedef {object} Opacity@typedef {object} Opacity
18652
- * @property {number} duration - The total time in milliseconds this transition should take.
18653
- * @property {boolean} relative - Treat 'opacity' as absolute or as a delta. Defaults to false.
18654
- * @property {number} opacity - This value is clamped from 0.0 to 1.0.
18655
- */
18656
- /**
18657
- * @REMOVED
18658
- * Bounds is a interface that has the properties of height,
18659
- * width, left, top which are all numbers
18660
- * @typedef { object } Bounds@typedef { object } Bounds
18661
- * @property { number } height Get the application height bound
18662
- * @property { number } width Get the application width bound
18663
- * @property { number } top Get the application top bound
18664
- * @property { number } left Get the application left bound
18665
- * @property { number } right Get the application right bound
18666
- * @property { number } bottom Get the application bottom bound
18667
- */
18668
17564
  /**
18669
17565
  * A basic window that wraps a native HTML window. Provides more fine-grained
18670
17566
  * control over the window state such as the ability to minimize, maximize, restore, etc.
@@ -18677,83 +17573,6 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
18677
17573
  * @internal
18678
17574
  */
18679
17575
  constructor(wire: Transport, identity: OpenFin.Identity);
18680
- /**
18681
- * Adds a listener to the end of the listeners array for the specified event.
18682
- * @param eventType - The type of the event.
18683
- * @param listener - Called whenever an event of the specified type occurs.
18684
- * @param options - Option to support event timestamps.
18685
- *
18686
- * @function addListener
18687
- * @memberof Window
18688
- * @instance
18689
- * @tutorial Window.EventEmitter
18690
- */
18691
- /**
18692
- * Adds a listener to the end of the listeners array for the specified event.
18693
- * @param eventType - The type of the event.
18694
- * @param listener - Called whenever an event of the specified type occurs.
18695
- * @param options - Option to support event timestamps.
18696
- *
18697
- * @function on
18698
- * @memberof Window
18699
- * @instance
18700
- * @tutorial Window.EventEmitter
18701
- */
18702
- /**
18703
- * 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.
18704
- * @param eventType - The type of the event.
18705
- * @param listener - The callback function.
18706
- * @param options - Option to support event timestamps.
18707
- *
18708
- * @function once
18709
- * @memberof Window
18710
- * @instance
18711
- * @tutorial Window.EventEmitter
18712
- */
18713
- /**
18714
- * Adds a listener to the beginning of the listeners array for the specified event.
18715
- * @param eventType - The type of the event.
18716
- * @param listener - The callback function.
18717
- * @param options - Option to support event timestamps.
18718
- *
18719
- * @function prependListener
18720
- * @memberof Window
18721
- * @instance
18722
- * @tutorial Window.EventEmitter
18723
- */
18724
- /**
18725
- * 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.
18726
- * The listener is added to the beginning of the listeners array.
18727
- * @param eventType - The type of the event.
18728
- * @param listener - The callback function.
18729
- * @param options - Option to support event timestamps.
18730
- *
18731
- * @function prependOnceListener
18732
- * @memberof Window
18733
- * @instance
18734
- * @tutorial Window.EventEmitter
18735
- */
18736
- /**
18737
- * Remove a listener from the listener array for the specified event.
18738
- * Caution: Calling this method changes the array indices in the listener array behind the listener.
18739
- * @param eventType - The type of the event.
18740
- * @param listener - The callback function.
18741
- * @param options - Option to support event timestamps.
18742
- *
18743
- * @function removeListener
18744
- * @memberof Window
18745
- * @instance
18746
- * @tutorial Window.EventEmitter
18747
- */
18748
- /**
18749
- * Removes all listeners, or those of the specified event.
18750
- * @param eventType - The type of the event.
18751
- *
18752
- * @function removeAllListeners
18753
- * @memberof Window
18754
- * @instance
18755
- * @tutorial Window.EventEmitter
18756
- */
18757
17576
  /**
18758
17577
  * create a new window
18759
17578
  * @internal
@@ -19598,28 +18417,6 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19598
18417
  * ```
19599
18418
  */
19600
18419
  authenticate(userName: string, password: string): Promise<void>;
19601
- /**
19602
- * @typedef {object} ShowPopupMenuOptions@typedef {object} ShowPopupMenuOptions
19603
- * @property {Array<MenuItemTemplate>} template - An array describing the menu to show.
19604
- * @property {number} [x] - The window x coordinate where to show the menu. Defaults to mouse position. If using must also use `y`.
19605
- * @property {number} [y] - The window y coordinate where to show the menu. Defaults to mouse position. If using must also use `x`
19606
- */
19607
- /**
19608
- * @typedef {object} MenuItemTemplate@typedef {object} MenuItemTemplate
19609
- * @property {*} data - Data to be returned if the user selects the element. Must be serializable. Large objects can have a performance impact.
19610
- * @property {'normal' | 'separator' | 'submenu' | 'checkbox'} [type] - Defaults to 'normal' unless a 'submenu' key exists
19611
- * @property {string} [label] - The text to show on the menu item. Should be left undefined for `type: 'separator'`
19612
- * @property {boolean} [enabled] - If false, the menu item will be greyed out and unclickable.
19613
- * @property {boolean} [visible] - If false, the menu item will be entirely hidden.
19614
- * @property {boolean} [checked] - Should only be specified for `checkbox` type menu items.
19615
- * @property {string} [icon] - Image Data URI with image dimensions inferred from the encoded string
19616
- * @property {Array<MenuItemTemplate>} [submenu] Should be specified for `submenu` type menu items. If `submenu` is specified, the `type: 'submenu'` can be omitted.
19617
- */
19618
- /**
19619
- * @typedef {object} MenuResult@typedef {object} MenuResult
19620
- * @property {'clicked' | 'closed'} result - Whether the user clicked on a menu item or the menu was closed (user clicked elsewhere).
19621
- * @property {* | undefined} [data] - The data property of the menu item clicked by the user. Only defined if result was `clicked`.
19622
- */
19623
18420
  /**
19624
18421
  * Shows a menu on the window.
19625
18422
  *
@@ -19716,590 +18513,565 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19716
18513
  */
19717
18514
  closePopupMenu(): Promise<void>;
19718
18515
  /**
19719
- * @PORTED
19720
- * @typedef {object} PopupOptions@typedef {object} PopupOptions
19721
- * @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.
19722
- * @property {string} [url] - Navigates to this `url` if showing an existing window as a popup, otherwise the newly created window will load this `url`.
19723
- * @property {Window~options} [initialOptions] - Window creation options when using `showPopupWindow` to create a new window.
19724
- * @property {Window~options} [additionalOptions] - Updatable window options applied to new and existing windows when shown as popups.
19725
- * @property {function} [onPopupResult] - Executed when this window's popup calls `dispatchPopupResult`. Note: if this is defined, `showPopupWindow` will not return a `PopupResult`.
19726
- * @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.
19727
- * @property {number} [height] - Height of the popup window (takes priority over `intialOptions` size properties).
19728
- * @property {number} [width] - Width of the popup window (takes priority over `intialOptions` size properties).
19729
- * @property {number} [x] - Left position where the popup window will be shown (relative to the window calling `showPopupWindow`).
19730
- * @property {number} [y] - Top position where the popup window will be shown (relative to the window calling `showPopupWindow`).
19731
- * @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.
19732
- * @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`.
19733
- * @property {boolean} [focus] - Determines if the popup window should or should not be focused when it is shown.
19734
- * @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.
19735
- */
19736
- /**
19737
- * @PORTED
19738
- * @typedef {object} PopupResult@typedef {object} PopupResult
19739
- * @property {Identity} identity - `name` and `uuid` of the popup window that called dispatched this result.
19740
- * @property {'clicked' | 'dismissed'} result - Result of the user interaction with the popup window.
19741
- * @property {* | undefined} [data] - Data passed to `dispatchPopupResult`.
19742
- */
19743
- /**
19744
- * Dispatch a result to the caller of `showPopupWindow`.
19745
- *
19746
- * @remarks If this window isn't currently being shown as a popup, this call will silently fail.
19747
- * @param data Serializable data to send to the caller window.
19748
- *
19749
- * @example
19750
- * ```js
19751
- * await fin.me.dispatchPopupResult({
19752
- * foo: 'bar'
19753
- * });
19754
- * ```
19755
- */
19756
- dispatchPopupResult(data: any): Promise<void>;
19757
- /**
19758
- * Prints the contents of the window.
19759
- *
19760
- * @param options Configuration for the print task.
19761
- * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName is empty
19762
- * and the default settings for printing.
19763
- *
19764
- * Use the CSS style `page-break-before: always;` to force print to a new page.
19765
- *
19766
- * @example
19767
- * ```js
19768
- * const win = fin.Window.getCurrentSync();
19769
- *
19770
- * win.print({ silent: false, deviceName: 'system-printer-name' }).then(() => {
19771
- * console.log('print call has been sent to the system');
19772
- * });
19773
- * ```
19774
- *
19775
- * If a window has embedded views, those views will not print by default. To print a window's contents including embedded views,
19776
- * use the `content` option:
19777
- *
19778
- * ```js
19779
- * const win = fin.Window.getCurrentSync();
19780
- *
19781
- * // Print embedded views
19782
- * win.print({ content: 'views' });
19783
- *
19784
- * // Print screenshot of current window
19785
- * win.print({ content: 'screenshot' })
19786
- * ```
19787
- *
19788
- * When `content` is set to `views`, the embedded views in the platform window will be concatenated and printed as
19789
- * individual pages. If `includeSelf` is set to `true`, the platform window itself will be printed as the first
19790
- * page - be aware that this page will *not* include the embedded views - it will only include the contents of
19791
- * the platform window itself (e.g. tab stacks), with blank spaces where the view contents would be embedded.
19792
- *
19793
- * Due to a known issue, view contents that are not visible at the time `print` is called will not appear when
19794
- * printing `contents: views`. This includes views that are obscured behind other active UI elements.
19795
- *
19796
- * To print the views embedded in their page context, set `content` to `screenshot`.
19797
- */
19798
- print(options?: OpenFin.WindowPrintOptions): Promise<void>;
19799
- }
19800
-
19801
- /**
19802
- * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
19803
- * @interface
19804
- */
19805
- declare type WindowAlertRequestedEvent = BaseEvent_3 & {
19806
- type: 'window-alert-requested';
19807
- };
19808
-
19809
- /**
19810
- * Returned from getBounds call. bottom and right are never used for setting.
19811
- * @interface
19812
- */
19813
- declare type WindowBounds = Bounds & {
19814
- bottom: number;
19815
- right: number;
19816
- };
19817
-
19818
- /**
19819
- * @deprecated Renamed to {@link ClosedEvent}.
19820
- */
19821
- declare type WindowClosedEvent = ClosedEvent_2;
19822
-
19823
- /**
19824
- * @deprecated Renamed to {@link CloseRequestedEvent}.
19825
- */
19826
- declare type WindowCloseRequestedEvent = CloseRequestedEvent;
19827
-
19828
- /**
19829
- * @deprecated Renamed to {@link ClosingEvent}.
19830
- */
19831
- declare type WindowClosingEvent = ClosingEvent;
19832
-
19833
- /**
19834
- * A rule prescribing content creation in a {@link OpenFin.Window}.
19835
- *
19836
- * @interface
19837
- */
19838
- declare type WindowContentCreationRule = BaseContentCreationRule & {
19839
- /**
19840
- * Behavior to use when opening matched content.
19841
- */
19842
- behavior: 'window';
19843
- /**
19844
- * Options for newly-created window.
19845
- */
19846
- options?: Partial<WindowOptions>;
19847
- };
19848
-
19849
- /**
19850
- * Generated when a child window is created.
19851
- * @interface
19852
- */
19853
- declare type WindowCreatedEvent = BaseEvent_3 & {
19854
- type: 'window-created';
19855
- };
19856
-
19857
- /**
19858
- * Options required to create a new window with {@link Window._WindowModule.create Window.create}.
19859
- *
19860
- * Note that `name` is the only required property — albeit the `url` property is usually provided as well
19861
- * (defaults to `"about:blank"` when omitted).
19862
- * @interface
19863
- */
19864
- declare type WindowCreationOptions = Partial<WindowOptions> & {
19865
- name: string;
19866
- };
19867
-
19868
- declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
19869
-
19870
- /**
19871
- * @interface
19872
- */
19873
- declare type WindowDetail = {
19874
- /**
19875
- * The bottom-most coordinate of the window.
19876
- */
19877
- bottom: number;
19878
- /**
19879
- * The height of the window.
19880
- */
19881
- height: number;
19882
- isShowing: boolean;
19883
- /**
19884
- * The left-most coordinate of the window.
19885
- */
19886
- left: number;
19887
- /**
19888
- * The name of the window.
19889
- */
19890
- name: string;
19891
- /**
19892
- * The right-most coordinate of the window.
19893
- */
19894
- right: number;
19895
- state: string;
19896
- /**
19897
- * The top-most coordinate of the window.
19898
- */
19899
- top: number;
19900
- /**
19901
- * The width of the window.
19902
- */
19903
- width: number;
19904
- };
19905
-
19906
- /**
19907
- * Generated when a child window ends loading.
19908
- * @interface
19909
- */
19910
- declare type WindowEndLoadEvent = BaseEvent_3 & {
19911
- type: 'window-end-load';
19912
- };
19913
-
19914
- /**
19915
- * @deprecated, Renamed to {@link Event}.
19916
- */
19917
- declare type WindowEvent = Event_6;
19918
-
19919
- declare type WindowEvent_2 = Events.WindowEvents.WindowEvent;
19920
-
19921
- declare namespace WindowEvents {
19922
- export {
19923
- BaseEvent_5 as BaseEvent,
19924
- BaseWindowEvent,
19925
- ViewAttachedEvent,
19926
- ViewDetachedEvent,
19927
- WindowViewEvent,
19928
- AlertRequestedEvent,
19929
- AuthRequestedEvent,
19930
- EndLoadEvent,
19931
- WillRedirectEvent,
19932
- ReloadedEvent,
19933
- OptionsChangedEvent,
19934
- WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
19935
- ExternalProcessExitedEvent,
19936
- ExternalProcessStartedEvent,
19937
- HiddenEvent_2 as HiddenEvent,
19938
- WindowHiddenEvent,
19939
- PreloadScriptInfoRunning,
19940
- PreloadScriptInfo,
19941
- PreloadScriptsStateChangeEvent,
19942
- UserBoundsChangeEvent,
19943
- BoundsChangeEvent,
19944
- WillMoveOrResizeEvent,
19945
- PerformanceReportEvent,
19946
- InputEvent_2 as InputEvent,
19947
- LayoutInitializedEvent,
19948
- LayoutReadyEvent,
19949
- BeginUserBoundsChangingEvent,
19950
- BoundsChangedEvent,
19951
- BoundsChangingEvent,
19952
- CloseRequestedEvent,
19953
- WindowCloseRequestedEvent,
19954
- ContextChangedEvent,
19955
- ClosedEvent_2 as ClosedEvent,
19956
- WindowClosedEvent,
19957
- ClosingEvent,
19958
- WindowClosingEvent,
19959
- DisabledMovementBoundsChangedEvent,
19960
- DisabledMovementBoundsChangingEvent,
19961
- EmbeddedEvent,
19962
- EndUserBoundsChangingEvent,
19963
- HotkeyEvent_2 as HotkeyEvent,
19964
- WindowHotkeyEvent,
19965
- InitializedEvent_2 as InitializedEvent,
19966
- WindowInitializedEvent,
19967
- MaximizedEvent,
19968
- MinimizedEvent,
19969
- PreloadScriptsStateChangedEvent,
19970
- PreloadScriptsStateChangingEvent,
19971
- RestoredEvent,
19972
- WindowRestoredEvent,
19973
- ShowRequestedEvent,
19974
- WindowShowRequestedEvent,
19975
- ShownEvent_2 as ShownEvent,
19976
- WindowShownEvent,
19977
- UserMovementEnabledEvent,
19978
- UserMovementDisabledEvent,
19979
- WillMoveEvent,
19980
- WillResizeEvent,
19981
- NonPropagatedWindowEvent,
19982
- ShowAllDownloadsEvent,
19983
- DownloadShelfVisibilityChangedEvent,
19984
- WindowSourcedEvent,
19985
- WillPropagateWindowEvent,
19986
- Event_6 as Event,
19987
- WindowEvent,
19988
- EventType_2 as EventType,
19989
- WindowEventType,
19990
- PropagatedEvent_3 as PropagatedEvent,
19991
- PropagatedWindowEvent,
19992
- PropagatedWindowEventType,
19993
- Payload_3 as Payload,
19994
- ByType_2 as ByType
19995
- }
19996
- }
19997
-
19998
- /**
19999
- * @deprecated Renamed to {@link EventType}.
20000
- */
20001
- declare type WindowEventType = WindowEvent['type'];
20002
-
20003
- /**
20004
- * @deprecated Renamed to {@link HiddenEvent}.
20005
- */
20006
- declare type WindowHiddenEvent = HiddenEvent_2;
20007
-
20008
- /**
20009
- * @deprecated Renamed to {@link HotkeyEvent}.
20010
- */
20011
- declare type WindowHotkeyEvent = HotkeyEvent_2;
20012
-
20013
- /**
20014
- * @interface
20015
- */
20016
- declare type WindowInfo = {
20017
- canNavigateBack: boolean;
20018
- canNavigateForward: boolean;
20019
- preloadScripts: Array<any>;
20020
- title: string;
20021
- url: string;
20022
- };
20023
-
20024
- /**
20025
- * @deprecated Renamed to {@link InitializedEvent}.
20026
- */
20027
- declare type WindowInitializedEvent = InitializedEvent_2;
20028
-
20029
- /**
20030
- * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
20031
- */
20032
- declare class _WindowModule extends Base {
20033
- /**
20034
- * Asynchronously returns a Window object that represents an existing window.
20035
- *
20036
- * @example
20037
- * ```js
20038
- * async function createWin() {
20039
- * const app = await fin.Application.start({
20040
- * name: 'myApp',
20041
- * uuid: 'app-1',
20042
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
20043
- * autoShow: true
20044
- * });
20045
- * return await app.getWindow();
20046
- * }
20047
- * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
20048
- * .then(win => console.log('wrapped window'))
20049
- * .catch(err => console.log(err));
20050
- * ```
20051
- */
20052
- wrap(identity: OpenFin.Identity): Promise<OpenFin.Window>;
20053
- /**
20054
- * Synchronously returns a Window object that represents an existing window.
20055
- *
20056
- * @example
20057
- * ```js
20058
- * async function createWin() {
20059
- * const app = await fin.Application.start({
20060
- * name: 'myApp',
20061
- * uuid: 'app-1',
20062
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
20063
- * autoShow: true
20064
- * });
20065
- * return await app.getWindow();
20066
- * }
20067
- * await createWin();
20068
- * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
20069
- * ```
20070
- */
20071
- wrapSync(identity: OpenFin.Identity): OpenFin.Window;
20072
- /**
20073
- * Creates a new Window.
20074
- * @param options - Window creation options
20075
- *
20076
- * @example
20077
- * ```js
20078
- * async function createWindow() {
20079
- * const winOption = {
20080
- * name:'child',
20081
- * defaultWidth: 300,
20082
- * defaultHeight: 300,
20083
- * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
20084
- * frame: true,
20085
- * autoShow: true
20086
- * };
20087
- * return await fin.Window.create(winOption);
20088
- * }
20089
- *
20090
- * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
20091
- * ```
20092
- */
20093
- create(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
20094
- /**
20095
- * Asynchronously returns a Window object that represents the current window
20096
- *
20097
- * @example
20098
- * ```js
20099
- * fin.Window.getCurrent()
20100
- * .then(wnd => console.log('current window'))
20101
- * .catch(err => console.log(err));
20102
- *
20103
- * ```
20104
- */
20105
- getCurrent(): Promise<OpenFin.Window>;
20106
- /**
20107
- * Synchronously returns a Window object that represents the current window
20108
- *
20109
- * @example
20110
- * ```js
20111
- * const wnd = fin.Window.getCurrentSync();
20112
- * const info = await wnd.getInfo();
20113
- * console.log(info);
20114
- *
20115
- * ```
20116
- */
20117
- getCurrentSync(): OpenFin.Window;
20118
- }
20119
-
20120
- /**
20121
- * Generated when a child window is not responding.
20122
- * @interface
20123
- */
20124
- declare type WindowNotRespondingEvent = BaseEvent_3 & {
20125
- type: 'window-not-responding';
20126
- };
20127
-
20128
- /**
20129
- * @interface
20130
- */
20131
- declare type WindowOptionDiff = {
20132
- [key in keyof WindowOptions]: {
20133
- oldVal: WindowOptions[key];
20134
- newVal: WindowOptions[key];
20135
- };
20136
- };
20137
-
20138
- /**
20139
- * @interface
20140
- */
20141
- declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
20142
-
20143
- declare type WindowOptionsChangedEvent = OpenFin.WindowEvents.WindowOptionsChangedEvent;
20144
-
20145
- /**
20146
- * @deprecated Renamed to {@link OptionsChangedEvent}.
20147
- */
20148
- declare type WindowOptionsChangedEvent_2 = OptionsChangedEvent;
20149
-
20150
- declare type WindowPrintOptions = PrintOptions | ScreenshotPrintOptions | WindowViewsPrintOptions;
20151
-
20152
- /**
20153
- * Generated when a child window is responding.
20154
- * @interface
20155
- */
20156
- declare type WindowRespondingEvent = BaseEvent_3 & {
20157
- type: 'window-responding';
20158
- };
20159
-
20160
- /**
20161
- * @deprecated Renamed to {@link RestoredEvent}.
20162
- */
20163
- declare type WindowRestoredEvent = RestoredEvent;
20164
-
20165
- /**
20166
- * @deprecated Renamed to {@link ShownEvent}.
20167
- */
20168
- declare type WindowShownEvent = ShownEvent_2;
20169
-
20170
- /**
20171
- * @deprecated Renamed to {@link ShowRequestedEvent}.
20172
- */
20173
- declare type WindowShowRequestedEvent = ShowRequestedEvent;
20174
-
20175
- /**
20176
- * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
20177
- * from {@link OpenFin.ViewEvents}.
20178
- */
20179
- 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;
20180
-
20181
- /**
20182
- * Generated when a child window starts loading.
20183
- * @interface
20184
- */
20185
- declare type WindowStartLoadEvent = BaseEvent_3 & {
20186
- type: 'window-start-load';
20187
- };
20188
-
20189
- /**
20190
- * Visibility state of a window.
20191
- */
20192
- declare type WindowState = 'maximized' | 'minimized' | 'normal';
20193
-
20194
- /**
20195
- * A view-related event that fires natively on the `Window` topic. This means that these events *do* propagate
20196
- * to the `Application` level, with the name pattern `window-view-eventname`.
20197
- */
20198
- declare type WindowViewEvent = {
20199
- viewIdentity: OpenFin.Identity;
20200
- } & (ViewAttachedEvent | ViewDetachedEvent);
20201
-
20202
- /**
20203
- * @interface
20204
- */
20205
- declare type WindowViewsPrintOptions = {
20206
- content: 'views';
20207
- includeSelf?: boolean;
20208
- };
20209
-
20210
- declare type Wire = EventEmitter & {
20211
- connect(messageReciever: MessageReceiver): Promise<any>;
20212
- connectSync(): any;
20213
- send(data: any): Promise<any>;
20214
- shutdown(): Promise<void>;
20215
- getPort(): string;
20216
- };
20217
-
20218
- declare type WireConstructor = {
20219
- new (onmessage: (data: any) => void): Wire;
20220
- };
20221
-
20222
- /**
20223
- * @internal
20224
- */
20225
- declare type WithId<T extends AppVersionEventType> = `${T}.${string}`;
20226
-
20227
- declare interface WithInterop {
20228
- interop: InteropClient;
20229
- }
20230
-
20231
- /**
20232
- * @internal
20233
- */
20234
- declare type WithoutId<T extends string> = T extends WithId<infer U> ? U : never;
20235
-
20236
- declare type WithPositioningOptions<T extends {} = {}> = T & {
20237
- positioningOptions?: OpenFin.PositioningOptions;
20238
- };
20239
-
20240
- /**
20241
- * @internal
20242
- * @interface
20243
- */
20244
- declare type WorkspacePlatformOptions = {
20245
- /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
20246
- [key: string]: any;
20247
- };
20248
-
20249
- /**
20250
- * A generic request to write any supported data to the clipboard.
20251
- * @interface
20252
- */
20253
- declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
20254
- /**
20255
- * Data to be written
20256
- */
20257
- data: {
20258
- text?: string;
20259
- html?: string;
20260
- rtf?: string;
20261
- } & Partial<Pick<WriteImageClipboardRequest, 'image'>>;
20262
- };
20263
-
20264
- /**
20265
- * @deprecated - instead use WriteAnyClipboardRequest
20266
- *
20267
- * A generic request to write any supported data to the clipboard.
20268
- *
20269
- * @interface
20270
- */
20271
- declare type WriteAnyRequestType = WriteAnyClipboardRequest;
20272
-
20273
- /**
20274
- * A request to write data to the clipboard.
20275
- * @interface
20276
- */
20277
- declare type WriteClipboardRequest = BaseClipboardRequest & {
20278
- /**
20279
- * Data to write to the clipboard.
20280
- */
20281
- data: string;
20282
- };
20283
-
20284
- /**
20285
- * @interface
20286
- */
20287
- declare type WriteImageClipboardRequest = BaseClipboardRequest & {
20288
- /**
20289
- * Can be either a base64 string, or a DataURL string. If using DataURL, the
20290
- * supported formats are `data:image/png[;base64],` and `data:image/jpeg[;base64],`.
20291
- * Using other image/<format> DataURLs will throw an Error.
20292
- */
20293
- image: string;
20294
- };
20295
-
20296
- /**
20297
- * @deprecated - instead use OpenFin.WriteClipboardRequest
20298
- *
20299
- * A request to write data to the clipboard.
20300
- *
20301
- * @interface
20302
- */
20303
- declare type WriteRequestType = WriteClipboardRequest;
20304
-
20305
- export { }
18516
+ * Dispatch a result to the caller of `showPopupWindow`.
18517
+ *
18518
+ * @remarks If this window isn't currently being shown as a popup, this call will silently fail.
18519
+ * @param data Serializable data to send to the caller window.
18520
+ *
18521
+ * @example
18522
+ * ```js
18523
+ * await fin.me.dispatchPopupResult({
18524
+ * foo: 'bar'
18525
+ * });
18526
+ * ```
18527
+ */
18528
+ dispatchPopupResult(data: any): Promise<void>;
18529
+ /**
18530
+ * Prints the contents of the window.
18531
+ *
18532
+ * @param options Configuration for the print task.
18533
+ * @remarks When `silent` is set to `true`, the API will pick the system's default printer if deviceName is empty
18534
+ * and the default settings for printing.
18535
+ *
18536
+ * Use the CSS style `page-break-before: always;` to force print to a new page.
18537
+ *
18538
+ * @example
18539
+ * ```js
18540
+ * const win = fin.Window.getCurrentSync();
18541
+ *
18542
+ * win.print({ silent: false, deviceName: 'system-printer-name' }).then(() => {
18543
+ * console.log('print call has been sent to the system');
18544
+ * });
18545
+ * ```
18546
+ *
18547
+ * If a window has embedded views, those views will not print by default. To print a window's contents including embedded views,
18548
+ * use the `content` option:
18549
+ *
18550
+ * ```js
18551
+ * const win = fin.Window.getCurrentSync();
18552
+ *
18553
+ * // Print embedded views
18554
+ * win.print({ content: 'views' });
18555
+ *
18556
+ * // Print screenshot of current window
18557
+ * win.print({ content: 'screenshot' })
18558
+ * ```
18559
+ *
18560
+ * When `content` is set to `views`, the embedded views in the platform window will be concatenated and printed as
18561
+ * individual pages. If `includeSelf` is set to `true`, the platform window itself will be printed as the first
18562
+ * page - be aware that this page will *not* include the embedded views - it will only include the contents of
18563
+ * the platform window itself (e.g. tab stacks), with blank spaces where the view contents would be embedded.
18564
+ *
18565
+ * Due to a known issue, view contents that are not visible at the time `print` is called will not appear when
18566
+ * printing `contents: views`. This includes views that are obscured behind other active UI elements.
18567
+ *
18568
+ * To print the views embedded in their page context, set `content` to `screenshot`.
18569
+ */
18570
+ print(options?: OpenFin.WindowPrintOptions): Promise<void>;
18571
+ }
18572
+
18573
+ /**
18574
+ * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
18575
+ * @interface
18576
+ */
18577
+ declare type WindowAlertRequestedEvent = BaseEvent_3 & {
18578
+ type: 'window-alert-requested';
18579
+ };
18580
+
18581
+ /**
18582
+ * Returned from getBounds call. bottom and right are never used for setting.
18583
+ * @interface
18584
+ */
18585
+ declare type WindowBounds = Bounds & {
18586
+ bottom: number;
18587
+ right: number;
18588
+ };
18589
+
18590
+ /**
18591
+ * @deprecated Renamed to {@link ClosedEvent}.
18592
+ */
18593
+ declare type WindowClosedEvent = ClosedEvent_2;
18594
+
18595
+ /**
18596
+ * @deprecated Renamed to {@link CloseRequestedEvent}.
18597
+ */
18598
+ declare type WindowCloseRequestedEvent = CloseRequestedEvent;
18599
+
18600
+ /**
18601
+ * @deprecated Renamed to {@link ClosingEvent}.
18602
+ */
18603
+ declare type WindowClosingEvent = ClosingEvent;
18604
+
18605
+ /**
18606
+ * A rule prescribing content creation in a {@link OpenFin.Window}.
18607
+ *
18608
+ * @interface
18609
+ */
18610
+ declare type WindowContentCreationRule = BaseContentCreationRule & {
18611
+ /**
18612
+ * Behavior to use when opening matched content.
18613
+ */
18614
+ behavior: 'window';
18615
+ /**
18616
+ * Options for newly-created window.
18617
+ */
18618
+ options?: Partial<WindowOptions>;
18619
+ };
18620
+
18621
+ /**
18622
+ * Generated when a child window is created.
18623
+ * @interface
18624
+ */
18625
+ declare type WindowCreatedEvent = BaseEvent_3 & {
18626
+ type: 'window-created';
18627
+ };
18628
+
18629
+ /**
18630
+ * Options required to create a new window with {@link Window._WindowModule.create Window.create}.
18631
+ *
18632
+ * Note that `name` is the only required property — albeit the `url` property is usually provided as well
18633
+ * (defaults to `"about:blank"` when omitted).
18634
+ * @interface
18635
+ */
18636
+ declare type WindowCreationOptions = Partial<WindowOptions> & {
18637
+ name: string;
18638
+ };
18639
+
18640
+ declare type WindowCreationReason = 'tearout' | 'create-view-without-target' | 'api-call' | 'app-creation' | 'restore' | 'apply-snapshot';
18641
+
18642
+ /**
18643
+ * @interface
18644
+ */
18645
+ declare type WindowDetail = {
18646
+ /**
18647
+ * The bottom-most coordinate of the window.
18648
+ */
18649
+ bottom: number;
18650
+ /**
18651
+ * The height of the window.
18652
+ */
18653
+ height: number;
18654
+ isShowing: boolean;
18655
+ /**
18656
+ * The left-most coordinate of the window.
18657
+ */
18658
+ left: number;
18659
+ /**
18660
+ * The name of the window.
18661
+ */
18662
+ name: string;
18663
+ /**
18664
+ * The right-most coordinate of the window.
18665
+ */
18666
+ right: number;
18667
+ state: string;
18668
+ /**
18669
+ * The top-most coordinate of the window.
18670
+ */
18671
+ top: number;
18672
+ /**
18673
+ * The width of the window.
18674
+ */
18675
+ width: number;
18676
+ };
18677
+
18678
+ /**
18679
+ * Generated when a child window ends loading.
18680
+ * @interface
18681
+ */
18682
+ declare type WindowEndLoadEvent = BaseEvent_3 & {
18683
+ type: 'window-end-load';
18684
+ };
18685
+
18686
+ /**
18687
+ * @deprecated, Renamed to {@link Event}.
18688
+ */
18689
+ declare type WindowEvent = Event_6;
18690
+
18691
+ declare type WindowEvent_2 = Events.WindowEvents.WindowEvent;
18692
+
18693
+ declare namespace WindowEvents {
18694
+ export {
18695
+ BaseEvent_5 as BaseEvent,
18696
+ BaseWindowEvent,
18697
+ ViewAttachedEvent,
18698
+ ViewDetachedEvent,
18699
+ WindowViewEvent,
18700
+ AlertRequestedEvent,
18701
+ AuthRequestedEvent,
18702
+ EndLoadEvent,
18703
+ WillRedirectEvent,
18704
+ ReloadedEvent,
18705
+ OptionsChangedEvent,
18706
+ WindowOptionsChangedEvent_2 as WindowOptionsChangedEvent,
18707
+ ExternalProcessExitedEvent,
18708
+ ExternalProcessStartedEvent,
18709
+ HiddenEvent_2 as HiddenEvent,
18710
+ WindowHiddenEvent,
18711
+ PreloadScriptInfoRunning,
18712
+ PreloadScriptInfo,
18713
+ PreloadScriptsStateChangeEvent,
18714
+ UserBoundsChangeEvent,
18715
+ BoundsChangeEvent,
18716
+ WillMoveOrResizeEvent,
18717
+ PerformanceReportEvent,
18718
+ InputEvent_2 as InputEvent,
18719
+ LayoutInitializedEvent,
18720
+ LayoutReadyEvent,
18721
+ BeginUserBoundsChangingEvent,
18722
+ BoundsChangedEvent,
18723
+ BoundsChangingEvent,
18724
+ CloseRequestedEvent,
18725
+ WindowCloseRequestedEvent,
18726
+ ContextChangedEvent,
18727
+ ClosedEvent_2 as ClosedEvent,
18728
+ WindowClosedEvent,
18729
+ ClosingEvent,
18730
+ WindowClosingEvent,
18731
+ DisabledMovementBoundsChangedEvent,
18732
+ DisabledMovementBoundsChangingEvent,
18733
+ EmbeddedEvent,
18734
+ EndUserBoundsChangingEvent,
18735
+ HotkeyEvent_2 as HotkeyEvent,
18736
+ WindowHotkeyEvent,
18737
+ InitializedEvent_2 as InitializedEvent,
18738
+ WindowInitializedEvent,
18739
+ MaximizedEvent,
18740
+ MinimizedEvent,
18741
+ PreloadScriptsStateChangedEvent,
18742
+ PreloadScriptsStateChangingEvent,
18743
+ RestoredEvent,
18744
+ WindowRestoredEvent,
18745
+ ShowRequestedEvent,
18746
+ WindowShowRequestedEvent,
18747
+ ShownEvent_2 as ShownEvent,
18748
+ WindowShownEvent,
18749
+ UserMovementEnabledEvent,
18750
+ UserMovementDisabledEvent,
18751
+ WillMoveEvent,
18752
+ WillResizeEvent,
18753
+ NonPropagatedWindowEvent,
18754
+ ShowAllDownloadsEvent,
18755
+ DownloadShelfVisibilityChangedEvent,
18756
+ WindowSourcedEvent,
18757
+ WillPropagateWindowEvent,
18758
+ Event_6 as Event,
18759
+ WindowEvent,
18760
+ EventType_2 as EventType,
18761
+ WindowEventType,
18762
+ PropagatedEvent_3 as PropagatedEvent,
18763
+ PropagatedWindowEvent,
18764
+ PropagatedWindowEventType,
18765
+ Payload_3 as Payload,
18766
+ ByType_2 as ByType
18767
+ }
18768
+ }
18769
+
18770
+ /**
18771
+ * @deprecated Renamed to {@link EventType}.
18772
+ */
18773
+ declare type WindowEventType = WindowEvent['type'];
18774
+
18775
+ /**
18776
+ * @deprecated Renamed to {@link HiddenEvent}.
18777
+ */
18778
+ declare type WindowHiddenEvent = HiddenEvent_2;
18779
+
18780
+ /**
18781
+ * @deprecated Renamed to {@link HotkeyEvent}.
18782
+ */
18783
+ declare type WindowHotkeyEvent = HotkeyEvent_2;
18784
+
18785
+ /**
18786
+ * @interface
18787
+ */
18788
+ declare type WindowInfo = {
18789
+ canNavigateBack: boolean;
18790
+ canNavigateForward: boolean;
18791
+ preloadScripts: Array<any>;
18792
+ title: string;
18793
+ url: string;
18794
+ };
18795
+
18796
+ /**
18797
+ * @deprecated Renamed to {@link InitializedEvent}.
18798
+ */
18799
+ declare type WindowInitializedEvent = InitializedEvent_2;
18800
+
18801
+ /**
18802
+ * Static namespace for OpenFin API methods that interact with the {@link _Window} class, available under `fin.Window`.
18803
+ */
18804
+ declare class _WindowModule extends Base {
18805
+ /**
18806
+ * Asynchronously returns a Window object that represents an existing window.
18807
+ *
18808
+ * @example
18809
+ * ```js
18810
+ * async function createWin() {
18811
+ * const app = await fin.Application.start({
18812
+ * name: 'myApp',
18813
+ * uuid: 'app-1',
18814
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrap.html',
18815
+ * autoShow: true
18816
+ * });
18817
+ * return await app.getWindow();
18818
+ * }
18819
+ * createWin().then(() => fin.Window.wrap({ uuid: 'app-1', name: 'myApp' }))
18820
+ * .then(win => console.log('wrapped window'))
18821
+ * .catch(err => console.log(err));
18822
+ * ```
18823
+ */
18824
+ wrap(identity: OpenFin.Identity): Promise<OpenFin.Window>;
18825
+ /**
18826
+ * Synchronously returns a Window object that represents an existing window.
18827
+ *
18828
+ * @example
18829
+ * ```js
18830
+ * async function createWin() {
18831
+ * const app = await fin.Application.start({
18832
+ * name: 'myApp',
18833
+ * uuid: 'app-1',
18834
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.wrapSync.html',
18835
+ * autoShow: true
18836
+ * });
18837
+ * return await app.getWindow();
18838
+ * }
18839
+ * await createWin();
18840
+ * let win = fin.Window.wrapSync({ uuid: 'app-1', name: 'myApp' });
18841
+ * ```
18842
+ */
18843
+ wrapSync(identity: OpenFin.Identity): OpenFin.Window;
18844
+ /**
18845
+ * Creates a new Window.
18846
+ * @param options - Window creation options
18847
+ *
18848
+ * @example
18849
+ * ```js
18850
+ * async function createWindow() {
18851
+ * const winOption = {
18852
+ * name:'child',
18853
+ * defaultWidth: 300,
18854
+ * defaultHeight: 300,
18855
+ * url: 'https://cdn.openfin.co/docs/javascript/stable/tutorial-Window.create.html',
18856
+ * frame: true,
18857
+ * autoShow: true
18858
+ * };
18859
+ * return await fin.Window.create(winOption);
18860
+ * }
18861
+ *
18862
+ * createWindow().then(() => console.log('Window is created')).catch(err => console.log(err));
18863
+ * ```
18864
+ */
18865
+ create(options: OpenFin.WindowCreationOptions): Promise<OpenFin.Window>;
18866
+ /**
18867
+ * Asynchronously returns a Window object that represents the current window
18868
+ *
18869
+ * @example
18870
+ * ```js
18871
+ * fin.Window.getCurrent()
18872
+ * .then(wnd => console.log('current window'))
18873
+ * .catch(err => console.log(err));
18874
+ *
18875
+ * ```
18876
+ */
18877
+ getCurrent(): Promise<OpenFin.Window>;
18878
+ /**
18879
+ * Synchronously returns a Window object that represents the current window
18880
+ *
18881
+ * @example
18882
+ * ```js
18883
+ * const wnd = fin.Window.getCurrentSync();
18884
+ * const info = await wnd.getInfo();
18885
+ * console.log(info);
18886
+ *
18887
+ * ```
18888
+ */
18889
+ getCurrentSync(): OpenFin.Window;
18890
+ }
18891
+
18892
+ /**
18893
+ * Generated when a child window is not responding.
18894
+ * @interface
18895
+ */
18896
+ declare type WindowNotRespondingEvent = BaseEvent_3 & {
18897
+ type: 'window-not-responding';
18898
+ };
18899
+
18900
+ /**
18901
+ * @interface
18902
+ */
18903
+ declare type WindowOptionDiff = {
18904
+ [key in keyof WindowOptions]: {
18905
+ oldVal: WindowOptions[key];
18906
+ newVal: WindowOptions[key];
18907
+ };
18908
+ };
18909
+
18910
+ /**
18911
+ * @interface
18912
+ */
18913
+ declare type WindowOptions = MutableWindowOptions & ConstWindowOptions;
18914
+
18915
+ declare type WindowOptionsChangedEvent = OpenFin.WindowEvents.WindowOptionsChangedEvent;
18916
+
18917
+ /**
18918
+ * @deprecated Renamed to {@link OptionsChangedEvent}.
18919
+ */
18920
+ declare type WindowOptionsChangedEvent_2 = OptionsChangedEvent;
18921
+
18922
+ declare type WindowPrintOptions = PrintOptions | ScreenshotPrintOptions | WindowViewsPrintOptions;
18923
+
18924
+ /**
18925
+ * Generated when a child window is responding.
18926
+ * @interface
18927
+ */
18928
+ declare type WindowRespondingEvent = BaseEvent_3 & {
18929
+ type: 'window-responding';
18930
+ };
18931
+
18932
+ /**
18933
+ * @deprecated Renamed to {@link RestoredEvent}.
18934
+ */
18935
+ declare type WindowRestoredEvent = RestoredEvent;
18936
+
18937
+ /**
18938
+ * @deprecated Renamed to {@link ShownEvent}.
18939
+ */
18940
+ declare type WindowShownEvent = ShownEvent_2;
18941
+
18942
+ /**
18943
+ * @deprecated Renamed to {@link ShowRequestedEvent}.
18944
+ */
18945
+ declare type WindowShowRequestedEvent = ShowRequestedEvent;
18946
+
18947
+ /**
18948
+ * A union of all events that emit natively on the `Window` topic, i.e. excluding those that propagate
18949
+ * from {@link OpenFin.ViewEvents}.
18950
+ */
18951
+ 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;
18952
+
18953
+ /**
18954
+ * Generated when a child window starts loading.
18955
+ * @interface
18956
+ */
18957
+ declare type WindowStartLoadEvent = BaseEvent_3 & {
18958
+ type: 'window-start-load';
18959
+ };
18960
+
18961
+ /**
18962
+ * Visibility state of a window.
18963
+ */
18964
+ declare type WindowState = 'maximized' | 'minimized' | 'normal';
18965
+
18966
+ /**
18967
+ * A view-related event that fires natively on the `Window` topic. This means that these events *do* propagate
18968
+ * to the `Application` level, with the name pattern `window-view-eventname`.
18969
+ */
18970
+ declare type WindowViewEvent = {
18971
+ viewIdentity: OpenFin.Identity;
18972
+ } & (ViewAttachedEvent | ViewDetachedEvent);
18973
+
18974
+ /**
18975
+ * @interface
18976
+ */
18977
+ declare type WindowViewsPrintOptions = {
18978
+ content: 'views';
18979
+ includeSelf?: boolean;
18980
+ };
18981
+
18982
+ declare type Wire = EventEmitter & {
18983
+ connect(messageReciever: MessageReceiver): Promise<any>;
18984
+ connectSync(): any;
18985
+ send(data: any): Promise<any>;
18986
+ shutdown(): Promise<void>;
18987
+ getPort(): string;
18988
+ };
18989
+
18990
+ declare type WireConstructor = {
18991
+ new (onmessage: (data: any) => void): Wire;
18992
+ };
18993
+
18994
+ /**
18995
+ * @internal
18996
+ */
18997
+ declare type WithId<T extends AppVersionEventType> = `${T}.${string}`;
18998
+
18999
+ declare interface WithInterop {
19000
+ interop: InteropClient;
19001
+ }
19002
+
19003
+ /**
19004
+ * @internal
19005
+ */
19006
+ declare type WithoutId<T extends string> = T extends WithId<infer U> ? U : never;
19007
+
19008
+ declare type WithPositioningOptions<T extends {} = {}> = T & {
19009
+ positioningOptions?: OpenFin.PositioningOptions;
19010
+ };
19011
+
19012
+ /**
19013
+ * @internal
19014
+ * @interface
19015
+ */
19016
+ declare type WorkspacePlatformOptions = {
19017
+ /** Leaving this as any for now until we figure out what the shape should look like in Workspace */
19018
+ [key: string]: any;
19019
+ };
19020
+
19021
+ /**
19022
+ * A generic request to write any supported data to the clipboard.
19023
+ * @interface
19024
+ */
19025
+ declare type WriteAnyClipboardRequest = BaseClipboardRequest & {
19026
+ /**
19027
+ * Data to be written
19028
+ */
19029
+ data: {
19030
+ text?: string;
19031
+ html?: string;
19032
+ rtf?: string;
19033
+ } & Partial<Pick<WriteImageClipboardRequest, 'image'>>;
19034
+ };
19035
+
19036
+ /**
19037
+ * @deprecated - instead use WriteAnyClipboardRequest
19038
+ *
19039
+ * A generic request to write any supported data to the clipboard.
19040
+ *
19041
+ * @interface
19042
+ */
19043
+ declare type WriteAnyRequestType = WriteAnyClipboardRequest;
19044
+
19045
+ /**
19046
+ * A request to write data to the clipboard.
19047
+ * @interface
19048
+ */
19049
+ declare type WriteClipboardRequest = BaseClipboardRequest & {
19050
+ /**
19051
+ * Data to write to the clipboard.
19052
+ */
19053
+ data: string;
19054
+ };
19055
+
19056
+ /**
19057
+ * @interface
19058
+ */
19059
+ declare type WriteImageClipboardRequest = BaseClipboardRequest & {
19060
+ /**
19061
+ * Can be either a base64 string, or a DataURL string. If using DataURL, the
19062
+ * supported formats are `data:image/png[;base64],` and `data:image/jpeg[;base64],`.
19063
+ * Using other image/<format> DataURLs will throw an Error.
19064
+ */
19065
+ image: string;
19066
+ };
19067
+
19068
+ /**
19069
+ * @deprecated - instead use OpenFin.WriteClipboardRequest
19070
+ *
19071
+ * A request to write data to the clipboard.
19072
+ *
19073
+ * @interface
19074
+ */
19075
+ declare type WriteRequestType = WriteClipboardRequest;
19076
+
19077
+ export { }