@sapui5/sap.ushell_abap 1.104.0 → 1.106.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/README.md +1 -1
- package/package.json +1 -1
- package/src/main/js/sap/ushell_abap/.library +3 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.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/LaunchPageAdapter.js +69 -38
- package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.js +101 -27
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.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 +131 -4002
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.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/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +2 -14
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +4 -24
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.constants.js +0 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +3 -51
- package/src/main/js/sap/ushell_abap/library.js +2 -2
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +4 -4
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +15 -21
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +1 -1
- package/ui5.yaml +1 -6
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.backend.config.requestor.js +0 -198
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|

|
|
2
2
|
|
|
3
3
|
# @sapui5/sap.ushell_abap
|
|
4
|
-
Runtime resources of the [SAPUI5](https://
|
|
4
|
+
Runtime resources of the [SAPUI5](https://ui5.sap.com) Library **sap.ushell_abap**.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
Refrain from installing this package using npm, Yarn or similar package managers.
|
package/package.json
CHANGED
|
@@ -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.
|
|
5
|
+
<version>1.106.0</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
|
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
<exclude name="sap.ushell_abap.bootstrap.abap" />
|
|
46
46
|
<exclude name="sap.ushell_abap.bootstrap.appruntime-*" />
|
|
47
47
|
<exclude name="sap.ushell_abap.bootstrap.evo.core-*" />
|
|
48
|
+
<exclude name="sap.ushell_abap.bootstrap.evo.abap" />
|
|
49
|
+
<exclude name="sap.ushell_abap.bootstrap.evo.abap-dbg" />
|
|
48
50
|
</jsdoc>
|
|
49
51
|
<releasenotes xmlns="http://www.sap.com/ui5/buildext/releasenotes"
|
|
50
52
|
url="../../../test-resources/sap/ushell_abap/relnotes/changes-{major}.{minor}.json"
|
|
@@ -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.
|
|
7
|
+
* @version 1.106.0
|
|
8
8
|
*/
|
|
9
9
|
sap.ui.define([
|
|
10
10
|
"sap/ui/thirdparty/URI",
|
|
@@ -57,7 +57,7 @@ sap.ui.define([
|
|
|
57
57
|
tileIntentSupportException: "tileIntentSupportException"
|
|
58
58
|
};
|
|
59
59
|
|
|
60
|
-
// used to load
|
|
60
|
+
// used to load allCatalogs without target mapping chips
|
|
61
61
|
var PAGE_ID_WITHOUT_TM = "/UI2/FLPNoActionChip";
|
|
62
62
|
|
|
63
63
|
/**
|
|
@@ -91,6 +91,7 @@ sap.ui.define([
|
|
|
91
91
|
|
|
92
92
|
this._oCurrentPageSet = null;
|
|
93
93
|
this._bPageSetFullyLoaded = false;
|
|
94
|
+
this._aOtherChipsPromises = [];
|
|
94
95
|
|
|
95
96
|
if (sap.ui2.srvc.contracts.preview.setEnvironmentType) {
|
|
96
97
|
sap.ui2.srvc.contracts.preview.setEnvironmentType("runtime");
|
|
@@ -342,11 +343,11 @@ sap.ui.define([
|
|
|
342
343
|
}
|
|
343
344
|
|
|
344
345
|
/**
|
|
345
|
-
* Stores the hidden groups under the existing configuration property of the
|
|
346
|
+
* Stores the hidden groups under the existing configuration property of the pageSet object
|
|
346
347
|
* (by overriding the existing value or creating it if not yet exist).
|
|
347
348
|
* A new property is added in order not to damage the existing groups order functionality (i.e. configuration.order).
|
|
348
349
|
*
|
|
349
|
-
* @param {string[]}
|
|
350
|
+
* @param {string[]} aHiddenGroupsIDs The input parameter must be of type array, containing the IDs of the
|
|
350
351
|
* groups that should be set hidden. In case an empty array is provided all groups should be changed to visible.
|
|
351
352
|
* @returns {object} promise object.
|
|
352
353
|
* @private
|
|
@@ -460,13 +461,18 @@ sap.ui.define([
|
|
|
460
461
|
// pending. Note: will be used by getTileView
|
|
461
462
|
oChipInstance._loadingDeferred = new jQuery.Deferred(); // used for KPI tiles and custom tiles
|
|
462
463
|
oChipInstance.$loadingPromise = oChipInstance._loadingDeferred.promise();
|
|
464
|
+
that._aOtherChipsPromises.push(new Promise(function (resolve, reject) {
|
|
465
|
+
oChipInstance.$loadingPromise
|
|
466
|
+
.done(resolve)
|
|
467
|
+
.fail(reject);
|
|
468
|
+
}));
|
|
463
469
|
|
|
464
470
|
if (window["sap-ui-debug"] === true) {
|
|
465
471
|
LaunchPageAdapter.prototype._triggerChipInstanceLoad(oChipInstance);
|
|
466
472
|
} else {
|
|
467
473
|
// we don't distinguish KPI tiles from other custom tiles, because the static preload optimization
|
|
468
474
|
// (sap/fiori/indicator-tiles.js bundle) was only valid for a certain set of old KPI tiles;
|
|
469
|
-
// for newer KPI tiles used in S4 the bundle did not contain all
|
|
475
|
+
// for newer KPI tiles used in S4 the bundle did not contain all dependencies and therefore the optimization led to
|
|
470
476
|
// even more round trips; in practice, chances are high that the homepage will contain some non-KPI custom tiles,
|
|
471
477
|
// so core-ext-light will probably be loaded in most cases
|
|
472
478
|
// see internal BCP 1770271005
|
|
@@ -764,7 +770,7 @@ sap.ui.define([
|
|
|
764
770
|
* It logs an error message if the tile configuration cannot be parsed.
|
|
765
771
|
*
|
|
766
772
|
* @param {sap.ushell_abap.pbServices.ui2.ChipInstance} oChipInstance must not be a stub anymore. Also it's CHIP must not be a stub anymore.
|
|
767
|
-
* @returns {object} the tile configuration in style of an
|
|
773
|
+
* @returns {object} the tile configuration in style of an applauncher
|
|
768
774
|
*/
|
|
769
775
|
function getSmartBusinessTileConfiguration (oChipInstance) {
|
|
770
776
|
var oAppLauncherStyleConfig = {},
|
|
@@ -825,7 +831,7 @@ sap.ui.define([
|
|
|
825
831
|
// try Smart Business tile format first, as it should be more likely that those are present
|
|
826
832
|
// than that a custom launcher tile is present.
|
|
827
833
|
// it is avoided to detect if oChipInstance is a Smart Business tile as
|
|
828
|
-
// 1) it is hard to detect as there are many
|
|
834
|
+
// 1) it is hard to detect as there are many different types and versions of those
|
|
829
835
|
// 2) a custom tile may also be based on a Smart Business tile
|
|
830
836
|
oSmartBusinessConfiguration = getSmartBusinessTileConfiguration(oChipInstance);
|
|
831
837
|
if (oSmartBusinessConfiguration.navigation_use_semantic_object) {
|
|
@@ -1274,10 +1280,10 @@ sap.ui.define([
|
|
|
1274
1280
|
});
|
|
1275
1281
|
|
|
1276
1282
|
/*
|
|
1277
|
-
In spaces mode we will create an empty page inside an empty
|
|
1283
|
+
In spaces mode we will create an empty page inside an empty pageSet.
|
|
1278
1284
|
This is needed because the appfinder and search integration request the classic homepage content which is not available in spaces mode.
|
|
1279
|
-
For consistency reasons it should then also not be
|
|
1280
|
-
The empty
|
|
1285
|
+
For consistency reasons it should then also not be available from the search results.
|
|
1286
|
+
The empty pageSet has all needed functions the real pageSet has.
|
|
1281
1287
|
Functions which should not be used in spaces mode throw an error
|
|
1282
1288
|
*/
|
|
1283
1289
|
if (Config.last("/core/spaces/enabled")) {
|
|
@@ -1349,6 +1355,27 @@ sap.ui.define([
|
|
|
1349
1355
|
return oGetGroupsDeferred.promise();
|
|
1350
1356
|
};
|
|
1351
1357
|
|
|
1358
|
+
/**
|
|
1359
|
+
* Calls getGroups and waits also for custom and remote tiles to be loaded
|
|
1360
|
+
* @returns {Promise<object[]>} Resolves the result of the getGroups call
|
|
1361
|
+
*
|
|
1362
|
+
* @private
|
|
1363
|
+
* @since 1.105.0
|
|
1364
|
+
*/
|
|
1365
|
+
this.getGroupsAndWaitForAllChips = function () {
|
|
1366
|
+
return new Promise(function (resolve, reject) {
|
|
1367
|
+
that.getGroups()
|
|
1368
|
+
.done(resolve)
|
|
1369
|
+
.fail(reject);
|
|
1370
|
+
})
|
|
1371
|
+
.then(function (aGroups) {
|
|
1372
|
+
return Promise.allSettled(that._aOtherChipsPromises)
|
|
1373
|
+
.then(function () {
|
|
1374
|
+
return aGroups;
|
|
1375
|
+
});
|
|
1376
|
+
});
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1352
1379
|
/**
|
|
1353
1380
|
* Returns the default group. This is an asynchronous function using a jQuery.Promise.
|
|
1354
1381
|
* In case of success its <code>done</code> function is called and gets the
|
|
@@ -1740,8 +1767,8 @@ sap.ui.define([
|
|
|
1740
1767
|
* In case of success its <code>done</code> function is called.
|
|
1741
1768
|
* In case of error the promise's <code>fail</code> function is called and gets the old title.
|
|
1742
1769
|
*
|
|
1743
|
-
* @param {string} sTitle the new title of the group
|
|
1744
1770
|
* @param {object} oGroup the group we need to set the title
|
|
1771
|
+
* @param {string} sNewTitle the new title of the group
|
|
1745
1772
|
* @returns {object} a jQuery.Promise
|
|
1746
1773
|
* @since 1.11.0
|
|
1747
1774
|
*/
|
|
@@ -1802,7 +1829,7 @@ sap.ui.define([
|
|
|
1802
1829
|
* @since 1.11.0
|
|
1803
1830
|
*/
|
|
1804
1831
|
this.removeTile = function (oGroup, oTile) {
|
|
1805
|
-
var oDeferred = jQuery.Deferred();
|
|
1832
|
+
var oDeferred = new jQuery.Deferred();
|
|
1806
1833
|
|
|
1807
1834
|
oGroup.removeChipInstance(oTile,
|
|
1808
1835
|
oDeferred.resolve.bind(oDeferred),
|
|
@@ -2160,7 +2187,7 @@ sap.ui.define([
|
|
|
2160
2187
|
var oVisibleContract = oTile.getContract("visible");
|
|
2161
2188
|
|
|
2162
2189
|
if (oVisibleContract) {
|
|
2163
|
-
// tile uses visibility contract and sets the latest
|
|
2190
|
+
// tile uses visibility contract and sets the latest visibility
|
|
2164
2191
|
// NOTE: mEarlyTileVisibilities[sTileId] may be changed after handler was attached
|
|
2165
2192
|
oVisibleContract.setVisible(mEarlyTileVisibilities[sTileId]);
|
|
2166
2193
|
}
|
|
@@ -3126,9 +3153,9 @@ sap.ui.define([
|
|
|
3126
3153
|
|
|
3127
3154
|
/**
|
|
3128
3155
|
* Checks the chip by initializing it
|
|
3129
|
-
* @param {
|
|
3156
|
+
* @param {object} oChipInstance The chipInstance
|
|
3130
3157
|
*
|
|
3131
|
-
* @returns {Promise<
|
|
3158
|
+
* @returns {Promise<undefined>} Resolves in case the chip initializes correctly.
|
|
3132
3159
|
*
|
|
3133
3160
|
* @since 1.83.0
|
|
3134
3161
|
* @private
|
|
@@ -3272,33 +3299,37 @@ sap.ui.define([
|
|
|
3272
3299
|
* @since 1.17.1
|
|
3273
3300
|
*/
|
|
3274
3301
|
LaunchPageAdapter.prototype._visitBookmarks = function (sUrl, fnVisitor) {
|
|
3275
|
-
var aDeferreds = []
|
|
3276
|
-
|
|
3302
|
+
var aDeferreds = [];
|
|
3303
|
+
var oDeferred = new jQuery.Deferred();
|
|
3277
3304
|
|
|
3278
|
-
that.
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3305
|
+
that.getGroupsAndWaitForAllChips()
|
|
3306
|
+
.then(function (aGroups) {
|
|
3307
|
+
var iCount = 0;
|
|
3308
|
+
aGroups.forEach(function (oGroup) {
|
|
3309
|
+
oGroup.getChipInstances().forEach(function (oChipInstance) {
|
|
3310
|
+
if (that._isBookmarkFor(oChipInstance, sUrl)) {
|
|
3311
|
+
iCount += 1;
|
|
3312
|
+
if (fnVisitor) {
|
|
3313
|
+
aDeferreds.push(fnVisitor(oChipInstance));
|
|
3314
|
+
}
|
|
3286
3315
|
}
|
|
3287
|
-
}
|
|
3316
|
+
});
|
|
3288
3317
|
});
|
|
3318
|
+
if (aDeferreds.length === 0) {
|
|
3319
|
+
oDeferred.resolve(iCount);
|
|
3320
|
+
} else {
|
|
3321
|
+
jQuery.when.apply(jQuery, aDeferreds)
|
|
3322
|
+
.fail(function (sMessage) {
|
|
3323
|
+
oDeferred.reject(sMessage);
|
|
3324
|
+
})
|
|
3325
|
+
.done(function () {
|
|
3326
|
+
oDeferred.resolve(iCount);
|
|
3327
|
+
});
|
|
3328
|
+
}
|
|
3329
|
+
})
|
|
3330
|
+
.catch(function (vError) {
|
|
3331
|
+
oDeferred.reject(vError.message || vError);
|
|
3289
3332
|
});
|
|
3290
|
-
if (aDeferreds.length === 0) {
|
|
3291
|
-
oDeferred.resolve(iCount);
|
|
3292
|
-
} else {
|
|
3293
|
-
jQuery.when.apply(jQuery, aDeferreds)
|
|
3294
|
-
.fail(function (sMessage) {
|
|
3295
|
-
oDeferred.reject(sMessage);
|
|
3296
|
-
})
|
|
3297
|
-
.done(function () {
|
|
3298
|
-
oDeferred.resolve(iCount);
|
|
3299
|
-
});
|
|
3300
|
-
}
|
|
3301
|
-
});
|
|
3302
3333
|
return oDeferred.promise();
|
|
3303
3334
|
};
|
|
3304
3335
|
|
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ushell/Config",
|
|
9
|
-
"sap/base/Log"
|
|
10
|
-
|
|
9
|
+
"sap/base/Log",
|
|
10
|
+
"sap/ushell/library"
|
|
11
|
+
], function (Config, Log, ushellLibrary) {
|
|
11
12
|
"use strict";
|
|
12
13
|
|
|
14
|
+
var ContentNodeType = ushellLibrary.ContentNodeType;
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* Constructs a new instance of the MenuAdapter for the ABAP
|
|
15
18
|
* platform
|
|
@@ -68,33 +71,34 @@ sap.ui.define([
|
|
|
68
71
|
/**
|
|
69
72
|
* Gets the menu entries for the spaces assigned to the user.
|
|
70
73
|
* Handles the MyHomeSpace visibility.
|
|
71
|
-
* Those menu items and their structure
|
|
74
|
+
* Those menu items and their structure are used for the selection in bookmarking.
|
|
72
75
|
* @returns {Promise<MenuEntry[]>} The menu entries, @see sap.ushell.services.menu#MenuEntry
|
|
73
76
|
*
|
|
74
77
|
* @since 1.104.0
|
|
75
78
|
* @private
|
|
76
79
|
*/
|
|
77
80
|
MenuAdapter.prototype.getContentNodeEntries = function () {
|
|
78
|
-
var bHomeAppEnabled = Config.last("/core/homeApp/enabled");
|
|
79
|
-
var bMyHomeSpaceEnabled = Config.last("/core/spaces/myHome/enabled");
|
|
80
|
-
var bMyHomeUserEnabled = Config.last("/core/spaces/myHome/userEnabled");
|
|
81
|
-
var sMyHomeSpaceId = Config.last("/core/spaces/myHome/myHomeSpaceId");
|
|
82
|
-
|
|
83
81
|
var aMetatagMenu = this._getAssignedSpaces();
|
|
84
|
-
|
|
85
|
-
// but always keep myHomeSpace when homeApp is enabled
|
|
86
|
-
if (!bHomeAppEnabled && bMyHomeSpaceEnabled && !bMyHomeUserEnabled) {
|
|
87
|
-
for (var i = 0; i < aMetatagMenu.length; i++) {
|
|
88
|
-
if (aMetatagMenu[i].id === sMyHomeSpaceId) {
|
|
89
|
-
aMetatagMenu = aMetatagMenu.slice(1);
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
82
|
+
this._removeMyHomeForContentNodes(aMetatagMenu);
|
|
94
83
|
var aMenuEntries = this._buildMenuEntries(aMetatagMenu);
|
|
95
84
|
return Promise.resolve(aMenuEntries);
|
|
96
85
|
};
|
|
97
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Gets the content nodes for the spaces assigned to the user.
|
|
89
|
+
* Handles the MyHomeSpace visibility.
|
|
90
|
+
* @returns {Promise<ContentNode[]>} The content nodes, @see sap.ushell.services.menu#ContentNode
|
|
91
|
+
*
|
|
92
|
+
* @since 1.105.0
|
|
93
|
+
* @private
|
|
94
|
+
*/
|
|
95
|
+
MenuAdapter.prototype.getContentNodes = function () {
|
|
96
|
+
var aMetatagMenu = this._getAssignedSpaces();
|
|
97
|
+
this._removeMyHomeForContentNodes(aMetatagMenu);
|
|
98
|
+
var aContentNodes = this._buildContentNodes(aMetatagMenu);
|
|
99
|
+
return Promise.resolve(aContentNodes);
|
|
100
|
+
};
|
|
101
|
+
|
|
98
102
|
/**
|
|
99
103
|
* Builds based on the metatags a menu which is accepted by the menu service
|
|
100
104
|
* @param {object[]} aMetatagMenu The menu content from the metatags
|
|
@@ -108,15 +112,7 @@ sap.ui.define([
|
|
|
108
112
|
// having 2nd level sub menu entries for its pages inside if needed
|
|
109
113
|
|
|
110
114
|
var aMenuEntries = aMetatagMenu
|
|
111
|
-
.filter(
|
|
112
|
-
|
|
113
|
-
// No menu entry for a space, if no page assigned
|
|
114
|
-
if (!oSpace.pages || oSpace.pages.length === 0) {
|
|
115
|
-
Log.warning("FLP space " + oSpace.id + " without page omitted in FLP menu.", "", "sap.ushell_abap.adapters.abap.MenuAdapter");
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
return true;
|
|
119
|
-
})
|
|
115
|
+
.filter(this._isSpaceNotEmpty.bind(null, "FLP menu"))
|
|
120
116
|
.map(function (oSpace) {
|
|
121
117
|
var oTopMenuEntry = {
|
|
122
118
|
title: oSpace.title || oSpace.id,
|
|
@@ -178,6 +174,84 @@ sap.ui.define([
|
|
|
178
174
|
return aMenuEntries;
|
|
179
175
|
};
|
|
180
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Builds content nodes based on the assigned spaces metatag data
|
|
179
|
+
* @param {object[]} aMetatagMenu The assigned spaces and pages from the metatags
|
|
180
|
+
* @returns {ContentNode[]} The content nodes required by the menu service, @see sap.ushell.services.menu#ContentNode
|
|
181
|
+
*
|
|
182
|
+
* @private
|
|
183
|
+
* @since 1.105.0
|
|
184
|
+
*/
|
|
185
|
+
MenuAdapter.prototype._buildContentNodes = function (aMetatagMenu) {
|
|
186
|
+
var aContentNodes = aMetatagMenu
|
|
187
|
+
.filter(this._isSpaceNotEmpty.bind(null, "content nodes"))
|
|
188
|
+
.map(function (oSpace) {
|
|
189
|
+
return {
|
|
190
|
+
id: oSpace.id,
|
|
191
|
+
label: oSpace.title || oSpace.id,
|
|
192
|
+
type: ContentNodeType.Space,
|
|
193
|
+
isContainer: false,
|
|
194
|
+
children: oSpace.pages.map(function (oPage) {
|
|
195
|
+
return {
|
|
196
|
+
id: oPage.id,
|
|
197
|
+
label: oPage.title || oPage.id,
|
|
198
|
+
type: ContentNodeType.Page,
|
|
199
|
+
isContainer: true
|
|
200
|
+
};
|
|
201
|
+
})
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
return aContentNodes;
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Filter function that checks if a space is empty to filter it out. Also logs a warning message.
|
|
210
|
+
* @param {string} sEntityName Name of the entity where the space is filtered out for the warning message
|
|
211
|
+
* @param {object} oSpace The space to be filtered
|
|
212
|
+
*
|
|
213
|
+
* @returns {boolean} true = keep, false = remove
|
|
214
|
+
*
|
|
215
|
+
* @private
|
|
216
|
+
* @since 1.105.0
|
|
217
|
+
*/
|
|
218
|
+
MenuAdapter.prototype._isSpaceNotEmpty = function (sEntityName, oSpace) {
|
|
219
|
+
if (!oSpace.pages || oSpace.pages.length === 0) {
|
|
220
|
+
Log.warning("FLP space " + oSpace.id + " without page omitted in " + sEntityName + ".", "", "sap.ushell_abap.adapters.abap.MenuAdapter");
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
return true;
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The backend adds the FLP MyHome space as first space if it is active in the FLP settings.
|
|
228
|
+
* If the user has deactivated the FLP MyHome in the user settings, the space has to be removed again.
|
|
229
|
+
* If the custom MyHome is active the home space is not removed.
|
|
230
|
+
* @param {object[]} aMetatagMenu The assigned spaces and pages from the metatags
|
|
231
|
+
*
|
|
232
|
+
* @private
|
|
233
|
+
* @since 1.105.0
|
|
234
|
+
*/
|
|
235
|
+
MenuAdapter.prototype._removeMyHomeForContentNodes = function (aMetatagMenu) {
|
|
236
|
+
var bHomeAppEnabled = Config.last("/core/homeApp/enabled");
|
|
237
|
+
var bMyHomeSpaceEnabled = Config.last("/core/spaces/myHome/enabled");
|
|
238
|
+
var bMyHomeUserEnabled = Config.last("/core/spaces/myHome/userEnabled");
|
|
239
|
+
var sMyHomeSpaceId = Config.last("/core/spaces/myHome/myHomeSpaceId");
|
|
240
|
+
|
|
241
|
+
//always keep myHomeSpace when homeApp is enabled
|
|
242
|
+
if (bHomeAppEnabled) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
// only remove myHomeSpace when myHome is enabled and user has disabled it
|
|
247
|
+
if (bMyHomeSpaceEnabled && !bMyHomeUserEnabled) {
|
|
248
|
+
// if the MyHome space is active it is always in the first position
|
|
249
|
+
if (aMetatagMenu[0] && aMetatagMenu[0].id === sMyHomeSpaceId) {
|
|
250
|
+
aMetatagMenu.shift();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
|
|
181
255
|
/**
|
|
182
256
|
* Gets the menu entries for the pages assigned to the user by querying the
|
|
183
257
|
* content of the meta tag with the name' sap.ushell.assignedSpaces'.
|