@openfin/core 34.78.83 → 34.78.85

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_2.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5232,7 +5241,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5232
5241
  */
5233
5242
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5234
5243
  target: OpenFin_2.Identity;
5235
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5244
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5236
5245
 
5237
5246
  /**
5238
5247
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -12933,6 +12942,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12933
12942
  token: string;
12934
12943
  }
12935
12944
 
12945
+ /**
12946
+ * Generated when a View is removed from a layout.
12947
+ * @interface
12948
+ */
12949
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
12950
+ type: 'removed-from-layout';
12951
+ layoutIdentity: OpenFin_2.LayoutIdentity;
12952
+ };
12953
+
12936
12954
  /**
12937
12955
  * @interface
12938
12956
  */
@@ -16554,6 +16572,8 @@ declare namespace ViewEvents {
16554
16572
  BaseEvent_4 as BaseEvent,
16555
16573
  BaseViewEvent,
16556
16574
  TargetChangedEvent,
16575
+ AddedToLayoutEvent,
16576
+ RemovedFromLayoutEvent,
16557
16577
  NonPropagatedViewEvent,
16558
16578
  CreatedEvent,
16559
16579
  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_2.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5232,7 +5241,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5232
5241
  */
5233
5242
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5234
5243
  target: OpenFin_2.Identity;
5235
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5244
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5236
5245
 
5237
5246
  /**
5238
5247
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -12933,6 +12942,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12933
12942
  token: string;
12934
12943
  }
12935
12944
 
12945
+ /**
12946
+ * Generated when a View is removed from a layout.
12947
+ * @interface
12948
+ */
12949
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
12950
+ type: 'removed-from-layout';
12951
+ layoutIdentity: OpenFin_2.LayoutIdentity;
12952
+ };
12953
+
12936
12954
  /**
12937
12955
  * @interface
12938
12956
  */
@@ -16554,6 +16572,8 @@ declare namespace ViewEvents {
16554
16572
  BaseEvent_4 as BaseEvent,
16555
16573
  BaseViewEvent,
16556
16574
  TargetChangedEvent,
16575
+ AddedToLayoutEvent,
16576
+ RemovedFromLayoutEvent,
16557
16577
  NonPropagatedViewEvent,
16558
16578
  CreatedEvent,
16559
16579
  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_2.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5232,7 +5241,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5232
5241
  */
5233
5242
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5234
5243
  target: OpenFin_2.Identity;
5235
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5244
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5236
5245
 
5237
5246
  /**
5238
5247
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -12933,6 +12942,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
12933
12942
  token: string;
12934
12943
  }
12935
12944
 
12945
+ /**
12946
+ * Generated when a View is removed from a layout.
12947
+ * @interface
12948
+ */
12949
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
12950
+ type: 'removed-from-layout';
12951
+ layoutIdentity: OpenFin_2.LayoutIdentity;
12952
+ };
12953
+
12936
12954
  /**
12937
12955
  * @interface
12938
12956
  */
@@ -16554,6 +16572,8 @@ declare namespace ViewEvents {
16554
16572
  BaseEvent_4 as BaseEvent,
16555
16573
  BaseViewEvent,
16556
16574
  TargetChangedEvent,
16575
+ AddedToLayoutEvent,
16576
+ RemovedFromLayoutEvent,
16557
16577
  NonPropagatedViewEvent,
16558
16578
  CreatedEvent,
16559
16579
  DestroyedEvent,
package/out/mock.d.ts CHANGED
@@ -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_2.LayoutIdentity;
52
+ };
53
+
45
54
  /**
46
55
  * Options to use when adding a view to a {@link TabStack}.
47
56
  *
@@ -5280,7 +5289,7 @@ declare type Event_3 = ViewEvents.PropagatedEvent<'application'> | WindowEvents.
5280
5289
  */
5281
5290
  declare type Event_4 = (WebContentsEvents.Event<'view'> & {
5282
5291
  target: OpenFin_2.Identity;
5283
- }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent;
5292
+ }) | CreatedEvent | DestroyedEvent | HiddenEvent | HotkeyEvent | ShownEvent | TargetChangedEvent | HostContextChangedEvent | AddedToLayoutEvent | RemovedFromLayoutEvent;
5284
5293
 
5285
5294
  /**
5286
5295
  * [Union](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) containing events shared by all WebContents elements
@@ -13310,6 +13319,15 @@ declare interface RemoteConfig extends ExistingConnectConfig {
13310
13319
  token: string;
13311
13320
  }
13312
13321
 
13322
+ /**
13323
+ * Generated when a View is removed from a layout.
13324
+ * @interface
13325
+ */
13326
+ declare type RemovedFromLayoutEvent = BaseEvent_4 & {
13327
+ type: 'removed-from-layout';
13328
+ layoutIdentity: OpenFin_2.LayoutIdentity;
13329
+ };
13330
+
13313
13331
  /**
13314
13332
  * @interface
13315
13333
  */
@@ -16981,6 +16999,8 @@ declare namespace ViewEvents {
16981
16999
  BaseEvent_4 as BaseEvent,
16982
17000
  BaseViewEvent,
16983
17001
  TargetChangedEvent,
17002
+ AddedToLayoutEvent,
17003
+ RemovedFromLayoutEvent,
16984
17004
  NonPropagatedViewEvent,
16985
17005
  CreatedEvent,
16986
17006
  DestroyedEvent,
package/out/mock.js CHANGED
@@ -3112,9 +3112,14 @@ function requireInstance$2 () {
3112
3112
  // don't expose
3113
3113
  });
3114
3114
  const layoutWindow = await this.getCurrentWindow();
3115
+ let layoutWindowIdentity = layoutWindow.identity;
3116
+ // TODO: CORE-1857 - when we tearout active layout or drag a view out of a window, the above identity includes the whole window info.
3117
+ if (layoutWindowIdentity.identity) {
3118
+ layoutWindowIdentity = layoutWindowIdentity.identity;
3119
+ }
3115
3120
  try {
3116
3121
  const providerChannelClient = await __classPrivateFieldGet(this, _View_providerChannelClient, "f").getValue();
3117
- const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindow.identity);
3122
+ const client = await layout_entities_1.LayoutNode.newLayoutEntitiesClient(providerChannelClient, layout_constants_1.LAYOUT_CONTROLLER_ID, layoutWindowIdentity);
3118
3123
  const layoutIdentity = await client.getLayoutIdentityForViewOrThrow(this.identity);
3119
3124
  return this.fin.Platform.Layout.wrap(layoutIdentity);
3120
3125
  }
@@ -3127,7 +3132,7 @@ function requireInstance$2 () {
3127
3132
  throw e;
3128
3133
  }
3129
3134
  // fallback logic for missing endpoint
3130
- return this.fin.Platform.Layout.wrap(layoutWindow.identity);
3135
+ return this.fin.Platform.Layout.wrap(layoutWindowIdentity);
3131
3136
  }
3132
3137
  };
3133
3138
  /**
@@ -5565,7 +5570,7 @@ function requireInstance () {
5565
5570
  // don't expose
5566
5571
  });
5567
5572
  const opts = await this.getOptions();
5568
- if (!opts.layout || !opts.layoutSnapshot) {
5573
+ if (!opts.layout && !opts.layoutSnapshot) {
5569
5574
  throw new Error('Window does not have a Layout');
5570
5575
  }
5571
5576
  return this.fin.Platform.Layout.wrap(layoutIdentity ?? this.identity);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "34.78.83",
3
+ "version": "34.78.85",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",