@openfin/core 34.78.67 → 34.78.73
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 +18 -33
- package/package.json +1 -1
package/out/mock.js
CHANGED
|
@@ -257,7 +257,7 @@ events.WindowEvents = WindowEvents;
|
|
|
257
257
|
__exportStar(events, exports);
|
|
258
258
|
} (OpenFin$1));
|
|
259
259
|
|
|
260
|
-
var fin = {};
|
|
260
|
+
var fin$1 = {};
|
|
261
261
|
|
|
262
262
|
var system = {};
|
|
263
263
|
|
|
@@ -12602,7 +12602,7 @@ const validate_1 = validate;
|
|
|
12602
12602
|
const base_1$6 = base;
|
|
12603
12603
|
const common_utils_1 = commonUtils;
|
|
12604
12604
|
const layout_entities_1 = layoutEntities;
|
|
12605
|
-
const layout_constants_1 = layout_constants;
|
|
12605
|
+
const layout_constants_1$1 = layout_constants;
|
|
12606
12606
|
/**
|
|
12607
12607
|
*
|
|
12608
12608
|
* Layouts give app providers the ability to embed multiple views in a single window. The Layout namespace
|
|
@@ -12747,7 +12747,7 @@ class Layout extends base_1$6.Base {
|
|
|
12747
12747
|
* Lazily constructed {@link LayoutEntitiesClient} bound to this platform's client and identity
|
|
12748
12748
|
* The client is for {@link LayoutEntitiesController}
|
|
12749
12749
|
*/
|
|
12750
|
-
_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)));
|
|
12750
|
+
_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)));
|
|
12751
12751
|
/**
|
|
12752
12752
|
* Replaces a Platform window's layout with a new layout.
|
|
12753
12753
|
*
|
|
@@ -12975,11 +12975,12 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
|
12975
12975
|
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");
|
|
12976
12976
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12977
12977
|
};
|
|
12978
|
-
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager,
|
|
12978
|
+
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_throwIfLayoutManagerNotInitialized;
|
|
12979
12979
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
|
12980
12980
|
Factory$2.LayoutModule = void 0;
|
|
12981
12981
|
const base_1$5 = base;
|
|
12982
12982
|
const Instance_1$2 = Instance$1;
|
|
12983
|
+
const layout_constants_1 = layout_constants;
|
|
12983
12984
|
/**
|
|
12984
12985
|
* Static namespace for OpenFin API methods that interact with the {@link Layout} class, available under `fin.Platform.Layout`.
|
|
12985
12986
|
*/
|
|
@@ -13039,17 +13040,15 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13039
13040
|
}
|
|
13040
13041
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
|
13041
13042
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
|
|
13042
|
-
// in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
|
|
13043
|
-
let backCompatLayoutPromise;
|
|
13044
|
-
if (!options.layoutManagerOverride) {
|
|
13045
|
-
backCompatLayoutPromise = __classPrivateFieldGet$4(this, _LayoutModule_waitForBackCompatLayoutManager, "f").call(this, this.fin);
|
|
13046
|
-
}
|
|
13047
13043
|
// apply the initial snapshot which in turn will call fin.Platform.Layout.create()
|
|
13048
13044
|
const platformClient = await this.fin.Platform.getCurrentSync().getClient();
|
|
13049
13045
|
const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
|
|
13050
13046
|
await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
|
|
13051
|
-
if (
|
|
13052
|
-
return
|
|
13047
|
+
if (!options.layoutManagerOverride) {
|
|
13048
|
+
// in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
|
|
13049
|
+
const layoutIdentity = { layoutName: layout_constants_1.DEFAULT_LAYOUT_KEY, ...this.fin.me.identity };
|
|
13050
|
+
const layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
|
|
13051
|
+
return Object.assign(this.wrapSync(layoutIdentity), { layoutManager });
|
|
13053
13052
|
}
|
|
13054
13053
|
// warn user if they do not call create() in the next 30 seconds
|
|
13055
13054
|
setTimeout(() => {
|
|
@@ -13060,23 +13059,6 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13060
13059
|
}, 30000);
|
|
13061
13060
|
return this.wrapSync(this.fin.me.identity);
|
|
13062
13061
|
};
|
|
13063
|
-
// deprecate with CORE-1081
|
|
13064
|
-
_LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
|
|
13065
|
-
let layoutManager;
|
|
13066
|
-
let resolve;
|
|
13067
|
-
const layoutResolved = new Promise((r) => {
|
|
13068
|
-
resolve = r;
|
|
13069
|
-
});
|
|
13070
|
-
// wait for a layout to be created
|
|
13071
|
-
await fin.me.once('layout-ready', async ({ layoutIdentity }) => {
|
|
13072
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
13073
|
-
layoutManager = await this.wire.environment.resolveLayout(__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f"), layoutIdentity);
|
|
13074
|
-
// Backward compat - undocumented / not typed openfin-layout as layoutManager
|
|
13075
|
-
// TODO: eventually deprecate this
|
|
13076
|
-
resolve(Object.assign(this.wrapSync(layoutIdentity), { layoutManager }));
|
|
13077
|
-
});
|
|
13078
|
-
return layoutResolved;
|
|
13079
|
-
});
|
|
13080
13062
|
/**
|
|
13081
13063
|
* Returns the layout manager for the current window
|
|
13082
13064
|
* @returns
|
|
@@ -13190,7 +13172,7 @@ class LayoutModule extends base_1$5.Base {
|
|
|
13190
13172
|
}
|
|
13191
13173
|
}
|
|
13192
13174
|
Factory$2.LayoutModule = LayoutModule;
|
|
13193
|
-
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(),
|
|
13175
|
+
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_throwIfLayoutManagerNotInitialized = function _LayoutModule_throwIfLayoutManagerNotInitialized(method) {
|
|
13194
13176
|
if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
|
|
13195
13177
|
throw new Error(`You must call init before using the API ${method}`);
|
|
13196
13178
|
}
|
|
@@ -13303,6 +13285,9 @@ class PlatformModule extends base_1$4.Base {
|
|
|
13303
13285
|
* @experimental
|
|
13304
13286
|
*/
|
|
13305
13287
|
async init(options) {
|
|
13288
|
+
if (!fin.__internal_.isPlatform || fin.me.name !== fin.me.uuid) {
|
|
13289
|
+
throw new Error('fin.Platform.init should only be called from a custom platform provider running in the main window of the application.');
|
|
13290
|
+
}
|
|
13306
13291
|
return this.wire.environment.initPlatform(this.fin, options);
|
|
13307
13292
|
}
|
|
13308
13293
|
/**
|
|
@@ -16724,8 +16709,8 @@ Factory.SnapshotSourceModule = SnapshotSourceModule;
|
|
|
16724
16709
|
__exportStar(Instance, exports);
|
|
16725
16710
|
} (snapshotSource));
|
|
16726
16711
|
|
|
16727
|
-
Object.defineProperty(fin, "__esModule", { value: true });
|
|
16728
|
-
fin.Fin = void 0;
|
|
16712
|
+
Object.defineProperty(fin$1, "__esModule", { value: true });
|
|
16713
|
+
fin$1.Fin = void 0;
|
|
16729
16714
|
const events_1$3 = require$$0;
|
|
16730
16715
|
// Import from the file rather than the directory in case someone consuming types is using module resolution other than "node"
|
|
16731
16716
|
const index_1 = system;
|
|
@@ -16771,7 +16756,7 @@ class Fin extends events_1$3.EventEmitter {
|
|
|
16771
16756
|
});
|
|
16772
16757
|
}
|
|
16773
16758
|
}
|
|
16774
|
-
fin.Fin = Fin;
|
|
16759
|
+
fin$1.Fin = Fin;
|
|
16775
16760
|
|
|
16776
16761
|
var transport = {};
|
|
16777
16762
|
|
|
@@ -17223,7 +17208,7 @@ mockWire.MockWire = MockWire;
|
|
|
17223
17208
|
Object.defineProperty(mock, "__esModule", { value: true });
|
|
17224
17209
|
exports.fin = mock.fin = void 0;
|
|
17225
17210
|
const OpenFin = OpenFin$1;
|
|
17226
|
-
const fin_1 = fin;
|
|
17211
|
+
const fin_1 = fin$1;
|
|
17227
17212
|
const transport_1 = transport;
|
|
17228
17213
|
const mockEnvironment_1 = mockEnvironment;
|
|
17229
17214
|
const mockWire_1 = mockWire;
|