@openfin/core 34.78.78 → 34.78.79

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/mock.js +24 -3
  2. package/package.json +1 -1
package/out/mock.js CHANGED
@@ -12982,7 +12982,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
12982
12982
  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");
12983
12983
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
12984
12984
  };
12985
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
12985
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getLayoutManagerSpy, _LayoutModule_throwIfLayoutManagerNotInitialized;
12986
12986
  Object.defineProperty(Factory$2, "__esModule", { value: true });
12987
12987
  Factory$2.LayoutModule = void 0;
12988
12988
  const base_1$5 = base;
@@ -13054,10 +13054,31 @@ class LayoutModule extends base_1$5.Base {
13054
13054
  // in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
13055
13055
  const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
13056
13056
  const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
13057
- return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
13057
+ return __classPrivateFieldGet$4(this, _LayoutModule_getLayoutManagerSpy, "f").call(this, layoutIdentity, layoutManager);
13058
13058
  }
13059
13059
  return this.wrapSync(this.fin.me.identity);
13060
13060
  };
13061
+ _LayoutModule_getLayoutManagerSpy.set(this, (layoutIdentity, layoutManager) => {
13062
+ const msg = '[Layout] You are using a deprecated property `layoutManager` - it will throw if you access it starting in v37.';
13063
+ const managerProxy = new Proxy(layoutManager, {
13064
+ get(target, key) {
13065
+ console.warn(`[Layout-mgr-proxy] accessing ${key.toString()}`);
13066
+ console.warn(msg);
13067
+ return target[key];
13068
+ }
13069
+ });
13070
+ const layout = Object.assign(this.wrapSync(layoutIdentity), { layoutManager: managerProxy });
13071
+ const layoutProxy = new Proxy(layout, {
13072
+ get(target, key) {
13073
+ if (key === 'layoutManager') {
13074
+ console.warn(`[Layout-proxy] accessing ${key.toString()}`);
13075
+ console.warn(msg);
13076
+ }
13077
+ return target[key];
13078
+ }
13079
+ });
13080
+ return layoutProxy;
13081
+ });
13061
13082
  /**
13062
13083
  * Returns the layout manager for the current window
13063
13084
  * @returns
@@ -13171,7 +13192,7 @@ class LayoutModule extends base_1$5.Base {
13171
13192
  }
13172
13193
  }
13173
13194
  Factory$2.LayoutModule = LayoutModule;
13174
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
13195
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getLayoutManagerSpy = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
13175
13196
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
13176
13197
  throw new Error(`You must call init before using the API ${method}`);
13177
13198
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "34.78.78",
3
+ "version": "34.78.79",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",