@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,308 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview PagePersistenceAdapter 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 PagePersistenceAdapter that overwrites the fetch from the backend.
|
|
9
|
+
*
|
|
10
|
+
* @version 1.154.0
|
|
11
|
+
*/
|
|
12
|
+
sap.ui.define([
|
|
13
|
+
"sap/base/util/LoaderExtensions",
|
|
14
|
+
"sap/ushell/library",
|
|
15
|
+
"sap/ushell_abap/adapters/abap/PagePersistenceAdapter"
|
|
16
|
+
], (
|
|
17
|
+
LoaderExtensions,
|
|
18
|
+
ushellLibrary,
|
|
19
|
+
AbapPagePersistenceAdapter
|
|
20
|
+
) => {
|
|
21
|
+
"use strict";
|
|
22
|
+
|
|
23
|
+
// shortcut for sap.ushell.DisplayFormat
|
|
24
|
+
const DisplayFormat = ushellLibrary.DisplayFormat;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Constructs a new local instance of the PagePersistenceAdapter for the ABAP platform.
|
|
28
|
+
*
|
|
29
|
+
* @param {object} oSystem The system information. This is not used in a local environment.
|
|
30
|
+
* @param {string} sParameter The Adapter parameter.
|
|
31
|
+
* @param {object} oAdapterConfiguration The Adapter configuration.
|
|
32
|
+
*
|
|
33
|
+
* @since 1.154.0
|
|
34
|
+
* @class
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
function PagePersistenceAdapter (oSystem, sParameter, oAdapterConfiguration) {
|
|
38
|
+
AbapPagePersistenceAdapter.call(this, oSystem, sParameter, {});
|
|
39
|
+
|
|
40
|
+
this._bEnableValidationErrors = !oAdapterConfiguration.config.ignoreValidationErrors;
|
|
41
|
+
this._pData = this._fetchData(oAdapterConfiguration.config);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
PagePersistenceAdapter.prototype = Object.create(AbapPagePersistenceAdapter.prototype);
|
|
45
|
+
PagePersistenceAdapter.prototype.constructor = PagePersistenceAdapter;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Loads pages, catalogs, and base chip data from the configured JSON resources
|
|
49
|
+
* and transforms them into the OData-shaped structure the base adapter expects.
|
|
50
|
+
*
|
|
51
|
+
* @param {object} oConfig Adapter config with <code>pagesPath</code>, <code>catalogsPath</code>, and <code>baseChipsPath</code>.
|
|
52
|
+
* @returns {Promise<Object<string, object>>} Page data keyed by page ID.
|
|
53
|
+
*
|
|
54
|
+
* @since 1.154.0
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
PagePersistenceAdapter.prototype._fetchData = async function (oConfig) {
|
|
58
|
+
const [
|
|
59
|
+
aPagesData,
|
|
60
|
+
aCatalogsData,
|
|
61
|
+
aBaseChipData
|
|
62
|
+
]
|
|
63
|
+
= await Promise.all([
|
|
64
|
+
oConfig.pages || LoaderExtensions.loadResource(oConfig.pagesPath, { async: true }),
|
|
65
|
+
oConfig.catalogs || LoaderExtensions.loadResource(oConfig.catalogsPath, { async: true }),
|
|
66
|
+
Promise.resolve(oConfig.baseChips || LoaderExtensions.loadResource(oConfig.baseChipsPath, { async: true })).then((aBaseChipData) => {
|
|
67
|
+
return Promise.all(aBaseChipData.map(async (oBaseChip) => {
|
|
68
|
+
const oXml = await LoaderExtensions.loadResource(oBaseChip.chipPath, { async: true });
|
|
69
|
+
|
|
70
|
+
const sDefaultType = oXml.querySelector("chip contracts consume[id=types] parameter[name=defaultType]")?.textContent;
|
|
71
|
+
const sSupportedTypes = oXml.querySelector("chip contracts consume[id=types] parameter[name=supportedTypes]")?.textContent;
|
|
72
|
+
const sCol = oXml.querySelector("chip contracts consume[id=configuration] parameter[name=col]")?.textContent;
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
...oBaseChip,
|
|
76
|
+
defaultType: this._mapDisplayFormat(sDefaultType, sCol),
|
|
77
|
+
supportedTypes: sSupportedTypes.split(",").map((sType) => {
|
|
78
|
+
return this._mapDisplayFormat(sType, sCol);
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
}));
|
|
82
|
+
})
|
|
83
|
+
]);
|
|
84
|
+
|
|
85
|
+
// patch service url to absolute
|
|
86
|
+
aCatalogsData.forEach((oCatalog) => {
|
|
87
|
+
oCatalog.chips.forEach((oChip) => {
|
|
88
|
+
const oTileConfiguration = oChip.configuration?.tileConfiguration;
|
|
89
|
+
if (oTileConfiguration?.service_url) {
|
|
90
|
+
const aUrlParts = oTileConfiguration.service_url.split("?"); // query might contain non parsable UserDefault references
|
|
91
|
+
const sAbsoluteUrl = new URL(sap.ui.require.toUrl(aUrlParts[0]), document.baseURI).toString();
|
|
92
|
+
const sQuery = aUrlParts[1] ? `?${aUrlParts[1]}` : "";
|
|
93
|
+
oTileConfiguration.service_url = `${sAbsoluteUrl}${sQuery}`;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
return aPagesData.reduce((oPages, oPageToAdd) => {
|
|
99
|
+
if (this._bEnableValidationErrors && oPages[oPageToAdd.id]) {
|
|
100
|
+
throw new Error(`Conflicting page ids '${oPageToAdd.id}'`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const aUsedCatalogTileIds = new Set();
|
|
104
|
+
const aUsedBaseChipIds = new Set();
|
|
105
|
+
|
|
106
|
+
oPages[oPageToAdd.id] = {
|
|
107
|
+
__metadata: {},
|
|
108
|
+
id: oPageToAdd.id,
|
|
109
|
+
title: oPageToAdd.title,
|
|
110
|
+
description: oPageToAdd.description,
|
|
111
|
+
sections: {
|
|
112
|
+
results: oPageToAdd.sections.map((oSection, iSectionIndex) => {
|
|
113
|
+
return {
|
|
114
|
+
__metadata: {},
|
|
115
|
+
id: oSection.id || `${oPageToAdd.id}-section_${iSectionIndex}`, // stable id for personalization
|
|
116
|
+
title: oSection.title,
|
|
117
|
+
sectionIndex: iSectionIndex + 1,
|
|
118
|
+
viz: {
|
|
119
|
+
results: oSection.viz.map((oVizRef, iVizRefIndex) => {
|
|
120
|
+
aUsedCatalogTileIds.add(oVizRef.catalogTileId);
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
__metadata: {},
|
|
124
|
+
id: oVizRef.id || `${oPageToAdd.id}-section_${iSectionIndex}-viz_${iVizRefIndex}`, // stable id for personalization
|
|
125
|
+
catalogTileId: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${oVizRef.catalogTileId}`,
|
|
126
|
+
catalogTileIdStable: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${oVizRef.catalogTileId}`,
|
|
127
|
+
targetMappingId: "",
|
|
128
|
+
targetMappingIdStable: "",
|
|
129
|
+
displayFormatHint: oVizRef.displayFormatHint,
|
|
130
|
+
itemIndex: iVizRefIndex + 1,
|
|
131
|
+
vizReference: {}
|
|
132
|
+
};
|
|
133
|
+
})
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
})
|
|
137
|
+
},
|
|
138
|
+
vizReferences: { // actually means visualizations/ catalogTiles
|
|
139
|
+
results: Array.from(aUsedCatalogTileIds).map((sCatalogTileId) => {
|
|
140
|
+
const [sCatalogId, sChipId] = sCatalogTileId.split(":");
|
|
141
|
+
const oCatalogTile = aCatalogsData.find((oCatalog) => oCatalog.id === sCatalogId)?.chips.find((oChip) => oChip.id === sChipId);
|
|
142
|
+
|
|
143
|
+
if (!oCatalogTile) {
|
|
144
|
+
if (this._bEnableValidationErrors) {
|
|
145
|
+
throw new Error(`Missing Catalog Tile 'X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${sCatalogTileId}'`);
|
|
146
|
+
}
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
aUsedBaseChipIds.add(oCatalogTile.baseChipId);
|
|
151
|
+
|
|
152
|
+
return {
|
|
153
|
+
__metadata: {},
|
|
154
|
+
id: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${sCatalogTileId}`,
|
|
155
|
+
catalogDisplayId: `X-SAP-UI2-CATALOGPAGE:${sCatalogId}`,
|
|
156
|
+
catalogTileId: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${sCatalogTileId}`,
|
|
157
|
+
catalogTileIdStable: `X-SAP-UI2-PAGE:X-SAP-UI2-CATALOGPAGE:${sCatalogTileId}`,
|
|
158
|
+
targetMappingId: "",
|
|
159
|
+
targetMappingIdStable: "",
|
|
160
|
+
title: oCatalogTile.bags?.tileProperties?.texts?.display_title_text,
|
|
161
|
+
subTitle: oCatalogTile.bags?.tileProperties?.texts?.display_subtitle_text,
|
|
162
|
+
iconUrl: oCatalogTile.configuration?.tileConfiguration?.display_icon_url,
|
|
163
|
+
semanticObject: "",
|
|
164
|
+
semanticAction: "",
|
|
165
|
+
deviceDesktop: true,
|
|
166
|
+
deviceTablet: true,
|
|
167
|
+
devicePhone: true,
|
|
168
|
+
tileType: `X-SAP-UI2-CHIP:${oCatalogTile.baseChipId}`,
|
|
169
|
+
fromPersonalization: false,
|
|
170
|
+
parameters: "",
|
|
171
|
+
configuration: JSON.stringify(Object.keys(oCatalogTile.configuration || {}).reduce((oConfiguration, sConfigurationKey) => {
|
|
172
|
+
oConfiguration[sConfigurationKey] = JSON.stringify(oCatalogTile.configuration[sConfigurationKey]);
|
|
173
|
+
return oConfiguration;
|
|
174
|
+
}, {})),
|
|
175
|
+
chipBags: {
|
|
176
|
+
results: Object.keys(oCatalogTile.bags || {}).map((sBagId) => {
|
|
177
|
+
const oBag = oCatalogTile.bags[sBagId];
|
|
178
|
+
return {
|
|
179
|
+
__metadata: {},
|
|
180
|
+
id: sBagId,
|
|
181
|
+
properties: {
|
|
182
|
+
results: [
|
|
183
|
+
...Object.keys(oBag.texts || {}).map((sBagTextKey) => {
|
|
184
|
+
return {
|
|
185
|
+
__metadata: {},
|
|
186
|
+
id: sBagTextKey,
|
|
187
|
+
value: oBag.texts[sBagTextKey],
|
|
188
|
+
translatable: true
|
|
189
|
+
};
|
|
190
|
+
}),
|
|
191
|
+
...Object.keys(oBag.properties || {}).map((sBagPropertyKey) => {
|
|
192
|
+
return {
|
|
193
|
+
__metadata: {},
|
|
194
|
+
id: sBagPropertyKey,
|
|
195
|
+
value: oBag.properties[sBagPropertyKey],
|
|
196
|
+
translatable: false
|
|
197
|
+
};
|
|
198
|
+
})
|
|
199
|
+
]
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
})
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
}).filter((oVizReference) => !!oVizReference)
|
|
206
|
+
},
|
|
207
|
+
tileTypes: {
|
|
208
|
+
results: Array.from(aUsedBaseChipIds).map((sBaseChipId) => {
|
|
209
|
+
const oBaseChip = aBaseChipData.find((oChip) => oChip.id === sBaseChipId);
|
|
210
|
+
if (!oBaseChip) {
|
|
211
|
+
if (this._bEnableValidationErrors) {
|
|
212
|
+
throw new Error(`Missing Base Chip 'X-SAP-UI2-CHIP:${sBaseChipId}'`);
|
|
213
|
+
}
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
return {
|
|
218
|
+
__metadata: {},
|
|
219
|
+
id: `X-SAP-UI2-CHIP:${sBaseChipId}`,
|
|
220
|
+
url: "",
|
|
221
|
+
vizOptions: {
|
|
222
|
+
__metadata: {},
|
|
223
|
+
id: `X-SAP-UI2-CHIP:${sBaseChipId}`,
|
|
224
|
+
displayFormats: {
|
|
225
|
+
__metadata: {},
|
|
226
|
+
preferred: oBaseChip.defaultType,
|
|
227
|
+
id: `X-SAP-UI2-CHIP:${sBaseChipId}`,
|
|
228
|
+
supported: {
|
|
229
|
+
results: oBaseChip.supportedTypes.map((sType) => {
|
|
230
|
+
return {
|
|
231
|
+
__metadata: {},
|
|
232
|
+
id: sType
|
|
233
|
+
};
|
|
234
|
+
})
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
}).filter((oTileType) => !!oTileType)
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
return oPages;
|
|
244
|
+
}, {});
|
|
245
|
+
};
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Maps a chip-XML type string to the corresponding {@link sap.ushell.DisplayFormat} enum value,
|
|
249
|
+
* taking the column count into account.
|
|
250
|
+
*
|
|
251
|
+
* @param {string} sType Tile type from the chip XML (e.g. <code>"tile"</code>, <code>"link"</code>).
|
|
252
|
+
* @param {string} sCol Column count from the chip XML (<code>"1"</code> or <code>"2"</code>).
|
|
253
|
+
* @returns {sap.ushell.DisplayFormat} The mapped display format.
|
|
254
|
+
*
|
|
255
|
+
* @since 1.154.0
|
|
256
|
+
* @private
|
|
257
|
+
*/
|
|
258
|
+
PagePersistenceAdapter.prototype._mapDisplayFormat = function (sType, sCol) {
|
|
259
|
+
const oDisplayFormatMap = {
|
|
260
|
+
tile: DisplayFormat.Standard,
|
|
261
|
+
link: DisplayFormat.Compact,
|
|
262
|
+
flat: DisplayFormat.Flat,
|
|
263
|
+
flatwide: DisplayFormat.FlatWide,
|
|
264
|
+
tilewide: DisplayFormat.StandardWide
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
let sDisplayFormat = oDisplayFormatMap[sType.toLowerCase()];
|
|
268
|
+
|
|
269
|
+
if (sCol === "2" && sDisplayFormat === DisplayFormat.Standard) {
|
|
270
|
+
sDisplayFormat = DisplayFormat.StandardWide;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
return sDisplayFormat;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Returns the OData-shaped page object for the given page ID.
|
|
278
|
+
*
|
|
279
|
+
* @param {string} sPageId The page ID to retrieve.
|
|
280
|
+
* @returns {Promise<object>} The page data object.
|
|
281
|
+
*
|
|
282
|
+
* @since 1.154.0
|
|
283
|
+
* @private
|
|
284
|
+
*/
|
|
285
|
+
PagePersistenceAdapter.prototype.readPage = async function (sPageId) {
|
|
286
|
+
const oData = await this._pData;
|
|
287
|
+
return oData[sPageId];
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* Returns OData-shaped page objects for the given page IDs.
|
|
292
|
+
*
|
|
293
|
+
* @param {string[]} aPageIds The page IDs to retrieve.
|
|
294
|
+
* @returns {Promise<{results: object[]}>} Object with a results array of page data objects.
|
|
295
|
+
*
|
|
296
|
+
* @since 1.154.0
|
|
297
|
+
* @private
|
|
298
|
+
*/
|
|
299
|
+
PagePersistenceAdapter.prototype.readPages = async function (aPageIds) {
|
|
300
|
+
return {
|
|
301
|
+
results: await Promise.all(aPageIds.map(async (sPageId) => {
|
|
302
|
+
return this.readPage(sPageId);
|
|
303
|
+
}))
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
return PagePersistenceAdapter;
|
|
308
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file Utility functions for S/4 My Home.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/ushell_abap/utils/UserPersonalization"
|
|
8
|
+
], (
|
|
9
|
+
UserPersonalization
|
|
10
|
+
) => {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @alias sap.ushell_abap.api.S4MyHome
|
|
15
|
+
* @namespace
|
|
16
|
+
* @description The utility functions for the S/4 My Home app.
|
|
17
|
+
*
|
|
18
|
+
* @since 1.154.0
|
|
19
|
+
* @private
|
|
20
|
+
* @ui5-restricted ux.eng.producthome, ux.eng.s4producthomes1
|
|
21
|
+
*/
|
|
22
|
+
class S4MyHome {
|
|
23
|
+
/**
|
|
24
|
+
* Attaches an event handler to the display transaction code change event.
|
|
25
|
+
*
|
|
26
|
+
* @param {object} [oData] An object that will be passed to the handler along with the event object when the event is fired
|
|
27
|
+
* @param {function} fnFunction The handler function to call when the event occurs.
|
|
28
|
+
* This function will be called in the context of the <code>oListener</code> instance (if present) or on the event provider instance.
|
|
29
|
+
* The event object ({@link sap.ui.base.Event}) is provided as first argument of the handler. Handlers must not change the content of
|
|
30
|
+
* the event. The second argument is the specified <code>oData</code> instance (if present).
|
|
31
|
+
* @param {object} [oListener] The object that wants to be notified when the event occurs (<code>this</code> context within the
|
|
32
|
+
* handler function). If it is not specified, the handler function is called in the context of the event provider.
|
|
33
|
+
*
|
|
34
|
+
* @since 1.154.0
|
|
35
|
+
* @private
|
|
36
|
+
* @ui5-restricted ux.eng.producthome, ux.eng.s4producthomes1
|
|
37
|
+
*/
|
|
38
|
+
async attachDisplayTransactionCodeChanged (...args) {
|
|
39
|
+
UserPersonalization.attachDisplayTransactionCodeChanged(...args);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Detaches an event handler from the display transaction code change event.
|
|
44
|
+
*
|
|
45
|
+
* @param {function} fnFunction The handler function to detach from the event
|
|
46
|
+
* @param {object} [oListener] The object that wanted to be notified when the event occurred
|
|
47
|
+
*
|
|
48
|
+
* @since 1.154.0
|
|
49
|
+
* @private
|
|
50
|
+
* @ui5-restricted ux.eng.producthome, ux.eng.s4producthomes1
|
|
51
|
+
*/
|
|
52
|
+
async detachDisplayTransactionCodeChanged (...args) {
|
|
53
|
+
UserPersonalization.detachDisplayTransactionCodeChanged(...args);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return new S4MyHome();
|
|
58
|
+
});
|
|
@@ -5,19 +5,23 @@
|
|
|
5
5
|
sap.ui.define([
|
|
6
6
|
"sap/base/Log",
|
|
7
7
|
"sap/base/util/ObjectPath",
|
|
8
|
+
"sap/ui/core/Lib",
|
|
8
9
|
"sap/ushell_abap/bootstrap/StartupRequestHandler",
|
|
9
10
|
"sap/ushell/base/promisify",
|
|
10
11
|
"sap/ushell/base/requireAsync",
|
|
11
12
|
"sap/ushell/base/UrlParsing",
|
|
12
|
-
"sap/ushell/bootstrap/Config"
|
|
13
|
+
"sap/ushell/bootstrap/Config",
|
|
14
|
+
"sap/ushell/utils/LaunchpadError"
|
|
13
15
|
], (
|
|
14
16
|
Log,
|
|
15
17
|
ObjectPath,
|
|
18
|
+
Lib,
|
|
16
19
|
StartupRequestHandler,
|
|
17
20
|
promisify,
|
|
18
21
|
requireAsync,
|
|
19
22
|
UrlParsing,
|
|
20
|
-
BootstrapConfig
|
|
23
|
+
BootstrapConfig,
|
|
24
|
+
LaunchpadError
|
|
21
25
|
) => {
|
|
22
26
|
"use strict";
|
|
23
27
|
|
|
@@ -183,18 +187,26 @@ sap.ui.define([
|
|
|
183
187
|
AppConfiguration.setCurrentApplication(oResolvedHashFragment);
|
|
184
188
|
|
|
185
189
|
if (oResolvedHashFragment?.ui5ComponentName) {
|
|
186
|
-
// create UI5 component early
|
|
187
190
|
const Ui5ComponentLoader = await Container.getServiceAsync("Ui5ComponentLoader");
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
191
|
+
let oResolvedHashFragmentWithComponentHandle;
|
|
192
|
+
try {
|
|
193
|
+
oResolvedHashFragmentWithComponentHandle = await Ui5ComponentLoader.createComponent(
|
|
194
|
+
oResolvedHashFragment,
|
|
195
|
+
[this.#createWaitForRendererCreatedPromise(Container)],
|
|
196
|
+
"Application"
|
|
197
|
+
);
|
|
198
|
+
} catch (oError) {
|
|
199
|
+
const sShellHash = UrlParsing.constructShellHash(UrlParsing.parseShellHash(sHash, true), true);
|
|
200
|
+
throw new LaunchpadError(
|
|
201
|
+
oError.message,
|
|
202
|
+
{
|
|
203
|
+
translatedMessage: Lib.getResourceBundleFor("sap.ushell").getText("failed_to_open_ui5_component"),
|
|
204
|
+
messageDetails: Lib.getResourceBundleFor("sap.ushell").getText("cannot_load_ui5_component_details", [sShellHash])
|
|
205
|
+
},
|
|
206
|
+
oError
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
return { resolvedHashFragment: oResolvedHashFragmentWithComponentHandle };
|
|
198
210
|
}
|
|
199
211
|
|
|
200
212
|
// non-ui5 app
|
|
@@ -249,10 +261,11 @@ sap.ui.define([
|
|
|
249
261
|
}
|
|
250
262
|
|
|
251
263
|
EventHub.once("ShellNavigationInitialized").do(() => {
|
|
252
|
-
|
|
264
|
+
try {
|
|
265
|
+
Container.getRendererInternal(); // fails if not available yet
|
|
253
266
|
Log.info("Direct application start: resolving component waitFor promise immediately (shell renderer already created).");
|
|
254
267
|
oDeferred.resolve();
|
|
255
|
-
}
|
|
268
|
+
} catch {
|
|
256
269
|
// the renderer should be created when the shell navigation is initialized, just to but be robust
|
|
257
270
|
Container.attachRendererCreatedInternal(fnOnRendererCreated);
|
|
258
271
|
}
|
|
@@ -36,8 +36,10 @@ sap.ui.define([
|
|
|
36
36
|
* @private
|
|
37
37
|
*/
|
|
38
38
|
async run () {
|
|
39
|
-
const oRenderer = await Container.createRendererInternal(
|
|
40
|
-
|
|
39
|
+
const oRenderer = await Container.createRendererInternal();
|
|
40
|
+
ShellLayout.applyLayout();
|
|
41
|
+
oRenderer.placeAt(ShellLayout.ShellArea.RendererRootView, "only");
|
|
42
|
+
|
|
41
43
|
const oSystem = Container.getLogonSystem();
|
|
42
44
|
const sCurrentShellMode = StateManager.getShellMode();
|
|
43
45
|
|
|
@@ -6,14 +6,12 @@ sap.ui.define([
|
|
|
6
6
|
"sap/base/util/ObjectPath",
|
|
7
7
|
"sap/ushell/components/pages/controller/PagesAndSpaceId",
|
|
8
8
|
"sap/ushell/Config",
|
|
9
|
-
"sap/ushell/Container"
|
|
10
|
-
"sap/ushell/resources"
|
|
9
|
+
"sap/ushell/Container"
|
|
11
10
|
], (
|
|
12
11
|
ObjectPath,
|
|
13
12
|
PagesAndSpaceId,
|
|
14
13
|
Config,
|
|
15
|
-
Container
|
|
16
|
-
ushellResources
|
|
14
|
+
Container
|
|
17
15
|
) => {
|
|
18
16
|
"use strict";
|
|
19
17
|
|
|
@@ -104,8 +102,6 @@ sap.ui.define([
|
|
|
104
102
|
* @private
|
|
105
103
|
*/
|
|
106
104
|
async #requestPagesContent () {
|
|
107
|
-
await ushellResources.awaitResourceBundle();
|
|
108
|
-
|
|
109
105
|
const pId = PagesAndSpaceId.getPageAndSpaceId(this.getLocationHash());
|
|
110
106
|
const pPagePersistenceService = Container.getServiceAsync("PagePersistence");
|
|
111
107
|
|
|
@@ -302,8 +302,8 @@ sap.ui.define([
|
|
|
302
302
|
sLegacyTimeFormat = undefined;
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
+
let sTimeZoneIana;
|
|
305
306
|
const bUseTimeZoneIana = oContainerAdapterConfig.timeZoneFromServerInUI5;
|
|
306
|
-
let sTimeZoneIana = oContainerAdapterConfig.timeZone;
|
|
307
307
|
if (bUseTimeZoneIana && oContainerAdapterConfig.timeZone !== "") {
|
|
308
308
|
sTimeZoneIana = oContainerAdapterConfig.timeZone;
|
|
309
309
|
}
|
|
@@ -327,7 +327,7 @@ sap.ui.define([
|
|
|
327
327
|
|
|
328
328
|
/**
|
|
329
329
|
* Applies additional UI5 settings that require async API calls.
|
|
330
|
-
* Sets Islamic calendar customizing data, language with
|
|
330
|
+
* Sets Islamic calendar customizing data, language with SAP logon language code,
|
|
331
331
|
* and custom currencies.
|
|
332
332
|
*
|
|
333
333
|
* @returns {Promise} Resolves when all settings have been applied
|
|
@@ -349,15 +349,15 @@ sap.ui.define([
|
|
|
349
349
|
|
|
350
350
|
const sLegacyDateCalendarCustomizing = oContainerAdapterConfig.tislcal;
|
|
351
351
|
const sLanguage = oContainerAdapterConfig.languageBcp47 || oContainerAdapterConfig.language;
|
|
352
|
-
const
|
|
352
|
+
const sSAPLogonLanguage = oContainerAdapterConfig.language;
|
|
353
353
|
const oCurrencyFormats = oContainerAdapterConfig.currencyFormats;
|
|
354
354
|
|
|
355
355
|
if (sLegacyDateCalendarCustomizing) {
|
|
356
356
|
Formatting.setCustomIslamicCalendarData(sLegacyDateCalendarCustomizing);
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
if (
|
|
360
|
-
Localization.setLanguage(sLanguage,
|
|
359
|
+
if (sSAPLogonLanguage) { // only set SAP logon language if it is provided, the regular language was already configured
|
|
360
|
+
Localization.setLanguage(sLanguage, sSAPLogonLanguage);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
// Copy currency formats, if provided, to the UI5 custom currencies format settings
|
|
@@ -5,10 +5,12 @@
|
|
|
5
5
|
sap.ui.define([
|
|
6
6
|
"sap/base/Log",
|
|
7
7
|
"sap/base/util/ObjectPath",
|
|
8
|
+
"sap/ui/core/Lib",
|
|
8
9
|
"sap/ushell/Config"
|
|
9
10
|
], (
|
|
10
11
|
Log,
|
|
11
12
|
ObjectPath,
|
|
13
|
+
Lib,
|
|
12
14
|
Config
|
|
13
15
|
) => {
|
|
14
16
|
"use strict";
|
|
@@ -220,11 +222,8 @@ sap.ui.define([
|
|
|
220
222
|
const Action = MessageBox.Action;
|
|
221
223
|
const Icon = MessageBox.Icon;
|
|
222
224
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
sTitle = this._getText(oTitleText, ushellResources);
|
|
226
|
-
sMessage = this._getText(oMessageText, ushellResources);
|
|
227
|
-
}
|
|
225
|
+
sTitle = this._getText(oTitleText);
|
|
226
|
+
sMessage = this._getText(oMessageText);
|
|
228
227
|
|
|
229
228
|
// Overwrite sap.ui.core.BusyIndicator.show to not open a busy indicator.
|
|
230
229
|
// In case the MessageBox (to show the error message and to offer the end user to reload the FLP) gets shown, we want
|
|
@@ -262,8 +261,8 @@ sap.ui.define([
|
|
|
262
261
|
*
|
|
263
262
|
* @private
|
|
264
263
|
*/
|
|
265
|
-
XhrLogonEventHandler.prototype._getText = function (oText
|
|
266
|
-
const sText =
|
|
264
|
+
XhrLogonEventHandler.prototype._getText = function (oText) {
|
|
265
|
+
const sText = Lib.getResourceBundleFor("sap.ushell").getText(oText.key);
|
|
267
266
|
|
|
268
267
|
// ui5 resource bundle returns the text key if no text defined we need the fallback,
|
|
269
268
|
// because translations might be missing in lower releases
|
|
@@ -56,6 +56,18 @@ sap.ui.define([
|
|
|
56
56
|
enabled: true
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
sideNavigation: {
|
|
60
|
+
navigationListProvider: {
|
|
61
|
+
modulePath: "sap/ushell_abap/components/SideNavigation/modules/GenericNavigationListProvider"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
settings: {
|
|
65
|
+
customEntries: [{
|
|
66
|
+
name: "sap.ushell_abap.components.settings.TransactionCode",
|
|
67
|
+
url: sap.ui.require.toUrl("sap/ushell_abap/components/settings/TransactionCode"),
|
|
68
|
+
manifest: sap.ui.require.toUrl("sap/ushell_abap/components/settings/TransactionCode/manifest.json")
|
|
69
|
+
}]
|
|
70
|
+
},
|
|
59
71
|
customPreload: getCustomPreloadConfig()
|
|
60
72
|
},
|
|
61
73
|
renderers: {
|
|
@@ -189,6 +201,18 @@ sap.ui.define([
|
|
|
189
201
|
enabled: false
|
|
190
202
|
}
|
|
191
203
|
}
|
|
204
|
+
},
|
|
205
|
+
MessageBroker: {
|
|
206
|
+
config: {
|
|
207
|
+
ClientLoader: {
|
|
208
|
+
enabled: true,
|
|
209
|
+
mappings: {
|
|
210
|
+
"sap.ushell.api.RTA": {
|
|
211
|
+
module: "module:sap/ushell/api/RTA"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
192
216
|
}
|
|
193
217
|
},
|
|
194
218
|
xhrLogon: {
|
|
@@ -221,6 +245,12 @@ sap.ui.define([
|
|
|
221
245
|
inputFieldSuggestions: {
|
|
222
246
|
enabled: true
|
|
223
247
|
}
|
|
248
|
+
},
|
|
249
|
+
modulePaths: {
|
|
250
|
+
"sap.ushell.components.cards": sap.ui.require.toUrl("sap/ushell_abap/components/cards"),
|
|
251
|
+
"sap.ushell.components.tiles.action": sap.ui.require.toUrl("sap/ushell_abap/components/tiles/action"),
|
|
252
|
+
"sap.ushell.components.tiles.applauncher": sap.ui.require.toUrl("sap/ushell_abap/components/tiles/applauncher"),
|
|
253
|
+
"sap.ushell.components.tiles.applauncherdynamic": sap.ui.require.toUrl("sap/ushell_abap/components/tiles/applauncherdynamic")
|
|
224
254
|
}
|
|
225
255
|
}
|
|
226
256
|
};
|