@openfin/core 35.78.29 → 36.78.2

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.
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4751,7 +4751,7 @@ declare type DownloadShelfOptions = {
4751
4751
  */
4752
4752
  size?: number;
4753
4753
  /**
4754
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4754
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4755
4755
  * if absent.
4756
4756
  */
4757
4757
  color?: string;
@@ -6560,6 +6560,8 @@ declare type InitPlatformOptions = {
6560
6560
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6561
6561
  };
6562
6562
 
6563
+ declare type InjectionType = 'none' | 'global';
6564
+
6563
6565
  /**
6564
6566
  * Generated when the value of the element changes.
6565
6567
  * @interface
@@ -7404,8 +7406,6 @@ declare type InteropBrokerOptions = {
7404
7406
  };
7405
7407
 
7406
7408
  /**
7407
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7408
- *
7409
7409
  * The Interop Client API is broken up into two groups:
7410
7410
  *
7411
7411
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7808,7 +7808,7 @@ declare class InteropClient extends Base {
7808
7808
  * ```
7809
7809
  */
7810
7810
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7811
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7811
+ /* Excluded from this release type: ferryFdc3Call */
7812
7812
  }
7813
7813
 
7814
7814
  /**
@@ -9716,6 +9716,7 @@ declare namespace OpenFin_2 {
9716
9716
  ResizeRegion,
9717
9717
  Accelerator,
9718
9718
  Api,
9719
+ InjectionType,
9719
9720
  NavigationRules,
9720
9721
  ContentNavigation,
9721
9722
  ContentRedirect,
@@ -16130,7 +16131,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
16130
16131
  * We do not expose an explicit superclass for this functionality, but it does have its own
16131
16132
  * {@link OpenFin.WebContentsEvents event namespace}.
16132
16133
  */
16133
- executeJavaScript(code: string): Promise<void>;
16134
+ executeJavaScript(code: string): Promise<unknown>;
16134
16135
  /**
16135
16136
  * Returns the zoom level of the WebContents.
16136
16137
  *
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4751,7 +4751,7 @@ declare type DownloadShelfOptions = {
4751
4751
  */
4752
4752
  size?: number;
4753
4753
  /**
4754
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4754
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4755
4755
  * if absent.
4756
4756
  */
4757
4757
  color?: string;
@@ -6560,6 +6560,8 @@ declare type InitPlatformOptions = {
6560
6560
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6561
6561
  };
6562
6562
 
6563
+ declare type InjectionType = 'none' | 'global';
6564
+
6563
6565
  /**
6564
6566
  * Generated when the value of the element changes.
6565
6567
  * @interface
@@ -7404,8 +7406,6 @@ declare type InteropBrokerOptions = {
7404
7406
  };
7405
7407
 
7406
7408
  /**
7407
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7408
- *
7409
7409
  * The Interop Client API is broken up into two groups:
7410
7410
  *
7411
7411
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7808,7 +7808,7 @@ declare class InteropClient extends Base {
7808
7808
  * ```
7809
7809
  */
7810
7810
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7811
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7811
+ /* Excluded from this release type: ferryFdc3Call */
7812
7812
  }
7813
7813
 
7814
7814
  /**
@@ -9716,6 +9716,7 @@ declare namespace OpenFin_2 {
9716
9716
  ResizeRegion,
9717
9717
  Accelerator,
9718
9718
  Api,
9719
+ InjectionType,
9719
9720
  NavigationRules,
9720
9721
  ContentNavigation,
9721
9722
  ContentRedirect,
@@ -16130,7 +16131,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
16130
16131
  * We do not expose an explicit superclass for this functionality, but it does have its own
16131
16132
  * {@link OpenFin.WebContentsEvents event namespace}.
16132
16133
  */
16133
- executeJavaScript(code: string): Promise<void>;
16134
+ executeJavaScript(code: string): Promise<unknown>;
16134
16135
  /**
16135
16136
  * Returns the zoom level of the WebContents.
16136
16137
  *
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4751,7 +4751,7 @@ declare type DownloadShelfOptions = {
4751
4751
  */
4752
4752
  size?: number;
4753
4753
  /**
4754
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4754
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4755
4755
  * if absent.
4756
4756
  */
4757
4757
  color?: string;
@@ -6560,6 +6560,8 @@ declare type InitPlatformOptions = {
6560
6560
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6561
6561
  };
6562
6562
 
