@openfin/core 34.78.66 → 34.78.69
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 +30 -43
- package/package.json +1 -1
package/out/mock.js
CHANGED
|
@@ -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
|
}
|
|
@@ -16257,29 +16239,33 @@ function requireOverrideCheck () {
|
|
|
16257
16239
|
if (hasRequiredOverrideCheck) return overrideCheck;
|
|
16258
16240
|
hasRequiredOverrideCheck = 1;
|
|
16259
16241
|
Object.defineProperty(overrideCheck, "__esModule", { value: true });
|
|
16260
|
-
overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
|
16242
|
+
overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
|
16261
16243
|
const InteropBroker_1 = requireInteropBroker();
|
|
16262
16244
|
function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
|
|
16263
16245
|
const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
|
|
16264
16246
|
return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
|
|
16265
16247
|
}
|
|
16266
16248
|
overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
|
|
16267
|
-
|
|
16249
|
+
function checkFDC32Overrides(overriddenBroker) {
|
|
16250
|
+
// These are the APIs that must be overridden for FDC3 2.0 compliance
|
|
16251
|
+
const mustOverrideAPIs = [
|
|
16252
|
+
'fdc3HandleFindInstances',
|
|
16253
|
+
'handleInfoForIntent',
|
|
16254
|
+
'handleInfoForIntentsByContext',
|
|
16255
|
+
'fdc3HandleGetAppMetadata',
|
|
16256
|
+
'fdc3HandleGetInfo',
|
|
16257
|
+
'fdc3HandleOpen',
|
|
16258
|
+
'handleFiredIntent',
|
|
16259
|
+
'handleFiredIntentForContext'
|
|
16260
|
+
];
|
|
16261
|
+
return mustOverrideAPIs.filter((api) => {
|
|
16262
|
+
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
|
16263
|
+
});
|
|
16264
|
+
}
|
|
16265
|
+
overrideCheck.checkFDC32Overrides = checkFDC32Overrides;
|
|
16268
16266
|
function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
|
|
16269
16267
|
if (fdc3InteropApi && fdc3InteropApi === '2.0') {
|
|
16270
|
-
const
|
|
16271
|
-
'fdc3HandleFindInstances',
|
|
16272
|
-
'handleInfoForIntent',
|
|
16273
|
-
'handleInfoForIntentsByContext',
|
|
16274
|
-
'fdc3HandleGetAppMetadata',
|
|
16275
|
-
'fdc3HandleGetInfo',
|
|
16276
|
-
'fdc3HandleOpen',
|
|
16277
|
-
'handleFiredIntent',
|
|
16278
|
-
'handleFiredIntentForContext'
|
|
16279
|
-
];
|
|
16280
|
-
const notOverridden = mustOverrideAPIs.filter((api) => {
|
|
16281
|
-
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
|
16282
|
-
});
|
|
16268
|
+
const notOverridden = checkFDC32Overrides(overriddenBroker);
|
|
16283
16269
|
if (notOverridden.length > 0) {
|
|
16284
16270
|
console.warn(`WARNING: FDC3 2.0 has been set as a default option for Views in this Platform, but the required InteropBroker APIs for FDC3 2.0 compliance have not all been overridden.\nThe following APIs need to be overridden:\n${notOverridden.join('\n')}`);
|
|
16285
16271
|
}
|
|
@@ -17191,6 +17177,7 @@ var mockWire = {};
|
|
|
17191
17177
|
|
|
17192
17178
|
Object.defineProperty(mockWire, "__esModule", { value: true });
|
|
17193
17179
|
mockWire.MockWire = void 0;
|
|
17180
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
17194
17181
|
const events_1 = require$$0;
|
|
17195
17182
|
class MockWire extends events_1.EventEmitter {
|
|
17196
17183
|
connect() {
|