@sapui5/sap.ushell_abap 1.151.0 → 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 (33) 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 +1 -1
  5. package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +13 -18
  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 +430 -555
  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 +1 -1
  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 +1 -1
  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/bootstrap/PageSetsRequestHandler.js +25 -50
  23. package/src/main/js/sap/ushell_abap/bootstrap/SAPCompanionConditionSetter.js +1 -3
  24. package/src/main/js/sap/ushell_abap/integration/fileshares/NavTargetResolutionFileShareSupport.js +3 -1
  25. package/src/main/js/sap/ushell_abap/library.js +1 -1
  26. package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +69 -43
  27. package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +53 -64
  28. package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +63 -78
  29. package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +12 -15
  30. package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +10 -2
  31. package/src/main/js/sap/ushell_abap/services/NavigationDataProvider.js +4 -4
  32. package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +19 -18
  33. package/ui5.yaml +1 -3
@@ -7,11 +7,9 @@
7
7
  */
8
8
  sap.ui.define([
9
9
  "sap/base/Log",
10
- "sap/base/util/Deferred",
11
10
  "sap/ushell/bootstrap/Config"
12
11
  ], (
13
12
  Log,
14
- Deferred,
15
13
  BootstrapConfig
16
14
  ) => {
17
15
  "use strict";
@@ -43,7 +41,7 @@ sap.ui.define([
43
41
  }
44
42
 
45
43
  run () {
46
- const oDeferred = new Deferred();
44
+ const oDeferred = Promise.withResolvers();
47
45
 
48
46
  function fnKeepTrying () {
49
47
  if (this.#counter < this.#timeoutCounter) {
@@ -3,10 +3,12 @@
3
3
  sap.ui.define([
4
4
  "sap/base/Log",
5
5
  "sap/ui/core/Manifest",
6
+ "sap/ushell/base/promisify",
6
7
  "sap/ushell/Container"
7
8
  ], (
8
9
  Log,
9
10
  Manifest,
11
+ promisify,
10
12
  Container
11
13
  ) => {
12
14
  "use strict";
@@ -46,7 +48,7 @@ sap.ui.define([
46
48
  NavTargetResolutionFileShareSupport.getDataSource = function () {
47
49
  if (!NavTargetResolutionFileShareSupport._getDataSourcePromise) {
48
50
  NavTargetResolutionFileShareSupport._getDataSourcePromise = Container.getServiceAsync("NavTargetResolutionInternal").then((oNavTargetResolutionService) => {
49
- return oNavTargetResolutionService.resolveHashFragment(FILE_SHARE_INTENT); // jQuery promise is implicitly converted to native
51
+ return promisify(oNavTargetResolutionService.resolveHashFragment(FILE_SHARE_INTENT));
50
52
  }).then((oResolvedHashFragment) => {
51
53
  const sManifestUrl = oResolvedHashFragment && oResolvedHashFragment.applicationDependencies && oResolvedHashFragment.applicationDependencies.manifest;
52
54
  if (sManifestUrl) {
@@ -32,7 +32,7 @@ sap.ui.define([
32
32
  const ushellAbapLib = Library.init({
33
33
  name: "sap.ushell_abap",
34
34
  apiVersion: 2,
35
- version: "1.151.0",
35
+ version: "1.152.0",
36
36
  dependencies: [
37
37
  "sap.ui.core",
38
38
  "sap.m",
@@ -8,14 +8,12 @@ sap.ui.define([
8
8
  "sap/ui/core/EventBus",
9
9
  "sap/ushell_abap/base/Ui2Error",
10
10
  "sap/ushell_abap/base/Ui2Utils",
11
- "sap/base/Log",
12
- "sap/ui/thirdparty/jquery"
11
+ "sap/base/Log"
13
12
  ], (
14
13
  EventBus,
15
- SrvcError,
16
- Utils,
17
- Log,
18
- jQuery
14
+ Ui2Error,
15
+ Ui2Utils,
16
+ Log
19
17
  ) => {
20
18
  "use strict";
21
19
 
@@ -53,11 +51,13 @@ sap.ui.define([
53
51
  let oAlterEgo; // catalog's representation with all relations removed
54
52
  let oCatalogPage;
55
53
  let aChips = [];
56
- let oReadPromise; // if existing and in state "pending", a load/refresh is running; see read
54
+ let oReadPromise; // shared in-flight promise; see read
55
+ let bReadPending = false; // true while oReadPromise is in flight
57
56
  let bIsStub = true; // TODO replace by aChips === undefined
58
57
  let oCachedRemoteErrorArgs;
59
58
  let sId;
60
59
  let oReadRegisteredChipsPromise; // see readRegisteredChips
60
+ let bReadRegisteredChipsPending = false; // true while oReadRegisteredChipsPromise is in flight
61
61
  let aRegisteredChipIds = [];
62
62
  const that = this;
63
63
 
@@ -71,7 +71,7 @@ sap.ui.define([
71
71
  */
72
72
  function checkStub () {
73
73
  if (bIsStub) {
74
- throw new SrvcError(`${that}: page is just a stub`, "Page");
74
+ throw new Ui2Error(`${that}: page is just a stub`, "Page");
75
75
  }
76
76
  }
77
77
 
@@ -82,7 +82,7 @@ sap.ui.define([
82
82
  */
83
83
  function checkAlterEgo () {
84
84
  if (!oAlterEgo) {
85
- throw new SrvcError(`${that}: catalog is just an ID`, "Catalog");
85
+ throw new Ui2Error(`${that}: catalog is just an ID`, "Catalog");
86
86
  }
87
87
  }
88
88
 
@@ -106,7 +106,9 @@ sap.ui.define([
106
106
  aChips = [];
107
107
  bIsStub = true;
108
108
  oReadPromise = undefined;
109
+ bReadPending = false;
109
110
  oReadRegisteredChipsPromise = undefined;
111
+ bReadRegisteredChipsPending = false;
110
112
  aRegisteredChipIds = [];
111
113
 
112
114
  // delete methods on deleted catalog to prevent wrong behavior
@@ -141,11 +143,10 @@ sap.ui.define([
141
143
  this.getRemoteCatalogService = function () {
142
144
  return oFactory.getRemoteCatalogService(oAlterEgo) || {
143
145
  readChips: function (sBaseUrl, sCatalogId, aChipIds, fnSuccess, fnFailure) {
144
- Log.error(`Catalog '${oAlterEgo.id}', type '${oAlterEgo.type
145
- }' not supported`, null, "Catalog");
146
+ Log.error(`Catalog '${oAlterEgo.id}', type '${oAlterEgo.type}' not supported`, null, "Catalog");
146
147
  // fake an empty response to make the catalog valid
147
148
  // When created with alterEgo, we're still synchronous, so make it async
148
- Utils.callHandler(fnSuccess.bind(null, { results: [] }), undefined, /* async=*/true);
149
+ Ui2Utils.callHandler(fnSuccess.bind(null, { results: [] }), undefined, /* async=*/true);
149
150
  }
150
151
  };
151
152
  };
@@ -199,7 +200,8 @@ sap.ui.define([
199
200
  * @private
200
201
  */
201
202
  this.read = function (bRefresh, fnSuccess, fnFailure) {
202
- let oDeferred;
203
+ // only relevant when no read is already in progress
204
+ const oReadDeferred = Promise.withResolvers();
203
205
 
204
206
  /**
205
207
  * @param {object} oResult
@@ -208,7 +210,8 @@ sap.ui.define([
208
210
  function onCatalogLoaded (oResult) {
209
211
  oAlterEgo = oResult;
210
212
  initialize();
211
- oDeferred.resolve();
213
+ bReadPending = false;
214
+ oReadDeferred.resolve();
212
215
  }
213
216
 
214
217
  /**
@@ -218,7 +221,8 @@ sap.ui.define([
218
221
  function onChipsLoaded (oResult) {
219
222
  oAlterEgo.Chips = oResult;
220
223
  initialize();
221
- oDeferred.resolve();
224
+ bReadPending = false;
225
+ oReadDeferred.resolve();
222
226
  }
223
227
 
224
228
  /**
@@ -244,10 +248,12 @@ sap.ui.define([
244
248
  * delivered by the ODataService. See fnFailure parameter of {@link sap.ushell_abap.pbServices.ui2.ODataWrapper#onError}
245
249
  * for more details.
246
250
  */
247
- function couldNotLoadRemoteChips () {
251
+ function couldNotLoadRemoteChips (sErrMsg, oErrDetails) {
248
252
  initialize(); // fail gracefully
249
- oCachedRemoteErrorArgs = arguments;
250
- oDeferred.reject.apply(this, arguments);
253
+ // Store as array so getCachedRemoteFailureArguments()[0] and [1] work correctly
254
+ oCachedRemoteErrorArgs = [sErrMsg, oErrDetails];
255
+ bReadPending = false;
256
+ oReadDeferred.reject(oCachedRemoteErrorArgs);
251
257
  }
252
258
 
253
259
  /**
@@ -275,21 +281,29 @@ sap.ui.define([
275
281
  }
276
282
  }
277
283
 
278
- if (!oReadPromise || oReadPromise.state() !== "pending") {
279
- oDeferred = new jQuery.Deferred();
280
- oReadPromise = oDeferred.promise();
284
+ if (!bReadPending) {
285
+ bReadPending = true;
286
+ // No in-flight read — start a new one
287
+ oReadPromise = oReadDeferred.promise;
281
288
  if (!oAlterEgo || (bRefresh && !oAlterEgo.remoteId)) {
282
289
  // read the local catalog if it is unknown yet or if refreshing a non-remote catalog
283
- oFactory.getPageBuildingService().readCatalog(sId, processLocalResponse,
284
- oDeferred.reject.bind(oDeferred));
290
+ oFactory.getPageBuildingService().readCatalog(
291
+ sId,
292
+ processLocalResponse,
293
+ (sErrMsg, oErrDetails) => {
294
+ bReadPending = false;
295
+ oReadDeferred.reject([sErrMsg, oErrDetails]);
296
+ }
297
+ );
285
298
  } else {
286
299
  processLocalResponse.bind(this)(oAlterEgo);
287
300
  }
288
301
  }
289
302
  fnFailure = fnFailure || oFactory.getPageBuildingService().getDefaultErrorHandler();
290
303
  // TODO this needs "sap.ushell_abap.pbServices.ui2.utils" which is never required!
291
- oReadPromise.done(Utils.callHandler.bind(null, fnSuccess, fnFailure));
292
- oReadPromise.fail(fnFailure);
304
+ oReadPromise
305
+ .then(() => { Ui2Utils.callHandler(fnSuccess, fnFailure); })
306
+ .catch((aRejectArgs) => { fnFailure(aRejectArgs[0], aRejectArgs[1]); });
293
307
  };
294
308
 
295
309
  // "public" methods ----------------------------------------------------------
@@ -334,7 +348,7 @@ sap.ui.define([
334
348
  this.addSystemToServiceUrl = function (sServiceUrl, sSystem) {
335
349
  /* jslint regexp:true */
336
350
  if (sServiceUrl.indexOf("/") !== 0 || sServiceUrl.indexOf("//") === 0) {
337
- throw new SrvcError(`addSystemToServiceUrl: Invalid URL: ${sServiceUrl}`,
351
+ throw new Ui2Error(`addSystemToServiceUrl: Invalid URL: ${sServiceUrl}`,
338
352
  "Catalog");
339
353
  }
340
354
  sSystem = sSystem || this.getSystemAlias();
@@ -495,7 +509,7 @@ sap.ui.define([
495
509
  */
496
510
  this.getChips = function () {
497
511
  if (bIsStub) {
498
- throw new SrvcError(`${that}: catalog is just a stub`, "Catalog");
512
+ throw new Ui2Error(`${that}: catalog is just a stub`, "Catalog");
499
513
  }
500
514
  return aChips.slice();
501
515
  };
@@ -657,7 +671,7 @@ sap.ui.define([
657
671
  */
658
672
  this.load = function (fnSuccess, fnFailure) {
659
673
  if (!bIsStub) {
660
- throw new SrvcError("Catalog is not a stub anymore", "Catalog");
674
+ throw new Ui2Error("Catalog is not a stub anymore", "Catalog");
661
675
  }
662
676
  this.read(false, fnSuccess, fnFailure);
663
677
  };
@@ -686,7 +700,7 @@ sap.ui.define([
686
700
  oFactory.createChip(oRawChipData);
687
701
  });
688
702
  // TODO this needs "utils" which is never required!
689
- Utils.callHandler(fnSuccess, fnFailure);
703
+ Ui2Utils.callHandler(fnSuccess, fnFailure);
690
704
  }
691
705
 
692
706
  function createRemoteChips (oRawData) {
@@ -734,26 +748,38 @@ sap.ui.define([
734
748
  */
735
749
  this.readRegisteredChips = function (fnSuccess, fnFailure) {
736
750
  function start () {
737
- const oDeferred = new jQuery.Deferred();
751
+ const oReadDeferred = Promise.withResolvers();
738
752
  const aChipIds = aRegisteredChipIds;
739
753
 
740
754
  aRegisteredChipIds = [];
755
+ bReadRegisteredChipsPending = true;
741
756
  if (aChipIds.length) {
742
- that.readChips(aChipIds, oDeferred.resolve.bind(oDeferred),
743
- oDeferred.reject.bind(oDeferred));
757
+ that.readChips(
758
+ aChipIds,
759
+ () => {
760
+ bReadRegisteredChipsPending = false;
761
+ oReadDeferred.resolve();
762
+ },
763
+ (sErrMsg, oErrDetails) => {
764
+ bReadRegisteredChipsPending = false;
765
+ oReadDeferred.reject([sErrMsg, oErrDetails]);
766
+ }
767
+ );
744
768
  } else {
745
- oDeferred.resolve();
769
+ bReadRegisteredChipsPending = false;
770
+ oReadDeferred.resolve();
746
771
  }
747
- return oDeferred.promise();
772
+ return oReadDeferred.promise;
748
773
  }
749
774
 
750
- if (!oReadRegisteredChipsPromise || oReadRegisteredChipsPromise.state() !== "pending") {
775
+ if (!oReadRegisteredChipsPromise || !bReadRegisteredChipsPending) {
751
776
  oReadRegisteredChipsPromise = start();
752
777
  }
753
778
  fnFailure = fnFailure || oFactory.getPageBuildingService().getDefaultErrorHandler();
754
779
  // TODO this needs "utils" which is never required!
755
- oReadRegisteredChipsPromise.fail(fnFailure)
756
- .done(Utils.callHandler.bind(null, fnSuccess, fnFailure));
780
+ oReadRegisteredChipsPromise
781
+ .then(() => { Ui2Utils.callHandler(fnSuccess, fnFailure); })
782
+ .catch((aRejectArgs) => { fnFailure(aRejectArgs[0], aRejectArgs[1]); });
757
783
  };
758
784
 
759
785
  /**
@@ -788,8 +814,8 @@ sap.ui.define([
788
814
  * @private
789
815
  */
790
816
  this.registerChip = function (oChip) {
791
- if (oReadRegisteredChipsPromise && oReadRegisteredChipsPromise.state() === "pending") {
792
- throw new SrvcError(
817
+ if (bReadRegisteredChipsPending) {
818
+ throw new Ui2Error(
793
819
  "Invalid state: registerChip while readRegisteredChips pending",
794
820
  "Catalog"
795
821
  );
@@ -821,8 +847,8 @@ sap.ui.define([
821
847
  */
822
848
  this.remove = function (fnSuccess, fnFailure) {
823
849
  checkAlterEgo();
824
- if (oReadPromise && oReadPromise.state() === "pending") {
825
- throw new SrvcError(`Catalog is being refreshed: ${this}`,
850
+ if (bReadPending) {
851
+ throw new Ui2Error(`Catalog is being refreshed: ${this}`,
826
852
  "Catalog");
827
853
  }
828
854
 
@@ -897,7 +923,7 @@ sap.ui.define([
897
923
  checkAlterEgo();
898
924
  if (Object.hasOwnProperty.call(oCatalogData, "__metadata")) {
899
925
  // ODataWrapper#update() relies on __metadata!
900
- throw new SrvcError("Unsupported __metadata update", "Catalog");
926
+ throw new Ui2Error("Unsupported __metadata update", "Catalog");
901
927
  }
902
928
  const oNewAlterEgo = JSON.parse(JSON.stringify(oAlterEgo));
903
929
  Object.keys(oCatalogData).forEach((sName) => {
@@ -931,7 +957,7 @@ sap.ui.define([
931
957
  sId = vCatalogData;
932
958
  }
933
959
  if (!sId) {
934
- throw new SrvcError("Missing ID", "Catalog");
960
+ throw new Ui2Error("Missing ID", "Catalog");
935
961
  }
936
962
  Log.debug(`Created: ${this}`, null, "Catalog");
937
963
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  sap.ui.define([
7
7
  "sap/base/Log",
8
+ "sap/ushell/base/requireAsync",
8
9
  "sap/ushell_abap/pbServices/ui2/Bag",
9
10
  "sap/ushell_abap/pbServices/ui2/ChipDefinition",
10
11
  "sap/ushell_abap/base/Ui2Error",
@@ -12,6 +13,7 @@ sap.ui.define([
12
13
  "sap/ushell/utils/DeprecationLog"
13
14
  ], (
14
15
  Log,
16
+ requireAsync,
15
17
  Bag,
16
18
  ChipDefinition,
17
19
  SrvcError,
@@ -558,21 +560,13 @@ sap.ui.define([
558
560
  const ComponentContainer = sap.ui.requireSync("sap/ui/core/ComponentContainer"); // LEGACY API (deprecated)
559
561
  const oComponentContainer = new ComponentContainer();
560
562
  // load the content lazily to enable components using async interface
561
- this.oComponentPromise = new Promise((resolve, reject) => {
562
- sap.ui.require([
563
- "sap/ui/core/Component"
564
- ], (Component) => {
565
- Component.create({
566
- name: oImplementation.componentName,
567
- componentData: oData,
568
- manifest: false
569
- })
570
- .then((oComponent) => {
571
- oComponentContainer.setComponent(oComponent);
572
- })
573
- .then(resolve)
574
- .catch(reject);
563
+ this.oComponentPromise = requireAsync(["sap/ui/core/Component"]).then(async ([Component]) => {
564
+ const oComponent = await Component.create({
565
+ name: oImplementation.componentName,
566
+ componentData: oData,
567
+ manifest: false
575
568
  });
569
+ oComponentContainer.setComponent(oComponent);
576
570
  });
577
571
 
578
572
  return oComponentContainer;
@@ -602,59 +596,54 @@ sap.ui.define([
602
596
  this.getImplementationAsSapui5Async = async function (oApi) {
603
597
  checkStub();
604
598
 
605
- return new Promise((resolve, reject) => {
606
- sap.ui.require([
607
- "sap/ui/core/ComponentContainer",
608
- "sap/ui/core/Component",
609
- "sap/ui/core/mvc/View"
610
- ], (ComponentContainer, Component, View) => {
611
- const oData = {
612
- /**
613
- * @namespace
614
- * The namespace for the instance specific CHIP API, which allows you to
615
- * access the various contracts consumed by your CHIP instance.
616
- * @private
617
- */
618
- chip: oApi
619
- };
620
- const oImplementation = oDefinition.implementation.sapui5;
621
-
622
- // In case the chip is used in FLP wave 2 or later context we load it from the standard path
623
- const sBaseChipId = this.getBaseChipId();
624
- if ((sBaseChipId !== "X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER") && (sBaseChipId !== "X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER")) {
625
- if (oImplementation.$VirtualNamespace) {
626
- oImplementation.$absolutePath = this.toAbsoluteUrl(oImplementation.basePath);
627
- sap.ui.loader.config({ paths: JSON.parse(`{"${oImplementation.$Namespace.replace(/\./g, "/")}":"${oImplementation.$absolutePath}"}`) });
628
- } else {
629
- sap.ui.loader.config({ paths: JSON.parse(`{"${oImplementation.$Namespace.replace(/\./g, "/")}":"${oImplementation.$UrlPrefix}"}`) });
630
- }
631
- }
599
+ const [
600
+ ComponentContainer,
601
+ Component,
602
+ View
603
+ ] = await requireAsync([
604
+ "sap/ui/core/ComponentContainer",
605
+ "sap/ui/core/Component",
606
+ "sap/ui/core/mvc/View"
607
+ ]);
608
+ const oData = {
609
+ /**
610
+ * @namespace
611
+ * The namespace for the instance specific CHIP API, which allows you to
612
+ * access the various contracts consumed by your CHIP instance.
613
+ * @private
614
+ */
615
+ chip: oApi
616
+ };
617
+ const oImplementation = oDefinition.implementation.sapui5;
632
618
 
633
- if (oImplementation.componentName) {
634
- // SAPUI5 component
635
- return Component.create({
636
- name: oImplementation.componentName,
637
- componentData: oData,
638
- manifest: false
639
- })
640
- .then((oComponent) => {
641
- return new ComponentContainer({
642
- component: oComponent
643
- });
644
- })
645
- .then(resolve)
646
- .catch(reject);
647
- }
619
+ // In case the chip is used in FLP wave 2 or later context we load it from the standard path
620
+ const sBaseChipId = this.getBaseChipId();
621
+ if ((sBaseChipId !== "X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER") && (sBaseChipId !== "X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER")) {
622
+ if (oImplementation.$VirtualNamespace) {
623
+ oImplementation.$absolutePath = this.toAbsoluteUrl(oImplementation.basePath);
624
+ sap.ui.loader.config({ paths: JSON.parse(`{"${oImplementation.$Namespace.replace(/\./g, "/")}":"${oImplementation.$absolutePath}"}`) });
625
+ } else {
626
+ sap.ui.loader.config({ paths: JSON.parse(`{"${oImplementation.$Namespace.replace(/\./g, "/")}":"${oImplementation.$UrlPrefix}"}`) });
627
+ }
628
+ }
648
629
 
649
- // SAPUI5 MVC
650
- return View.create({
651
- type: oImplementation.$ViewType,
652
- viewName: oImplementation.$ViewName,
653
- viewData: oData
654
- })
655
- .then(resolve)
656
- .catch(reject);
630
+ if (oImplementation.componentName) {
631
+ // SAPUI5 component
632
+ const oComponent = await Component.create({
633
+ name: oImplementation.componentName,
634
+ componentData: oData,
635
+ manifest: false
636
+ });
637
+ return new ComponentContainer({
638
+ component: oComponent
657
639
  });
640
+ }
641
+
642
+ // SAPUI5 MVC
643
+ return View.create({
644
+ type: oImplementation.$ViewType,
645
+ viewName: oImplementation.$ViewName,
646
+ viewData: oData
658
647
  });
659
648
  };
660
649