6563
+ declare type InjectionType = 'none' | 'global';
6564
+
6563
6565
  /**
6564
6566
  * Generated when the value of the element changes.
6565
6567
  * @interface
@@ -7404,8 +7406,6 @@ declare type InteropBrokerOptions = {
7404
7406
  };
7405
7407
 
7406
7408
  /**
7407
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7408
- *
7409
7409
  * The Interop Client API is broken up into two groups:
7410
7410
  *
7411
7411
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7808,7 +7808,7 @@ declare class InteropClient extends Base {
7808
7808
  * ```
7809
7809
  */
7810
7810
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7811
- static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7811
+ /* Excluded from this release type: ferryFdc3Call */
7812
7812
  }
7813
7813
 
7814
7814
  /**
@@ -9716,6 +9716,7 @@ declare namespace OpenFin_2 {
9716
9716
  ResizeRegion,
9717
9717
  Accelerator,
9718
9718
  Api,
9719
+ InjectionType,
9719
9720
  NavigationRules,
9720
9721
  ContentNavigation,
9721
9722
  ContentRedirect,
@@ -16130,7 +16131,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
16130
16131
  * We do not expose an explicit superclass for this functionality, but it does have its own
16131
16132
  * {@link OpenFin.WebContentsEvents event namespace}.
16132
16133
  */
16133
- executeJavaScript(code: string): Promise<void>;
16134
+ executeJavaScript(code: string): Promise<unknown>;
16134
16135
  /**
16135
16136
  * Returns the zoom level of the WebContents.
16136
16137
  *
package/out/mock.d.ts CHANGED
@@ -97,9 +97,9 @@ declare type Api = {
97
97
  enableDeprecatedSharedName?: boolean;
98
98
  };
99
99
  /**
100
- * Prevent fin API injection. If true `fin` won't be available in this context.
100
+ * Prevent fin API injection. If 'none', `fin` won't be available in this context.
101
101
  */
102
- preventInjection?: boolean;
102
+ fin?: InjectionType;
103
103
  };
104
104
 
