@sapui5/sap.ushell_abap 1.150.1 → 1.152.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.
Files changed (53) hide show
  1. package/package.json +1 -1
  2. package/src/main/js/sap/ushell_abap/.library +1 -1
  3. package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +30 -31
  4. package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +5 -5
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +19 -24
  6. package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
  7. package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +1 -1
  8. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +31 -41
  9. package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +434 -559
  10. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  12. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
  13. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1 -1
  15. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +2 -2
  16. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
  17. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  18. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +4 -4
  19. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  20. package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +119 -125
  21. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +27 -33
  22. package/src/main/js/sap/ushell_abap/base/Ui2Error.js +46 -0
  23. package/src/main/js/sap/ushell_abap/base/Ui2Utils.js +710 -0
  24. package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad.js +6 -0
  25. package/src/main/js/sap/ushell_abap/bootstrap/PageSetsRequestHandler.js +26 -51
  26. package/src/main/js/sap/ushell_abap/bootstrap/SAPCompanionConditionSetter.js +1 -3
  27. package/src/main/js/sap/ushell_abap/bootstrap/StartupRequestHandler.js +6 -6
  28. package/src/main/js/sap/ushell_abap/bootstrap/abapConstants.js +1 -0
  29. package/src/main/js/sap/ushell_abap/integration/fileshares/NavTargetResolutionFileShareSupport.js +3 -1
  30. package/src/main/js/sap/ushell_abap/library.js +1 -1
  31. package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +1 -1
  32. package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +2 -2
  33. package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +71 -45
  34. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +55 -66
  35. package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +1 -1
  36. package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +4 -4
  37. package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +5 -37
  38. package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +3 -3
  39. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +2 -2
  40. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +66 -81
  41. package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +14 -17
  42. package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +2 -2
  43. package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +2 -2
  44. package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +5 -703
  45. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +1 -1
  46. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/bag.js +3 -3
  47. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +3 -3
  48. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +11 -3
  49. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/search.js +3 -3
  50. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/visible.js +1 -1
  51. package/src/main/js/sap/ushell_abap/services/NavigationDataProvider.js +126 -0
  52. package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +19 -18
  53. package/ui5.yaml +7 -6
@@ -6,7 +6,7 @@
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ushell_abap/pbServices/ui2/Chip",
9
- "sap/ushell_abap/pbServices/ui2/Error",
9
+ "sap/ushell_abap/base/Ui2Error",
10
10
  "sap/base/Log"
