@openfin/node-adapter 34.78.52 → 34.78.56

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.
@@ -918,7 +918,6 @@ declare namespace ApplicationEvents {
918
918
  WindowRespondingEvent,
919
919
  WindowStartLoadEvent,
920
920
  ApplicationWindowEvent,
921
- ApplicationWindowEventTypes,
922
921
  ClosedEvent,
923
922
  ConnectedEvent_2 as ConnectedEvent,
924
923
  ApplicationConnectedEvent,
@@ -1337,11 +1336,6 @@ declare type ApplicationType = {
1337
1336
  */
1338
1337
  declare type ApplicationWindowEvent = WindowAlertRequestedEvent | WindowCreatedEvent | WindowEndLoadEvent | WindowNotRespondingEvent | WindowRespondingEvent | WindowStartLoadEvent;
1339
1338
 
1340
- /**
1341
- * Array of valid `type` values for an {@link ApplicationWindowEvent}.
1342
- */
1343
- declare const ApplicationWindowEventTypes: readonly ["window-alert-requested", "window-created", "window-end-load", "window-not-responding", "window-responding", "window-start-load"];
1344
-
1345
1339
  declare type ApplicationWindowInfo = OpenFin.ApplicationWindowInfo;
1346
1340
 
1347
1341
  /**
@@ -3646,7 +3640,7 @@ declare type ConstWindowOptions = {
3646
3640
  /**
3647
3641
  * @defaultValue true
3648
3642
  *
3649
- * Toggling off would keep the Window alive even if all its Views were closed.
3643
+ * Setting this to false would keep the Window alive even if all its Views were closed.
3650
3644
  * This is meant for advanced users and should be used with caution.
3651
3645
  * Limitations - Once a Layout has been emptied out of all views it's not usable anymore, and certain API calls will fail.
3652
3646
  * Use `layout.replace` to create a fresh Layout instance in case you want to populate it with Views again.
@@ -3656,7 +3650,8 @@ declare type ConstWindowOptions = {
3656
3650
  /**
3657
3651
  * @defaultValue 'all'
3658
3652
  *
3659
- * Determines which views prevent close if `closeOnLastViewRemoved` is set to true. Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3653
+ * When `closeOnLastViewRemoved` is set to true, determines which views prevent closing the window.
3654
+ + * Defaults to `all`. You may want to switch this to `layout` if using View closeBehavior: 'hide'.
3660
3655
  * **NOTE:** - This option is ignored in non-Platforms apps.
3661
3656
  */
3662
3657
  viewsPreventingClose: 'all' | 'layout';
@@ -4463,7 +4458,7 @@ declare type CreateViewPayload = {
4463
4458
  /**
4464
4459
  * @interface
4465
4460
  */
4466
- declare type CreateViewTarget = LayoutIdentity & {
4461
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4467
4462
  /**
4468
4463
  * If specified, view creation will not attach to a window and caller must
4469
4464
  * insert the view into the layout explicitly
@@ -4603,6 +4598,14 @@ declare type DestroyedEvent = BaseEvent_4 & {
4603
4598
  type: 'destroyed';
4604
4599
  };
4605
4600
 
4601
+ /**
4602
+ * @interface
4603
+ */
4604
+ declare type DeviceInfo = {
4605
+ vendorId: string | number;
4606
+ productId: string | number;
4607
+ };
4608
+
4606
4609
  /**
4607
4610
  * Generated when a page's theme color changes. This is usually due to encountering a meta tag.
4608
4611
  * @interface
@@ -5063,9 +5066,10 @@ declare type EntityTypeHelpers<T extends EntityType_2> = T extends 'view' ? {
5063
5066
  } : never;
5064
5067
 
5065
5068
  declare interface Environment {
5066
- initLayout(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5069
+ initLayoutManager(fin: OpenFin.Fin<OpenFin.EntityType>, wire: Transport, options: OpenFin.InitLayoutOptions): Promise<OpenFin.LayoutManager<OpenFin.LayoutSnapshot>>;
5067
5070
  createLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, options: OpenFin.CreateLayoutOptions): Promise<void>;
5068
5071
  destroyLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<void>;
5072
+ resolveLayout(layoutManager: OpenFin.LayoutManager<OpenFin.LayoutSnapshot>, layoutIdentity: OpenFin.LayoutIdentity): Promise<any>;
5069
5073
  initPlatform(fin: OpenFin.Fin<OpenFin.EntityType>, ...args: Parameters<OpenFin.Fin['Platform']['init']>): ReturnType<OpenFin.Fin['Platform']['init']>;
5070
5074
  observeBounds(element: Element, onChange: (bounds: DOMRect) => Promise<void> | void): () => void;
5071
5075
  writeToken(path: string, token: string): Promise<string>;
@@ -5115,7 +5119,7 @@ declare type Event_10 = ApplicationEvents.Event | ApiReadyEvent | SnapshotApplie
5115
5119
  * under the {@link OpenFin.SystemEvents} namespace (payloads inherited from propagated events are defined in the namespace
5116
5120
  * from which they propagate).
5117
5121
  */
5118
- declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ViewEvents.PropagatedEvent<'system'> | ApplicationEvents.PropagatedEvent<'system'> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleEvent | MonitorEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
5122
+ declare type Event_11 = ExcludeRequested<WindowEvents.PropagatedEvent<'system'>> | ExcludeRequested<ViewEvents.PropagatedEvent<'system'>> | ExcludeRequested<ApplicationEvents.PropagatedEvent<'system'>> | ApplicationCreatedEvent | DesktopIconClickedEvent | IdleStateChangedEvent | MonitorInfoChangedEvent | SessionChangedEvent | AppVersionEventWithId | SystemShutdownEvent;
5119
5123
 
5120
5124
  /**
5121
5125
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing every possible event that can be emitted by a {@link Channel}. Events are
@@ -5653,7 +5657,7 @@ declare type FileDownloadEvent = {
5653
5657
  *
5654
5658
  * @interface
5655
5659
  */
5656
- declare type FileDownloadLocationChangedEvent = BaseApplicationEvent & {
5660
+ declare type FileDownloadLocationChangedEvent = BaseEvent_3 & {
5657
5661
  type: 'file-download-location-changed';
5658
5662
  };
5659
5663
 
@@ -6660,6 +6664,11 @@ declare type IdentityEvent = BaseEvent & {
6660
6664
 
6661
6665
  /* Excluded from this release type: IdEventType */
6662
6666
 
6667
+ /**
6668
+ * @deprecated Renamed to {@link IdleStateChangedEvent}.
6669
+ */
6670
+ declare type IdleEvent = IdleStateChangedEvent;
6671
+
6663
6672
  /**
6664
6673
  * Generated when a user enters or returns from idle state.
6665
6674
  * @remarks This method is continuously generated every minute while the user is in idle.
@@ -6667,7 +6676,7 @@ declare type IdentityEvent = BaseEvent & {
6667
6676
  * A user returns from idle state when the computer is unlocked or keyboard/mouse activity has resumed.
6668
6677
  * @interface
6669
6678
  */
6670
- declare type IdleEvent = BaseEvent_8 & {
6679
+ declare type IdleStateChangedEvent = BaseEvent_8 & {
6671
6680
  type: 'idle-state-changed';
6672
6681
  elapsedTime: number;
6673
6682
  isIdle: boolean;
@@ -7442,7 +7451,7 @@ declare class InteropBroker extends Base {
7442
7451
  * // }
7443
7452
  * ```
7444
7453
  *
7445
- * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/IntentResolution).
7454
+ * More information on the IntentResolution type can be found in the [FDC3 documentation](https://fdc3.finos.org/docs/api/ref/Metadata#intentresolution).
7446
7455
  *
7447
7456
  * @param contextForIntent Data passed between entities and applications.
7448
7457
  * @param clientIdentity Identity of the Client making the request.
@@ -8618,7 +8627,7 @@ declare type LaunchIntoPlatformPayload = {
8618
8627
  declare class Layout extends Base {
8619
8628
  #private;
8620
8629
  /* Excluded from this release type: init */
8621
- identity: OpenFin.LayoutIdentity;
8630
+ identity: OpenFin.Identity | OpenFin.LayoutIdentity;
8622
8631
  private platform;
8623
8632
  wire: Transport;
8624
8633
  /* Excluded from this release type: __constructor */
@@ -8834,25 +8843,23 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8834
8843
  */
8835
8844
  declare type LayoutIdentity = Identity_5 & {
8836
8845
  /**
8837
- * The name of the layout an action should be targeted to. When not provided,
8838
- * OpenFin attempts to resolve the instance via visibility checks.
8846
+ * The name of the layout in a given window.
8839
8847
  */
8840
- layoutName?: string;
8848
+ layoutName: string;
8841
8849
  };
8842
8850
 
8843
8851
  /**
8844
- * Generated when a window and all of its layout's views have either finished or failed navigation.
8852
+ * Generated when the window and all of its layout's views have either finished or failed navigation, once per layout.
8845
8853
  * @interface
8846
8854
  */
8847
8855
  declare type LayoutInitializedEvent = BaseEvent_5 & {
8848
8856
  type: 'layout-initialized';
8857
+ layoutIdentity: OpenFin.LayoutIdentity;
8849
8858
  ofViews: (OpenFin.Identity & {
8850
8859
  entityType: 'view';
8851
8860
  })[];
8852
8861
  };
8853
8862
 
8854
- /* Excluded from this release type: LayoutInstance */
8855
-
8856
8863
  /**
8857
8864
  * Represents the arrangement of Views within a Platform window's Layout. We do not recommend trying
8858
8865
  * to build Layouts or LayoutItems by hand and instead use calls such as {@link Platform#getSnapshot getSnapshot}.
@@ -8880,7 +8887,7 @@ declare type LayoutItemConfig = {
8880
8887
  *
8881
8888
  * **NOTE**: Internal use only. This type is reserved for Workspace Browser implementation.
8882
8889
  *
8883
- * Responsible for aggergating all layout snapshots and storing LayoutInstances
8890
+ * Responsible for aggregating all layout snapshots and storing layout instances
8884
8891
  */
8885
8892
  declare interface LayoutManager<T extends LayoutSnapshot> {
8886
8893
  /**
@@ -8904,16 +8911,6 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8904
8911
  * @throws if Object.keys(snapshot).length > 1
8905
8912
  */
8906
8913
  applyLayoutSnapshot(snapshot: T): Promise<void>;
8907
- /**
8908
- * Called at the start of layout initialization. Adds a new LayoutInstance if the snapshot
8909
- * contains a single layout.
8910
- *
8911
- * Throws if the snapshot contains more than 1 layout, it is expected that the user handles calling
8912
- * fin.Platform.Layout.create() once for each layout to properly connect it to their UI state.
8913
- *
8914
- * @param snapshot
8915
- * @throws if Object.keys(snapshot).length > 1
8916
- */
8917
8914
  /**
8918
8915
  * @experimental
8919
8916
  *
@@ -8934,31 +8931,49 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8934
8931
  /**
8935
8932
  * @experimental
8936
8933
  *
8937
- * @param layoutIdentity
8938
- * @returns
8934
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8935
+ * this method to control the target layout for Layout API calls.
8936
+ *
8937
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8938
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8939
+ * "last visible" layout identity and return it.
8940
+ *
8941
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8942
+ * call must route to in this order of precedence:
8943
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8944
+ * - if there is only 1 layout, resolves that one
8945
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8946
+ * - returns undefined
8947
+ *
8948
+ * @param identity
8949
+ * @returns LayoutIdentity | undefined
8939
8950
  */
8940
- resolveLayout(layoutIdentity?: LayoutIdentity): Promise<LayoutInstance>;
8951
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8941
8952
  /**
8942
8953
  * @experimental
8943
8954
  *
8944
- * Returns a LayoutInstance if one exists with the name layoutIdentity.layoutName.
8945
- * Throws if it does not exist.
8946
- * @param layoutName
8947
- * @returns
8955
+ * A hook provided to the consumer when it's time to remove a layout. Use this hook to
8956
+ * update your local state and remove the layout for the given LayoutIdentity. Note that
8957
+ * this hook does not call `fin.Platform.Layout.destroy()` for you, instead it is to
8958
+ * signify to your application it's time to destroy this layout.
8959
+ *
8960
+ * Note that if the Window Option {@link WindowOptions.closeOnLastViewRemoved} is true, and the last View in this layout is closed, this hook will be called before the window closes.
8961
+ *
8962
+ * @param LayoutIdentity
8948
8963
  */
8949
- getLayoutByName(layoutName: string): LayoutInstance;
8964
+ removeLayout({ layoutName }: LayoutIdentity): Promise<void>;
8950
8965
  /**
8951
8966
  * @experimental
8952
8967
  */
8953
- getLayouts(): Record<string, LayoutInstance>;
8968
+ getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8954
8969
  /**
8955
8970
  * @experimental
8956
8971
  */
8957
- getLayoutIdentityForView(viewIdentity: Identity_5): LayoutIdentity;
8972
+ isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8958
8973
  /**
8959
8974
  * @experimental
8960
8975
  */
8961
- isLayoutVisible({ layoutName }: LayoutIdentity): boolean;
8976
+ size(): number;
8962
8977
  }
8963
8978
 
8964
8979
  /**
@@ -9005,7 +9020,7 @@ declare class LayoutModule extends Base {
9005
9020
  * const layoutConfig = await layout.getConfig();
9006
9021
  * ```
9007
9022
  */
9008
- wrap(identity: OpenFin.LayoutIdentity): Promise<OpenFin.Layout>;
9023
+ wrap(identity: OpenFin.Identity | OpenFin.LayoutIdentity): Promise<OpenFin.Layout>;
9009
9024
  /**
9010
9025
  * Synchronously returns a Layout object that represents a Window's layout.
9011
9026
  *
@@ -9025,7 +9040,7 @@ declare class LayoutModule extends Base {
9025
9040
  * const layoutConfig = await layout.getConfig();
9026
9041
  * ```
9027
9042
  */
9028
- wrapSync(identity: OpenFin.LayoutIdentity): OpenFin.Layout;
9043
+ wrapSync(identity: OpenFin.Identity | OpenFin.LayoutIdentity): OpenFin.Layout;
9029
9044
  /**
9030
9045
  * Asynchronously returns a Layout object that represents a Window's layout.
9031
9046
  *
@@ -9201,11 +9216,12 @@ declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9201
9216
  declare type LayoutPresetType = 'columns' | 'grid' | 'rows' | 'tabs';
9202
9217
 
9203
9218
  /**
9204
- * Generated when a window and all of its layout's views have been created and can receive API calls.
9219
+ * Generated when the layout and all of the its views have been created and can receive API calls.
9205
9220
  * @interface
9206
9221
  */
9207
9222
  declare type LayoutReadyEvent = BaseEvent_5 & {
9208
9223
  type: 'layout-ready';
9224
+ layoutIdentity: OpenFin.LayoutIdentity;
9209
9225
  views: (OpenFin.Identity & {
9210
9226
  success: boolean;
9211
9227
  })[];
@@ -9552,14 +9568,9 @@ declare type MonitorDetails = {
9552
9568
  };
9553
9569
 
9554
9570
  /**
9555
- * Generated on changes of a monitor's size/location.
9556
- * @remarks A monitor's size changes when the taskbar is resized or relocated.
9557
- * The available space of a monitor defines a rectangle that is not occupied by the taskbar
9558
- * @interface
9571
+ * @deprecated Renamed to {@link MonitorInfoChangedEvent}.
9559
9572
  */
9560
- declare type MonitorEvent = BaseEvent_8 & OpenFin.MonitorInfo & {
9561
- type: 'monitor-info-changed';
9562
- };
9573
+ declare type MonitorEvent = MonitorInfoChangedEvent;
9563
9574
 
9564
9575
  /**
9565
9576
  * @interface
@@ -9583,6 +9594,16 @@ declare type MonitorInfo = {
9583
9594
  virtualScreen: DipRect;
9584
9595
  };
9585
9596
 
9597
+ /**
9598
+ * Generated on changes of a monitor's size/location.
9599
+ * @remarks A monitor's size changes when the taskbar is resized or relocated.
9600
+ * The available space of a monitor defines a rectangle that is not occupied by the taskbar
9601
+ * @interface
9602
+ */
9603
+ declare type MonitorInfoChangedEvent = BaseEvent_8 & OpenFin.MonitorInfo & {
9604
+ type: 'monitor-info-changed';
9605
+ };
9606
+
9586
9607
  /**
9587
9608
  * @interface
9588
9609
  */
@@ -10138,6 +10159,7 @@ declare namespace OpenFin {
10138
10159
  WebPermission,
10139
10160
  VerboseWebPermission,
10140
10161
  OpenExternalPermission,
10162
+ DeviceInfo,
10141
10163
  Permissions_2 as Permissions,
10142
10164
  PlatformWindowCreationOptions,
10143
10165
  PlatformWindowOptions,
@@ -10295,7 +10317,6 @@ declare namespace OpenFin {
10295
10317
  InitLayoutOptions,
10296
10318
  LayoutManagerConstructor,
10297
10319
  LayoutManagerOverride,
10298
- LayoutInstance,
10299
10320
  LayoutManager,
10300
10321
  CreateLayoutOptions,
10301
10322
  PresetLayoutOptions_2 as PresetLayoutOptions,
@@ -10487,6 +10508,7 @@ declare type Permissions_2 = {
10487
10508
  Application?: Partial<ApplicationPermissions>;
10488
10509
  System?: Partial<SystemPermissions>;
10489
10510
  webAPIs?: WebPermission[];
10511
+ devices?: DeviceInfo[];
10490
10512
  };
10491
10513
 
10492
10514
  declare type PermissionState_2 = 'granted' | 'denied' | 'unavailable';
@@ -12827,7 +12849,7 @@ declare type ReplaceLayoutPayload = {
12827
12849
  /**
12828
12850
  * Identity of the window whose layout will be replaced.
12829
12851
  */
12830
- target: LayoutIdentity;
12852
+ target: Identity_5 | LayoutIdentity;
12831
12853
  };
12832
12854
 
12833
12855
  /**
@@ -15178,7 +15200,9 @@ declare namespace SystemEvents {
15178
15200
  NotRequested,
15179
15201
  ExcludeRequested,
15180
15202
  BaseEvent_8 as BaseEvent,
15203
+ IdleStateChangedEvent,
15181
15204
  IdleEvent,
15205
+ MonitorInfoChangedEvent,
15182
15206
  MonitorEvent,
15183
15207
  SessionChangedEvent,
15184
15208
  AppVersionEvent,
@@ -16415,7 +16439,7 @@ declare type ViewCreationOrReference = OpenFin.Identity | OpenFin.PlatformViewCr
16415
16439
  */
16416
16440
  declare type ViewDetachedEvent = BaseEvent_5 & {
16417
16441
  type: 'view-detached';
16418
- target: OpenFin.Identity;
16442
+ target: OpenFin.Identity | null;
16419
16443
  previousTarget: OpenFin.Identity;
16420
16444
  viewIdentity: OpenFin.Identity;
16421
16445
  };
@@ -17651,7 +17675,7 @@ declare namespace WebContentsEvents {
17651
17675
  * `clipboard-read`: Request access to read from the clipboard.<br>
17652
17676
  * `clipboard-sanitized-write`: Request access to write to the clipboard.
17653
17677
  */
17654
- declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | OpenExternalPermission;
17678
+ declare type WebPermission = 'audio' | 'video' | 'geolocation' | 'notifications' | 'midiSysex' | 'pointerLock' | 'fullscreen' | 'openExternal' | 'clipboard-read' | 'clipboard-sanitized-write' | 'hid' | 'usb' | OpenExternalPermission;
17655
17679
 
17656
17680
  /**
17657
17681
  * Object representing headers and their values, where the
@@ -19253,7 +19277,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19253
19277
  * Generated when an alert is fired and suppressed due to the customWindowAlert flag being true.
19254
19278
  * @interface
19255
19279
  */
19256
- declare type WindowAlertRequestedEvent = BaseApplicationEvent & {
19280
+ declare type WindowAlertRequestedEvent = BaseEvent_3 & {
19257
19281
  type: 'window-alert-requested';
19258
19282
  };
19259
19283
 
@@ -19301,7 +19325,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19301
19325
  * Generated when a child window is created.
19302
19326
  * @interface
19303
19327
  */
19304
- declare type WindowCreatedEvent = BaseApplicationEvent & {
19328
+ declare type WindowCreatedEvent = BaseEvent_3 & {
19305
19329
  type: 'window-created';
19306
19330
  };
19307
19331
 
@@ -19358,7 +19382,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19358
19382
  * Generated when a child window ends loading.
19359
19383
  * @interface
19360
19384
  */
19361
- declare type WindowEndLoadEvent = BaseApplicationEvent & {
19385
+ declare type WindowEndLoadEvent = BaseEvent_3 & {
19362
19386
  type: 'window-end-load';
19363
19387
  };
19364
19388
 
@@ -19572,7 +19596,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19572
19596
  * Generated when a child window is not responding.
19573
19597
  * @interface
19574
19598
  */
19575
- declare type WindowNotRespondingEvent = BaseApplicationEvent & {
19599
+ declare type WindowNotRespondingEvent = BaseEvent_3 & {
19576
19600
  type: 'window-not-responding';
19577
19601
  };
19578
19602
 
@@ -19604,7 +19628,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19604
19628
  * Generated when a child window is responding.
19605
19629
  * @interface
19606
19630
  */
19607
- declare type WindowRespondingEvent = BaseApplicationEvent & {
19631
+ declare type WindowRespondingEvent = BaseEvent_3 & {
19608
19632
  type: 'window-responding';
19609
19633
  };
19610
19634
 
@@ -19633,7 +19657,7 @@ declare class _Window extends WebContents<OpenFin.WindowEvent> {
19633
19657
  * Generated when a child window starts loading.
19634
19658
  * @interface
19635
19659
  */
19636
- declare type WindowStartLoadEvent = BaseApplicationEvent & {
19660
+ declare type WindowStartLoadEvent = BaseEvent_3 & {
19637
19661
  type: 'window-start-load';
19638
19662
  };
19639
19663