@openui5/sap.ui.fl 1.123.0 → 1.124.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/sap/ui/fl/.library +1 -1
- package/src/sap/ui/fl/ChangePersistence.js +39 -48
- 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 -34
- 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 +113 -270
- package/src/sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes.js +2 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +36 -3
- package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Utils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddNewInbound.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +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/RemoveAllInboundsExceptOne.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetAbstract.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +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 +49 -5
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +28 -27
- 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/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 +1 -1
- 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/FlexState.js +81 -44
- 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 +30 -11
- package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +67 -70
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +14 -6
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +8 -7
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +108 -41
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +8 -15
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +7 -12
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +15 -19
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/DelegateMediatorAPI.js +13 -86
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +14 -11
- 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 +14 -29
- package/src/sap/ui/fl/changeHandler/BaseAddXml.js +1 -1
- package/src/sap/ui/fl/changeHandler/BaseRename.js +1 -1
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveElements.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/PropertyChange.js +1 -1
- package/src/sap/ui/fl/changeHandler/StashControl.js +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 +2 -2
- package/src/sap/ui/fl/changeHandler/common/createIFrame.js +3 -2
- package/src/sap/ui/fl/descriptorRelated/Utils.js +16 -7
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
- package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +26 -0
- package/src/sap/ui/fl/designtime/util/editIFrame.js +8 -4
- package/src/sap/ui/fl/initial/_internal/FlexConfiguration.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +2 -2
- 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/KeyUserConnector.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/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_sh.properties +9 -9
- 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/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/support/apps/contentbrowser/view/ContentDetails.view.xml +0 -1
- package/src/sap/ui/fl/support/apps/contentbrowser/view/ContentDetailsEdit.view.xml +0 -1
- package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +51 -64
- package/src/sap/ui/fl/util/IFrameRenderer.js +15 -9
- 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 +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 +2 -2
- package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -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/delegates/ODataV2ReadDelegate.js +3 -3
- 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 +12 -23
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +68 -95
- package/src/sap/ui/fl/write/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
- package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +2 -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/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +9 -8
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +3 -7
- package/src/sap/ui/fl/write/api/SACIntegrationUpdateVariant.js +78 -0
- package/src/sap/ui/fl/write/api/VersionsAPI.js +4 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +9 -1
- package/src/sap/ui/fl/apply/_internal/DelegateMediatorNew.js +0 -193
- package/src/sap/ui/fl/apply/_internal/flexState/appDescriptorChanges/prepareAppDescriptorMap.js +0 -39
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.fl",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.124.0",
|
|
4
4
|
"description": "OpenUI5 UI Library sap.ui.fl",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/SAP/openui5.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@openui5/sap.m": "1.
|
|
18
|
-
"@openui5/sap.ui.core": "1.
|
|
17
|
+
"@openui5/sap.m": "1.124.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.124.0"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/src/sap/ui/fl/.library
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<copyright>OpenUI5
|
|
7
7
|
* (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
|
|
8
8
|
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
|
|
9
|
-
<version>1.
|
|
9
|
+
<version>1.124.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
|
|
12
12
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/base/util/restricted/_union",
|
|
9
8
|
"sap/base/Log",
|
|
10
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
11
10
|
"sap/ui/core/Component",
|
|
@@ -25,7 +24,6 @@ sap.ui.define([
|
|
|
25
24
|
"sap/ui/fl/LayerUtils",
|
|
26
25
|
"sap/ui/fl/Utils"
|
|
27
26
|
], function(
|
|
28
|
-
union,
|
|
29
27
|
Log,
|
|
30
28
|
JsControlTreeModifier,
|
|
31
29
|
Component,
|
|
@@ -68,7 +66,7 @@ sap.ui.define([
|
|
|
68
66
|
*
|
|
69
67
|
* @constructor
|
|
70
68
|
* @author SAP SE
|
|
71
|
-
* @version 1.
|
|
69
|
+
* @version 1.124.0
|
|
72
70
|
* @since 1.25.0
|
|
73
71
|
* @private
|
|
74
72
|
* @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
|
|
@@ -128,7 +126,7 @@ sap.ui.define([
|
|
|
128
126
|
|
|
129
127
|
if (!mPropertyBag.includeCtrlVariants) {
|
|
130
128
|
aRelevantUIChanges = aRelevantUIChanges.concat(
|
|
131
|
-
VariantManagementState.
|
|
129
|
+
VariantManagementState.getInitialUIChanges({reference: this._mComponent.name})
|
|
132
130
|
);
|
|
133
131
|
} else {
|
|
134
132
|
aRelevantUIChanges = aRelevantUIChanges.concat(
|
|
@@ -172,28 +170,6 @@ sap.ui.define([
|
|
|
172
170
|
return UIChangesState.getLiveDependencyMap(this._mComponent.name);
|
|
173
171
|
};
|
|
174
172
|
|
|
175
|
-
/**
|
|
176
|
-
* Returns all changes that are currently loaded for the component.
|
|
177
|
-
* @param {object} mPropertyBag - Contains additional data needed for reading changes
|
|
178
|
-
* @param {string} [mPropertyBag.layer] - Specifies a single layer for loading changes
|
|
179
|
-
* @param {boolean} [mPropertyBag.includeDirtyChanges] - Whether dirty changes of the current session should be included
|
|
180
|
-
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} Array of changes
|
|
181
|
-
* @public
|
|
182
|
-
*/
|
|
183
|
-
ChangePersistence.prototype.getAllUIChanges = function(mPropertyBag) {
|
|
184
|
-
var aChanges = union(
|
|
185
|
-
this.getDependencyMapForComponent().aChanges,
|
|
186
|
-
mPropertyBag.includeDirtyChanges && this.getDirtyChanges()
|
|
187
|
-
).filter(function(oChange) {
|
|
188
|
-
return (
|
|
189
|
-
Boolean(oChange)
|
|
190
|
-
&& oChange.getFileType() === "change"
|
|
191
|
-
&& LayerUtils.compareAgainstCurrentLayer(oChange.getLayer(), mPropertyBag.layer) === 0
|
|
192
|
-
);
|
|
193
|
-
});
|
|
194
|
-
return aChanges;
|
|
195
|
-
};
|
|
196
|
-
|
|
197
173
|
function finalizeChangeCreation(oChange, oAppComponent) {
|
|
198
174
|
this._addRunTimeCreatedChangeToDependencyMap(oAppComponent, oChange);
|
|
199
175
|
this._addPropagationListener(oAppComponent);
|
|
@@ -363,11 +339,12 @@ sap.ui.define([
|
|
|
363
339
|
if (!aDirtyChanges.length && !bCondenseAnyLayer) {
|
|
364
340
|
return [];
|
|
365
341
|
}
|
|
366
|
-
var aPersistedAndSameLayerChanges = this.
|
|
342
|
+
var aPersistedAndSameLayerChanges = UIChangesState.getAllUIChanges(this._mComponent.name).filter(function(oChange) {
|
|
367
343
|
if (sLayer === Layer.CUSTOMER && aDraftFilenames) {
|
|
368
344
|
return oChange.getState() === States.LifecycleState.PERSISTED && aDraftFilenames.includes(oChange.getId());
|
|
369
345
|
}
|
|
370
|
-
return oChange.getState() === States.LifecycleState.PERSISTED
|
|
346
|
+
return oChange.getState() === States.LifecycleState.PERSISTED
|
|
347
|
+
&& LayerUtils.compareAgainstCurrentLayer(oChange.getLayer(), sLayer) === 0;
|
|
371
348
|
});
|
|
372
349
|
return aPersistedAndSameLayerChanges.concat(aDirtyChanges);
|
|
373
350
|
}
|
|
@@ -422,11 +399,13 @@ sap.ui.define([
|
|
|
422
399
|
}
|
|
423
400
|
|
|
424
401
|
/**
|
|
425
|
-
* Saves the passed or all dirty changes by calling the appropriate back-end method
|
|
402
|
+
* Saves the passed or all dirty changes by calling the appropriate back-end method
|
|
403
|
+
* (create for new changes, deleteChange for deleted changes);
|
|
426
404
|
* to ensure the correct order, the methods are called sequentially;
|
|
427
405
|
* after a change was saved successfully, it is removed from the dirty changes and the cache is updated.
|
|
428
406
|
* If all changes are new they are condensed before they are passed to the Storage. For this the App Component is necessary.
|
|
429
|
-
* Condensing is enabled by default for CUSTOMER and USER layers,
|
|
407
|
+
* Condensing is enabled by default for CUSTOMER and USER layers,
|
|
408
|
+
* but can be overruled with the URL Parameter 'sap-ui-xx-condense-changes'
|
|
430
409
|
*
|
|
431
410
|
* @param {sap.ui.core.UIComponent} [oAppComponent] - AppComponent instance
|
|
432
411
|
* @param {boolean} [bSkipUpdateCache] - If true, then the dirty change shall be saved for the new created app variant, but not for the current app;
|
|
@@ -438,10 +417,24 @@ sap.ui.define([
|
|
|
438
417
|
* @param {string} [sLayer] - Layer for which the changes should be saved
|
|
439
418
|
* @returns {Promise} Resolving after all changes have been saved
|
|
440
419
|
*/
|
|
441
|
-
ChangePersistence.prototype.saveDirtyChanges = function(
|
|
420
|
+
ChangePersistence.prototype.saveDirtyChanges = function(
|
|
421
|
+
oAppComponent,
|
|
422
|
+
bSkipUpdateCache,
|
|
423
|
+
aChanges,
|
|
424
|
+
sParentVersion,
|
|
425
|
+
aDraftFilenames,
|
|
426
|
+
bCondenseAnyLayer,
|
|
427
|
+
sLayer
|
|
428
|
+
) {
|
|
442
429
|
var aDirtyChanges = aChanges || this._aDirtyChanges;
|
|
443
430
|
var sCurrentLayer = aDirtyChanges.length && aDirtyChanges[0].getLayer() || sLayer;
|
|
444
|
-
var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(
|
|
431
|
+
var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(
|
|
432
|
+
this,
|
|
433
|
+
aDirtyChanges,
|
|
434
|
+
aDraftFilenames,
|
|
435
|
+
bCondenseAnyLayer,
|
|
436
|
+
sCurrentLayer
|
|
437
|
+
);
|
|
445
438
|
var bIsCondensingEnabled = (
|
|
446
439
|
isBackendCondensingEnabled(aRelevantChangesForCondensing)
|
|
447
440
|
&& canGivenChangesBeCondensed(oAppComponent, aRelevantChangesForCondensing, bCondenseAnyLayer)
|
|
@@ -472,14 +465,23 @@ sap.ui.define([
|
|
|
472
465
|
}.bind(this));
|
|
473
466
|
}
|
|
474
467
|
// Non-condensing route
|
|
475
|
-
return executeWriteAndRemoveCalls.call(
|
|
468
|
+
return executeWriteAndRemoveCalls.call(
|
|
469
|
+
this,
|
|
470
|
+
sCurrentLayer,
|
|
471
|
+
sRequest,
|
|
472
|
+
sParentVersion,
|
|
473
|
+
bSkipUpdateCache,
|
|
474
|
+
aAllChanges,
|
|
475
|
+
aCondensedChanges
|
|
476
|
+
);
|
|
476
477
|
}.bind(this));
|
|
477
478
|
}
|
|
478
479
|
return this.saveSequenceOfDirtyChanges(aDirtyChanges, bSkipUpdateCache, sParentVersion);
|
|
479
480
|
};
|
|
480
481
|
|
|
481
482
|
/**
|
|
482
|
-
* Saves a sequence of dirty changes by calling the appropriate back-end method
|
|
483
|
+
* Saves a sequence of dirty changes by calling the appropriate back-end method
|
|
484
|
+
* (create for new changes, deleteChange for deleted changes);
|
|
483
485
|
* to ensure the correct order, the methods are called sequentially;
|
|
484
486
|
* after a change was saved successfully, it is removed from the dirty changes and the cache is updated.
|
|
485
487
|
*
|
|
@@ -739,19 +741,6 @@ sap.ui.define([
|
|
|
739
741
|
}.bind(this));
|
|
740
742
|
};
|
|
741
743
|
|
|
742
|
-
/**
|
|
743
|
-
* Collect changes from the dependency map by names
|
|
744
|
-
*
|
|
745
|
-
* @param {string[]} aNames Names of changes
|
|
746
|
-
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} aChanges Array of changes with corresponding names
|
|
747
|
-
* @private
|
|
748
|
-
*/
|
|
749
|
-
ChangePersistence.prototype._getChangesFromMapByNames = function(aNames) {
|
|
750
|
-
return this.getDependencyMapForComponent().aChanges.filter(function(oChange) {
|
|
751
|
-
return aNames.indexOf(oChange.getId()) !== -1;
|
|
752
|
-
});
|
|
753
|
-
};
|
|
754
|
-
|
|
755
744
|
/**
|
|
756
745
|
* Removes unsaved changes.
|
|
757
746
|
*
|
|
@@ -849,7 +838,9 @@ sap.ui.define([
|
|
|
849
838
|
aNames.push(oChangeContentId.fileName);
|
|
850
839
|
});
|
|
851
840
|
}
|
|
852
|
-
const aChangesToRevert = this.
|
|
841
|
+
const aChangesToRevert = UIChangesState.getAllUIChanges(this._mComponent.name).filter(function(oChange) {
|
|
842
|
+
return aNames.indexOf(oChange.getId()) !== -1;
|
|
843
|
+
});
|
|
853
844
|
FlexState.updateStorageResponse(this._mComponent.name, aChangesToRevert.map((oFlexObject) => {
|
|
854
845
|
return {flexObject: oFlexObject.convertToFileContent(), type: "delete"};
|
|
855
846
|
}));
|
|
@@ -9,7 +9,6 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/fl/Layer",
|
|
10
10
|
"sap/ui/fl/ChangePersistenceFactory",
|
|
11
11
|
"sap/ui/fl/write/_internal/Versions",
|
|
12
|
-
"sap/ui/fl/apply/_internal/changes/Applier",
|
|
13
12
|
"sap/ui/fl/apply/_internal/changes/Reverter",
|
|
14
13
|
"sap/ui/fl/apply/_internal/controlVariants/URLHandler",
|
|
15
14
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
@@ -17,14 +16,12 @@ sap.ui.define([
|
|
|
17
16
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
18
17
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
19
18
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
20
|
-
"sap/ui/core/Element"
|
|
21
|
-
"sap/base/Log"
|
|
19
|
+
"sap/ui/core/Element"
|
|
22
20
|
], function(
|
|
23
21
|
Utils,
|
|
24
22
|
Layer,
|
|
25
23
|
ChangePersistenceFactory,
|
|
26
24
|
Versions,
|
|
27
|
-
Applier,
|
|
28
25
|
Reverter,
|
|
29
26
|
URLHandler,
|
|
30
27
|
States,
|
|
@@ -32,8 +29,7 @@ sap.ui.define([
|
|
|
32
29
|
FlexState,
|
|
33
30
|
ControlVariantApplyAPI,
|
|
34
31
|
JsControlTreeModifier,
|
|
35
|
-
Element
|
|
36
|
-
Log
|
|
32
|
+
Element
|
|
37
33
|
) {
|
|
38
34
|
"use strict";
|
|
39
35
|
|
|
@@ -81,7 +77,7 @@ sap.ui.define([
|
|
|
81
77
|
* @since 1.27.0
|
|
82
78
|
* @private
|
|
83
79
|
* @author SAP SE
|
|
84
|
-
* @version 1.
|
|
80
|
+
* @version 1.124.0
|
|
85
81
|
*/
|
|
86
82
|
var FlexController = function(sComponentName) {
|
|
87
83
|
this._oChangePersistence = undefined;
|
|
@@ -316,33 +312,6 @@ sap.ui.define([
|
|
|
316
312
|
.then(revertChangesAndUpdateVariantModel.bind(this, oComponent, bSkipUrlUpdate));
|
|
317
313
|
};
|
|
318
314
|
|
|
319
|
-
/**
|
|
320
|
-
* Applying variant changes.
|
|
321
|
-
*
|
|
322
|
-
* @param {array} aChanges - Array of relevant changes
|
|
323
|
-
* @param {sap.ui.core.Component} oAppComponent - Application component instance
|
|
324
|
-
* @returns {Promise|sap.ui.fl.Utils.FakePromise} Returns promise that is resolved after all changes were applied in asynchronous or FakePromise for the synchronous processing scenario
|
|
325
|
-
* @public
|
|
326
|
-
*/
|
|
327
|
-
FlexController.prototype.applyVariantChanges = function(aChanges, oAppComponent) {
|
|
328
|
-
var oControl;
|
|
329
|
-
return aChanges.reduce(function(oPreviousPromise, oChange) {
|
|
330
|
-
return oPreviousPromise.then(function() {
|
|
331
|
-
var mPropertyBag = {
|
|
332
|
-
modifier: JsControlTreeModifier,
|
|
333
|
-
appComponent: oAppComponent
|
|
334
|
-
};
|
|
335
|
-
this._oChangePersistence._addRunTimeCreatedChangeToDependencyMap(oAppComponent, oChange);
|
|
336
|
-
oControl = mPropertyBag.modifier.bySelector(oChange.getSelector(), oAppComponent);
|
|
337
|
-
if (oControl) {
|
|
338
|
-
return Applier.applyChangeOnControl(oChange, oControl, mPropertyBag);
|
|
339
|
-
}
|
|
340
|
-
Log.error("A flexibility change tries to change a nonexistent control.");
|
|
341
|
-
return undefined;
|
|
342
|
-
}.bind(this));
|
|
343
|
-
}.bind(this), (Utils.FakePromise ? new Utils.FakePromise() : Promise.resolve()));
|
|
344
|
-
};
|
|
345
|
-
|
|
346
315
|
/**
|
|
347
316
|
* Saves changes sequentially on the associated change persistence instance;
|
|
348
317
|
* This API must be only used in scenarios without draft (like personalization).
|