q2-tecton-platform 1.62.4 → 1.62.6
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/dist/bundle-report.json +1 -1
- package/dist/esm/actions/actionRequiredSetup.js +2 -7
- package/dist/esm/actions/authorizeTransactionWithMfaSetup.js +1 -4
- package/dist/esm/actions/clearCacheSetup.js +4 -7
- package/dist/esm/actions/clearParamsSetup.js +1 -4
- package/dist/esm/actions/closeOverpanelSetup.js +3 -6
- package/dist/esm/actions/index.js +48 -51
- package/dist/esm/actions/keepAliveSetup.js +1 -4
- package/dist/esm/actions/loadingModalSetup.js +1 -4
- package/dist/esm/actions/logToServerSetup.js +3 -6
- package/dist/esm/actions/manageChangesSetup.js +1 -4
- package/dist/esm/actions/navigateToSetup.js +5 -8
- package/dist/esm/actions/openURLSetup.js +1 -4
- package/dist/esm/actions/printWindowSetup.js +1 -4
- package/dist/esm/actions/refetchAccountsSetup.js +1 -4
- package/dist/esm/actions/scrollToSetup.js +4 -7
- package/dist/esm/actions/scrollToTopSetup.js +1 -4
- package/dist/esm/actions/sendAlertSetup.js +1 -4
- package/dist/esm/actions/setParamsSetup.js +3 -6
- package/dist/esm/actions/setTitleSetup.js +3 -6
- package/dist/esm/actions/showActionSheetSetup.js +1 -4
- package/dist/esm/actions/showModalSetup.js +1 -4
- package/dist/esm/actions/showOverpanelSetup.js +7 -10
- package/dist/esm/actions/t.js +6 -9
- package/dist/esm/actions/verifyMFASetup.js +1 -4
- package/dist/esm/index.js +1 -5
- package/dist/esm/outlets/index.js +6 -9
- package/dist/esm/outlets/platform-outlet.js +35 -42
- package/dist/esm/private-helpers/assetPathResolvers.js +6 -11
- package/dist/esm/private-helpers/cdnOverrideSetup.js +1 -4
- package/dist/esm/private-helpers/contextResolver.js +2 -7
- package/dist/esm/private-helpers/getApplicationModules.js +1 -5
- package/dist/esm/private-helpers/getAuthPayload.js +1 -4
- package/dist/esm/private-helpers/getModuleParams.js +1 -4
- package/dist/esm/private-helpers/index.js +19 -22
- package/dist/esm/private-helpers/mobileSDKCapabilities.js +1 -4
- package/dist/esm/private-helpers/platformCapabilities.js +1 -4
- package/dist/esm/private-helpers/resolveFeature.js +28 -39
- package/dist/esm/private-helpers/resolveMenu.js +18 -23
- package/dist/esm/private-helpers/resolveTabs.js +16 -21
- package/dist/esm/private-helpers/setupRegisterOutlet.js +3 -7
- package/dist/esm/setup/application-modules.js +5 -11
- package/dist/esm/setup/default-capabilities.js +1 -4
- package/dist/esm/setup/dynamic-capabilities.js +1 -4
- package/dist/esm/setup/index.js +25 -29
- package/dist/esm/setup/styles.js +9 -12
- package/dist/esm/sources/cacheClearedSetup.js +4 -7
- package/dist/esm/sources/canUserSetup.js +1 -4
- package/dist/esm/sources/getAuthTokenSetup.js +1 -4
- package/dist/esm/sources/getFeatureConfigSetup.js +3 -6
- package/dist/esm/sources/getGlobalScriptsSetup.js +1 -4
- package/dist/esm/sources/getPendoInfoSetup.js +1 -4
- package/dist/esm/sources/getPlatformDimensionsSetup.js +6 -9
- package/dist/esm/sources/getPlatformInfoSetup.js +1 -4
- package/dist/esm/sources/getVersionInfoSetup.js +1 -4
- package/dist/esm/sources/index.js +41 -44
- package/dist/esm/sources/isNavigableSetup.js +3 -6
- package/dist/esm/sources/platformCssPropertiesChangedSetup.js +10 -13
- package/dist/esm/sources/platformEventNotificationSetup.js +4 -7
- package/dist/esm/sources/platformScrollChangedSetup.js +7 -10
- package/dist/esm/sources/promptForMFASetup.js +3 -6
- package/dist/esm/sources/refetchRequiredSetup.js +4 -7
- package/dist/esm/sources/requestExtensionDataSetup.js +3 -6
- package/dist/esm/sources/requestPlatformDataSetup.js +8 -15
- package/dist/esm/sources/setupModuleParams.js +7 -10
- package/dist/esm/sources/takePictureSetup.js +1 -4
- package/dist/esm/sources/tectonCacheSetup.js +1 -4
- package/dist/esm/types/alerts.js +2 -5
- package/dist/esm/types/config.js +1 -2
- package/dist/esm/types/index.js +1 -2
- package/dist/esm/types/pendo.js +1 -2
- package/dist/esm/types/utility.js +1 -2
- package/dist/esm/utility/dimensions-helpers.js +2 -7
- package/dist/esm/utility/filterPublicOverpanels.js +1 -4
- package/dist/esm/utility/getNavigationData.js +3 -6
- package/dist/esm/utility/message-bus.js +5 -10
- package/dist/esm/utility/showActionSheet.js +2 -4
- package/dist/esm/utility/validateActionParameters.js +1 -4
- package/dist/esm/utility/windowHelpers.js +2 -7
- package/dist/umd/q2-tecton-platform.js +1 -1
- package/package.json +4 -4
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const dimensions_helpers_1 = require("../utility/dimensions-helpers");
|
|
6
|
-
function platformScrollChangedSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { Maybe } from 'maybe-not';
|
|
2
|
+
import { sendBroadcast } from '../utility/message-bus.js';
|
|
3
|
+
import { getDimensions } from '../utility/dimensions-helpers.js';
|
|
4
|
+
export default function platformScrollChangedSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
7
5
|
var _a;
|
|
8
6
|
capabilities.add('platformScrollChanged');
|
|
9
7
|
function onScroll() {
|
|
10
|
-
|
|
8
|
+
sendBroadcast(`platformScrollChanged`, Maybe.just(JSON.stringify(getDimensions(legacyControlBus, platformRoot))));
|
|
11
9
|
}
|
|
12
10
|
function onResize() {
|
|
13
|
-
|
|
11
|
+
sendBroadcast(`platformSizeChanged`, Maybe.just(JSON.stringify(getDimensions(legacyControlBus, platformRoot))));
|
|
14
12
|
}
|
|
15
13
|
let subscription;
|
|
16
14
|
const setupListeners = () => {
|
|
17
|
-
subscription = messageBus.sendResponse('getPlatformScroll', () => Promise.resolve(
|
|
15
|
+
subscription = messageBus.sendResponse('getPlatformScroll', () => Promise.resolve(getDimensions(legacyControlBus, platformRoot)));
|
|
18
16
|
platformRoot === null || platformRoot === void 0 ? void 0 : platformRoot.addEventListener('scroll', onScroll);
|
|
19
17
|
if (platformRoot instanceof HTMLElement) {
|
|
20
18
|
const resizeObserver = new ResizeObserver(onResize);
|
|
@@ -50,4 +48,3 @@ function platformScrollChangedSetup(messageBus, legacyControlBus, capabilities,
|
|
|
50
48
|
platformRoot === null || platformRoot === void 0 ? void 0 : platformRoot.removeEventListener('resize', onResize);
|
|
51
49
|
});
|
|
52
50
|
}
|
|
53
|
-
exports.default = platformScrollChangedSetup;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const resolveFeature_1 = require("../private-helpers/resolveFeature");
|
|
4
|
-
function promptForMFASetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
2
|
+
export default function promptForMFASetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
5
3
|
if (legacyControlBus.promptForMFA) {
|
|
6
4
|
capabilities.add('promptForMFA');
|
|
7
5
|
const subscription = messageBus.sendResponse('promptForMFA', async (promptOptions) => {
|
|
8
|
-
const featureName = await
|
|
6
|
+
const featureName = await getPathResolutionInfo(promptOptions.moduleId.split('.'), legacyControlBus.dynamicConfigFetch).then(x => x.featureName);
|
|
9
7
|
return legacyControlBus.promptForMFA(featureName, promptOptions);
|
|
10
8
|
});
|
|
11
9
|
teardowns.push(() => subscription.unsubscribe());
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
|
-
exports.default = promptForMFASetup;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const message_bus_1 = require("../utility/message-bus");
|
|
5
|
-
function refetchRequiredSetup(messageBus, legacyControlBus, capabilities) {
|
|
1
|
+
import { Maybe } from 'maybe-not';
|
|
2
|
+
import { sendBroadcast } from '../utility/message-bus.js';
|
|
3
|
+
export default function refetchRequiredSetup(messageBus, legacyControlBus, capabilities) {
|
|
6
4
|
if (legacyControlBus.refetchRequired) {
|
|
7
5
|
capabilities.add('refetchRequired');
|
|
8
6
|
legacyControlBus.refetchRequired((type) => {
|
|
9
|
-
|
|
7
|
+
sendBroadcast(`refetchRequired::${type}`, Maybe.nothing());
|
|
10
8
|
});
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
|
-
exports.default = refetchRequiredSetup;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const resolveFeature_1 = require("../private-helpers/resolveFeature");
|
|
4
|
-
function requestExtensionDataSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
2
|
+
export default function requestExtensionDataSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
5
3
|
if (typeof legacyControlBus.requestExtensionData !== 'function') {
|
|
6
4
|
return;
|
|
7
5
|
}
|
|
@@ -10,7 +8,7 @@ function requestExtensionDataSetup(messageBus, tectonConfig$, legacyControlBus,
|
|
|
10
8
|
const { moduleId, route, body } = message;
|
|
11
9
|
let { featureName } = message;
|
|
12
10
|
if (!featureName && moduleId) {
|
|
13
|
-
featureName = await
|
|
11
|
+
featureName = await getPathResolutionInfo(moduleId.split('.'), legacyControlBus.dynamicConfigFetch).then(info => {
|
|
14
12
|
return info.featureName;
|
|
15
13
|
});
|
|
16
14
|
}
|
|
@@ -21,4 +19,3 @@ function requestExtensionDataSetup(messageBus, tectonConfig$, legacyControlBus,
|
|
|
21
19
|
});
|
|
22
20
|
teardowns.push(() => subscription.unsubscribe());
|
|
23
21
|
}
|
|
24
|
-
exports.default = requestExtensionDataSetup;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const maybe_not_1 = require("maybe-not");
|
|
5
|
-
const formdata_conversion_1 = require("q2-tecton-common/lib/utility/formdata-conversion");
|
|
6
|
-
function requestPlatformDataSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { Maybe } from 'maybe-not';
|
|
2
|
+
import { JSONToFormData } from 'q2-tecton-common/lib/utility/formdata-conversion';
|
|
3
|
+
export default function requestPlatformDataSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
7
4
|
if (legacyControlBus.sendRequest || legacyControlBus.requestPlatformData) {
|
|
8
5
|
capabilities.add('requestPlatformData');
|
|
9
6
|
capabilities.add('requestPlatformData-v2');
|
|
@@ -33,18 +30,16 @@ function requestPlatformDataSetup(messageBus, legacyControlBus, capabilities, te
|
|
|
33
30
|
});
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
function isDataRequest(request) {
|
|
33
|
+
export function isDataRequest(request) {
|
|
38
34
|
return !!request.dataType;
|
|
39
35
|
}
|
|
40
|
-
|
|
41
|
-
function platformDataRequest(legacyControlBus, request) {
|
|
36
|
+
export function platformDataRequest(legacyControlBus, request) {
|
|
42
37
|
const routePromise = isDataRequest(request)
|
|
43
|
-
? resolveDataURL(legacyControlBus, request.dataType,
|
|
38
|
+
? resolveDataURL(legacyControlBus, request.dataType, Maybe.maybe(request.dataId), request.params)
|
|
44
39
|
: Promise.resolve(request.route);
|
|
45
40
|
return routePromise.then(route => {
|
|
46
41
|
if (request.body && request.isFormData) {
|
|
47
|
-
return legacyControlBus.sendFormDataRequest(route, request.method,
|
|
42
|
+
return legacyControlBus.sendFormDataRequest(route, request.method, JSONToFormData(JSON.parse(request.body)));
|
|
48
43
|
}
|
|
49
44
|
else {
|
|
50
45
|
const requestMethod = legacyControlBus.sendRequest || legacyControlBus.requestPlatformData;
|
|
@@ -52,8 +47,7 @@ function platformDataRequest(legacyControlBus, request) {
|
|
|
52
47
|
}
|
|
53
48
|
});
|
|
54
49
|
}
|
|
55
|
-
|
|
56
|
-
function resolveDataURL(legacyControlBus, dataType, dataIdM, params = {}) {
|
|
50
|
+
export function resolveDataURL(legacyControlBus, dataType, dataIdM, params = {}) {
|
|
57
51
|
const [category, type = 'default'] = dataType.split('::');
|
|
58
52
|
if (!category) {
|
|
59
53
|
throw new Error(`Invalid dataType format: '${dataType}'. Expected 'category::type'.`);
|
|
@@ -69,7 +63,6 @@ function resolveDataURL(legacyControlBus, dataType, dataIdM, params = {}) {
|
|
|
69
63
|
const dataURL = typeof dataURLOrResolver === 'string' ? Promise.resolve(dataURLOrResolver) : dataURLOrResolver;
|
|
70
64
|
return dataURL.then(url => `${url}${dataIdM.map(id => `/${id}`).withDefault('')}${buildQueryParams(params)}`);
|
|
71
65
|
}
|
|
72
|
-
exports.resolveDataURL = resolveDataURL;
|
|
73
66
|
function buildQueryParams(params) {
|
|
74
67
|
const paramString = Object.keys(params)
|
|
75
68
|
.map(key => `${key}=${params[key]}`)
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const getModuleParams_1 = require("../private-helpers/getModuleParams");
|
|
6
|
-
function setupModuleParams(moduleParams$, teardowns) {
|
|
1
|
+
import { sendBroadcast } from '../utility/message-bus.js';
|
|
2
|
+
import { Maybe } from 'maybe-not';
|
|
3
|
+
import getModuleParams from '../private-helpers/getModuleParams.js';
|
|
4
|
+
export default function setupModuleParams(moduleParams$, teardowns) {
|
|
7
5
|
const subscription = moduleParams$.subscribe((paramsChanged) => {
|
|
8
6
|
const modules = _getModules(Object.assign(Object.assign({}, paramsChanged.changedParams), paramsChanged.currentParams));
|
|
9
7
|
modules.forEach(moduleId => {
|
|
10
|
-
const changedModuleParams = (
|
|
11
|
-
const currentModuleParams = (
|
|
12
|
-
|
|
8
|
+
const changedModuleParams = getModuleParams(moduleId, paramsChanged.changedParams);
|
|
9
|
+
const currentModuleParams = getModuleParams(moduleId, paramsChanged.currentParams);
|
|
10
|
+
sendBroadcast('streamParams::' + moduleId, Maybe.just(JSON.stringify({
|
|
13
11
|
changedParams: changedModuleParams,
|
|
14
12
|
currentParams: currentModuleParams,
|
|
15
13
|
})));
|
|
@@ -17,7 +15,6 @@ function setupModuleParams(moduleParams$, teardowns) {
|
|
|
17
15
|
});
|
|
18
16
|
teardowns.push(() => subscription.unsubscribe());
|
|
19
17
|
}
|
|
20
|
-
exports.default = setupModuleParams;
|
|
21
18
|
function _getModules(params) {
|
|
22
19
|
const modules = [];
|
|
23
20
|
return Object.keys(params).reduce((accumulator, key) => {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function takePictureSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function takePictureSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.takePicture) {
|
|
5
3
|
capabilities.add('takePicture');
|
|
6
4
|
const subscription = messageBus.sendResponse('takePicture', ({ overlayText, helpText }) => {
|
|
@@ -12,4 +10,3 @@ function takePictureSetup(messageBus, legacyControlBus, capabilities, teardowns)
|
|
|
12
10
|
teardowns.push(() => subscription.unsubscribe());
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
|
-
exports.default = takePictureSetup;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
1
|
const TECTON_CACHE_NAMESPACE_KEY = 'q2.tectonCache';
|
|
4
2
|
function _buildCacheKey(moduleId, key) {
|
|
5
3
|
return `${moduleId}.${key}`;
|
|
@@ -10,7 +8,7 @@ function _browserSupportsSessionStorage() {
|
|
|
10
8
|
const browserSupportsRemoveSetItem = !!sessionStorage.removeItem;
|
|
11
9
|
return browserSupportsGetItem && browserSupportsSetItem && browserSupportsRemoveSetItem;
|
|
12
10
|
}
|
|
13
|
-
function tectonCacheSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
11
|
+
export default function tectonCacheSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
14
12
|
if (!legacyControlBus.registerLogoffHook || !_browserSupportsSessionStorage()) {
|
|
15
13
|
return;
|
|
16
14
|
}
|
|
@@ -37,4 +35,3 @@ function tectonCacheSetup(messageBus, legacyControlBus, capabilities, teardowns)
|
|
|
37
35
|
});
|
|
38
36
|
teardowns.push(() => setSubscription.unsubscribe());
|
|
39
37
|
}
|
|
40
|
-
exports.default = tectonCacheSetup;
|
package/dist/esm/types/alerts.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PlatformAlertType = void 0;
|
|
4
|
-
var PlatformAlertType;
|
|
1
|
+
export var PlatformAlertType;
|
|
5
2
|
(function (PlatformAlertType) {
|
|
6
3
|
PlatformAlertType["Info"] = "info";
|
|
7
4
|
PlatformAlertType["Danger"] = "danger";
|
|
8
5
|
PlatformAlertType["Warning"] = "warning";
|
|
9
6
|
PlatformAlertType["Success"] = "success";
|
|
10
|
-
})(PlatformAlertType || (
|
|
7
|
+
})(PlatformAlertType || (PlatformAlertType = {}));
|
package/dist/esm/types/config.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/esm/types/index.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
package/dist/esm/types/pendo.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPlatformRoot = exports.getDimensions = void 0;
|
|
4
1
|
const zeroedDimensions = {
|
|
5
2
|
scrollY: 0,
|
|
6
3
|
innerHeight: 0,
|
|
7
4
|
innerWidth: 0,
|
|
8
5
|
};
|
|
9
|
-
function getDimensions(legacyControlBus, target) {
|
|
6
|
+
export function getDimensions(legacyControlBus, target) {
|
|
10
7
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
11
8
|
if (!target) {
|
|
12
9
|
console.warn('No platform root found. Returning zeroed dimensions.');
|
|
@@ -19,10 +16,8 @@ function getDimensions(legacyControlBus, target) {
|
|
|
19
16
|
}
|
|
20
17
|
return Object.assign({ scrollY: (_a = (isTargetElement ? target.scrollTop : target.scrollY)) !== null && _a !== void 0 ? _a : 0, innerHeight: (_b = (isTargetElement ? target.offsetHeight : target.innerHeight)) !== null && _b !== void 0 ? _b : 0, innerWidth: (_c = (isTargetElement ? target.offsetWidth : target.innerWidth)) !== null && _c !== void 0 ? _c : 0, orientationType: (_e = (_d = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _d === void 0 ? void 0 : _d.type) !== null && _e !== void 0 ? _e : 'landscape-primary', orientationAngle: (_g = (_f = screen === null || screen === void 0 ? void 0 : screen.orientation) === null || _f === void 0 ? void 0 : _f.angle) !== null && _g !== void 0 ? _g : 0 }, (_h = legacyControlBus === null || legacyControlBus === void 0 ? void 0 : legacyControlBus.getSurroundingOffsets) === null || _h === void 0 ? void 0 : _h.call(legacyControlBus));
|
|
21
18
|
}
|
|
22
|
-
|
|
23
|
-
function getPlatformRoot(legacyControlBus) {
|
|
19
|
+
export function getPlatformRoot(legacyControlBus) {
|
|
24
20
|
var _a;
|
|
25
21
|
const platformRootSelector = (_a = legacyControlBus === null || legacyControlBus === void 0 ? void 0 : legacyControlBus.getPlatformRootSelector) === null || _a === void 0 ? void 0 : _a.call(legacyControlBus);
|
|
26
22
|
return platformRootSelector ? document.querySelector(platformRootSelector) : window;
|
|
27
23
|
}
|
|
28
|
-
exports.getPlatformRoot = getPlatformRoot;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function filterPublicOverpanels(tectonConfig) {
|
|
1
|
+
export default function filterPublicOverpanels(tectonConfig) {
|
|
4
2
|
// Filter and transform the configuredOverpanels to only include public ones
|
|
5
3
|
// and ensure they have a featureName set to the parentKey if it is not already set.
|
|
6
4
|
return Object.entries(tectonConfig.features).reduce((publicOverpanels, [parentKey, parentValue]) => {
|
|
@@ -18,4 +16,3 @@ function filterPublicOverpanels(tectonConfig) {
|
|
|
18
16
|
return publicOverpanels;
|
|
19
17
|
}, {});
|
|
20
18
|
}
|
|
21
|
-
exports.default = filterPublicOverpanels;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const maybe_not_1 = require("maybe-not");
|
|
4
|
-
function getNavigationData(tectonConfig$, featureName, moduleName) {
|
|
1
|
+
import { Maybe } from 'maybe-not';
|
|
2
|
+
export default function getNavigationData(tectonConfig$, featureName, moduleName) {
|
|
5
3
|
const tectonConfig = tectonConfig$.getValue();
|
|
6
|
-
return
|
|
4
|
+
return Maybe.maybe(tectonConfig.features[featureName]).map(feature => {
|
|
7
5
|
const primaryModuleName = Object.keys(feature.modules).find(key => {
|
|
8
6
|
return feature.modules[key].primary;
|
|
9
7
|
});
|
|
@@ -16,4 +14,3 @@ function getNavigationData(tectonConfig$, featureName, moduleName) {
|
|
|
16
14
|
};
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
|
-
exports.default = getNavigationData;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const message_bus_1 = require("q2-tecton-common/lib/utility/message-bus");
|
|
5
|
-
Object.defineProperty(exports, "sendMessage", { enumerable: true, get: function () { return message_bus_1.sendMessage; } });
|
|
6
|
-
Object.defineProperty(exports, "sendBroadcast", { enumerable: true, get: function () { return message_bus_1.sendBroadcast; } });
|
|
7
|
-
const rxjs_1 = require("rxjs");
|
|
8
|
-
class PlatformMessageBus extends message_bus_1.default {
|
|
1
|
+
import MessageBus, { sendMessage, sendBroadcast } from 'q2-tecton-common/lib/utility/message-bus';
|
|
2
|
+
import { filter } from 'rxjs';
|
|
3
|
+
class PlatformMessageBus extends MessageBus {
|
|
9
4
|
constructor(tectonConfig$, allowAll) {
|
|
10
5
|
super();
|
|
11
6
|
this.domains = new Set();
|
|
12
7
|
this.configSubscription = tectonConfig$.subscribe(this.getConfigDomains.bind(this));
|
|
13
|
-
this.firehose$ = this.firehose$.pipe(
|
|
8
|
+
this.firehose$ = this.firehose$.pipe(filter((e) => {
|
|
14
9
|
// filter messages to only registered origins
|
|
15
10
|
return allowAll || this.domains.has(e.origin);
|
|
16
11
|
}));
|
|
@@ -41,7 +36,7 @@ class PlatformMessageBus extends message_bus_1.default {
|
|
|
41
36
|
this.domains = dedupeAndCompact(domains);
|
|
42
37
|
}
|
|
43
38
|
}
|
|
44
|
-
exports.default = PlatformMessageBus;
|
|
45
39
|
function dedupeAndCompact(domains) {
|
|
46
40
|
return new Set(domains.filter(domain => domain !== ''));
|
|
47
41
|
}
|
|
42
|
+
export { PlatformMessageBus as default, sendMessage, sendBroadcast };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const action_sheet_1 = require("q2-tecton-common/lib/utility/action-sheet");
|
|
4
|
-
exports.default = action_sheet_1.showActionSheet;
|
|
1
|
+
import { showActionSheet } from 'q2-tecton-common/lib/utility/action-sheet';
|
|
2
|
+
export default showActionSheet;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function validateActionParameters(candidateSubset, configuredParameters) {
|
|
1
|
+
export default function validateActionParameters(candidateSubset, configuredParameters) {
|
|
4
2
|
if (candidateSubset === undefined || candidateSubset === null || JSON.stringify(candidateSubset) === '{}') {
|
|
5
3
|
return true;
|
|
6
4
|
}
|
|
@@ -18,4 +16,3 @@ function validateActionParameters(candidateSubset, configuredParameters) {
|
|
|
18
16
|
}
|
|
19
17
|
return true;
|
|
20
18
|
}
|
|
21
|
-
exports.default = validateActionParameters;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.innerHeightHelper = exports.scrollYHelper = void 0;
|
|
4
|
-
function scrollYHelper() {
|
|
1
|
+
export function scrollYHelper() {
|
|
5
2
|
return window.scrollY;
|
|
6
3
|
}
|
|
7
|
-
|
|
8
|
-
function innerHeightHelper() {
|
|
4
|
+
export function innerHeightHelper() {
|
|
9
5
|
return window.innerHeight;
|
|
10
6
|
}
|
|
11
|
-
exports.innerHeightHelper = innerHeightHelper;
|