@sapui5/sap.ushell_abap 1.97.1 → 1.100.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 +1 -1
- package/src/main/js/sap/ushell_abap/.library +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/AdapterContainer.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/abap/AppStateAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ClientSideTargetResolutionAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ConfigurationDefaultsAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/ContainerAdapter.js +16 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/LaunchPageAdapter.js +37 -4
- package/src/main/js/sap/ushell_abap/adapters/abap/MenuAdapter.js +65 -15
- package/src/main/js/sap/ushell_abap/adapters/abap/NavTargetResolutionAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/PageBuildingAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/PagePersistenceAdapter.js +1577 -36
- package/src/main/js/sap/ushell_abap/adapters/abap/PersonalizationAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/SearchAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/SupportTicketAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/Ui5ComponentLoaderAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/adapters/abap/UserInfoAdapter.js +1 -1
- package/src/main/js/sap/ushell_abap/adapters/hana/ContainerAdapter.js +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/XhrLogonEventHandler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-dev.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def-loader.js +7 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap-def.js +13 -10
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.backend.config.requestor.js +198 -0
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.bootstrap.utils.js +6 -4
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.configure.ushell.js +2 -2
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.constants.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.load.launchpad.js +2 -17
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.pageset.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.startup.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.theme.handler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.ui5.boot.handler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.xhr.handler.js +1 -1
- package/src/main/js/sap/ushell_abap/bootstrap/evo/boottask.js +10 -16
- package/src/main/js/sap/ushell_abap/library.js +3 -3
- package/src/main/js/sap/ushell_abap/pbServices/ui2/AllCatalogs.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Bag.js +1 -6
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Catalog.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Chip.js +172 -17
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipDefinition.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ChipInstance.js +14 -6
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Error.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Factory.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataService.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/ODataWrapper.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Page.js +1 -8
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageBuildingService.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/PageSet.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/RemoteCatalogService.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/Utils.js +1 -8
- package/src/main/js/sap/ushell_abap/pbServices/ui2/chipdefinition.xsd +0 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/actions.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/bag.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configuration.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/configurationUi.js +48 -6
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/fullscreen.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/preview.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/refresh.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/search.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/types.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/url.js +1 -1
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/visible.js +1 -1
- package/src/main/js/sap/ushell_abap/support/plugins/app-infra/AppInfraOnSapNetWeaverSupportPlugin.js +1 -1
- package/src/main/js/sap/ushell_abap/ui5appruntime/AppInfoAdapter.js +1 -1
- package/ui5.yaml +379 -32
- package/src/main/js/sap/ui2/srvc/ODataService.js +0 -267
- package/src/main/js/sap/ui2/srvc/ODataWrapper.js +0 -1283
- package/src/main/js/sap/ui2/srvc/PageBuildingService.js +0 -1508
- package/src/main/js/sap/ui2/srvc/RemoteCatalogService.js +0 -49
- package/src/main/js/sap/ui2/srvc/allcatalogs.js +0 -197
- package/src/main/js/sap/ui2/srvc/bag.js +0 -711
- package/src/main/js/sap/ui2/srvc/catalog.js +0 -946
- package/src/main/js/sap/ui2/srvc/chip.js +0 -1035
- package/src/main/js/sap/ui2/srvc/chipdefinition.js +0 -228
- package/src/main/js/sap/ui2/srvc/chipinstance.js +0 -944
- package/src/main/js/sap/ui2/srvc/contracts/actions.js +0 -239
- package/src/main/js/sap/ui2/srvc/contracts/bag.js +0 -145
- package/src/main/js/sap/ui2/srvc/contracts/configuration.js +0 -161
- package/src/main/js/sap/ui2/srvc/contracts/configurationUi.js +0 -326
- package/src/main/js/sap/ui2/srvc/contracts/fullscreen.js +0 -69
- package/src/main/js/sap/ui2/srvc/contracts/navigation.js +0 -48
- package/src/main/js/sap/ui2/srvc/contracts/preview.js +0 -289
- package/src/main/js/sap/ui2/srvc/contracts/refresh.js +0 -42
- package/src/main/js/sap/ui2/srvc/contracts/search.js +0 -109
- package/src/main/js/sap/ui2/srvc/contracts/searchProvider.js +0 -46
- package/src/main/js/sap/ui2/srvc/contracts/types.js +0 -9
- package/src/main/js/sap/ui2/srvc/contracts/url.js +0 -104
- package/src/main/js/sap/ui2/srvc/contracts/visible.js +0 -122
- package/src/main/js/sap/ui2/srvc/error.js +0 -54
- package/src/main/js/sap/ui2/srvc/factory.js +0 -656
- package/src/main/js/sap/ui2/srvc/page.js +0 -934
- package/src/main/js/sap/ui2/srvc/pageset.js +0 -466
- package/src/main/js/sap/ui2/srvc/utils.js +0 -923
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.get.server.config.Urls.js +0 -108
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.request.server.config.js +0 -69
- package/src/main/js/sap/ushell_abap/bootstrap/evo/abap.validate.Url.js +0 -54
- package/src/main/js/sap/ushell_abap/pbServices/ui2/contracts/navigation.js +0 -50
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2009-2022 SAP SE
|
|
1
|
+
// Copyright (c) 2009-2022 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview The <code>sap.ushell_abap.pbServices.ui2.Chip</code> object with related functions.
|
|
@@ -10,14 +10,16 @@ sap.ui.define([
|
|
|
10
10
|
"sap/ushell_abap/pbServices/ui2/Error",
|
|
11
11
|
"sap/ushell_abap/pbServices/ui2/ChipDefinition",
|
|
12
12
|
"sap/base/Log",
|
|
13
|
-
"sap/ui/thirdparty/jquery"
|
|
13
|
+
"sap/ui/thirdparty/jquery",
|
|
14
|
+
"sap/ui/core/Manifest"
|
|
14
15
|
], function (
|
|
15
16
|
Bag,
|
|
16
17
|
Utils,
|
|
17
18
|
SrvcError,
|
|
18
19
|
ChipDefinition,
|
|
19
20
|
Log,
|
|
20
|
-
jQuery
|
|
21
|
+
jQuery,
|
|
22
|
+
Manifest
|
|
21
23
|
) {
|
|
22
24
|
"use strict";
|
|
23
25
|
|
|
@@ -27,6 +29,11 @@ sap.ui.define([
|
|
|
27
29
|
*/
|
|
28
30
|
var mContractsByName = {};
|
|
29
31
|
|
|
32
|
+
/**
|
|
33
|
+
* A cache containing all manifests which were already loaded
|
|
34
|
+
*/
|
|
35
|
+
var _oManifestCache = {};
|
|
36
|
+
|
|
30
37
|
// "private" methods (static) without need to access properties -------------
|
|
31
38
|
|
|
32
39
|
/**
|
|
@@ -170,8 +177,7 @@ sap.ui.define([
|
|
|
170
177
|
// eslint-disable-next-line no-useless-escape
|
|
171
178
|
aMatches = /^(?:([^\/]+)\/)?(.*)\.view\.(.*)$/.exec(sViewName);
|
|
172
179
|
if (!aMatches) {
|
|
173
|
-
throw new SrvcError(that + ": Illegal view name: " + sViewName,
|
|
174
|
-
"Chip");
|
|
180
|
+
throw new SrvcError(that + ": Illegal view name: " + sViewName, "Chip");
|
|
175
181
|
}
|
|
176
182
|
|
|
177
183
|
// determine namespace, view name, and view type
|
|
@@ -502,6 +508,18 @@ sap.ui.define([
|
|
|
502
508
|
return oAlterEgo.id;
|
|
503
509
|
};
|
|
504
510
|
|
|
511
|
+
/**
|
|
512
|
+
* Returns this CHIP's reference ID also known as the stable ID
|
|
513
|
+
*
|
|
514
|
+
* @returns {string}
|
|
515
|
+
* this CHIP's reference ID
|
|
516
|
+
* @since 1.98.0
|
|
517
|
+
* @private
|
|
518
|
+
*/
|
|
519
|
+
this.getReferenceChipId = function () {
|
|
520
|
+
return oAlterEgo.referenceChipId;
|
|
521
|
+
};
|
|
522
|
+
|
|
505
523
|
/**
|
|
506
524
|
* Returns this CHIP instance's implementation of type SAPUI5 as a control. This control
|
|
507
525
|
* represents the root of this CHIP instance's UI from a page builder point of view. Can only
|
|
@@ -512,12 +530,18 @@ sap.ui.define([
|
|
|
512
530
|
* @returns {sap.ui.core.Control}
|
|
513
531
|
* this CHIP instance's SAPUI5 implementation as a control
|
|
514
532
|
* @since 1.2.0
|
|
533
|
+
* @deprecated since version 1.97. Use <code>getImplementationAsSapui5Async</code> instead
|
|
515
534
|
*
|
|
516
535
|
* @see #isStub()
|
|
517
536
|
*/
|
|
518
537
|
this.getImplementationAsSapui5 = function (oApi) {
|
|
519
538
|
var oData, oImplementation, sBaseChipId;
|
|
520
539
|
|
|
540
|
+
Log.error("Deprecated API call of 'Chip.getImplementationAsSapui5'. Please use 'getImplementationAsSapui5Async' instead",
|
|
541
|
+
null,
|
|
542
|
+
"sap.ushell_abap.pbServices.ui2.Chip"
|
|
543
|
+
);
|
|
544
|
+
|
|
521
545
|
checkStub();
|
|
522
546
|
oData = {
|
|
523
547
|
/*
|
|
@@ -542,12 +566,25 @@ sap.ui.define([
|
|
|
542
566
|
|
|
543
567
|
if (oImplementation.componentName) {
|
|
544
568
|
// SAPUI5 component
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
569
|
+
var oComponentContainer = new sap.ui.core.ComponentContainer();
|
|
570
|
+
// load the content lazily to enable components using async interface
|
|
571
|
+
this.oComponentPromise = new Promise(function (resolve, reject) {
|
|
572
|
+
sap.ui.require([
|
|
573
|
+
"sap/ui/core/Component"
|
|
574
|
+
], function (Component) {
|
|
575
|
+
Component.create({
|
|
576
|
+
name: oImplementation.componentName,
|
|
577
|
+
componentData: oData
|
|
578
|
+
})
|
|
579
|
+
.then(function (oComponent) {
|
|
580
|
+
oComponentContainer.setComponent(oComponent);
|
|
581
|
+
})
|
|
582
|
+
.then(resolve)
|
|
583
|
+
.catch(reject);
|
|
584
|
+
});
|
|
550
585
|
});
|
|
586
|
+
|
|
587
|
+
return oComponentContainer;
|
|
551
588
|
}
|
|
552
589
|
|
|
553
590
|
// SAPUI5 MVC
|
|
@@ -558,6 +595,116 @@ sap.ui.define([
|
|
|
558
595
|
});
|
|
559
596
|
};
|
|
560
597
|
|
|
598
|
+
/**
|
|
599
|
+
* Returns this CHIP instance's implementation of type SAPUI5 as a control. This control
|
|
600
|
+
* represents the root of this CHIP instance's UI from a page builder point of view. Can only
|
|
601
|
+
* be called if the CHIP is not a stub anymore.
|
|
602
|
+
*
|
|
603
|
+
* @param {object} oApi
|
|
604
|
+
* the CHIP instance specific API
|
|
605
|
+
* @returns {Promise<sap.ui.core.Control>}
|
|
606
|
+
* this CHIP instance's SAPUI5 implementation as a control
|
|
607
|
+
* @since 1.97.0
|
|
608
|
+
*
|
|
609
|
+
* @see #isStub()
|
|
610
|
+
*/
|
|
611
|
+
this.getImplementationAsSapui5Async = function (oApi) {
|
|
612
|
+
try {
|
|
613
|
+
checkStub();
|
|
614
|
+
} catch (oError) {
|
|
615
|
+
return Promise.reject(oError);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
return new Promise(function (resolve, reject) {
|
|
619
|
+
sap.ui.require([
|
|
620
|
+
"sap/ui/core/ComponentContainer",
|
|
621
|
+
"sap/ui/core/Component",
|
|
622
|
+
"sap/ui/core/mvc/View"
|
|
623
|
+
], function (ComponentContainer, Component, View) {
|
|
624
|
+
var oData = {
|
|
625
|
+
/*
|
|
626
|
+
* @namespace The namespace for the instance specific CHIP API, which allows you to
|
|
627
|
+
* access the various contracts consumed by your CHIP instance.
|
|
628
|
+
* @name chip
|
|
629
|
+
*/
|
|
630
|
+
chip: oApi
|
|
631
|
+
};
|
|
632
|
+
var oImplementation = oDefinition.implementation.sapui5;
|
|
633
|
+
|
|
634
|
+
// In case the chip is used in FLP wave 2 or later context we load it from the standard path
|
|
635
|
+
var sBaseChipId = this.getBaseChipId();
|
|
636
|
+
if ((sBaseChipId !== "X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER") && (sBaseChipId !== "X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER")) {
|
|
637
|
+
if (oImplementation.$VirtualNamespace) {
|
|
638
|
+
oImplementation.$absolutePath = this.toAbsoluteUrl(oImplementation.basePath);
|
|
639
|
+
jQuery.sap.registerModulePath(oImplementation.$Namespace, oImplementation.$absolutePath);
|
|
640
|
+
} else {
|
|
641
|
+
jQuery.sap.registerModulePath(oImplementation.$Namespace, oImplementation.$UrlPrefix);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
if (oImplementation.componentName) {
|
|
646
|
+
var oLoadManifestPromise;
|
|
647
|
+
|
|
648
|
+
// The standard tiles have no manifest. Since we know this and are in control of it we can save the server roundtrip for those.
|
|
649
|
+
if (sBaseChipId === "X-SAP-UI2-CHIP:/UI2/STATIC_APPLAUNCHER" || sBaseChipId === "X-SAP-UI2-CHIP:/UI2/DYNAMIC_APPLAUNCHER") {
|
|
650
|
+
oLoadManifestPromise = Promise.resolve(false);
|
|
651
|
+
} else {
|
|
652
|
+
oLoadManifestPromise = this._loadManifest(oImplementation.$UrlPrefix + "/manifest.json");
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
return oLoadManifestPromise.then(function (vManifest) {
|
|
656
|
+
// SAPUI5 component
|
|
657
|
+
return Component.create({
|
|
658
|
+
name: oImplementation.componentName,
|
|
659
|
+
componentData: oData,
|
|
660
|
+
manifest: vManifest
|
|
661
|
+
});
|
|
662
|
+
})
|
|
663
|
+
.then(function (oComponent) {
|
|
664
|
+
return new ComponentContainer({
|
|
665
|
+
component: oComponent
|
|
666
|
+
});
|
|
667
|
+
})
|
|
668
|
+
.then(resolve)
|
|
669
|
+
.catch(reject);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
// SAPUI5 MVC
|
|
673
|
+
return View.create({
|
|
674
|
+
type: oImplementation.$ViewType,
|
|
675
|
+
viewName: oImplementation.$ViewName,
|
|
676
|
+
viewData: oData
|
|
677
|
+
})
|
|
678
|
+
.then(resolve)
|
|
679
|
+
.catch(reject);
|
|
680
|
+
}.bind(this));
|
|
681
|
+
}.bind(this));
|
|
682
|
+
};
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* Loads and caches a manifest for the given URL.
|
|
686
|
+
* Note: The manifest object is read-only!
|
|
687
|
+
*
|
|
688
|
+
* @param {string} sUrl The URL of the manifest
|
|
689
|
+
* @returns {Promise<object>} The read-only raw manifest
|
|
690
|
+
*/
|
|
691
|
+
this._loadManifest = function (sUrl) {
|
|
692
|
+
if (!_oManifestCache[sUrl]) {
|
|
693
|
+
_oManifestCache[sUrl] = Manifest.load({
|
|
694
|
+
manifestUrl: sUrl,
|
|
695
|
+
async: true
|
|
696
|
+
})
|
|
697
|
+
.then(function (oManifest) {
|
|
698
|
+
return oManifest.getRawJson();
|
|
699
|
+
})
|
|
700
|
+
.catch(function () {
|
|
701
|
+
return null;
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
return _oManifestCache[sUrl];
|
|
706
|
+
};
|
|
707
|
+
|
|
561
708
|
/**
|
|
562
709
|
* Returns the catalog by which this remote CHIP was loaded. This catalog is
|
|
563
710
|
* <code>undefined</code> if the CHIP is from the same system as the catalog.
|
|
@@ -951,8 +1098,8 @@ sap.ui.define([
|
|
|
951
1098
|
* This is only relevant when the CHIP navigation property was expanded
|
|
952
1099
|
* (OData $expand).
|
|
953
1100
|
*
|
|
954
|
-
* @
|
|
955
|
-
*
|
|
1101
|
+
* @param {boolean} bDefined defined
|
|
1102
|
+
* @returns {boolean} Whether the CHIP initially existed.
|
|
956
1103
|
*
|
|
957
1104
|
* @private
|
|
958
1105
|
*/
|
|
@@ -963,6 +1110,12 @@ sap.ui.define([
|
|
|
963
1110
|
oAlterEgo && !oAlterEgo.hasOwnProperty("$proxy") // $proxy (set from factory) when null
|
|
964
1111
|
);
|
|
965
1112
|
|
|
1113
|
+
// for test purposes -------------------------------------------------------
|
|
1114
|
+
|
|
1115
|
+
this._setDefinition = function (oNewDefinition) {
|
|
1116
|
+
oDefinition = oNewDefinition;
|
|
1117
|
+
};
|
|
1118
|
+
|
|
966
1119
|
// constructor code -------------------------------------------------------
|
|
967
1120
|
if (!oAlterEgo) {
|
|
968
1121
|
throw new SrvcError("Missing CHIP description", "Chip");
|
|
@@ -1016,11 +1169,13 @@ sap.ui.define([
|
|
|
1016
1169
|
delete mContractsByName[sName];
|
|
1017
1170
|
};
|
|
1018
1171
|
|
|
1019
|
-
//
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1172
|
+
// Add "navigation" contract stub as this is requested in some cases for historic reasons - but not used in FLP scenarios
|
|
1173
|
+
if (!mContractsByName.navigation) {
|
|
1174
|
+
Chip.addContract("navigation", function (oChipInstance) {
|
|
1175
|
+
this.navigateToUrl = function (sUrl, oSettings) {
|
|
1176
|
+
throw new SrvcError("'navigation' contract not implemented!");
|
|
1177
|
+
};
|
|
1178
|
+
});
|
|
1024
1179
|
}
|
|
1025
1180
|
|
|
1026
1181
|
return Chip;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2009-2022 SAP SE
|
|
1
|
+
// Copyright (c) 2009-2022 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview The <code>sap.ushell_abap.pbServices.ui2.ChipInstance</code> object with related functions.
|
|
@@ -396,7 +396,7 @@ sap.ui.define([
|
|
|
396
396
|
* @name chip
|
|
397
397
|
* @since 1.2.0
|
|
398
398
|
*
|
|
399
|
-
* @see sap.ushell_abap.pbServices.ui2.ChipInstance#
|
|
399
|
+
* @see sap.ushell_abap.pbServices.ui2.ChipInstance#getImplementationAsSapui5Async
|
|
400
400
|
*/
|
|
401
401
|
|
|
402
402
|
/**
|
|
@@ -459,10 +459,15 @@ sap.ui.define([
|
|
|
459
459
|
* @returns {sap.ui.core.Control}
|
|
460
460
|
* this CHIP instance's SAPUI5 implementation as a control
|
|
461
461
|
* @since 1.2.0
|
|
462
|
+
* @deprecated since version 1.97. Use <code>getImplementationAsSapui5Async</code> instead
|
|
462
463
|
*
|
|
463
464
|
* @see #isStub()
|
|
464
465
|
*/
|
|
465
466
|
this.getImplementationAsSapui5 = function () {
|
|
467
|
+
Log.error("Deprecated API call of 'ChipInstance.getImplementationAsSapui5'. Please use 'getImplementationAsSapui5Async' instead",
|
|
468
|
+
null,
|
|
469
|
+
"sap.ushell_abap.pbServices.ui2.ChipInstance"
|
|
470
|
+
);
|
|
466
471
|
checkStub();
|
|
467
472
|
return oChip.getImplementationAsSapui5(oApi);
|
|
468
473
|
};
|
|
@@ -478,11 +483,14 @@ sap.ui.define([
|
|
|
478
483
|
*
|
|
479
484
|
* @see #isStub()
|
|
480
485
|
*/
|
|
481
|
-
|
|
482
|
-
|
|
486
|
+
this.getImplementationAsSapui5Async = function () {
|
|
487
|
+
try {
|
|
483
488
|
checkStub();
|
|
484
|
-
|
|
485
|
-
|
|
489
|
+
} catch (oError) {
|
|
490
|
+
return Promise.reject(oError);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
return oChip.getImplementationAsSapui5Async(oApi);
|
|
486
494
|
};
|
|
487
495
|
|
|
488
496
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2009-2022 SAP SE
|
|
1
|
+
// Copyright (c) 2009-2022 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview A wrapper for a page loaded from the page building service.
|
|
@@ -909,12 +909,5 @@ sap.ui.define([
|
|
|
909
909
|
Log.debug("Created: " + this, null, "Page");
|
|
910
910
|
};
|
|
911
911
|
|
|
912
|
-
// TODO remove when SSB is adapted (uses this module in global namespace)
|
|
913
|
-
if (jQuery && jQuery.sap) { // true only in FLPD case
|
|
914
|
-
jQuery.sap.declare("sap.ui2.srvc.chip");
|
|
915
|
-
jQuery.sap.declare("sap.ui2.srvc.Chip");
|
|
916
|
-
sap.ui2.srvc.Page = sap.ui2.srvc.page = Page;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
912
|
return Page;
|
|
920
913
|
}, true);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2009-2022 SAP SE
|
|
1
|
+
// Copyright (c) 2009-2022 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/* eslint-disable no-console */
|
|
4
4
|
|
|
@@ -756,12 +756,5 @@ sap.ui.define([
|
|
|
756
756
|
// initialize the cache for GET
|
|
757
757
|
Utils.clearCache();
|
|
758
758
|
|
|
759
|
-
|
|
760
|
-
// TODO remove when FLPD is adapted (uses this function in global namespace)
|
|
761
|
-
sap.ui2 = sap.ui2 || {};
|
|
762
|
-
sap.ui2.srvc = sap.ui2.srvc || {};
|
|
763
|
-
sap.ui2.srvc.removeCBAndNormalizeUrl = Utils.removeCBAndNormalizeUrl;
|
|
764
|
-
sap.ui2.srvc.addCacheBusterTokenUsingUshellConfig = Utils.addCacheBusterTokenUsingUshellConfig;
|
|
765
|
-
|
|
766
759
|
return Utils;
|
|
767
760
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2009-2022 SAP SE
|
|
1
|
+
// Copyright (c) 2009-2022 SAP SE, All Rights Reserved
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @fileOverview The <code>configurationUi</code> contract.
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
fnDirtyProvider,
|
|
30
30
|
bEnabled = false,
|
|
31
31
|
fnSaveHandler,
|
|
32
|
-
fnUiProvider
|
|
32
|
+
fnUiProvider,
|
|
33
|
+
fnAsyncUiProvider;
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Attaches the given event handler to the "cancel" event which is fired whenever the user
|
|
@@ -171,7 +172,6 @@
|
|
|
171
172
|
fnDirtyProvider = fnProvider;
|
|
172
173
|
};
|
|
173
174
|
|
|
174
|
-
/* eslint-disable valid-jsdoc*/ // < > are confusing eslint
|
|
175
175
|
/**
|
|
176
176
|
* Determines the callback function which provides the configuration UI for this CHIP. The
|
|
177
177
|
* callback has to return an SAPUI5 control (<code>sap.ui.core.Control</code>), which, for
|
|
@@ -204,7 +204,31 @@
|
|
|
204
204
|
this.setUiProvider = function (fnProvider) {
|
|
205
205
|
fnUiProvider = fnProvider;
|
|
206
206
|
};
|
|
207
|
-
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Determines the callback function which provides the configuration UI for this CHIP. The
|
|
210
|
+
* callback has to return a Promise which resolves to a SAPUI5 control (<code>sap.ui.core.Control</code>).
|
|
211
|
+
* This can, for example, be a view or a component wrapped into a <code>sap.ui.core.ComponentContainer</code>.
|
|
212
|
+
*
|
|
213
|
+
* An embedding application calls this function each time it wants to display the CHIP's
|
|
214
|
+
* configuration UI. Once the user chooses to save or cancel the configuration, the UI will be
|
|
215
|
+
* removed from the embedding application's UI, but not destroyed! Use the event handlers for
|
|
216
|
+
* the corresponding "save" and "cancel" events to clean up the UI as necessary (e.g. destroy
|
|
217
|
+
* it).
|
|
218
|
+
*
|
|
219
|
+
* @name chip.configurationUi.setAsyncUiProvider
|
|
220
|
+
* @function
|
|
221
|
+
* @since 1.100.0
|
|
222
|
+
* @param {function} fnAsyncProvider
|
|
223
|
+
* a callback which returns a <code>Promise</code> that resolves <code>sap.ui.core.Control</code>
|
|
224
|
+
* representing this CHIP's configuration UI.
|
|
225
|
+
*
|
|
226
|
+
* @see chip.configurationUi.attachCancel
|
|
227
|
+
* @see chip.configurationUi.attachSave
|
|
228
|
+
*/
|
|
229
|
+
this.setAsyncUiProvider = function (fnAsyncProvider) {
|
|
230
|
+
fnAsyncUiProvider = fnAsyncProvider;
|
|
231
|
+
};
|
|
208
232
|
|
|
209
233
|
/**
|
|
210
234
|
* @namespace The namespace for the contract interface (to be used by a page builder) for
|
|
@@ -266,7 +290,6 @@
|
|
|
266
290
|
return fnSaveHandler ? fnSaveHandler() : undefined;
|
|
267
291
|
},
|
|
268
292
|
|
|
269
|
-
/* eslint-disable valid-jsdoc*/ // < > are confusing eslint
|
|
270
293
|
/**
|
|
271
294
|
* Returns this CHIP's configuration UI, if available.
|
|
272
295
|
*
|
|
@@ -286,7 +309,26 @@
|
|
|
286
309
|
getUi: function (mParameters) {
|
|
287
310
|
return fnUiProvider ? fnUiProvider(mParameters) : undefined;
|
|
288
311
|
},
|
|
289
|
-
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Returns this CHIP's configuration UI, if available.
|
|
315
|
+
*
|
|
316
|
+
* @param {Object<string,string>} [mParameters]
|
|
317
|
+
* Since 1.21.0 an optional parameter map can be passed to the UI provider. This map can be
|
|
318
|
+
* used for example to pass default configuration values to the UI.
|
|
319
|
+
*
|
|
320
|
+
* @returns {Promise<sap.ui.core.Control>}
|
|
321
|
+
* this CHIP's configuration UI or <code>undefined</code>
|
|
322
|
+
*
|
|
323
|
+
* @name contract.configurationUi.getUi
|
|
324
|
+
* @function
|
|
325
|
+
* @since 1.11.0
|
|
326
|
+
*
|
|
327
|
+
* @see chip.configurationUi.setUiProvider
|
|
328
|
+
*/
|
|
329
|
+
getUiAsync: function (mParameters) {
|
|
330
|
+
return fnAsyncUiProvider ? fnAsyncUiProvider(mParameters) : undefined;
|
|
331
|
+
},
|
|
290
332
|
|
|
291
333
|
/**
|
|
292
334
|
* Tells whether this CHIP's configuration UI is currently in a "dirty" state (contains
|