@openfin/core 35.78.14 → 35.78.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,6 +43,8 @@ declare type Accelerator = {
43
43
  };
44
44
 
45
45
  /**
46
+ * Options to use when adding a view to a {@link TabStack}.
47
+ *
46
48
  * @interface
47
49
  */
48
50
  declare type AddViewOptions = CreateViewTarget & {
@@ -927,6 +929,7 @@ declare namespace ApplicationEvents {
927
929
  RespondingEvent,
928
930
  StartedEvent,
929
931
  ApplicationSourcedEvent,
932
+ ApplicationSourcedEventType,
930
933
  Event_3 as Event,
931
934
  ApplicationEvent,
932
935
  EventType_3 as EventType,
@@ -1299,6 +1302,11 @@ declare type ApplicationPermissions = {
1299
1302
  */
1300
1303
  declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1301
1304
 
1305
+ /**
1306
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1307
+ */
1308
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1309
+
1302
1310
  declare type ApplicationState = OpenFin_2.ApplicationState;
1303
1311
 
1304
1312
  /**
@@ -4454,7 +4462,7 @@ declare type CreateViewPayload = {
4454
4462
  /**
4455
4463
  * @interface
4456
4464
  */
4457
- declare type CreateViewTarget = LayoutIdentity & {
4465
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4458
4466
  /**
4459
4467
  * If specified, view creation will not attach to a window and caller must
4460
4468
  * insert the view into the layout explicitly
@@ -5287,7 +5295,7 @@ declare type EventType_7 = Event_10['type'];
5287
5295
  /**
5288
5296
  * Union of possible `type` values for a {@link SystemEvent}.
5289
5297
  */
5290
- declare type EventType_8 = SystemEvent['type'];
5298
+ declare type EventType_8 = Event_11['type'];
5291
5299
 
5292
5300
  /* Excluded from this release type: EventWithId */
5293
5301
 
@@ -8617,7 +8625,7 @@ declare type LaunchIntoPlatformPayload = {
8617
8625
  declare class Layout extends Base {
8618
8626
  #private;
8619
8627
  /* Excluded from this release type: init */
8620
- identity: OpenFin_2.LayoutIdentity;
8628
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8621
8629
  private platform;
8622
8630
  wire: Transport;
8623
8631
  /* Excluded from this release type: __constructor */
@@ -8833,10 +8841,9 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8833
8841
  */
8834
8842
  declare type LayoutIdentity = Identity_5 & {
8835
8843
  /**
8836
- * The name of the layout an action should be targeted to. When not provided,
8837
- * OpenFin attempts to resolve the instance via visibility checks.
8844
+ * The name of the layout in a given window.
8838
8845
  */
8839
- layoutName?: string;
8846
+ layoutName: string;
8840
8847
  };
8841
8848
 
8842
8849
  /**
@@ -8919,6 +8926,27 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8919
8926
  * @returns T
8920
8927
  */
8921
8928
  getLayoutSnapshot(): Promise<T>;
8929
+ /**
8930
+ * @experimental
8931
+ *
8932
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8933
+ * this method to control the target layout for Layout API calls.
8934
+ *
8935
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8936
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8937
+ * "last visible" layout identity and return it.
8938
+ *
8939
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8940
+ * call must route to in this order of precedence:
8941
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8942
+ * - if there is only 1 layout, resolves that one
8943
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8944
+ * - returns undefined
8945
+ *
8946
+ * @param identity
8947
+ * @returns LayoutIdentity | undefined
8948
+ */
8949
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8922
8950
  /**
8923
8951
  * @experimental
8924
8952
  *
@@ -8990,7 +9018,7 @@ declare class LayoutModule extends Base {
8990
9018
  * const layoutConfig = await layout.getConfig();
8991
9019
  * ```
8992
9020
  */
8993
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9021
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8994
9022
  /**
8995
9023
  * Synchronously returns a Layout object that represents a Window's layout.
8996
9024
  *
@@ -9010,7 +9038,7 @@ declare class LayoutModule extends Base {
9010
9038
  * const layoutConfig = await layout.getConfig();
9011
9039
  * ```
9012
9040
  */
9013
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9041
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9014
9042
  /**
9015
9043
  * Asynchronously returns a Layout object that represents a Window's layout.
9016
9044
  *
@@ -9178,6 +9206,9 @@ declare type LayoutOptions = {
9178
9206
  };
9179
9207
  };
9180
9208
 
9209
+ /**
9210
+ * Represents the position of an item in a layout relative to another.
9211
+ */
9181
9212
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9182
9213
 
9183
9214
  /**
@@ -12819,7 +12850,7 @@ declare type ReplaceLayoutPayload = {
12819
12850
  /**
12820
12851
  * Identity of the window whose layout will be replaced.
12821
12852
  */
12822
- target: LayoutIdentity;
12853
+ target: Identity_5 | LayoutIdentity;
12823
12854
  };
12824
12855
 
12825
12856
  /**
@@ -15310,20 +15341,6 @@ declare interface TabDragListener extends EventEmitter_2 {
15310
15341
  contentItem: ContentItem;
15311
15342
  }
15312
15343
 
15313
- /**
15314
- * @typedef {string} LayoutPosition
15315
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
15316
- */
15317
- /**
15318
- * @typedef {object} StackCreationOptions
15319
- * @summary Stack creation options.
15320
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
15321
- */
15322
- /**
15323
- * @typedef {object} TabStack~AddViewOptions
15324
- * @summary Options to use when adding a view to a {@link TabStack}
15325
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
15326
- */
15327
15344
  /**
15328
15345
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15329
15346
  */
@@ -43,6 +43,8 @@ declare type Accelerator = {
43
43
  };
44
44
 
45
45
  /**
46
+ * Options to use when adding a view to a {@link TabStack}.
47
+ *
46
48
  * @interface
47
49
  */
48
50
  declare type AddViewOptions = CreateViewTarget & {
@@ -927,6 +929,7 @@ declare namespace ApplicationEvents {
927
929
  RespondingEvent,
928
930
  StartedEvent,
929
931
  ApplicationSourcedEvent,
932
+ ApplicationSourcedEventType,
930
933
  Event_3 as Event,
931
934
  ApplicationEvent,
932
935
  EventType_3 as EventType,
@@ -1299,6 +1302,11 @@ declare type ApplicationPermissions = {
1299
1302
  */
1300
1303
  declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1301
1304
 
1305
+ /**
1306
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1307
+ */
1308
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1309
+
1302
1310
  declare type ApplicationState = OpenFin_2.ApplicationState;
1303
1311
 
1304
1312
  /**
@@ -4454,7 +4462,7 @@ declare type CreateViewPayload = {
4454
4462
  /**
4455
4463
  * @interface
4456
4464
  */
4457
- declare type CreateViewTarget = LayoutIdentity & {
4465
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4458
4466
  /**
4459
4467
  * If specified, view creation will not attach to a window and caller must
4460
4468
  * insert the view into the layout explicitly
@@ -5287,7 +5295,7 @@ declare type EventType_7 = Event_10['type'];
5287
5295
  /**
5288
5296
  * Union of possible `type` values for a {@link SystemEvent}.
5289
5297
  */
5290
- declare type EventType_8 = SystemEvent['type'];
5298
+ declare type EventType_8 = Event_11['type'];
5291
5299
 
5292
5300
  /* Excluded from this release type: EventWithId */
5293
5301
 
@@ -8617,7 +8625,7 @@ declare type LaunchIntoPlatformPayload = {
8617
8625
  declare class Layout extends Base {
8618
8626
  #private;
8619
8627
  /* Excluded from this release type: init */
8620
- identity: OpenFin_2.LayoutIdentity;
8628
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8621
8629
  private platform;
8622
8630
  wire: Transport;
8623
8631
  /* Excluded from this release type: __constructor */
@@ -8833,10 +8841,9 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8833
8841
  */
8834
8842
  declare type LayoutIdentity = Identity_5 & {
8835
8843
  /**
8836
- * The name of the layout an action should be targeted to. When not provided,
8837
- * OpenFin attempts to resolve the instance via visibility checks.
8844
+ * The name of the layout in a given window.
8838
8845
  */
8839
- layoutName?: string;
8846
+ layoutName: string;
8840
8847
  };
8841
8848
 
8842
8849
  /**
@@ -8919,6 +8926,27 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8919
8926
  * @returns T
8920
8927
  */
8921
8928
  getLayoutSnapshot(): Promise<T>;
8929
+ /**
8930
+ * @experimental
8931
+ *
8932
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8933
+ * this method to control the target layout for Layout API calls.
8934
+ *
8935
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8936
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8937
+ * "last visible" layout identity and return it.
8938
+ *
8939
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8940
+ * call must route to in this order of precedence:
8941
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8942
+ * - if there is only 1 layout, resolves that one
8943
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8944
+ * - returns undefined
8945
+ *
8946
+ * @param identity
8947
+ * @returns LayoutIdentity | undefined
8948
+ */
8949
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8922
8950
  /**
8923
8951
  * @experimental
8924
8952
  *
@@ -8990,7 +9018,7 @@ declare class LayoutModule extends Base {
8990
9018
  * const layoutConfig = await layout.getConfig();
8991
9019
  * ```
8992
9020
  */
8993
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9021
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8994
9022
  /**
8995
9023
  * Synchronously returns a Layout object that represents a Window's layout.
8996
9024
  *
@@ -9010,7 +9038,7 @@ declare class LayoutModule extends Base {
9010
9038
  * const layoutConfig = await layout.getConfig();
9011
9039
  * ```
9012
9040
  */
9013
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9041
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9014
9042
  /**
9015
9043
  * Asynchronously returns a Layout object that represents a Window's layout.
9016
9044
  *
@@ -9178,6 +9206,9 @@ declare type LayoutOptions = {
9178
9206
  };
9179
9207
  };
9180
9208
 
9209
+ /**
9210
+ * Represents the position of an item in a layout relative to another.
9211
+ */
9181
9212
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9182
9213
 
9183
9214
  /**
@@ -12819,7 +12850,7 @@ declare type ReplaceLayoutPayload = {
12819
12850
  /**
12820
12851
  * Identity of the window whose layout will be replaced.
12821
12852
  */
12822
- target: LayoutIdentity;
12853
+ target: Identity_5 | LayoutIdentity;
12823
12854
  };
12824
12855
 
12825
12856
  /**
@@ -15310,20 +15341,6 @@ declare interface TabDragListener extends EventEmitter_2 {
15310
15341
  contentItem: ContentItem;
15311
15342
  }
15312
15343
 
15313
- /**
15314
- * @typedef {string} LayoutPosition
15315
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
15316
- */
15317
- /**
15318
- * @typedef {object} StackCreationOptions
15319
- * @summary Stack creation options.
15320
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
15321
- */
15322
- /**
15323
- * @typedef {object} TabStack~AddViewOptions
15324
- * @summary Options to use when adding a view to a {@link TabStack}
15325
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
15326
- */
15327
15344
  /**
15328
15345
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15329
15346
  */
@@ -43,6 +43,8 @@ declare type Accelerator = {
43
43
  };
44
44
 
45
45
  /**
46
+ * Options to use when adding a view to a {@link TabStack}.
47
+ *
46
48
  * @interface
47
49
  */
48
50
  declare type AddViewOptions = CreateViewTarget & {
@@ -927,6 +929,7 @@ declare namespace ApplicationEvents {
927
929
  RespondingEvent,
928
930
  StartedEvent,
929
931
  ApplicationSourcedEvent,
932
+ ApplicationSourcedEventType,
930
933
  Event_3 as Event,
931
934
  ApplicationEvent,
932
935
  EventType_3 as EventType,
@@ -1299,6 +1302,11 @@ declare type ApplicationPermissions = {
1299
1302
  */
1300
1303
  declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1301
1304
 
1305
+ /**
1306
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1307
+ */
1308
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1309
+
1302
1310
  declare type ApplicationState = OpenFin_2.ApplicationState;
1303
1311
 
1304
1312
  /**
@@ -4454,7 +4462,7 @@ declare type CreateViewPayload = {
4454
4462
  /**
4455
4463
  * @interface
4456
4464
  */
4457
- declare type CreateViewTarget = LayoutIdentity & {
4465
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4458
4466
  /**
4459
4467
  * If specified, view creation will not attach to a window and caller must
4460
4468
  * insert the view into the layout explicitly
@@ -5287,7 +5295,7 @@ declare type EventType_7 = Event_10['type'];
5287
5295
  /**
5288
5296
  * Union of possible `type` values for a {@link SystemEvent}.
5289
5297
  */
5290
- declare type EventType_8 = SystemEvent['type'];
5298
+ declare type EventType_8 = Event_11['type'];
5291
5299
 
5292
5300
  /* Excluded from this release type: EventWithId */
5293
5301
 
@@ -8617,7 +8625,7 @@ declare type LaunchIntoPlatformPayload = {
8617
8625
  declare class Layout extends Base {
8618
8626
  #private;
8619
8627
  /* Excluded from this release type: init */
8620
- identity: OpenFin_2.LayoutIdentity;
8628
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8621
8629
  private platform;
8622
8630
  wire: Transport;
8623
8631
  /* Excluded from this release type: __constructor */
@@ -8833,10 +8841,9 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8833
8841
  */
8834
8842
  declare type LayoutIdentity = Identity_5 & {
8835
8843
  /**
8836
- * The name of the layout an action should be targeted to. When not provided,
8837
- * OpenFin attempts to resolve the instance via visibility checks.
8844
+ * The name of the layout in a given window.
8838
8845
  */
8839
- layoutName?: string;
8846
+ layoutName: string;
8840
8847
  };
8841
8848
 
8842
8849
  /**
@@ -8919,6 +8926,27 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
8919
8926
  * @returns T
8920
8927
  */
8921
8928
  getLayoutSnapshot(): Promise<T>;
8929
+ /**
8930
+ * @experimental
8931
+ *
8932
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
8933
+ * this method to control the target layout for Layout API calls.
8934
+ *
8935
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
8936
+ * execute an API call (ex: Layout.replace()) - override this method and save the
8937
+ * "last visible" layout identity and return it.
8938
+ *
8939
+ * By default, OpenFin will use a series of checks to determine which Layout the API
8940
+ * call must route to in this order of precedence:
8941
+ * - try to resolve the layout from the layoutIdentity, throws if missing
8942
+ * - if there is only 1 layout, resolves that one
8943
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
8944
+ * - returns undefined
8945
+ *
8946
+ * @param identity
8947
+ * @returns LayoutIdentity | undefined
8948
+ */
8949
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
8922
8950
  /**
8923
8951
  * @experimental
8924
8952
  *
@@ -8990,7 +9018,7 @@ declare class LayoutModule extends Base {
8990
9018
  * const layoutConfig = await layout.getConfig();
8991
9019
  * ```
8992
9020
  */
8993
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9021
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
8994
9022
  /**
8995
9023
  * Synchronously returns a Layout object that represents a Window's layout.
8996
9024
  *
@@ -9010,7 +9038,7 @@ declare class LayoutModule extends Base {
9010
9038
  * const layoutConfig = await layout.getConfig();
9011
9039
  * ```
9012
9040
  */
9013
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9041
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9014
9042
  /**
9015
9043
  * Asynchronously returns a Layout object that represents a Window's layout.
9016
9044
  *
@@ -9178,6 +9206,9 @@ declare type LayoutOptions = {
9178
9206
  };
9179
9207
  };
9180
9208
 
9209
+ /**
9210
+ * Represents the position of an item in a layout relative to another.
9211
+ */
9181
9212
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9182
9213
 
9183
9214
  /**
@@ -12819,7 +12850,7 @@ declare type ReplaceLayoutPayload = {
12819
12850
  /**
12820
12851
  * Identity of the window whose layout will be replaced.
12821
12852
  */
12822
- target: LayoutIdentity;
12853
+ target: Identity_5 | LayoutIdentity;
12823
12854
  };
12824
12855
 
12825
12856
  /**
@@ -15310,20 +15341,6 @@ declare interface TabDragListener extends EventEmitter_2 {
15310
15341
  contentItem: ContentItem;
15311
15342
  }
15312
15343
 
15313
- /**
15314
- * @typedef {string} LayoutPosition
15315
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
15316
- */
15317
- /**
15318
- * @typedef {object} StackCreationOptions
15319
- * @summary Stack creation options.
15320
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
15321
- */
15322
- /**
15323
- * @typedef {object} TabStack~AddViewOptions
15324
- * @summary Options to use when adding a view to a {@link TabStack}
15325
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
15326
- */
15327
15344
  /**
15328
15345
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15329
15346
  */
package/out/mock.d.ts CHANGED
@@ -43,6 +43,8 @@ declare type Accelerator = {
43
43
  };
44
44
 
45
45
  /**
46
+ * Options to use when adding a view to a {@link TabStack}.
47
+ *
46
48
  * @interface
47
49
  */
48
50
  declare type AddViewOptions = CreateViewTarget & {
@@ -933,6 +935,7 @@ declare namespace ApplicationEvents {
933
935
  RespondingEvent,
934
936
  StartedEvent,
935
937
  ApplicationSourcedEvent,
938
+ ApplicationSourcedEventType,
936
939
  Event_3 as Event,
937
940
  ApplicationEvent,
938
941
  EventType_3 as EventType,
@@ -1305,6 +1308,11 @@ declare type ApplicationPermissions = {
1305
1308
  */
1306
1309
  declare type ApplicationSourcedEvent = ClosedEvent | ConnectedEvent_2 | CrashedEvent | InitializedEvent | ManifestChangedEvent | NotRespondingEvent | RespondingEvent | RunRequestedEvent_2 | StartedEvent | TrayIconClickedEvent | FileDownloadLocationChangedEvent;
1307
1310
 
1311
+ /**
1312
+ * Union of possible type values for an {@link ApplicationSourcedEvent}.
1313
+ */
1314
+ declare type ApplicationSourcedEventType = ApplicationSourcedEvent['type'];
1315
+
1308
1316
  declare type ApplicationState = OpenFin_2.ApplicationState;
1309
1317
 
1310
1318
  /**
@@ -3411,57 +3419,6 @@ declare type ClosingEvent = BaseEvent_5 & {
3411
3419
  */
3412
3420
  declare class ColumnOrRow extends LayoutNode {
3413
3421
  #private;
3414
- /**
3415
- * Determines if this {@link ColumnOrRow} is the top level content item in the current layout.
3416
- * @function isRoot
3417
- * @memberof ColumnOrRow
3418
- * @instance
3419
- * @tutorial ColumnOrRow.isRoot
3420
- * @returns Resolves true if this TabStack is the top level content item, or false if it is not.
3421
- */
3422
- /**
3423
- * Determines if this {@link ColumnOrRow} exists.
3424
- * @function exists
3425
- * @instance
3426
- * @memberof ColumnOrRow
3427
- * @tutorial ColumnOrRow.exists
3428
- * @returns Resolves true if the TabStack exists, or false if it has been destroyed.
3429
- */
3430
- /**
3431
- * Retrieves the parent {@link ColumnOrRow} of this {@link ColumnOrRow}, if one exists.
3432
- * @function getParent
3433
- * @instance
3434
- * @memberof ColumnOrRow
3435
- * @tutorial ColumnOrRow.getParent
3436
- * @returns Promise resolving with the {@link ColumnOrRow} that contains this item, or undefined if
3437
- * this {@link ColumnOrRow}does not exist or is the root content item.
3438
- */
3439
- /**
3440
- * Returns all the adjacent stacks that share an edge with the given {@link ColumnOrRow}.
3441
- * @function getAdjacentStacks
3442
- * @instance
3443
- * @memberof ColumnOrRow
3444
- * @param {LayoutPosition} edge - Edge to check for any adjacent stacks.
3445
- *
3446
- * @tutorial ColumnOrRow.getAdjacentStacks
3447
- */
3448
- /**
3449
- * Given a list of view creation options or references and a layout position, creates a {@link TabStack} adjacent to the given {@link ColumnOrRow}
3450
- *
3451
- * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
3452
- * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
3453
- * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
3454
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
3455
- *
3456
- * @function createAdjacentStack
3457
- * @instance
3458
- * @memberof ColumnOrRow
3459
- * @param views - List of identities or view creation options of the views to include in the stack
3460
- * @param options - Creation options.
3461
- * @returns The created TabStack
3462
- * @tutorial ColumnOrRow.createAdjacentStack
3463
- * @experimental
3464
- */
3465
3422
  /**
3466
3423
  * @internal
3467
3424
  */
@@ -4548,7 +4505,7 @@ declare type CreateViewPayload = {
4548
4505
  /**
4549
4506
  * @interface
4550
4507
  */
4551
- declare type CreateViewTarget = LayoutIdentity & {
4508
+ declare type CreateViewTarget = (Identity_5 | LayoutIdentity) & {
4552
4509
  /**
4553
4510
  * If specified, view creation will not attach to a window and caller must
4554
4511
  * insert the view into the layout explicitly
@@ -5386,7 +5343,7 @@ declare type EventType_7 = Event_10['type'];
5386
5343
  /**
5387
5344
  * Union of possible `type` values for a {@link SystemEvent}.
5388
5345
  */
5389
- declare type EventType_8 = SystemEvent['type'];
5346
+ declare type EventType_8 = Event_11['type'];
5390
5347
 
5391
5348
  /**
5392
5349
  * @internal
@@ -8767,7 +8724,7 @@ declare class Layout extends Base {
8767
8724
  * @internal
8768
8725
  */
8769
8726
  init: (options?: OpenFin_2.InitLayoutOptions) => Promise<Layout>;
8770
- identity: OpenFin_2.LayoutIdentity;
8727
+ identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity;
8771
8728
  private platform;
8772
8729
  wire: Transport;
8773
8730
  /**
@@ -8986,10 +8943,9 @@ declare type LayoutEntityTypes = Exclude<GoldenLayout.ItemType, 'component' | 'r
8986
8943
  */
8987
8944
  declare type LayoutIdentity = Identity_5 & {
8988
8945
  /**
8989
- * The name of the layout an action should be targeted to. When not provided,
8990
- * OpenFin attempts to resolve the instance via visibility checks.
8946
+ * The name of the layout in a given window.
8991
8947
  */
8992
- layoutName?: string;
8948
+ layoutName: string;
8993
8949
  };
8994
8950
 
8995
8951
  /**
@@ -9072,6 +9028,27 @@ declare interface LayoutManager<T extends LayoutSnapshot> {
9072
9028
  * @returns T
9073
9029
  */
9074
9030
  getLayoutSnapshot(): Promise<T>;
9031
+ /**
9032
+ * @experimental
9033
+ *
9034
+ * A hook provided to the consumer for controlling how OpenFin routes Layout API calls. Override
9035
+ * this method to control the target layout for Layout API calls.
9036
+ *
9037
+ * Example use case: You have hidden all the layouts and are showing a dialog that will
9038
+ * execute an API call (ex: Layout.replace()) - override this method and save the
9039
+ * "last visible" layout identity and return it.
9040
+ *
9041
+ * By default, OpenFin will use a series of checks to determine which Layout the API
9042
+ * call must route to in this order of precedence:
9043
+ * - try to resolve the layout from the layoutIdentity, throws if missing
9044
+ * - if there is only 1 layout, resolves that one
9045
+ * - enumerates all layouts checks visibility via element offsetTop/Left + window.innerHeight/Width
9046
+ * - returns undefined
9047
+ *
9048
+ * @param identity
9049
+ * @returns LayoutIdentity | undefined
9050
+ */
9051
+ resolveLayoutIdentity(identity?: Identity_5 | LayoutIdentity): LayoutIdentity | undefined;
9075
9052
  /**
9076
9053
  * @experimental
9077
9054
  *
@@ -9143,7 +9120,7 @@ declare class LayoutModule extends Base {
9143
9120
  * const layoutConfig = await layout.getConfig();
9144
9121
  * ```
9145
9122
  */
9146
- wrap(identity: OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9123
+ wrap(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): Promise<OpenFin_2.Layout>;
9147
9124
  /**
9148
9125
  * Synchronously returns a Layout object that represents a Window's layout.
9149
9126
  *
@@ -9163,7 +9140,7 @@ declare class LayoutModule extends Base {
9163
9140
  * const layoutConfig = await layout.getConfig();
9164
9141
  * ```
9165
9142
  */
9166
- wrapSync(identity: OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9143
+ wrapSync(identity: OpenFin_2.Identity | OpenFin_2.LayoutIdentity): OpenFin_2.Layout;
9167
9144
  /**
9168
9145
  * Asynchronously returns a Layout object that represents a Window's layout.
9169
9146
  *
@@ -9335,6 +9312,15 @@ declare abstract class LayoutNode {
9335
9312
  /**
9336
9313
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
9337
9314
  *
9315
+ * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
9316
+ * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
9317
+ * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
9318
+ * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
9319
+ *
9320
+ * @param views The views that will populate the new TabStack.
9321
+ * @param options Additional options that control new TabStack creation.
9322
+ * @returns The newly-created TabStack.
9323
+ *
9338
9324
  * @example
9339
9325
  * ```js
9340
9326
  * if (!fin.me.isView) {
@@ -9369,12 +9355,15 @@ declare abstract class LayoutNode {
9369
9355
  * console.log(`A new TabStack created to the right has ${newStack.length} views in it`);
9370
9356
  *
9371
9357
  * ```
9358
+ * @experimental
9372
9359
  */
9373
9360
  createAdjacentStack: (views: OpenFin_2.PlatformViewCreationOptions[], options: {
9374
9361
  position?: OpenFin_2.LayoutPosition;
9375
9362
  }) => Promise<TabStack>;
9376
9363
  /**
9377
- * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow
9364
+ * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
9365
+ *
9366
+ * @param edge Edge whose adjacent TabStacks will be returned.
9378
9367
  *
9379
9368
  * @example
9380
9369
  * ```js
@@ -9394,6 +9383,7 @@ declare abstract class LayoutNode {
9394
9383
  * console.log(`The entity has ${rightStacks.length} stacks to the right, and ${leftStacks.length} stacks to the left`);
9395
9384
  *
9396
9385
  * ```
9386
+ * @experimental
9397
9387
  */
9398
9388
  getAdjacentStacks: (edge: OpenFin_2.LayoutPosition) => Promise<TabStack[]>;
9399
9389
  }
@@ -9488,6 +9478,9 @@ declare type LayoutOptions = {
9488
9478
  };
9489
9479
  };
9490
9480
 
9481
+ /**
9482
+ * Represents the position of an item in a layout relative to another.
9483
+ */
9491
9484
  declare type LayoutPosition = 'top' | 'bottom' | 'left' | 'right';
9492
9485
 
9493
9486
  /**
@@ -10300,7 +10293,7 @@ declare type NotCloseRequested<EventType extends string> = Exclude<EventType, 'c
10300
10293
  *
10301
10294
  * Ensures that an event type key doesn't include any `-requested` events. Distributes over unions.
10302
10295
  */
10303
- declare type NotRequested<EventType extends String> = EventType extends `${infer U}-requested` ? never : EventType;
10296
+ declare type NotRequested<EventType extends String> = EventType extends `${string}-requested` ? never : EventType;
10304
10297
 
10305
10298
  /**
10306
10299
  * Generated when an application is not responding.
@@ -13240,7 +13233,7 @@ declare type ReplaceLayoutPayload = {
13240
13233
  /**
13241
13234
  * Identity of the window whose layout will be replaced.
13242
13235
  */
13243
- target: LayoutIdentity;
13236
+ target: Identity_5 | LayoutIdentity;
13244
13237
  };
13245
13238
 
13246
13239
  /**
@@ -15743,75 +15736,11 @@ declare interface TabDragListener extends EventEmitter_2 {
15743
15736
  contentItem: ContentItem;
15744
15737
  }
15745
15738
 
15746
- /**
15747
- * @typedef {string} LayoutPosition
15748
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
15749
- */
15750
- /**
15751
- * @typedef {object} StackCreationOptions
15752
- * @summary Stack creation options.
15753
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
15754
- */
15755
- /**
15756
- * @typedef {object} TabStack~AddViewOptions
15757
- * @summary Options to use when adding a view to a {@link TabStack}
15758
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
15759
- */
15760
15739
  /**
15761
15740
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
15762
15741
  */
15763
15742
  declare class TabStack extends LayoutNode {
15764
15743
  #private;
15765
- /**
15766
- * Determines if this {@link TabStack} is the top level content item in the current layout.
15767
- * @function isRoot
15768
- * @memberof TabStack
15769
- * @instance
15770
- * @tutorial TabStack.isRoot
15771
- * @returns Resolves true if this TabStack is the top level content item, or false if it is not.
15772
- */
15773
- /**
15774
- * Determines if this {@link TabStack} exists.
15775
- * @function exists
15776
- * @instance
15777
- * @memberof TabStack
15778
- * @tutorial TabStack.exists
15779
- * @returns Resolves true if this is the TabStack exists, or false if it has been destroyed.
15780
- */
15781
- /**
15782
- * Retrieves the parent {@link ColumnOrRow} of this {@link TabStack}, if one exists.
15783
- * @function getParent
15784
- * @instance
15785
- * @memberof TabStack
15786
- * @tutorial TabStack.getParent
15787
- * @returns is the root content item or does not exist.
15788
- */
15789
- /**
15790
- * Returns all the adjacent stacks that share an edge with the given {@link TabStack}.
15791
- * @function getAdjacentStacks
15792
- * @instance
15793
- * @memberof TabStack
15794
- * @param {LayoutPosition} edge - Edge to check for any adjacent stacks.
15795
- *
15796
- * @tutorial TabStack.getAdjacentStacks
15797
- */
15798
- /**
15799
- * Given a list of view creation options or references and a layout position, creates a {@link TabStack} adjacent to the current {@link TabStack}
15800
- *
15801
- * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
15802
- * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
15803
- * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
15804
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
15805
- *
15806
- * @function createAdjacentStack
15807
- * @instance
15808
- * @memberof TabStack
15809
- * @param views - List of identities or view creation options of the views to include in the stack
15810
- * @param options - Creation options.
15811
- * @returns The created TabStack.
15812
- * @tutorial TabStack.createAdjacentStack
15813
- * @experimental
15814
- */
15815
15744
  /** @internal */
15816
15745
  constructor(client: LayoutEntitiesClient, entityId: string);
15817
15746
  /**
package/out/mock.js CHANGED
@@ -1232,6 +1232,15 @@ class LayoutNode {
1232
1232
  /**
1233
1233
  * Creates a new TabStack adjacent to the given TabStack or ColumnOrRow. Inputs can be new views to create, or existing views.
1234
1234
  *
1235
+ * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
1236
+ * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
1237
+ * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
1238
+ * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
1239
+ *
1240
+ * @param views The views that will populate the new TabStack.
1241
+ * @param options Additional options that control new TabStack creation.
1242
+ * @returns The newly-created TabStack.
1243
+ *
1235
1244
  * @example
1236
1245
  * ```js
1237
1246
  * if (!fin.me.isView) {
@@ -1266,13 +1275,16 @@ class LayoutNode {
1266
1275
  * console.log(`A new TabStack created to the right has ${newStack.length} views in it`);
1267
1276
  *
1268
1277
  * ```
1278
+ * @experimental
1269
1279
  */
1270
1280
  this.createAdjacentStack = async (views, options) => {
1271
1281
  const entityId = await __classPrivateFieldGet$e(this, _LayoutNode_client, "f").createAdjacentStack(this.entityId, views, options);
1272
1282
  return LayoutNode.getEntity({ entityId, type: 'stack' }, __classPrivateFieldGet$e(this, _LayoutNode_client, "f"));
1273
1283
  };
1274
1284
  /**
1275
- * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow
1285
+ * Retrieves the adjacent TabStacks of the given TabStack or ColumnOrRow.
1286
+ *
1287
+ * @param edge Edge whose adjacent TabStacks will be returned.
1276
1288
  *
1277
1289
  * @example
1278
1290
  * ```js
@@ -1292,6 +1304,7 @@ class LayoutNode {
1292
1304
  * console.log(`The entity has ${rightStacks.length} stacks to the right, and ${leftStacks.length} stacks to the left`);
1293
1305
  *
1294
1306
  * ```
1307
+ * @experimental
1295
1308
  */
1296
1309
  this.getAdjacentStacks = async (edge) => {
1297
1310
  const adjacentStacks = await __classPrivateFieldGet$e(this, _LayoutNode_client, "f").getAdjacentStacks({
@@ -1335,74 +1348,10 @@ LayoutNode.getEntity = (definition, client) => {
1335
1348
  throw new Error(`Unrecognised Layout Entity encountered ('${JSON.stringify(definition)})`);
1336
1349
  }
1337
1350
  };
1338
- /**
1339
- * @typedef {string} LayoutPosition
1340
- * @summary Represents the position of an item in a layout relative to another. Possible values are 'top', 'bottom', 'left' and 'right'.
1341
- */
1342
- /**
1343
- * @typedef {object} StackCreationOptions
1344
- * @summary Stack creation options.
1345
- * @property {LayoutPosition} [position] - The position to create the new {@link TabStack} in, relative to the given adjacent {@link TabStack}. Defaults to 'right'.
1346
- */
1347
- /**
1348
- * @typedef {object} TabStack~AddViewOptions
1349
- * @summary Options to use when adding a view to a {@link TabStack}
1350
- * @property {number} [index] - Insertion index when adding the view. Defaults to 0.
1351
- */
1352
1351
  /**
1353
1352
  * A TabStack is used to manage the state of a stack of tabs within an OpenFin Layout.
1354
1353
  */
1355
1354
  class TabStack extends LayoutNode {
1356
- /**
1357
- * Determines if this {@link TabStack} is the top level content item in the current layout.
1358
- * @function isRoot
1359
- * @memberof TabStack
1360
- * @instance
1361
- * @tutorial TabStack.isRoot
1362
- * @returns Resolves true if this TabStack is the top level content item, or false if it is not.
1363
- */
1364
- /**
1365
- * Determines if this {@link TabStack} exists.
1366
- * @function exists
1367
- * @instance
1368
- * @memberof TabStack
1369
- * @tutorial TabStack.exists
1370
- * @returns Resolves true if this is the TabStack exists, or false if it has been destroyed.
1371
- */
1372
- /**
1373
- * Retrieves the parent {@link ColumnOrRow} of this {@link TabStack}, if one exists.
1374
- * @function getParent
1375
- * @instance
1376
- * @memberof TabStack
1377
- * @tutorial TabStack.getParent
1378
- * @returns is the root content item or does not exist.
1379
- */
1380
- /**
1381
- * Returns all the adjacent stacks that share an edge with the given {@link TabStack}.
1382
- * @function getAdjacentStacks
1383
- * @instance
1384
- * @memberof TabStack
1385
- * @param {LayoutPosition} edge - Edge to check for any adjacent stacks.
1386
- *
1387
- * @tutorial TabStack.getAdjacentStacks
1388
- */
1389
- /**
1390
- * Given a list of view creation options or references and a layout position, creates a {@link TabStack} adjacent to the current {@link TabStack}
1391
- *
1392
- * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
1393
- * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
1394
- * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
1395
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
1396
- *
1397
- * @function createAdjacentStack
1398
- * @instance
1399
- * @memberof TabStack
1400
- * @param views - List of identities or view creation options of the views to include in the stack
1401
- * @param options - Creation options.
1402
- * @returns The created TabStack.
1403
- * @tutorial TabStack.createAdjacentStack
1404
- * @experimental
1405
- */
1406
1355
  /** @internal */
1407
1356
  constructor(client, entityId) {
1408
1357
  super(client, entityId);
@@ -1535,57 +1484,6 @@ _TabStack_client = new WeakMap();
1535
1484
  * A ColumnOrRow is used to manage the state of Column and Rows within an OpenFin Layout.
1536
1485
  */
1537
1486
  class ColumnOrRow extends LayoutNode {
1538
- /**
1539
- * Determines if this {@link ColumnOrRow} is the top level content item in the current layout.
1540
- * @function isRoot
1541
- * @memberof ColumnOrRow
1542
- * @instance
1543
- * @tutorial ColumnOrRow.isRoot
1544
- * @returns Resolves true if this TabStack is the top level content item, or false if it is not.
1545
- */
1546
- /**
1547
- * Determines if this {@link ColumnOrRow} exists.
1548
- * @function exists
1549
- * @instance
1550
- * @memberof ColumnOrRow
1551
- * @tutorial ColumnOrRow.exists
1552
- * @returns Resolves true if the TabStack exists, or false if it has been destroyed.
1553
- */
1554
- /**
1555
- * Retrieves the parent {@link ColumnOrRow} of this {@link ColumnOrRow}, if one exists.
1556
- * @function getParent
1557
- * @instance
1558
- * @memberof ColumnOrRow
1559
- * @tutorial ColumnOrRow.getParent
1560
- * @returns Promise resolving with the {@link ColumnOrRow} that contains this item, or undefined if
1561
- * this {@link ColumnOrRow}does not exist or is the root content item.
1562
- */
1563
- /**
1564
- * Returns all the adjacent stacks that share an edge with the given {@link ColumnOrRow}.
1565
- * @function getAdjacentStacks
1566
- * @instance
1567
- * @memberof ColumnOrRow
1568
- * @param {LayoutPosition} edge - Edge to check for any adjacent stacks.
1569
- *
1570
- * @tutorial ColumnOrRow.getAdjacentStacks
1571
- */
1572
- /**
1573
- * Given a list of view creation options or references and a layout position, creates a {@link TabStack} adjacent to the given {@link ColumnOrRow}
1574
- *
1575
- * Known Issue: If the number of views to add overflows the tab-container, the added views will be set as active
1576
- * during each render, and then placed at the front of the tab-stack, while the underlying order of tabs will remain unchanged.
1577
- * This means the views you pass to createAdjacentStack() may not render in the order given by the array.
1578
- * Until fixed, this problem can be avoided only if your window is wide enough to fit creating all the views in the tabstack.
1579
- *
1580
- * @function createAdjacentStack
1581
- * @instance
1582
- * @memberof ColumnOrRow
1583
- * @param views - List of identities or view creation options of the views to include in the stack
1584
- * @param options - Creation options.
1585
- * @returns The created TabStack
1586
- * @tutorial ColumnOrRow.createAdjacentStack
1587
- * @experimental
1588
- */
1589
1487
  /**
1590
1488
  * @internal
1591
1489
  */
@@ -13061,7 +12959,7 @@ class Layout extends base_1$6.Base {
13061
12959
  // don't expose
13062
12960
  });
13063
12961
  const client = await __classPrivateFieldGet$5(this, _Layout_layoutClient, "f").getValue();
13064
- const root = await client.getRoot(this.identity);
12962
+ const root = await client.getRoot('layoutName' in this.identity ? this.identity : undefined);
13065
12963
  return layout_entities_1.LayoutNode.getEntity(root, client);
13066
12964
  }
13067
12965
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "35.78.14",
3
+ "version": "35.78.15",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",