@sapui5/sap.ushell_abap 1.139.0 → 1.140.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 (48) 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 +7 -4
  4. package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +3 -3
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +45 -48
  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 -2
  8. package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +8 -8
  9. package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +83 -79
  10. package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +1 -1
  11. package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.js +1 -1
  12. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +1 -1
  13. package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionInternalAdapter.js +1 -1
  14. package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +10 -12
  15. package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +3 -3
  16. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +3 -3
  17. package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationV2Adapter.js +1 -1
  18. package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +1 -1
  19. package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +1 -1
  20. package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +1 -1
  21. package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +6 -8
  22. package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +1 -1
  23. package/src/main/js/sap/ushell_abap/bootstrap/evo/SAPCompanionConditionSetter.js +4 -4
  24. package/src/main/js/sap/ushell_abap/bootstrap/evo/XhrLogonEventHandler.js +5 -2
  25. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +2 -2
  26. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
  27. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +53 -30
  28. package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +2 -1
  29. package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +27 -18
  30. package/src/main/js/sap/ushell_abap/components/TCodeNavigation.js +150 -0
  31. package/src/main/js/sap/ushell_abap/library.js +1 -1
  32. package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +2 -2
  33. package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +4 -8
  34. package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +17 -15
  35. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +10 -15
  36. package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +4 -5
  37. package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +4 -5
  38. package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +2 -2
  39. package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +12 -20
  40. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +9 -12
  41. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +28 -28
  42. package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +3 -5
  43. package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +19 -22
  44. package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +9 -10
  45. package/src/main/js/sap/ushell_abap/pbServices/ui2/RemoteCatalogService.js +2 -2
  46. package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +13 -60
  47. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +1 -2
  48. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ushell_abap",
3
- "version": "1.139.0",
3
+ "version": "1.140.0",
4
4
  "description": "SAPUI5 Library sap.ushell_abap",
5
5
  "homepage": "https://sap.github.io/ui5-tooling/pages/SAPUI5/",
6
6
  "keywords": [
@@ -2,7 +2,7 @@
2
2
  <library xmlns="http://www.sap.com/sap.ui.library.xsd">
3
3
  <name>sap.ushell_abap</name>
4
4
  <vendor>SAP SE</vendor>
5
- <version>1.139.0</version>
5
+ <version>1.140.0</version>
6
6
  <copyright>Copyright (c) 2009-2025 SAP SE, All Rights Reserved</copyright>
7
7
  <documentation>SAP library: sap.ushell_abap</documentation>
8
8
 
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  return sContainerKey.substring(sCONTAINER_KEY_PREFIX.length, sCONTAINER_KEY_PREFIX.length + 40);
35
35
  }
36
36
 
