@openui5/sap.ui.fl 1.120.7 → 1.121.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/.reuse/dep5 +23 -21
- package/THIRDPARTY.txt +6 -43
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +38 -133
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
- package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
- package/src/sap/ui/fl/FlexController.js +28 -15
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +5 -5
- package/src/sap/ui/fl/Utils.js +15 -18
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +19 -20
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +6 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +9 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +2 -2
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +17 -11
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +7 -19
- package/src/sap/ui/fl/{write → apply}/_internal/extensionPoint/Registry.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +1 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +13 -7
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +3 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +8 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +47 -0
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +124 -34
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +118 -45
- package/src/sap/ui/fl/apply/_internal/flexState/InitialPrepareFunctions.js +25 -9
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +17 -3
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +21 -1
- package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +108 -104
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +93 -34
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +195 -0
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +7 -6
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +6 -6
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +89 -11
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +20 -28
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/{write → apply}/api/ExtensionPointRegistryAPI.js +3 -3
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +49 -8
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +7 -6
- package/src/sap/ui/fl/changeHandler/Base.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/StashControl.js +2 -2
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +4 -4
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +3 -91
- package/src/sap/ui/fl/designtime/util/editIFrame.js +94 -0
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/FlexInfoSession.js +2 -23
- package/src/sap/ui/fl/initial/_internal/Storage.js +106 -39
- package/src/sap/ui/fl/{write → initial}/_internal/StorageFeaturesMerger.js +10 -7
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +14 -8
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +26 -4
- package/src/sap/ui/fl/initial/_internal/connectors/BtpServiceConnector.js +44 -0
- package/src/sap/ui/fl/initial/_internal/connectors/KeyUserConnector.js +8 -1
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +48 -2
- package/src/sap/ui/fl/initial/_internal/connectors/NeoLrepConnector.js +25 -4
- package/src/sap/ui/fl/initial/_internal/connectors/PersonalizationConnector.js +12 -1
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +14 -4
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/initial/api/Version.js +0 -1
- package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +22 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +48 -43
- package/src/sap/ui/fl/messagebundle.properties +3 -0
- package/src/sap/ui/fl/messagebundle_bg.properties +1 -1
- package/src/sap/ui/fl/messagebundle_en_US_saprigi.properties +39 -39
- package/src/sap/ui/fl/messagebundle_hu.properties +1 -1
- package/src/sap/ui/fl/messagebundle_it.properties +1 -1
- package/src/sap/ui/fl/messagebundle_lv.properties +1 -1
- package/src/sap/ui/fl/messagebundle_mk.properties +2 -2
- package/src/sap/ui/fl/messagebundle_no.properties +1 -1
- package/src/sap/ui/fl/registry/Settings.js +12 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +40 -20
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +93 -0
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +4 -4
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +5 -2
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +1 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/DescriptorChangeCheck.js +34 -19
- package/src/sap/ui/fl/util/IFrame.js +48 -16
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +88 -49
- package/src/sap/ui/fl/variants/VariantModel.js +19 -6
- package/src/sap/ui/fl/write/_internal/Storage.js +5 -34
- package/src/sap/ui/fl/write/_internal/Versions.js +62 -63
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +2 -2
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -16
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +55 -0
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +3 -9
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -26
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +3 -20
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +5 -1
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -15
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +11 -4
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +7 -7
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +22 -3
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +36 -4
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +1 -3
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FeaturesAPI.js +2 -2
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +2 -2
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +36 -7
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +88 -105
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +25 -2
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +0 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +241 -28
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +2 -10
- package/ui5.yaml +37 -76
- package/LICENSES/BSD-2-Clause.txt +0 -22
- package/src/sap/ui/fl/apply/_internal/flexState/changes/prepareChangesMap.js +0 -26
- /package/src/sap/ui/fl/descriptorRelated/{internal/Utils.js → Utils.js} +0 -0
|
@@ -5,60 +5,30 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/util/restricted/_merge",
|
|
8
9
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
9
10
|
"sap/ui/fl/initial/_internal/storageResultDisassemble",
|
|
11
|
+
"sap/ui/fl/initial/_internal/StorageFeaturesMerger",
|
|
10
12
|
"sap/ui/fl/initial/_internal/StorageResultMerger",
|
|
11
13
|
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
12
|
-
"sap/ui/fl/
|
|
13
|
-
"sap/ui/fl/Utils"
|
|
14
|
+
"sap/ui/fl/Layer"
|
|
14
15
|
], function(
|
|
16
|
+
_merge,
|
|
15
17
|
FlexInfoSession,
|
|
16
18
|
storageResultDisassemble,
|
|
19
|
+
StorageFeaturesMerger,
|
|
17
20
|
StorageResultMerger,
|
|
18
21
|
StorageUtils,
|
|
19
|
-
|
|
20
|
-
Utils
|
|
22
|
+
Layer
|
|
21
23
|
) {
|
|
22
24
|
"use strict";
|
|
23
25
|
|
|
24
|
-
function _addDraftLayerToResponsibleConnectorsPropertyBag(oConnectorSpecificPropertyBag, oConnectorConfig, mPropertyBag) {
|
|
25
|
-
if (!oConnectorConfig.layers || (oConnectorConfig.layers[0] !== "ALL" && oConnectorConfig.layers.indexOf("CUSTOMER") === -1)) {
|
|
26
|
-
delete oConnectorSpecificPropertyBag.version;
|
|
27
|
-
return oConnectorSpecificPropertyBag;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (_shouldAllContextsParameterBeSet(mPropertyBag.reference)) {
|
|
31
|
-
oConnectorSpecificPropertyBag.allContexts = true;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (mPropertyBag.version !== undefined) {
|
|
35
|
-
// an API call set a version number
|
|
36
|
-
oConnectorSpecificPropertyBag.version = mPropertyBag.version;
|
|
37
|
-
return oConnectorSpecificPropertyBag;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
var sVersion = Utils.getUrlParameter(Version.UrlParameter);
|
|
41
|
-
if (sVersion === null) {
|
|
42
|
-
// url parameter is not present --> remove an existing version entry copied from the original mPropertyBag
|
|
43
|
-
delete oConnectorSpecificPropertyBag.version;
|
|
44
|
-
} else {
|
|
45
|
-
oConnectorSpecificPropertyBag.version = parseInt(sVersion);
|
|
46
|
-
}
|
|
47
|
-
return oConnectorSpecificPropertyBag;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function _shouldAllContextsParameterBeSet(sFlexReference) {
|
|
51
|
-
var oFlexInfoSession = FlexInfoSession.getByReference(sFlexReference);
|
|
52
|
-
// a sign that we are in the RTA mode and allContexts query parameter should be set for flex/data request
|
|
53
|
-
return oFlexInfoSession && oFlexInfoSession.initialAllContexts;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
26
|
/**
|
|
57
27
|
* Abstraction providing an API to handle communication with persistence like back ends, local & session storage or work spaces.
|
|
58
28
|
*
|
|
59
29
|
* @namespace sap.ui.fl.initial._internal.Storage
|
|
60
30
|
* @since 1.67
|
|
61
|
-
* @version 1.
|
|
31
|
+
* @version 1.121.0
|
|
62
32
|
* @private
|
|
63
33
|
* @ui5-restricted sap.ui.fl
|
|
64
34
|
*/
|
|
@@ -70,14 +40,44 @@ sap.ui.define([
|
|
|
70
40
|
path: oConnectorConfig.path
|
|
71
41
|
});
|
|
72
42
|
|
|
73
|
-
|
|
43
|
+
var oFlexInfoSession = FlexInfoSession.getByReference(mPropertyBag.reference);
|
|
44
|
+
if (
|
|
45
|
+
!oConnectorConfig.layers
|
|
46
|
+
|| (
|
|
47
|
+
oConnectorConfig.layers[0] !== "ALL"
|
|
48
|
+
&& oConnectorConfig.layers.indexOf(Layer.CUSTOMER) === -1
|
|
49
|
+
)
|
|
50
|
+
) {
|
|
51
|
+
delete oConnectorSpecificPropertyBag.version;
|
|
52
|
+
} else {
|
|
53
|
+
// a sign that we are in the RTA mode and allContexts query parameter should be set for flex/data request
|
|
54
|
+
if (oFlexInfoSession.initialAllContexts) {
|
|
55
|
+
oConnectorSpecificPropertyBag.allContexts = true;
|
|
56
|
+
}
|
|
57
|
+
if (!oConnectorSpecificPropertyBag.version && oFlexInfoSession.version) {
|
|
58
|
+
oConnectorSpecificPropertyBag.version = oFlexInfoSession.version;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
var bIsRtaStarting = !!window.sessionStorage.getItem(`sap.ui.rta.restart.${Layer.CUSTOMER}`);
|
|
62
|
+
// save change and activate version do not trigger a reload, need saveChangeKeepSession to keep values in the session
|
|
63
|
+
if (!bIsRtaStarting && !oFlexInfoSession.saveChangeKeepSession) {
|
|
64
|
+
delete oFlexInfoSession.version;
|
|
65
|
+
delete oFlexInfoSession.maxLayer;
|
|
66
|
+
delete oFlexInfoSession.adaptationLayer;
|
|
67
|
+
FlexInfoSession.setByReference(oFlexInfoSession, mPropertyBag.reference);
|
|
68
|
+
}
|
|
74
69
|
|
|
75
70
|
return oConnectorConfig.loadConnectorModule.loadFlexData(oConnectorSpecificPropertyBag)
|
|
76
71
|
.then(function(oResponse) {
|
|
77
72
|
// ensure an object with the corresponding properties
|
|
78
73
|
return oResponse || StorageUtils.getEmptyFlexDataResponse();
|
|
79
74
|
})
|
|
80
|
-
.catch(StorageUtils.logAndResolveDefault.bind(
|
|
75
|
+
.catch(StorageUtils.logAndResolveDefault.bind(
|
|
76
|
+
undefined,
|
|
77
|
+
StorageUtils.getEmptyFlexDataResponse(),
|
|
78
|
+
oConnectorConfig,
|
|
79
|
+
"loadFlexData"
|
|
80
|
+
));
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
return Promise.all(aConnectorPromises);
|
|
@@ -115,8 +115,61 @@ sap.ui.define([
|
|
|
115
115
|
return StorageUtils.getStaticFileConnector().then(_loadFlexDataFromConnectors.bind(this, mPropertyBag));
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
function _sendLoadFeaturesToConnector(aConnectors) {
|
|
119
|
+
var aConnectorPromises = aConnectors.map(function(oConnectorConfig) {
|
|
120
|
+
// Tolerance for connectors that do not have loadFeature implemented
|
|
121
|
+
if (!oConnectorConfig?.loadConnectorModule?.loadFeatures) {
|
|
122
|
+
return Promise.resolve(StorageUtils.logAndResolveDefault({
|
|
123
|
+
features: {},
|
|
124
|
+
layers: oConnectorConfig.layers
|
|
125
|
+
}, oConnectorConfig, "loadFeatures"));
|
|
126
|
+
}
|
|
127
|
+
return oConnectorConfig.loadConnectorModule.loadFeatures({url: oConnectorConfig.url})
|
|
128
|
+
.then(function(oFeatures) {
|
|
129
|
+
return {
|
|
130
|
+
features: oFeatures,
|
|
131
|
+
layers: oConnectorConfig.layers
|
|
132
|
+
};
|
|
133
|
+
})
|
|
134
|
+
.catch(StorageUtils.logAndResolveDefault.bind(null, {
|
|
135
|
+
features: {},
|
|
136
|
+
layers: oConnectorConfig.layers
|
|
137
|
+
}, oConnectorConfig, "loadFeatures"));
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
return Promise.all(aConnectorPromises);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
async function loadVariantsAuthorsFromConnectors(sReference, aConnectors) {
|
|
144
|
+
const aResponses = await Promise.all(aConnectors.map(function(oConnectorConfig) {
|
|
145
|
+
const oConnectorSpecificPropertyBag = Object.assign({reference: sReference}, {
|
|
146
|
+
url: oConnectorConfig.url
|
|
147
|
+
});
|
|
148
|
+
return oConnectorConfig.loadConnectorModule.loadVariantsAuthors(oConnectorSpecificPropertyBag)
|
|
149
|
+
.then((oResponse) => oResponse || {})
|
|
150
|
+
.catch(StorageUtils.logAndResolveDefault.bind(
|
|
151
|
+
undefined,
|
|
152
|
+
{},
|
|
153
|
+
oConnectorConfig,
|
|
154
|
+
"loadVariantsAuthors"
|
|
155
|
+
));
|
|
156
|
+
}));
|
|
157
|
+
return _merge({}, ...aResponses);
|
|
158
|
+
}
|
|
159
|
+
|
|
118
160
|
var Storage = {};
|
|
119
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Provides the information which features are provided based on the responses of the involved connectors.
|
|
164
|
+
*
|
|
165
|
+
* @returns {Promise<Object>} Map feature flags and additional provided information from the connectors
|
|
166
|
+
*/
|
|
167
|
+
Storage.loadFeatures = function() {
|
|
168
|
+
return StorageUtils.getLoadConnectors()
|
|
169
|
+
.then(_sendLoadFeaturesToConnector)
|
|
170
|
+
.then(StorageFeaturesMerger.mergeResults);
|
|
171
|
+
};
|
|
172
|
+
|
|
120
173
|
/**
|
|
121
174
|
* Provides the flex bundle data for a given application based on the application reference and its version.
|
|
122
175
|
*
|
|
@@ -157,5 +210,19 @@ sap.ui.define([
|
|
|
157
210
|
.then(_flattenAndMergeResultPromise);
|
|
158
211
|
};
|
|
159
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Load the names of variants' authors for a given application.
|
|
215
|
+
*
|
|
216
|
+
* @param {string} sReference - Flex reference of application
|
|
217
|
+
* @returns {Promise<object>} Resolving with a list of maps between variant ID and author name
|
|
218
|
+
*/
|
|
219
|
+
Storage.loadVariantsAuthors = function(sReference) {
|
|
220
|
+
if (!sReference) {
|
|
221
|
+
return Promise.reject("No reference was provided");
|
|
222
|
+
}
|
|
223
|
+
return StorageUtils.getLoadConnectors()
|
|
224
|
+
.then(loadVariantsAuthorsFromConnectors.bind(this, sReference));
|
|
225
|
+
};
|
|
226
|
+
|
|
160
227
|
return Storage;
|
|
161
228
|
});
|
|
@@ -12,13 +12,13 @@ sap.ui.define([
|
|
|
12
12
|
"use strict";
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* ConnectorFeaturesMerger class for Connector implementations (
|
|
15
|
+
* ConnectorFeaturesMerger class for Connector implementations (initial).
|
|
16
16
|
*
|
|
17
|
-
* @namespace sap.ui.fl.
|
|
17
|
+
* @namespace sap.ui.fl.intial._internal.StorageFeaturesMerger
|
|
18
18
|
* @since 1.70
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.121.0
|
|
20
20
|
* @private
|
|
21
|
-
* @ui5-restricted sap.ui.fl.
|
|
21
|
+
* @ui5-restricted sap.ui.fl.initial._internal.Storage
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
var DEFAULT_FEATURES = {
|
|
@@ -35,6 +35,7 @@ sap.ui.define([
|
|
|
35
35
|
isPublicLayerAvailable: false,
|
|
36
36
|
isLocalResetEnabled: false,
|
|
37
37
|
isZeroDowntimeUpgradeRunning: false,
|
|
38
|
+
isVariantAuthorNameAvailable: false,
|
|
38
39
|
system: "",
|
|
39
40
|
client: ""
|
|
40
41
|
};
|
|
@@ -43,9 +44,11 @@ sap.ui.define([
|
|
|
43
44
|
var oVersioning = {};
|
|
44
45
|
var bVersioningEnabled = !!oResponse.features.isVersioningEnabled;
|
|
45
46
|
|
|
46
|
-
oResponse.layers
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
if (oResponse.layers) {
|
|
48
|
+
oResponse.layers.forEach(function(sLayer) {
|
|
49
|
+
oVersioning[sLayer] = bVersioningEnabled;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
49
52
|
|
|
50
53
|
return oVersioning;
|
|
51
54
|
}
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
*
|
|
26
26
|
* @namespace sap.ui.fl.initial._internal.StorageUtils
|
|
27
27
|
* @since 1.74
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.121.0
|
|
29
29
|
* @private
|
|
30
30
|
* @ui5-restricted sap.ui.fl.initial._internal.Storage, sap.ui.fl.write._internal.Storage,
|
|
31
31
|
* sap.ui.fl.initial._internal.connectors.ObjectStorageConnector, sap.ui.fl.initial._internal.connectors.ObjectPathConnector
|
|
@@ -38,9 +38,9 @@ sap.ui.define([
|
|
|
38
38
|
NeoLrepConnector: "sap/ui/fl/initial/_internal/connectors/NeoLrepConnector",
|
|
39
39
|
PersonalizationConnector: "sap/ui/fl/initial/_internal/connectors/PersonalizationConnector",
|
|
40
40
|
KeyUserConnector: "sap/ui/fl/initial/_internal/connectors/KeyUserConnector",
|
|
41
|
+
BtpServiceConnector: "sap/ui/fl/initial/_internal/connectors/BtpServiceConnector",
|
|
41
42
|
StaticFileConnector: "sap/ui/fl/initial/_internal/connectors/StaticFileConnector",
|
|
42
43
|
// Test & Demo Connectors
|
|
43
|
-
ObjectStorageConnector: "sap/ui/fl/apply/_internal/connectors/ObjectStorageConnector",
|
|
44
44
|
JsObjectConnector: "sap/ui/fl/write/_internal/connectors/JsObjectConnector",
|
|
45
45
|
ObjectPathConnector: "sap/ui/fl/write/_internal/connectors/ObjectPathConnector",
|
|
46
46
|
LocalStorageConnector: "sap/ui/fl/write/_internal/connectors/LocalStorageConnector",
|
|
@@ -52,6 +52,7 @@ sap.ui.define([
|
|
|
52
52
|
NeoLrepConnector: "sap/ui/fl/write/_internal/connectors/NeoLrepConnector",
|
|
53
53
|
PersonalizationConnector: "sap/ui/fl/write/_internal/connectors/PersonalizationConnector",
|
|
54
54
|
KeyUserConnector: "sap/ui/fl/write/_internal/connectors/KeyUserConnector",
|
|
55
|
+
BtpServiceConnector: "sap/ui/fl/write/_internal/connectors/BtpServiceConnector",
|
|
55
56
|
StaticFileConnector: "sap/ui/fl/write/_internal/connectors/StaticFileConnector",
|
|
56
57
|
// Test & Demo Connectors
|
|
57
58
|
JsObjectConnector: "sap/ui/fl/write/_internal/connectors/JsObjectConnector",
|
|
@@ -165,12 +166,12 @@ sap.ui.define([
|
|
|
165
166
|
},
|
|
166
167
|
|
|
167
168
|
/**
|
|
168
|
-
* Creates
|
|
169
|
+
* Creates an Error messages in case of a failed Connector call while getting responses from multiple endpoints
|
|
169
170
|
*
|
|
170
171
|
* @param {object} oResponse Response from the sent request
|
|
171
172
|
* @param {object} oConnectorConfig Configured Connector
|
|
172
173
|
* @param {string} sFunctionName Name of the called function
|
|
173
|
-
* @param {string} sErrorMessage Error messages retrieved from the endpoint
|
|
174
|
+
* @param {string} [sErrorMessage] Error messages retrieved from the endpoint
|
|
174
175
|
* @returns {object} oResponse Response from the endpoint
|
|
175
176
|
*/
|
|
176
177
|
logAndResolveDefault(oResponse, oConnectorConfig, sFunctionName, sErrorMessage) {
|
|
@@ -214,9 +215,14 @@ sap.ui.define([
|
|
|
214
215
|
},
|
|
215
216
|
|
|
216
217
|
sortFlexObjects(aFlexObjects) {
|
|
217
|
-
aFlexObjects.
|
|
218
|
-
|
|
218
|
+
const aFlexObjectsWithCreation = aFlexObjects.filter((oFlexObject) => oFlexObject.creation);
|
|
219
|
+
// The Object Storage Connector also delivers "version" entries which don't contain creation
|
|
220
|
+
// and don't require any particular sorting. Therefore they are placed at the beginning of the array.
|
|
221
|
+
const aFlexObjectWithoutCreation = aFlexObjects.filter((oFlexObject) => !oFlexObject.creation);
|
|
222
|
+
aFlexObjectsWithCreation.sort(function(oChangeA, oChangeB) {
|
|
223
|
+
return Date.parse(oChangeA.creation) - Date.parse(oChangeB.creation);
|
|
219
224
|
});
|
|
225
|
+
return aFlexObjectWithoutCreation.concat(aFlexObjectsWithCreation);
|
|
220
226
|
},
|
|
221
227
|
|
|
222
228
|
/**
|
|
@@ -226,7 +232,7 @@ sap.ui.define([
|
|
|
226
232
|
* @returns {object} Map of grouped flexibility objects per layer
|
|
227
233
|
*/
|
|
228
234
|
getGroupedFlexObjects(aFlexObjects) {
|
|
229
|
-
this.sortFlexObjects(aFlexObjects);
|
|
235
|
+
const aSortedFlexObjects = this.sortFlexObjects(aFlexObjects);
|
|
230
236
|
var mGroupedFlexObjects = {};
|
|
231
237
|
|
|
232
238
|
// build empty groups
|
|
@@ -236,7 +242,7 @@ sap.ui.define([
|
|
|
236
242
|
}.bind(this));
|
|
237
243
|
|
|
238
244
|
// fill groups
|
|
239
|
-
|
|
245
|
+
aSortedFlexObjects.forEach(function(oFlexObject) {
|
|
240
246
|
var sLayer = oFlexObject.layer;
|
|
241
247
|
|
|
242
248
|
if (oFlexObject.fileType === "ctrl_variant" && oFlexObject.variantManagementReference) {
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
+
"sap/base/util/merge",
|
|
9
|
+
"sap/base/util/restricted/_pick",
|
|
8
10
|
"sap/ui/fl/initial/_internal/connectors/Utils",
|
|
9
|
-
"sap/
|
|
11
|
+
"sap/ui/fl/interfaces/BaseLoadConnector"
|
|
10
12
|
], function(
|
|
13
|
+
merge,
|
|
14
|
+
_pick,
|
|
11
15
|
InitialUtils,
|
|
12
|
-
|
|
16
|
+
BaseConnector
|
|
13
17
|
) {
|
|
14
18
|
"use strict";
|
|
15
19
|
|
|
@@ -22,7 +26,7 @@ sap.ui.define([
|
|
|
22
26
|
* @private
|
|
23
27
|
* @ui5-restricted sap.ui.fl.initial._internal.connectors, sap.ui.fl.write._internal.connectors
|
|
24
28
|
*/
|
|
25
|
-
|
|
29
|
+
const BackendConnector = merge({}, BaseConnector, {
|
|
26
30
|
xsrfToken: undefined,
|
|
27
31
|
settings: undefined,
|
|
28
32
|
/**
|
|
@@ -55,6 +59,22 @@ sap.ui.define([
|
|
|
55
59
|
return oResponse;
|
|
56
60
|
}.bind(this));
|
|
57
61
|
},
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Called to get the flex features.
|
|
65
|
+
* @param {object} mPropertyBag - Property bag
|
|
66
|
+
* @returns {Promise<object>} Promise resolves with an object containing the flex features
|
|
67
|
+
*/
|
|
68
|
+
loadFeatures(mPropertyBag) {
|
|
69
|
+
if (this.settings) {
|
|
70
|
+
return Promise.resolve({response: this.settings});
|
|
71
|
+
}
|
|
72
|
+
var sFeaturesUrl = InitialUtils.getUrl(this.ROUTES.SETTINGS, mPropertyBag);
|
|
73
|
+
return InitialUtils.sendRequest(sFeaturesUrl, "GET", {initialConnector: this}).then(function(oResult) {
|
|
74
|
+
return oResult.response;
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
|
|
58
78
|
/**
|
|
59
79
|
* Loads flexibility data from a back end.
|
|
60
80
|
*
|
|
@@ -70,5 +90,7 @@ sap.ui.define([
|
|
|
70
90
|
return oResponse;
|
|
71
91
|
});
|
|
72
92
|
}
|
|
73
|
-
};
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
return BackendConnector;
|
|
74
96
|
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/base/util/merge",
|
|
9
|
+
"sap/ui/fl/initial/_internal/connectors/KeyUserConnector",
|
|
10
|
+
"sap/ui/fl/Layer"
|
|
11
|
+
], function(
|
|
12
|
+
merge,
|
|
13
|
+
KeyUserConnector,
|
|
14
|
+
Layer
|
|
15
|
+
) {
|
|
16
|
+
"use strict";
|
|
17
|
+
|
|
18
|
+
var PREFIX = "/flex/all";
|
|
19
|
+
var API_VERSION = "/v3";
|
|
20
|
+
const ROOT = `${PREFIX}/${API_VERSION}`;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Connector for requesting all data from SAPUI5 Flexibility KeyUser service - including personalization.
|
|
24
|
+
*
|
|
25
|
+
* @namespace sap.ui.fl.initial._internal.connectors.BtpServiceConnector
|
|
26
|
+
* @private
|
|
27
|
+
* @ui5-restricted sap.ui.fl.initial._internal.Storage, sap.ui.fl.write._internal.Storage
|
|
28
|
+
*/
|
|
29
|
+
const BtpServiceConnector = merge({}, KeyUserConnector, {
|
|
30
|
+
/** @lends sap.ui.fl.initial._internal.connectors.BtpServiceConnector */
|
|
31
|
+
layers: [
|
|
32
|
+
Layer.CUSTOMER,
|
|
33
|
+
Layer.PUBLIC,
|
|
34
|
+
Layer.USER
|
|
35
|
+
],
|
|
36
|
+
ROOT,
|
|
37
|
+
ROUTES: {
|
|
38
|
+
DATA: `${ROOT}/data/`,
|
|
39
|
+
SETTINGS: `${ROOT}/settings`
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return BtpServiceConnector;
|
|
44
|
+
});
|
|
@@ -33,9 +33,16 @@ sap.ui.define([
|
|
|
33
33
|
],
|
|
34
34
|
API_VERSION,
|
|
35
35
|
ROUTES: {
|
|
36
|
-
DATA: `${PREFIX + API_VERSION}/data
|
|
36
|
+
DATA: `${PREFIX + API_VERSION}/data/`,
|
|
37
|
+
SETTINGS: `${PREFIX + API_VERSION}/settings`
|
|
37
38
|
},
|
|
38
39
|
isLanguageInfoRequired: true,
|
|
40
|
+
loadFeatures(mPropertyBag) {
|
|
41
|
+
return BackendConnector.loadFeatures.call(KeyUserConnector, mPropertyBag).then(function(oFeatures) {
|
|
42
|
+
oFeatures.isContextSharingEnabled = true;
|
|
43
|
+
return oFeatures;
|
|
44
|
+
});
|
|
45
|
+
},
|
|
39
46
|
loadFlexData(mPropertyBag) {
|
|
40
47
|
return BackendConnector.sendRequest.call(KeyUserConnector, mPropertyBag).then(function(oResult) {
|
|
41
48
|
oResult.contents.map(function(oContent, iIndex, oResult) {
|
|
@@ -17,11 +17,15 @@ sap.ui.define([
|
|
|
17
17
|
) {
|
|
18
18
|
"use strict";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const ROUTES = {
|
|
21
21
|
DATA: "/flex/data/",
|
|
22
|
-
MODULES: "/flex/modules/"
|
|
22
|
+
MODULES: "/flex/modules/",
|
|
23
|
+
SETTINGS: "/flex/settings",
|
|
24
|
+
VARIANTS_AUTHORS: "/variants/authors/"
|
|
23
25
|
};
|
|
24
26
|
|
|
27
|
+
let _mFlexDataParameters = {};
|
|
28
|
+
|
|
25
29
|
/**
|
|
26
30
|
* Connector for requesting data from an LRep based back end.
|
|
27
31
|
*
|
|
@@ -70,6 +74,30 @@ sap.ui.define([
|
|
|
70
74
|
}
|
|
71
75
|
},
|
|
72
76
|
|
|
77
|
+
/**
|
|
78
|
+
* Called to get the flex features.
|
|
79
|
+
*
|
|
80
|
+
* @param {object} mPropertyBag Property bag
|
|
81
|
+
* @param {string} mPropertyBag.url Configured url for the connector
|
|
82
|
+
* @returns {Promise<object>} Promise resolves with an object containing the flex features
|
|
83
|
+
*/
|
|
84
|
+
loadFeatures(mPropertyBag) {
|
|
85
|
+
if (this.settings) {
|
|
86
|
+
return Promise.resolve(this.settings);
|
|
87
|
+
}
|
|
88
|
+
var mParameters = {};
|
|
89
|
+
|
|
90
|
+
this._addClientInfo(mParameters);
|
|
91
|
+
|
|
92
|
+
var sFeaturesUrl = Utils.getUrl(ROUTES.SETTINGS, mPropertyBag, mParameters);
|
|
93
|
+
return Utils.sendRequest(sFeaturesUrl, "GET", {initialConnector: this}).then(function(oResult) {
|
|
94
|
+
oResult.response.isVariantAdaptationEnabled = !!oResult.response.isPublicLayerAvailable;
|
|
95
|
+
oResult.response.isContextSharingEnabled = true;
|
|
96
|
+
oResult.response.isLocalResetEnabled = true;
|
|
97
|
+
return oResult.response;
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
|
|
73
101
|
/**
|
|
74
102
|
* Loads flexibility data from a back end.
|
|
75
103
|
*
|
|
@@ -108,6 +136,9 @@ sap.ui.define([
|
|
|
108
136
|
mParameters.upToLayerType = mPropertyBag.preview.maxLayer;
|
|
109
137
|
}
|
|
110
138
|
|
|
139
|
+
// Store parameters for possible subsequence GET variants' authors names request
|
|
140
|
+
_mFlexDataParameters = mParameters;
|
|
141
|
+
|
|
111
142
|
var sDataUrl = Utils.getUrl(ROUTES.DATA, mPropertyBag, mParameters);
|
|
112
143
|
return Utils.sendRequest(sDataUrl, "GET", {
|
|
113
144
|
initialConnector: this,
|
|
@@ -137,6 +168,21 @@ sap.ui.define([
|
|
|
137
168
|
return oResponse;
|
|
138
169
|
});
|
|
139
170
|
}.bind(this));
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Get full names of variants' authors.
|
|
175
|
+
*
|
|
176
|
+
* @param {object} mPropertyBag Property bag
|
|
177
|
+
* @param {string} mPropertyBag.url Configured URL for the connector
|
|
178
|
+
* @param {string} mPropertyBag.reference Flexibility reference
|
|
179
|
+
* @returns {Promise<object>} Promise resolves with an object containing maps of variants' IDs and their names
|
|
180
|
+
*/
|
|
181
|
+
loadVariantsAuthors(mPropertyBag) {
|
|
182
|
+
const sVariantsAuthorsUrl = Utils.getUrl(ROUTES.VARIANTS_AUTHORS, mPropertyBag, _mFlexDataParameters);
|
|
183
|
+
return Utils.sendRequest(sVariantsAuthorsUrl, "GET", {initialConnector: this}).then(function(oResult) {
|
|
184
|
+
return oResult.response;
|
|
185
|
+
});
|
|
140
186
|
}
|
|
141
187
|
};
|
|
142
188
|
});
|
|
@@ -6,12 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/merge",
|
|
9
|
-
"sap/ui/fl/initial/_internal/connectors/LrepConnector"
|
|
9
|
+
"sap/ui/fl/initial/_internal/connectors/LrepConnector",
|
|
10
|
+
"sap/ui/fl/initial/_internal/connectors/Utils"
|
|
10
11
|
], function(
|
|
11
12
|
merge,
|
|
12
|
-
LrepConnector
|
|
13
|
+
LrepConnector,
|
|
14
|
+
Utils
|
|
13
15
|
) {
|
|
14
16
|
"use strict";
|
|
17
|
+
var ROUTES = {
|
|
18
|
+
SETTINGS: "/flex/settings"
|
|
19
|
+
};
|
|
15
20
|
/**
|
|
16
21
|
* Connector for requesting data from a Neo LRep based back end.
|
|
17
22
|
*
|
|
@@ -19,7 +24,23 @@ sap.ui.define([
|
|
|
19
24
|
* @implements {sap.ui.fl.interfaces.BaseLoadConnector}
|
|
20
25
|
* @since 1.81
|
|
21
26
|
* @private
|
|
22
|
-
* @ui5-restricted sap.ui.fl.initial._internal.Storage
|
|
27
|
+
* @ui5-restricted sap.ui.fl.initial._internal.Storage
|
|
23
28
|
*/
|
|
24
|
-
return merge({}, LrepConnector, {
|
|
29
|
+
return merge({}, LrepConnector, {
|
|
30
|
+
loadFeatures(mPropertyBag) {
|
|
31
|
+
if (this.settings) {
|
|
32
|
+
return Promise.resolve(this.settings);
|
|
33
|
+
}
|
|
34
|
+
var mParameters = {};
|
|
35
|
+
|
|
36
|
+
var sFeaturesUrl = Utils.getUrl(ROUTES.SETTINGS, mPropertyBag, mParameters);
|
|
37
|
+
return Utils.sendRequest(sFeaturesUrl, "GET", {initialConnector: this}).then(function(oResult) {
|
|
38
|
+
oResult.response.isContextSharingEnabled = false;
|
|
39
|
+
return oResult.response;
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
loadVariantsAuthors() {
|
|
43
|
+
return Promise.reject("loadVariantsAuthors is not implemented");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
25
46
|
});
|
|
@@ -17,7 +17,10 @@ sap.ui.define([
|
|
|
17
17
|
|
|
18
18
|
var PREFIX = "/flex/personalization";
|
|
19
19
|
var API_VERSION = "/v1";
|
|
20
|
-
|
|
20
|
+
var FEATURES = {
|
|
21
|
+
isProductiveSystem: true,
|
|
22
|
+
hasPersoConnector: true
|
|
23
|
+
};
|
|
21
24
|
/**
|
|
22
25
|
* Connector for requesting data from SAPUI5 Flexibility Personalization service.
|
|
23
26
|
*
|
|
@@ -32,6 +35,14 @@ sap.ui.define([
|
|
|
32
35
|
],
|
|
33
36
|
ROUTES: {
|
|
34
37
|
DATA: `${PREFIX + API_VERSION}/data/`
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Called to get the flex features.
|
|
41
|
+
*
|
|
42
|
+
* @returns {Promise<object>} Promise resolves with an object containing the flex features
|
|
43
|
+
*/
|
|
44
|
+
loadFeatures() {
|
|
45
|
+
return Promise.resolve(FEATURES);
|
|
35
46
|
}
|
|
36
47
|
});
|
|
37
48
|
|
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/Log",
|
|
9
9
|
"sap/base/util/LoaderExtensions",
|
|
10
|
+
"sap/base/util/merge",
|
|
10
11
|
"sap/ui/core/Component",
|
|
11
|
-
"sap/ui/core/Supportability"
|
|
12
|
+
"sap/ui/core/Supportability",
|
|
13
|
+
"sap/ui/fl/interfaces/BaseLoadConnector"
|
|
12
14
|
], function(
|
|
13
15
|
Log,
|
|
14
16
|
LoaderExtensions,
|
|
17
|
+
merge,
|
|
15
18
|
Component,
|
|
16
|
-
Supportability
|
|
19
|
+
Supportability,
|
|
20
|
+
BaseConnector
|
|
17
21
|
) {
|
|
18
22
|
"use strict";
|
|
19
23
|
|
|
@@ -44,7 +48,7 @@ sap.ui.define([
|
|
|
44
48
|
* @private
|
|
45
49
|
* @ui5-restricted sap.ui.fl.apply._internal.Storage
|
|
46
50
|
*/
|
|
47
|
-
|
|
51
|
+
const StaticFileConnector = merge({}, BaseConnector, {
|
|
48
52
|
/**
|
|
49
53
|
* Provides the flex data stored in the built flexibility- or changes-bundle JSON file.
|
|
50
54
|
*
|
|
@@ -75,6 +79,12 @@ sap.ui.define([
|
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
return Promise.resolve();
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
loadFeatures() {
|
|
85
|
+
return Promise.resolve({});
|
|
78
86
|
}
|
|
79
|
-
};
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
return StaticFileConnector;
|
|
80
90
|
});
|
|
@@ -46,7 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
*
|
|
47
47
|
* @namespace sap.ui.fl.initial._internal.connectors.Utils
|
|
48
48
|
* @since 1.70
|
|
49
|
-
* @version 1.
|
|
49
|
+
* @version 1.121.0
|
|
50
50
|
* @private
|
|
51
51
|
* @ui5-restricted sap.ui.fl.initial._internal.connectors, sap.ui.fl.write._internal.connectors, sap.ui.fl.write._internal.transport
|
|
52
52
|
*/
|
|
@@ -51,7 +51,7 @@ function(
|
|
|
51
51
|
* @name sap.ui.fl.initial._internal.storageResultDisassemble
|
|
52
52
|
* @function
|
|
53
53
|
* @since 1.70
|
|
54
|
-
* @version 1.
|
|
54
|
+
* @version 1.121.0
|
|
55
55
|
* @private
|
|
56
56
|
* @ui5-restricted sap.ui.fl.initial._internal.Storage
|
|
57
57
|
* Disassembles a response with a variant section into one or more plain responses.
|