@sapui5/sap.ushell_abap 1.111.2 → 1.111.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.ushell_abap",
3
- "version": "1.111.2",
3
+ "version": "1.111.4",
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.111.2</version>
5
+ <version>1.111.4</version>
6
6
  <copyright>Copyright (c) 2009-2022 SAP SE, All Rights Reserved</copyright>
7
7
  <documentation>SAP library: sap.ushell_abap</documentation>
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's AppStateAdapter for the ABAP platform.
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -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.111.2
12
+ * @version 1.111.4
13
13
  */
14
14
  sap.ui.define([
15
15
  "sap/ui/thirdparty/jquery",
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The ConfigurationDefaults adapter for the ABAP platform.
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ushell_abap/bootstrap/evo/abap.constants",
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's container adapter for the ABAP platform.
4
4
  *
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/ui/thirdparty/jquery",
@@ -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.111.2
7
+ * @version 1.111.4
8
8
  */
9
9
  sap.ui.define([
10
10
  "sap/ui/thirdparty/URI",
@@ -1440,6 +1440,34 @@ sap.ui.define([
1440
1440
  return this._orderBasedOnConfiguration(oLayout, oGroup.getChipInstances());
1441
1441
  };
1442
1442
 
1443
+ /**
1444
+ * Fetches the group tiles and clones them. The failing group tiles are filtered out
1445
+ * @param {sap.ushell_abap.pbServices.ui2.Page} oGroup The group
1446
+ * @returns {Promise<sap.ushell_abap.pbServices.ui2.ChipInstance[]>} The array of group tiles
1447
+ *
1448
+ * @private
1449
+ * @since 1.113.0
1450
+ */
1451
+ this.getGroupTileClones = function (oGroup) {
1452
+ var aGroupTiles = this.getGroupTiles(oGroup);
1453
+ var aGroupTilePromises = aGroupTiles.map(function (oChipInstance) {
1454
+ return oChipInstance.clone();
1455
+ });
1456
+
1457
+ return Promise.allSettled(aGroupTilePromises).then(function (aTiles) {
1458
+ return aTiles.map(function (oTile) {
1459
+ if (!oTile.value) {
1460
+ Log.warning("Group tile was filtered out: ", oTile.reason);
1461
+ }
1462
+ return oTile.value;
1463
+ })
1464
+ .filter(function (oChipInstance) {
1465
+ return oChipInstance;
1466
+ });
1467
+
1468
+ });
1469
+ };
1470
+
1443
1471
  /**
1444
1472
  * Adds a new group. This is an asynchronous function using a jQuery.Promise.
1445
1473
  * In case of success its <code>done</code> function is called and gets the added group as a <code>sap.ushell_abap.pbServices.ui2.Page</code>.
@@ -8,7 +8,7 @@
8
8
  * service now calls the ClientSideTargetResolution service in the abap
9
9
  * platform.
10
10
  *
11
- * @version 1.111.2
11
+ * @version 1.111.4
12
12
  */
13
13
  sap.ui.define([], function () {
14
14
  "use strict";
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Unified Shell's page building adapter for the ABAP platform.
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview PagePersistenceAdapter for the ABAP platform.
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/ObjectPath",
@@ -7,7 +7,7 @@
7
7
  * Container header properties transported via pseudo-items are mapped to the
8
8
  * respective header properties in setItem/getItem/delItem
9
9
  *
10
- * @version 1.111.2
10
+ * @version 1.111.4
11
11
  */
12
12
  sap.ui.define([
13
13
  "sap/ushell_abap/adapters/abap/AdapterContainer",
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The Search adapter for the ABAP platform.
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([], function () {
8
8
  "use strict";
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @fileOverview The SupportTicket adapter for the ABAP platform.
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  "sap/base/util/isEmptyObject",
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * @fileOverview The Unified Shell's Ui5ComponentLoaderAdapter for the ABAP platform
4
4
  *
5
- * @version 1.111.2
5
+ * @version 1.111.4
6
6
  */
7
7
  sap.ui.define([
8
8
  ], function () {
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * @fileOverview The Unified Shell's container adapter for the HANA platform.
5
5
  *
6
- * @version 1.111.2
6
+ * @version 1.111.4
7
7
  */
8
8
  /**
9
9
  * @namespace Default namespace for Unified Shell adapters for the HANA platform. They can usually
@@ -14,7 +14,7 @@
14
14
  * It furthermore calculates if FLP pages get activated and if needed sets up
15
15
  * the configuration environment to run these.
16
16
  *
17
- * @version 1.111.2
17
+ * @version 1.111.4
18
18
  */
19
19
  sap.ui.define([
20
20
  "./abap.constants",
@@ -16,13 +16,13 @@ sap.ui.define([
16
16
  * @namespace
17
17
  * @name sap.ushell_abap
18
18
  * @author SAP SE
19
- * @version 1.111.2
19
+ * @version 1.111.4
20
20
  * @private
21
21
  * @ui5-restricted
22
22
  */
23
23
  var ushellAbapLib = sap.ui.getCore().initLibrary({
24
24
  name: "sap.ushell_abap",
25
- version: "1.111.2",
25
+ version: "1.111.4",
26
26
  dependencies: ["sap.ui.core", "sap.m"],
27
27
  noLibraryCSS: true,
28
28
  extensions: {
@@ -50,13 +50,15 @@ sap.ui.define([
50
50
  var oApi,
51
51
  oBags,
52
52
  oConfiguration,
53
- oContractsByName = new Utils.Map(),
54
- bFullscreen = false,
55
- aFullscreenHandlers = [],
56
53
  fnRefreshHandler,
57
54
  sTitle, // no own temporary title so far
58
- fnTitleChange,
59
- that = this;
55
+ fnTitleChange;
56
+
57
+ var oContractsByName = new Utils.Map();
58
+ var bFullscreen = false;
59
+ var aFullscreenHandlers = [];
60
+ var that = this;
61
+ var oOriginalAlterEgo = Object.assign({}, oAlterEgo); // keep shallow copy for clone
60
62
 
61
63
  // BEWARE: constructor code below!
62
64
 
@@ -946,14 +948,74 @@ sap.ui.define([
946
948
  this.persist(fnSuccess, fnFailure);
947
949
  };
948
950
 
951
+ /**
952
+ * Returns the references used in the constructor call
953
+ * @returns {object} The data
954
+ *
955
+ * @since 1.113.0
956
+ * @private
957
+ */
958
+ this._getConstructorData = function () {
959
+ return {
960
+ factory: oFactory,
961
+ alterEgo: oOriginalAlterEgo,
962
+ chip: oChip,
963
+ page: oPage
964
+ };
965
+ };
966
+
967
+ /**
968
+ * Returns the map of bags for this CHIP instance
969
+ * @returns {sap.ushell_abap.pbServices.ui2.Utils.Map} The map of bags
970
+ *
971
+ * @since 1.113.0
972
+ * @private
973
+ */
974
+ this._getBags = function () {
975
+ return oBags;
976
+ };
977
+
978
+ /**
979
+ * Overwrites the map of bags for this CHIP instance
980
+ * @param {sap.ushell_abap.pbServices.ui2.Utils.Map} oNewBags The new map of bags
981
+ *
982
+ * @since 1.113.0
983
+ * @private
984
+ */
985
+ this._setBags = function (oNewBags) {
986
+ oBags = oNewBags;
987
+ };
988
+
949
989
  // constructor code -------------------------------------------------------
950
990
  oBags = new Utils.Map();
951
991
 
952
- initializeBags((oAlterEgo.ChipInstanceBags && oAlterEgo.ChipInstanceBags.results)
953
- || []);
992
+ initializeBags((oAlterEgo.ChipInstanceBags && oAlterEgo.ChipInstanceBags.results) || []);
954
993
 
955
994
  delete oAlterEgo.Chip;
956
995
  Log.debug("Created: " + this, null, "ChipInstance");
957
996
  };
997
+
998
+ /**
999
+ * Clones and loads the new CHIP instance.
1000
+ * The clone has a separate CHIP api (and contracts) but reuses the bags and base CHIP.
1001
+ * This allows to have a second CHIP instance without affecting the original CHIP instance.
1002
+ * This is used in the search for the classic homepage.
1003
+ * @returns {Promise<ChipInstance>} The cloned CHIP instance
1004
+ *
1005
+ * @since 1.113.0
1006
+ * @private
1007
+ */
1008
+ ChipInstance.prototype.clone = function () {
1009
+ var oData = this._getConstructorData();
1010
+ var oChipInstanceClone = new ChipInstance(oData.factory, oData.alterEgo, oData.chip, oData.page);
1011
+
1012
+ return new Promise(function (resolve, reject) {
1013
+ oChipInstanceClone.load(resolve, reject);
1014
+ }).then(function () {
1015
+ oChipInstanceClone._setBags(this._getBags());
1016
+ return oChipInstanceClone;
1017
+ }.bind(this));
1018
+ };
1019
+
958
1020
  return ChipInstance;
959
1021
  });