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,18 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const maybe_not_1 = require("maybe-not");
|
|
9
|
-
const getModuleParams_1 = require("../private-helpers/getModuleParams");
|
|
10
|
-
const contextResolver_1 = require("../private-helpers/contextResolver");
|
|
1
|
+
import { buildLoaders, setupOutletIFrameWrapper, setupOutletIFrameLoading, setupOutletIFrameResizer, setupOutletSetTitleListener, setupOutletInfo, getBaseClass, isBeta, } from 'q2-tecton-common/lib/outlets/tecton-outlet-base';
|
|
2
|
+
import { sendMessage } from 'q2-tecton-common/lib/utility/message-bus';
|
|
3
|
+
import { BehaviorSubject, combineLatest, Subscription, map, filter, distinctUntilChanged, pairwise } from 'rxjs';
|
|
4
|
+
import addParamToURL from 'q2-tecton-common/lib/utility/addParamToURL';
|
|
5
|
+
import { Maybe } from 'maybe-not';
|
|
6
|
+
import getModuleParams from '../private-helpers/getModuleParams.js';
|
|
7
|
+
import { validateContext } from '../private-helpers/contextResolver.js';
|
|
11
8
|
/**
|
|
12
9
|
* Determines if an outlet should be displayed based on rights, context validation,
|
|
13
10
|
* and authentication requirements
|
|
14
11
|
*/
|
|
15
|
-
function shouldDisplayOutlet(module, feature, memorizedProps, contextHierarchy) {
|
|
12
|
+
export function shouldDisplayOutlet(module, feature, memorizedProps, contextHierarchy) {
|
|
16
13
|
var _a, _b, _c, _d;
|
|
17
14
|
const isMFA = feature.isMFA;
|
|
18
15
|
const isRightsEnabled = module.rightsEnabled !== false;
|
|
@@ -23,7 +20,7 @@ function shouldDisplayOutlet(module, feature, memorizedProps, contextHierarchy)
|
|
|
23
20
|
if (!isRightsEnabled) {
|
|
24
21
|
return false;
|
|
25
22
|
}
|
|
26
|
-
return
|
|
23
|
+
return validateContext({
|
|
27
24
|
additionalContext: memorizedProps.additionalContext,
|
|
28
25
|
additionalContextRequirements: module.additionalContextRequirements,
|
|
29
26
|
contextValue: memorizedProps.contextValue,
|
|
@@ -32,31 +29,29 @@ function shouldDisplayOutlet(module, feature, memorizedProps, contextHierarchy)
|
|
|
32
29
|
resolvedContext: memorizedProps.resolvedType,
|
|
33
30
|
}, contextHierarchy);
|
|
34
31
|
}
|
|
35
|
-
exports.shouldDisplayOutlet = shouldDisplayOutlet;
|
|
36
32
|
/**
|
|
37
33
|
* Builds the iframe source URL with all necessary parameters
|
|
38
34
|
*/
|
|
39
|
-
function buildIframeSrc(urlFromConfig, moduleId, memorizedProps, platformOutletElement, params, formPostAuth, legacyControlBus) {
|
|
35
|
+
export function buildIframeSrc(urlFromConfig, moduleId, memorizedProps, platformOutletElement, params, formPostAuth, legacyControlBus) {
|
|
40
36
|
const urlBeforeParams = formPostAuth && legacyControlBus.buildIframeURL
|
|
41
37
|
? legacyControlBus.buildIframeURL(urlFromConfig)
|
|
42
38
|
: urlFromConfig;
|
|
43
|
-
let iframeSrc = (
|
|
44
|
-
if (
|
|
45
|
-
iframeSrc = (
|
|
39
|
+
let iframeSrc = addParamToURL(urlBeforeParams, Object.assign(Object.assign({ 'tct-id': moduleId, 'tct-ctxid': memorizedProps.contextValue || '', 'tct-ctxname': memorizedProps.contextId || '' }, getModuleParams(moduleId, params.currentParams)), { 'tct-maxHeight': platformOutletElement.style.maxHeight, 'tct-maxWidth': platformOutletElement.style.maxWidth, 'tct-baseClass': getBaseClass(platformOutletElement), 'tct-outlet-name': platformOutletElement.name || '' }));
|
|
40
|
+
if (isBeta(platformOutletElement)) {
|
|
41
|
+
iframeSrc = addParamToURL(iframeSrc, { 'tct-beta': 'true' });
|
|
46
42
|
}
|
|
47
43
|
return iframeSrc;
|
|
48
44
|
}
|
|
49
|
-
exports.buildIframeSrc = buildIframeSrc;
|
|
50
45
|
/**
|
|
51
46
|
* Creates a loading wrapper element with loaders based on module configuration
|
|
52
47
|
*/
|
|
53
|
-
function createLoadingWrapper(module, minHeight) {
|
|
48
|
+
export function createLoadingWrapper(module, minHeight) {
|
|
54
49
|
var _a, _b, _c;
|
|
55
50
|
const loaderWrapper = document.createElement('div');
|
|
56
51
|
loaderWrapper.slot = 'loading-wrapper';
|
|
57
52
|
loaderWrapper.classList.add('loading-wrapper');
|
|
58
53
|
loaderWrapper.setAttribute('data-tecton-module', '');
|
|
59
|
-
const loaders = module.loadingOptions ?
|
|
54
|
+
const loaders = module.loadingOptions ? buildLoaders(module.loadingOptions) : buildLoaders();
|
|
60
55
|
if ((_a = module.loadingOptions) === null || _a === void 0 ? void 0 : _a.outlet) {
|
|
61
56
|
const outlet = module.loadingOptions.outlet;
|
|
62
57
|
if (outlet.style)
|
|
@@ -81,8 +76,7 @@ function createLoadingWrapper(module, minHeight) {
|
|
|
81
76
|
}
|
|
82
77
|
return loaderWrapper;
|
|
83
78
|
}
|
|
84
|
-
|
|
85
|
-
exports.tectonPlatformOutletObservedAttrs = [
|
|
79
|
+
export const tectonPlatformOutletObservedAttrs = [
|
|
86
80
|
{ name: 'additionalContext', reflectAs: String },
|
|
87
81
|
{ name: 'configTree' },
|
|
88
82
|
{ name: 'context', reflectAs: String },
|
|
@@ -91,12 +85,12 @@ exports.tectonPlatformOutletObservedAttrs = [
|
|
|
91
85
|
{ name: 'resolvedType', reflectAs: String },
|
|
92
86
|
{ name: 'routeName' },
|
|
93
87
|
];
|
|
94
|
-
function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, contextHierarchy) {
|
|
88
|
+
export function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, contextHierarchy) {
|
|
95
89
|
return function tectonPlatformOutlet(messageBus, outletPath, platformOutletElement, memorizedProps$) {
|
|
96
90
|
const placeholder = document.createElement('div');
|
|
97
|
-
const DOM$ = new
|
|
98
|
-
const settled$ = new
|
|
99
|
-
const effect$ = new
|
|
91
|
+
const DOM$ = new BehaviorSubject(placeholder);
|
|
92
|
+
const settled$ = new BehaviorSubject(false);
|
|
93
|
+
const effect$ = new BehaviorSubject(() => {
|
|
100
94
|
return;
|
|
101
95
|
});
|
|
102
96
|
const getContent = function () {
|
|
@@ -117,10 +111,10 @@ function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, cont
|
|
|
117
111
|
const getShadowRoot = function () {
|
|
118
112
|
return platformOutletElement.shadowRoot;
|
|
119
113
|
};
|
|
120
|
-
const loadingSubscription =
|
|
121
|
-
const outletInfoSubscription =
|
|
114
|
+
const loadingSubscription = setupOutletIFrameLoading(messageBus, getModuleId, getContent, getModuleLoadingOptions, getShadowRoot);
|
|
115
|
+
const outletInfoSubscription = setupOutletInfo(messageBus, getModuleId, getContent);
|
|
122
116
|
// Use Subscription to accumulate all cleanup, preventing memory leaks
|
|
123
|
-
const teardownsSubscription = new
|
|
117
|
+
const teardownsSubscription = new Subscription();
|
|
124
118
|
teardownsSubscription.add(loadingSubscription);
|
|
125
119
|
teardownsSubscription.add(outletInfoSubscription);
|
|
126
120
|
// Add BehaviorSubject cleanup - must call .complete() separately from .unsubscribe()
|
|
@@ -134,28 +128,28 @@ function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, cont
|
|
|
134
128
|
settled$.complete();
|
|
135
129
|
});
|
|
136
130
|
// Wrapper BehaviorSubject for parent compatibility - parent expects BehaviorSubject<Teardown>
|
|
137
|
-
const teardown$ = new
|
|
131
|
+
const teardown$ = new BehaviorSubject(() => {
|
|
138
132
|
teardown$.complete();
|
|
139
133
|
teardownsSubscription.unsubscribe();
|
|
140
134
|
});
|
|
141
|
-
const configTree$ = memorizedProps$.pipe(
|
|
142
|
-
const isOverpanel$ = new
|
|
135
|
+
const configTree$ = memorizedProps$.pipe(map(props => props.configTree), filter(configTree => !!configTree), distinctUntilChanged());
|
|
136
|
+
const isOverpanel$ = new BehaviorSubject(false);
|
|
143
137
|
const overpanelSubscription = memorizedProps$
|
|
144
|
-
.pipe(
|
|
138
|
+
.pipe(map(props => props.overpanel), filter(overpanel => typeof overpanel === 'boolean'), distinctUntilChanged())
|
|
145
139
|
.subscribe(isOverpanel$);
|
|
146
140
|
teardownsSubscription.add(overpanelSubscription);
|
|
147
141
|
// Add isOverpanel$ cleanup (primitive, just complete)
|
|
148
142
|
teardownsSubscription.add(() => {
|
|
149
143
|
isOverpanel$.complete();
|
|
150
144
|
});
|
|
151
|
-
const routeName$ = memorizedProps$.pipe(
|
|
145
|
+
const routeName$ = memorizedProps$.pipe(map(props => props.routeName), filter(routeName => !!routeName), distinctUntilChanged());
|
|
152
146
|
const moduleIdChangeSubscription = routeName$
|
|
153
|
-
.pipe(
|
|
147
|
+
.pipe(map(routeName => `${outletPath}.${routeName}`), pairwise())
|
|
154
148
|
.subscribe(([oldModuleId]) => {
|
|
155
|
-
|
|
149
|
+
sendMessage('clearParams', Maybe.just(JSON.stringify({ moduleId: oldModuleId })));
|
|
156
150
|
});
|
|
157
151
|
teardownsSubscription.add(moduleIdChangeSubscription);
|
|
158
|
-
const outletDataSubscription =
|
|
152
|
+
const outletDataSubscription = combineLatest(configTree$, isOverpanel$, routeName$).subscribe(([configTree, isOverpanel, routeName]) => {
|
|
159
153
|
const tectonConfig = tectonConfig$.getValue();
|
|
160
154
|
const feature = tectonConfig.features[configTree.featureName];
|
|
161
155
|
if (!feature) {
|
|
@@ -175,12 +169,12 @@ function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, cont
|
|
|
175
169
|
const allowDirectives = featureConfig.allowDirectives;
|
|
176
170
|
const iframeSrc = buildIframeSrc(urlFromConfig, moduleId, memorizedProps, platformOutletElement, params$.getValue(), formPostAuth, legacyControlBus);
|
|
177
171
|
if (!isOverpanel) {
|
|
178
|
-
const resizerSubscription =
|
|
172
|
+
const resizerSubscription = setupOutletIFrameResizer(messageBus, getModuleId, getContent);
|
|
179
173
|
teardownsSubscription.add(resizerSubscription);
|
|
180
174
|
}
|
|
181
|
-
const titleSubscription =
|
|
175
|
+
const titleSubscription = setupOutletSetTitleListener(messageBus, getModuleId, getContent);
|
|
182
176
|
teardownsSubscription.add(titleSubscription);
|
|
183
|
-
const { element: outletDOM, cleanup: iframeCleanup } =
|
|
177
|
+
const { element: outletDOM, cleanup: iframeCleanup } = setupOutletIFrameWrapper(iframeSrc, moduleId, legacyControlBus.getAuthPayload ? legacyControlBus.getAuthPayload() : [], `${configTree.featureName}-${configTree.moduleName}`, platformOutletElement.style.maxHeight, platformOutletElement.style.maxWidth, isOverpanel, formPostAuth, additionalDomains, allowDirectives);
|
|
184
178
|
const loaderWrapper = createLoadingWrapper(module, minHeight);
|
|
185
179
|
DOM$.next(outletDOM);
|
|
186
180
|
effect$.next(() => {
|
|
@@ -198,7 +192,7 @@ function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, cont
|
|
|
198
192
|
});
|
|
199
193
|
teardownsSubscription.add(() => {
|
|
200
194
|
iframeCleanup();
|
|
201
|
-
|
|
195
|
+
sendMessage('clearParams', Maybe.just(JSON.stringify({ moduleId })));
|
|
202
196
|
});
|
|
203
197
|
}
|
|
204
198
|
});
|
|
@@ -211,4 +205,3 @@ function loadTectonPlatformOutlet(tectonConfig$, params$, legacyControlBus, cont
|
|
|
211
205
|
};
|
|
212
206
|
};
|
|
213
207
|
}
|
|
214
|
-
exports.loadTectonPlatformOutlet = loadTectonPlatformOutlet;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const resolveFeature_1 = require("./resolveFeature");
|
|
5
|
-
exports.NGAM_BASE = `${window.location.origin}${window.location.pathname.replace(/\/uux\.aspx/i, '')}`;
|
|
6
|
-
function setupPathResolvers(messageBus, capabilities, legacyControlBus, tectonConfig$, teardowns) {
|
|
1
|
+
import { getPathResolutionInfo } from './resolveFeature.js';
|
|
2
|
+
export const NGAM_BASE = `${window.location.origin}${window.location.pathname.replace(/\/uux\.aspx/i, '')}`;
|
|
3
|
+
export function setupPathResolvers(messageBus, capabilities, legacyControlBus, tectonConfig$, teardowns) {
|
|
7
4
|
let customLanguagePathSubscription;
|
|
8
5
|
const customerAssetPathSubscription = messageBus.sendResponse('getCustomerAssetPath', ({ subPath }) => {
|
|
9
6
|
return Promise.resolve({
|
|
@@ -13,7 +10,7 @@ function setupPathResolvers(messageBus, capabilities, legacyControlBus, tectonCo
|
|
|
13
10
|
if (legacyControlBus.getCustomLanguageURL) {
|
|
14
11
|
capabilities.add('getCustomLanguageURL');
|
|
15
12
|
customLanguagePathSubscription = messageBus.sendResponse('getCustomLanguageURL', async ({ moduleId, langKey }) => {
|
|
16
|
-
const moduleInfo = await
|
|
13
|
+
const moduleInfo = await getPathResolutionInfo(moduleId.split('.'), legacyControlBus.dynamicConfigFetch);
|
|
17
14
|
return Promise.resolve({
|
|
18
15
|
path: ifRelativePrependOrigin(legacyControlBus.getCustomLanguageURL(`${langKey}_${moduleInfo.featureName}.json`)),
|
|
19
16
|
});
|
|
@@ -25,7 +22,7 @@ function setupPathResolvers(messageBus, capabilities, legacyControlBus, tectonCo
|
|
|
25
22
|
});
|
|
26
23
|
});
|
|
27
24
|
const getNgamBaseURL = messageBus.sendResponse('getNgamBaseUrl', () => {
|
|
28
|
-
return Promise.resolve({ ngamBase:
|
|
25
|
+
return Promise.resolve({ ngamBase: NGAM_BASE });
|
|
29
26
|
});
|
|
30
27
|
teardowns.push(() => {
|
|
31
28
|
customerAssetPathSubscription.unsubscribe();
|
|
@@ -36,8 +33,6 @@ function setupPathResolvers(messageBus, capabilities, legacyControlBus, tectonCo
|
|
|
36
33
|
}
|
|
37
34
|
});
|
|
38
35
|
}
|
|
39
|
-
|
|
40
|
-
function ifRelativePrependOrigin(url) {
|
|
36
|
+
export function ifRelativePrependOrigin(url) {
|
|
41
37
|
return /^http/.test(url) ? url : `${window.location.origin}/${url}`;
|
|
42
38
|
}
|
|
43
|
-
exports.ifRelativePrependOrigin = ifRelativePrependOrigin;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function cdnOverrideSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function cdnOverrideSetup(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.cdnOverride) {
|
|
5
3
|
capabilities.add('cdnOverride');
|
|
6
4
|
const subscription = messageBus.sendResponse('cdnOverride', () => {
|
|
@@ -11,4 +9,3 @@ function cdnOverrideSetup(messageBus, legacyControlBus, capabilities, teardowns)
|
|
|
11
9
|
teardowns.push(() => subscription.unsubscribe());
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
|
-
exports.default = cdnOverrideSetup;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateContext = exports.getContextHierarchyPath = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Recursively searches for a node in the hierarchy and returns the path from leaf to root
|
|
6
3
|
*
|
|
@@ -33,7 +30,7 @@ function findPathToRoot(targetNode, currentNode, currentPath = []) {
|
|
|
33
30
|
* @param contextHierarchy - The hierarchical structure to navigate
|
|
34
31
|
* @returns Array of context strings ordered from most specific to most general, or empty array if context not found
|
|
35
32
|
*/
|
|
36
|
-
function getContextHierarchyPath(contextString, contextHierarchy) {
|
|
33
|
+
export function getContextHierarchyPath(contextString, contextHierarchy) {
|
|
37
34
|
if (!contextString || typeof contextString !== 'string') {
|
|
38
35
|
return [];
|
|
39
36
|
}
|
|
@@ -48,7 +45,6 @@ function getContextHierarchyPath(contextString, contextHierarchy) {
|
|
|
48
45
|
const pathToRoot = findPathToRoot(dataType, categoryNode);
|
|
49
46
|
return pathToRoot.map(type => `${category}::${type}`);
|
|
50
47
|
}
|
|
51
|
-
exports.getContextHierarchyPath = getContextHierarchyPath;
|
|
52
48
|
/**
|
|
53
49
|
* Validates whether a resolved context is a valid subtype of a context rule
|
|
54
50
|
*
|
|
@@ -58,7 +54,7 @@ exports.getContextHierarchyPath = getContextHierarchyPath;
|
|
|
58
54
|
* @param params.resolvedContext - The resolved context to validate
|
|
59
55
|
* @returns True if resolvedContext is a valid subtype of moduleContext, or if moduleContext is unrestricted
|
|
60
56
|
*/
|
|
61
|
-
function validateContext(params, contextHierarchy) {
|
|
57
|
+
export function validateContext(params, contextHierarchy) {
|
|
62
58
|
const { outletContext, moduleContext, resolvedContext, additionalContext, additionalContextRequirements } = params;
|
|
63
59
|
if ((additionalContextRequirements === null || additionalContextRequirements === void 0 ? void 0 : additionalContextRequirements.length) &&
|
|
64
60
|
additionalContext &&
|
|
@@ -74,4 +70,3 @@ function validateContext(params, contextHierarchy) {
|
|
|
74
70
|
}
|
|
75
71
|
return hierarchyPath.includes(resolvedContext || outletContext);
|
|
76
72
|
}
|
|
77
|
-
exports.validateContext = validateContext;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getApplicationModules = void 0;
|
|
4
|
-
function getApplicationModules(tectonConfig) {
|
|
1
|
+
export function getApplicationModules(tectonConfig) {
|
|
5
2
|
var _a, _b, _c;
|
|
6
3
|
const applicationModuleContext = 'Application::';
|
|
7
4
|
const applicationModules = {};
|
|
@@ -26,4 +23,3 @@ function getApplicationModules(tectonConfig) {
|
|
|
26
23
|
}
|
|
27
24
|
return applicationModules;
|
|
28
25
|
}
|
|
29
|
-
exports.getApplicationModules = getApplicationModules;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function getAuthPayloadSetup(messageBus, legacyControlBus, teardowns) {
|
|
1
|
+
export default function getAuthPayloadSetup(messageBus, legacyControlBus, teardowns) {
|
|
4
2
|
const subscription = messageBus.sendResponse('getAuthPayload', () => {
|
|
5
3
|
return Promise.resolve(legacyControlBus.getAuthPayload());
|
|
6
4
|
});
|
|
7
5
|
teardowns.push(() => subscription.unsubscribe());
|
|
8
6
|
}
|
|
9
|
-
exports.default = getAuthPayloadSetup;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function getModuleParams(moduleId, params = {}) {
|
|
1
|
+
export default function getModuleParams(moduleId, params = {}) {
|
|
4
2
|
return Object.keys(params)
|
|
5
3
|
.filter(item => {
|
|
6
4
|
const lastIndex = item.lastIndexOf('.');
|
|
@@ -14,4 +12,3 @@ function getModuleParams(moduleId, params = {}) {
|
|
|
14
12
|
return accumulator;
|
|
15
13
|
}, Object.create({}));
|
|
16
14
|
}
|
|
17
|
-
exports.default = getModuleParams;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(
|
|
14
|
-
(
|
|
15
|
-
(
|
|
16
|
-
(
|
|
17
|
-
(
|
|
18
|
-
(
|
|
19
|
-
(
|
|
20
|
-
(0, getAuthPayload_1.default)(messageBus, legacyControlBus, teardowns);
|
|
21
|
-
(0, cdnOverrideSetup_1.default)(messageBus, legacyControlBus, capabilities, teardowns);
|
|
1
|
+
import { setupRegisterOutlet } from './setupRegisterOutlet.js';
|
|
2
|
+
import { setupPathResolvers } from './assetPathResolvers.js';
|
|
3
|
+
import setupResolveFeature from './resolveFeature.js';
|
|
4
|
+
import setupResolveTabs from './resolveTabs.js';
|
|
5
|
+
import setupResolveMenu from './resolveMenu.js';
|
|
6
|
+
import platformCapabilitiesSetup from './platformCapabilities.js';
|
|
7
|
+
import getAuthPayload from './getAuthPayload.js';
|
|
8
|
+
import cdnOverrideSetup from './cdnOverrideSetup.js';
|
|
9
|
+
import setupMobileSDKCapabilities from './mobileSDKCapabilities.js';
|
|
10
|
+
export default function setupPrivateHelpers(messageBus, legacyControlBus, params$, tectonConfig$, capabilities, teardowns, contextHierarchy = {}) {
|
|
11
|
+
setupMobileSDKCapabilities(messageBus, legacyControlBus, capabilities, teardowns);
|
|
12
|
+
setupRegisterOutlet(messageBus, params$, teardowns);
|
|
13
|
+
setupPathResolvers(messageBus, capabilities, legacyControlBus, tectonConfig$, teardowns);
|
|
14
|
+
setupResolveFeature(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy);
|
|
15
|
+
setupResolveTabs(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy);
|
|
16
|
+
setupResolveMenu(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy);
|
|
17
|
+
platformCapabilitiesSetup(messageBus, capabilities, teardowns);
|
|
18
|
+
getAuthPayload(messageBus, legacyControlBus, teardowns);
|
|
19
|
+
cdnOverrideSetup(messageBus, legacyControlBus, capabilities, teardowns);
|
|
22
20
|
}
|
|
23
|
-
exports.default = setupPrivateHelpers;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function setupMobileSDKCapabilities(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
1
|
+
export default function setupMobileSDKCapabilities(messageBus, legacyControlBus, capabilities, teardowns) {
|
|
4
2
|
if (legacyControlBus.getMobileSDKCapabilities) {
|
|
5
3
|
capabilities.add('getMobileSDKCapabilities');
|
|
6
4
|
const subscription = messageBus.sendResponse('getMobileSDKCapabilities', () => {
|
|
@@ -9,4 +7,3 @@ function setupMobileSDKCapabilities(messageBus, legacyControlBus, capabilities,
|
|
|
9
7
|
teardowns.push(() => subscription.unsubscribe());
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
|
-
exports.default = setupMobileSDKCapabilities;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function platformCapabilitiesSetup(messageBus, capabilities, teardowns) {
|
|
1
|
+
export default function platformCapabilitiesSetup(messageBus, capabilities, teardowns) {
|
|
4
2
|
const subscription = messageBus.sendResponse('getPlatformCapabilities', () => {
|
|
5
3
|
const platformCapabilities = Array.from(capabilities);
|
|
6
4
|
return Promise.resolve({
|
|
@@ -9,4 +7,3 @@ function platformCapabilitiesSetup(messageBus, capabilities, teardowns) {
|
|
|
9
7
|
});
|
|
10
8
|
teardowns.push(() => subscription.unsubscribe());
|
|
11
9
|
}
|
|
12
|
-
exports.default = platformCapabilitiesSetup;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const getModuleParams_1 = require("./getModuleParams");
|
|
6
|
-
const contextResolver_1 = require("./contextResolver");
|
|
7
|
-
function setupResolveFeature(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy) {
|
|
1
|
+
import { Maybe } from 'maybe-not';
|
|
2
|
+
import getModuleParams from './getModuleParams.js';
|
|
3
|
+
import { getContextHierarchyPath } from './contextResolver.js';
|
|
4
|
+
export default function setupResolveFeature(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy) {
|
|
8
5
|
/**
|
|
9
6
|
* Uses outlet info to get the JSON config for a feature
|
|
10
7
|
* @internal
|
|
@@ -15,16 +12,16 @@ function setupResolveFeature(legacyControlBus, messageBus, tectonConfig$, params
|
|
|
15
12
|
const featureManifest = await legacyControlBus.dynamicConfigFetch(resolvedInfo.featureName);
|
|
16
13
|
const moduleFeatureManifest = featureManifest.modules[resolvedInfo.moduleName];
|
|
17
14
|
const outletType = moduleFeatureManifest.meta.outlets[resolvedInfo.outletName];
|
|
18
|
-
const baseContextM = outletType.context === 'None' ?
|
|
15
|
+
const baseContextM = outletType.context === 'None' ? Maybe.nothing() : Maybe.just(outletType.context);
|
|
19
16
|
const contextValueId = messageBody.contextValue
|
|
20
|
-
?
|
|
21
|
-
:
|
|
17
|
+
? Maybe.just(messageBody.contextValue)
|
|
18
|
+
: Maybe.nothing();
|
|
22
19
|
const providedTypeM = messageBody.resolvedType
|
|
23
|
-
?
|
|
24
|
-
:
|
|
20
|
+
? Maybe.just(messageBody.resolvedType)
|
|
21
|
+
: Maybe.nothing();
|
|
25
22
|
const additionalContextM = messageBody.additionalContext
|
|
26
|
-
?
|
|
27
|
-
:
|
|
23
|
+
? Maybe.just(messageBody.additionalContext)
|
|
24
|
+
: Maybe.nothing();
|
|
28
25
|
const moduleLookups = platformConfig.configuredOutlets[resolvedInfo.outletName];
|
|
29
26
|
const tectonConfig = tectonConfig$.getValue();
|
|
30
27
|
return resolveFeature(legacyControlBus, params$, messageBody.outletPath, baseContextM, contextValueId, moduleLookups, providedTypeM, additionalContextM, tectonConfig, resolvedInfo.featureName, resolvedInfo.moduleName, contextHierarchy).then((featureM) => {
|
|
@@ -49,18 +46,17 @@ function setupResolveFeature(legacyControlBus, messageBus, tectonConfig$, params
|
|
|
49
46
|
});
|
|
50
47
|
teardowns.push(() => subscription.unsubscribe());
|
|
51
48
|
}
|
|
52
|
-
|
|
53
|
-
function resolveFeature(legacyControlBus, params$, outletPath, baseContextM, contextValueIdM, moduleLookups, providedTypeM, additionalContextM, tectonConfig, hostFeatureName, hostModuleName, contextHierarchy = {}) {
|
|
49
|
+
export function resolveFeature(legacyControlBus, params$, outletPath, baseContextM, contextValueIdM, moduleLookups, providedTypeM, additionalContextM, tectonConfig, hostFeatureName, hostModuleName, contextHierarchy = {}) {
|
|
54
50
|
return getTypeValueIfContextual(baseContextM, contextValueIdM, providedTypeM)
|
|
55
51
|
.then(async (valueTypeM) => {
|
|
56
52
|
const modulesFromLookups = await resolveLookups(legacyControlBus.dynamicConfigFetch, moduleLookups);
|
|
57
53
|
const typedResolutionM = valueTypeM
|
|
58
|
-
.map((context) =>
|
|
54
|
+
.map((context) => getContextHierarchyPath(context, contextHierarchy))
|
|
59
55
|
.bind((compatibleTypesByPriority) => findMatchByPriority(modulesFromLookups, compatibleTypesByPriority, additionalContextM));
|
|
60
|
-
const unTypedResolutionM =
|
|
56
|
+
const unTypedResolutionM = Maybe.maybe(modulesFromLookups[0]);
|
|
61
57
|
return valueTypeM
|
|
62
58
|
.map(() => typedResolutionM)
|
|
63
|
-
.altMap(() =>
|
|
59
|
+
.altMap(() => Maybe.just(unTypedResolutionM))
|
|
64
60
|
.bind(val => val);
|
|
65
61
|
})
|
|
66
62
|
.then(async (feature) => {
|
|
@@ -72,7 +68,7 @@ function resolveFeature(legacyControlBus, params$, outletPath, baseContextM, con
|
|
|
72
68
|
const allPermissions = [...new Set([...hostModulePermissions, ...modulePermissions])];
|
|
73
69
|
return {
|
|
74
70
|
moduleId,
|
|
75
|
-
initialParams: (
|
|
71
|
+
initialParams: getModuleParams(moduleId, params$.getValue().currentParams),
|
|
76
72
|
featureName: val.featureName,
|
|
77
73
|
url: val.url,
|
|
78
74
|
minHeight: val.meta.type.minHeight || '',
|
|
@@ -87,19 +83,17 @@ function resolveFeature(legacyControlBus, params$, outletPath, baseContextM, con
|
|
|
87
83
|
});
|
|
88
84
|
});
|
|
89
85
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return maybe_not_1.Maybe.sequence([baseContextM, contextValueIdM])
|
|
86
|
+
export function getTypeValueIfContextual(baseContextM, contextValueIdM, providedTypeM) {
|
|
87
|
+
return Maybe.sequence([baseContextM, contextValueIdM])
|
|
93
88
|
.map(() => {
|
|
94
89
|
const providedType = providedTypeM.withDefault('');
|
|
95
90
|
if (providedType !== '') {
|
|
96
|
-
return Promise.resolve(
|
|
91
|
+
return Promise.resolve(Maybe.just(providedType));
|
|
97
92
|
}
|
|
98
|
-
return Promise.resolve(
|
|
93
|
+
return Promise.resolve(Maybe.nothing());
|
|
99
94
|
})
|
|
100
|
-
.withDefaultFn(() => Promise.resolve(
|
|
95
|
+
.withDefaultFn(() => Promise.resolve(Maybe.nothing()));
|
|
101
96
|
}
|
|
102
|
-
exports.getTypeValueIfContextual = getTypeValueIfContextual;
|
|
103
97
|
function resolveLookups(dynamicConfigFetch, moduleLookups) {
|
|
104
98
|
return Promise.all(moduleLookups.map(async (lookup) => {
|
|
105
99
|
const featureManifest = await dynamicConfigFetch(lookup.featureName);
|
|
@@ -110,13 +104,13 @@ function resolveLookups(dynamicConfigFetch, moduleLookups) {
|
|
|
110
104
|
}));
|
|
111
105
|
}
|
|
112
106
|
function findMatchByPriority(modules, prioritizedTypes, additionalContextM) {
|
|
113
|
-
return
|
|
107
|
+
return Maybe.maybe(modules.find((moduleConfig) => {
|
|
114
108
|
const additionalContextRequirementsMet = additionalContextM
|
|
115
109
|
.map(ctx => { var _a; return (_a = moduleConfig.additionalContextRequirements) === null || _a === void 0 ? void 0 : _a.includes(ctx); })
|
|
116
110
|
.withDefault(true);
|
|
117
111
|
const moduleTypeContextMatches = moduleConfig.meta.type.context === prioritizedTypes[0];
|
|
118
112
|
return moduleTypeContextMatches && additionalContextRequirementsMet;
|
|
119
|
-
})).altMap(() => (prioritizedTypes.length === 0 &&
|
|
113
|
+
})).altMap(() => (prioritizedTypes.length === 0 && Maybe.nothing()) ||
|
|
120
114
|
findMatchByPriority(modules, prioritizedTypes.slice(1), additionalContextM));
|
|
121
115
|
}
|
|
122
116
|
/**
|
|
@@ -129,7 +123,7 @@ function findMatchByPriority(modules, prioritizedTypes, additionalContextM) {
|
|
|
129
123
|
* outlet : legacy.AccountDetails.configuredOutlets.topBanner
|
|
130
124
|
* module : tectonRoute.TectonCanary.canary
|
|
131
125
|
*/
|
|
132
|
-
async function getPathResolutionInfo(path, dynamicFetch) {
|
|
126
|
+
export async function getPathResolutionInfo(path, dynamicFetch) {
|
|
133
127
|
const pathType = path.length % 3 === 1 ? 'outlet' : 'module';
|
|
134
128
|
const resolveType = path[0];
|
|
135
129
|
const isLegacyRoot = path.length < 5;
|
|
@@ -196,8 +190,7 @@ async function getPathResolutionInfo(path, dynamicFetch) {
|
|
|
196
190
|
treeFromRoot: basePlatformConfig,
|
|
197
191
|
};
|
|
198
192
|
}
|
|
199
|
-
|
|
200
|
-
function generateTectonConfigPathFromModuleId({ path, outletModuloVal, }) {
|
|
193
|
+
export function generateTectonConfigPathFromModuleId({ path, outletModuloVal, }) {
|
|
201
194
|
const moduleModuloVal = outletModuloVal + (2 % 3);
|
|
202
195
|
return path.reduce((acc, pathItem, index) => {
|
|
203
196
|
if (index % 3 === outletModuloVal) {
|
|
@@ -213,8 +206,7 @@ function generateTectonConfigPathFromModuleId({ path, outletModuloVal, }) {
|
|
|
213
206
|
}
|
|
214
207
|
}, []);
|
|
215
208
|
}
|
|
216
|
-
|
|
217
|
-
function resolveTectonPath(path, moduleTree) {
|
|
209
|
+
export function resolveTectonPath(path, moduleTree) {
|
|
218
210
|
return path.reduce((acc, pathItem) => {
|
|
219
211
|
if (Array.isArray(acc)) {
|
|
220
212
|
const [featureName, moduleName] = pathItem.split('-');
|
|
@@ -233,8 +225,7 @@ function resolveTectonPath(path, moduleTree) {
|
|
|
233
225
|
}
|
|
234
226
|
}, moduleTree);
|
|
235
227
|
}
|
|
236
|
-
|
|
237
|
-
function findModuleInArrayConfig(arr, testFn) {
|
|
228
|
+
export function findModuleInArrayConfig(arr, testFn) {
|
|
238
229
|
let nestedIndex = -1;
|
|
239
230
|
const topLevelResolve = arr.find(itemArr => {
|
|
240
231
|
nestedIndex = itemArr.modules.findIndex(testFn);
|
|
@@ -244,10 +235,8 @@ function findModuleInArrayConfig(arr, testFn) {
|
|
|
244
235
|
return topLevelResolve.modules[nestedIndex];
|
|
245
236
|
}
|
|
246
237
|
}
|
|
247
|
-
|
|
248
|
-
function matchModulebyFeatureName(featureName, moduleName) {
|
|
238
|
+
export function matchModulebyFeatureName(featureName, moduleName) {
|
|
249
239
|
return item => {
|
|
250
240
|
return item.featureName === featureName && item.moduleName === moduleName;
|
|
251
241
|
};
|
|
252
242
|
}
|
|
253
|
-
exports.matchModulebyFeatureName = matchModulebyFeatureName;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const maybe_not_1 = require("maybe-not");
|
|
5
|
-
const resolveFeature_1 = require("./resolveFeature");
|
|
6
|
-
function setupResolveMenu(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy) {
|
|
1
|
+
import { Maybe } from 'maybe-not';
|
|
2
|
+
import { getPathResolutionInfo, resolveFeature, resolveTectonPath, } from './resolveFeature.js';
|
|
3
|
+
export default function setupResolveMenu(legacyControlBus, messageBus, tectonConfig$, params$, teardowns, contextHierarchy) {
|
|
7
4
|
const subscription = messageBus.sendResponse('resolveMenu', async (messageBody) => {
|
|
8
|
-
const resolvedPathInfo = (await
|
|
9
|
-
const platformConfig =
|
|
5
|
+
const resolvedPathInfo = (await getPathResolutionInfo(messageBody.outletPath.split('.'), legacyControlBus.dynamicConfigFetch));
|
|
6
|
+
const platformConfig = resolveTectonPath(resolvedPathInfo.configPath, resolvedPathInfo.treeFromRoot);
|
|
10
7
|
const moduleFeatureManifest = await legacyControlBus
|
|
11
8
|
.dynamicConfigFetch(resolvedPathInfo.featureName)
|
|
12
9
|
.then(x => x.modules[resolvedPathInfo.moduleName]);
|
|
@@ -14,16 +11,16 @@ function setupResolveMenu(legacyControlBus, messageBus, tectonConfig$, params$,
|
|
|
14
11
|
if (!outletType) {
|
|
15
12
|
throw new Error(`${resolvedPathInfo.outletName} contextual menu outlet not found in config`);
|
|
16
13
|
}
|
|
17
|
-
const baseContextM = outletType.context === 'None' ?
|
|
14
|
+
const baseContextM = outletType.context === 'None' ? Maybe.nothing() : Maybe.just(outletType.context);
|
|
18
15
|
const contextValueIdM = messageBody.contextValue
|
|
19
|
-
?
|
|
20
|
-
:
|
|
16
|
+
? Maybe.just(messageBody.contextValue)
|
|
17
|
+
: Maybe.nothing();
|
|
21
18
|
const providedTypeM = messageBody.resolvedType
|
|
22
|
-
?
|
|
23
|
-
:
|
|
19
|
+
? Maybe.just(messageBody.resolvedType)
|
|
20
|
+
: Maybe.nothing();
|
|
24
21
|
const additionalContextM = messageBody.additionalContext
|
|
25
|
-
?
|
|
26
|
-
:
|
|
22
|
+
? Maybe.just(messageBody.additionalContext)
|
|
23
|
+
: Maybe.nothing();
|
|
27
24
|
const menuLookups = platformConfig.configuredOutlets[resolvedPathInfo.outletName];
|
|
28
25
|
const tectonConfig = tectonConfig$.getValue();
|
|
29
26
|
const rightsEnabled = tectonConfig.features[resolvedPathInfo.featureName].modules[resolvedPathInfo.moduleName].rightsEnabled;
|
|
@@ -39,13 +36,12 @@ function setupResolveMenu(legacyControlBus, messageBus, tectonConfig$, params$,
|
|
|
39
36
|
});
|
|
40
37
|
teardowns.push(() => subscription.unsubscribe());
|
|
41
38
|
}
|
|
42
|
-
|
|
43
|
-
function resolveMenuItems(legacyControlBus, params$, outletPath, baseContextM, contextValueIdM, providedTypeM, additionalContextM, menuLookups, tectonConfig, hostFeatureName, hostModuleName, contextHierarchy) {
|
|
39
|
+
export function resolveMenuItems(legacyControlBus, params$, outletPath, baseContextM, contextValueIdM, providedTypeM, additionalContextM, menuLookups, tectonConfig, hostFeatureName, hostModuleName, contextHierarchy) {
|
|
44
40
|
return Promise.all(menuLookups.map(menuLookup => {
|
|
45
|
-
return
|
|
41
|
+
return resolveFeature(legacyControlBus, params$, outletPath, baseContextM, contextValueIdM, menuLookup.modules || [], providedTypeM, additionalContextM, tectonConfig, hostFeatureName, hostModuleName, contextHierarchy)
|
|
46
42
|
.then(menuM => {
|
|
47
43
|
return menuM.asyncMap(async (menu) => {
|
|
48
|
-
const resolvedPathInfo = (await
|
|
44
|
+
const resolvedPathInfo = (await getPathResolutionInfo(menu.moduleId.split('.'), legacyControlBus.dynamicConfigFetch));
|
|
49
45
|
const ctxId = contextValueIdM.withDefault('-1');
|
|
50
46
|
const menuItem = {
|
|
51
47
|
itemLabel: menuLookup.itemLabel,
|
|
@@ -60,8 +56,7 @@ function resolveMenuItems(legacyControlBus, params$, outletPath, baseContextM, c
|
|
|
60
56
|
return menuItem;
|
|
61
57
|
});
|
|
62
58
|
})
|
|
63
|
-
.then(
|
|
64
|
-
.catch(() =>
|
|
65
|
-
})).then(menuMs =>
|
|
59
|
+
.then(Maybe.just)
|
|
60
|
+
.catch(() => Maybe.nothing());
|
|
61
|
+
})).then(menuMs => Maybe.filterSomethings(menuMs));
|
|
66
62
|
}
|
|
67
|
-
exports.resolveMenuItems = resolveMenuItems;
|