11
11
  ], (
12
12
  Chip,
@@ -5,8 +5,8 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ushell_abap/pbServices/ui2/Chip",
8
- "sap/ushell_abap/pbServices/ui2/Utils",
9
- "sap/ushell_abap/pbServices/ui2/Error"
8
+ "sap/ushell_abap/base/Ui2Utils",
9
+ "sap/ushell_abap/base/Ui2Error"
10
10
  ], (
11
11
  Chip,
12
12
  Utils,
@@ -134,7 +134,7 @@ sap.ui.define([
134
134
  * @see chip.bag.attachBagsUpdated
135
135
  */
136
136
  fireBagsUpdated: function (aUpdatedBagIds) {
137
- if (!Utils.isArray(aUpdatedBagIds) || aUpdatedBagIds.length < 1) {
137
+ if (!Array.isArray(aUpdatedBagIds) || aUpdatedBagIds.length < 1) {
138
138
  throw new SrvcError("At least one bag ID must be given", "contract.bag");
139
139
  }
140
140
  if (fnBagsUpdatedHandler) {
@@ -5,8 +5,8 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ushell_abap/pbServices/ui2/Chip",
8
- "sap/ushell_abap/pbServices/ui2/Error",
9
- "sap/ushell_abap/pbServices/ui2/Utils"
8
+ "sap/ushell_abap/base/Ui2Error",
9
+ "sap/ushell_abap/base/Ui2Utils"
10
10
  ], (
11
11
  Chip,
12
12
  SrvcError,
@@ -94,7 +94,7 @@ sap.ui.define([
94
94
  * @see chip.configuration.attachBagsUpdated
95
95
  */
96
96
  fireConfigurationUpdated: function (aUpdatedConfigKeys) {
97
- if (!Utils.isArray(aUpdatedConfigKeys) || aUpdatedConfigKeys.length < 1) {
97
+ if (!Array.isArray(aUpdatedConfigKeys) || aUpdatedConfigKeys.length < 1) {
98
98
  throw new SrvcError("At least one configuration property key must be given",
99
99
  "contract.configuration");
100
100
  }
@@ -4,9 +4,11 @@
4
4
  * @fileOverview The <code>configurationUi</code> contract.
5
5
  */
6
6
  sap.ui.define([
7
+ "sap/ushell/utils/toDeferred",
7
8
  "sap/ushell_abap/pbServices/ui2/Chip",
8
- "sap/ushell_abap/pbServices/ui2/Error"
9
+ "sap/ushell_abap/base/Ui2Error"
9
10
  ], (
11
+ toDeferred,
10
12
  Chip,
11
13
  SrvcError
12
14
  ) => {
@@ -273,7 +275,7 @@ sap.ui.define([
273
275
  /**
274
276
  * Fires the "save" event on this CHIP instance's configuration UI.
275
277
  *
276
- * @returns {object}
278
+ * @returns {jQuery.Promise|undefined}
277
279
  * a <code>jQuery.Deferred</code> object's promise as returned by the "save" event handler
278
280
  *
279
281
  * @name contract.configurationUi.fireSave
@@ -283,7 +285,13 @@ sap.ui.define([
283
285
  * @see chip.configurationUi.attachSave
284
286
  */
285
287
  fireSave: function () {
286
- return fnSaveHandler ? fnSaveHandler() : undefined;
288
+ if (!fnSaveHandler) {
289
+ return;
290
+ }
291
+ const vReturnValue = fnSaveHandler();
292
+ if (vReturnValue) {
293
+ return toDeferred(vReturnValue);
294
+ }
287
295
  },
288
296
 
289
297
  /**
@@ -5,8 +5,8 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/ushell_abap/pbServices/ui2/Chip",
8
- "sap/ushell_abap/pbServices/ui2/Error",
9
- "sap/ushell_abap/pbServices/ui2/Utils"
8
+ "sap/ushell_abap/base/Ui2Error",
9
+ "sap/ushell_abap/base/Ui2Utils"
10
10
  ], (
11
11
  Chip,
12
12
  SrvcError,
@@ -37,7 +37,7 @@ sap.ui.define([
37
37
  * the keywords of this CHIP
38
38
  */
39
39
  this.setKeywords = function (aNewKeywords) {
40
- if (!Utils.isArray(aNewKeywords)) {
40
+ if (!Array.isArray(aNewKeywords)) {
41
41
  throw new SrvcError(`Not an array: ${aNewKeywords}`, "chip.search");
42
42
  }
43
43
  aKeywords = aNewKeywords.slice();
@@ -5,7 +5,7 @@
5
5
  */
6
6
  sap.ui.require([
7
7
  "sap/ushell_abap/pbServices/ui2/Chip",
8
- "sap/ushell_abap/pbServices/ui2/Error",
8
+ "sap/ushell_abap/base/Ui2Error",
9
9
  "sap/base/Log"
10
10
  ], (
11
11
  Chip,
@@ -0,0 +1,126 @@
1
+ // Copyright (c) 2009-2026 SAP SE, All Rights Reserved
2
+
3
+ /**
4
+ * @fileOverview This module prepares the navigation data.
5
+ *
6
+ * It provides the inbound and systemAlias data for both the pages runtime
7
+ * and the direct app launch by transaction code in module TCodeNavigation.
8
+ * Only used on the ABAP platform and on local for testing.
9
+ *
10
+ * Configured with the ClientSideTargetResolutionAdapter.
11
+ *
12
+ * @version 1.152.0
13
+ */
14
+ sap.ui.define([
15
+ "sap/ushell/base/promisify",
16
+ "sap/ushell/resources",
17
+ "sap/ushell/utils/LaunchpadError"
18
+ ], (
19
+ promisify,
20
+ ushellResources,
21
+ LaunchpadError
22
+ ) => {
23
+ "use strict";
24
+
25
+ /**
26
+ * @alias sap.ushell_abap.services.NavigationDataProvider
27
+ * @class
28
+ * @classdesc The Unified Shell's NavigationDataProvider service.
29
+ *
30
+ * <b>Note:</b> To retrieve a valid instance of this service, it is necessary to call {@link sap.ushell.Container#getServiceAsync}.
31
+ * <pre>
32
+ * sap.ui.require(["sap/ushell/Container"], async function (Container) {
33
+ * const NavigationDataProvider = await Container.getServiceAsync("NavigationDataProvider");
34
+ * // do something with the NavigationDataProvider service
35
+ * });
36
+ * </pre>
37
+ *
38
+ * @hideconstructor
39
+ *
40
+ * @since 1.68.0
41
+ * @private
42
+ */
43
+ function NavigationDataProvider (/* adapter, serviceConfiguration */) {
44
+ this.S_COMPONENT_NAME = "sap.ushell_abap.services.NavigationDataProvider";
45
+ this._init.apply(this, arguments);
46
+ }
47
+
48
+ /**
49
+ * Private initializer.
50
+ *
51
+ * @param {object} adapter
52
+ * the navigation data provider adapter for the frontend server
53
+ * @param {object} serviceConfiguration
54
+ * the navigation data provider service configuration
55
+ *
56
+ * @since 1.68.0
57
+ * @private
58
+ */
59
+ NavigationDataProvider.prototype._init = function (adapter, serviceConfiguration) {
60
+ this.oAdapter = adapter;
61
+ };
62
+
63
+ /**
64
+ * An object representing navigation data containing inbounds and available system aliases.
65
+ * @typedef {object} NavigationData
66
+ * @property {object[]} object.inbounds The inbounds.
67
+ * @property {object} object.systemAliases The system aliases.
68
+ */
69
+
70
+ /**
71
+ * @typedef {sap.ushell_abap.adapters.abap.ClientSideTargetResolutionAdapter.TargetMapping & {
72
+ * isDefaultLadi: boolean,
73
+ * ladiHasTiles: boolean,
74
+ * defaultTileParams: string,
75
+ * resolutionResult: sap.ushell.services.ClientSideTargetResolution.ResolutionResult
76
+ * }} sap.ushell.services.NavigationDataProvider.ABAPInbound
77
+ *
78
+ * @property {boolean} isDefaultLadi Indicates whether the LADI/Target Mapping is default.
79
+ * @property {boolean} ladiHasTiles Indicates whether the LADI/Target Mapping has tiles.
80
+ * @property {string} defaultTileParams The default tile parameters of the LADI/Target Mapping.
81
+ * @property {sap.ushell.services.ClientSideTargetResolution.ResolutionResult} resolutionResult The inbound resolutionResult containing the abap transaction code.
82
+ *
83
+ * @since 1.146.0
84
+ * @private
85
+ */
86
+
87
+ /**
88
+ * Loads and returns the relevant navigation data.
89
+ *
90
+ * The ClientSideTargetResolutionAdapter's getEnhancedInbounds method is called to retrieve the inbounds,
91
+ * which includes ABAP-specific properties such as isDefaultLadi and ladiHasTiles.
92
+ *
93
+ * @returns {Promise<NavigationData>} The navigation data.
94
+ *
95
+ * @since 1.68.0
96
+ * @private
97
+ */
98
+ NavigationDataProvider.prototype.getNavigationData = function () {
99
+ return new Promise((resolve, reject) => {
100
+ const oSystemAliases = (this.oAdapter.getSystemAliases && this.oAdapter.getSystemAliases()) || {};
101
+
102
+ promisify(this.oAdapter.getEnhancedInbounds())
103
+ .then((aInbounds) => {
104
+ resolve({
105
+ systemAliases: oSystemAliases,
106
+ inbounds: aInbounds
107
+ });
108
+ })
109
+ .catch((oError) => {
110
+ const oEnhancedError = new LaunchpadError(
111
+ oError.message,
112
+ {
113
+ component: this.S_COMPONENT_NAME,
114
+ description: ushellResources.i18n.getText("NavigationDataProvider.CannotLoadData"),
115
+ detail: oError
116
+ },
117
+ oError
118
+ );
119
+ reject(oEnhancedError);
120
+ });
121
+ });
122
+ };
123
+
124
+ NavigationDataProvider.hasNoAdapter = false;
125
+ return NavigationDataProvider;
126
+ });
@@ -5,11 +5,13 @@
5
5
  sap.ui.define([
6
6
  "sap/base/Log",
7
7
  "sap/ui/thirdparty/URI",
8
- "sap/ui/thirdparty/jquery"
8
+ "sap/ui/thirdparty/jquery",
9
+ "sap/ushell/base/promisify"
9
10
  ], (
10
11
  Log,
11
12
  URI,
12
- jQuery
13
+ jQuery,
14
+ promisify
13
15
  ) => {
14
16
  "use strict";
15
17
 
@@ -38,30 +40,29 @@ sap.ui.define([
38
40
  return new Error("Cannot load app info - no app-id provided and URL parameter 'sap-ui-app-id' not set");
39
41
  };
40
42
 
41
- AppInfoAdapter.prototype._loadAppIndexData = function (sServiceUrl, sAppId) {
43
+ AppInfoAdapter.prototype._loadAppIndexData = async function (sServiceUrl, sAppId) {
42
44
  const sUri = new URI(sServiceUrl).query({
43
45
  id: sAppId
44
46
  }).toString();
45
47
 
46
- return new Promise((resolve, reject) => {
47
- jQuery.ajax({
48
+ let oResponseData;
49
+ try {
50
+ oResponseData = await promisify(jQuery.ajax({
48
51
  type: "GET",
49
52
  dataType: "json",
50
53
  url: sUri
51
- }).done((oResponseData) => {
52
- const oAppData = oResponseData[sAppId];
54
+ }));
55
+ } catch (oError) {
56
+ oLogger.error(oError.responseText);
57
+ throw new Error(`Failed to load UI5 app index data loaded from ${sUri}: ${oError.responseText}`);
58
+ }
53
59
 
54
- if (oAppData) {
55
- resolve(oResponseData[sAppId]);
56
- } else {
57
- // TODO: extract error messages from app index response
58
- reject(new Error(`UI5 app index data loaded from ${sUri} does not contain app ${sAppId}`));
59
- }
60
- }).fail((oError) => {
61
- oLogger.error(oError.responseText);
62
- reject(new Error(`Failed to load UI5 app index data loaded from ${sUri}: ${oError.responseText}`));
63
- });
64
- });
60
+ const oAppData = oResponseData[sAppId];
61
+ if (oAppData) {
62
+ return oAppData;
63
+ }
64
+ // TODO: extract error messages from app index response
65
+ throw new Error(`UI5 app index data loaded from ${sUri} does not contain app ${sAppId}`);
65
66
  };
66
67
 
67
68
  return new AppInfoAdapter();
package/ui5.yaml CHANGED
@@ -128,9 +128,10 @@ builder:
128
128
  - sap/ui/performance/trace/_InteractionImpl.js
129
129
  resolve: true
130
130
  - mode: preload
131
- # Include sap/ushell/base to avoid loading of chunk
131
+ # Include sap/ushell/base and sap/ushell_abap/base to avoid loading of chunk
132
132
  filters:
133
133
  - sap/ushell/base/
134
+ - sap/ushell_abap/base/
134
135
  resolve: false
135
136
  - mode: raw
136
137
  filters:
@@ -158,6 +159,7 @@ builder:
158
159
  - "!sap/ushell/bootstrap/" # ... except the modules from sap/ushell/bootstrap
159
160
  - "!sap/ushell/base/" # ... and sap/ushell/base
160
161
  - "!sap/ushell_abap/bootstrap/" # ... and abap related bootstrap parts
162
+ - "!sap/ushell_abap/base/" # ... and sap/ushell_abap/base
161
163
  - "!sap/ushell_abap/thirdparty/sap-xhrlib-esm*.js" # ... and thirdparty that contains ESM modules which
162
164
  - "!sap/ui/integration/thirdparty/" # can't be bundled anyways and would cause build errors
163
165
  - "!sap/ui/vk/thirdparty/"
@@ -167,9 +169,10 @@ builder:
167
169
  - sap/ushell_abap/bootstrap/BootTask/
168
170
  resolve: true
169
171
  - mode: preload
170
- # Include sap/ushell/base to avoid loading of chunk
172
+ # Include sap/ushell/base and sap/ushell_abap/base to avoid loading of chunk
171
173
  filters:
172
174
  - sap/ushell/base/
175
+ - sap/ushell_abap/base/
173
176
  resolve: false
174
177
  bundleOptions:
175
178
  optimize: true
@@ -262,7 +265,6 @@ builder:
262
265
  - sap/ushell/Container.js
263
266
  - sap/ushell/ApplicationType/
264
267
  - sap/ushell/Fiori20AdapterTest.js
265
- - sap/ushell/SessionHandler.js
266
268
  - sap/ushell/System.js
267
269
  - sap/ushell/User.js
268
270
  - sap/ushell/adapters/cdm/PagesCommonDataModelAdapter.js
@@ -320,7 +322,6 @@ builder:
320
322
  - sap/ushell/services/Navigation.js
321
323
  - sap/ushell/services/NavTargetResolution.js
322
324
  - sap/ushell/services/NavTargetResolutionInternal.js
323
- - sap/ushell/services/NavigationDataProvider.js
324
325
  - sap/ushell/services/PageBuilding.js
325
326
  - sap/ushell/services/PagePersistence.js
326
327
  - sap/ushell/services/Pages.js
@@ -328,12 +329,12 @@ builder:
328
329
  - sap/ushell/services/PersonalizationV2.js
329
330
  - sap/ushell/services/PluginManager.js
330
331
  - sap/ushell/services/ReferenceResolver.js
332
+ - sap/ushell/services/SessionHandler.js
331
333
  - sap/ushell/services/ShellNavigation.js
332
334
  - sap/ushell/services/ShellNavigationInternal.js
333
335
  - sap/ushell/services/SpaceContent.js
334
336
  - sap/ushell/services/SupportTicket.js
335
337
  - sap/ushell/services/URLParsing.js
336
- - sap/ushell/services/URLShortening.js
337
338
  - sap/ushell/services/Ui5ComponentLoader.js
338
339
  - sap/ushell/services/UserDefaultParameterPersistence.js
339
340
  - sap/ushell/services/UserDefaultParameters.js
@@ -361,6 +362,7 @@ builder:
361
362
  - sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js
362
363
  - sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js
363
364
  - sap/ushell_abap/adapters/abap/UserInfoAdapter.js
365
+ - sap/ushell_abap/services/NavigationDataProvider.js
364
366
  - sap/ushell_abap/library.js
365
367
  - sap/ushell_abap/pbServices/
366
368
  - '!sap/viz/libs/sap-viz.js'
@@ -457,7 +459,6 @@ builder:
457
459
  - sap/ushell/utils/AppType.js
458
460
  # Default ushell modules
459
461
  - sap/ushell/components/shell/Notifications/NotificationsModule.js
460
- - sap/ushell/components/shell/ProductSwitch/ProductSwitchModule.js
461
462
  resolve: false
462
463
  bundleOptions:
463
464
  optimize: true