@openfin/node-adapter 34.78.82 → 34.78.84

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.
@@ -42,6 +42,15 @@ declare type Accelerator = {
42
42
  zoom: boolean;
43
43
  };
44
44
 
45
+ /**
46
+ * Generated when a View is added to a layout.
47
+ * @interface
48
+ */
49
+ declare type AddedToLayoutEvent = BaseEvent_4 & {
50
+ type: 'added-to-layout';
51
+ layoutIdentity: OpenFin.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5236,7 +5245,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5236
5245
  */
5237
5246
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5238
5247
  target: OpenFin.Identity;
5239
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5248
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5240
5249
 
5241
5250
  /**
5242
5251
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -12943,6 +12952,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12943
12952
  token: string;
12944
12953
  }
12945
12954
 
12955
+ /**
12956
+ * Generated when a View is removed from a layout.
12957
+ * @interface
12958
+ */
12959
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
12960
+ type: 'removed-from-layout';
12961
+ layoutIdentity: OpenFin.LayoutIdentity;
12962
+ };
12963
+
12946
12964
  /**
12947
12965
  * @interface
12948
12966
  */
@@ -16564,6 +16582,8 @@ declare namespace ViewEvents {
16564
16582
  BaseEvent_4 as BaseEvent,
16565
16583
  BaseViewEvent,
16566
16584
  TargetChangedEvent,
16585
+ AddedToLayoutEvent,
16586
+ RemovedFromLayoutEvent,
16567
16587
  NonPropagatedViewEvent,
16568
16588
  CreatedEvent,
16569
16589
  DestroyedEvent,
@@ -42,6 +42,15 @@ declare type Accelerator = {
42
42
  zoom: boolean;
43
43
  };
44
44
 
45
+ /**
46
+ * Generated when a View is added to a layout.
47
+ * @interface
48
+ */
49
+ declare type AddedToLayoutEvent = BaseEvent_4 & {
50
+ type: 'added-to-layout';
51
+ layoutIdentity: OpenFin.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5236,7 +5245,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5236
5245
  */
5237
5246
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5238
5247
  target: OpenFin.Identity;
5239
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5248
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5240
5249
 
5241
5250
  /**
5242
5251
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -12943,6 +12952,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12943
12952
  token: string;
12944
12953
  }
12945
12954
 
12955
+ /**
12956
+ * Generated when a View is removed from a layout.
12957
+ * @interface
12958
+ */
12959
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
12960
+ type: 'removed-from-layout';
12961
+ layoutIdentity: OpenFin.LayoutIdentity;
12962
+ };
12963
+
12946
12964
  /**
12947
12965
  * @interface
12948
12966
  */
@@ -16564,6 +16582,8 @@ declare namespace ViewEvents {
16564
16582
  BaseEvent_4 as BaseEvent,
16565
16583
  BaseViewEvent,
16566
16584
  TargetChangedEvent,
16585
+ AddedToLayoutEvent,
16586
+ RemovedFromLayoutEvent,
16567
16587
  NonPropagatedViewEvent,
16568
16588
  CreatedEvent,
16569
16589
  DestroyedEvent,
@@ -42,6 +42,15 @@ declare type Accelerator = {
42
42
  zoom: boolean;
43
43
  };
44
44
 
45
+ /**
46
+ * Generated when a View is added to a layout.
47
+ * @interface
48
+ */
49
+ declare type AddedToLayoutEvent = BaseEvent_4 & {
50
+ type: 'added-to-layout';
51
+ layoutIdentity: OpenFin.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5236,7 +5245,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5236
5245
  */
5237
5246
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5238
5247
  target: OpenFin.Identity;
5239
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5248
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5240
5249
 
5241
5250
  /**
5242
5251
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -12943,6 +12952,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12943
12952
  token: string;
12944
12953
  }
12945
12954
 
12955
+ /**
12956
+ * Generated when a View is removed from a layout.
12957
+ * @interface
12958
+ */
12959
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
12960
+ type: 'removed-from-layout';
12961
+ layoutIdentity: OpenFin.LayoutIdentity;
12962
+ };
12963
+
12946
12964
  /**
12947
12965
  * @interface
12948
12966
  */
@@ -16564,6 +16582,8 @@ declare namespace ViewEvents {
16564
16582
  BaseEvent_4 as BaseEvent,
16565
16583
  BaseViewEvent,
16566
16584
  TargetChangedEvent,
16585
+ AddedToLayoutEvent,
16586
+ RemovedFromLayoutEvent,
16567
16587
  NonPropagatedViewEvent,
16568
16588
  CreatedEvent,
16569
16589
  DestroyedEvent,
@@ -42,6 +42,15 @@ declare type Accelerator = {
42
42
  zoom: boolean;
43
43
  };
44
44
 
45
+ /**
46
+ * Generated when a View is added to a layout.
47
+ * @interface
48
+ */
49
+ declare type AddedToLayoutEvent = BaseEvent_4 & {
50
+ type: 'added-to-layout';
51
+ layoutIdentity: OpenFin.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5284,7 +5293,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5284
5293
  */
5285
5294
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5286
5295
  target: OpenFin.Identity;
5287
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5296
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5288
5297
 
5289
5298
  /**
5290
5299
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -13342,6 +13351,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
13342
13351
  token: string;
13343
13352
  }
13344
13353
 
13354
+ /**
13355
+ * Generated when a View is removed from a layout.
13356
+ * @interface
13357
+ */
13358
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
13359
+ type: 'removed-from-layout';
13360
+ layoutIdentity: OpenFin.LayoutIdentity;
13361
+ };
13362
+
13345
13363
  /**
13346
13364
  * @interface
13347
13365
  */
@@ -17013,6 +17031,8 @@ declare namespace ViewEvents {
17013
17031
  BaseEvent_4 as BaseEvent,
17014
17032
  BaseViewEvent,
17015
17033
  TargetChangedEvent,
17034
+ AddedToLayoutEvent,
17035
+ RemovedFromLayoutEvent,
17016
17036
  NonPropagatedViewEvent,
17017
17037
  CreatedEvent,
17018
17038
  DestroyedEvent,
@@ -2885,9 +2885,14 @@ function requireInstance$2 () {
2885
2885
  // don't expose
2886
2886
  });
2887
2887
  const layoutWindow = await this.getCurrentWindow();
2888
+ let layoutWindowIdentity = layoutWindow.identity;
2889
+ // TODO: CORE-1857 - when we tearout active layout or drag a view out of a window, the above identity includes the whole window info.
2890
+ if (layoutWindowIdentity.identity) {
2891
+ layoutWindowIdentity = layoutWindowIdentity.identity;
2892
+ }
2888
2893
  try {
2889
2894
  const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
2890
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
2895
+ const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindowIdentity);
2891
2896
  const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
2892
2897
  return this.fin.Platform.Layout.wrap(layoutIdentity);
2893
2898
  }
@@ -2900,7 +2905,7 @@ function requireInstance$2 () {
2900
2905
  throw e;
2901
2906
  }
2902
2907
  // fallback logic for missing endpoint
2903
- return this.fin.Platform.Layout.wrap(layoutWindow.identity);
2908
+ return this.fin.Platform.Layout.wrap(layoutWindowIdentity);
2904
2909
  }
2905
2910
  };
2906
2911
  /**
@@ -5338,7 +5343,7 @@ function requireInstance () {
5338
5343
  // don't expose
5339
5344
  });
5340
5345
  const opts = await this.getOptions();
5341
- if (!opts.layout || !opts.layoutSnapshot) {
5346
+ if (!opts.layout && !opts.layoutSnapshot) {
5342
5347
  throw new Error('Window does not have a Layout');
5343
5348
  }
5344
5349
  return this.fin.Platform.Layout.wrap(layoutIdentity ?? this.identity);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "34.78.82",
3
+ "version": "34.78.84",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",