@openfin/core 36.78.17 → 36.78.19
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 +31 -20
- package/package.json +1 -1
package/out/mock.js
CHANGED
@@ -11955,7 +11955,7 @@ var __classPrivateFieldSet$4 = (commonjsGlobal && commonjsGlobal.__classPrivateF
|
|
11955
11955
|
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");
|
11956
11956
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
11957
11957
|
};
|
11958
|
-
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager,
|
11958
|
+
var _LayoutModule_instances, _LayoutModule_layoutInitializationAttempted, _LayoutModule_layoutManager, _LayoutModule_waitForBackCompatLayoutManager, _LayoutModule_getSafeLayoutManager;
|
11959
11959
|
Object.defineProperty(Factory$2, "__esModule", { value: true });
|
11960
11960
|
Factory$2.LayoutModule = void 0;
|
11961
11961
|
const base_1$5 = base;
|
@@ -12019,12 +12019,17 @@ class LayoutModule extends base_1$5.Base {
|
|
12019
12019
|
}
|
12020
12020
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutInitializationAttempted, true, "f");
|
12021
12021
|
__classPrivateFieldSet$4(this, _LayoutModule_layoutManager, await this.wire.environment.initLayoutManager(this.fin, this.wire, options), "f");
|
12022
|
+
// in single-layout case, we return the undocumented layoutManager type (deprecate with CORE-1081)
|
12023
|
+
let backCompatLayoutPromise;
|
12024
|
+
if (!options.layoutManagerOverride) {
|
12025
|
+
backCompatLayoutPromise = __classPrivateFieldGet$4(this, _LayoutModule_waitForBackCompatLayoutManager, "f").call(this, this.fin);
|
12026
|
+
}
|
12022
12027
|
// apply the initial snapshot which in turn will call fin.Platform.Layout.create()
|
12023
12028
|
const platformClient = await this.fin.Platform.getCurrentSync().getClient();
|
12024
12029
|
const snapshot = await platformClient.dispatch('get-initial-layout-snapshot');
|
12025
12030
|
await __classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f").applyLayoutSnapshot(snapshot);
|
12026
|
-
if (
|
12027
|
-
return
|
12031
|
+
if (backCompatLayoutPromise) {
|
12032
|
+
return backCompatLayoutPromise;
|
12028
12033
|
}
|
12029
12034
|
// warn user if they do not call create() in the next 30 seconds
|
12030
12035
|
setTimeout(() => {
|
@@ -12035,7 +12040,8 @@ class LayoutModule extends base_1$5.Base {
|
|
12035
12040
|
}, 30000);
|
12036
12041
|
return this.wrapSync(this.fin.me.identity);
|
12037
12042
|
};
|
12038
|
-
|
12043
|
+
// deprecate with CORE-1081
|
12044
|
+
_LayoutModule_waitForBackCompatLayoutManager.set(this, async (fin) => {
|
12039
12045
|
let layoutManager;
|
12040
12046
|
let resolve;
|
12041
12047
|
const layoutResolved = new Promise((r) => {
|
@@ -12160,7 +12166,7 @@ class LayoutModule extends base_1$5.Base {
|
|
12160
12166
|
}
|
12161
12167
|
}
|
12162
12168
|
Factory$2.LayoutModule = LayoutModule;
|
12163
|
-
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(),
|
12169
|
+
_LayoutModule_layoutInitializationAttempted = new WeakMap(), _LayoutModule_layoutManager = new WeakMap(), _LayoutModule_waitForBackCompatLayoutManager = new WeakMap(), _LayoutModule_instances = new WeakSet(), _LayoutModule_getSafeLayoutManager = function _LayoutModule_getSafeLayoutManager(method) {
|
12164
12170
|
if (!__classPrivateFieldGet$4(this, _LayoutModule_layoutManager, "f")) {
|
12165
12171
|
throw new Error(`You must call init before using the API ${method}`);
|
12166
12172
|
}
|
@@ -15088,29 +15094,33 @@ function requireOverrideCheck () {
|
|
15088
15094
|
if (hasRequiredOverrideCheck) return overrideCheck;
|
15089
15095
|
hasRequiredOverrideCheck = 1;
|
15090
15096
|
Object.defineProperty(overrideCheck, "__esModule", { value: true });
|
15091
|
-
overrideCheck.overrideCheck = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
15097
|
+
overrideCheck.overrideCheck = overrideCheck.checkFDC32Overrides = overrideCheck.getDefaultViewFdc3VersionFromAppInfo = void 0;
|
15092
15098
|
const InteropBroker_1 = requireInteropBroker();
|
15093
15099
|
function getDefaultViewFdc3VersionFromAppInfo({ manifest, initialOptions }) {
|
15094
15100
|
const setVersion = manifest.platform?.defaultViewOptions?.fdc3InteropApi ?? initialOptions.defaultViewOptions?.fdc3InteropApi;
|
15095
15101
|
return ['1.2', '2.0'].includes(setVersion ?? '') ? setVersion : undefined;
|
15096
15102
|
}
|
15097
15103
|
overrideCheck.getDefaultViewFdc3VersionFromAppInfo = getDefaultViewFdc3VersionFromAppInfo;
|
15098
|
-
|
15104
|
+
function checkFDC32Overrides(overriddenBroker) {
|
15105
|
+
// These are the APIs that must be overridden for FDC3 2.0 compliance
|
15106
|
+
const mustOverrideAPIs = [
|
15107
|
+
'fdc3HandleFindInstances',
|
15108
|
+
'handleInfoForIntent',
|
15109
|
+
'handleInfoForIntentsByContext',
|
15110
|
+
'fdc3HandleGetAppMetadata',
|
15111
|
+
'fdc3HandleGetInfo',
|
15112
|
+
'fdc3HandleOpen',
|
15113
|
+
'handleFiredIntent',
|
15114
|
+
'handleFiredIntentForContext'
|
15115
|
+
];
|
15116
|
+
return mustOverrideAPIs.filter((api) => {
|
15117
|
+
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
15118
|
+
});
|
15119
|
+
}
|
15120
|
+
overrideCheck.checkFDC32Overrides = checkFDC32Overrides;
|
15099
15121
|
function overrideCheck$1(overriddenBroker, fdc3InteropApi) {
|
15100
15122
|
if (fdc3InteropApi && fdc3InteropApi === '2.0') {
|
15101
|
-
const
|
15102
|
-
'fdc3HandleFindInstances',
|
15103
|
-
'handleInfoForIntent',
|
15104
|
-
'handleInfoForIntentsByContext',
|
15105
|
-
'fdc3HandleGetAppMetadata',
|
15106
|
-
'fdc3HandleGetInfo',
|
15107
|
-
'fdc3HandleOpen',
|
15108
|
-
'handleFiredIntent',
|
15109
|
-
'handleFiredIntentForContext'
|
15110
|
-
];
|
15111
|
-
const notOverridden = mustOverrideAPIs.filter((api) => {
|
15112
|
-
return overriddenBroker[api] === InteropBroker_1.InteropBroker.prototype[api];
|
15113
|
-
});
|
15123
|
+
const notOverridden = checkFDC32Overrides(overriddenBroker);
|
15114
15124
|
if (notOverridden.length > 0) {
|
15115
15125
|
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')}`);
|
15116
15126
|
}
|
@@ -16015,6 +16025,7 @@ var mockWire = {};
|
|
16015
16025
|
|
16016
16026
|
Object.defineProperty(mockWire, "__esModule", { value: true });
|
16017
16027
|
mockWire.MockWire = void 0;
|
16028
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
16018
16029
|
const events_1 = require$$0;
|
16019
16030
|
class MockWire extends events_1.EventEmitter {
|
16020
16031
|
connect() {
|