@openfin/core 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/mock.js +7 -26
- package/package.json +1 -1
package/out/mock.js
CHANGED
@@ -11880,7 +11880,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
11880
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");
|
11881
11881
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
11882
11882
|
};
|
11883
|
-
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager,
|
11883
|
+
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_getSafeLayoutManager;
|
11884
11884
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
11885
11885
|
Factory$2.LayoutModule = void 0;
|
11886
11886
|
const base_1$5 = base;
|
@@ -11933,7 +11933,7 @@ class LayoutModule extends base_1$5.Base {
|
|
11933
11933
|
* ```
|
11934
11934
|
*/
|
11935
11935
|
this.init = async (options = {}) => {
|
11936
|
-
this.wire.sendAction('layout-init').catch((
|
11936
|
+
this.wire.sendAction('layout-init').catch(() => {
|
11937
11937
|
// don't expose
|
11938
11938
|
});
|
11939
11939
|
if (!this.fin.me.isWindow) {
|
@@ -11948,9 +11948,6 @@ class LayoutModule extends base_1$5.Base {
|
|
11948
11948
|
const platformClient = await this.fin.Platform.getCurrentSync().getClient();
|
11949
11949
|
const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
|
11950
11950
|
await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
|
11951
|
-
if (!options.layoutManagerOverride) {
|
11952
|
-
return __classPrivateFieldGet$4(this, _LayoutModule_getBackCompatLayoutManager, "f").call(this, this.fin);
|
11953
|
-
}
|
11954
11951
|
// warn user if they do not call create() in the next 30 seconds
|
11955
11952
|
setTimeout(() => {
|
11956
11953
|
if (__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")?.size() === 0) {
|
@@ -11960,22 +11957,6 @@ class LayoutModule extends base_1$5.Base {
|
|
11960
11957
|
}, 30000);
|
11961
11958
|
return this.wrapSync(this.fin.me.identity);
|
11962
11959
|
};
|
11963
|
-
_LayoutModule_getBackCompatLayoutManager.set(this, async (fin) => {
|
11964
|
-
let layoutManager;
|
11965
|
-
let resolve;
|
11966
|
-
const layoutResolved = new Promise((r) => {
|
11967
|
-
resolve = r;
|
11968
|
-
});
|
11969
|
-
// wait for a layout to be created
|
11970
|
-
await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
|
11971
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
11972
|
-
layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
|
11973
|
-
// Backward compat - undocumented / not typed openfin-layout as layoutManager
|
11974
|
-
// TODO: eventually deprecate this
|
11975
|
-
resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
|
11976
|
-
});
|
11977
|
-
return layoutResolved;
|
11978
|
-
});
|
11979
11960
|
/**
|
11980
11961
|
* Returns the layout manager for the current window
|
11981
11962
|
* @returns
|
@@ -12010,7 +11991,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12010
11991
|
* ```
|
12011
11992
|
*/
|
12012
11993
|
async wrap(identity) {
|
12013
|
-
this.wire.sendAction('layout-wrap').catch((
|
11994
|
+
this.wire.sendAction('layout-wrap').catch(() => {
|
12014
11995
|
// don't expose
|
12015
11996
|
});
|
12016
11997
|
return new Instance_1$2.Layout(identity, this.wire);
|
@@ -12035,7 +12016,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12035
12016
|
* ```
|
12036
12017
|
*/
|
12037
12018
|
wrapSync(identity) {
|
12038
|
-
this.wire.sendAction('layout-wrap-sync').catch((
|
12019
|
+
this.wire.sendAction('layout-wrap-sync').catch(() => {
|
12039
12020
|
// don't expose
|
12040
12021
|
});
|
12041
12022
|
return new Instance_1$2.Layout(identity, this.wire);
|
@@ -12051,7 +12032,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12051
12032
|
* ```
|
12052
12033
|
*/
|
12053
12034
|
async getCurrent() {
|
12054
|
-
this.wire.sendAction('layout-get-current').catch((
|
12035
|
+
this.wire.sendAction('layout-get-current').catch(() => {
|
12055
12036
|
// don't expose
|
12056
12037
|
});
|
12057
12038
|
if (!this.fin.me.isWindow) {
|
@@ -12074,7 +12055,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12074
12055
|
* ```
|
12075
12056
|
*/
|
12076
12057
|
getCurrentSync() {
|
12077
|
-
this.wire.sendAction('layout-get-current-sync').catch((
|
12058
|
+
this.wire.sendAction('layout-get-current-sync').catch(() => {
|
12078
12059
|
// don't expose
|
12079
12060
|
});
|
12080
12061
|
if (!this.fin.me.isWindow) {
|
@@ -12085,7 +12066,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12085
12066
|
}
|
12086
12067
|
}
|
12087
12068
|
Factory$2.LayoutModule = LayoutModule;
|
12088
|
-
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(),
|
12069
|
+
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
|
12089
12070
|
if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
|
12090
12071
|
throw new Error(`You must call init before using the API ${method}`);
|
12091
12072
|
}
|