@openui5/sap.ui.fl 1.130.1 → 1.131.1
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 +1 -1
- 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 +3 -3
- 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 +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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory.js +33 -23
- package/src/sap/ui/fl/apply/_internal/flexObjects/UIChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.js +1 -1
- 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 +1 -1
- 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 +1 -6
- 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 +6 -6
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +1 -1
- 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/ControlVariantApplyAPI.js +2 -2
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +2 -2
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddXML.js +10 -8
- 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 +23 -17
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +5 -4
- package/src/sap/ui/fl/changeHandler/BaseRename.js +5 -5
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +8 -6
- 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/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/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +8 -8
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -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/BtpServiceConnector.js +26 -0
- 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 +6 -6
- package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
- package/src/sap/ui/fl/library.js +43 -43
- 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/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/VariantModel.js +23 -9
- 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 +1 -1
- 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 -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/ChangesWriteAPI.js +1 -0
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
sap.ui.define([
|
|
7
7
|
"sap/base/util/restricted/_pick",
|
|
8
|
+
"sap/base/util/isPlainObject",
|
|
8
9
|
"sap/base/util/ObjectPath",
|
|
9
10
|
"sap/ui/fl/apply/_internal/flexObjects/AnnotationChange",
|
|
10
11
|
"sap/ui/fl/apply/_internal/flexObjects/AppDescriptorChange",
|
|
@@ -22,6 +23,7 @@ sap.ui.define([
|
|
|
22
23
|
"sap/ui/fl/Utils"
|
|
23
24
|
], function(
|
|
24
25
|
_pick,
|
|
26
|
+
isPlainObject,
|
|
25
27
|
ObjectPath,
|
|
26
28
|
AnnotationChange,
|
|
27
29
|
AppDescriptorChange,
|
|
@@ -50,6 +52,10 @@ sap.ui.define([
|
|
|
50
52
|
UPDATABLE_CHANGE: UpdatableChange
|
|
51
53
|
};
|
|
52
54
|
|
|
55
|
+
function cloneIfObject(oValue) {
|
|
56
|
+
return isPlainObject(oValue) ? { ...oValue } : oValue;
|
|
57
|
+
}
|
|
58
|
+
|
|
53
59
|
function getFlexObjectClass(oNewFileContent) {
|
|
54
60
|
if (oNewFileContent.fileType === "variant") {
|
|
55
61
|
return FLEX_OBJECT_TYPES.COMP_VARIANT_OBJECT;
|
|
@@ -67,7 +73,8 @@ sap.ui.define([
|
|
|
67
73
|
return FLEX_OBJECT_TYPES.UI_CHANGE;
|
|
68
74
|
}
|
|
69
75
|
|
|
70
|
-
function createBasePropertyBag(
|
|
76
|
+
function createBasePropertyBag(mOriginalProperties) {
|
|
77
|
+
const mProperties = cloneIfObject(mOriginalProperties);
|
|
71
78
|
const sChangeType = mProperties.type || mProperties.changeType;
|
|
72
79
|
const sFileName = mProperties.fileName || mProperties.id || Utils.createDefaultFileName(sChangeType);
|
|
73
80
|
const sUser = mProperties.user ||
|
|
@@ -78,11 +85,11 @@ sap.ui.define([
|
|
|
78
85
|
id: sFileName,
|
|
79
86
|
adaptationId: mProperties.adaptationId,
|
|
80
87
|
layer: mProperties.layer,
|
|
81
|
-
content: mProperties.content,
|
|
82
|
-
texts: mProperties.texts,
|
|
88
|
+
content: cloneIfObject(mProperties.content),
|
|
89
|
+
texts: cloneIfObject(mProperties.texts),
|
|
83
90
|
supportInformation: {
|
|
84
91
|
service: mProperties.ODataService,
|
|
85
|
-
oDataInformation: mProperties.oDataInformation,
|
|
92
|
+
oDataInformation: cloneIfObject(mProperties.oDataInformation),
|
|
86
93
|
command: mProperties.command,
|
|
87
94
|
compositeCommand: mProperties.compositeCommand,
|
|
88
95
|
generator: mProperties.generator,
|
|
@@ -106,7 +113,7 @@ sap.ui.define([
|
|
|
106
113
|
*
|
|
107
114
|
* @namespace sap.ui.fl.apply._internal.flexObjects.FlexObjectFactory
|
|
108
115
|
* @since 1.100
|
|
109
|
-
* @version 1.
|
|
116
|
+
* @version 1.131.1
|
|
110
117
|
* @private
|
|
111
118
|
* @ui5-restricted sap.ui.fl
|
|
112
119
|
*/
|
|
@@ -209,18 +216,19 @@ sap.ui.define([
|
|
|
209
216
|
* @returns {sap.ui.fl.apply._internal.flexObjects.FlVariant} Variant instance
|
|
210
217
|
*/
|
|
211
218
|
FlexObjectFactory.createFlVariant = function(mPropertyBag) {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
mProperties
|
|
215
|
-
mProperties.
|
|
216
|
-
mProperties.
|
|
219
|
+
const mPropertyBagClone = cloneIfObject(mPropertyBag);
|
|
220
|
+
mPropertyBagClone.generator ||= "FlexObjectFactory.createFlVariant";
|
|
221
|
+
const mProperties = createBasePropertyBag(mPropertyBagClone);
|
|
222
|
+
mProperties.variantManagementReference = mPropertyBagClone.variantManagementReference;
|
|
223
|
+
mProperties.variantReference = mPropertyBagClone.variantReference;
|
|
224
|
+
mProperties.contexts = mPropertyBagClone.contexts;
|
|
217
225
|
mProperties.texts = {
|
|
218
226
|
variantName: {
|
|
219
|
-
value:
|
|
227
|
+
value: mPropertyBagClone.variantName,
|
|
220
228
|
type: "XFLD"
|
|
221
229
|
}
|
|
222
230
|
};
|
|
223
|
-
mProperties.author = getVariantAuthor(mProperties.supportInformation.user, mProperties.layer,
|
|
231
|
+
mProperties.author = getVariantAuthor(mProperties.supportInformation.user, mProperties.layer, mPropertyBagClone.authors);
|
|
224
232
|
return new FlVariant(mProperties);
|
|
225
233
|
};
|
|
226
234
|
|
|
@@ -256,21 +264,23 @@ sap.ui.define([
|
|
|
256
264
|
* @returns {sap.ui.fl.apply._internal.flexObjects.CompVariant} Created comp variant object
|
|
257
265
|
*/
|
|
258
266
|
FlexObjectFactory.createCompVariant = function(oFileContent, mAuthors) {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
267
|
+
const oFileContentClone = cloneIfObject(oFileContent);
|
|
268
|
+
oFileContentClone.generator ||= "FlexObjectFactory.createCompVariant";
|
|
269
|
+
oFileContentClone.user = ObjectPath.get("support.user", oFileContentClone);
|
|
270
|
+
const mCompVariantContent = createBasePropertyBag(oFileContentClone);
|
|
262
271
|
|
|
263
|
-
mCompVariantContent.variantId =
|
|
264
|
-
mCompVariantContent.contexts =
|
|
265
|
-
mCompVariantContent.favorite =
|
|
266
|
-
mCompVariantContent.persisted =
|
|
267
|
-
mCompVariantContent.persistencyKey =
|
|
272
|
+
mCompVariantContent.variantId = oFileContentClone.variantId || mCompVariantContent.id;
|
|
273
|
+
mCompVariantContent.contexts = oFileContentClone.contexts;
|
|
274
|
+
mCompVariantContent.favorite = oFileContentClone.favorite;
|
|
275
|
+
mCompVariantContent.persisted = oFileContentClone.persisted;
|
|
276
|
+
mCompVariantContent.persistencyKey = oFileContentClone.persistencyKey ||
|
|
277
|
+
ObjectPath.get("selector.persistencyKey", oFileContentClone);
|
|
268
278
|
|
|
269
|
-
if (
|
|
279
|
+
if (oFileContentClone.layer === Layer.VENDOR || oFileContentClone.layer === Layer.CUSTOMER_BASE) {
|
|
270
280
|
mCompVariantContent.favorite = true;
|
|
271
281
|
}
|
|
272
|
-
if (
|
|
273
|
-
mCompVariantContent.executeOnSelection =
|
|
282
|
+
if (oFileContentClone.executeOnSelection !== undefined) {
|
|
283
|
+
mCompVariantContent.executeOnSelection = oFileContentClone.executeOnSelection;
|
|
274
284
|
} else {
|
|
275
285
|
// Legacy changes contains 'executeOnSelect' information inside content structure
|
|
276
286
|
mCompVariantContent.executeOnSelection = mCompVariantContent.content && (
|
|
@@ -41,7 +41,7 @@ sap.ui.define([
|
|
|
41
41
|
*
|
|
42
42
|
* @namespace sap.ui.fl.apply._internal.flexState.changes.ExtensionPointState
|
|
43
43
|
* @since 1.79
|
|
44
|
-
* @version 1.
|
|
44
|
+
* @version 1.131.1
|
|
45
45
|
* @private
|
|
46
46
|
* @ui5-restricted
|
|
47
47
|
*/
|
|
@@ -190,17 +190,12 @@ sap.ui.define([
|
|
|
190
190
|
// Change is applied but we need to create additional runtime only changes
|
|
191
191
|
// in case of duplicate extension points with different fragment id (fragment as template)
|
|
192
192
|
const oChangeFileContent = oChange.convertToFileContent();
|
|
193
|
-
const oChangeContent = oChange.getContent();
|
|
194
193
|
const mChangeSpecificData = _omit(oChangeFileContent, [
|
|
195
194
|
"dependentSelector",
|
|
196
195
|
"fileName",
|
|
197
196
|
"selector",
|
|
198
|
-
"content",
|
|
199
197
|
"adaptationId"
|
|
200
198
|
]);
|
|
201
|
-
Object.keys(oChangeContent).forEach(function(sKey) {
|
|
202
|
-
mChangeSpecificData[sKey] = oChangeContent[sKey];
|
|
203
|
-
});
|
|
204
199
|
mChangeSpecificData.support.sourceChangeFileName = oChange.getId() || "";
|
|
205
200
|
aPromises.push(
|
|
206
201
|
createAdditionalChange({
|
|
@@ -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.131.1
|
|
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.131.1
|
|
219
219
|
* @private
|
|
220
220
|
* @ui5-restricted sap.ui.fl
|
|
221
221
|
*
|
|
@@ -34,7 +34,7 @@ sap.ui.define([
|
|
|
34
34
|
*
|
|
35
35
|
* @namespace sap.ui.fl.apply._internal.flexState.controlVariants.VariantManagementState
|
|
36
36
|
* @since 1.74
|
|
37
|
-
* @version 1.
|
|
37
|
+
* @version 1.131.1
|
|
38
38
|
* @private
|
|
39
39
|
* @ui5-restricted
|
|
40
40
|
*/
|
|
@@ -463,15 +463,15 @@ sap.ui.define([
|
|
|
463
463
|
};
|
|
464
464
|
|
|
465
465
|
/**
|
|
466
|
-
* Loads the flex objects for
|
|
466
|
+
* Loads the flex objects for a given variant reference and adds them to the FlexState.
|
|
467
467
|
*
|
|
468
468
|
* @param {object} mPropertyBag - Object with the necessary properties
|
|
469
469
|
* @param {string} mPropertyBag.reference - Flexibility reference
|
|
470
|
-
* @param {string
|
|
470
|
+
* @param {string} mPropertyBag.variantReference - Variant reference to be loaded
|
|
471
471
|
*/
|
|
472
|
-
VariantManagementState.
|
|
473
|
-
const oStorageResponse = await Storage.
|
|
474
|
-
|
|
472
|
+
VariantManagementState.loadVariant = async function(mPropertyBag) {
|
|
473
|
+
const oStorageResponse = await Storage.loadFlVariant({
|
|
474
|
+
variantReference: mPropertyBag.variantReference,
|
|
475
475
|
reference: mPropertyBag.reference
|
|
476
476
|
});
|
|
477
477
|
FlexState.updateWithDataProvided({
|
|
@@ -161,9 +161,9 @@ sap.ui.define([
|
|
|
161
161
|
// if the variant management reference is not available, the variant is not yet loaded
|
|
162
162
|
if (!oVariantModel.getVariantManagementReference(mPropertyBag.variantReference).variantManagementReference) {
|
|
163
163
|
try {
|
|
164
|
-
await VariantManagementState.
|
|
164
|
+
await VariantManagementState.loadVariant({
|
|
165
165
|
reference: oVariantModel.sFlexReference,
|
|
166
|
-
|
|
166
|
+
variantReference: mPropertyBag.variantReference
|
|
167
167
|
});
|
|
168
168
|
} catch (oError) {
|
|
169
169
|
return logAndReject(Error(`Variant with reference '${mPropertyBag.variantReference}' could not be found`));
|
|
@@ -55,7 +55,7 @@ sap.ui.define([
|
|
|
55
55
|
* The instance-specific read delegate is returned if available.
|
|
56
56
|
*
|
|
57
57
|
* @param {object} mPropertyBag - Property bag
|
|
58
|
-
* @param {sap.ui.core.Element|
|
|
58
|
+
* @param {sap.ui.core.Element|Element} mPropertyBag.control - Control for which the corresponding delegate should be returned
|
|
59
59
|
* @param {sap.ui.core.util.reflection.BaseTreeModifier} mPropertyBag.modifier - Control tree modifier
|
|
60
60
|
* @param {string} [mPropertyBag.modelType] - Model type; required in case you passed the <code>XmlTreeModifier</code>
|
|
61
61
|
* @returns {Promise.<sap.ui.core.util.reflection.FlexDelegateInfo>} Delegate information including the lazy loaded instance of the delegate
|
|
@@ -77,7 +77,7 @@ sap.ui.define([
|
|
|
77
77
|
* The instance-specific write delegate is returned if available.
|
|
78
78
|
*
|
|
79
79
|
* @param {object} mPropertyBag - Property bag
|
|
80
|
-
* @param {sap.ui.core.Element|
|
|
80
|
+
* @param {sap.ui.core.Element|Element} mPropertyBag.control - Control for which the corresponding delegate should be returned
|
|
81
81
|
* @param {sap.ui.core.util.reflection.BaseTreeModifier} mPropertyBag.modifier - Control tree modifier
|
|
82
82
|
* @returns {Promise.<sap.ui.core.util.reflection.FlexDelegateInfo>} Delegate information including the lazy loaded instance of the delegate
|
|
83
83
|
*
|
|
@@ -16,7 +16,7 @@ sap.ui.define([
|
|
|
16
16
|
*
|
|
17
17
|
* @alias sap.ui.fl.changeHandler.AddXML
|
|
18
18
|
* @author SAP SE
|
|
19
|
-
* @version 1.
|
|
19
|
+
* @version 1.131.1
|
|
20
20
|
* @since 1.54
|
|
21
21
|
* @private
|
|
22
22
|
*/
|
|
@@ -72,17 +72,19 @@ sap.ui.define([
|
|
|
72
72
|
* @name sap.ui.fl.changeHandler.AddXML#completeChangeContent
|
|
73
73
|
*/
|
|
74
74
|
AddXML.completeChangeContent = function(oChange, oSpecificChangeInfo) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
// TODO: Remove assignment without content after all derived change handlers are adjusted to use content. todos#4
|
|
76
|
+
const oChangeInfoContent = oSpecificChangeInfo.content || oSpecificChangeInfo;
|
|
77
|
+
const oContent = {};
|
|
78
|
+
if (!oChangeInfoContent.targetAggregation) {
|
|
79
79
|
BaseAddXml._throwMissingAttributeError("targetAggregation");
|
|
80
|
+
} else {
|
|
81
|
+
oContent.targetAggregation = oChangeInfoContent.targetAggregation;
|
|
80
82
|
}
|
|
81
83
|
|
|
82
|
-
if (
|
|
83
|
-
oContent.index = oSpecificChangeInfo.index;
|
|
84
|
-
} else {
|
|
84
|
+
if (oChangeInfoContent.index === undefined) {
|
|
85
85
|
BaseAddXml._throwMissingAttributeError("index");
|
|
86
|
+
} else {
|
|
87
|
+
oContent.index = oChangeInfoContent.index;
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
BaseAddXml.completeChangeContent(oChange, oSpecificChangeInfo, oContent);
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
* @constructor
|
|
30
30
|
* @alias sap.ui.fl.changeHandler.BaseAddViaDelegate
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.131.1
|
|
33
33
|
* @private
|
|
34
34
|
* @ui5-restricted change handlers
|
|
35
35
|
*/
|
|
@@ -282,41 +282,47 @@ sap.ui.define([
|
|
|
282
282
|
*/
|
|
283
283
|
completeChangeContent(oChange, mSpecificChangeInfo, mPropertyBag) {
|
|
284
284
|
const oAppComponent = mPropertyBag.appComponent;
|
|
285
|
+
// TODO: Remove assignment without content after all derived change handlers are adjusted to use content. todos#4
|
|
286
|
+
const oChangeInfoContent = mSpecificChangeInfo.content || mSpecificChangeInfo;
|
|
285
287
|
const oContent = {};
|
|
286
|
-
if (
|
|
288
|
+
if (oChangeInfoContent.parentId) {
|
|
287
289
|
if (isFunction(mAddViaDelegateSettings.mapParentIdIntoChange)) {
|
|
288
|
-
mAddViaDelegateSettings.mapParentIdIntoChange(oChange,
|
|
290
|
+
mAddViaDelegateSettings.mapParentIdIntoChange(oChange, oChangeInfoContent, mPropertyBag);
|
|
289
291
|
} else {
|
|
290
|
-
oChange.addDependentControl(
|
|
292
|
+
oChange.addDependentControl(
|
|
293
|
+
oChangeInfoContent.parentId,
|
|
294
|
+
mAddViaDelegateSettings.parentAlias,
|
|
295
|
+
mPropertyBag
|
|
296
|
+
);
|
|
291
297
|
}
|
|
292
298
|
try {
|
|
293
|
-
oContent.parentId = mPropertyBag.modifier.getSelector(
|
|
299
|
+
oContent.parentId = mPropertyBag.modifier.getSelector(oChangeInfoContent.parentId, oAppComponent);
|
|
294
300
|
} catch (e) {
|
|
295
301
|
// If the parentId is not stable, e.g. in the case of SimpleForm groups
|
|
296
302
|
// don't set the parentId. This error is safe to ignore as a missing parentId
|
|
297
303
|
// will disable condensing
|
|
298
304
|
}
|
|
299
305
|
} else {
|
|
300
|
-
throw new Error("mSpecificChangeInfo.parentId attribute required");
|
|
306
|
+
throw new Error("mSpecificChangeInfo.content.parentId attribute required");
|
|
301
307
|
}
|
|
302
|
-
if (
|
|
303
|
-
oContent.bindingPath =
|
|
308
|
+
if (oChangeInfoContent.bindingPath) {
|
|
309
|
+
oContent.bindingPath = oChangeInfoContent.bindingPath;
|
|
304
310
|
} else {
|
|
305
|
-
throw new Error("mSpecificChangeInfo.bindingPath attribute required");
|
|
311
|
+
throw new Error("mSpecificChangeInfo.content.bindingPath attribute required");
|
|
306
312
|
}
|
|
307
|
-
if (
|
|
308
|
-
oContent.newFieldSelector = mPropertyBag.modifier.getSelector(
|
|
313
|
+
if (oChangeInfoContent.newControlId) {
|
|
314
|
+
oContent.newFieldSelector = mPropertyBag.modifier.getSelector(oChangeInfoContent.newControlId, oAppComponent);
|
|
309
315
|
} else {
|
|
310
|
-
throw new Error("mSpecificChangeInfo.newControlId attribute required");
|
|
316
|
+
throw new Error("mSpecificChangeInfo.content.newControlId attribute required");
|
|
311
317
|
}
|
|
312
|
-
if (
|
|
313
|
-
throw new Error("mSpecificChangeInfo.targetIndex attribute required");
|
|
318
|
+
if (oChangeInfoContent.index === undefined) {
|
|
319
|
+
throw new Error("mSpecificChangeInfo.content.targetIndex attribute required");
|
|
314
320
|
} else {
|
|
315
|
-
oContent.newFieldIndex =
|
|
321
|
+
oContent.newFieldIndex = oChangeInfoContent.index;
|
|
316
322
|
}
|
|
317
|
-
if (
|
|
323
|
+
if (oChangeInfoContent.oDataServiceVersion) {
|
|
318
324
|
// used to connect to change handler mediator
|
|
319
|
-
oContent.oDataServiceVersion =
|
|
325
|
+
oContent.oDataServiceVersion = oChangeInfoContent.oDataServiceVersion;
|
|
320
326
|
}
|
|
321
327
|
oChange.setContent(oContent);
|
|
322
328
|
},
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @alias sap.ui.fl.changeHandler.BaseAddXml
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.131.1
|
|
26
26
|
* @since 1.75
|
|
27
27
|
* @private
|
|
28
28
|
* @ui5-restricted change handlers
|
|
@@ -166,11 +166,12 @@ sap.ui.define([
|
|
|
166
166
|
*/
|
|
167
167
|
BaseAddXml.completeChangeContent = function(oChange, oSpecificChangeInfo, oContent) {
|
|
168
168
|
oContent ||= {};
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
// TODO: Remove assignment without content after all derived change handlers are adjusted to use content. todos#4
|
|
170
|
+
const oSpecificChangeContent = oSpecificChangeInfo.content || oSpecificChangeInfo;
|
|
171
|
+
if (!oSpecificChangeContent.fragmentPath) {
|
|
172
172
|
BaseAddXml._throwMissingAttributeError("fragmentPath");
|
|
173
173
|
}
|
|
174
|
+
oContent.fragmentPath ??= oSpecificChangeContent.fragmentPath;
|
|
174
175
|
oChange.setContent(oContent);
|
|
175
176
|
|
|
176
177
|
// Calculate the moduleName for the fragment
|
|
@@ -17,7 +17,7 @@ sap.ui.define([
|
|
|
17
17
|
* @constructor
|
|
18
18
|
* @alias sap.ui.fl.changeHandler.BaseRename
|
|
19
19
|
* @author SAP SE
|
|
20
|
-
* @version 1.
|
|
20
|
+
* @version 1.131.1
|
|
21
21
|
* @since 1.46
|
|
22
22
|
*
|
|
23
23
|
* @private
|
|
@@ -101,10 +101,10 @@ sap.ui.define([
|
|
|
101
101
|
originalControlType: mPropertyBag.modifier.getControlType(oControlToBeRenamed)
|
|
102
102
|
});
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
oChange.setText(sChangePropertyName,
|
|
104
|
+
// TODO: Remove assignment without content after all derived change handlers are adjusted to use content. todos#4
|
|
105
|
+
const oChangeContent = mSpecificChangeInfo.content || mSpecificChangeInfo;
|
|
106
|
+
if (typeof (oChangeContent.value) === "string") {
|
|
107
|
+
oChange.setText(sChangePropertyName, oChangeContent.value, sTranslationTextType);
|
|
108
108
|
} else {
|
|
109
109
|
throw new Error("oSpecificChangeInfo.value attribute required");
|
|
110
110
|
}
|
|
@@ -19,7 +19,7 @@ function(
|
|
|
19
19
|
*
|
|
20
20
|
* @alias sap.ui.fl.changeHandler.MoveControls
|
|
21
21
|
* @author SAP SE
|
|
22
|
-
* @version 1.
|
|
22
|
+
* @version 1.131.1
|
|
23
23
|
* @since 1.46
|
|
24
24
|
*/
|
|
25
25
|
var MoveControls = { };
|
|
@@ -282,12 +282,14 @@ function(
|
|
|
282
282
|
* @name sap.ui.fl.changeHandler.MoveControls#completeChangeContent
|
|
283
283
|
*/
|
|
284
284
|
MoveControls.completeChangeContent = async function(oChange, mSpecificChangeInfo, mPropertyBag) {
|
|
285
|
-
|
|
286
|
-
|
|
285
|
+
const oModifier = mPropertyBag.modifier;
|
|
286
|
+
const oAppComponent = mPropertyBag.appComponent;
|
|
287
|
+
// TODO: Remove assignment without content after all derived change handlers are adjusted to use content. todos#4
|
|
288
|
+
const oChangeContent = mSpecificChangeInfo.content || mSpecificChangeInfo;
|
|
287
289
|
|
|
288
|
-
checkCompleteChangeContentConditions(
|
|
289
|
-
const mCompleteSpecificChangeInfo = await completeSpecificChangeInfo(oModifier,
|
|
290
|
-
|
|
290
|
+
checkCompleteChangeContentConditions(oChangeContent);
|
|
291
|
+
const mCompleteSpecificChangeInfo = await completeSpecificChangeInfo(oModifier, oChangeContent, oAppComponent);
|
|
292
|
+
const oContent = {
|
|
291
293
|
movedElements: [],
|
|
292
294
|
source: {
|
|
293
295
|
selector: mCompleteSpecificChangeInfo.source.selector
|