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,52 +1,49 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(
|
|
28
|
-
(
|
|
29
|
-
(
|
|
30
|
-
(
|
|
31
|
-
(
|
|
32
|
-
(
|
|
33
|
-
(
|
|
34
|
-
(
|
|
35
|
-
(
|
|
36
|
-
(
|
|
37
|
-
(
|
|
38
|
-
(
|
|
39
|
-
(
|
|
40
|
-
(
|
|
41
|
-
(
|
|
42
|
-
(
|
|
43
|
-
(
|
|
44
|
-
(
|
|
45
|
-
(
|
|
46
|
-
(
|
|
47
|
-
(
|
|
48
|
-
(
|
|
49
|
-
(0, showOverpanelSetup_1.default)(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns);
|
|
50
|
-
(0, verifyMFASetup_1.default)(messageBus, legacyControlBus, capabilities, teardowns);
|
|
1
|
+
import { actionRequired, removeActionRequired } from './actionRequiredSetup.js';
|
|
2
|
+
import authorizeTransactionWithMfaSetup from './authorizeTransactionWithMfaSetup.js';
|
|
3
|
+
import clearCacheSetup from './clearCacheSetup.js';
|
|
4
|
+
import clearParamsSetup from './clearParamsSetup.js';
|
|
5
|
+
import closeOverpanelSetup from './closeOverpanelSetup.js';
|
|
6
|
+
import keepAliveSetup from './keepAliveSetup.js';
|
|
7
|
+
import loadingModalSetup from './loadingModalSetup.js';
|
|
8
|
+
import logToServerSetup from './logToServerSetup.js';
|
|
9
|
+
import manageChangesSetup from './manageChangesSetup.js';
|
|
10
|
+
import navigateToSetup from './navigateToSetup.js';
|
|
11
|
+
import openURLSetup from './openURLSetup.js';
|
|
12
|
+
import printWindowSetup from './printWindowSetup.js';
|
|
13
|
+
import refetchAccountsSetup from './refetchAccountsSetup.js';
|
|
14
|
+
import scrollTo from './scrollToSetup.js';
|
|
15
|
+
import scrollToTop from './scrollToTopSetup.js';
|
|
16
|
+
import sendAlertSetup from './sendAlertSetup.js';
|
|
17
|
+
import setParamsSetup from './setParamsSetup.js';
|
|
18
|
+
import setTitleSetup from './setTitleSetup.js';
|
|
19
|
+
import setupTectonLanguage from './t.js';
|
|
20
|
+
import showActionSheetSetup from './showActionSheetSetup.js';
|
|
21
|
+
import showModalSetup from './showModalSetup.js';
|
|
22
|
+
import showOverpanelSetup from './showOverpanelSetup.js';
|
|
23
|
+
import verifyMFASetup from './verifyMFASetup.js';
|
|
24
|
+
export default function setupActions(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
25
|
+
actionRequired(messageBus, legacyControlBus, capabilities, teardowns);
|
|
26
|
+
authorizeTransactionWithMfaSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
27
|
+
clearCacheSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
28
|
+
clearParamsSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
29
|
+
closeOverpanelSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
30
|
+
keepAliveSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
31
|
+
loadingModalSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
32
|
+
logToServerSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns);
|
|
33
|
+
manageChangesSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
34
|
+
navigateToSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns);
|
|
35
|
+
openURLSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
36
|
+
printWindowSetup(messageBus, teardowns);
|
|
37
|
+
refetchAccountsSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
38
|
+
removeActionRequired(messageBus, legacyControlBus, capabilities, teardowns);
|
|
39
|
+
scrollTo(messageBus, legacyControlBus, capabilities, teardowns);
|
|
40
|
+
scrollToTop(messageBus, capabilities, teardowns);
|
|
41
|
+
sendAlertSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
42
|
+
setParamsSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns);
|
|
43
|
+
setTitleSetup(messageBus, legacyControlBus, tectonConfig$, capabilities, teardowns);
|
|
44
|
+
setupTectonLanguage(messageBus, legacyControlBus, capabilities, teardowns);
|
|
45
|
+
showActionSheetSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns);
|
|
46
|
+
showModalSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
47
|
+
showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns);
|
|
48
|
+
verifyMFASetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
51
49
|
}
|
|
52
|
-
exports.default = setupActions;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function keepAliveSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function keepAliveSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.keepAlive) {
|
|
5
3
|
capabilities.add('keepAlive');
|
|
6
4
|
const subscription = messageBus.onMessage('keepAlive').subscribe(legacyControlBus.keepAlive);
|
|
7
5
|
teardowns.push(() => subscription.unsubscribe());
|
|
8
6
|
}
|
|
9
7
|
}
|
|
10
|
-
exports.default = keepAliveSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function loadingModalSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function loadingModalSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.showLoadingModal) {
|
|
5
3
|
capabilities.add('showLoadingModal');
|
|
6
4
|
const subscription = messageBus.onMessage('showLoadingModal').subscribe(response => {
|
|
@@ -16,4 +14,3 @@ function loadingModalSetup(messageBus, legacyControlBus, capabilities, teardowns
|
|
|
16
14
|
teardowns.push(() => subscription.unsubscribe());
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
|
-
exports.default = loadingModalSetup;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const resolveFeature_1 = require("../private-helpers/resolveFeature");
|
|
4
|
-
function logToServerSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
2
|
+
export default function logToServerSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
5
3
|
if (legacyControlBus.logToServer) {
|
|
6
4
|
capabilities.add('logToServer');
|
|
7
5
|
const subscription = messageBus.onMessage('logToServer').subscribe(async (message) => {
|
|
8
|
-
const moduleId = await
|
|
6
|
+
const moduleId = await getPathResolutionInfo(message.value.moduleId.split('.'), legacyControlBus.dynamicConfigFetch).then(resolvedInfo => resolvedInfo.featureName);
|
|
9
7
|
legacyControlBus.logToServer(moduleId, message.value.message, message.value.level || 'info');
|
|
10
8
|
});
|
|
11
9
|
teardowns.push(() => subscription.unsubscribe());
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
|
-
exports.default = logToServerSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function manageChangesSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function manageChangesSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.manageChanges) {
|
|
5
3
|
capabilities.add('manageChanges');
|
|
6
4
|
const subscription = messageBus.sendResponse('manageChanges', messageBody => {
|
|
@@ -9,4 +7,3 @@ function manageChangesSetup(messageBus, legacyControlBus, capabilities, teardown
|
|
|
9
7
|
teardowns.push(() => subscription.unsubscribe());
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
exports.default = manageChangesSetup;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const resolveFeature_1 = require("../private-helpers/resolveFeature");
|
|
5
|
-
function navigateToSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import getNavigationData from '../utility/getNavigationData.js';
|
|
2
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
3
|
+
export default function navigateToSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
6
4
|
if (legacyControlBus.navigateTo) {
|
|
7
5
|
capabilities.add('navigateTo');
|
|
8
6
|
const subscription = messageBus
|
|
@@ -11,11 +9,11 @@ function navigateToSetup(messageBus, tectonConfig$, legacyControlBus, capabiliti
|
|
|
11
9
|
const { moduleName, urlParams, queryParams, moduleId } = response.value;
|
|
12
10
|
let { featureName } = response.value;
|
|
13
11
|
if (!featureName && moduleId) {
|
|
14
|
-
featureName = await
|
|
12
|
+
featureName = await getPathResolutionInfo(moduleId.split('.'), legacyControlBus.dynamicConfigFetch).then(info => {
|
|
15
13
|
return info.featureName;
|
|
16
14
|
});
|
|
17
15
|
}
|
|
18
|
-
const navData = (
|
|
16
|
+
const navData = getNavigationData(tectonConfig$, featureName, moduleName);
|
|
19
17
|
navData.map(navData => {
|
|
20
18
|
if (!navData.navigable) {
|
|
21
19
|
return;
|
|
@@ -40,4 +38,3 @@ function navigateToSetup(messageBus, tectonConfig$, legacyControlBus, capabiliti
|
|
|
40
38
|
teardowns.push(() => subscription.unsubscribe());
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
|
-
exports.default = navigateToSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function openURLSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function openURLSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.openURL) {
|
|
5
3
|
capabilities.add('openURL');
|
|
6
4
|
const sub = messageBus
|
|
@@ -12,4 +10,3 @@ function openURLSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
|
12
10
|
teardowns.push(() => sub.unsubscribe());
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
|
-
exports.default = openURLSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function printWindowSetup(messageBus, teardowns) {
|
|
1
|
+
export default function printWindowSetup(messageBus, teardowns) {
|
|
4
2
|
const subscriptions = messageBus.onMessage('printWindow').subscribe(() => {
|
|
5
3
|
var _a;
|
|
6
4
|
const inMobileApp = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.inMobileApp;
|
|
@@ -14,4 +12,3 @@ function printWindowSetup(messageBus, teardowns) {
|
|
|
14
12
|
});
|
|
15
13
|
teardowns.push(() => subscriptions.unsubscribe());
|
|
16
14
|
}
|
|
17
|
-
exports.default = printWindowSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function refetchAccountsSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function refetchAccountsSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.refetchAccountsNotification &&
|
|
5
3
|
legacyControlBus.clearCacheByPrefix &&
|
|
6
4
|
legacyControlBus.clearTransferCache) {
|
|
@@ -13,4 +11,3 @@ function refetchAccountsSetup(messageBus, legacyControlBus, capabilities, teardo
|
|
|
13
11
|
teardowns.push(() => subscription.unsubscribe());
|
|
14
12
|
}
|
|
15
13
|
}
|
|
16
|
-
exports.default = refetchAccountsSetup;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const maybe_not_1 = require("maybe-not");
|
|
5
|
-
function scrollToSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { sendBroadcast } from '../utility/message-bus.js';
|
|
2
|
+
import { Maybe } from 'maybe-not';
|
|
3
|
+
export default function scrollToSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
6
4
|
capabilities.add('scrollTo');
|
|
7
5
|
const subscriptions = messageBus.onMessage('scrollTo').subscribe(message => {
|
|
8
6
|
var _a, _b;
|
|
@@ -10,7 +8,7 @@ function scrollToSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
|
10
8
|
const scrollOptions = message.value;
|
|
11
9
|
scrollOptions.behavior = scrollOptions.behavior || 'smooth';
|
|
12
10
|
if (scrollOptions.initialize === true) {
|
|
13
|
-
|
|
11
|
+
sendBroadcast('platformScrollChanged', Maybe.just(JSON.stringify({
|
|
14
12
|
scrollY: 0,
|
|
15
13
|
innerHeight: window.innerHeight,
|
|
16
14
|
innerWidth: window.innerWidth,
|
|
@@ -24,4 +22,3 @@ function scrollToSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
|
24
22
|
});
|
|
25
23
|
teardowns.push(() => subscriptions.unsubscribe());
|
|
26
24
|
}
|
|
27
|
-
exports.default = scrollToSetup;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function scrollToTopSetup(messageBus, capabilities, teardowns) {
|
|
1
|
+
export default function scrollToTopSetup(messageBus, capabilities, teardowns) {
|
|
4
2
|
capabilities.add('scrollToTop');
|
|
5
3
|
const subscriptions = messageBus.onMessage('scrollToTop').subscribe(() => {
|
|
6
4
|
window.scrollTo(0, 0);
|
|
7
5
|
});
|
|
8
6
|
teardowns.push(() => subscriptions.unsubscribe());
|
|
9
7
|
}
|
|
10
|
-
exports.default = scrollToTopSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function sendAlertSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function sendAlertSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.sendAlert || legacyControlBus.showAlert) {
|
|
5
3
|
capabilities.add('sendAlert');
|
|
6
4
|
capabilities.add('sendAlertWithResponse');
|
|
@@ -24,4 +22,3 @@ function sendAlertSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
|
24
22
|
});
|
|
25
23
|
}
|
|
26
24
|
}
|
|
27
|
-
exports.default = sendAlertSetup;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const resolveFeature_1 = require("../private-helpers/resolveFeature");
|
|
4
|
-
function setParamsSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
2
|
+
export default function setParamsSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
5
3
|
if (legacyControlBus.updateParams) {
|
|
6
4
|
capabilities.add('setParams');
|
|
7
5
|
const subscription = messageBus
|
|
8
6
|
.onMessage('setParams')
|
|
9
7
|
.subscribe(async (message) => {
|
|
10
8
|
const { moduleId, params } = message.value;
|
|
11
|
-
const resolvedInfo = await
|
|
9
|
+
const resolvedInfo = await getPathResolutionInfo(moduleId.split('.'), legacyControlBus.dynamicConfigFetch);
|
|
12
10
|
const paramsObject = await legacyControlBus
|
|
13
11
|
.dynamicConfigFetch(resolvedInfo.featureName)
|
|
14
12
|
.then(x => x.modules[resolvedInfo.moduleName].meta.params);
|
|
@@ -17,4 +15,3 @@ function setParamsSetup(messageBus, tectonConfig$, legacyControlBus, capabilitie
|
|
|
17
15
|
teardowns.push(() => subscription.unsubscribe());
|
|
18
16
|
}
|
|
19
17
|
}
|
|
20
|
-
exports.default = setParamsSetup;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const resolveFeature_1 = require("../private-helpers/resolveFeature");
|
|
4
|
-
function setTitleSetup(messageBus, legacyControlBus, tectonConfig$, capabilities, teardowns) {
|
|
1
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
2
|
+
export default function setTitleSetup(messageBus, legacyControlBus, tectonConfig$, capabilities, teardowns) {
|
|
5
3
|
if (legacyControlBus.setOverpanelTitle || legacyControlBus.setPageTitle) {
|
|
6
4
|
if (legacyControlBus.setOverpanelTitle) {
|
|
7
5
|
capabilities.add('setOverpanelTitle');
|
|
@@ -12,7 +10,7 @@ function setTitleSetup(messageBus, legacyControlBus, tectonConfig$, capabilities
|
|
|
12
10
|
const subscription = messageBus
|
|
13
11
|
.onMessage('setTitle')
|
|
14
12
|
.subscribe(async (response) => {
|
|
15
|
-
const pathOrigin = await
|
|
13
|
+
const pathOrigin = await getPathResolutionInfo(response.value.moduleId.split('.'), legacyControlBus.dynamicConfigFetch).then(x => x.pathOrigin);
|
|
16
14
|
if (pathOrigin === 'tectonOverpanel' && legacyControlBus.setOverpanelTitle) {
|
|
17
15
|
legacyControlBus.setOverpanelTitle(response.value.title);
|
|
18
16
|
}
|
|
@@ -23,4 +21,3 @@ function setTitleSetup(messageBus, legacyControlBus, tectonConfig$, capabilities
|
|
|
23
21
|
teardowns.push(() => subscription.unsubscribe());
|
|
24
22
|
}
|
|
25
23
|
}
|
|
26
|
-
exports.default = setTitleSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function showActionSheetSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function showActionSheetSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.showActionSheet) {
|
|
5
3
|
capabilities.add('showActionSheet');
|
|
6
4
|
const subscription = messageBus.sendResponse('showActionSheet', actionSheetData => {
|
|
@@ -9,4 +7,3 @@ function showActionSheetSetup(messageBus, tectonConfig$, legacyControlBus, capab
|
|
|
9
7
|
teardowns.push(() => subscription.unsubscribe());
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
exports.default = showActionSheetSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function showModalSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function showModalSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.showModal) {
|
|
5
3
|
capabilities.add('sendModal');
|
|
6
4
|
const subscription = messageBus.sendResponse('sendModal', modalOptions => {
|
|
@@ -11,4 +9,3 @@ function showModalSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
|
11
9
|
teardowns.push(() => subscription.unsubscribe());
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
|
-
exports.default = showModalSetup;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const validateActionParameters_1 = require("../utility/validateActionParameters");
|
|
5
|
-
const filterPublicOverpanels_1 = require("../utility/filterPublicOverpanels");
|
|
1
|
+
import { getPathResolutionInfo } from '../private-helpers/resolveFeature.js';
|
|
2
|
+
import validateActionParameters from '../utility/validateActionParameters.js';
|
|
3
|
+
import filterPublicOverpanels from '../utility/filterPublicOverpanels.js';
|
|
6
4
|
/**
|
|
7
5
|
* Setup the showOverpanel API
|
|
8
6
|
*
|
|
@@ -14,7 +12,7 @@ const filterPublicOverpanels_1 = require("../utility/filterPublicOverpanels");
|
|
|
14
12
|
* useRouteConfig is for contextual menu cases
|
|
15
13
|
* legacy is for overpanels that are not in an extension
|
|
16
14
|
*/
|
|
17
|
-
function showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
15
|
+
export default function showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabilities, teardowns) {
|
|
18
16
|
if (legacyControlBus.showOverpanel) {
|
|
19
17
|
capabilities.add('showOverpanel');
|
|
20
18
|
const subscription = messageBus.sendResponse('showOverpanel', async (messageBody) => {
|
|
@@ -52,7 +50,7 @@ function showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabil
|
|
|
52
50
|
};
|
|
53
51
|
}
|
|
54
52
|
else {
|
|
55
|
-
const publicOverpanels = (
|
|
53
|
+
const publicOverpanels = filterPublicOverpanels(tectonConfig$.value);
|
|
56
54
|
const publicOverpanelConfig = publicOverpanels[messageBody.overpanelPath];
|
|
57
55
|
let resolvedInfo;
|
|
58
56
|
/*
|
|
@@ -70,7 +68,7 @@ function showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabil
|
|
|
70
68
|
Look for configuredOverpanels in the current feature
|
|
71
69
|
If no overpanel is found by this step, throw an error
|
|
72
70
|
*/
|
|
73
|
-
resolvedInfo = await
|
|
71
|
+
resolvedInfo = await getPathResolutionInfo(messageBody.moduleId.split('.'), legacyControlBus.dynamicConfigFetch);
|
|
74
72
|
overpanelConfig = await legacyControlBus
|
|
75
73
|
.dynamicConfigFetch(resolvedInfo.featureName)
|
|
76
74
|
.then(feature => {
|
|
@@ -91,7 +89,7 @@ function showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabil
|
|
|
91
89
|
if (messageBody.params && legacyControlBus.updateParams && !featureConfig.legacy) {
|
|
92
90
|
const actionParameters = (_c = (_b = (_a = featureConfig.modules) === null || _a === void 0 ? void 0 : _a[overpanelConfig.moduleName]) === null || _b === void 0 ? void 0 : _b.meta) === null || _c === void 0 ? void 0 : _c.params;
|
|
93
91
|
if (actionParameters) {
|
|
94
|
-
(
|
|
92
|
+
validateActionParameters(messageBody.params, actionParameters);
|
|
95
93
|
legacyControlBus.updateParams(`tectonOverpanel.${overpanelConfigPath}`, messageBody.params, actionParameters);
|
|
96
94
|
}
|
|
97
95
|
}
|
|
@@ -117,4 +115,3 @@ function showOverpanelSetup(messageBus, tectonConfig$, legacyControlBus, capabil
|
|
|
117
115
|
teardowns.push(() => subscription.unsubscribe());
|
|
118
116
|
}
|
|
119
117
|
}
|
|
120
|
-
exports.default = showOverpanelSetup;
|
package/dist/esm/actions/t.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const rxjs_1 = require("rxjs");
|
|
5
|
-
const maybe_not_1 = require("maybe-not");
|
|
1
|
+
import { sendBroadcast } from '../utility/message-bus.js';
|
|
2
|
+
import { BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { Maybe } from 'maybe-not';
|
|
6
4
|
// TODO: This should probably be a source, not an action
|
|
7
|
-
function setupTectonLanguage(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
5
|
+
export default function setupTectonLanguage(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
8
6
|
const language = legacyControlBus.getCurrentLanguage();
|
|
9
|
-
const currentLanguage$ = new
|
|
7
|
+
const currentLanguage$ = new BehaviorSubject(language);
|
|
10
8
|
let active = true; // Flag to prevent callback from executing after teardown
|
|
11
9
|
if (legacyControlBus.languageChanged) {
|
|
12
10
|
capabilities.add('languageChanged');
|
|
@@ -17,7 +15,7 @@ function setupTectonLanguage(messageBus, legacyControlBus, capabilities, teardow
|
|
|
17
15
|
});
|
|
18
16
|
}
|
|
19
17
|
const currentLanguageSubscription = currentLanguage$.subscribe((langKey = 'en-US') => {
|
|
20
|
-
|
|
18
|
+
sendBroadcast('streamLanguage', Maybe.just(JSON.stringify({ langKey })));
|
|
21
19
|
});
|
|
22
20
|
const currentLanguageResponseSubscription = messageBus.sendResponse('getCurrentLanguage', () => {
|
|
23
21
|
return Promise.resolve({ langKey: currentLanguage$.getValue() });
|
|
@@ -31,4 +29,3 @@ function setupTectonLanguage(messageBus, legacyControlBus, capabilities, teardow
|
|
|
31
29
|
currentLanguage$.complete();
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
|
-
exports.default = setupTectonLanguage;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function verifyMFASetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function verifyMFASetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.verifyMFA) {
|
|
5
3
|
capabilities.add('verifyMFA');
|
|
6
4
|
const subscription = messageBus.sendResponse('verifyMFA', async (options) => {
|
|
@@ -9,4 +7,3 @@ function verifyMFASetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
|
9
7
|
teardowns.push(() => subscription.unsubscribe());
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
exports.default = verifyMFASetup;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.init = void 0;
|
|
4
|
-
var setup_1 = require("./setup");
|
|
5
|
-
Object.defineProperty(exports, "init", { enumerable: true, get: function () { return setup_1.init; } });
|
|
1
|
+
export { init } from './setup/index.js';
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const platform_outlet_1 = require("./platform-outlet");
|
|
4
|
-
const tecton_outlet_base_1 = require("q2-tecton-common/lib/outlets/tecton-outlet-base");
|
|
1
|
+
import { tectonPlatformOutletObservedAttrs, loadTectonPlatformOutlet } from './platform-outlet.js';
|
|
2
|
+
import { setupTectonElement } from 'q2-tecton-common/lib/outlets/tecton-outlet-base';
|
|
5
3
|
/**
|
|
6
4
|
* Sets up the Tecton platform outlets by initializing a Tecton element with the provided configuration.
|
|
7
5
|
*
|
|
@@ -13,12 +11,11 @@ const tecton_outlet_base_1 = require("q2-tecton-common/lib/outlets/tecton-outlet
|
|
|
13
11
|
*
|
|
14
12
|
* @returns void
|
|
15
13
|
*/
|
|
16
|
-
function setupOutlets(messageBus, tectonConfig$, params$, legacyControlBus, contextHierarchy = {}) {
|
|
17
|
-
|
|
14
|
+
export default function setupOutlets(messageBus, tectonConfig$, params$, legacyControlBus, contextHierarchy = {}) {
|
|
15
|
+
setupTectonElement({
|
|
18
16
|
messageBus,
|
|
19
17
|
moduleId: '',
|
|
20
|
-
props:
|
|
21
|
-
tectonOutletAdaptor:
|
|
18
|
+
props: tectonPlatformOutletObservedAttrs,
|
|
19
|
+
tectonOutletAdaptor: loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, contextHierarchy),
|
|
22
20
|
})('tecton-platform-outlet');
|
|
23
21
|
}
|
|
24
|
-
exports.default = setupOutlets;
|