@openfin/node-adapter 36.78.4 → 36.78.5
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.
- package/out/node-adapter.js +7 -26
- package/package.json +1 -1
package/out/node-adapter.js
CHANGED
@@ -11660,7 +11660,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
11660
11660
|
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");
|
11661
11661
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
11662
11662
|
};
|
11663
|
-
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager,
|
11663
|
+
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getSafeLayoutManager;
|
11664
11664
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
11665
11665
|
Factory$2.LayoutModule = void 0;
|
11666
11666
|
const base_1$5 = base$1;
|
@@ -11713,7 +11713,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11713
11713
|
* ```
|
11714
11714
|
*/
|
11715
11715
|
this.init = async (options = {}) => {
|
11716
|
-
this.wire.sendAction('layout-init').catch((
|
11716
|
+
this.wire.sendAction('layout-init').catch(() => {
|
11717
11717
|
// don't expose
|
11718
11718
|
});
|
11719
11719
|
if (!this.fin.me.isWindow) {
|
@@ -11728,9 +11728,6 @@ class LayoutModule extends base_1$5.Base {
|
|
11728
11728
|
const platformClient = await this.fin.Platform.getCurrentSync().getClient();
|
11729
11729
|
const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
|
11730
11730
|
await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
|
11731
|
-
if (!options.layoutManagerOverride) {
|
11732
|
-
return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
|
11733
|
-
}
|
11734
11731
|
// warn user if they do not call create() in the next 30 seconds
|
11735
11732
|
setTimeout(() => {
|
11736
11733
|
if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")?.size() === 0) {
|
@@ -11740,22 +11737,6 @@ class LayoutModule extends base_1$5.Base {
|
|
11740
11737
|
}, 30000);
|
11741
11738
|
return this.wrapSync(this.fin.me.identity);
|
11742
11739
|
};
|
11743
|
-
_LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
|
11744
|
-
let layoutManager;
|
11745
|
-
let resolve;
|
11746
|
-
const layoutResolved = new Promise((r) => {
|
11747
|
-
resolve = r;
|
11748
|
-
});
|
11749
|
-
// wait for a layout to be created
|
11750
|
-
await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
|
11751
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
11752
|
-
layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
|
11753
|
-
// Backward compat - undocumented / not typed openfin-layout as layoutManager
|
11754
|
-
// TODO: eventually deprecate this
|
11755
|
-
resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
|
11756
|
-
});
|
11757
|
-
return layoutResolved;
|
11758
|
-
});
|
11759
11740
|
/**
|
11760
11741
|
* Returns the layout manager for the current window
|
11761
11742
|
* @returns
|
@@ -11790,7 +11771,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11790
11771
|
* ```
|
11791
11772
|
*/
|
11792
11773
|
async wrap(identity) {
|
11793
|
-
this.wire.sendAction('layout-wrap').catch((
|
11774
|
+
this.wire.sendAction('layout-wrap').catch(() => {
|
11794
11775
|
// don't expose
|
11795
11776
|
});
|
11796
11777
|
return new Instance_1$2.Layout(identity, this.wire);
|
@@ -11815,7 +11796,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11815
11796
|
* ```
|
11816
11797
|
*/
|
11817
11798
|
wrapSync(identity) {
|
11818
|
-
this.wire.sendAction('layout-wrap-sync').catch((
|
11799
|
+
this.wire.sendAction('layout-wrap-sync').catch(() => {
|
11819
11800
|
// don't expose
|
11820
11801
|
});
|
11821
11802
|
return new Instance_1$2.Layout(identity, this.wire);
|
@@ -11831,7 +11812,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11831
11812
|
* ```
|
11832
11813
|
*/
|
11833
11814
|
async getCurrent() {
|
11834
|
-
this.wire.sendAction('layout-get-current').catch((
|
11815
|
+
this.wire.sendAction('layout-get-current').catch(() => {
|
11835
11816
|
// don't expose
|
11836
11817
|
});
|
11837
11818
|
if (!this.fin.me.isWindow) {
|
@@ -11854,7 +11835,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11854
11835
|
* ```
|
11855
11836
|
*/
|
11856
11837
|
getCurrentSync() {
|
11857
|
-
this.wire.sendAction('layout-get-current-sync').catch((
|
11838
|
+
this.wire.sendAction('layout-get-current-sync').catch(() => {
|
11858
11839
|
// don't expose
|
11859
11840
|
});
|
11860
11841
|
if (!this.fin.me.isWindow) {
|
@@ -11865,7 +11846,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11865
11846
|
}
|
11866
11847
|
}
|
11867
11848
|
Factory$2.LayoutModule = LayoutModule;
|
11868
|
-
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(),
|
11849
|
+
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
|
11869
11850
|
if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
|
11870
11851
|
throw new Error(`You must call init before using the API ${method}`);
|
11871
11852
|
}
|