@openui5/sap.ui.fl 1.106.0 → 1.107.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/Cache.js +1 -1
- package/src/sap/ui/fl/Change.js +8 -4
- package/src/sap/ui/fl/ChangePersistence.js +31 -19
- package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
- package/src/sap/ui/fl/FakeLrepConnector.js +7 -5
- 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 +4 -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 +7 -5
- package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +1 -1
- package/src/sap/ui/fl/apply/_internal/changes/Applier.js +19 -2
- 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/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/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 +1 -1
- package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
- package/src/sap/ui/fl/apply/_internal/controlVariants/URLHandler.js +14 -6
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +6 -4
- 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 +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/Variant.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 -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 +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/EventHistory.js +1 -1
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +5 -3
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +1 -1
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/changeHandler/AddIFrame.js +25 -3
- 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 +3 -2
- 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 +3 -3
- package/src/sap/ui/fl/changeHandler/HideControl.js +1 -1
- package/src/sap/ui/fl/changeHandler/MoveControls.js +4 -4
- 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 +14 -3
- package/src/sap/ui/fl/changeHandler/condenser/Classification.js +6 -1
- package/src/sap/ui/fl/codeExt/CodeExtManager.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/Storage.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +7 -5
- 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/changeHandlers/ChangeRegistryItem.js +1 -1
- package/src/sap/ui/fl/initial/_internal/connectors/BackendConnector.js +4 -4
- package/src/sap/ui/fl/initial/_internal/connectors/LrepConnector.js +1 -3
- package/src/sap/ui/fl/initial/_internal/connectors/StaticFileConnector.js +5 -3
- package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +18 -10
- 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 +51 -47
- package/src/sap/ui/fl/messagebundle_de.properties +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/transport/TransportSelection.js +1 -1
- package/src/sap/ui/fl/util/IFrame.js +7 -6
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/util/resolveBinding.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +1 -1
- package/src/sap/ui/fl/variants/VariantModel.js +12 -1
- package/src/sap/ui/fl/variants/context/Component.js +10 -0
- package/src/sap/ui/fl/write/_internal/Storage.js +78 -33
- package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +13 -4
- 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 +75 -14
- package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +10 -7
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +1 -1
- package/src/sap/ui/fl/write/_internal/condenser/classifications/LastOneWins.js +4 -4
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Reverse.js +5 -5
- package/src/sap/ui/fl/write/_internal/condenser/classifications/Update.js +32 -0
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +2 -2
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +4 -3
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +16 -5
- package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +6 -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 +6 -28
- package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
- package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.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/FlexObjectState.js +5 -3
- 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/ContextBasedAdaptationsAPI.js +61 -0
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/VersionsAPI.js +3 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +140 -1
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openui5/sap.ui.fl",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.107.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.107.0",
|
|
18
|
+
"@openui5/sap.ui.core": "1.107.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-2022 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.107.0</version>
|
|
10
10
|
|
|
11
11
|
<documentation>SAPUI5 library with sap.ui.fl controls.</documentation>
|
|
12
12
|
|
package/src/sap/ui/fl/Cache.js
CHANGED
package/src/sap/ui/fl/Change.js
CHANGED
|
@@ -15,7 +15,8 @@ sap.ui.define([
|
|
|
15
15
|
"sap/base/Log",
|
|
16
16
|
"sap/ui/fl/apply/_internal/appVariant/DescriptorChangeTypes",
|
|
17
17
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
18
|
-
"sap/base/util/includes"
|
|
18
|
+
"sap/base/util/includes",
|
|
19
|
+
"sap/base/util/restricted/_isEqual"
|
|
19
20
|
], function (
|
|
20
21
|
isPlainObject,
|
|
21
22
|
ManagedObject,
|
|
@@ -27,7 +28,8 @@ sap.ui.define([
|
|
|
27
28
|
Log,
|
|
28
29
|
DescriptorChangeTypes,
|
|
29
30
|
States,
|
|
30
|
-
includes
|
|
31
|
+
includes,
|
|
32
|
+
_isEqual
|
|
31
33
|
) {
|
|
32
34
|
"use strict";
|
|
33
35
|
|
|
@@ -451,8 +453,10 @@ sap.ui.define([
|
|
|
451
453
|
* @public
|
|
452
454
|
*/
|
|
453
455
|
Change.prototype.setContent = function (oContent) {
|
|
454
|
-
this._oDefinition.content
|
|
455
|
-
|
|
456
|
+
if (!_isEqual(this._oDefinition.content, oContent)) {
|
|
457
|
+
this._oDefinition.content = oContent;
|
|
458
|
+
this.setState(Change.states.DIRTY);
|
|
459
|
+
}
|
|
456
460
|
};
|
|
457
461
|
|
|
458
462
|
/**
|
|
@@ -66,7 +66,7 @@ sap.ui.define([
|
|
|
66
66
|
*
|
|
67
67
|
* @constructor
|
|
68
68
|
* @author SAP SE
|
|
69
|
-
* @version 1.
|
|
69
|
+
* @version 1.107.0
|
|
70
70
|
* @experimental Since 1.25.0
|
|
71
71
|
* @param {object} mComponent - Component data to initiate <code>ChangePersistence</code> instance
|
|
72
72
|
* @param {string} mComponent.name - Name of the component this instance is responsible for
|
|
@@ -595,16 +595,20 @@ sap.ui.define([
|
|
|
595
595
|
return aUniqueProperties.length === 1;
|
|
596
596
|
}
|
|
597
597
|
|
|
598
|
-
function
|
|
598
|
+
function canGivenChangesBeCondensed(oAppComponent, aChanges, bCondenseAnyLayer) {
|
|
599
599
|
var bCondenserEnabled = false;
|
|
600
600
|
|
|
601
601
|
if (!oAppComponent || aChanges.length < 2 || !checkIfOnlyOne(aChanges, "getLayer")) {
|
|
602
602
|
return false;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
-
|
|
606
|
-
if ([Layer.CUSTOMER, Layer.USER].includes(sLayer)) {
|
|
605
|
+
if (bCondenseAnyLayer) {
|
|
607
606
|
bCondenserEnabled = true;
|
|
607
|
+
} else {
|
|
608
|
+
var sLayer = aChanges[0].getLayer();
|
|
609
|
+
if ([Layer.CUSTOMER, Layer.USER].includes(sLayer)) {
|
|
610
|
+
bCondenserEnabled = true;
|
|
611
|
+
}
|
|
608
612
|
}
|
|
609
613
|
|
|
610
614
|
var oUriParameters = UriParameters.fromURL(window.location.href);
|
|
@@ -629,11 +633,10 @@ sap.ui.define([
|
|
|
629
633
|
this._deleteNotSavedChanges(aAllChanges, aCondensedChanges, bAlreadyDeletedViaCondense);
|
|
630
634
|
}
|
|
631
635
|
|
|
632
|
-
function getAllRelevantChangesForCondensing(aDirtyChanges, aDraftFilenames) {
|
|
633
|
-
if (!aDirtyChanges.length) {
|
|
636
|
+
function getAllRelevantChangesForCondensing(aDirtyChanges, aDraftFilenames, bCondenseAnyLayer, sLayer) {
|
|
637
|
+
if (!aDirtyChanges.length && !bCondenseAnyLayer) {
|
|
634
638
|
return [];
|
|
635
639
|
}
|
|
636
|
-
var sLayer = aDirtyChanges[0].getLayer();
|
|
637
640
|
var aPersistedAndSameLayerChanges = this._mChanges.aChanges.filter(function(oChange) {
|
|
638
641
|
if (sLayer === Layer.CUSTOMER && aDraftFilenames) {
|
|
639
642
|
return oChange.getState() === Change.states.PERSISTED && aDraftFilenames.includes(oChange.getId());
|
|
@@ -643,6 +646,15 @@ sap.ui.define([
|
|
|
643
646
|
return aPersistedAndSameLayerChanges.concat(aDirtyChanges);
|
|
644
647
|
}
|
|
645
648
|
|
|
649
|
+
function canSingleRequestBeUsed(aDirtyChanges) {
|
|
650
|
+
if (aDirtyChanges.length) {
|
|
651
|
+
var aRequests = getRequests(aDirtyChanges);
|
|
652
|
+
var aStates = getStates(aDirtyChanges);
|
|
653
|
+
return aStates.length === 1 && aRequests.length === 1 && aStates[0] === Change.states.NEW;
|
|
654
|
+
}
|
|
655
|
+
return true;
|
|
656
|
+
}
|
|
657
|
+
|
|
646
658
|
/**
|
|
647
659
|
* Saves the passed or all dirty changes by calling the appropriate back-end method (create for new changes, deleteChange for deleted changes);
|
|
648
660
|
* to ensure the correct order, the methods are called sequentially;
|
|
@@ -655,35 +667,35 @@ sap.ui.define([
|
|
|
655
667
|
* therefore, the cache update of the current app is skipped because the dirty change is not saved for the running app.
|
|
656
668
|
* @param {sap.ui.fl.Change} [aChanges] - If passed only those changes are saved
|
|
657
669
|
* @param {string} sParentVersion - Parent version
|
|
658
|
-
* @param {string[]} [aDraftFilenames] -
|
|
670
|
+
* @param {string[]} [aDraftFilenames] - Filenames from persisted changes draft version
|
|
671
|
+
* @param {boolean} [bCondenseAnyLayer] - This will enable condensing regardless of the current layer
|
|
672
|
+
* @param {string} [sLayer] - Layer for which the changes should be saved
|
|
659
673
|
* @returns {Promise} Resolving after all changes have been saved
|
|
660
674
|
*/
|
|
661
|
-
ChangePersistence.prototype.saveDirtyChanges = function(oAppComponent, bSkipUpdateCache, aChanges, sParentVersion, aDraftFilenames) {
|
|
675
|
+
ChangePersistence.prototype.saveDirtyChanges = function(oAppComponent, bSkipUpdateCache, aChanges, sParentVersion, aDraftFilenames, bCondenseAnyLayer, sLayer) {
|
|
662
676
|
var aDirtyChanges = aChanges || this._aDirtyChanges;
|
|
663
|
-
var
|
|
677
|
+
var sCurrentLayer = aDirtyChanges.length && aDirtyChanges[0].getLayer() || sLayer;
|
|
678
|
+
var aRelevantChangesForCondensing = getAllRelevantChangesForCondensing.call(this, aDirtyChanges, aDraftFilenames, bCondenseAnyLayer, sCurrentLayer);
|
|
664
679
|
var bIsCondensingEnabled = (
|
|
665
680
|
isBackendCondensingEnabled(aRelevantChangesForCondensing)
|
|
666
|
-
&&
|
|
681
|
+
&& canGivenChangesBeCondensed(oAppComponent, aRelevantChangesForCondensing, bCondenseAnyLayer)
|
|
667
682
|
);
|
|
668
683
|
var aAllChanges = bIsCondensingEnabled ? aRelevantChangesForCondensing : aDirtyChanges;
|
|
669
684
|
var aChangesClone = aAllChanges.slice(0);
|
|
670
|
-
var aDirtyChangesClone = aDirtyChanges.slice(0);
|
|
671
685
|
var aRequests = getRequests(aDirtyChanges);
|
|
672
|
-
var aStates = getStates(aDirtyChanges);
|
|
673
686
|
|
|
674
|
-
if (
|
|
687
|
+
if (canSingleRequestBeUsed(aDirtyChanges)) {
|
|
675
688
|
var oCondensedChangesPromise = Promise.resolve(aChangesClone);
|
|
676
|
-
if (
|
|
689
|
+
if (canGivenChangesBeCondensed(oAppComponent, aChangesClone, bCondenseAnyLayer)) {
|
|
677
690
|
oCondensedChangesPromise = Condenser.condense(oAppComponent, aChangesClone);
|
|
678
691
|
}
|
|
679
692
|
return oCondensedChangesPromise.then(function(aCondensedChanges) {
|
|
680
693
|
var sRequest = aRequests[0];
|
|
681
|
-
var sLayer = aDirtyChanges[0].getLayer();
|
|
682
694
|
if (bIsCondensingEnabled) {
|
|
683
695
|
return Storage.condense({
|
|
684
696
|
allChanges: aAllChanges,
|
|
685
697
|
condensedChanges: aCondensedChanges,
|
|
686
|
-
layer:
|
|
698
|
+
layer: sCurrentLayer,
|
|
687
699
|
transport: sRequest,
|
|
688
700
|
isLegacyVariant: false,
|
|
689
701
|
parentVersion: sParentVersion
|
|
@@ -694,7 +706,7 @@ sap.ui.define([
|
|
|
694
706
|
}
|
|
695
707
|
if (aCondensedChanges.length) {
|
|
696
708
|
return Storage.write({
|
|
697
|
-
layer:
|
|
709
|
+
layer: sCurrentLayer,
|
|
698
710
|
flexObjects: prepareDirtyChanges(aCondensedChanges),
|
|
699
711
|
transport: sRequest,
|
|
700
712
|
isLegacyVariant: false,
|
|
@@ -708,7 +720,7 @@ sap.ui.define([
|
|
|
708
720
|
}.bind(this));
|
|
709
721
|
}
|
|
710
722
|
|
|
711
|
-
return this.saveSequenceOfDirtyChanges(
|
|
723
|
+
return this.saveSequenceOfDirtyChanges(aDirtyChanges, bSkipUpdateCache, sParentVersion);
|
|
712
724
|
};
|
|
713
725
|
|
|
714
726
|
/**
|
|
@@ -7,11 +7,13 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/Cache",
|
|
9
9
|
"sap/ui/fl/write/_internal/connectors/ObjectPathConnector",
|
|
10
|
-
"sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils"
|
|
10
|
+
"sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils",
|
|
11
|
+
"sap/ui/core/Configuration"
|
|
11
12
|
], function(
|
|
12
13
|
Cache,
|
|
13
14
|
ObjectPathConnector,
|
|
14
|
-
ObjectStorageUtils
|
|
15
|
+
ObjectStorageUtils,
|
|
16
|
+
Configuration
|
|
15
17
|
) {
|
|
16
18
|
"use strict";
|
|
17
19
|
|
|
@@ -40,7 +42,7 @@ sap.ui.define([
|
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
FakeLrepConnector.setFlexibilityServicesAndClearCache = function(sStorageConnectorName, sInitialComponentJsonPath) {
|
|
43
|
-
this._oFlexibilityServices =
|
|
45
|
+
this._oFlexibilityServices = Configuration.getFlexibilityServices();
|
|
44
46
|
|
|
45
47
|
var aConnectorConfig = [];
|
|
46
48
|
if (sInitialComponentJsonPath) {
|
|
@@ -48,7 +50,7 @@ sap.ui.define([
|
|
|
48
50
|
aConnectorConfig.push({connector: "ObjectPathConnector"});
|
|
49
51
|
}
|
|
50
52
|
aConnectorConfig.push({connector: sStorageConnectorName});
|
|
51
|
-
|
|
53
|
+
Configuration.setFlexibilityServices(aConnectorConfig);
|
|
52
54
|
Cache.clearEntries();
|
|
53
55
|
};
|
|
54
56
|
|
|
@@ -61,7 +63,7 @@ sap.ui.define([
|
|
|
61
63
|
|
|
62
64
|
// only reset the flexibility Services in case they were changes by the FakeConnector before
|
|
63
65
|
if (this._oFlexibilityServices) {
|
|
64
|
-
|
|
66
|
+
Configuration.setFlexibilityServices(this._oFlexibilityServices);
|
|
65
67
|
delete this._oFlexibilityServices;
|
|
66
68
|
}
|
|
67
69
|
};
|
|
@@ -84,7 +84,7 @@ sap.ui.define([
|
|
|
84
84
|
* @alias sap.ui.fl.FlexController
|
|
85
85
|
* @experimental Since 1.27.0
|
|
86
86
|
* @author SAP SE
|
|
87
|
-
* @version 1.
|
|
87
|
+
* @version 1.107.0
|
|
88
88
|
*/
|
|
89
89
|
var FlexController = function(sComponentName) {
|
|
90
90
|
this._oChangePersistence = undefined;
|
|
@@ -463,10 +463,11 @@ sap.ui.define([
|
|
|
463
463
|
* @param {boolean} [bDraft=false] - Indicates if changes should be written as a draft
|
|
464
464
|
* @param {string} [sLayer] - Layer for which the changes should be saved
|
|
465
465
|
* @param {boolean} [bRemoveOtherLayerChanges=false] - Whether to remove changes on other layers before saving
|
|
466
|
+
* @param {boolean} [bCondenseAnyLayer] - This will enable condensing regardless of the current layer
|
|
466
467
|
* @returns {Promise} resolving with an array of responses or rejecting with the first error
|
|
467
468
|
* @public
|
|
468
469
|
*/
|
|
469
|
-
FlexController.prototype.saveAll = function(oAppComponent, bSkipUpdateCache, bDraft, sLayer, bRemoveOtherLayerChanges) {
|
|
470
|
+
FlexController.prototype.saveAll = function(oAppComponent, bSkipUpdateCache, bDraft, sLayer, bRemoveOtherLayerChanges, bCondenseAnyLayer) {
|
|
470
471
|
var sParentVersion;
|
|
471
472
|
var aDraftFilenames;
|
|
472
473
|
if (bDraft) {
|
|
@@ -478,7 +479,7 @@ sap.ui.define([
|
|
|
478
479
|
aDraftFilenames = oVersionModel.getProperty("/draftFilenames");
|
|
479
480
|
}
|
|
480
481
|
return this._removeOtherLayerChanges(oAppComponent, sLayer, bRemoveOtherLayerChanges)
|
|
481
|
-
.then(this._oChangePersistence.saveDirtyChanges.bind(this._oChangePersistence, oAppComponent, bSkipUpdateCache, undefined, sParentVersion, aDraftFilenames))
|
|
482
|
+
.then(this._oChangePersistence.saveDirtyChanges.bind(this._oChangePersistence, oAppComponent, bSkipUpdateCache, undefined, sParentVersion, aDraftFilenames, bCondenseAnyLayer, sLayer))
|
|
482
483
|
.then(function(oResult) {
|
|
483
484
|
if (bDraft && oResult && oResult.response) {
|
|
484
485
|
var vChangeDefinition = oResult.response;
|
package/src/sap/ui/fl/Utils.js
CHANGED
|
@@ -17,7 +17,8 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/core/Component",
|
|
18
18
|
"sap/ui/fl/Scenario",
|
|
19
19
|
"sap/ui/thirdparty/hasher",
|
|
20
|
-
"sap/ui/core/mvc/View"
|
|
20
|
+
"sap/ui/core/mvc/View",
|
|
21
|
+
"sap/ui/core/Configuration"
|
|
21
22
|
], function(
|
|
22
23
|
formatMessage,
|
|
23
24
|
ObjectPath,
|
|
@@ -31,7 +32,8 @@ sap.ui.define([
|
|
|
31
32
|
Component,
|
|
32
33
|
Scenario,
|
|
33
34
|
hasher,
|
|
34
|
-
View
|
|
35
|
+
View,
|
|
36
|
+
Configuration
|
|
35
37
|
) {
|
|
36
38
|
"use strict";
|
|
37
39
|
|
|
@@ -41,7 +43,7 @@ sap.ui.define([
|
|
|
41
43
|
* @namespace
|
|
42
44
|
* @alias sap.ui.fl.Utils
|
|
43
45
|
* @author SAP SE
|
|
44
|
-
* @version 1.
|
|
46
|
+
* @version 1.107.0
|
|
45
47
|
*
|
|
46
48
|
* @private
|
|
47
49
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
@@ -412,7 +414,7 @@ sap.ui.define([
|
|
|
412
414
|
},
|
|
413
415
|
|
|
414
416
|
getLrepUrl: function() {
|
|
415
|
-
var aFlexibilityServices =
|
|
417
|
+
var aFlexibilityServices = Configuration.getFlexibilityServices();
|
|
416
418
|
var oLrepConfiguration = aFlexibilityServices.find(function(oServiceConfig) {
|
|
417
419
|
return oServiceConfig.connector === "LrepConnector";
|
|
418
420
|
});
|
|
@@ -429,7 +431,7 @@ sap.ui.define([
|
|
|
429
431
|
* @ui5-restricted sap.ui.fl
|
|
430
432
|
*/
|
|
431
433
|
getCurrentLanguage: function() {
|
|
432
|
-
var sLanguage =
|
|
434
|
+
var sLanguage = Configuration.getLanguage();
|
|
433
435
|
return Utils.convertBrowserLanguageToISO639_1(sLanguage);
|
|
434
436
|
},
|
|
435
437
|
|
|
@@ -31,17 +31,26 @@ sap.ui.define([
|
|
|
31
31
|
return Promise.reject(Error("No selector in change found or no selector ID."));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
function checkFailedSelectors(oSelector) {
|
|
35
|
+
if (FlUtils.indexOfObject(mPropertyBag.failedSelectors, oSelector) > -1) {
|
|
36
|
+
throw Error("A change depending on that control already failed, so the current change is skipped");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
34
40
|
return mPropertyBag.modifier.bySelectorTypeIndependent(oSelector, mPropertyBag.appComponent, mPropertyBag.view)
|
|
35
41
|
.then(function (oControl) {
|
|
36
42
|
if (!oControl) {
|
|
37
43
|
throw Error("A flexibility change tries to change a nonexistent control.");
|
|
38
44
|
}
|
|
45
|
+
checkFailedSelectors(oSelector);
|
|
46
|
+
|
|
39
47
|
var aDependentControlSelectorList = oChange.getDependentControlSelectorList();
|
|
40
|
-
aDependentControlSelectorList.forEach(function(
|
|
41
|
-
var oDependentControl = mPropertyBag.modifier.bySelector(
|
|
48
|
+
aDependentControlSelectorList.forEach(function(oDependentControlSelector) {
|
|
49
|
+
var oDependentControl = mPropertyBag.modifier.bySelector(oDependentControlSelector, mPropertyBag.appComponent, mPropertyBag.view);
|
|
42
50
|
if (!oDependentControl) {
|
|
43
51
|
throw new Error("A dependent selector control of the flexibility change is not available.");
|
|
44
52
|
}
|
|
53
|
+
checkFailedSelectors(oDependentControlSelector);
|
|
45
54
|
});
|
|
46
55
|
return oControl;
|
|
47
56
|
});
|
|
@@ -424,6 +433,7 @@ sap.ui.define([
|
|
|
424
433
|
}
|
|
425
434
|
|
|
426
435
|
var aOnAfterXMLChangeProcessingHandlers = [];
|
|
436
|
+
mPropertyBag.failedSelectors = [];
|
|
427
437
|
|
|
428
438
|
return aChanges.reduce(function(oPreviousPromise, oChange) {
|
|
429
439
|
var oControl;
|
|
@@ -458,10 +468,17 @@ sap.ui.define([
|
|
|
458
468
|
}
|
|
459
469
|
})
|
|
460
470
|
.catch(function(oError) {
|
|
471
|
+
oChange.getDependentSelectorList().forEach(function(oDependentControlSelector) {
|
|
472
|
+
if (FlUtils.indexOfObject(mPropertyBag.failedSelectors, oDependentControlSelector) === -1) {
|
|
473
|
+
mPropertyBag.failedSelectors.push(oDependentControlSelector);
|
|
474
|
+
}
|
|
475
|
+
});
|
|
461
476
|
_logApplyChangeError(oError, oChange);
|
|
462
477
|
});
|
|
463
478
|
}, new FlUtils.FakePromise())
|
|
464
479
|
.then(function() {
|
|
480
|
+
delete mPropertyBag.failedSelectors;
|
|
481
|
+
|
|
465
482
|
// Once all changes for a control are processed, call the
|
|
466
483
|
// onAfterXMLChangeProcessing hooks of all involved change handlers
|
|
467
484
|
aOnAfterXMLChangeProcessingHandlers.forEach(function (mHandler) {
|
|
@@ -139,7 +139,7 @@ sap.ui.define([
|
|
|
139
139
|
* @namespace sap.ui.fl.apply._internal.changes.descriptor.app.AddAnnotationsToOData
|
|
140
140
|
* @experimental
|
|
141
141
|
* @since 1.87
|
|
142
|
-
* @version 1.
|
|
142
|
+
* @version 1.107.0
|
|
143
143
|
* @private
|
|
144
144
|
* @ui5-restricted sap.ui.fl.apply._internal
|
|
145
145
|
*/
|