@openfin/node-adapter 34.78.67 → 34.78.69

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.
Files changed (2) hide show
  1. package/out/node-adapter.js +10 -28
  2. package/package.json +1 -1
@@ -12382,7 +12382,7 @@ const validate_1 = validate;
12382
12382
  const base_1$6 = base$1;
12383
12383
  const common_utils_1 = commonUtils;
12384
12384
  const layout_entities_1 = layoutEntities;
12385
- const layout_constants_1 = layout_constants;
12385
+ const layout_constants_1$1 = layout_constants;
12386
12386
  /**
12387
12387
  *
12388
12388
  * Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
@@ -12527,7 +12527,7 @@ class Layout extends base_1$6.Base {
12527
12527
  * Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
12528
12528
  * The client is for {@link LayoutEntitiesController}
12529
12529
  */
12530
- _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1.LAYOUT_CONTROLLER_ID, this.identity)));
12530
+ _Layout_layoutClient.set(this, new lazy_1.Lazy(async () => layout_entities_1.LayoutNode.newLayoutEntitiesClient(await this.platform.getClient(), layout_constants_1$1.LAYOUT_CONTROLLER_ID, this.identity)));
12531
12531
  /**
12532
12532
  * Replaces a Platform window's layout with a new layout.
12533
12533
  *
@@ -12755,11 +12755,12 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12755
12755
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
12756
12756
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12757
12757
  };
12758
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_waitForBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12758
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12759
12759
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12760
12760
  Factory$2.LayoutModule = void 0;
12761
12761
  const base_1$5 = base$1;
12762
12762
  const Instance_1$2 = Instance$1;
12763
+ const layout_constants_1 = layout_constants;
12763
12764
  /**
12764
12765
  * Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
12765
12766
  */
@@ -12819,17 +12820,15 @@ class LayoutModule extends base_1$5.Base {
12819
12820
  }
12820
12821
  __classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
12821
12822
  __classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
12822
- // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12823
- let backCompatLayoutPromise;
12824
- if (!options.layoutManagerOverride) {
12825
- backCompatLayoutPromise = __classPrivateFieldGet$4(this, _LayoutModule_waitForBackCompatLayoutManager, "f").call(this, this.fin);
12826
- }
12827
12823
  // apply the initial snapshot which in turn will call fin.Platform.Layout.create()
12828
12824
  const platformClient = await this.fin.Platform.getCurrentSync().getClient();
12829
12825
  const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
12830
12826
  await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
12831
- if (backCompatLayoutPromise) {
12832
- return backCompatLayoutPromise;
12827
+ if (!options.layoutManagerOverride) {
12828
+ // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
12829
+ const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
12830
+ const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12831
+ return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
12833
12832
  }
12834
12833
  // warn user if they do not call create() in the next 30 seconds
12835
12834
  setTimeout(() => {
@@ -12840,23 +12839,6 @@ class LayoutModule extends base_1$5.Base {
12840
12839
  }, 30000);
12841
12840
  return this.wrapSync(this.fin.me.identity);
12842
12841
  };
12843
- // deprecate with CORE-1081
12844
- _LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
12845
- let layoutManager;
12846
- let resolve;
12847
- const layoutResolved = new Promise((r) => {
12848
- resolve = r;
12849
- });
12850
- // wait for a layout to be created
12851
- await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
12852
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
12853
- layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
12854
- // Backward compat - undocumented / not typed openfin-layout as layoutManager
12855
- // TODO: eventually deprecate this
12856
- resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
12857
- });
12858
- return layoutResolved;
12859
- });
12860
12842
  /**
12861
12843
  * Returns the layout manager for the current window
12862
12844
  * @returns
@@ -12970,7 +12952,7 @@ class LayoutModule extends base_1$5.Base {
12970
12952
  }
12971
12953
  }
12972
12954
  Factory$2.LayoutModule = LayoutModule;
12973
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_waitForBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12955
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12974
12956
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
12975
12957
  throw new Error(`You must call init before using the API ${method}`);
12976
12958
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/node-adapter",
3
- "version": "34.78.67",
3
+ "version": "34.78.69",
4
4
  "description": "See README.md",
5
5
  "main": "out/node-adapter.js",
6
6
  "types": "out/node-adapter.d.ts",