105
105
  declare type ApiCall<Request, Response> = {
@@ -4794,7 +4794,7 @@ declare type DownloadShelfOptions = {
4794
4794
  */
4795
4795
  size?: number;
4796
4796
  /**
4797
- * Color of the border, either a string name or a hex code. Defaults to chromium theme
4797
+ * Color of the border. Must be a 6-character hex code prefixed by #. Defaults to chromium theme
4798
4798
  * if absent.
4799
4799
  */
4800
4800
  color?: string;
@@ -6638,6 +6638,8 @@ declare type InitPlatformOptions = {
6638
6638
  interopOverride?: OverrideCallback<InteropBroker> | ConstructorOverride<InteropBroker>[];
6639
6639
  };
6640
6640
 
6641
+ declare type InjectionType = 'none' | 'global';
6642
+
6641
6643
  /**
6642
6644
  * Generated when the value of the element changes.
6643
6645
  * @interface
@@ -7497,8 +7499,6 @@ declare type InteropBrokerOptions = {
7497
7499
  };
7498
7500
 
7499
7501
  /**
7500
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
7501
- *
7502
7502
  * The Interop Client API is broken up into two groups:
7503
7503
  *
7504
7504
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -7904,6 +7904,11 @@ declare class InteropClient extends Base {
7904
7904
  * ```
7905
7905
  */
7906
7906
  onDisconnection(listener: OpenFin_2.InteropClientOnDisconnectionListener): Promise<void>;
7907
+ /**
7908
+ * @internal
7909
+ *
7910
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
7911
+ */
7907
7912
  static ferryFdc3Call(interopClient: OpenFin_2.InteropClient, action: string, payload?: any): Promise<any>;
7908
7913
  }
7909
7914
 
@@ -10006,6 +10011,7 @@ declare namespace OpenFin_2 {
10006
10011
  ResizeRegion,
10007
10012
  Accelerator,
10008
10013
  Api,
10014
+ InjectionType,
10009
10015
  NavigationRules,
10010
10016
  ContentNavigation,
10011
10017
  ContentRedirect,
@@ -16548,7 +16554,7 @@ declare class WebContents<T extends BaseEvent> extends EmitterBase<T> {
16548
16554
  * We do not expose an explicit superclass for this functionality, but it does have its own
16549
16555
  * {@link OpenFin.WebContentsEvents event namespace}.
16550
16556
  */
16551
- executeJavaScript(code: string): Promise<void>;
16557
+ executeJavaScript(code: string): Promise<unknown>;
16552
16558
  /**
16553
16559
  * Returns the zoom level of the WebContents.
16554
16560
  *
package/out/mock.js CHANGED
@@ -8274,7 +8274,8 @@ function errorToPOJO(error) {
8274
8274
  stack: error.stack,
8275
8275
  name: error.name,
8276
8276
  message: error.message,
8277
- toString: error.toString
8277
+ // support the case where stack is empty or missing
8278
+ toString: () => error.stack || error.toString()
8278
8279
  };
8279
8280
  }
8280
8281
  errors.errorToPOJO = errorToPOJO;
@@ -11879,7 +11880,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
11879
11880
  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");
11880
11881
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
11881
11882
  };
11882
- var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
11883
+ var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getBackCompatLayoutManager, _LayoutModule_getSafeLayoutManager;
11883
11884
  Object.defineProperty(Factory$2, "__esModule", { value: true });
11884
11885
  Factory$2.LayoutModule = void 0;
11885
11886
  const base_1$5 = base;
@@ -11952,7 +11953,7 @@ class LayoutModule extends base_1$5.Base {
11952
11953
  }
11953
11954
  // warn user if they do not call create() in the next 30 seconds
11954
11955
  setTimeout(() => {
11955
- if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").size() === 0) {
11956
+ if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")?.size() === 0) {
11956
11957
  console.warn(`[Layout.init] Layout.init was called 30s ago, but no layouts have been created yet. Make sure you ` +
11957
11958
  `override LayoutManager.applyLayoutSnapshot, and then call fin.Platform.Layout.create()`);
11958
11959
  }
@@ -11967,6 +11968,7 @@ class LayoutModule extends base_1$5.Base {
11967
11968
  });
11968
11969
  // wait for a layout to be created
11969
11970
  await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
11971
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
11970
11972
  layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11971
11973
  // Backward compat - undocumented / not typed openfin-layout as layoutManager
11972
11974
  // TODO: eventually deprecate this
@@ -11979,17 +11981,13 @@ class LayoutModule extends base_1$5.Base {
11979
11981
  * @returns
11980
11982
  */
11981
11983
  this.getCurrentLayoutManagerSync = () => {
11982
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11983
- // @ts-expect-error User may have implemented their own snapshot type when overriding LayoutManager
11984
- return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
11984
+ return __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.getCurrentLayoutManagerSync()`);
11985
11985
  };
11986
11986
  this.create = async (options) => {
11987
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.create()`);
11988
- return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), options);
11987
+ return this.wire.environment.createLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.create()`), options);
11989
11988
  };
11990
11989
  this.destroy = async (layoutIdentity) => {
11991
- __classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_throwIfLayoutManagerNotInitialized).call(this, `fin.Platform.Layout.destroy()`);
11992
- return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
11990
+ return this.wire.environment.destroyLayout(__classPrivateFieldGet$4(this, _LayoutModule_instances, "m", _LayoutModule_getSafeLayoutManager).call(this, `fin.Platform.Layout.destroy()`), layoutIdentity);
11993
11991
  };
11994
11992
  }
11995
11993
  /**
@@ -12087,10 +12085,11 @@ class LayoutModule extends base_1$5.Base {
12087
12085
  }
12088
12086
  }
12089
12087
  Factory$2.LayoutModule = LayoutModule;
12090
- _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
12088
+ _LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_getBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
12091
12089
  if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
12092
12090
  throw new Error(`You must call init before using the API ${method}`);
12093
12091
  }
12092
+ return __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f");
12094
12093
  };
12095
12094
 
12096
12095
  (function (exports) {
@@ -14428,8 +14427,6 @@ const base_1$2 = base;
14428
14427
  const SessionContextGroupClient_1 = SessionContextGroupClient$1;
14429
14428
  const utils_1$2 = utils$1;
14430
14429
  /**
14431
- * {@link https://developers.openfin.co/of-docs/docs/enable-color-linking}
14432
- *
14433
14430
  * The Interop Client API is broken up into two groups:
14434
14431
  *
14435
14432
  * **Content Facing APIs** - For Application Developers putting Views into a Platform Window, who care about Context. These are APIs that send out and receive the Context data that flows between applications. Think of this as the Water in the Interop Pipes.
@@ -14995,7 +14992,11 @@ class InteropClient extends base_1$2.Base {
14995
14992
  listener({ type: 'interop-broker', topic: 'disconnected', brokerName: uuid });
14996
14993
  });
14997
14994
  }
14998
- // used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
14995
+ /**
14996
+ * @internal
14997
+ *
14998
+ * Used to ferry fdc3-only calls from the fdc3 shim to the Interop Broker
14999
+ */
14999
15000
  static async ferryFdc3Call(interopClient, action, payload) {
15000
15001
  const client = await __classPrivateFieldGet$2(interopClient, _InteropClient_clientPromise, "f");
15001
15002
  return client.dispatch(action, payload || null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfin/core",
3
- "version": "35.78.29",
3
+ "version": "36.78.2",
4
4
  "description": "The core renderer entry point of OpenFin",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "main": "out/mock.js",