@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,106 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This copy of the DynamicTile.view is needed for compatibility reasons until the changes to applauncher_dynamic.chip.xml have been delivered.
|
|
5
|
+
* Afterwards this file can be used in all scenarios and DynamicTile.view.js can be replaced by it.
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/ui/core/mvc/View",
|
|
9
|
+
"sap/m/GenericTile",
|
|
10
|
+
"sap/m/TileContent",
|
|
11
|
+
"sap/m/library",
|
|
12
|
+
"sap/m/NumericContent",
|
|
13
|
+
"sap/ushell_abap/components/tiles/applauncherdynamic/DynamicTile.controller" // Controller needs to be loaded
|
|
14
|
+
], (
|
|
15
|
+
View,
|
|
16
|
+
GenericTile,
|
|
17
|
+
TileContent,
|
|
18
|
+
mobileLibrary,
|
|
19
|
+
NumericContent
|
|
20
|
+
) => {
|
|
21
|
+
"use strict";
|
|
22
|
+
|
|
23
|
+
// shortcut for sap.m.ValueColor
|
|
24
|
+
const ValueColor = mobileLibrary.ValueColor;
|
|
25
|
+
|
|
26
|
+
return View.extend("sap.ushell_abap.components.tiles.applauncherdynamic.DynamicTile", {
|
|
27
|
+
getControllerName: function () {
|
|
28
|
+
return "sap.ushell_abap.components.tiles.applauncherdynamic.DynamicTile";
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
createContent: function () {
|
|
32
|
+
this.setHeight("100%");
|
|
33
|
+
this.setWidth("100%");
|
|
34
|
+
|
|
35
|
+
return this.getTileControl();
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
getTileControl: function () {
|
|
39
|
+
const oController = this.getController();
|
|
40
|
+
|
|
41
|
+
// Return the GenericTile if it already exists instead of creating a new one
|
|
42
|
+
if (this.getContent().length === 1) {
|
|
43
|
+
return this.getContent()[0];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return new GenericTile({
|
|
47
|
+
mode: "{/mode}",
|
|
48
|
+
frameType: "{/frameType}",
|
|
49
|
+
header: "{/data/display_title_text}",
|
|
50
|
+
subheader: "{/data/display_subtitle_text}",
|
|
51
|
+
sizeBehavior: "{/sizeBehavior}",
|
|
52
|
+
wrappingType: "{/wrappingType}",
|
|
53
|
+
appShortcut: "{/config/display_transaction_code_effective}",
|
|
54
|
+
url: {
|
|
55
|
+
parts: ["/targetURL", "/nav/navigation_target_url"],
|
|
56
|
+
formatter: oController.formatters.leanURL
|
|
57
|
+
},
|
|
58
|
+
tileContent: [new TileContent({
|
|
59
|
+
footer: "{/data/display_info_text}",
|
|
60
|
+
footerColor: {
|
|
61
|
+
path: "/data/display_info_state",
|
|
62
|
+
formatter: function (sFooterColor) {
|
|
63
|
+
if (sFooterColor === "Positive") {
|
|
64
|
+
sFooterColor = ValueColor.Good;
|
|
65
|
+
}
|
|
66
|
+
if (sFooterColor === "Negative") {
|
|
67
|
+
sFooterColor = ValueColor.Error;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (!ValueColor[sFooterColor]) {
|
|
71
|
+
sFooterColor = ValueColor.Neutral;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return sFooterColor;
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
unit: "{/data/display_number_unit}",
|
|
78
|
+
// We'll utilize NumericContent for the "Dynamic" content.
|
|
79
|
+
content: [new NumericContent({
|
|
80
|
+
scale: "{/data/display_number_factor}",
|
|
81
|
+
value: "{/data/display_number_value}",
|
|
82
|
+
truncateValueTo: 5, // Otherwise, The default value is 4.
|
|
83
|
+
indicator: "{/data/display_state_arrow}",
|
|
84
|
+
valueColor: {
|
|
85
|
+
path: "/data/display_number_state",
|
|
86
|
+
formatter: function (sState) {
|
|
87
|
+
if (!sState || sState === "Neutral" || !ValueColor[sState]) {
|
|
88
|
+
return ValueColor.None;
|
|
89
|
+
}
|
|
90
|
+
return sState;
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
icon: "{/data/display_icon_url}",
|
|
94
|
+
width: "100%",
|
|
95
|
+
withMargin: false
|
|
96
|
+
})]
|
|
97
|
+
})],
|
|
98
|
+
press: [oController.onPress, oController]
|
|
99
|
+
});
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
getMode: function () {
|
|
103
|
+
return this.getModel().getProperty("/mode");
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
@@ -13,6 +13,13 @@ sap.ui.define([
|
|
|
13
13
|
) => {
|
|
14
14
|
"use strict";
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* @namespace sap.ushell_abap.api
|
|
18
|
+
* @since 1.154.0
|
|
19
|
+
* @private
|
|
20
|
+
* @ui5-restricted
|
|
21
|
+
*/
|
|
22
|
+
|
|
16
23
|
/**
|
|
17
24
|
* @namespace sap.ushell_abap.components
|
|
18
25
|
* @since 1.121.0
|
|
@@ -32,11 +39,15 @@ sap.ui.define([
|
|
|
32
39
|
const ushellAbapLib = Library.init({
|
|
33
40
|
name: "sap.ushell_abap",
|
|
34
41
|
apiVersion: 2,
|
|
35
|
-
version: "1.
|
|
42
|
+
version: "1.154.0",
|
|
36
43
|
dependencies: [
|
|
37
44
|
"sap.ui.core",
|
|
38
45
|
"sap.m",
|
|
39
46
|
"sap.ushell"
|
|
47
|
+
],
|
|
48
|
+
controls: [
|
|
49
|
+
"sap.ushell_abap.ui.VisualizationInstantiation.VizInstanceAbap",
|
|
50
|
+
"sap.ushell_abap.ui.VisualizationInstantiation.VizInstanceAbapLink"
|
|
40
51
|
]
|
|
41
52
|
});
|
|
42
53
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
#
|
|
2
|
-
#__ldi.translation.uuid=865e4af1-8cca-465c-8b85-97f19b98ef6a
|
|
1
|
+
# Resource bundle for the "sap.ushell_abap" library
|
|
2
|
+
# __ldi.translation.uuid=865e4af1-8cca-465c-8b85-97f19b98ef6a
|
|
3
3
|
|
|
4
4
|
#XBUT: Close button for the SAML authentication dialog
|
|
5
5
|
samlCloseBtn=Close
|
|
6
|
+
|
|
6
7
|
#XTIT: Title of the SAML authentication dialog
|
|
7
8
|
samlDialogTitle=Authentication Information
|
|
9
|
+
|
|
10
|
+
#XTXT: Fallback text shown on tiles without transaction code
|
|
11
|
+
tileTransactionCodeNotMaintained=No Transaction
|
|
@@ -544,9 +544,13 @@ sap.ui.define([
|
|
|
544
544
|
};
|
|
545
545
|
const oImplementation = oDefinition.implementation.sapui5;
|
|
546
546
|
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
|
|
547
|
+
const sBaseChipId = this.getBaseChipId() || this.getId(); // base chip id might be empty fallback to actual id
|
|
548
|
+
const bIsStandardChip = [
|
|
549
|
+
"X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER",
|
|
550
|
+
"X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER"
|
|
551
|
+
].includes(sBaseChipId);
|
|
552
|
+
|
|
553
|
+
if (!bIsStandardChip) {
|
|
550
554
|
if (oImplementation.$VirtualNamespace) {
|
|
551
555
|
oImplementation.$absolutePath = this.toAbsoluteUrl(oImplementation.basePath);
|
|
552
556
|
sap.ui.loader.config({ paths: JSON.parse(`{"${oImplementation.$Namespace.replace(/\./g, "/")}":"${oImplementation.$absolutePath}"}`) });
|
|
@@ -117,7 +117,7 @@ sap.ui.define([
|
|
|
117
117
|
const S_STICKY_SESSION_HEADER = "saplb"; // header to check during sticky session
|
|
118
118
|
let aBatchQueue; // corresponds to data.__batchRequests
|
|
119
119
|
let bChangeSetOpen; // whether a change set is currently open at the end of our batch queue
|
|
120
|
-
let aDeferredQueue; //
|
|
120
|
+
let aDeferredQueue; // Deferreds objects corresponding to each request
|
|
121
121
|
const that = this;
|
|
122
122
|
// eslint-disable-next-line prefer-const
|
|
123
123
|
let sBaseUrl;
|
|
@@ -758,7 +758,7 @@ sap.ui.define([
|
|
|
758
758
|
* cannot be parsed or is not returned in the OData error response.<br />
|
|
759
759
|
*
|
|
760
760
|
* <b>NOTE:</b> the second parameter is returned since version 1.28.6.
|
|
761
|
-
* @param {
|
|
761
|
+
* @param {PromiseWithResolvers<any>} [oDeferred] Deferred object from Promise.withResolvers
|
|
762
762
|
* @param {object} oError
|
|
763
763
|
* error object provided by datajs, should contain the response
|
|
764
764
|
*
|
|
@@ -859,9 +859,7 @@ sap.ui.define([
|
|
|
859
859
|
* Defaults to the OData service facade's default error handler
|
|
860
860
|
* ({@link sap.ushell_abap.pbServices.ui2.ODataService#getDefaultErrorHandler})
|
|
861
861
|
* @param {boolean} [bCache=false]
|
|
862
|
-
* whether the response is cached for further calls (since 1.11.0)
|
|
863
|
-
* <code>OData.read.$cache</code>, a <code>Utils.Map</code> from
|
|
864
|
-
* <code>sRequestUrl</code> to a <code>jQuery.Deferred</code> object created on demand;
|
|
862
|
+
* whether the response is cached for further calls (since 1.11.0).
|
|
865
863
|
* without this flag, the cache is neither written nor read!
|
|
866
864
|
*
|
|
867
865
|
* @public
|
|
@@ -4,13 +4,15 @@
|
|
|
4
4
|
* @fileOverview The <code>configuration</code> contract.
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
|
+
"sap/base/Log",
|
|
7
8
|
"sap/ushell_abap/pbServices/ui2/Chip",
|
|
8
9
|
"sap/ushell_abap/base/Ui2Error",
|
|
9
|
-
"sap/ushell_abap/
|
|
10
|
+
"sap/ushell_abap/utils/UserPersonalization"
|
|
10
11
|
], (
|
|
12
|
+
Log,
|
|
11
13
|
Chip,
|
|
12
14
|
SrvcError,
|
|
13
|
-
|
|
15
|
+
UserPersonalization
|
|
14
16
|
) => {
|
|
15
17
|
"use strict";
|
|
16
18
|
|
|
@@ -43,6 +45,28 @@ sap.ui.define([
|
|
|
43
45
|
return oChipInstance.getConfigurationParameter(sParameterName);
|
|
44
46
|
};
|
|
45
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Returns the transaction code of the configuration parameter for the CHIP instance.
|
|
50
|
+
* This is a convenience method for the special configuration parameter "display_transaction_code".
|
|
51
|
+
*
|
|
52
|
+
* @name chip.configuration.getTransactionCode
|
|
53
|
+
* @function
|
|
54
|
+
* @since 1.153.0
|
|
55
|
+
* @returns {Promise<string>}
|
|
56
|
+
* the parameter transaction code value
|
|
57
|
+
*/
|
|
58
|
+
this.getTransactionCode = async function () {
|
|
59
|
+
const sTileConfiguration = oChipInstance.getConfigurationParameter("tileConfiguration");
|
|
60
|
+
let sTCode;
|
|
61
|
+
try {
|
|
62
|
+
sTCode = JSON.parse(sTileConfiguration || "{}").display_transaction_code || "";
|
|
63
|
+
} catch (oError) {
|
|
64
|
+
Log.error("Failed to parse tile configuration for transaction code:", oError, "sap.ushell_abap.pbServices.ui2.contracts.configuration");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return UserPersonalization.formatTransactionCode(sTCode);
|
|
68
|
+
};
|
|
69
|
+
|
|
46
70
|
/**
|
|
47
71
|
* Usually the Page Builder does not know about the internals of a CHIP, but there are special
|
|
48
72
|
* CHIPs (e.g. SAP Fiori Launchpad app launcher tiles, also serving as bookmark tiles) the
|
|
@@ -67,10 +91,14 @@ sap.ui.define([
|
|
|
67
91
|
// The FLP directly changes the configuration data of the bookmark tile and can notify the bookmark
|
|
68
92
|
// tiles afterwards about the changes, so the bookmark tiles can update themselves with the new data.
|
|
69
93
|
if (typeof fnHandler !== "function") {
|
|
70
|
-
throw new SrvcError("The given handler is not a function",
|
|
71
|
-
"chip.configuration");
|
|
94
|
+
throw new SrvcError("The given handler is not a function", "chip.configuration");
|
|
72
95
|
}
|
|
73
96
|
fnUpdatedHandler = fnHandler;
|
|
97
|
+
|
|
98
|
+
// additionally attach to changes on the display transaction code setting
|
|
99
|
+
UserPersonalization.attachDisplayTransactionCodeChanged(() => {
|
|
100
|
+
fnHandler(["tileConfiguration"]);
|
|
101
|
+
});
|
|
74
102
|
};
|
|
75
103
|
|
|
76
104
|
/**
|
|
@@ -101,6 +129,28 @@ sap.ui.define([
|
|
|
101
129
|
if (fnUpdatedHandler) {
|
|
102
130
|
fnUpdatedHandler(aUpdatedConfigKeys);
|
|
103
131
|
}
|
|
132
|
+
},
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Returns the transaction code of the configuration parameter for the CHIP instance.
|
|
136
|
+
* This is a convenience method for the special configuration parameter "display_transaction_code".
|
|
137
|
+
*
|
|
138
|
+
* @name contract.configuration.getTransactionCode
|
|
139
|
+
* @function
|
|
140
|
+
* @since 1.153.0
|
|
141
|
+
* @returns {Promise<string>}
|
|
142
|
+
* the parameter transaction code value
|
|
143
|
+
*/
|
|
144
|
+
getTransactionCode: async function () {
|
|
145
|
+
const sTileConfiguration = oChipInstance.getConfigurationParameter("tileConfiguration");
|
|
146
|
+
let sTCode;
|
|
147
|
+
try {
|
|
148
|
+
sTCode = JSON.parse(sTileConfiguration || "{}").display_transaction_code || "";
|
|
149
|
+
} catch (oError) {
|
|
150
|
+
Log.error("Failed to parse tile configuration for transaction code:", oError, "sap.ushell_abap.pbServices.ui2.contracts.configuration");
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return UserPersonalization.formatTransactionCode(sTCode);
|
|
104
154
|
}
|
|
105
155
|
};
|
|
106
156
|
});
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
*
|
|
10
10
|
* Configured with the ClientSideTargetResolutionAdapter.
|
|
11
11
|
*
|
|
12
|
-
* @version 1.
|
|
12
|
+
* @version 1.154.0
|
|
13
13
|
*/
|
|
14
14
|
sap.ui.define([
|
|
15
|
+
"sap/ui/core/Lib",
|
|
15
16
|
"sap/ushell/base/promisify",
|
|
16
|
-
"sap/ushell/resources",
|
|
17
17
|
"sap/ushell/utils/LaunchpadError"
|
|
18
18
|
], (
|
|
19
|
+
Lib,
|
|
19
20
|
promisify,
|
|
20
|
-
ushellResources,
|
|
21
21
|
LaunchpadError
|
|
22
22
|
) => {
|
|
23
23
|
"use strict";
|
|
@@ -111,7 +111,7 @@ sap.ui.define([
|
|
|
111
111
|
oError.message,
|
|
112
112
|
{
|
|
113
113
|
component: this.S_COMPONENT_NAME,
|
|
114
|
-
description:
|
|
114
|
+
description: Lib.getResourceBundleFor("sap.ushell").getText("NavigationDataProvider.CannotLoadData"),
|
|
115
115
|
detail: oError
|
|
116
116
|
},
|
|
117
117
|
oError
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @fileOverview Helper class wrapping a CHIP instance for use inside a VizInstance.
|
|
5
|
+
* @version 1.154.0
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/base/Log",
|
|
9
|
+
"sap/m/library",
|
|
10
|
+
"sap/ushell/Container",
|
|
11
|
+
"sap/ushell/library",
|
|
12
|
+
"sap/ushell/utils/chipsUtils"
|
|
13
|
+
], (
|
|
14
|
+
Log,
|
|
15
|
+
mobileLibrary,
|
|
16
|
+
Container,
|
|
17
|
+
ushellLibrary,
|
|
18
|
+
chipsUtils
|
|
19
|
+
) => {
|
|
20
|
+
"use strict";
|
|
21
|
+
|
|
22
|
+
// shortcut for sap.m.LoadState
|
|
23
|
+
const LoadState = mobileLibrary.LoadState;
|
|
24
|
+
|
|
25
|
+
// shortcut for sap.ushell.DisplayFormat
|
|
26
|
+
const DisplayFormat = ushellLibrary.DisplayFormat;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @alias sap.ushell_abap.ui.VisualizationInstantiation.ChipInstanceWrapper
|
|
30
|
+
* @class
|
|
31
|
+
* @classdesc Helper class to manage the lifecycle of a CHIP instance inside a VizInstance.
|
|
32
|
+
* Coordinates chip creation, loading, visibility, and type detection.
|
|
33
|
+
*
|
|
34
|
+
* @since 1.154.0
|
|
35
|
+
* @private
|
|
36
|
+
*/
|
|
37
|
+
class ChipInstanceWrapper {
|
|
38
|
+
#oLoadDeferred = Promise.withResolvers();
|
|
39
|
+
#oChipInstanceDeferred = Promise.withResolvers();
|
|
40
|
+
#oChipInstance;
|
|
41
|
+
#oInstantiationData;
|
|
42
|
+
#oTargetControl;
|
|
43
|
+
#bInitialized = false;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @param {sap.ushell.ui.launchpad.VizInstanceBase} oTargetControl The VizInstance that owns this wrapper.
|
|
47
|
+
*/
|
|
48
|
+
constructor (oTargetControl) {
|
|
49
|
+
this.#oTargetControl = oTargetControl;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initializes the CHIP instance from the provided instantiation data.
|
|
54
|
+
* No-op if called more than once.
|
|
55
|
+
*
|
|
56
|
+
* @param {object} oInstantiationData The instantiation data from the visualization.
|
|
57
|
+
* @returns {Promise<undefined>} Resolves when the CHIP instance is created.
|
|
58
|
+
* @since 1.154.0
|
|
59
|
+
* @private
|
|
60
|
+
*/
|
|
61
|
+
async init (oInstantiationData) {
|
|
62
|
+
if (this.#bInitialized) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
this.#oInstantiationData = oInstantiationData;
|
|
67
|
+
this.#bInitialized = true;
|
|
68
|
+
|
|
69
|
+
const PageBuilding = await Container.getServiceAsync("PageBuilding");
|
|
70
|
+
const oFactory = PageBuilding.getFactory();
|
|
71
|
+
|
|
72
|
+
let oRawChipInstanceData;
|
|
73
|
+
let oBags;
|
|
74
|
+
|
|
75
|
+
if (!this.#oInstantiationData.simplifiedChipFormat) {
|
|
76
|
+
oRawChipInstanceData = {
|
|
77
|
+
chipId: this.#oInstantiationData?.chip?.id,
|
|
78
|
+
chip: this.#oInstantiationData?.chip
|
|
79
|
+
};
|
|
80
|
+
} else {
|
|
81
|
+
const oSimplifiedChip = this.#oInstantiationData?.chip || {};
|
|
82
|
+
oBags = oSimplifiedChip?.bags;
|
|
83
|
+
oRawChipInstanceData = {
|
|
84
|
+
chipId: oSimplifiedChip?.chipId,
|
|
85
|
+
// string is expected
|
|
86
|
+
configuration: oSimplifiedChip?.configuration ? JSON.stringify(oSimplifiedChip?.configuration) : "{}"
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const oChipInstance = oFactory.createChipInstance(oRawChipInstanceData);
|
|
91
|
+
|
|
92
|
+
chipsUtils.addBagDataToChipInstance(oChipInstance, oBags);
|
|
93
|
+
this.#oChipInstanceDeferred.resolve(oChipInstance);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* A function which sets the content of the VizInstance to a UI5 view.
|
|
98
|
+
* @returns {Promise<undefined>} Resolves when the chip instance is loaded.
|
|
99
|
+
*
|
|
100
|
+
* @since 1.154.0
|
|
101
|
+
* @private
|
|
102
|
+
*/
|
|
103
|
+
async load () {
|
|
104
|
+
try {
|
|
105
|
+
this.#oChipInstance = await this.#oChipInstanceDeferred.promise;
|
|
106
|
+
await new Promise(this.#oChipInstance.load);
|
|
107
|
+
|
|
108
|
+
if (this.#oTargetControl.getPreview()) {
|
|
109
|
+
const oPreviewContract = this.#oChipInstance.getContract("preview");
|
|
110
|
+
// the preview contract doesn't have to be implemented as it might just not be needed
|
|
111
|
+
// e.g. for tiles that don't display any dynamic data anyway
|
|
112
|
+
if (oPreviewContract) {
|
|
113
|
+
oPreviewContract.setEnabled(true);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// apply current visibility, default for chips is visible
|
|
117
|
+
// this might lead to instant requests when tileView is fetched
|
|
118
|
+
this.setVisible(this.#oTargetControl.getActive());
|
|
119
|
+
|
|
120
|
+
const oChipControl = await this.#oChipInstance.getImplementationAsSapui5Async();
|
|
121
|
+
|
|
122
|
+
this.#setChipInstanceType();
|
|
123
|
+
this.#oTargetControl.setContent?.(oChipControl);
|
|
124
|
+
// Fix parent relation for the component instance to make GridContainer DnD work
|
|
125
|
+
// BCP: 2170186464
|
|
126
|
+
if (oChipControl.getComponentInstance?.()) {
|
|
127
|
+
oChipControl.getComponentInstance().setParent(this.#oTargetControl);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
this.#oLoadDeferred.resolve();
|
|
131
|
+
} catch (oError) {
|
|
132
|
+
this.#oTargetControl.setState(LoadState.Failed);
|
|
133
|
+
|
|
134
|
+
this.#oLoadDeferred.reject(oError);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return this.loaded();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* @returns {Promise<undefined>} Resolves when the chip instance has finished loading.
|
|
142
|
+
* @since 1.154.0
|
|
143
|
+
* @private
|
|
144
|
+
*/
|
|
145
|
+
loaded () {
|
|
146
|
+
return this.#oLoadDeferred.promise;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Returns the transaction code from the inner CHIP instance
|
|
151
|
+
* Requires {@link #load} to be called first.
|
|
152
|
+
*
|
|
153
|
+
* @returns {Promise<string>} Resolves the transaction code to display.
|
|
154
|
+
*
|
|
155
|
+
* @since 1.154.0
|
|
156
|
+
* @private
|
|
157
|
+
*/
|
|
158
|
+
async getTransactionCode () {
|
|
159
|
+
await this.#oLoadDeferred.promise;
|
|
160
|
+
|
|
161
|
+
return chipsUtils.getCatalogTileTransactionCode(this.#oChipInstance);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Sets the display format of the CHIP instance via the instance's types contract
|
|
166
|
+
*
|
|
167
|
+
* @since 1.154.0
|
|
168
|
+
*/
|
|
169
|
+
#setChipInstanceType () {
|
|
170
|
+
const oTypesContract = this.#oChipInstance.getContract("types");
|
|
171
|
+
if (oTypesContract) {
|
|
172
|
+
oTypesContract.setType(this.#mapDisplayFormatToChip(this.#oTargetControl.getDisplayFormat()));
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Maps the display format to the CHIP type
|
|
178
|
+
*
|
|
179
|
+
* @param {DisplayFormat} sDisplayFormat The display format to be mapped
|
|
180
|
+
* @returns {string} The appropriate type
|
|
181
|
+
* @since 1.154.0
|
|
182
|
+
*/
|
|
183
|
+
#mapDisplayFormatToChip (sDisplayFormat) {
|
|
184
|
+
const oDisplayFormatMapping = {};
|
|
185
|
+
|
|
186
|
+
oDisplayFormatMapping[DisplayFormat.Standard] = "tile";
|
|
187
|
+
oDisplayFormatMapping[DisplayFormat.StandardWide] = "tile";
|
|
188
|
+
const oTypesContract = this.#oChipInstance && !this.#oChipInstance.isStub() && this.#oChipInstance.getContract("types");
|
|
189
|
+
if (oTypesContract && oTypesContract.getAvailableTypes().includes("tilewide")) {
|
|
190
|
+
oDisplayFormatMapping[DisplayFormat.StandardWide] = "tilewide";
|
|
191
|
+
}
|
|
192
|
+
oDisplayFormatMapping[DisplayFormat.Compact] = "link";
|
|
193
|
+
oDisplayFormatMapping[DisplayFormat.Flat] = "flat";
|
|
194
|
+
oDisplayFormatMapping[DisplayFormat.FlatWide] = "flatwide";
|
|
195
|
+
|
|
196
|
+
return oDisplayFormatMapping[sDisplayFormat];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Updates the chip instance's visibility if the contract is active.
|
|
201
|
+
*
|
|
202
|
+
* @param {boolean} visible The visibility state to be set
|
|
203
|
+
* @since 1.154.0
|
|
204
|
+
*/
|
|
205
|
+
setVisible (visible) {
|
|
206
|
+
const oVisibleContract = this.#oChipInstance && !this.#oChipInstance.isStub() && this.#oChipInstance.getContract("visible");
|
|
207
|
+
|
|
208
|
+
if (oVisibleContract) {
|
|
209
|
+
oVisibleContract.setVisible(visible);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Refreshes the chip instance's data
|
|
215
|
+
*
|
|
216
|
+
* @since 1.154.0
|
|
217
|
+
*/
|
|
218
|
+
refresh () {
|
|
219
|
+
// The CHIP instance is only available after the VizInstance was loaded
|
|
220
|
+
if (this.#oChipInstance) {
|
|
221
|
+
// The refresh handler is provided directly on the CHIP instance and not as contract
|
|
222
|
+
this.#oChipInstance.refresh();
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Returns whether the VizInstance is a standard tile type.
|
|
228
|
+
* @returns {boolean} Whether the VizInstance is standard.
|
|
229
|
+
*
|
|
230
|
+
* @since 1.154.0
|
|
231
|
+
* @private
|
|
232
|
+
*/
|
|
233
|
+
isStandardType () {
|
|
234
|
+
// check whether the chip instance is a standard tile or a custom tile based on the base chip ID.
|
|
235
|
+
// simplified format -> chip.chipId, non-simplified (raw) format -> chip.baseChipId
|
|
236
|
+
if (!this.#oInstantiationData?.chip) {
|
|
237
|
+
Log.warning("VizInstanceAbap: No instantiation data available to determine whether the VizInstance is a standard tile or a custom tile.");
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
const sBaseChipId = this.#oInstantiationData.simplifiedChipFormat
|
|
241
|
+
? this.#oInstantiationData.chip.chipId
|
|
242
|
+
: this.#oInstantiationData.chip.baseChipId;
|
|
243
|
+
return chipsUtils.isStandardTile(sBaseChipId);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
return ChipInstanceWrapper;
|
|
248
|
+
});
|