@sapui5/sap.ushell_abap 1.145.1 → 1.147.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 +4 -4
- package/src/main/js/sap/ushell_abap/.library +8 -7
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +4 -5
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +143 -69
- package/src/main/js/sap/ushell_abap/adapters/abap/CommonDataModelAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +7 -4
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +19 -10
- package/src/main/js/sap/ushell_abap/adapters/abap/FlpLaunchPageAdapter.js +148 -109
- 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 +9 -10
- 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/hana/ContainerAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask/PrepareDirectAppStart.js +20 -0
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask/RequestGroups.js +51 -0
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask/RequestTargetMappings.js +29 -0
- package/src/main/js/sap/ushell_abap/bootstrap/BootTask.js +47 -0
- package/src/main/js/sap/ushell_abap/bootstrap/ConfigurationProvider.js +87 -0
- package/src/main/js/sap/ushell_abap/bootstrap/DirectAppStart.js +231 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/CreateRenderer.js +43 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/InitXhrLogon.js +148 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad/RequestPages.js +86 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpad.js +63 -0
- package/src/main/js/sap/ushell_abap/bootstrap/LoadLaunchpadModule.js +11 -0
- package/src/main/js/sap/ushell_abap/bootstrap/PageSetsRequestHandler.js +247 -0
- package/src/main/js/sap/ushell_abap/bootstrap/PlatformConfig.js +385 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/SAPCompanionConditionSetter.js → SAPCompanionConditionSetter.js} +6 -4
- package/src/main/js/sap/ushell_abap/bootstrap/StartupRequestHandler.js +145 -0
- package/src/main/js/sap/ushell_abap/bootstrap/ThemeHandler.js +276 -0
- package/src/main/js/sap/ushell_abap/bootstrap/XhrFactory.js +69 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/XhrLogonEventHandler.js → XhrLogonEventHandler.js} +13 -7
- package/src/main/js/sap/ushell_abap/bootstrap/XhrLogonLibLoader.js +51 -0
- package/src/main/js/sap/ushell_abap/bootstrap/abap-def-dev.js +20 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/abap-def-loader.js → abap-def-loader.js} +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/abap-def.js +22 -0
- package/src/main/js/sap/ushell_abap/bootstrap/{evo/abap.constants.js → abapConstants.js} +8 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.js +1 -1
- package/src/main/js/sap/ushell_abap/components/TCodeNavigation/MessageCode.js +18 -1
- package/src/main/js/sap/ushell_abap/components/TCodeNavigation.js +27 -16
- package/src/main/js/sap/ushell_abap/library.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Contracts.js +33 -0
- package/ui5.yaml +7 -6
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +0 -42
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +0 -45
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +0 -172
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.theme.js +0 -28
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +0 -176
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +0 -72
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +0 -219
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +0 -154
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +0 -75
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.LibLoader.js +0 -21
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.configure.js +0 -62
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhrlogon.handler.js +0 -82
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +0 -948
|
@@ -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.
|
|
6
|
+
* @version 1.147.0
|
|
7
7
|
*/
|
|
8
8
|
sap.ui.define([
|
|
9
9
|
"sap/ui/thirdparty/URI",
|
|
@@ -12,6 +12,7 @@ sap.ui.define([
|
|
|
12
12
|
"sap/base/util/ObjectPath",
|
|
13
13
|
"sap/base/util/isEmptyObject",
|
|
14
14
|
"sap/m/GenericTile",
|
|
15
|
+
"sap/ushell/base/SAPBusinessClientEnablement",
|
|
15
16
|
"sap/ushell/Config",
|
|
16
17
|
"sap/base/util/deepExtend",
|
|
17
18
|
"sap/ushell/utils/chipsUtils",
|
|
@@ -20,7 +21,6 @@ sap.ui.define([
|
|
|
20
21
|
"sap/base/Log",
|
|
21
22
|
"sap/m/library",
|
|
22
23
|
"sap/ushell/ui/tile/StaticTile",
|
|
23
|
-
"sap/ushell/utils",
|
|
24
24
|
"sap/ushell_abap/pbServices/ui2/contracts/preview",
|
|
25
25
|
"sap/ushell/Container",
|
|
26
26
|
"sap/ushell/utils/LaunchpadError"
|
|
@@ -31,6 +31,7 @@ sap.ui.define([
|
|
|
31
31
|
ObjectPath,
|
|
32
32
|
isEmptyObject,
|
|
33
33
|
GenericTile,
|
|
34
|
+
SAPBusinessClientEnablement,
|
|
34
35
|
Config,
|
|
35
36
|
deepExtend,
|
|
36
37
|
chipsUtils,
|
|
@@ -39,7 +40,6 @@ sap.ui.define([
|
|
|
39
40
|
Log,
|
|
40
41
|
mobileLibrary,
|
|
41
42
|
StaticTile,
|
|
42
|
-
ushellUtils,
|
|
43
43
|
Preview,
|
|
44
44
|
Container,
|
|
45
45
|
LaunchpadError
|
|
@@ -643,7 +643,7 @@ sap.ui.define([
|
|
|
643
643
|
}
|
|
644
644
|
const oTargetMappingsConfig = ObjectPath.create("services.targetMappings", oAdapterConfig);
|
|
645
645
|
const sCacheId = oTargetMappingsConfig.cacheId || "";
|
|
646
|
-
let sUrl = `/sap/bc/ui2/start_up?so=%2A&action=%2A&tm-compact=true&shellType=${
|
|
646
|
+
let sUrl = `/sap/bc/ui2/start_up?so=%2A&action=%2A&tm-compact=true&shellType=${SAPBusinessClientEnablement.getShellType()}&depth=0`;
|
|
647
647
|
|
|
648
648
|
if (sCacheId) {
|
|
649
649
|
sUrl += `${sUrl.indexOf("?") < 0 ? "?" : "&"}sap-cache-id=${sCacheId}`;
|
|
@@ -727,12 +727,13 @@ sap.ui.define([
|
|
|
727
727
|
/**
|
|
728
728
|
* Wraps the current <code>allCatalogs</code> collection into black box objects.
|
|
729
729
|
*
|
|
730
|
-
* @returns {object[]} A list of catalog objects.
|
|
731
730
|
* @param {sap.ushell_abap.pbServices.ui2.Factory} oFactory The factory to create new chip instances.
|
|
731
|
+
* @param {sap.ushell_abap.pbServices.ui2.PageSet} oPageSet The page set containing the default page with allCatalogs.
|
|
732
|
+
* @returns {object[]} A list of catalog objects.
|
|
732
733
|
* TODO cache result?!
|
|
733
734
|
*/
|
|
734
|
-
function wrapCatalogs (oFactory) {
|
|
735
|
-
const oAllCatalogs =
|
|
735
|
+
function wrapCatalogs (oFactory, oPageSet) {
|
|
736
|
+
const oAllCatalogs = oPageSet.getDefaultPage().getAllCatalogs();
|
|
736
737
|
const aCatalogs = oAllCatalogs.getCatalogs();
|
|
737
738
|
const aWrappedCatalogs = [];
|
|
738
739
|
|
|
@@ -1231,6 +1232,96 @@ sap.ui.define([
|
|
|
1231
1232
|
}
|
|
1232
1233
|
};
|
|
1233
1234
|
|
|
1235
|
+
/**
|
|
1236
|
+
* Lazily initializes <code>_oCurrentPageSet</code> and returns a jQuery promise resolving with it.
|
|
1237
|
+
* Parallel calls are deduplicated. Subsequent calls return the already-resolved promise.
|
|
1238
|
+
*
|
|
1239
|
+
* @returns {jQuery.Promise<sap.ushell_abap.pbServices.ui2.PageSet>} Resolves with the current page set object.
|
|
1240
|
+
* @private
|
|
1241
|
+
*/
|
|
1242
|
+
this._getPageSet = function () {
|
|
1243
|
+
if (this._oGetPageSetDeferred) {
|
|
1244
|
+
return this._oGetPageSetDeferred.promise();
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
this._oGetPageSetDeferred = new jQuery.Deferred();
|
|
1248
|
+
|
|
1249
|
+
Container.getServiceAsync("PageBuilding")
|
|
1250
|
+
.then((PageBuildingService) => {
|
|
1251
|
+
const fnReadPageSet = PageBuildingService.getFactory().getPageBuildingService().readPageSet;
|
|
1252
|
+
|
|
1253
|
+
if (oLaunchPageServiceConfig && oLaunchPageServiceConfig.cacheId) {
|
|
1254
|
+
// add PageSet cache buster token if configured
|
|
1255
|
+
fnReadPageSet.cacheBusterTokens
|
|
1256
|
+
.put(sDEFAULT_PAGE_ID, oLaunchPageServiceConfig.cacheId);
|
|
1257
|
+
}
|
|
1258
|
+
if (oLaunchPageServiceConfig && oLaunchPageServiceConfig["sap-ui2-cache-disable"] && fnReadPageSet) {
|
|
1259
|
+
const oAppendedParameters = fnReadPageSet.appendedParameters || {};
|
|
1260
|
+
oAppendedParameters["sap-ui2-cache-disable"] = oLaunchPageServiceConfig["sap-ui2-cache-disable"];
|
|
1261
|
+
fnReadPageSet.appendedParameters = oAppendedParameters;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
/*
|
|
1265
|
+
* In spaces mode we will create an empty page inside an empty pageSet.
|
|
1266
|
+
* This is needed because the appfinder and search integration request the classic homepage content
|
|
1267
|
+
* which is not available in spaces mode.
|
|
1268
|
+
* For consistency reasons it should then also not be available from the search results.
|
|
1269
|
+
* The empty pageSet has all needed functions the real pageSet has.
|
|
1270
|
+
* Functions which should not be used in spaces mode throw an error
|
|
1271
|
+
*/
|
|
1272
|
+
if (Config.last("/core/spaces/enabled")) {
|
|
1273
|
+
const oFactory = PageBuildingService.getFactory();
|
|
1274
|
+
|
|
1275
|
+
const oFakeDefaultPage = new Page(oFactory, {
|
|
1276
|
+
id: PAGE_ID_WITHOUT_TM
|
|
1277
|
+
});
|
|
1278
|
+
|
|
1279
|
+
this._oCurrentPageSet = {
|
|
1280
|
+
getDefaultPage: function () {
|
|
1281
|
+
return oFakeDefaultPage;
|
|
1282
|
+
},
|
|
1283
|
+
getPages: function () {
|
|
1284
|
+
return [oFakeDefaultPage];
|
|
1285
|
+
},
|
|
1286
|
+
appendPage: function () {
|
|
1287
|
+
throw new Error("Not implemented in Pages Runtime");
|
|
1288
|
+
},
|
|
1289
|
+
isPageRemovable: function () {
|
|
1290
|
+
return false;
|
|
1291
|
+
},
|
|
1292
|
+
removePage: function () {
|
|
1293
|
+
throw new Error("Not implemented in Pages Runtime");
|
|
1294
|
+
},
|
|
1295
|
+
isPageResettable: function () {
|
|
1296
|
+
return true;
|
|
1297
|
+
},
|
|
1298
|
+
resetPage: function () {
|
|
1299
|
+
},
|
|
1300
|
+
getConfiguration: function () {
|
|
1301
|
+
return "{}";
|
|
1302
|
+
},
|
|
1303
|
+
setConfiguration: function () {
|
|
1304
|
+
},
|
|
1305
|
+
filter: function () {
|
|
1306
|
+
}
|
|
1307
|
+
};
|
|
1308
|
+
|
|
1309
|
+
this._oGetPageSetDeferred.resolve(this._oCurrentPageSet);
|
|
1310
|
+
} else {
|
|
1311
|
+
PageBuildingService.getPageSet(sDEFAULT_PAGE_ID)
|
|
1312
|
+
.fail(this._oGetPageSetDeferred.reject.bind(this._oGetPageSetDeferred))
|
|
1313
|
+
.done((oPageSet) => {
|
|
1314
|
+
this._oCurrentPageSet = oPageSet;
|
|
1315
|
+
// remove unsupported pages before loading their chip instances
|
|
1316
|
+
this._oCurrentPageSet.filter([sDEFAULT_PAGE_ID], [sDEFAULT_CATALOG_ID]);
|
|
1317
|
+
this._oGetPageSetDeferred.resolve(oPageSet);
|
|
1318
|
+
});
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1321
|
+
|
|
1322
|
+
return this._oGetPageSetDeferred.promise();
|
|
1323
|
+
};
|
|
1324
|
+
|
|
1234
1325
|
/**
|
|
1235
1326
|
* Returns the groups of the user.
|
|
1236
1327
|
* These page objects can be passed in to all functions expecting a group.
|
|
@@ -1249,86 +1340,25 @@ sap.ui.define([
|
|
|
1249
1340
|
if (!oGetGroupsDeferred) {
|
|
1250
1341
|
// start a new request and remember it in oGetGroupsDeferred, so that parallel calls don't start another one
|
|
1251
1342
|
oGetGroupsDeferred = new jQuery.Deferred();
|
|
1252
|
-
const oDeferred = new jQuery.Deferred();
|
|
1253
1343
|
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
const fnReadPageSet = PageBuildingService.getFactory().getPageBuildingService().readPageSet;
|
|
1344
|
+
// The target mappings are used in the classic homepage and in spaces mode.
|
|
1345
|
+
const oMappingPromise = this._loadTargetMappings();
|
|
1257
1346
|
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
fnReadPageSet.cacheBusterTokens
|
|
1261
|
-
.put(sDEFAULT_PAGE_ID, oLaunchPageServiceConfig.cacheId);
|
|
1262
|
-
}
|
|
1263
|
-
if (oLaunchPageServiceConfig && oLaunchPageServiceConfig["sap-ui2-cache-disable"] && fnReadPageSet) {
|
|
1264
|
-
const oAppendedParameters = fnReadPageSet.appendedParameters || {};
|
|
1265
|
-
oAppendedParameters["sap-ui2-cache-disable"] = oLaunchPageServiceConfig["sap-ui2-cache-disable"];
|
|
1266
|
-
fnReadPageSet.appendedParameters = oAppendedParameters;
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
// The target mappings are used in the classic homepage and in spaces mode.
|
|
1270
|
-
const oMappingPromise = this._loadTargetMappings();
|
|
1271
|
-
|
|
1272
|
-
/*
|
|
1273
|
-
* In spaces mode we will create an empty page inside an empty pageSet.
|
|
1274
|
-
* This is needed because the appfinder and search integration request the classic homepage content which is not available in spaces mode.
|
|
1275
|
-
* For consistency reasons it should then also not be available from the search results.
|
|
1276
|
-
* The empty pageSet has all needed functions the real pageSet has.
|
|
1277
|
-
* Functions which should not be used in spaces mode throw an error
|
|
1278
|
-
*/
|
|
1347
|
+
this._getPageSet()
|
|
1348
|
+
.done((oPageSet) => {
|
|
1279
1349
|
if (Config.last("/core/spaces/enabled")) {
|
|
1280
|
-
const oFactory = PageBuildingService.getFactory();
|
|
1281
|
-
|
|
1282
|
-
const oFakeDefaultPage = new Page(oFactory, {
|
|
1283
|
-
id: PAGE_ID_WITHOUT_TM
|
|
1284
|
-
});
|
|
1285
|
-
|
|
1286
|
-
that._oCurrentPageSet = {
|
|
1287
|
-
getDefaultPage: function () {
|
|
1288
|
-
return oFakeDefaultPage;
|
|
1289
|
-
},
|
|
1290
|
-
getPages: function () {
|
|
1291
|
-
return [oFakeDefaultPage];
|
|
1292
|
-
},
|
|
1293
|
-
appendPage: function () {
|
|
1294
|
-
throw new Error("Not implemented in Pages Runtime");
|
|
1295
|
-
},
|
|
1296
|
-
isPageRemovable: function () {
|
|
1297
|
-
return false;
|
|
1298
|
-
},
|
|
1299
|
-
removePage: function () {
|
|
1300
|
-
throw new Error("Not implemented in Pages Runtime");
|
|
1301
|
-
},
|
|
1302
|
-
isPageResettable: function () {
|
|
1303
|
-
return true;
|
|
1304
|
-
},
|
|
1305
|
-
resetPage: function () {
|
|
1306
|
-
},
|
|
1307
|
-
getConfiguration: function () {
|
|
1308
|
-
return "{}";
|
|
1309
|
-
},
|
|
1310
|
-
setConfiguration: function () {
|
|
1311
|
-
},
|
|
1312
|
-
filter: function () {
|
|
1313
|
-
}
|
|
1314
|
-
};
|
|
1315
|
-
|
|
1316
1350
|
oGetGroupsDeferred.resolve([]);
|
|
1317
1351
|
} else {
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1320
|
-
oPageSetsPromise
|
|
1321
|
-
.fail(oDeferred.reject.bind(oDeferred))
|
|
1322
|
-
.done((oPageSet) => {
|
|
1323
|
-
this._oCurrentPageSet = oPageSet;
|
|
1324
|
-
// remove unsupported pages before loading their chip instances
|
|
1325
|
-
this._oCurrentPageSet.filter([sDEFAULT_PAGE_ID], [sDEFAULT_CATALOG_ID]);
|
|
1326
|
-
// Trigger load of all CHIP instances, but wait for the locals only
|
|
1327
|
-
this._loadApplaunchersAndDelayLoadingOfOtherChips(oPageSet.getPages(), oDeferred.resolve.bind(oDeferred, oPageSet));
|
|
1328
|
-
});
|
|
1352
|
+
const oChipsLoadedDeferred = new jQuery.Deferred();
|
|
1329
1353
|
|
|
1330
|
-
|
|
1331
|
-
|
|
1354
|
+
// Trigger load of all CHIP instances, but wait for the locals only
|
|
1355
|
+
this._loadApplaunchersAndDelayLoadingOfOtherChips(
|
|
1356
|
+
oPageSet.getPages(),
|
|
1357
|
+
oChipsLoadedDeferred.resolve.bind(oChipsLoadedDeferred)
|
|
1358
|
+
);
|
|
1359
|
+
|
|
1360
|
+
jQuery.when(oMappingPromise, oChipsLoadedDeferred)
|
|
1361
|
+
.done(() => {
|
|
1332
1362
|
this._bPageSetFullyLoaded = true;
|
|
1333
1363
|
|
|
1334
1364
|
if (Log.getLevel() >= Log.Level.DEBUG) { // sap-ui-debug = true
|
|
@@ -1339,7 +1369,8 @@ sap.ui.define([
|
|
|
1339
1369
|
})
|
|
1340
1370
|
.fail(oGetGroupsDeferred.reject.bind(oGetGroupsDeferred));
|
|
1341
1371
|
}
|
|
1342
|
-
})
|
|
1372
|
+
})
|
|
1373
|
+
.fail(oGetGroupsDeferred.reject.bind(oGetGroupsDeferred));
|
|
1343
1374
|
}
|
|
1344
1375
|
|
|
1345
1376
|
return oGetGroupsDeferred.promise();
|
|
@@ -2253,7 +2284,7 @@ sap.ui.define([
|
|
|
2253
2284
|
|
|
2254
2285
|
if (oTile.isStub() && oTile.$loadingPromise) {
|
|
2255
2286
|
// the tile is currently loaded
|
|
2256
|
-
const sTileId =
|
|
2287
|
+
const sTileId = oTile.getId();
|
|
2257
2288
|
const bOldVisibility = mEarlyTileVisibilities[sTileId];
|
|
2258
2289
|
// update cached visibility also if handler was already attached
|
|
2259
2290
|
mEarlyTileVisibilities[sTileId] = bNewVisible;
|
|
@@ -2405,15 +2436,16 @@ sap.ui.define([
|
|
|
2405
2436
|
* Resolves the promise to return the user's catalogs by refreshing the first remote catalog found, failing gracefully.
|
|
2406
2437
|
*
|
|
2407
2438
|
* @param {jQuery.Deferred} oDeferred A jQuery.Deferred to be resolved, rejected or notified.
|
|
2439
|
+
* @param {sap.ushell_abap.pbServices.ui2.PageSet} oPageSet The page set containing the default page with allCatalogs.
|
|
2408
2440
|
* @returns {Promise<sap.ushell.services.PageBuilding>} A promise that is resolved once the PageBuilding service is retrieved.
|
|
2409
2441
|
* @private
|
|
2410
2442
|
*/
|
|
2411
|
-
this._refreshRemoteCatalogs = function (oDeferred) {
|
|
2443
|
+
this._refreshRemoteCatalogs = function (oDeferred, oPageSet) {
|
|
2412
2444
|
return Container.getServiceAsync("PageBuilding")
|
|
2413
2445
|
.then((PageBuildingService) => {
|
|
2414
2446
|
let iPendingRequests = 0;
|
|
2415
2447
|
const oFactory = PageBuildingService.getFactory();
|
|
2416
|
-
const aWrappedCatalogs = wrapCatalogs(oFactory);
|
|
2448
|
+
const aWrappedCatalogs = wrapCatalogs(oFactory, oPageSet);
|
|
2417
2449
|
|
|
2418
2450
|
aWrappedCatalogs.forEach((oWrappedCatalog) => {
|
|
2419
2451
|
const oCatalog = oWrappedCatalog.ui2catalog;
|
|
@@ -2460,13 +2492,14 @@ sap.ui.define([
|
|
|
2460
2492
|
* Resolves the promise to return the user's catalogs...by just knowing them already.
|
|
2461
2493
|
*
|
|
2462
2494
|
* @param {jQuery.Deferred} oDeferred A jQuery.Deferred to be resolved, rejected or notified.
|
|
2495
|
+
* @param {sap.ushell_abap.pbServices.ui2.PageSet} oPageSet The page set containing the default page with allCatalogs.
|
|
2463
2496
|
* @returns {Promise<sap.ushell.services.PageBuilding>} A promise that is resolved once the PageBuilding service is retrieved.
|
|
2464
2497
|
* @private
|
|
2465
2498
|
*/
|
|
2466
|
-
this._useKnownCatalogs = function (oDeferred) {
|
|
2499
|
+
this._useKnownCatalogs = function (oDeferred, oPageSet) {
|
|
2467
2500
|
return Container.getServiceAsync("PageBuilding")
|
|
2468
2501
|
.then((PageBuildingService) => {
|
|
2469
|
-
const aWrappedCatalogs = wrapCatalogs(PageBuildingService.getFactory());
|
|
2502
|
+
const aWrappedCatalogs = wrapCatalogs(PageBuildingService.getFactory(), oPageSet);
|
|
2470
2503
|
|
|
2471
2504
|
aWrappedCatalogs.forEach((oWrappedCatalog) => {
|
|
2472
2505
|
oDeferred.notify(oWrappedCatalog);
|
|
@@ -2484,18 +2517,24 @@ sap.ui.define([
|
|
|
2484
2517
|
* @private
|
|
2485
2518
|
*/
|
|
2486
2519
|
this._doGetCatalogs = function (oDeferred, bRefreshRequired) {
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2520
|
+
this._getPageSet()
|
|
2521
|
+
.done((oPageSet) => {
|
|
2522
|
+
const oAllCatalogs = oPageSet.getDefaultPage().getAllCatalogs();
|
|
2523
|
+
if (oAllCatalogs.isStub()) {
|
|
2524
|
+
oAllCatalogs.load(() => {
|
|
2525
|
+
this._refreshRemoteCatalogs(oDeferred, oPageSet);
|
|
2526
|
+
}, (sErrorMessage) => {
|
|
2527
|
+
oDeferred.reject(new Error(sErrorMessage));
|
|
2528
|
+
}, "type eq 'CATALOG_PAGE' or type eq 'H' or type eq 'SM_CATALOG' or type eq 'REMOTE'", true, "title", true);
|
|
2529
|
+
} else if (bRefreshRequired) {
|
|
2530
|
+
this._refreshRemoteCatalogs(oDeferred, oPageSet);
|
|
2531
|
+
} else {
|
|
2532
|
+
this._useKnownCatalogs(oDeferred, oPageSet);
|
|
2533
|
+
}
|
|
2534
|
+
})
|
|
2535
|
+
.fail((oError) => {
|
|
2536
|
+
oDeferred.reject(oError);
|
|
2537
|
+
});
|
|
2499
2538
|
};
|
|
2500
2539
|
|
|
2501
2540
|
/**
|
|
@@ -2529,15 +2568,19 @@ sap.ui.define([
|
|
|
2529
2568
|
|
|
2530
2569
|
oPromise
|
|
2531
2570
|
.then(() => {
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2571
|
+
/**
|
|
2572
|
+
* @deprecated since 1.120
|
|
2573
|
+
*/
|
|
2574
|
+
if (!that._bPageSetFullyLoaded) {
|
|
2535
2575
|
this.getGroups()
|
|
2536
2576
|
.done(() => {
|
|
2537
2577
|
this._doGetCatalogs(oDeferred, bRefreshRequired);
|
|
2538
2578
|
})
|
|
2539
2579
|
.fail(oDeferred.reject);
|
|
2580
|
+
return;
|
|
2540
2581
|
}
|
|
2582
|
+
|
|
2583
|
+
this._doGetCatalogs(oDeferred, bRefreshRequired);
|
|
2541
2584
|
})
|
|
2542
2585
|
.catch(oDeferred.reject);
|
|
2543
2586
|
};
|
|
@@ -2832,19 +2875,15 @@ sap.ui.define([
|
|
|
2832
2875
|
/**
|
|
2833
2876
|
* Returns a Tile for preview purposes
|
|
2834
2877
|
* @param {string} sTitle The title
|
|
2835
|
-
* @returns {sap.
|
|
2878
|
+
* @returns {sap.m.GenericTile} a Preview Tile
|
|
2836
2879
|
*
|
|
2837
2880
|
* @private
|
|
2838
2881
|
* @since 1.97.0
|
|
2839
2882
|
*/
|
|
2840
2883
|
this._createPreviewTile = function (sTitle) {
|
|
2841
2884
|
// TODO remove as soon as RT has an own // TODO: pending dependency migration
|
|
2842
|
-
return new
|
|
2843
|
-
|
|
2844
|
-
subtitle: "",
|
|
2845
|
-
info: "",
|
|
2846
|
-
infoState: "Neutral",
|
|
2847
|
-
icon: "sap-icon://folder-full"
|
|
2885
|
+
return new GenericTile({
|
|
2886
|
+
header: sTitle
|
|
2848
2887
|
});
|
|
2849
2888
|
};
|
|
2850
2889
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview PagePersistenceAdapter for the ABAP platform.
|
|
5
|
-
* @version 1.
|
|
5
|
+
* @version 1.147.0
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/i18n/Localization",
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
* Constructs a new instance of the PagePersistenceAdapter for the ABAP platform
|
|
40
40
|
*
|
|
41
41
|
* @class
|
|
42
|
-
* @
|
|
42
|
+
* @since 1.67.0
|
|
43
43
|
* @private
|
|
44
44
|
*/
|
|
45
45
|
function PagePersistenceAdapter () {
|
|
@@ -52,7 +52,7 @@ sap.ui.define([
|
|
|
52
52
|
* @param {string} pageId The page ID
|
|
53
53
|
* @returns {Promise<object>} Resolves to a page
|
|
54
54
|
*
|
|
55
|
-
* @
|
|
55
|
+
* @since 1.67.0
|
|
56
56
|
* @private
|
|
57
57
|
*/
|
|
58
58
|
PagePersistenceAdapter.prototype.getPage = function (pageId) {
|
|
@@ -75,7 +75,7 @@ sap.ui.define([
|
|
|
75
75
|
* @param {string[]} aPageId The array of page ID
|
|
76
76
|
* @returns {Promise<object[]>} Resolves to array of pages
|
|
77
77
|
*
|
|
78
|
-
* @
|
|
78
|
+
* @since 1.75.0
|
|
79
79
|
* @private
|
|
80
80
|
*/
|
|
81
81
|
PagePersistenceAdapter.prototype.getPages = function (aPageId) {
|
|
@@ -100,7 +100,7 @@ sap.ui.define([
|
|
|
100
100
|
* @param {string} pageId The page ID
|
|
101
101
|
* @returns {Promise<object>} Resolves to a page in the OData format
|
|
102
102
|
*
|
|
103
|
-
* @
|
|
103
|
+
* @since 1.67.0
|
|
104
104
|
* @private
|
|
105
105
|
*/
|
|
106
106
|
PagePersistenceAdapter.prototype._readPage = function (pageId) {
|
|
@@ -142,7 +142,7 @@ sap.ui.define([
|
|
|
142
142
|
* @param {string[]} aPageId The array of page ID
|
|
143
143
|
* @returns {Promise<object[]>} Resolves to a array of page in the OData format
|
|
144
144
|
*
|
|
145
|
-
* @
|
|
145
|
+
* @since 1.75.0
|
|
146
146
|
* @private
|
|
147
147
|
*/
|
|
148
148
|
PagePersistenceAdapter.prototype._readPages = function (aPageId) {
|
|
@@ -193,7 +193,7 @@ sap.ui.define([
|
|
|
193
193
|
* @param {string[]} sPageRequest The PageSet Request
|
|
194
194
|
* @returns {Promise<object[]>} Resolves to a array of page in the OData format
|
|
195
195
|
*
|
|
196
|
-
* @
|
|
196
|
+
* @since 1.105.0
|
|
197
197
|
* @private
|
|
198
198
|
*/
|
|
199
199
|
PagePersistenceAdapter.prototype._createBatchData = function (sPageRequest) {
|
|
@@ -228,10 +228,9 @@ sap.ui.define([
|
|
|
228
228
|
* @param {string[]} sPageBatchResponse The PageSet Request
|
|
229
229
|
* @returns {Promise<object[]>} Resolves to a array of page in the OData format
|
|
230
230
|
*
|
|
231
|
-
* @
|
|
231
|
+
* @since 1.75.0
|
|
232
232
|
* @private
|
|
233
233
|
*/
|
|
234
|
-
|
|
235
234
|
PagePersistenceAdapter.prototype._retrieveBatchData = function (sPageBatchResponse) {
|
|
236
235
|
const lines = sPageBatchResponse.responseText.split("\r\n");
|
|
237
236
|
let data = [];
|
|
@@ -392,7 +391,7 @@ sap.ui.define([
|
|
|
392
391
|
* @param {Error} oError The error object
|
|
393
392
|
* @returns {Promise<object>} A rejected promise containing the error
|
|
394
393
|
*
|
|
395
|
-
* @
|
|
394
|
+
* @since 1.67.0
|
|
396
395
|
* @private
|
|
397
396
|
*/
|
|
398
397
|
PagePersistenceAdapter.prototype._rejectWithError = async function (oError) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
sap.ui.define([
|
|
3
|
+
"sap/base/Log",
|
|
4
|
+
"sap/ushell_abap/bootstrap/DirectAppStart"
|
|
5
|
+
], (
|
|
6
|
+
Log,
|
|
7
|
+
DirectAppStart
|
|
8
|
+
) => {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
class PrepareDirectAppStart {
|
|
12
|
+
async run () {
|
|
13
|
+
DirectAppStart.prepare().catch((oError) => {
|
|
14
|
+
Log.error("Error during the preparation of direct app start", oError, "sap.ushell_abap.bootstrap.BootTask");
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return new PrepareDirectAppStart();
|
|
20
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright (c) 2009-2026 SAP SE, All Rights Reserved
|
|
2
|
+
sap.ui.define([
|
|
3
|
+
"sap/base/util/ObjectPath",
|
|
4
|
+
"sap/ushell_abap/bootstrap/PageSetsRequestHandler",
|
|
5
|
+
"sap/ushell/bootstrap/Config"
|
|
6
|
+
], (
|
|
7
|
+
ObjectPath,
|
|
8
|
+
PageSetsRequestHandler,
|
|
9
|
+
BootstrapConfig
|
|
10
|
+
) => {
|
|
11
|
+
"use strict";
|
|
12
|
+
|
|
13
|
+
class RequestGroups {
|
|
14
|
+
#aInternTargets = [
|
|
15
|
+
"#Shell-home",
|
|
16
|
+
"#Launchpad-openFLPPage",
|
|
17
|
+
"#Shell-appfinder",
|
|
18
|
+
"#Shell-catalog",
|
|
19
|
+
"#shell-catalog",
|
|
20
|
+
"#Action-search"
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
#isRelevant () {
|
|
24
|
+
const oUshellConfig = BootstrapConfig.get();
|
|
25
|
+
if (ObjectPath.get("ushell.spaces.enabled", oUshellConfig)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const sHash = this.getLocationHash();
|
|
30
|
+
|
|
31
|
+
return this.#aInternTargets.some((sTarget) => sHash.startsWith(sTarget));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async run () {
|
|
35
|
+
if (!this.#isRelevant()) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const oConfig = BootstrapConfig.get();
|
|
40
|
+
const oContainerAdapterConfig = ObjectPath.get("services.Container.adapter.config", oConfig);
|
|
41
|
+
|
|
42
|
+
PageSetsRequestHandler.requestPageSets(oContainerAdapterConfig);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
getLocationHash () {
|
|
46
|
+
return window.location.hash || "#";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return new RequestGroups();
|
|
51
|
+
});
|