@openui5/sap.ui.fl 1.134.0 → 1.135.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 +2 -2
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +2 -2
- 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 +1 -1
- 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 +16 -3
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Applier.js +3 -41
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/InlineApplier.js +47 -0
- 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/AddNewDataSource.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/AddNewOutbound.js +1 -1
- 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 +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeOutbound.js +1 -1
- 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/ChangeModel.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/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 +1 -1
- 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 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObject.js +11 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +38 -2
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +5 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantChange.js +78 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +84 -0
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +17 -7
- package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +37 -9
- 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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +29 -4
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +3 -3
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +27 -11
- 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/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +1 -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/ChangeAnnotation.js +23 -4
- 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 +1 -1
- package/src/sap/ui/fl/changeHandler/UnhideControl.js +1 -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/DescriptorChange.js +121 -0
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +7 -95
- 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/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +13 -1
- 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/Utils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
- package/src/sap/ui/fl/initial/api/InitialFlexAPI.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/messagebundle_sl.properties +1 -1
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +1 -1
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +1 -1
- package/src/sap/ui/fl/support/_internal/getFlexSettings.js +1 -1
- package/src/sap/ui/fl/support/api/SupportAPI.js +1 -1
- 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/index.html +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/IFrame.js +1 -1
- 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/VariantManager.js +21 -21
- package/src/sap/ui/fl/variants/VariantModel.js +5 -5
- package/src/sap/ui/fl/write/_internal/Storage.js +1 -1
- 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 +24 -21
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +7 -9
- 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 +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
- 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 +1 -1
- 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 +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/FlexObjectManager.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/changes/UIChangeManager.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +1 -1
- 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/BusinessNetworkAPI.js +138 -0
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +52 -62
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +8 -9
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +49 -29
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +56 -62
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +5 -6
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
* @extends sap.ui.fl.apply._internal.flexObjects.Variant
|
|
33
33
|
* @alias sap.ui.fl.apply._internal.flexObjects.CompVariant
|
|
34
34
|
* @since 1.103
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.135.0
|
|
36
36
|
* @private
|
|
37
37
|
* @ui5-restricted sap.ui.fl, sap.ui.comp
|
|
38
38
|
*/
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
21
21
|
* @alias sap.ui.fl.apply._internal.flexObjects.ControllerExtensionChange
|
|
22
22
|
* @since 1.105
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.135.0
|
|
24
24
|
* @private
|
|
25
25
|
* @ui5-restricted sap.ui.fl
|
|
26
26
|
*/
|
|
@@ -69,7 +69,7 @@ sap.ui.define([
|
|
|
69
69
|
* @extends sap.ui.base.ManagedObject
|
|
70
70
|
* @alias sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
71
71
|
* @since 1.100
|
|
72
|
-
* @version 1.
|
|
72
|
+
* @version 1.135.0
|
|
73
73
|
* @private
|
|
74
74
|
* @ui5-restricted sap.ui.fl
|
|
75
75
|
*/
|
|
@@ -562,5 +562,15 @@ sap.ui.define([
|
|
|
562
562
|
return false;
|
|
563
563
|
};
|
|
564
564
|
|
|
565
|
+
/**
|
|
566
|
+
* Checks if the flex object can be visualized.
|
|
567
|
+
* This function is called before even the ChangeHandler is fetched and getChangeVisualizationInfo is called.
|
|
568
|
+
*
|
|
569
|
+
* @returns {boolean} <code>true</code> if the flex object can be visualized
|
|
570
|
+
*/
|
|
571
|
+
FlexObject.prototype.canBeVisualized = function() {
|
|
572
|
+
return false;
|
|
573
|
+
};
|
|
574
|
+
|
|
565
575
|
return FlexObject;
|
|
566
576
|
});
|
|
@@ -17,6 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
18
18
|
"sap/ui/fl/apply/_internal/flexObjects/UIChange",
|
|
19
19
|
"sap/ui/fl/apply/_internal/flexObjects/UpdatableChange",
|
|
20
|
+
"sap/ui/fl/apply/_internal/flexObjects/VariantChange",
|
|
21
|
+
"sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange",
|
|
20
22
|
"sap/ui/fl/registry/Settings",
|
|
21
23
|
"sap/ui/fl/Layer",
|
|
22
24
|
"sap/ui/fl/LayerUtils",
|
|
@@ -35,6 +37,8 @@ sap.ui.define([
|
|
|
35
37
|
States,
|
|
36
38
|
UIChange,
|
|
37
39
|
UpdatableChange,
|
|
40
|
+
VariantChange,
|
|
41
|
+
VariantManagementChange,
|
|
38
42
|
Settings,
|
|
39
43
|
Layer,
|
|
40
44
|
LayerUtils,
|
|
@@ -49,7 +53,10 @@ sap.ui.define([
|
|
|
49
53
|
APP_DESCRIPTOR_CHANGE: AppDescriptorChange,
|
|
50
54
|
ANNOTATION_CHANGE: AnnotationChange,
|
|
51
55
|
UI_CHANGE: UIChange,
|
|
52
|
-
UPDATABLE_CHANGE: UpdatableChange
|
|
56
|
+
UPDATABLE_CHANGE: UpdatableChange,
|
|
57
|
+
VARIANT_CHANGE: VariantChange,
|
|
58
|
+
VARIANT_MANAGEMENT_CHANGE: VariantManagementChange,
|
|
59
|
+
FLEX_OBJECT: FlexObject
|
|
53
60
|
};
|
|
54
61
|
|
|
55
62
|
function cloneIfObject(oValue) {
|
|
@@ -69,6 +76,12 @@ sap.ui.define([
|
|
|
69
76
|
return FLEX_OBJECT_TYPES.ANNOTATION_CHANGE;
|
|
70
77
|
} else if (oNewFileContent.fileType === "change" && oNewFileContent.changeType === "defaultVariant") {
|
|
71
78
|
return FLEX_OBJECT_TYPES.UPDATABLE_CHANGE;
|
|
79
|
+
} else if (oNewFileContent.fileType === "ctrl_variant_change") {
|
|
80
|
+
return FLEX_OBJECT_TYPES.VARIANT_CHANGE;
|
|
81
|
+
} else if (oNewFileContent.fileType === "ctrl_variant_management_change") {
|
|
82
|
+
return FLEX_OBJECT_TYPES.VARIANT_MANAGEMENT_CHANGE;
|
|
83
|
+
} else if (oNewFileContent.changeType === "deactivateChanges") {
|
|
84
|
+
return FLEX_OBJECT_TYPES.FLEX_OBJECT;
|
|
72
85
|
}
|
|
73
86
|
return FLEX_OBJECT_TYPES.UI_CHANGE;
|
|
74
87
|
}
|
|
@@ -124,7 +137,7 @@ sap.ui.define([
|
|
|
124
137
|
*
|
|
125
138
|
* @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
|
|
126
139
|
* @since 1.100
|
|
127
|
-
* @version 1.
|
|
140
|
+
* @version 1.135.0
|
|
128
141
|
* @private
|
|
129
142
|
* @ui5-restricted sap.ui.fl
|
|
130
143
|
*/
|
|
@@ -161,6 +174,11 @@ sap.ui.define([
|
|
|
161
174
|
return oFlexObject;
|
|
162
175
|
};
|
|
163
176
|
|
|
177
|
+
FlexObjectFactory.createFlexObject = function(mPropertyBag) {
|
|
178
|
+
const mProperties = createBasePropertyBag({...mPropertyBag, ...{packageName: mPropertyBag.packageName || "$TMP"}});
|
|
179
|
+
return new FlexObject(mProperties);
|
|
180
|
+
};
|
|
181
|
+
|
|
164
182
|
FlexObjectFactory.createUIChange = function(mPropertyBag) {
|
|
165
183
|
mPropertyBag.packageName ||= "$TMP";
|
|
166
184
|
const mProperties = createBasePropertyBag(mPropertyBag);
|
|
@@ -173,6 +191,22 @@ sap.ui.define([
|
|
|
173
191
|
return new UIChange(mProperties);
|
|
174
192
|
};
|
|
175
193
|
|
|
194
|
+
FlexObjectFactory.createVariantChange = function(mPropertyBag) {
|
|
195
|
+
mPropertyBag.packageName ||= "$TMP";
|
|
196
|
+
const mProperties = createBasePropertyBag(mPropertyBag);
|
|
197
|
+
mProperties.variantId = mPropertyBag.variantId || mPropertyBag.selector?.id;
|
|
198
|
+
mProperties.fileType = mPropertyBag.fileType || "ctrl_variant_change";
|
|
199
|
+
return new VariantChange(mProperties);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
FlexObjectFactory.createVariantManagementChange = function(mPropertyBag) {
|
|
203
|
+
mPropertyBag.packageName ||= "$TMP";
|
|
204
|
+
const mProperties = createBasePropertyBag(mPropertyBag);
|
|
205
|
+
mProperties.selector = mPropertyBag.selector;
|
|
206
|
+
mProperties.fileType = mPropertyBag.fileType || "ctrl_variant_management_change";
|
|
207
|
+
return new VariantManagementChange(mProperties);
|
|
208
|
+
};
|
|
209
|
+
|
|
176
210
|
FlexObjectFactory.createAppDescriptorChange = function(mPropertyBag) {
|
|
177
211
|
mPropertyBag.compositeCommand ||= mPropertyBag.support && mPropertyBag.support.compositeCommand;
|
|
178
212
|
if (!(mPropertyBag.fileName || mPropertyBag.id)) {
|
|
@@ -229,6 +263,7 @@ sap.ui.define([
|
|
|
229
263
|
* @param {string} [mPropertyBag.reference] - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.FlexObjectMetadata}
|
|
230
264
|
* @param {string} [mPropertyBag.generator] - See {@link sap.ui.fl.apply._internal.flexObjects.FlexObject.SupportInformation}
|
|
231
265
|
* @param {object} [mPropertyBag.authors] - Map of user IDs to full names
|
|
266
|
+
* @param {boolean} [mPropertyBag.executeOnSelection] - Apply automatically the content of the variant
|
|
232
267
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlVariant} Variant instance
|
|
233
268
|
*/
|
|
234
269
|
FlexObjectFactory.createFlVariant = function(mPropertyBag) {
|
|
@@ -238,6 +273,7 @@ sap.ui.define([
|
|
|
238
273
|
mProperties.variantManagementReference = mPropertyBagClone.variantManagementReference;
|
|
239
274
|
mProperties.variantReference = mPropertyBagClone.variantReference;
|
|
240
275
|
mProperties.contexts = mPropertyBagClone.contexts;
|
|
276
|
+
mProperties.executeOnSelection = mPropertyBagClone.executeOnSelection;
|
|
241
277
|
mProperties.texts = {
|
|
242
278
|
variantName: {
|
|
243
279
|
value: mPropertyBagClone.variantName,
|
|
@@ -28,7 +28,7 @@ sap.ui.define([
|
|
|
28
28
|
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
29
29
|
* @alias sap.ui.fl.apply._internal.flexObjects.UIChange
|
|
30
30
|
* @since 1.109
|
|
31
|
-
* @version 1.
|
|
31
|
+
* @version 1.135.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted
|
|
34
34
|
*/
|
|
@@ -494,5 +494,9 @@ sap.ui.define([
|
|
|
494
494
|
return this.isSuccessfullyApplied();
|
|
495
495
|
};
|
|
496
496
|
|
|
497
|
+
UIChange.prototype.canBeVisualized = function() {
|
|
498
|
+
return this.getSelector() && !isEmptyObject(this.getSelector());
|
|
499
|
+
};
|
|
500
|
+
|
|
497
501
|
return UIChange;
|
|
498
502
|
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 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/ui/fl/apply/_internal/flexObjects/FlexObject"
|
|
9
|
+
], function(
|
|
10
|
+
FlexObject
|
|
11
|
+
) {
|
|
12
|
+
"use strict";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Flexibility VariantChange Class
|
|
16
|
+
*
|
|
17
|
+
* @class Flexibility VariantChange Change Class.
|
|
18
|
+
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
19
|
+
* @alias sap.ui.fl.apply._internal.flexObjects.VariantChange
|
|
20
|
+
* @since 1.135
|
|
21
|
+
* @version 1.135.0
|
|
22
|
+
* @private
|
|
23
|
+
* @ui5-restricted
|
|
24
|
+
*/
|
|
25
|
+
const VariantChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.VariantChange", {
|
|
26
|
+
metadata: {
|
|
27
|
+
properties: {
|
|
28
|
+
/**
|
|
29
|
+
* Id of the variant
|
|
30
|
+
*/
|
|
31
|
+
variantId: {
|
|
32
|
+
type: "string"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
// eslint-disable-next-line object-shorthand
|
|
38
|
+
constructor: function(...aArgs) {
|
|
39
|
+
FlexObject.apply(this, aArgs);
|
|
40
|
+
this.setFileType("ctrl_variant_change");
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
46
|
+
* @returns {object} Mapping information
|
|
47
|
+
* @static
|
|
48
|
+
*/
|
|
49
|
+
VariantChange.getMappingInfo = function() {
|
|
50
|
+
return {
|
|
51
|
+
...FlexObject.getMappingInfo(),
|
|
52
|
+
variantId: "selector.id"
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
58
|
+
* Can be overridden to avoid access of static mapping within base methods.
|
|
59
|
+
* @returns {object} Mapping information
|
|
60
|
+
*/
|
|
61
|
+
VariantChange.prototype.getMappingInfo = function() {
|
|
62
|
+
return VariantChange.getMappingInfo();
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Returns the Id to be used by the condenser.
|
|
67
|
+
* @returns {string} Id for condensing
|
|
68
|
+
*/
|
|
69
|
+
VariantChange.prototype.getIdForCondensing = function() {
|
|
70
|
+
return this.getVariantId();
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
VariantChange.prototype.canBeCondensed = function() {
|
|
74
|
+
return true;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return VariantChange;
|
|
78
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2025 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/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
|
+
"sap/ui/fl/apply/_internal/flexObjects/FlexObject"
|
|
10
|
+
], function(
|
|
11
|
+
JsControlTreeModifier,
|
|
12
|
+
FlexObject
|
|
13
|
+
) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Flexibility VariantManagementChange Class
|
|
18
|
+
*
|
|
19
|
+
* @class Flexibility VariantManagementChange Change Class.
|
|
20
|
+
* @extends sap.ui.fl.apply._internal.flexObjects.FlexObject
|
|
21
|
+
* @alias sap.ui.fl.apply._internal.flexObjects.VariantManagementChange
|
|
22
|
+
* @since 1.135
|
|
23
|
+
* @version 1.135.0
|
|
24
|
+
* @private
|
|
25
|
+
* @ui5-restricted
|
|
26
|
+
*/
|
|
27
|
+
const VariantManagementChange = FlexObject.extend("sap.ui.fl.apply._internal.flexObjects.VariantManagementChange", {
|
|
28
|
+
metadata: {
|
|
29
|
+
properties: {
|
|
30
|
+
/**
|
|
31
|
+
* Reference to the VariantManagement control
|
|
32
|
+
*/
|
|
33
|
+
selector: {
|
|
34
|
+
type: "object",
|
|
35
|
+
defaultValue: {}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line object-shorthand
|
|
41
|
+
constructor: function(...aArgs) {
|
|
42
|
+
FlexObject.apply(this, aArgs);
|
|
43
|
+
this.setFileType("ctrl_variant_management_change");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
49
|
+
* @returns {object} Mapping information
|
|
50
|
+
* @static
|
|
51
|
+
*/
|
|
52
|
+
VariantManagementChange.getMappingInfo = function() {
|
|
53
|
+
return {
|
|
54
|
+
...FlexObject.getMappingInfo(),
|
|
55
|
+
selector: "selector"
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Returns the mapping between flex object properties and file content properties in the back-end response.
|
|
61
|
+
* Can be overridden to avoid access of static mapping within base methods.
|
|
62
|
+
* @returns {object} Mapping information
|
|
63
|
+
*/
|
|
64
|
+
VariantManagementChange.prototype.getMappingInfo = function() {
|
|
65
|
+
return VariantManagementChange.getMappingInfo();
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Returns the ID to be used for condensing.
|
|
70
|
+
*
|
|
71
|
+
* @param {object} oCondenserInfo - Condenser information returned from the change handler
|
|
72
|
+
* @param {sap.ui.core.Component} oAppComponent - Application component
|
|
73
|
+
* @returns {string} ID for condensing
|
|
74
|
+
*/
|
|
75
|
+
VariantManagementChange.prototype.getIdForCondensing = function(oCondenserInfo, oAppComponent) {
|
|
76
|
+
return JsControlTreeModifier.getControlIdBySelector(this.getSelector(), oAppComponent);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
VariantManagementChange.prototype.canBeCondensed = function() {
|
|
80
|
+
return true;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
return VariantManagementChange;
|
|
84
|
+
});
|
|
@@ -89,7 +89,7 @@ sap.ui.define([
|
|
|
89
89
|
*
|
|
90
90
|
* @namespace sap.ui.fl.apply._internal.flexState.FlexState
|
|
91
91
|
* @since 1.73
|
|
92
|
-
* @version 1.
|
|
92
|
+
* @version 1.135.0
|
|
93
93
|
* @private
|
|
94
94
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
95
95
|
*/
|
|
@@ -294,10 +294,10 @@ sap.ui.define([
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
function updateRuntimePersistence(sReference, oStorageResponse, oRuntimePersistence) {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
297
|
+
const aFlexObjects = oRuntimePersistence.flexObjects.slice();
|
|
298
|
+
const iInitialFlexObjectsLength = aFlexObjects.length;
|
|
299
|
+
const aChangeDefinitions = [];
|
|
300
|
+
let bUpdate;
|
|
301
301
|
|
|
302
302
|
each(oStorageResponse.changes, function(sKey, vValue) {
|
|
303
303
|
prepareChangeDefinitions(sKey, vValue).forEach(function(oChangeDef) {
|
|
@@ -308,9 +308,9 @@ sap.ui.define([
|
|
|
308
308
|
_mInstances[sReference].runtimePersistence = {
|
|
309
309
|
...oRuntimePersistence,
|
|
310
310
|
flexObjects: aChangeDefinitions.map(function(oChangeDef) {
|
|
311
|
-
|
|
311
|
+
let iObjectIndex;
|
|
312
312
|
// Only keep FlexObjects found in the storage change definitions
|
|
313
|
-
|
|
313
|
+
const oExistingFlexObject = aFlexObjects.find(function(oFlexObject, iIndex) {
|
|
314
314
|
iObjectIndex = iIndex;
|
|
315
315
|
return oFlexObject.getId() === oChangeDef.fileName;
|
|
316
316
|
});
|
|
@@ -323,6 +323,16 @@ sap.ui.define([
|
|
|
323
323
|
}
|
|
324
324
|
return oExistingFlexObject;
|
|
325
325
|
}
|
|
326
|
+
|
|
327
|
+
// The backend creates new changes in some scenarios (e.g. context filtering of FlVariants),
|
|
328
|
+
// which are not known to the runtimePersistence before
|
|
329
|
+
if (
|
|
330
|
+
oChangeDef.fileType === "ctrl_variant_change"
|
|
331
|
+
&& oChangeDef.fileName.endsWith("flVariant_contextFiltering_setVisible")
|
|
332
|
+
) {
|
|
333
|
+
return FlexObjectFactory.createFromFileContent(oChangeDef, null, true);
|
|
334
|
+
}
|
|
335
|
+
|
|
326
336
|
// If unknown change definitions are found, throw error (storage does not create flex objects)
|
|
327
337
|
const sErrorText = "Error updating runtime persistence: storage returned unknown flex objects";
|
|
328
338
|
Log.error(sErrorText);
|
|
@@ -9,12 +9,14 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/base/ManagedObject",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
11
11
|
"sap/ui/fl/initial/_internal/Storage",
|
|
12
|
+
"sap/ui/fl/initial/_internal/StorageUtils",
|
|
12
13
|
"sap/ui/fl/registry/Settings"
|
|
13
14
|
], function(
|
|
14
15
|
ObjectPath,
|
|
15
16
|
ManagedObject,
|
|
16
17
|
ManifestUtils,
|
|
17
18
|
ApplyStorage,
|
|
19
|
+
StorageUtils,
|
|
18
20
|
Settings
|
|
19
21
|
) {
|
|
20
22
|
"use strict";
|
|
@@ -61,11 +63,7 @@ sap.ui.define([
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
function filterInvalidFileNames(mFlexData) {
|
|
64
|
-
|
|
65
|
-
"appDescriptorChanges", "annotationChanges", "changes",
|
|
66
|
-
"comp.changes", "comp.changes", "comp.defaultVariants", "comp.standardVariants",
|
|
67
|
-
"variants", "variantChanges", "variantDependentControlChanges", "variantManagementChanges"
|
|
68
|
-
].forEach(function(vKey) {
|
|
66
|
+
StorageUtils.getAllFlexObjectNamespaces().forEach(function(vKey) {
|
|
69
67
|
const aFlexItems = ObjectPath.get(vKey, mFlexData);
|
|
70
68
|
if (aFlexItems) {
|
|
71
69
|
ObjectPath.set(vKey, aFlexItems.filter((oFlexItem) => {
|
|
@@ -96,19 +94,48 @@ sap.ui.define([
|
|
|
96
94
|
}
|
|
97
95
|
|
|
98
96
|
function getSideId(oComponentData) {
|
|
99
|
-
if (oComponentData
|
|
100
|
-
&& oComponentData.startupParameters
|
|
101
|
-
&& Array.isArray(oComponentData.startupParameters.hcpApplicationId)) {
|
|
97
|
+
if (oComponentData?.startupParameters && Array.isArray(oComponentData.startupParameters.hcpApplicationId)) {
|
|
102
98
|
return oComponentData.startupParameters.hcpApplicationId[0];
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Removes the changes that should be deactivated and the deactivate changes from the Flex Data.
|
|
104
|
+
* This is the equivalent of deleting changes from the backend.
|
|
105
|
+
* Example Scenario: When creating an annotation rename change, any control based rename changes should be removed.
|
|
106
|
+
* But Developer changes can't be deleted from the backend, so they are deactivated.
|
|
107
|
+
*
|
|
108
|
+
* @param {object} mFlexData - Flex Data as returned from the Storage
|
|
109
|
+
* @returns {object} Flex Data without the deactivate and deactivated changes
|
|
110
|
+
*/
|
|
111
|
+
function applyDeactivateChanges(mFlexData) {
|
|
112
|
+
const sDeactivateChangeType = "deactivateChanges";
|
|
113
|
+
const aToBeDeactivatedIds = mFlexData.changes.map((oChange) => {
|
|
114
|
+
if (oChange.changeType === sDeactivateChangeType) {
|
|
115
|
+
return [oChange.fileName, ...oChange.content.changeIds];
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
.flat()
|
|
119
|
+
.filter(Boolean);
|
|
120
|
+
|
|
121
|
+
// Filter all changes that should be deactivated (also already includes the id of the deactivate changes)
|
|
122
|
+
if (aToBeDeactivatedIds.length) {
|
|
123
|
+
StorageUtils.getAllFlexObjectNamespaces().forEach(function(vKey) {
|
|
124
|
+
const aFlexItems = ObjectPath.get(vKey, mFlexData);
|
|
125
|
+
if (aFlexItems.length) {
|
|
126
|
+
ObjectPath.set(vKey, aFlexItems.filter((oFlexItem) => !aToBeDeactivatedIds.includes(oFlexItem.fileName)), mFlexData);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
return mFlexData;
|
|
131
|
+
}
|
|
132
|
+
|
|
106
133
|
/**
|
|
107
134
|
* Class for loading Flex Data from the backend via the Connectors.
|
|
108
135
|
*
|
|
109
136
|
* @namespace sap.ui.fl.apply._internal.flexState.Loader
|
|
110
137
|
* @since 1.74
|
|
111
|
-
* @version 1.
|
|
138
|
+
* @version 1.135.0
|
|
112
139
|
* @private
|
|
113
140
|
* @ui5-restricted sap.ui.fl.apply._internal.flexState
|
|
114
141
|
*/
|
|
@@ -157,6 +184,7 @@ sap.ui.define([
|
|
|
157
184
|
allContexts: mPropertyBag.allContexts,
|
|
158
185
|
adaptationId: mPropertyBag.adaptationId
|
|
159
186
|
})
|
|
187
|
+
.then(applyDeactivateChanges.bind())
|
|
160
188
|
.then(filterInvalidFileNames.bind())
|
|
161
189
|
.then(migrateSelectorFlags.bind(undefined, isMigrationNeeded(mPropertyBag.manifest)))
|
|
162
190
|
.then(formatFlexData);
|
|
@@ -125,7 +125,7 @@ sap.ui.define([
|
|
|
125
125
|
*
|
|
126
126
|
* @namespace sap.ui.fl.apply._internal.flexState.compVariants.CompVariantMerger
|
|
127
127
|
* @since 1.86
|
|
128
|
-
* @version 1.
|
|
128
|
+
* @version 1.135.0
|
|
129
129
|
* @private
|
|
130
130
|
* @ui5-restricted sap.ui.fl
|
|
131
131
|
*/
|
|
@@ -215,7 +215,7 @@ sap.ui.define([
|
|
|
215
215
|
*
|
|
216
216
|
* @function
|
|
217
217
|
* @since 1.89
|
|
218
|
-
* @version 1.
|
|
218
|
+
* @version 1.135.0
|
|
219
219
|
* @private
|
|
220
220
|
* @ui5-restricted sap.ui.fl
|
|
221
221
|
*
|