@openui5/sap.ui.fl 1.128.0 → 1.129.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/THIRDPARTY.txt +1 -1
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +13 -421
- 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 +27 -51
- package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
- package/src/sap/ui/fl/LayerUtils.js +1 -1
- package/src/sap/ui/fl/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- 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 +5 -5
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +5 -4
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewDataSource.js +152 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +12 -18
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewOutbound.js +67 -0
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddTechnicalAttributes.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +11 -9
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +5 -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/SetAch.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetDescription.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/SetCloudDevAdaptationStatus.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 +1 -1
- 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 +18 -5
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Registry.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/AnnotationChange.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange.js +2 -4
- package/src/sap/ui/fl/apply/_internal/flexObjects/CompVariant.js +19 -10
- package/src/sap/ui/fl/apply/_internal/flexObjects/ControllerExtensionChange.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlVariant.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +16 -12
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +17 -20
- package/src/sap/ui/fl/apply/_internal/flexObjects/States.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +6 -5
- package/src/sap/ui/fl/apply/_internal/flexObjects/UpdatableChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +4 -3
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +4 -4
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +17 -61
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +10 -6
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +16 -15
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +10 -12
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +13 -6
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.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/AnnotationChangeHandlerAPI.js +63 -0
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +4 -4
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +2 -1
- 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 +26 -5
- 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 +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +33 -1
- package/src/sap/ui/fl/changeHandler/UnstashControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +14 -13
- 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/editIFrame.js +2 -1
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +10 -8
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +3 -3
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerRegistration.js +23 -1
- package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +54 -22
- 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/interfaces/BaseLoadConnector.js +1 -1
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +43 -43
- package/src/sap/ui/fl/registry/Settings.js +1 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +29 -58
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +12 -66
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +7 -4
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +30 -19
- package/src/sap/ui/fl/support/api/SupportAPI.js +8 -4
- 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 +106 -12
- package/src/sap/ui/fl/util/IFrame.js +3 -3
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/changePropertyValueByPath.js +15 -4
- package/src/sap/ui/fl/util/resolveBinding.js +9 -9
- package/src/sap/ui/fl/variants/VariantModel.js +49 -32
- package/src/sap/ui/fl/variants/context/controller/ContextVisibility.controller.js +2 -2
- package/src/sap/ui/fl/write/_internal/SaveAs.js +12 -3
- package/src/sap/ui/fl/write/_internal/Storage.js +6 -6
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +3 -3
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +43 -2
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +3 -3
- package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- 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 +122 -77
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +1 -1
- 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 +18 -18
- 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 +12 -11
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +6 -8
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectManager.js +181 -5
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +86 -0
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +43 -43
- 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/ContextBasedAdaptationsAPI.js +22 -19
- package/src/sap/ui/fl/write/api/ControlPersonalizationWriteAPI.js +56 -30
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +28 -51
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +11 -7
- package/src/sap/ui/fl/write/api/VersionsAPI.js +6 -4
|
@@ -50,7 +50,7 @@ sap.ui.define([
|
|
|
50
50
|
* @extends sap.ui.core.Control
|
|
51
51
|
*
|
|
52
52
|
* @author SAP SE
|
|
53
|
-
* @version 1.
|
|
53
|
+
* @version 1.129.0
|
|
54
54
|
*
|
|
55
55
|
* @constructor
|
|
56
56
|
* @private
|
|
@@ -198,9 +198,9 @@ sap.ui.define([
|
|
|
198
198
|
Control.prototype.applySettings.apply(this, [mOtherSettings, ...aOtherArgs]);
|
|
199
199
|
Control.prototype.applySettings.apply(this, [{ url }, ...aOtherArgs]);
|
|
200
200
|
if (mSettings) {
|
|
201
|
-
let mMergedSettings = {...this.getProperty("_settings") || {}};
|
|
201
|
+
let mMergedSettings = { ...this.getProperty("_settings") || {} };
|
|
202
202
|
if (mSettings._settings) {
|
|
203
|
-
mMergedSettings = {...mMergedSettings, ...mSettings._settings};
|
|
203
|
+
mMergedSettings = { ...mMergedSettings, ...mSettings._settings };
|
|
204
204
|
} else {
|
|
205
205
|
Object.keys(mSettings)
|
|
206
206
|
.filter(function(sPropertyName) {
|
|
@@ -17,7 +17,14 @@ sap.ui.define([
|
|
|
17
17
|
return aPath.map((element) => element.replaceAll("*", "/"));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
function
|
|
20
|
+
function deleteProperty(aPath, oRoot) {
|
|
21
|
+
for (let i = 0; i < aPath.length - 1; i++) {
|
|
22
|
+
oRoot = oRoot[aPath[i]];
|
|
23
|
+
}
|
|
24
|
+
delete oRoot[aPath[aPath.length - 1]];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function setOrDeletePropValueByPath(oEntityProp, oRoot) {
|
|
21
28
|
let aPath;
|
|
22
29
|
if (oEntityProp.propertyPath.includes("\\")) {
|
|
23
30
|
aPath = splitEscapePath(oEntityProp.propertyPath);
|
|
@@ -33,7 +40,11 @@ sap.ui.define([
|
|
|
33
40
|
throw new Error("Path does not contain a value. 'UPDATE' operation is not appropriate.");
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
if (oEntityProp.operation === "DELETE") {
|
|
44
|
+
deleteProperty(aPath, oRoot);
|
|
45
|
+
} else {
|
|
46
|
+
ObjectPath.set(aPath, oEntityProp.propertyValue, oRoot);
|
|
47
|
+
}
|
|
37
48
|
}
|
|
38
49
|
|
|
39
50
|
/**
|
|
@@ -47,10 +58,10 @@ sap.ui.define([
|
|
|
47
58
|
return function(vChanges, oRootPath) {
|
|
48
59
|
if (Array.isArray(vChanges)) {
|
|
49
60
|
vChanges.forEach(function(oEntityProp) {
|
|
50
|
-
|
|
61
|
+
setOrDeletePropValueByPath(oEntityProp, oRootPath);
|
|
51
62
|
});
|
|
52
63
|
} else {
|
|
53
|
-
|
|
64
|
+
setOrDeletePropValueByPath(vChanges, oRootPath);
|
|
54
65
|
}
|
|
55
66
|
};
|
|
56
67
|
});
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
*
|
|
35
35
|
* @function
|
|
36
36
|
* @author SAP SE
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.129.0
|
|
38
38
|
* @alias sap.ui.fl.util.resolveBinding
|
|
39
39
|
* @since 1.91
|
|
40
40
|
* @private
|
|
@@ -45,21 +45,21 @@ sap.ui.define([
|
|
|
45
45
|
return undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const oView = FlUtils.getViewForControl(oReferenceControl);
|
|
49
|
+
const oController = oView && oView.getController();
|
|
50
|
+
const oBindingInfo = typeof vValue === "string"
|
|
51
51
|
? ManagedObject.bindingParser(vValue, oController)
|
|
52
|
-
:
|
|
52
|
+
: { ...vValue };
|
|
53
53
|
|
|
54
54
|
if (!oBindingInfo) {
|
|
55
55
|
return undefined;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
const oHelperControl = new HelperControl();
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
const aParts = oBindingInfo.parts || [oBindingInfo];
|
|
61
61
|
aParts.forEach(function(oBindingPart) {
|
|
62
|
-
|
|
62
|
+
const sModelName = oBindingPart.model;
|
|
63
63
|
if (sModelName) {
|
|
64
64
|
oHelperControl.setModel(oReferenceControl.getModel(sModelName), sModelName);
|
|
65
65
|
oHelperControl.setBindingContext(oReferenceControl.getBindingContext(sModelName), sModelName);
|
|
@@ -70,7 +70,7 @@ sap.ui.define([
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
oHelperControl.bindProperty("resolved", oBindingInfo);
|
|
73
|
-
|
|
73
|
+
const vResolvedValue = oHelperControl.getResolved();
|
|
74
74
|
oHelperControl.destroy();
|
|
75
75
|
|
|
76
76
|
return vResolvedValue;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/util/restricted/_omit",
|
|
9
8
|
"sap/base/util/restricted/_isEqual",
|
|
9
|
+
"sap/base/util/restricted/_omit",
|
|
10
10
|
"sap/base/util/each",
|
|
11
11
|
"sap/base/util/isEmptyObject",
|
|
12
12
|
"sap/base/util/merge",
|
|
@@ -19,23 +19,25 @@ sap.ui.define([
|
|
|
19
19
|
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
20
20
|
"sap/ui/fl/apply/_internal/changes/Reverter",
|
|
21
21
|
"sap/ui/fl/apply/_internal/controlVariants/URLHandler",
|
|
22
|
+
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
22
23
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
23
24
|
"sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler",
|
|
24
25
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher",
|
|
25
26
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
26
27
|
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
27
28
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
28
|
-
"sap/ui/fl/
|
|
29
|
+
"sap/ui/fl/registry/Settings",
|
|
30
|
+
"sap/ui/fl/write/_internal/flexState/changes/UIChangeManager",
|
|
31
|
+
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
29
32
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
30
33
|
"sap/ui/fl/Layer",
|
|
31
34
|
"sap/ui/fl/LayerUtils",
|
|
32
35
|
"sap/ui/fl/Utils",
|
|
33
|
-
"sap/ui/
|
|
34
|
-
"sap/ui/model/BindingMode"
|
|
35
|
-
"sap/ui/model/json/JSONModel"
|
|
36
|
+
"sap/ui/model/json/JSONModel",
|
|
37
|
+
"sap/ui/model/BindingMode"
|
|
36
38
|
], function(
|
|
37
|
-
_omit,
|
|
38
39
|
_isEqual,
|
|
40
|
+
_omit,
|
|
39
41
|
each,
|
|
40
42
|
isEmptyObject,
|
|
41
43
|
merge,
|
|
@@ -48,20 +50,22 @@ sap.ui.define([
|
|
|
48
50
|
Applier,
|
|
49
51
|
Reverter,
|
|
50
52
|
URLHandler,
|
|
53
|
+
VariantUtil,
|
|
51
54
|
FlexObjectFactory,
|
|
52
55
|
DependencyHandler,
|
|
53
56
|
Switcher,
|
|
54
57
|
VariantManagementState,
|
|
55
58
|
FlexObjectState,
|
|
56
59
|
ManifestUtils,
|
|
57
|
-
|
|
60
|
+
Settings,
|
|
61
|
+
UIChangeManager,
|
|
62
|
+
FlexObjectManager,
|
|
58
63
|
ContextBasedAdaptationsAPI,
|
|
59
64
|
Layer,
|
|
60
65
|
LayerUtils,
|
|
61
66
|
Utils,
|
|
62
|
-
|
|
63
|
-
BindingMode
|
|
64
|
-
JSONModel
|
|
67
|
+
JSONModel,
|
|
68
|
+
BindingMode
|
|
65
69
|
) {
|
|
66
70
|
"use strict";
|
|
67
71
|
|
|
@@ -156,7 +160,10 @@ sap.ui.define([
|
|
|
156
160
|
return undefined;
|
|
157
161
|
})
|
|
158
162
|
.then(function() {
|
|
159
|
-
|
|
163
|
+
FlexObjectManager.deleteFlexObjects({
|
|
164
|
+
reference: mPropertyBag.model.sFlexReference,
|
|
165
|
+
flexObjects: aVariantDirtyChanges
|
|
166
|
+
});
|
|
160
167
|
});
|
|
161
168
|
}
|
|
162
169
|
|
|
@@ -306,7 +313,7 @@ sap.ui.define([
|
|
|
306
313
|
* @class Variant model implementation for JSON format.
|
|
307
314
|
* @extends sap.ui.model.json.JSONModel
|
|
308
315
|
* @author SAP SE
|
|
309
|
-
* @version 1.
|
|
316
|
+
* @version 1.129.0
|
|
310
317
|
* @param {object} oData - Either the URL where to load the JSON from or a JS object
|
|
311
318
|
* @param {object} mPropertyBag - Map of properties required for the constructor
|
|
312
319
|
* @param {sap.ui.fl.FlexController} mPropertyBag.flexController - <code>FlexController</code> instance for the component which uses the variant model
|
|
@@ -362,22 +369,18 @@ sap.ui.define([
|
|
|
362
369
|
});
|
|
363
370
|
|
|
364
371
|
VariantModel.prototype.updateData = function() {
|
|
365
|
-
|
|
366
|
-
|
|
372
|
+
const oNewVariantsMap = this.oDataSelector.get({ reference: this.sFlexReference });
|
|
373
|
+
const oCurrentData = { ...this.getData() };
|
|
367
374
|
Object.entries(oNewVariantsMap).forEach(function(aVariants) {
|
|
368
|
-
|
|
369
|
-
|
|
375
|
+
const sVariantManagementKey = aVariants[0];
|
|
376
|
+
const oVariantMapEntry = { ...aVariants[1] };
|
|
370
377
|
oCurrentData[sVariantManagementKey] ||= {};
|
|
371
378
|
oCurrentData[sVariantManagementKey].variants = oVariantMapEntry.variants.map(function(oVariant) {
|
|
372
|
-
|
|
379
|
+
const oCurrentVariantData = (oCurrentData[sVariantManagementKey].variants || [])
|
|
373
380
|
.find(function(oVariantToCheck) {
|
|
374
381
|
return oVariantToCheck.key === oVariant.key;
|
|
375
382
|
});
|
|
376
|
-
return
|
|
377
|
-
{},
|
|
378
|
-
oCurrentVariantData || {},
|
|
379
|
-
oVariant
|
|
380
|
-
);
|
|
383
|
+
return { ...(oCurrentVariantData || {}), ...oVariant };
|
|
381
384
|
});
|
|
382
385
|
oCurrentData[sVariantManagementKey].currentVariant = oVariantMapEntry.currentVariant;
|
|
383
386
|
oCurrentData[sVariantManagementKey].defaultVariant = oVariantMapEntry.defaultVariant;
|
|
@@ -616,10 +619,12 @@ sap.ui.define([
|
|
|
616
619
|
* @returns {Promise} Promise resolving when all changes are applied
|
|
617
620
|
*/
|
|
618
621
|
VariantModel.prototype.addAndApplyChangesOnVariant = function(aChanges) {
|
|
619
|
-
this.
|
|
620
|
-
return
|
|
622
|
+
const aAddedChanges = UIChangeManager.addDirtyChanges(this.sFlexReference, aChanges, this.oAppComponent);
|
|
623
|
+
return aAddedChanges.reduce(function(oPreviousPromise, oChange) {
|
|
621
624
|
return oPreviousPromise.then(function() {
|
|
622
|
-
|
|
625
|
+
const oControl = Element.getElementById(
|
|
626
|
+
JsControlTreeModifier.getControlIdBySelector(oChange.getSelector(), this.oAppComponent)
|
|
627
|
+
);
|
|
623
628
|
return Applier.applyChangeOnControl(oChange, oControl, {
|
|
624
629
|
modifier: JsControlTreeModifier,
|
|
625
630
|
appComponent: this.oAppComponent,
|
|
@@ -628,7 +633,10 @@ sap.ui.define([
|
|
|
628
633
|
.then((oReturn) => {
|
|
629
634
|
if (!oReturn.success) {
|
|
630
635
|
var oException = oReturn.error || new Error("The change could not be applied.");
|
|
631
|
-
|
|
636
|
+
FlexObjectManager.deleteFlexObjects({
|
|
637
|
+
reference: this.sFlexReference,
|
|
638
|
+
flexObjects: [oChange]
|
|
639
|
+
});
|
|
632
640
|
throw oException;
|
|
633
641
|
}
|
|
634
642
|
});
|
|
@@ -770,7 +778,8 @@ sap.ui.define([
|
|
|
770
778
|
}
|
|
771
779
|
|
|
772
780
|
// sets copied variant and associated changes as dirty
|
|
773
|
-
aChanges =
|
|
781
|
+
aChanges = FlexObjectManager.addDirtyFlexObjects(
|
|
782
|
+
this.sFlexReference,
|
|
774
783
|
aChanges
|
|
775
784
|
.concat([oDuplicateVariantData.instance]
|
|
776
785
|
.concat(oDuplicateVariantData.controlChanges)
|
|
@@ -800,7 +809,10 @@ sap.ui.define([
|
|
|
800
809
|
newVariantReference: mPropertyBag.sourceVariantReference,
|
|
801
810
|
appComponent: mPropertyBag.component
|
|
802
811
|
}).then(function() {
|
|
803
|
-
|
|
812
|
+
FlexObjectManager.deleteFlexObjects({
|
|
813
|
+
reference: this.sFlexReference,
|
|
814
|
+
flexObjects: aChangesToBeDeleted
|
|
815
|
+
});
|
|
804
816
|
}.bind(this));
|
|
805
817
|
};
|
|
806
818
|
|
|
@@ -972,7 +984,7 @@ sap.ui.define([
|
|
|
972
984
|
*/
|
|
973
985
|
VariantModel.prototype.addVariantChange = function(sVariantManagementReference, mPropertyBag) {
|
|
974
986
|
var oChange = this.createVariantChange(sVariantManagementReference, mPropertyBag);
|
|
975
|
-
this.
|
|
987
|
+
FlexObjectManager.addDirtyFlexObjects(this.sFlexReference, [oChange]);
|
|
976
988
|
|
|
977
989
|
return oChange;
|
|
978
990
|
};
|
|
@@ -987,7 +999,7 @@ sap.ui.define([
|
|
|
987
999
|
var aChanges = aChangePropertyMaps.map(function(mProperties) {
|
|
988
1000
|
return this.createVariantChange(sVariantManagementReference, mProperties);
|
|
989
1001
|
}.bind(this));
|
|
990
|
-
this.
|
|
1002
|
+
FlexObjectManager.addDirtyFlexObjects(this.sFlexReference, aChanges);
|
|
991
1003
|
|
|
992
1004
|
return aChanges;
|
|
993
1005
|
};
|
|
@@ -1000,7 +1012,10 @@ sap.ui.define([
|
|
|
1000
1012
|
*/
|
|
1001
1013
|
VariantModel.prototype.deleteVariantChange = function(sVariantManagementReference, mPropertyBag, oChange) {
|
|
1002
1014
|
this.setVariantProperties(sVariantManagementReference, mPropertyBag);
|
|
1003
|
-
|
|
1015
|
+
FlexObjectManager.deleteFlexObjects({
|
|
1016
|
+
reference: this.sFlexReference,
|
|
1017
|
+
flexObjects: [oChange]
|
|
1018
|
+
});
|
|
1004
1019
|
};
|
|
1005
1020
|
|
|
1006
1021
|
/**
|
|
@@ -1555,8 +1570,10 @@ sap.ui.define([
|
|
|
1555
1570
|
return mCurrentVariant.controlChanges;
|
|
1556
1571
|
})
|
|
1557
1572
|
.flat();
|
|
1573
|
+
const oLiveDependencyMap = FlexObjectState.getLiveDependencyMap(this.sFlexReference);
|
|
1558
1574
|
aVariantDependentControlChanges.forEach((oChange) => {
|
|
1559
|
-
|
|
1575
|
+
DependencyHandler.removeChangeFromMap(oLiveDependencyMap, oChange.getId());
|
|
1576
|
+
DependencyHandler.removeChangeFromDependencies(oLiveDependencyMap, oChange.getId());
|
|
1560
1577
|
});
|
|
1561
1578
|
|
|
1562
1579
|
this.oDataSelector.removeUpdateListener(this.fnUpdateListener);
|
|
@@ -19,8 +19,8 @@ sap.ui.define([
|
|
|
19
19
|
"use strict";
|
|
20
20
|
|
|
21
21
|
function buildQueryParameterMap(mConfig) {
|
|
22
|
-
|
|
23
|
-
return
|
|
22
|
+
const mDefaultValues = { layer: Layer.CUSTOMER, type: "role" };
|
|
23
|
+
return { ...mDefaultValues, ...mConfig };
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function assignDescriptionsToSelectedRoles(oSelectedRoles) {
|
|
@@ -11,9 +11,11 @@ sap.ui.define([
|
|
|
11
11
|
"sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes",
|
|
12
12
|
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
13
13
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
14
|
+
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
14
15
|
"sap/ui/fl/registry/Settings",
|
|
15
16
|
"sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
|
|
16
17
|
"sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory",
|
|
18
|
+
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
17
19
|
"sap/ui/fl/FlexControllerFactory",
|
|
18
20
|
"sap/ui/fl/Layer",
|
|
19
21
|
"sap/ui/fl/Utils"
|
|
@@ -24,9 +26,11 @@ sap.ui.define([
|
|
|
24
26
|
DescriptorChangeTypes,
|
|
25
27
|
FlexObjectState,
|
|
26
28
|
ManifestUtils,
|
|
29
|
+
FlexRuntimeInfoAPI,
|
|
27
30
|
Settings,
|
|
28
31
|
AppVariantFactory,
|
|
29
32
|
AppVariantInlineChangeFactory,
|
|
33
|
+
FlexObjectManager,
|
|
30
34
|
FlexControllerFactory,
|
|
31
35
|
Layer,
|
|
32
36
|
Utils
|
|
@@ -151,15 +155,19 @@ sap.ui.define([
|
|
|
151
155
|
}
|
|
152
156
|
|
|
153
157
|
function _deleteDescrChangesFromPersistence(vSelector) {
|
|
158
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(vSelector);
|
|
154
159
|
var aChangesToBeDeleted = [];
|
|
155
|
-
// In case of app variant, both
|
|
160
|
+
// In case of app variant, both persistencies hold descriptor changes and have to be removed from one of the persistencies
|
|
156
161
|
_getDirtyDescrChanges(vSelector).forEach(function(oChange) {
|
|
157
162
|
if (DescriptorChangeTypes.getChangeTypes().includes(oChange.getChangeType())) {
|
|
158
163
|
// If there are UI changes, they are sent to the backend in the last resolved promise and removed from the persistence
|
|
159
164
|
aChangesToBeDeleted.push(oChange);
|
|
160
165
|
}
|
|
161
166
|
});
|
|
162
|
-
|
|
167
|
+
FlexObjectManager.deleteFlexObjects({
|
|
168
|
+
reference: sReference,
|
|
169
|
+
flexObjects: aChangesToBeDeleted
|
|
170
|
+
});
|
|
163
171
|
}
|
|
164
172
|
|
|
165
173
|
function _addPackageAndTransport(oAppVariant, mPropertyBag) {
|
|
@@ -225,7 +233,8 @@ sap.ui.define([
|
|
|
225
233
|
// Save the dirty UI changes to backend => firing PersistenceWriteApi.save
|
|
226
234
|
return oFlexController.saveAll(Utils.getAppComponentForSelector(mPropertyBag.selector), true)
|
|
227
235
|
.then(function() {
|
|
228
|
-
|
|
236
|
+
const sReference = FlexRuntimeInfoAPI.getFlexReference({ element: mPropertyBag.selector });
|
|
237
|
+
FlexObjectManager.removeDirtyFlexObjects({ reference: sReference });
|
|
229
238
|
})
|
|
230
239
|
.catch(function(oError) {
|
|
231
240
|
// Delete the inconsistent app variant if the UI changes failed to save
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @namespace sap.ui.fl.write._internal.Storage
|
|
24
24
|
* @since 1.67
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.129.0
|
|
26
26
|
* @private
|
|
27
27
|
* @ui5-restricted sap.ui.fl
|
|
28
28
|
*/
|
|
@@ -238,22 +238,22 @@ sap.ui.define([
|
|
|
238
238
|
* @returns {Promise} Promise resolving as soon as the writing was completed or was not needed; or rejects in case of an error
|
|
239
239
|
*/
|
|
240
240
|
Storage.condense = async function(mPropertyBag) {
|
|
241
|
-
const mProperties =
|
|
241
|
+
const mProperties = { ...mPropertyBag };
|
|
242
242
|
const mCondense = await prepareCondensingForConnector(mProperties);
|
|
243
243
|
if (!mCondense) {
|
|
244
244
|
return Promise.reject("No changes were provided");
|
|
245
245
|
}
|
|
246
246
|
if (mCondense.create || mCondense.reorder || mCondense.update || mCondense.delete) {
|
|
247
|
-
|
|
247
|
+
let aCreatedChanges = [];
|
|
248
248
|
if (mCondense.create) {
|
|
249
|
-
|
|
249
|
+
aCreatedChanges = (mCondense.create.change ? mCondense.create.change : [])
|
|
250
250
|
.concat(mCondense.create.ctrl_variant ? mCondense.create.ctrl_variant : []);
|
|
251
251
|
}
|
|
252
252
|
mProperties.flexObjects = mCondense;
|
|
253
253
|
|
|
254
254
|
const oResult = await _executeActionByName("condense", mProperties);
|
|
255
|
-
if (oResult && oResult.status && oResult.status === 205 &&
|
|
256
|
-
|
|
255
|
+
if (oResult && oResult.status && oResult.status === 205 && aCreatedChanges.length) {
|
|
256
|
+
const aResponse = aCreatedChanges.map(function(oChange) {
|
|
257
257
|
return Object.values(oChange).pop();
|
|
258
258
|
});
|
|
259
259
|
oResult.response = aResponse;
|
|
@@ -51,7 +51,7 @@ sap.ui.define([
|
|
|
51
51
|
* @namespace
|
|
52
52
|
* @alias sap.ui.fl.write._internal.condenser.Condenser
|
|
53
53
|
* @author SAP SE
|
|
54
|
-
* @version 1.
|
|
54
|
+
* @version 1.129.0
|
|
55
55
|
*/
|
|
56
56
|
var Condenser = {};
|
|
57
57
|
|
|
@@ -394,7 +394,7 @@ sap.ui.define([
|
|
|
394
394
|
oChange.condenserState = "update";
|
|
395
395
|
}
|
|
396
396
|
oCondenserInfo.update(oChange, oUpdateCondenserInfo.updateContent);
|
|
397
|
-
oChange.setState(States.LifecycleState.
|
|
397
|
+
oChange.setState(States.LifecycleState.UPDATED);
|
|
398
398
|
delete mTypes[CondenserUtils.NOT_INDEX_RELEVANT][CondenserClassification.Update][oCondenserInfo.uniqueKey];
|
|
399
399
|
}
|
|
400
400
|
}
|
|
@@ -531,7 +531,7 @@ sap.ui.define([
|
|
|
531
531
|
});
|
|
532
532
|
});
|
|
533
533
|
} else {
|
|
534
|
-
oUpdateChange.setState(States.LifecycleState.
|
|
534
|
+
oUpdateChange.setState(States.LifecycleState.UPDATED);
|
|
535
535
|
}
|
|
536
536
|
oUpdateChange.condenserState = "update";
|
|
537
537
|
}
|
|
@@ -25,7 +25,7 @@ sap.ui.define([
|
|
|
25
25
|
* Connector for saving and deleting data from SAPUI5 Flexibility KeyUser service - including personalization.
|
|
26
26
|
*
|
|
27
27
|
* @namespace sap.ui.fl.write._internal.connectors.BtpServiceConnector
|
|
28
|
-
* @version 1.
|
|
28
|
+
* @version 1.129.0
|
|
29
29
|
* @private
|
|
30
30
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
31
31
|
*/
|
|
@@ -57,7 +57,8 @@ sap.ui.define([
|
|
|
57
57
|
PUBLISH: "/flex/versions/publish/"
|
|
58
58
|
},
|
|
59
59
|
CONTEXT_BASED_ADAPTATION: "/flex/apps/",
|
|
60
|
-
MANI_FIRST_SUPPORTED: "/sap/bc/ui2/app_index/ui5_app_mani_first_supported"
|
|
60
|
+
MANI_FIRST_SUPPORTED: "/sap/bc/ui2/app_index/ui5_app_mani_first_supported",
|
|
61
|
+
SEEN_FEATURES: "/seen_features/"
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
var ADAPTATIONS_SEGMENTATION = "/adaptations/";
|
|
@@ -167,7 +168,7 @@ sap.ui.define([
|
|
|
167
168
|
*
|
|
168
169
|
* @namespace sap.ui.fl.write._internal.connectors.LrepConnector
|
|
169
170
|
* @since 1.67
|
|
170
|
-
* @version 1.
|
|
171
|
+
* @version 1.129.0
|
|
171
172
|
* @private
|
|
172
173
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
173
174
|
*/
|
|
@@ -376,6 +377,46 @@ sap.ui.define([
|
|
|
376
377
|
return Promise.resolve(true);
|
|
377
378
|
},
|
|
378
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Gets the seen feature ids from the LRep backend.
|
|
382
|
+
*
|
|
383
|
+
* @param {object} mPropertyBag Property bag
|
|
384
|
+
* @returns {Promise<string[]>} Promise resolves with an array of the seen feature ids
|
|
385
|
+
*/
|
|
386
|
+
async getSeenFeatureIds(mPropertyBag) {
|
|
387
|
+
const mParameters = {};
|
|
388
|
+
InitialConnector._addClientInfo(mParameters);
|
|
389
|
+
const sUrl = InitialUtils.getUrl(ROUTES.SEEN_FEATURES, mPropertyBag, mParameters);
|
|
390
|
+
const oResult = await InitialUtils.sendRequest(sUrl, "GET", {initialConnector: InitialConnector});
|
|
391
|
+
return oResult.response?.seenFeatureIds;
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Writes the seen feature ids into the LRep backend.
|
|
396
|
+
*
|
|
397
|
+
* @param {object} mPropertyBag Property bag
|
|
398
|
+
* @param {string} mPropertyBag.seenFeatureIds List of feature ids that have been seen
|
|
399
|
+
* @returns {Promise<string[]>} Promise resolves with an array of the seen feature ids
|
|
400
|
+
*/
|
|
401
|
+
async setSeenFeatureIds(mPropertyBag) {
|
|
402
|
+
const mPayload = {
|
|
403
|
+
seenFeatureIds: mPropertyBag.seenFeatureIds
|
|
404
|
+
};
|
|
405
|
+
const mParameters = {};
|
|
406
|
+
InitialConnector._addClientInfo(mParameters);
|
|
407
|
+
const sUrl = InitialUtils.getUrl(ROUTES.SEEN_FEATURES, mPropertyBag, mParameters);
|
|
408
|
+
const sTokenUrl = InitialUtils.getUrl(ROUTES.TOKEN, mPropertyBag);
|
|
409
|
+
const oRequestOptions = WriteUtils.getRequestOptions(
|
|
410
|
+
InitialConnector,
|
|
411
|
+
sTokenUrl,
|
|
412
|
+
mPayload,
|
|
413
|
+
"application/json; charset=utf-8",
|
|
414
|
+
"json"
|
|
415
|
+
);
|
|
416
|
+
const oResult = await WriteUtils.sendRequest(sUrl, "PUT", oRequestOptions);
|
|
417
|
+
return oResult.response?.seenFeatureIds;
|
|
418
|
+
},
|
|
419
|
+
|
|
379
420
|
/**
|
|
380
421
|
* Write flex data into LRep back end; This method is called with a list of entities like changes, variants,
|
|
381
422
|
* control variants, variant changes and variant management changes.
|
|
@@ -24,7 +24,7 @@ sap.ui.define([
|
|
|
24
24
|
*
|
|
25
25
|
* @namespace sap.ui.fl.write._internal.connectors.ObjectPathConnector
|
|
26
26
|
* @since 1.73
|
|
27
|
-
* @version 1.
|
|
27
|
+
* @version 1.129.0
|
|
28
28
|
* @private
|
|
29
29
|
* @ui5-restricted sap.ui.fl.write._internal.Storage
|
|
30
30
|
*/
|
|
@@ -35,14 +35,14 @@ sap.ui.define([
|
|
|
35
35
|
},
|
|
36
36
|
|
|
37
37
|
loadFlexData(mPropertyBag) {
|
|
38
|
-
|
|
38
|
+
const sPath = sJsonPath || mPropertyBag.path;
|
|
39
39
|
if (sPath) {
|
|
40
40
|
return LoaderExtensions.loadResource({
|
|
41
41
|
dataType: "json",
|
|
42
42
|
url: sPath,
|
|
43
43
|
async: true
|
|
44
44
|
}).then(function(oResponse) {
|
|
45
|
-
return
|
|
45
|
+
return { ...StorageUtils.getEmptyFlexDataResponse(), ...oResponse };
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
return Promise.resolve();
|