@sapui5/sap.ushell_abap 1.152.1 → 1.154.0
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/package.json +1 -1
- package/src/main/js/sap/ushell_abap/.library +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +53 -63
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +62 -4
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +8 -8
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +11 -11
- package/src/main/js/sap/ushell_abap/adapters/abap/VisualizationInstantiationAdapter.js +76 -0
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/local/ClientSideTargetResolutionAdapter.js +123 -0
- package/src/main/js/sap/ushell_abap/adapters/local/FlpLaunchPageAdapter.js +115 -0
- package/src/main/js/sap/ushell_abap/adapters/local/MenuAdapter.js +92 -0
- package/src/main/js/sap/ushell_abap/adapters/local/PageBuildingAdapter.js +242 -0
- package/src/main/js/sap/ushell_abap/adapters/local/PagePersistenceAdapter.js +308 -0
- package/src/main/js/sap/ushell_abap/api/S4MyHome.js +58 -0
- package/src/main/js/sap/ushell_abap/bootstrap/DirectAppStart.js +28 -15
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer.js +4 -2
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages.js +2 -6
- package/src/main/js/sap/ushell_abap/bootstrap/PlatformConfig.js +5 -5
- package/src/main/js/sap/ushell_abap/bootstrap/XhrLogonEventHandler.js +6 -7
- package/src/main/js/sap/ushell_abap/bootstrap/abapConstants.js +30 -0
- package/src/main/js/sap/ushell_abap/components/SideNavigation/modules/Favorites.js +549 -0
- package/src/main/js/sap/ushell_abap/components/SideNavigation/modules/GenericNavigationListProvider.js +241 -0
- package/src/main/js/sap/ushell_abap/components/cards/Card.controller.js +117 -0
- package/src/main/js/sap/ushell_abap/components/cards/Card.view.xml +11 -0
- package/src/main/js/sap/ushell_abap/components/cards/Configuration.controller.js +280 -0
- package/src/main/js/sap/ushell_abap/components/cards/Configuration.view.xml +27 -0
- package/src/main/js/sap/ushell_abap/components/cards/ManifestPropertyHelper.js +298 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/Component.js +90 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.controller.js +110 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/TransactionCode.view.xml +16 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n.properties +17 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ar.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_bg.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ca.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_cnr.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_cs.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_cy.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_da.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_de.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_el.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_en.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_en_GB.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_en_US_sappsd.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_en_US_saprigi.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_en_US_saptrc.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_es.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_es_MX.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_et.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_fi.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_fr.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_fr_CA.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_hi.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_hr.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_hu.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_id.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_it.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_iw.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ja.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_kk.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ko.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_lt.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_lv.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_mk.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ms.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_nl.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_no.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_pl.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_pt.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_pt_PT.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ro.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_ru.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_sh.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_sk.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_sl.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_sr.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_sv.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_th.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_tr.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_uk.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_vi.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_zh_CN.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/i18n/i18n_zh_TW.properties +10 -0
- package/src/main/js/sap/ushell_abap/components/settings/TransactionCode/manifest.json +96 -0
- package/src/main/js/sap/ushell_abap/components/tiles/action/ActionTile.controller.js +189 -0
- package/src/main/js/sap/ushell_abap/components/tiles/action/ActionTile.view.xml +13 -0
- package/src/main/js/sap/ushell_abap/components/tiles/action/Configuration.controller.js +193 -0
- package/src/main/js/sap/ushell_abap/components/tiles/action/Configuration.view.xml +333 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncher/Component.js +41 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncher/Configuration.controller.js +114 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncher/Configuration.view.xml +208 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncher/StaticTile.controller.js +497 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncher/StaticTile.view.js +61 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncherdynamic/Component.js +45 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncherdynamic/Configuration.controller.js +113 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncherdynamic/Configuration.view.xml +231 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncherdynamic/DynamicTile.controller.js +729 -0
- package/src/main/js/sap/ushell_abap/components/tiles/applauncherdynamic/DynamicTile.view.js +106 -0
- package/src/main/js/sap/ushell_abap/library.js +12 -1
- package/src/main/js/sap/ushell_abap/messagebundle.properties +6 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +7 -3
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +3 -5
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +54 -4
- package/src/main/js/sap/ushell_abap/services/NavigationDataProvider.js +4 -4
- package/src/main/js/sap/ushell_abap/ui/VisualizationInstantiation/ChipInstanceWrapper.js +248 -0
- package/src/main/js/sap/ushell_abap/ui/VisualizationInstantiation/VizInstanceAbap.js +134 -0
- package/src/main/js/sap/ushell_abap/ui/VisualizationInstantiation/VizInstanceAbapLink.js +145 -0
- package/src/main/js/sap/ushell_abap/utils/UserPersonalization.js +127 -0
- package/ui5.yaml +21 -3
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview ClientSideTargetResolutionAdapter for the local (abap) platform.
|
|
5
|
+
*
|
|
6
|
+
* Intended for OPA and standalone test scenarios.
|
|
7
|
+
*
|
|
8
|
+
* A thin subclass of the ABAP ClientSideTargetResolutionAdapter that feeds inbounds
|
|
9
|
+
* from static config JSON without requiring an OData MockServer.
|
|
10
|
+
*
|
|
11
|
+
* @version 1.154.0
|
|
12
|
+
*/
|
|
13
|
+
sap.ui.define([
|
|
14
|
+
"sap/base/util/LoaderExtensions",
|
|
15
|
+
"sap/base/util/uid",
|
|
16
|
+
"sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter"
|
|
17
|
+
], (
|
|
18
|
+
LoaderExtensions,
|
|
19
|
+
uid,
|
|
20
|
+
AbapClientSideTargetResolutionAdapter
|
|
21
|
+
) => {
|
|
22
|
+
"use strict";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Constructs a new local instance of the ClientSideTargetResolutionAdapter for the ABAP platform.
|
|
26
|
+
*
|
|
27
|
+
* @param {object} oSystem The system served by the adapter
|
|
28
|
+
* @param {string} sParameter Parameter string, not in use
|
|
29
|
+
* @param {object} oAdapterConfiguration Adapter configuration
|
|
30
|
+
*
|
|
31
|
+
* @class
|
|
32
|
+
* @since 1.154.0
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
function ClientSideTargetResolutionAdapter (oSystem, sParameter, oAdapterConfiguration) {
|
|
36
|
+
const oConfig = oAdapterConfiguration?.config || {};
|
|
37
|
+
|
|
38
|
+
// Resolving with null signals the base that no segmented start-up data will arrive
|
|
39
|
+
// (i.e. the direct-start fast-path is intentionally disabled for local/test use).
|
|
40
|
+
const pInitialSegmentPromise = Promise.resolve(null);
|
|
41
|
+
|
|
42
|
+
// Carry the full synthetic start-up payload so the base stores targetMappings and
|
|
43
|
+
// systemAliases via _storeFromFullStartupResponse before getInbounds is called.
|
|
44
|
+
const pNavTargetDataPromise = this._fetchData(oAdapterConfiguration.config).then((oTargetMappings) => {
|
|
45
|
+
return {
|
|
46
|
+
targetMappings: oTargetMappings,
|
|
47
|
+
systemAliases: oConfig.systemAliases || {},
|
|
48
|
+
urlTemplates: {}
|
|
49
|
+
};
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
AbapClientSideTargetResolutionAdapter.call(this, oSystem, sParameter, {
|
|
53
|
+
config: {
|
|
54
|
+
initialSegmentPromise: pInitialSegmentPromise,
|
|
55
|
+
navTargetDataPromise: pNavTargetDataPromise
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
ClientSideTargetResolutionAdapter.prototype = Object.create(AbapClientSideTargetResolutionAdapter.prototype);
|
|
61
|
+
ClientSideTargetResolutionAdapter.prototype.constructor = ClientSideTargetResolutionAdapter;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Loads target mappings from the configured JSON resource and converts them
|
|
65
|
+
* into the keyed structure expected by the base ABAP adapter.
|
|
66
|
+
*
|
|
67
|
+
* @param {object} oConfig Adapter config containing <code>targetMappingsPath</code>.
|
|
68
|
+
* @returns {Promise<Object<string, object>>} Target mappings keyed by <code>SemanticObject-action~uiadId</code>.
|
|
69
|
+
*
|
|
70
|
+
* @since 1.154.0
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
ClientSideTargetResolutionAdapter.prototype._fetchData = async function (oConfig) {
|
|
74
|
+
const aTargetMappingData = oConfig.targetMappings || await LoaderExtensions.loadResource(oConfig.targetMappingsPath, { async: true });
|
|
75
|
+
|
|
76
|
+
return aTargetMappingData.reduce((oTargetMappings, oTMToAdd) => {
|
|
77
|
+
const sUiadId = oTMToAdd.uiadId || uid();
|
|
78
|
+
const sTmId = `${oTMToAdd.semanticObject}-${oTMToAdd.action}~${sUiadId}`;
|
|
79
|
+
|
|
80
|
+
if (oTargetMappings[sTmId]) {
|
|
81
|
+
throw new Error(`Conflicting tm ids '${sTmId}'`);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
oTargetMappings[sTmId] = {
|
|
85
|
+
semanticObject: oTMToAdd.semanticObject,
|
|
86
|
+
semanticAction: oTMToAdd.action,
|
|
87
|
+
formFactors: {
|
|
88
|
+
desktop: true,
|
|
89
|
+
tablet: true,
|
|
90
|
+
phone: true
|
|
91
|
+
},
|
|
92
|
+
signature: oTMToAdd.signature || {},
|
|
93
|
+
text: oTMToAdd.title,
|
|
94
|
+
applicationType: oTMToAdd.applicationType,
|
|
95
|
+
catalogId: oTMToAdd.catalogId,
|
|
96
|
+
tcode: oTMToAdd.tcode,
|
|
97
|
+
|
|
98
|
+
// optional
|
|
99
|
+
tmChipId: sUiadId,
|
|
100
|
+
uiadId: sUiadId,
|
|
101
|
+
isDefaultLadi: oTMToAdd.isDefaultLadi,
|
|
102
|
+
ladiHasTiles: oTMToAdd.ladiHasTiles,
|
|
103
|
+
defaultTileParams: oTMToAdd.defaultTileParams
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
if (oTargetMappings[sTmId].applicationType === "SAPUI5") {
|
|
107
|
+
oTargetMappings[sTmId].applicationData = `SAPUI5.Component=${oTMToAdd.ui5ComponentName}`;
|
|
108
|
+
oTargetMappings[sTmId].applicationDependencies = JSON.stringify({
|
|
109
|
+
name: oTMToAdd.ui5ComponentName,
|
|
110
|
+
url: new URL(sap.ui.require.toUrl(oTMToAdd.url), document.baseURI).toString(),
|
|
111
|
+
asyncHints: {},
|
|
112
|
+
minUi5Versions: ["1.28"]
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
oTargetMappings[sTmId].url = oTMToAdd.url;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return oTargetMappings;
|
|
119
|
+
}, {});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return ClientSideTargetResolutionAdapter;
|
|
123
|
+
});
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview FlpLaunchPageAdapter for the local (abap) platform.
|
|
5
|
+
*
|
|
6
|
+
* Intended for OPA and standalone test scenarios with no backend.
|
|
7
|
+
*
|
|
8
|
+
* A thin subclass of the ABAP FlpLaunchPageAdapter that feeds the compact target
|
|
9
|
+
* mappings from static config JSON instead of the <code>/sap/bc/ui2/start_up</code>
|
|
10
|
+
* backend request.
|
|
11
|
+
*
|
|
12
|
+
* @version 1.154.0
|
|
13
|
+
*/
|
|
14
|
+
sap.ui.define([
|
|
15
|
+
"sap/base/util/LoaderExtensions",
|
|
16
|
+
"sap/base/util/uid",
|
|
17
|
+
"sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter"
|
|
18
|
+
], (
|
|
19
|
+
LoaderExtensions,
|
|
20
|
+
uid,
|
|
21
|
+
AbapFlpLaunchPageAdapter
|
|
22
|
+
) => {
|
|
23
|
+
"use strict";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Constructs a new local instance of the FlpLaunchPageAdapter for the ABAP platform.
|
|
27
|
+
*
|
|
28
|
+
* @param {object} oSystem The system served by the adapter
|
|
29
|
+
* @param {string} sParameter Parameter string, not in use
|
|
30
|
+
* @param {object} oAdapterConfiguration Adapter configuration.
|
|
31
|
+
*
|
|
32
|
+
* @class
|
|
33
|
+
* @since 1.154.0
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
function FlpLaunchPageAdapter (oSystem, sParameter, oAdapterConfiguration) {
|
|
37
|
+
// The base _readTargetMappings short-circuits to config.compactTMPromise (when present)
|
|
38
|
+
// and never issues the /sap/bc/ui2/start_up backend request that would hang here.
|
|
39
|
+
const pCompactTMs = this._fetchData(oAdapterConfiguration.config).then((oTargetMappings) => {
|
|
40
|
+
return {
|
|
41
|
+
targetMappings: oTargetMappings
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
AbapFlpLaunchPageAdapter.call(this, oSystem, sParameter, {
|
|
46
|
+
config: Object.assign({}, oAdapterConfiguration, {
|
|
47
|
+
compactTMPromise: pCompactTMs
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
FlpLaunchPageAdapter.prototype = Object.create(AbapFlpLaunchPageAdapter.prototype);
|
|
53
|
+
FlpLaunchPageAdapter.prototype.constructor = FlpLaunchPageAdapter;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Loads target mappings from the configured JSON resource and converts them
|
|
57
|
+
* into the keyed structure expected by the base ABAP adapter.
|
|
58
|
+
*
|
|
59
|
+
* @param {object} oConfig Adapter config containing <code>targetMappingsPath</code>.
|
|
60
|
+
* @returns {Promise<Object<string, object>>} Target mappings keyed by <code>SemanticObject-action~uiadId</code>.
|
|
61
|
+
*
|
|
62
|
+
* @since 1.154.0
|
|
63
|
+
* @private
|
|
64
|
+
*/
|
|
65
|
+
FlpLaunchPageAdapter.prototype._fetchData = async function (oConfig) {
|
|
66
|
+
const aTargetMappingData = oConfig.targetMappings || await LoaderExtensions.loadResource(oConfig.targetMappingsPath, { async: true });
|
|
67
|
+
|
|
68
|
+
return aTargetMappingData.reduce((oTargetMappings, oTMToAdd) => {
|
|
69
|
+
const sUiadId = oTMToAdd.uiadId || uid();
|
|
70
|
+
const sTmId = `${oTMToAdd.semanticObject}-${oTMToAdd.action}~${sUiadId}`;
|
|
71
|
+
|
|
72
|
+
if (oTargetMappings[sTmId]) {
|
|
73
|
+
throw new Error(`Conflicting tm ids '${sTmId}'`);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
oTargetMappings[sTmId] = {
|
|
77
|
+
semanticObject: oTMToAdd.semanticObject,
|
|
78
|
+
semanticAction: oTMToAdd.action,
|
|
79
|
+
formFactors: {
|
|
80
|
+
desktop: true,
|
|
81
|
+
tablet: true,
|
|
82
|
+
phone: true
|
|
83
|
+
},
|
|
84
|
+
signature: oTMToAdd.signature || {},
|
|
85
|
+
text: oTMToAdd.title,
|
|
86
|
+
applicationType: oTMToAdd.applicationType,
|
|
87
|
+
catalogId: oTMToAdd.catalogId,
|
|
88
|
+
tcode: oTMToAdd.tcode,
|
|
89
|
+
|
|
90
|
+
// optional
|
|
91
|
+
tmChipId: sUiadId,
|
|
92
|
+
uiadId: sUiadId,
|
|
93
|
+
isDefaultLadi: oTMToAdd.isDefaultLadi,
|
|
94
|
+
ladiHasTiles: oTMToAdd.ladiHasTiles,
|
|
95
|
+
defaultTileParams: oTMToAdd.defaultTileParams
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
if (oTargetMappings[sTmId].applicationType === "SAPUI5") {
|
|
99
|
+
oTargetMappings[sTmId].applicationData = `SAPUI5.Component=${oTMToAdd.ui5ComponentName}`;
|
|
100
|
+
oTargetMappings[sTmId].applicationDependencies = JSON.stringify({
|
|
101
|
+
name: oTMToAdd.ui5ComponentName,
|
|
102
|
+
url: new URL(sap.ui.require.toUrl(oTMToAdd.url), document.baseURI).toString(),
|
|
103
|
+
asyncHints: {},
|
|
104
|
+
minUi5Versions: ["1.28"]
|
|
105
|
+
});
|
|
106
|
+
} else {
|
|
107
|
+
oTargetMappings[sTmId].url = oTMToAdd.url;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return oTargetMappings;
|
|
111
|
+
}, {});
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return FlpLaunchPageAdapter;
|
|
115
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview MenuAdapter for the local (abap) platform.
|
|
5
|
+
*
|
|
6
|
+
* Intended for OPA and standalone test scenarios.
|
|
7
|
+
*
|
|
8
|
+
* A thin subclass of the ABAP MenuAdapter that adds the metatag
|
|
9
|
+
* before calling the original adapter
|
|
10
|
+
*
|
|
11
|
+
* @version 1.154.0
|
|
12
|
+
*/
|
|
13
|
+
sap.ui.define([
|
|
14
|
+
"sap/base/util/LoaderExtensions",
|
|
15
|
+
"sap/ushell_abap/adapters/abap/MenuAdapter"
|
|
16
|
+
], (
|
|
17
|
+
LoaderExtensions,
|
|
18
|
+
AbapMenuAdapter
|
|
19
|
+
) => {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Constructs a new local instance of the MenuAdapter for the ABAP platform.
|
|
24
|
+
*
|
|
25
|
+
* @param {object} oSystem The system served by the adapter
|
|
26
|
+
* @param {string} sParameter Parameter string, not in use
|
|
27
|
+
* @param {object} oAdapterConfiguration Adapter configuration.
|
|
28
|
+
*
|
|
29
|
+
* @class
|
|
30
|
+
* @since 1.154.0
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
function MenuAdapter (oSystem, sParameter, oAdapterConfiguration) {
|
|
34
|
+
const oConfig = oAdapterConfiguration?.config || {};
|
|
35
|
+
|
|
36
|
+
const aData = this._fetchData(oConfig);
|
|
37
|
+
const oMetatag = document.createElement("meta");
|
|
38
|
+
oMetatag.content = JSON.stringify(aData);
|
|
39
|
+
oMetatag.setAttribute("name", "sap.ushell.assignedSpaces");
|
|
40
|
+
document.head.appendChild(oMetatag);
|
|
41
|
+
|
|
42
|
+
AbapMenuAdapter.call(this, oSystem, sParameter, {});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
MenuAdapter.prototype = Object.create(AbapMenuAdapter.prototype);
|
|
46
|
+
MenuAdapter.prototype.constructor = MenuAdapter;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Loads spaces and pages from the configured JSON resources and assembles
|
|
50
|
+
* the space list structure expected by the base ABAP MenuAdapter.
|
|
51
|
+
*
|
|
52
|
+
* @param {object} oConfig Adapter config with <code>spacesPath</code> and <code>pagesPath</code>.
|
|
53
|
+
* @returns {object[]} Space entries including embedded page references.
|
|
54
|
+
*
|
|
55
|
+
* @since 1.154.0
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
MenuAdapter.prototype._fetchData = function (oConfig) {
|
|
59
|
+
const aSpacesData = oConfig.spaces || LoaderExtensions.loadResource(oConfig.spacesPath);
|
|
60
|
+
const aPagesData = oConfig.pages || LoaderExtensions.loadResource(oConfig.pagesPath);
|
|
61
|
+
|
|
62
|
+
return aSpacesData.map((oSpaceData) => {
|
|
63
|
+
return {
|
|
64
|
+
id: oSpaceData.id || "",
|
|
65
|
+
title: oSpaceData.title || "",
|
|
66
|
+
description: oSpaceData.description || "",
|
|
67
|
+
hasWorkarea: oSpaceData.hasWorkarea || false,
|
|
68
|
+
visibility: {
|
|
69
|
+
desktop: true,
|
|
70
|
+
phone: true,
|
|
71
|
+
tablet: true
|
|
72
|
+
},
|
|
73
|
+
pages: oSpaceData.pages.map((oPageReference) => {
|
|
74
|
+
const oPageData = aPagesData.find((oPage) => oPage.id === oPageReference.id);
|
|
75
|
+
return {
|
|
76
|
+
type: oPageData ? "page" : "IBN",
|
|
77
|
+
id: oPageReference.id,
|
|
78
|
+
title: oPageData?.title || "",
|
|
79
|
+
description: oPageData?.description || "",
|
|
80
|
+
visibility: {
|
|
81
|
+
desktop: true,
|
|
82
|
+
phone: true,
|
|
83
|
+
tablet: true
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
})
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return MenuAdapter;
|
|
92
|
+
});
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview PageBuildingAdapter for the local (abap) platform.
|
|
5
|
+
*
|
|
6
|
+
* Intended for OPA and standalone test scenarios with no backend.
|
|
7
|
+
*
|
|
8
|
+
* @version 1.154.0
|
|
9
|
+
*/
|
|
10
|
+
sap.ui.define([
|
|
11
|
+
"sap/base/util/LoaderExtensions",
|
|
12
|
+
"sap/ui/core/util/MockServer",
|
|
13
|
+
"sap/ushell_abap/pbServices/ui2/Factory",
|
|
14
|
+
// Contracts need to be loaded first
|
|
15
|
+
"sap/ushell_abap/pbServices/ui2/contracts/bag",
|
|
16
|
+
"sap/ushell_abap/pbServices/ui2/contracts/configuration",
|
|
17
|
+
"sap/ushell_abap/pbServices/ui2/contracts/configurationUi",
|
|
18
|
+
"sap/ushell_abap/pbServices/ui2/contracts/fullscreen",
|
|
19
|
+
"sap/ushell_abap/pbServices/ui2/contracts/preview",
|
|
20
|
+
"sap/ushell_abap/pbServices/ui2/contracts/visible",
|
|
21
|
+
"sap/ushell_abap/pbServices/ui2/contracts/refresh",
|
|
22
|
+
"sap/ushell_abap/pbServices/ui2/contracts/search",
|
|
23
|
+
"sap/ushell_abap/pbServices/ui2/contracts/url",
|
|
24
|
+
"sap/ushell_abap/pbServices/ui2/contracts/actions",
|
|
25
|
+
"sap/ushell_abap/pbServices/ui2/contracts/types"
|
|
26
|
+
], (
|
|
27
|
+
LoaderExtensions,
|
|
28
|
+
MockServer,
|
|
29
|
+
Factory
|
|
30
|
+
) => {
|
|
31
|
+
"use strict";
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Constructs a new local instance of the PageBuildingAdapter for the ABAP platform.
|
|
35
|
+
*
|
|
36
|
+
* @param {object} oSystem The system served by the adapter
|
|
37
|
+
* @param {string} sParameter Parameter string, not in use
|
|
38
|
+
* @param {object} [oAdapterConfiguration] The configuration.
|
|
39
|
+
*
|
|
40
|
+
* @since 1.154.0
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
function PageBuildingAdapter (oSystem, sParameter, oAdapterConfiguration) {
|
|
44
|
+
// fetch sync to avoid race conditions
|
|
45
|
+
this._aBaseChips = oAdapterConfiguration.config.baseChips || LoaderExtensions.loadResource(oAdapterConfiguration.config.baseChipsPath);
|
|
46
|
+
this._aBaseChips.forEach((oBaseChip) => {
|
|
47
|
+
oBaseChip.chipPathAbsolute = new URL(sap.ui.require.toUrl(oBaseChip.chipPath), document.baseURI).toString();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
this._aCatalogsData = oAdapterConfiguration.config.catalogs || LoaderExtensions.loadResource(oAdapterConfiguration.config.catalogsPath);
|
|
51
|
+
// patch service url to absolute
|
|
52
|
+
this._aCatalogsData.forEach((oCatalog) => {
|
|
53
|
+
oCatalog.chips.forEach((oChip) => {
|
|
54
|
+
const oTileConfiguration = oChip.configuration?.tileConfiguration;
|
|
55
|
+
if (oTileConfiguration?.service_url) {
|
|
56
|
+
const aUrlParts = oTileConfiguration.service_url.split("?"); // query might contain non parsable UserDefault references
|
|
57
|
+
const sAbsoluteUrl = new URL(sap.ui.require.toUrl(aUrlParts[0]), document.baseURI).toString();
|
|
58
|
+
const sQuery = aUrlParts[1] ? `?${aUrlParts[1]}` : "";
|
|
59
|
+
oTileConfiguration.service_url = `${sAbsoluteUrl}${sQuery}`;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const oServer = new MockServer({
|
|
65
|
+
rootUri: "/local/PageBuilding"
|
|
66
|
+
});
|
|
67
|
+
MockServer.config({
|
|
68
|
+
autoRespond: true,
|
|
69
|
+
autoRespondAfter: 0
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
oServer.setRequests([
|
|
73
|
+
...this._getBaseChipRequests(),
|
|
74
|
+
...this._getAllCatalogsRequests()
|
|
75
|
+
]);
|
|
76
|
+
oServer.start();
|
|
77
|
+
|
|
78
|
+
this._oFactory = Factory.createFactory(
|
|
79
|
+
"/local/PageBuilding",
|
|
80
|
+
undefined,
|
|
81
|
+
"PERS",
|
|
82
|
+
undefined
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Returns the UI2 page building factory.
|
|
88
|
+
*
|
|
89
|
+
* @returns {sap.ushell_abap.pbServices.ui2.Factory} The page building factory.
|
|
90
|
+
*
|
|
91
|
+
* @since 1.154.0
|
|
92
|
+
* @private
|
|
93
|
+
*/
|
|
94
|
+
PageBuildingAdapter.prototype.getFactory = function () {
|
|
95
|
+
return this._oFactory;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Builds MockServer request handlers that serve individual chip descriptors
|
|
100
|
+
* from the in-memory base chip data.
|
|
101
|
+
*
|
|
102
|
+
* @returns {object[]} MockServer request configuration objects for base chip GET requests.
|
|
103
|
+
*
|
|
104
|
+
* @since 1.154.0
|
|
105
|
+
* @private
|
|
106
|
+
*/
|
|
107
|
+
PageBuildingAdapter.prototype._getBaseChipRequests = function () {
|
|
108
|
+
return this._aBaseChips.map((oBaseChip) => {
|
|
109
|
+
return {
|
|
110
|
+
method: "GET",
|
|
111
|
+
path: new RegExp(`/Chips\\('${encodeURIComponent(`X-SAP-UI2-CHIP:${oBaseChip.id}`)}'\\).*`),
|
|
112
|
+
response: (oXhr) => {
|
|
113
|
+
oXhr.respondJSON(200, {} /* Headers */, {
|
|
114
|
+
d: {
|
|
115
|
+
id: `X-SAP-UI2-CHIP:${oBaseChip.id}`,
|
|
116
|
+
title: "",
|
|
117
|
+
description: "",
|
|
118
|
+
configuration: "",
|
|
119
|
+
url: oBaseChip.chipPathAbsolute,
|
|
120
|
+
baseChipId: `X-SAP-UI2-CHIP:${oBaseChip.id}`,
|
|
121
|
+
catalogId: "/UI2/CATALOG_ALL",
|
|
122
|
+
catalogPageChipInstanceId: "",
|
|
123
|
+
referenceChipId: "",
|
|
124
|
+
isReadOnly: "",
|
|
125
|
+
Catalog: {},
|
|
126
|
+
ReferenceChip: {},
|
|
127
|
+
ChipBags: {
|
|
128
|
+
results: []
|
|
129
|
+
},
|
|
130
|
+
CatalogPageChipInstance: {}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Builds a MockServer request handler that serves the <code>allCatalogs</code> OData response
|
|
140
|
+
* from the in-memory catalog data.
|
|
141
|
+
*
|
|
142
|
+
* @returns {object[]} MockServer request configuration object for the allCatalogs endpoint.
|
|
143
|
+
*
|
|
144
|
+
* @since 1.154.0
|
|
145
|
+
* @private
|
|
146
|
+
*/
|
|
147
|
+
PageBuildingAdapter.prototype._getAllCatalogsRequests = function () {
|
|
148
|
+
return [{
|
|
149
|
+
method: "GET",
|
|
150
|
+
path: new RegExp("/Pages\\('.*'\\)/allCatalogs.*"),
|
|
151
|
+
response: (oXhr) => {
|
|
152
|
+
oXhr.respondJSON(200, {} /* Headers */, {
|
|
153
|
+
d: {
|
|
154
|
+
results: this._aCatalogsData.map((oCatalog) => {
|
|
155
|
+
return {
|
|
156
|
+
__metadata: {},
|
|
157
|
+
id: `X-SAP-UI2-CATALOGPAGE:${oCatalog.id}`,
|
|
158
|
+
type: "CATALOG_PAGE",
|
|
159
|
+
domainId: oCatalog.id,
|
|
160
|
+
remoteType: "",
|
|
161
|
+
title: oCatalog.title,
|
|
162
|
+
systemAlias: "",
|
|
163
|
+
remoteId: "",
|
|
164
|
+
isReadOnly: "",
|
|
165
|
+
originalLanguage: "en",
|
|
166
|
+
scope: "CUSTOMIZING",
|
|
167
|
+
baseUrl: "",
|
|
168
|
+
chipCount: oCatalog.chips.length.toString().padStart(4, "0"),
|
|
169
|
+
outdated: "",
|
|
170
|
+
CatalogPage: {},
|
|
171
|
+
Chips: {
|
|
172
|
+
results: oCatalog.chips.map((oCatalogTile) => {
|
|
173
|
+
const oBaseChip = this._aBaseChips.find((oBaseChip) => oBaseChip.id === oCatalogTile.baseChipId);
|
|
174
|
+
if (!oBaseChip) {
|
|
175
|
+
throw new Error(`Missing Base Chip 'X-SAP-UI2-CHIP:${oCatalogTile.baseChipId}'`);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
return {
|
|
179
|
+
__metadata: {},
|
|
180
|
+
id: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${oCatalog.id}:${oCatalogTile.id}`,
|
|
181
|
+
catalogId: `X-SAP-UI2-CATALOGPAGE:${oCatalog.id}`,
|
|
182
|
+
catalogPageChipInstanceId: oCatalogTile.id,
|
|
183
|
+
baseChipId: `X-SAP-UI2-CHIP:${oCatalogTile.baseChipId}`,
|
|
184
|
+
url: oBaseChip.chipPathAbsolute,
|
|
185
|
+
referenceChipId: "",
|
|
186
|
+
isReadOnly: "",
|
|
187
|
+
title: "<non translatable title>",
|
|
188
|
+
description: "",
|
|
189
|
+
Catalog: {},
|
|
190
|
+
ReferenceChip: {},
|
|
191
|
+
configuration: JSON.stringify(Object.keys(oCatalogTile.configuration).reduce((oConfiguration, sConfigurationKey) => {
|
|
192
|
+
oConfiguration[sConfigurationKey] = JSON.stringify(oCatalogTile.configuration[sConfigurationKey]);
|
|
193
|
+
return oConfiguration;
|
|
194
|
+
}, {})),
|
|
195
|
+
ChipBags: {
|
|
196
|
+
results: Object.keys(oCatalogTile.bags).map((sBagId) => {
|
|
197
|
+
const oBag = oCatalogTile.bags[sBagId];
|
|
198
|
+
return {
|
|
199
|
+
__metadata: {},
|
|
200
|
+
chipId: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${oCatalog.id}:${oCatalogTile.id}`,
|
|
201
|
+
id: sBagId,
|
|
202
|
+
ChipProperties: {
|
|
203
|
+
results: [
|
|
204
|
+
...Object.keys(oBag.texts || {}).map((sBagTextKey) => {
|
|
205
|
+
return {
|
|
206
|
+
__metadata: {},
|
|
207
|
+
chipId: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${oCatalog.id}:${oCatalogTile.id}`,
|
|
208
|
+
bagId: sBagId,
|
|
209
|
+
name: sBagTextKey,
|
|
210
|
+
value: oBag.texts[sBagTextKey],
|
|
211
|
+
translatable: "X"
|
|
212
|
+
};
|
|
213
|
+
}),
|
|
214
|
+
...Object.keys(oBag.properties || {}).map((sBagPropertyKey) => {
|
|
215
|
+
return {
|
|
216
|
+
__metadata: {},
|
|
217
|
+
chipId: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${oCatalog.id}:${oCatalogTile.id}`,
|
|
218
|
+
bagId: sBagId,
|
|
219
|
+
name: sBagPropertyKey,
|
|
220
|
+
value: oBag.properties[sBagPropertyKey],
|
|
221
|
+
translatable: ""
|
|
222
|
+
};
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
})
|
|
228
|
+
},
|
|
229
|
+
CatalogPageChipInstance: {}
|
|
230
|
+
};
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
})
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
}];
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
return PageBuildingAdapter;
|
|
242
|
+
});
|