37
- const AdapterContainer = function (sContainerKey, oService, oScope, sAppName) {
37
+ function AdapterContainer (sContainerKey, oService, oScope, sAppName) {
38
38
  this._oService = oService;
39
39
  this._oScope = oScope;
40
40
  this["sap-cache-id"] = ObjectPath.get("_oService._oConfig.services.personalization.cacheId", this);
@@ -55,7 +55,7 @@ sap.ui.define([
55
55
  };
56
56
  this._oPropertyBag = {};
57
57
  this._aOperationQueue = [];
58
- };
58
+ }
59
59
 
60
60
  /**
61
61
  * Resets the container item values to initial ( retaining key, validity, etc!)
@@ -200,8 +200,8 @@ sap.ui.define([
200
200
  };
201
201
 
202
202
  /**
203
- * Locates an item for the key sItemKey,
204
- * returns { index : nr, TrueItemKey : truekey, containerProperty : }
203
+ * @param {string} sItemKey - The item key.
204
+ * @returns {{index: int, TrueItemKey: string, containerProperty: string}} An object containing match details.
205
205
  * either trueKey xor containerProperty is set.
206
206
  * index is filled iff it is a present item
207
207
  */
@@ -299,6 +299,8 @@ sap.ui.define([
299
299
  /**
300
300
  * set oItemValue under sItemKey
301
301
  * returns undefined
302
+ * @param {string} sItemKey the item key
303
+ * @param {object} oItemValue the item value to be set
302
304
  */
303
305
  AdapterContainer.prototype.setItemValue = function (sItemKey, oItemValue) {
304
306
  const sItemValue = JSON.stringify(oItemValue);
@@ -332,6 +334,7 @@ sap.ui.define([
332
334
 
333
335
  /**
334
336
  * delete (1st) item with key sItemKey
337
+ * @param {string} sItemKey the item key
335
338
  */
336
339
  AdapterContainer.prototype.delItem = function (sItemKey) {
337
340
  const oItemRef = this._locateItem(sItemKey);
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's AppStateAdapter for the ABAP platform.
5
- * @version 1.139.0
5
+ * @version 1.140.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -38,7 +38,7 @@ sap.ui.define([
38
38
  *
39
39
  * @private
40
40
  */
41
- const AppStateAdapter = function (oSystem, sParameters, oConfig) {
41
+ function AppStateAdapter (oSystem, sParameters, oConfig) {
42
42
  this._oConfig = oConfig && oConfig.config;
43
43
  const sAppStateServiceURL = `${ObjectPath.get("services.appState.baseUrl", oConfig) || "/sap/opu/odata/UI2/INTEROP"}/`;
44
44
  const oODataWrapperSettings = {
@@ -51,7 +51,7 @@ sap.ui.define([
51
51
  throw new SrvcError(oMessage, "sap.ushell_abap.adapters.abap.AppStateAdapter");
52
52
  }
53
53
  ODataService.call(this, this._oWrapper, fnDefaultFailure);
54
- };
54
+ }
55
55
 
56
56
  /**
57
57
  * Save the given data sValue for the given key at the persistence layer
@@ -9,7 +9,7 @@
9
9
  * <li>provide the resolveHashFragmentFallback function, a fallback method called by ClientSideTargetResolution service.</li>
10
10
  * </ul>
11
11
  *
12
- * @version 1.139.0
12
+ * @version 1.140.0
13
13
  */
14
14
  sap.ui.define([
15
15
  "sap/base/util/ObjectPath",
@@ -106,7 +106,7 @@ sap.ui.define([
106
106
  * @since 1.34.0
107
107
  * @private
108
108
  */
109
- const ClientSideTargetResolutionAdapter = function (oSystem, sParameters, oAdapterConfig) {
109
+ function ClientSideTargetResolutionAdapter (oSystem, sParameters, oAdapterConfig) {
110
110
  const that = this;
111
111
  // as the method getProductVersion returns the product name, the following holds true.
112
112
  const oContainer = Container;
@@ -287,7 +287,7 @@ sap.ui.define([
287
287
  );
288
288
  that._storeFromFullStartupResponse(oFullStartupResult);
289
289
  });
290
- };
290
+ }
291
291
 
292
292
  /**
293
293
  * Checks the Resolve Link/Start Up result for Application Dependencies and if present modifies the results
@@ -871,9 +871,7 @@ sap.ui.define([
871
871
  }
872
872
 
873
873
  oODataResponse.results.forEach((oEntry) => {
874
- let oParam;
875
874
  const sEntryName = oEntry.name;
876
- let sEntryValue;
877
875
  let sUserDefaultValue;
878
876
 
879
877
  if (Object.prototype.hasOwnProperty.call(oRes.parameters, sEntryName)) {
@@ -886,8 +884,8 @@ sap.ui.define([
886
884
  required: that._getObjectDefaulting(oEntry, "required", false)
887
885
  };
888
886
 
889
- oParam = oRes.parameters[sEntryName];
890
- sEntryValue = that._getObjectDefaulting(oEntry, "value", "");
887
+ const oParam = oRes.parameters[sEntryName];
888
+ const sEntryValue = that._getObjectDefaulting(oEntry, "value", "");
891
889
 
892
890
  if (oEntry.regexp === true) {
893
891
  oParam.filter = {
@@ -1131,7 +1129,6 @@ sap.ui.define([
1131
1129
  */
1132
1130
  ClientSideTargetResolutionAdapter.prototype._resolveHashFragmentBE = function (sFragmentNoHash) {
1133
1131
  const that = this;
1134
- let bBatchQueueOpened;
1135
1132
  const sFormFactor = Utils.getFormFactor();
1136
1133
 
1137
1134
  /**
@@ -1147,7 +1144,7 @@ sap.ui.define([
1147
1144
  return encodeURIComponent(sUnencoded).replace(/'/g, "''");
1148
1145
  }
1149
1146
 
1150
- bBatchQueueOpened = this._openBatchQueueUnlessOpen(this._getODataWrapper());
1147
+ const bBatchQueueOpened = this._openBatchQueueUnlessOpen(this._getODataWrapper());
1151
1148
 
1152
1149
  /**
1153
1150
  * Adds the given post parameters to a url
@@ -1324,6 +1321,45 @@ sap.ui.define([
1324
1321
 
1325
1322
  // check if we have it already
1326
1323
  return new Promise((fnResolve, fnReject) => {
1324
+ /*
1325
+ * Trigger call to front-end server. This case may occur, for example, during application direct start with
1326
+ * a system alias that is not sent by the backend. Backend only sends data about the system aliases that are
1327
+ * mentioned in the systemAlias fields of the target mappings (or for virtual target mappings).
1328
+ */
1329
+ function fnRetryBufferOrUseInterop () {
1330
+ oSystemAliasData = that._readSystemAliasFromBuffer(sSystemAlias); // note: already in ClientSideTargetResolutionAdapter format
1331
+ if (oSystemAliasData) {
1332
+ Log.debug(
1333
+ `System alias '${sSystemAlias}' is now in buffer`,
1334
+ "Skipping INTEROP service call",
1335
+ "sap.ushell_abap.adapters.abap.ClientSideTargetResolutionAdapter"
1336
+ );
1337
+ fnResolve(oSystemAliasData);
1338
+ } else {
1339
+ Log.debug(
1340
+ `System alias '${sSystemAlias}' still not in buffer`,
1341
+ "Resolving via INTEROP service",
1342
+ "sap.ushell_abap.adapters.abap.ClientSideTargetResolutionAdapter"
1343
+ );
1344
+ that._readSystemAliasViaInterop(sSystemAlias)
1345
+ .catch((sError) => {
1346
+ fnReject(sError);
1347
+ })
1348
+ .then((oOdataSystemAliasData) => {
1349
+ oSystemAliasData = that._fixSystemAlias(oOdataSystemAliasData);
1350
+
1351
+ if (oSystemAliasData && oSystemAliasData.id) {
1352
+ that._writeSystemAliasToBuffer(oSystemAliasData);
1353
+ fnResolve(oSystemAliasData);
1354
+ } else {
1355
+ sMessage = "Data returned for system alias is not valid. Has no 'id'. System alias data will not be cached.";
1356
+ Log.warning(`ClientSideTargetResolutionAdapter: ${sMessage}`);
1357
+ fnResolve(oSystemAliasData);
1358
+ }
1359
+ });
1360
+ }
1361
+ }
1362
+
1327
1363
  oSystemAliasData = this._readSystemAliasFromBuffer(sSystemAlias); // note: already in ClientSideTargetResolutionAdapter format
1328
1364
  if (oSystemAliasData) {
1329
1365
  Log.debug(
@@ -1343,45 +1379,6 @@ sap.ui.define([
1343
1379
 
1344
1380
  // must wait at least on the small start_up response before using INTEROP
1345
1381
 
1346
- /*
1347
- * Trigger call to front-end server. This case may occur, for example, during application direct start with
1348
- * a system alias that is not sent by the backend. Backend only sends data about the system aliases that are
1349
- * mentioned in the systemAlias fields of the target mappings (or for virtual target mappings).
1350
- */
1351
- const fnRetryBufferOrUseInterop = function () {
1352
- oSystemAliasData = that._readSystemAliasFromBuffer(sSystemAlias); // note: already in ClientSideTargetResolutionAdapter format
1353
- if (oSystemAliasData) {
1354
- Log.debug(
1355
- `System alias '${sSystemAlias}' is now in buffer`,
1356
- "Skipping INTEROP service call",
1357
- "sap.ushell_abap.adapters.abap.ClientSideTargetResolutionAdapter"
1358
- );
1359
- fnResolve(oSystemAliasData);
1360
- } else {
1361
- Log.debug(
1362
- `System alias '${sSystemAlias}' still not in buffer`,
1363
- "Resolving via INTEROP service",
1364
- "sap.ushell_abap.adapters.abap.ClientSideTargetResolutionAdapter"
1365
- );
1366
- that._readSystemAliasViaInterop(sSystemAlias)
1367
- .catch((sError) => {
1368
- fnReject(sError);
1369
- })
1370
- .then((oOdataSystemAliasData) => {
1371
- oSystemAliasData = that._fixSystemAlias(oOdataSystemAliasData);
1372
-
1373
- if (oSystemAliasData && oSystemAliasData.id) {
1374
- that._writeSystemAliasToBuffer(oSystemAliasData);
1375
- fnResolve(oSystemAliasData);
1376
- } else {
1377
- sMessage = "Data returned for system alias is not valid. Has no 'id'. System alias data will not be cached.";
1378
- Log.warning(`ClientSideTargetResolutionAdapter: ${sMessage}`);
1379
- fnResolve(oSystemAliasData);
1380
- }
1381
- });
1382
- }
1383
- };
1384
-
1385
1382
  this._oInitialSegmentPromise.then(fnRetryBufferOrUseInterop, fnRetryBufferOrUseInterop);
1386
1383
  }
1387
1384
  });
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's CommonDataModelAdapter for the ABAP platform, it is used to avoid 404 when no adapter is found
4
4
  *
5
- * @version 1.139.0
5
+ * @version 1.140.0
6
6
  */
7
7
  sap.ui.define([
8
8
  ], () => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The ConfigurationDefaults adapter for the ABAP platform.
5
- * @version 1.139.0
5
+ * @version 1.140.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ushell_abap/bootstrap/evo/abap.constants",
@@ -11,7 +11,6 @@ sap.ui.define([
11
11
  "use strict";
12
12
 
13
13
  /**
14
- * @returns {sap.ushell_abap.adapters.abap.ConfigurationDefaultsAdapter}
15
14
  * @private
16
15
  */
17
16
  return function () {
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's container adapter for the ABAP platform.
4
4
  *
5
- * @version 1.139.0
5
+ * @version 1.140.0
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ui/thirdparty/jquery",
@@ -42,6 +42,8 @@ sap.ui.define([
42
42
  * Constructs a new instance of the container adapter for the ABAP platform.
43
43
  *
44
44
  * @param {sap.ushell.System} oSystem the logon system (alias, platform, base URL)
45
+ * @param {string} sParameter the parameter to be passed to the container adapter
46
+ * @param {object} oProperties the properties to be passed to the container adapter, e.g. the configuration
45
47
  *
46
48
  * @hideconstructor
47
49
  * @see sap.ushell.services.initializeContainer
@@ -49,7 +51,7 @@ sap.ui.define([
49
51
  * @since 1.11.0
50
52
  * @private
51
53
  */
52
- const ContainerAdapter = function (oSystem, sParameter, oProperties) {
54
+ function ContainerAdapter (oSystem, sParameter, oProperties) {
53
55
  let oUser;
54
56
  const S_LOGOFF_URL = "/sap/public/bc/icf/logoff";
55
57
 
@@ -78,7 +80,7 @@ sap.ui.define([
78
80
  oFrame.setAttribute("src", sUrl);
79
81
 
80
82
  function onload () {
81
- parent.postMessage(sSafeUrl, "*");
83
+ window.parent.postMessage(sSafeUrl, "*");
82
84
  }
83
85
 
84
86
  oFrame.addEventListener("load", onload);
@@ -129,9 +131,7 @@ sap.ui.define([
129
131
  // startup result (modified!)
130
132
  this._setThemeAccessibilityFlags = function (oStartupResult) {
131
133
  if (oStartupResult.userProfile && oStartupResult.userProfile.length) {
132
- let oUserProfileDataTheme;
133
- let oUserProfileDataAccessibility;
134
- oUserProfileDataTheme = oStartupResult.userProfile.filter((profileProperty) => {
134
+ const oUserProfileDataTheme = oStartupResult.userProfile.filter((profileProperty) => {
135
135
  return profileProperty.id && profileProperty.id === "THEME";
136
136
  })[0];
137
137
  // Theme
@@ -145,7 +145,7 @@ sap.ui.define([
145
145
  }
146
146
  // AccessibilityPermitted: Note: we only register whether editing the Accessibility is allowed on the
147
147
  // ABAP Platform, we don't test whether accessibility is available!
148
- oUserProfileDataAccessibility = oStartupResult.userProfile.filter((profileProperty) => {
148
+ const oUserProfileDataAccessibility = oStartupResult.userProfile.filter((profileProperty) => {
149
149
  return profileProperty.id && profileProperty.id === "ACCESSIBILITY";
150
150
  })[0];
151
151
  if (oUserProfileDataAccessibility && oUserProfileDataAccessibility.id) {
@@ -540,7 +540,7 @@ sap.ui.define([
540
540
  }
541
541
  return sUrl;
542
542
  };
543
- };
543
+ }
544
544
 
545
545
  return ContainerAdapter;
546
546
  });
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileoverview The Unified Shell's page building adapter for the ABAP platform. Private copy. Classical home page functions are deprecated.
5
5
  * @since 1.121
6
- * @version 1.139.0
6
+ * @version 1.140.0
7
7
  */
8
8
  sap.ui.define([
9
9
  "sap/ui/thirdparty/URI",
@@ -78,7 +78,7 @@ sap.ui.define([
78
78
  * @since 1.121.0
79
79
  * @private
80
80
  */
81
- const LaunchPageAdapter = function (oUnused, sParameter, oAdapterConfiguration) {
81
+ function LaunchPageAdapter (oUnused, sParameter, oAdapterConfiguration) {
82
82
  let bCatalogsValid; // undefined = not yet valid
83
83
  let oGetGroupsDeferred; // used to synchronize parallel getGroups-requests
84
84
  let oGetCatalogsDeferred; // used to synchronize parallel getCatalog-requests
@@ -188,6 +188,8 @@ sap.ui.define([
188
188
  *
189
189
  * @param {object} [oConfiguration] object containing an order array, example: {order: ["id1", "id2", "id3"]}
190
190
  * @param {object[]} aElements array of objects. Each object must provide a getId method
191
+ *
192
+ * @returns {object[]} array of elements ordered according to the configuration
191
193
  * @private
192
194
  * @since 1.11.0
193
195
  * @deprecated since 1.120
@@ -226,6 +228,24 @@ sap.ui.define([
226
228
  return aOrderedElements;
227
229
  };
228
230
 
231
+ /**
232
+ * Removes vValue from the given array.
233
+ *
234
+ * @param {Array<*>} aArray The array from which the value should be removed from.
235
+ * @param {any} vValue The value to be removed.
236
+ * @returns {int} The index of the vValue in the array or -1 if it was not found.
237
+ * @private
238
+ * @deprecated since 1.120
239
+ */
240
+ function removeFromArray (aArray, vValue) {
241
+ const iSourceIndex = aArray.indexOf(vValue);
242
+ if (iSourceIndex < 0) {
243
+ return iSourceIndex;
244
+ }
245
+ aArray.splice(iSourceIndex, 1);
246
+ return iSourceIndex;
247
+ }
248
+
229
249
  /**
230
250
  * Removes the given tile from the given Page layout, according to it's current type.
231
251
  *
@@ -249,24 +269,6 @@ sap.ui.define([
249
269
  return removeFromArray(oLayout.order, oTile.getId());
250
270
  }
251
271
 
252
- /**
253
- * Removes vValue from the given array.
254
- *
255
- * @param {Array<*>} aArray The array from which the value should be removed from.
256
- * @param {any} vValue The value to be removed.
257
- * @returns {int} The index of the vValue in the array or -1 if it was not found.
258
- * @private
259
- * @deprecated since 1.120
260
- */
261
- function removeFromArray (aArray, vValue) {
262
- const iSourceIndex = aArray.indexOf(vValue);
263
- if (iSourceIndex < 0) {
264
- return iSourceIndex;
265
- }
266
- aArray.splice(iSourceIndex, 1);
267
- return iSourceIndex;
268
- }
269
-
270
272
  /**
271
273
  * Adds the given tile ID to the given Page layout in the specified index and according to it's current type.
272
274
  *
@@ -332,7 +334,7 @@ sap.ui.define([
332
334
  /**
333
335
  * Orders the pages of _oCurrentPageSet based on the configuration maintained in _oCurrentPageSet and returns the result.
334
336
  *
335
- * @returns {sap.ushell_abap.pbServices.ui2.Page[]}
337
+ * @returns {sap.ushell_abap.pbServices.ui2.Page[]} Returns a UI2 Page
336
338
  * @private
337
339
  * @deprecated since 1.120
338
340
  */
@@ -414,6 +416,7 @@ sap.ui.define([
414
416
  * Triggers loading of a CHIP instance and adds the temporary property $loadingPromise to it
415
417
  * as it does not wait for the loading success or failure.
416
418
  * As soon as it is completely loaded (or loading failed) the $loadingPromise property is removed again.
419
+ * @param {object} oChipInstance the CHIP instance to be loaded
417
420
  * @deprecated since 1.120
418
421
  */
419
422
  LaunchPageAdapter.prototype._triggerChipInstanceLoad = function (oChipInstance) {
@@ -438,6 +441,49 @@ sap.ui.define([
438
441
  oChipInstance.load(fnSuccess, fnFailure);
439
442
  };
440
443
 
444
+ /**
445
+ * Tells whether the given CHIP instance is a static or dynamic app launcher
446
+ * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance the chip instance
447
+ * @returns {boolean} true if the CHIP instance is an app launcher, false otherwise
448
+ */
449
+ function isAppLauncher (oChipInstance) {
450
+ const sBaseChipId = oChipInstance.getChip().getBaseChipId();
451
+ return sBaseChipId === sDYNAMIC_BASE_CHIP_ID || sBaseChipId === sSTATIC_BASE_CHIP_ID;
452
+ }
453
+
454
+ /**
455
+ * Tells whether the given CHIP instance is a card
456
+ * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance the chip instance
457
+ * @returns {boolean} true if the CHIP instance is a card, false otherwise
458
+ */
459
+ function isCard (oChipInstance) {
460
+ const sBaseChipId = oChipInstance.getChip().getBaseChipId();
461
+ return S_CARD_BASE_CHIP_ID === sBaseChipId;
462
+ }
463
+
464
+ /**
465
+ * Tells whether the given CHIP instance is remote
466
+ * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance the chip instance
467
+ * @returns {boolean} true if the CHIP instance is remote, false otherwise
468
+ */
469
+ function isRemoteChipInstance (oChipInstance) {
470
+ return !!oChipInstance.getChip().getRemoteCatalog();
471
+ }
472
+
473
+ /**
474
+ * Tells whether the given CHIP instance is not loadable.
475
+ * This means it's data from the OData Service could not be loaded.
476
+ *
477
+ * Note: If this method returns false does not mean that the later loading will not fail
478
+ *
479
+ * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance the chip instance
480
+ * @returns {boolean} true if the CHIP instance is not loadable, false otherwise
481
+ */
482
+ function isBrokenChip (oChipInstance) {
483
+ // alternative: !oChipInstance.getChip().isInitiallyDefined();
484
+ return !isRemoteChipInstance(oChipInstance) && oChipInstance.getChip().getBaseChipId() === undefined;
485
+ }
486
+
441
487
  /**
442
488
  * Triggers loading of all ChipInstances of the given pages and calls fnLocalChipsLoaded
443
489
  * when all local CHIP instances are completely loaded.
@@ -462,6 +508,7 @@ sap.ui.define([
462
508
  /**
463
509
  * Loads dependent libraries (core-ext-light for custom tiles and custom remote tiles)
464
510
  * and triggers the loading of the chip instances.
511
+ * @param {object} oChipInstance the CHIP instance to be loaded
465
512
  */
466
513
  function loadDependenciesAndTriggerChipInstanceLoad (oChipInstance) {
467
514
  // append the promise for loading to the instance, but only as long as loading is
@@ -500,6 +547,7 @@ sap.ui.define([
500
547
 
501
548
  /**
502
549
  * loads a CHIP instance and triggers finalize() or reject afterwards
550
+ * @param {object} oChipInstance the CHIP instance to be loaded
503
551
  */
504
552
  function loadChipInstance (oChipInstance) {
505
553
  function onLoad () {
@@ -630,8 +678,8 @@ sap.ui.define([
630
678
  * This is the case for the results of {@link #addTile}, but not for {@link #addBookmark}.
631
679
  * Such wrappers must be unwrapped by {@link #moveTile} or else the title becomes "hard coded" in the newly created CHIP instance.
632
680
  *
633
- * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile
634
- * @returns {boolean}
681
+ * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oTile the tile object
682
+ * @returns {boolean} true if the tile has a config
635
683
  * @deprecated since 1.120
636
684
  */
637
685
  LaunchPageAdapter.prototype._isWrapperOnly = function (oTile) {
@@ -700,49 +748,6 @@ sap.ui.define([
700
748
  return aWrappedCatalogs;
701
749
  }
702
750
 
703
- /**
704
- * Tells whether the given CHIP instance is a static or dynamic app launcher
705
- * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
706
- * @returns {boolean}
707
- */
708
- function isAppLauncher (oChipInstance) {
709
- const sBaseChipId = oChipInstance.getChip().getBaseChipId();
710
- return sBaseChipId === sDYNAMIC_BASE_CHIP_ID || sBaseChipId === sSTATIC_BASE_CHIP_ID;
711
- }
712
-
713
- /**
714
- * Tells whether the given CHIP instance is a card
715
- * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
716
- * @returns {boolean}
717
- */
718
- function isCard (oChipInstance) {
719
- const sBaseChipId = oChipInstance.getChip().getBaseChipId();
720
- return S_CARD_BASE_CHIP_ID === sBaseChipId;
721
- }
722
-
723
- /**
724
- * Tells whether the given CHIP instance is remote
725
- * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
726
- * @returns {boolean}
727
- */
728
- function isRemoteChipInstance (oChipInstance) {
729
- return !!oChipInstance.getChip().getRemoteCatalog();
730
- }
731
-
732
- /**
733
- * Tells whether the given CHIP instance is not loadable.
734
- * This means it's data from the OData Service could not be loaded.
735
- *
736
- * Note: If this method returns false does not mean that the later loading will not fail
737
- *
738
- * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
739
- * @returns {boolean}
740
- */
741
- function isBrokenChip (oChipInstance) {
742
- // alternative: !oChipInstance.getChip().isInitiallyDefined();
743
- return !isRemoteChipInstance(oChipInstance) && oChipInstance.getChip().getBaseChipId() === undefined;
744
- }
745
-
746
751
  /**
747
752
  * Returns the tile configuration of the given (app launcher) CHIP instance.
748
753
  * It logs an error message if the tile configuration cannot be parsed.
@@ -920,7 +925,7 @@ sap.ui.define([
920
925
  * @private
921
926
  */
922
927
  this._parseReferenceLost = function (sReferenceLost) {
923
- var sReferenceLostSafe = sReferenceLost || Object.prototype.toString.apply(sReferenceLostSafe);
928
+ const sReferenceLostSafe = sReferenceLost || "";
924
929
 
925
930
  if (!sReferenceLostSafe.match(/^Reference lost: Note \d+ Page.+\s,\sInstance ID.+$/)) {
926
931
  Log.warning(
@@ -1078,7 +1083,7 @@ sap.ui.define([
1078
1083
  });
1079
1084
  break;
1080
1085
  case O_ERROR_TYPES.emptyConfiguration:
1081
- var sRawTileConfiguration = oChipInstance.getConfigurationParameter("tileConfiguration");
1086
+ const sRawTileConfiguration = oChipInstance.getConfigurationParameter("tileConfiguration");
1082
1087
  aResult.push({
1083
1088
  type: O_ERROR_TYPES.emptyConfiguration,
1084
1089
  chipInstanceId: oChipInstance.getId(),
@@ -1113,6 +1118,7 @@ sap.ui.define([
1113
1118
  * Formats information about one error into a string.
1114
1119
  *
1115
1120
  * @param {object} oTileError An object representing tile errors
1121
+ * @returns {string} A string describing the error
1116
1122
  */
1117
1123
  this._formatTileError = function (oTileError) {
1118
1124
  switch (oTileError.type) {
@@ -2103,6 +2109,10 @@ sap.ui.define([
2103
2109
  const that = this;
2104
2110
  const oDeferred = new jQuery.Deferred();
2105
2111
 
2112
+ function doReject (sMessage) {
2113
+ oDeferred.reject(`Tile not successfully loaded${sMessage ? (`: ${sMessage}`) : ""}`);
2114
+ }
2115
+
2106
2116
  function doResolve () {
2107
2117
  let sTileType;
2108
2118
 
@@ -2145,10 +2155,6 @@ sap.ui.define([
2145
2155
  .catch(doReject);
2146
2156
  }
2147
2157
 
2148
- function doReject (sMessage) {
2149
- oDeferred.reject(`Tile not successfully loaded${sMessage ? (`: ${sMessage}`) : ""}`);
2150
- }
2151
-
2152
2158
  if (!oTile.$loadingPromise) { // loading resolved or failed
2153
2159
  if (!oTile.isStub()) { // success
2154
2160
  // call getImplementationAsSapui5Async async for non-AppLaunchers and resolves.
@@ -2508,7 +2514,7 @@ sap.ui.define([
2508
2514
  * it might become <code>false</code> again in case one of the catalogs has been invalidated,
2509
2515
  * e.g. due to the addition of a tile ("Add to catalog" scenario).
2510
2516
  *
2511
- * @returns {boolean}
2517
+ * @returns {boolean} if the catalogs collection is still valid, <code>false</code> otherwise.
2512
2518
  * @since 1.16.4
2513
2519
  * @deprecated since 1.120
2514
2520
  * @see #getCatalogs
@@ -2921,13 +2927,11 @@ sap.ui.define([
2921
2927
 
2922
2928
  // Apply the 'search' contract when available
2923
2929
  function getKeywordsFromSearchContract (oCatalogTile) {
2924
- let oSearchContract;
2925
-
2926
2930
  if (oCatalogTile.isStub()) {
2927
2931
  return [];
2928
2932
  }
2929
2933
 
2930
- oSearchContract = oCatalogTile.getContract("search");
2934
+ const oSearchContract = oCatalogTile.getContract("search");
2931
2935
  if (oSearchContract) {
2932
2936
  return oSearchContract.getKeywords();
2933
2937
  }
@@ -3312,9 +3316,9 @@ sap.ui.define([
3312
3316
  /**
3313
3317
  * Tells whether the given CHIP instance represents a bookmark matching the given identifier.
3314
3318
  *
3315
- * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance
3319
+ * @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance the CHIP instance to be checked
3316
3320
  * @param {string | object} vIdentifier the url as string or an identifier object
3317
- * @returns {boolean}
3321
+ * @returns {boolean} If the CHIP instance represents a bookmark matching the given identifier.
3318
3322
  * @see #addBookmark
3319
3323
  * @since 1.17.1
3320
3324
  * @deprecated since 1.120
@@ -3722,7 +3726,7 @@ sap.ui.define([
3722
3726
  this.isCustomTile = function (tile) {
3723
3727
  return !isAppLauncher(tile);
3724
3728
  };
3725
- };
3729
+ }
3726
3730
 
3727
3731
  /**
3728
3732
  * Returns raw catalog tile data that can be used to instantiate the tile
@@ -4,7 +4,7 @@
4
4
  * @fileOverview The Unified Shell's page building adapter for the ABAP platform.
5
5
  *
6
6
  * @deprecated since 1.100
7
- * @version 1.139.0
7
+ * @version 1.140.0
8
8
  */
9
9
  sap.ui.define([
10
10
  "sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter"
@@ -31,7 +31,7 @@ sap.ui.define([
31
31
  * @since 1.72.0
32
32
  * @private
33
33
  */
34
- const MenuAdapter = function () { };
34
+ function MenuAdapter () { }
35
35
 
36
36
  /**
37
37
  * Returns whether the menu is enabled
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the ABAP
9
9
  * platform.
10
10
  *
11
- * @version 1.139.0
11
+ * @version 1.140.0
12
12
  */
13
13
  sap.ui.define([], () => {
14
14
  "use strict";