@openui5/sap.ui.fl 1.138.0 → 1.140.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/README.md +1 -1
- package/REUSE.toml +8 -1
- package/THIRDPARTY.txt +72 -66
- package/package.json +4 -4
- package/src/sap/ui/fl/.library +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/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 +6 -6
- 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/controlVariants/URLHandler.js +25 -24
- package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +2 -2
- 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 +13 -10
- 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 +2 -2
- 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/VariantChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/VariantManagementChange.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexObjects/getVariantAuthor.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/DataSelector.js +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/FlexObjectState.js +12 -26
- package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +58 -114
- 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 +3 -3
- package/src/sap/ui/fl/apply/_internal/flexState/changes/UIChangesState.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/communication/FLPAboutInfo.js +2 -2
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState.js +290 -10
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/applyChangesOnVariant.js +61 -0
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
- package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +22 -9
- package/src/sap/ui/fl/apply/_internal/preprocessors/ComponentLifecycleHooks.js +5 -4
- package/src/sap/ui/fl/apply/_internal/preprocessors/ControllerExtension.js +2 -2
- package/src/sap/ui/fl/apply/_internal/preprocessors/RegistrationDelegator.js +3 -3
- package/src/sap/ui/fl/apply/_internal/preprocessors/XmlPreprocessor.js +2 -2
- package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
- package/src/sap/ui/fl/apply/api/FlexRuntimeInfoAPI.js +4 -4
- package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +43 -44
- package/src/sap/ui/fl/apply/api/UI2PersonalizationApplyAPI.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 +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 +1 -1
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChange.js +3 -3
- package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +3 -3
- 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/{apply/_internal/flexState → initial/_internal}/Loader.js +12 -10
- package/src/sap/ui/fl/{apply/_internal/flexState → initial/_internal}/ManifestUtils.js +1 -1
- package/src/sap/ui/fl/initial/_internal/Settings.js +13 -1
- package/src/sap/ui/fl/initial/_internal/Storage.js +3 -2
- package/src/sap/ui/fl/initial/_internal/StorageFeaturesMerger.js +1 -1
- package/src/sap/ui/fl/initial/_internal/StorageUtils.js +9 -7
- 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_vi.properties +1 -1
- package/src/sap/ui/fl/support/_internal/extractChangeDependencies.js +6 -2
- package/src/sap/ui/fl/support/_internal/getAllUIChanges.js +2 -2
- package/src/sap/ui/fl/support/_internal/getChangeDependencies.js +2 -2
- package/src/sap/ui/fl/support/_internal/getFlexObjectInfos.js +2 -2
- 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 +15 -5
- package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
- package/src/sap/ui/fl/variants/VariantManagement.js +39 -2
- package/src/sap/ui/fl/variants/VariantManager.js +9 -9
- package/src/sap/ui/fl/variants/VariantModel.js +59 -44
- package/src/sap/ui/fl/write/_internal/SaveAs.js +1 -1
- package/src/sap/ui/fl/write/_internal/Storage.js +14 -1
- package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +10 -1
- package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +6 -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 +4 -2
- package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/BtpServiceConnector.js +27 -2
- package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
- package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +4 -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/controlVariants/ControlVariantWriteUtils.js +2 -2
- 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 +15 -54
- 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 → CompVariantManager.js} +186 -302
- package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +2 -2
- package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
- package/src/sap/ui/fl/write/api/AppVariantWriteAPI.js +2 -1
- package/src/sap/ui/fl/write/api/BusinessNetworkAPI.js +92 -6
- package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +39 -17
- package/src/sap/ui/fl/write/api/ContextBasedAdaptationsAPI.js +17 -20
- package/src/sap/ui/fl/write/api/ContextSharingAPI.js +1 -1
- package/src/sap/ui/fl/write/api/FieldExtensibility.js +1 -1
- package/src/sap/ui/fl/write/api/LocalResetAPI.js +1 -1
- package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +25 -23
- package/src/sap/ui/fl/write/api/ReloadInfoAPI.js +5 -5
- package/src/sap/ui/fl/write/api/SACIntegrationUpdateVariant.js +6 -6
- package/src/sap/ui/fl/write/api/SmartBusinessWriteAPI.js +1 -1
- package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +25 -22
- package/src/sap/ui/fl/write/api/TranslationAPI.js +1 -1
- package/src/sap/ui/fl/write/api/UI2PersonalizationWriteAPI.js +2 -2
- package/src/sap/ui/fl/write/api/VersionsAPI.js +2 -2
- package/src/sap/ui/fl/write/api/connectors/FileListBaseConnector.js +1 -1
- package/src/sap/ui/fl/write/api/connectors/ObjectStorageConnector.js +2 -1
- package/src/sap/ui/fl/write/connectors/BaseConnector.js +13 -0
- package/ui5.yaml +0 -1
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +0 -233
- package/src/sap/ui/fl/apply/_internal/flexState/compVariants/prepareCompVariantsMap.js +0 -118
- package/src/sap/ui/fl/util/resolveBinding.js +0 -79
|
@@ -26,7 +26,7 @@ sap.ui.define([
|
|
|
26
26
|
* @private
|
|
27
27
|
* @alias sap.ui.fl.write._internal.transport.TransportSelection
|
|
28
28
|
* @author SAP SE
|
|
29
|
-
* @version 1.
|
|
29
|
+
* @version 1.140.0
|
|
30
30
|
* @since 1.74.0
|
|
31
31
|
* Helper object to select an ABAP transport for an LREP object. This is not a generic utility to select a transport request, but part
|
|
32
32
|
* of the SmartVariant control.
|
|
@@ -368,7 +368,7 @@ sap.ui.define([
|
|
|
368
368
|
* @param {Array} aAllLocalChanges - Array that includes all local changes
|
|
369
369
|
* @param {Array} [aAppVariantDescriptors] - Array that includes all app variant descriptors
|
|
370
370
|
* @param {object} oContentParameters - Object containing parameters added into the publish request
|
|
371
|
-
* @param {string} oContentParameters.reference -
|
|
371
|
+
* @param {string} oContentParameters.reference - Flexibility reference of the app
|
|
372
372
|
* @param {string} oContentParameters.layer - Layer in which the changes are stored
|
|
373
373
|
* @returns {Promise} Promise which resolves without parameters
|
|
374
374
|
*/
|
|
@@ -27,7 +27,7 @@ sap.ui.define([
|
|
|
27
27
|
* Entity that handles ABAP transport related information.
|
|
28
28
|
* @alias sap.ui.fl.write._internal.transport.Transports
|
|
29
29
|
* @author SAP SE
|
|
30
|
-
* @version 1.
|
|
30
|
+
* @version 1.140.0
|
|
31
31
|
* @since 1.74.0
|
|
32
32
|
* @private
|
|
33
33
|
* @ui5-restricted sap.ui.fl.write._internal.transport
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/
|
|
8
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
9
9
|
"sap/ui/fl/write/_internal/SaveAs",
|
|
10
10
|
"sap/ui/fl/write/_internal/connectors/LrepConnector",
|
|
11
11
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
@@ -46,6 +46,7 @@ sap.ui.define([
|
|
|
46
46
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
47
47
|
* @param {sap.ui.fl.Selector} mPropertyBag.selector - Selector
|
|
48
48
|
* @param {string} mPropertyBag.id - App variant ID
|
|
49
|
+
* @param {object} [mPropertyBag.oParsedHash] - Parsed Hash containing semantic object, action and parameters for inbound
|
|
49
50
|
* @param {sap.ui.fl.Layer} mPropertyBag.layer - Current working layer
|
|
50
51
|
* @returns {Promise} Promise that resolves with the app variant save response
|
|
51
52
|
*
|
|
@@ -8,18 +8,24 @@ sap.ui.define([
|
|
|
8
8
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
9
9
|
"sap/ui/fl/apply/_internal/controlVariants/Utils",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
11
|
-
"sap/ui/fl/apply/_internal/
|
|
11
|
+
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
12
|
+
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
13
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
12
14
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
13
15
|
"sap/ui/fl/write/_internal/Storage",
|
|
16
|
+
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
14
17
|
"sap/ui/fl/Layer",
|
|
15
18
|
"sap/ui/fl/Utils"
|
|
16
19
|
], (
|
|
17
20
|
JsControlTreeModifier,
|
|
18
21
|
ControlVariantsUtils,
|
|
19
22
|
FlexObjectFactory,
|
|
23
|
+
States,
|
|
24
|
+
FlexInfoSession,
|
|
20
25
|
ManifestUtils,
|
|
21
26
|
FlexObjectManager,
|
|
22
27
|
Storage,
|
|
28
|
+
ChangesWriteAPI,
|
|
23
29
|
Layer,
|
|
24
30
|
Utils
|
|
25
31
|
) => {
|
|
@@ -31,7 +37,7 @@ sap.ui.define([
|
|
|
31
37
|
* @namespace
|
|
32
38
|
* @alias module:sap/ui/fl/write/api/BusinessNetworkAPI
|
|
33
39
|
* @since 1.135
|
|
34
|
-
* @version 1.
|
|
40
|
+
* @version 1.140.0
|
|
35
41
|
* @private
|
|
36
42
|
* @ui5-restricted SAP Business Network
|
|
37
43
|
*/
|
|
@@ -45,7 +51,7 @@ sap.ui.define([
|
|
|
45
51
|
* @param {string} mPropertyBag.variantManagementReference - Reference to the variant management control
|
|
46
52
|
* @param {string} mPropertyBag.variantName - Name of the new variant
|
|
47
53
|
* @param {string} mPropertyBag.reference - Flex reference of the app the variant belongs to
|
|
48
|
-
* @param {string} [mPropertyBag.id] -
|
|
54
|
+
* @param {string} [mPropertyBag.id] - ID of the new variant
|
|
49
55
|
* @param {string} [mPropertyBag.variantReference] - Reference to the variant the new one should be based on
|
|
50
56
|
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="CUSTOMER"] - Layer of the new variant
|
|
51
57
|
* @param {string} [mPropertyBag.generator="BusinessNetworkAPI.createVariant"] - Generator of the new variant
|
|
@@ -81,7 +87,7 @@ sap.ui.define([
|
|
|
81
87
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
82
88
|
* @param {sap.ui.fl.variants.VariantManagement} mPropertyBag.control - Variant Management control instance
|
|
83
89
|
* @param {string} mPropertyBag.variantName - Name of the new variant
|
|
84
|
-
* @param {string} [mPropertyBag.id] -
|
|
90
|
+
* @param {string} [mPropertyBag.id] - ID of the new variant
|
|
85
91
|
* @param {string} [mPropertyBag.variantReference] - Reference to the variant the new one should be based on.
|
|
86
92
|
* If non is given, the new variant will be based on the standard variant
|
|
87
93
|
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="USER"] - Layer of the new variant
|
|
@@ -122,7 +128,7 @@ sap.ui.define([
|
|
|
122
128
|
* Saves all the changes.
|
|
123
129
|
*
|
|
124
130
|
* @param {sap.ui.core.Element} oControl - Control instance
|
|
125
|
-
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>}
|
|
131
|
+
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>} Resolves with all saved Flex Objects
|
|
126
132
|
* @private
|
|
127
133
|
* @ui5-restricted SAP Business Network
|
|
128
134
|
*/
|
|
@@ -133,5 +139,85 @@ sap.ui.define([
|
|
|
133
139
|
});
|
|
134
140
|
};
|
|
135
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Set the max layer to CUSTOMER to disable personalization.
|
|
144
|
+
*
|
|
145
|
+
* @param {string} sReference - Flex reference of the app
|
|
146
|
+
* @throws {Error} If the provided reference is invalid
|
|
147
|
+
* @private
|
|
148
|
+
* @ui5-restricted SAP Business Network
|
|
149
|
+
*/
|
|
150
|
+
BusinessNetworkAPI.disablePersonalization = function(sReference) {
|
|
151
|
+
const oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
152
|
+
if (!oFlexInfoSession || Object.keys(oFlexInfoSession).length === 0) {
|
|
153
|
+
throw new Error(`Invalid reference provided: ${sReference}`);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
oFlexInfoSession.maxLayer = Layer.CUSTOMER;
|
|
157
|
+
// The flag can't be cleared here because the app is started in a different flow. But not clearing the flag will only have an effect
|
|
158
|
+
// if the user would start the app again in that session, which is not a supported scenario.
|
|
159
|
+
oFlexInfoSession.saveChangeKeepSession = true;
|
|
160
|
+
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
161
|
+
window.sessionStorage.setItem("sap.ui.rta.skipReload", true);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Deletes a list of control variants and their associated changes, and saves.
|
|
166
|
+
* This API method does not need a running application.
|
|
167
|
+
*
|
|
168
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
169
|
+
* @param {string} mPropertyBag.reference - Flex reference of the app the variant belongs to
|
|
170
|
+
* @param {string[]} mPropertyBag.variants - Variant IDs to be deleted
|
|
171
|
+
* @param {sap.ui.fl.Layer} [mPropertyBag.layer="CUSTOMER"] - Layer of the variants to be deleted
|
|
172
|
+
* @returns {Promise<sap.ui.fl.apply._internal.flexObjects.FlexObject[]>} Resolves with an array of Flex Objects that were deleted
|
|
173
|
+
* @private
|
|
174
|
+
* @ui5-restricted SAP Business Network
|
|
175
|
+
*/
|
|
176
|
+
BusinessNetworkAPI.deleteVariants = async function(mPropertyBag) {
|
|
177
|
+
const sLayer = mPropertyBag.layer || Layer.CUSTOMER;
|
|
178
|
+
const sNamespaceSubfolder = "variants";
|
|
179
|
+
const aDeletedVariants = mPropertyBag.variants
|
|
180
|
+
.map((sVariantId) => {
|
|
181
|
+
return {
|
|
182
|
+
fileName: sVariantId,
|
|
183
|
+
fileType: "ctrl_variant",
|
|
184
|
+
layer: sLayer,
|
|
185
|
+
reference: mPropertyBag.reference,
|
|
186
|
+
namespace: `apps/${mPropertyBag.reference}/${sNamespaceSubfolder}/`
|
|
187
|
+
};
|
|
188
|
+
})
|
|
189
|
+
.map((mChangeProperties) => FlexObjectFactory.createFromFileContent(mChangeProperties));
|
|
190
|
+
aDeletedVariants.forEach((oVariant) => {
|
|
191
|
+
oVariant.condenserState = "delete";
|
|
192
|
+
oVariant.setState(States.LifecycleState.DELETED);
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
await Storage.condense({
|
|
196
|
+
layer: sLayer,
|
|
197
|
+
reference: mPropertyBag.reference,
|
|
198
|
+
allChanges: aDeletedVariants,
|
|
199
|
+
condensedChanges: aDeletedVariants
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Deletes all USER layer variants for a given variant management.
|
|
205
|
+
* This API method does not need a running application.
|
|
206
|
+
*
|
|
207
|
+
* @param {object} mPropertyBag - Object with parameters as properties
|
|
208
|
+
* @param {string} mPropertyBag.reference - Flex reference of the app
|
|
209
|
+
* @param {string} mPropertyBag.variantManagementReference - Reference of the variant management control
|
|
210
|
+
* @returns {Promise<undefined>} Resolves when all variants are deleted
|
|
211
|
+
* @private
|
|
212
|
+
* @ui5-restricted SAP Business Network
|
|
213
|
+
*/
|
|
214
|
+
BusinessNetworkAPI.resetPersonalizationVariants = function(mPropertyBag) {
|
|
215
|
+
return Storage.deleteUserVariantsForVM({
|
|
216
|
+
flexReference: mPropertyBag.reference,
|
|
217
|
+
variantManagementReferences: [mPropertyBag.variantManagementReference],
|
|
218
|
+
layer: Layer.USER
|
|
219
|
+
});
|
|
220
|
+
};
|
|
221
|
+
|
|
136
222
|
return BusinessNetworkAPI;
|
|
137
|
-
});
|
|
223
|
+
});
|
|
@@ -17,15 +17,18 @@ sap.ui.define([
|
|
|
17
17
|
"sap/ui/fl/apply/_internal/changes/Utils",
|
|
18
18
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
19
19
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
20
|
+
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
20
21
|
"sap/ui/fl/apply/_internal/flexState/FlexObjectState",
|
|
21
|
-
"sap/ui/fl/
|
|
22
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
22
23
|
"sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory",
|
|
23
24
|
"sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage",
|
|
24
25
|
"sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory",
|
|
25
26
|
"sap/ui/fl/write/_internal/controlVariants/ControlVariantWriteUtils",
|
|
26
27
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
27
28
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
29
|
+
"sap/ui/fl/write/api/FeaturesAPI",
|
|
28
30
|
"sap/ui/fl/write/api/VersionsAPI",
|
|
31
|
+
"sap/ui/fl/Layer",
|
|
29
32
|
"sap/ui/fl/Utils"
|
|
30
33
|
], function(
|
|
31
34
|
_omit,
|
|
@@ -40,6 +43,7 @@ sap.ui.define([
|
|
|
40
43
|
ChangesUtils,
|
|
41
44
|
FlexObjectFactory,
|
|
42
45
|
States,
|
|
46
|
+
VariantManagementState,
|
|
43
47
|
FlexObjectState,
|
|
44
48
|
ManifestUtils,
|
|
45
49
|
DescriptorChangeFactory,
|
|
@@ -48,7 +52,9 @@ sap.ui.define([
|
|
|
48
52
|
ControlVariantWriteUtils,
|
|
49
53
|
FlexObjectManager,
|
|
50
54
|
ContextBasedAdaptationsAPI,
|
|
55
|
+
FeaturesAPI,
|
|
51
56
|
VersionsAPI,
|
|
57
|
+
Layer,
|
|
52
58
|
Utils
|
|
53
59
|
) {
|
|
54
60
|
"use strict";
|
|
@@ -347,14 +353,17 @@ sap.ui.define([
|
|
|
347
353
|
};
|
|
348
354
|
|
|
349
355
|
/**
|
|
350
|
-
* Deletes the variants and their related FlexObjects.
|
|
351
|
-
* as they have no dependencies on them.
|
|
356
|
+
* Deletes the variants and their related FlexObjects. By default, only variants that are in the draft
|
|
357
|
+
* or dirty state can be deleted, as they have no dependencies on them.
|
|
358
|
+
* The Business Network scenario can delete any variants (forceDelete=true).
|
|
359
|
+
* Returns all FlexObjects that were deleted in the process.
|
|
352
360
|
*
|
|
353
361
|
* @param {object} mPropertyBag - Object with parameters as properties
|
|
354
362
|
* @param {sap.ui.core.Control} mPropertyBag.variantManagementControl - Variant management control
|
|
355
363
|
* @param {string[]} mPropertyBag.variants - Variant IDs to be deleted
|
|
356
|
-
* @param {string} mPropertyBag.layer - Layer
|
|
357
|
-
* @
|
|
364
|
+
* @param {string} mPropertyBag.layer - Layer that the variants belong to
|
|
365
|
+
* @param {boolean} [mPropertyBag.forceDelete=false] - If set to true, the deletion will not check for draft or dirty state of the variants
|
|
366
|
+
* @returns {sap.ui.fl.apply._internal.flexObjects.FlexObject[]} Array of deleted Flex Objects
|
|
358
367
|
* @private
|
|
359
368
|
* @ui5-restricted sap.ui.fl, sap.ui.rta, similar tools
|
|
360
369
|
*/
|
|
@@ -366,20 +375,33 @@ sap.ui.define([
|
|
|
366
375
|
const oAppComponent = Utils.getAppComponentForControl(oVariantManagementControl);
|
|
367
376
|
const sVariantManagementReference = JsControlTreeModifier.getSelector(oVariantManagementControl, oAppComponent).id;
|
|
368
377
|
const sFlexReference = ManifestUtils.getFlexReferenceForControl(oAppComponent);
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
378
|
+
// Filter out passed variants from other layers
|
|
379
|
+
let aVariantsToBeDeleted = mPropertyBag.variants.filter((sVariantId) => {
|
|
380
|
+
const oVariant = VariantManagementState.getVariant({
|
|
381
|
+
vmReference: sVariantManagementReference,
|
|
382
|
+
reference: sFlexReference,
|
|
383
|
+
vReference: sVariantId
|
|
384
|
+
});
|
|
385
|
+
if (!oVariant) {
|
|
386
|
+
Log.warning(`Variant with ID '${sVariantId}' does not exist in the Variant Management control.`);
|
|
387
|
+
return false;
|
|
388
|
+
}
|
|
389
|
+
return oVariant.layer === mPropertyBag.layer;
|
|
372
390
|
});
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
391
|
+
if (!mPropertyBag.forceDelete) {
|
|
392
|
+
const aDraftFilenames = VersionsAPI.getDraftFilenames({
|
|
393
|
+
control: oVariantManagementControl,
|
|
394
|
+
layer: mPropertyBag.layer
|
|
395
|
+
});
|
|
396
|
+
const aDirtyFlexObjectIds = FlexObjectState.getDirtyFlexObjects(sFlexReference).map((oFlexObject) => (
|
|
397
|
+
oFlexObject.getId()
|
|
398
|
+
));
|
|
399
|
+
aVariantsToBeDeleted = aVariantsToBeDeleted.filter((sVariantID) => (
|
|
400
|
+
aDraftFilenames.includes(sVariantID) || aDirtyFlexObjectIds.includes(sVariantID)
|
|
401
|
+
));
|
|
402
|
+
}
|
|
379
403
|
return aVariantsToBeDeleted
|
|
380
|
-
.map((sVariantId) => (
|
|
381
|
-
ControlVariantWriteUtils.deleteVariant(sFlexReference, sVariantManagementReference, sVariantId)
|
|
382
|
-
))
|
|
404
|
+
.map((sVariantId) => (ControlVariantWriteUtils.deleteVariant(sFlexReference, sVariantManagementReference, sVariantId)))
|
|
383
405
|
.flat();
|
|
384
406
|
};
|
|
385
407
|
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/Lib",
|
|
9
9
|
"sap/ui/fl/apply/_internal/flexObjects/FlexObjectFactory",
|
|
10
|
-
"sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
|
|
11
10
|
"sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState",
|
|
12
|
-
"sap/ui/fl/
|
|
11
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
13
12
|
"sap/ui/fl/apply/api/ControlVariantApplyAPI",
|
|
14
13
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
15
|
-
"sap/ui/fl/
|
|
14
|
+
"sap/ui/fl/apply/_internal/flexState/compVariants/applyChangesOnVariant",
|
|
15
|
+
"sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantManagementState",
|
|
16
|
+
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager",
|
|
16
17
|
"sap/ui/fl/write/_internal/flexState/FlexObjectManager",
|
|
17
18
|
"sap/ui/fl/write/_internal/Storage",
|
|
18
19
|
"sap/ui/fl/write/_internal/Versions",
|
|
@@ -25,12 +26,13 @@ sap.ui.define([
|
|
|
25
26
|
], function(
|
|
26
27
|
Lib,
|
|
27
28
|
FlexObjectFactory,
|
|
28
|
-
CompVariantMerger,
|
|
29
29
|
VariantManagementState,
|
|
30
30
|
ManifestUtils,
|
|
31
31
|
ControlVariantApplyAPI,
|
|
32
32
|
FlexInfoSession,
|
|
33
|
-
|
|
33
|
+
applyChangesOnVariant,
|
|
34
|
+
CompVariantManagementState,
|
|
35
|
+
CompVariantManager,
|
|
34
36
|
FlexObjectManager,
|
|
35
37
|
Storage,
|
|
36
38
|
Versions,
|
|
@@ -122,8 +124,7 @@ sap.ui.define([
|
|
|
122
124
|
return FeaturesAPI.isContextBasedAdaptationAvailable(sLayer)
|
|
123
125
|
.then(function(bContextBasedAdaptationsEnabledResponse) {
|
|
124
126
|
bContextBasedAdaptationsEnabled = bContextBasedAdaptationsEnabledResponse;
|
|
125
|
-
|
|
126
|
-
return oAdaptationsPromise;
|
|
127
|
+
return bContextBasedAdaptationsEnabled ? ContextBasedAdaptationsAPI.load(mPropertyBag) : Promise.resolve({adaptations: []});
|
|
127
128
|
})
|
|
128
129
|
.then(function(oAdaptations) {
|
|
129
130
|
// Determine displayed adaptation
|
|
@@ -411,9 +412,8 @@ sap.ui.define([
|
|
|
411
412
|
|
|
412
413
|
// Clone it, to avoid that we modify the original and that modifying the original affects the state
|
|
413
414
|
var oClone = oVariant.clone();
|
|
414
|
-
|
|
415
|
+
applyChangesOnVariant(oClone, aVariantChanges);
|
|
415
416
|
// Avoid garbage
|
|
416
|
-
oClone.removeAllChanges();
|
|
417
417
|
oClone.destroy();
|
|
418
418
|
return oClone.mProperties;
|
|
419
419
|
}
|
|
@@ -476,7 +476,7 @@ sap.ui.define([
|
|
|
476
476
|
function createChangeSetVisibleFalseToRestrictedVariant(oVariant, mPropertyBag, contextBasedAdaptationId, VariantManager) {
|
|
477
477
|
if (oVariant.isA("sap.ui.fl.apply._internal.flexObjects.CompVariant")) {
|
|
478
478
|
var sPersistencyKey = oVariant.getPersistencyKey();
|
|
479
|
-
oVariant =
|
|
479
|
+
oVariant = CompVariantManager.updateVariant({
|
|
480
480
|
reference: mPropertyBag.appId,
|
|
481
481
|
persistencyKey: sPersistencyKey,
|
|
482
482
|
id: oVariant.getId(),
|
|
@@ -485,7 +485,7 @@ sap.ui.define([
|
|
|
485
485
|
adaptationId: contextBasedAdaptationId,
|
|
486
486
|
forceCreate: true
|
|
487
487
|
});
|
|
488
|
-
return
|
|
488
|
+
return CompVariantManagementState.getVariantChanges(oVariant).reverse()[0].convertToFileContent();
|
|
489
489
|
}
|
|
490
490
|
// Fl variant
|
|
491
491
|
var oAppComponent = FlexUtils.getAppComponentForControl(mPropertyBag.control);
|
|
@@ -504,10 +504,10 @@ sap.ui.define([
|
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
function getObjectsByLayerAndType(aFlexObjects, sChangesLayer, bVariants) {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
507
|
+
return aFlexObjects.filter((oFlexObject) =>
|
|
508
|
+
bVariants === oFlexObject.isA("sap.ui.fl.apply._internal.flexObjects.Variant")
|
|
509
|
+
&& oFlexObject.getLayer() === sChangesLayer
|
|
510
|
+
);
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
function getVariantReference(oChange) {
|
|
@@ -528,15 +528,12 @@ sap.ui.define([
|
|
|
528
528
|
}
|
|
529
529
|
|
|
530
530
|
function isSetContextChange(oChange) {
|
|
531
|
-
|
|
532
|
-
return true;
|
|
533
|
-
}
|
|
534
|
-
return false;
|
|
531
|
+
return oChange.getFileType() === "ctrl_variant_change" && oChange.getChangeType() === "setContexts";
|
|
535
532
|
}
|
|
536
533
|
|
|
537
534
|
/**
|
|
538
535
|
* Filter all changes that are relevant to be copied for an adaptation during migration.
|
|
539
|
-
* All non
|
|
536
|
+
* All non-variant changes are taken over. Variant dependent changes are filtered depending on the variant
|
|
540
537
|
* Changes for variants that will not be taken over into this adaptation will be removed
|
|
541
538
|
* Also removes setContext changes for FLVariants
|
|
542
539
|
* @param {array<string>} aIgnoredVariantIds - IDs of variants that are out of scope
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/core/Component",
|
|
9
9
|
"sap/ui/core/ComponentContainer",
|
|
10
|
-
"sap/ui/fl/
|
|
10
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
11
11
|
"sap/ui/fl/initial/_internal/Settings",
|
|
12
12
|
"sap/ui/fl/write/api/ContextBasedAdaptationsAPI",
|
|
13
13
|
"sap/ui/fl/Layer"
|
|
@@ -9,7 +9,7 @@ sap.ui.define([
|
|
|
9
9
|
"sap/ui/core/util/reflection/JsControlTreeModifier",
|
|
10
10
|
"sap/ui/fl/apply/_internal/flexObjects/States",
|
|
11
11
|
"sap/ui/fl/apply/_internal/flexState/changes/UIChangesState",
|
|
12
|
-
"sap/ui/fl/
|
|
12
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
13
13
|
"sap/ui/fl/write/_internal/flexState/changes/UIChangeManager",
|
|
14
14
|
"sap/ui/fl/write/api/ChangesWriteAPI",
|
|
15
15
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
@@ -12,9 +12,9 @@ sap.ui.define([
|
|
|
12
12
|
"sap/ui/fl/apply/_internal/changes/FlexCustomData",
|
|
13
13
|
"sap/ui/fl/apply/_internal/flexObjects/UIChange",
|
|
14
14
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
15
|
-
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
16
15
|
"sap/ui/fl/apply/api/FlexRuntimeInfoAPI",
|
|
17
16
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
17
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
18
18
|
"sap/ui/fl/initial/_internal/Settings",
|
|
19
19
|
"sap/ui/fl/write/_internal/condenser/Condenser",
|
|
20
20
|
"sap/ui/fl/write/_internal/flexState/changes/UIChangeManager",
|
|
@@ -32,9 +32,9 @@ sap.ui.define([
|
|
|
32
32
|
FlexCustomData,
|
|
33
33
|
UIChange,
|
|
34
34
|
FlexState,
|
|
35
|
-
ManifestUtils,
|
|
36
35
|
FlexRuntimeInfoAPI,
|
|
37
36
|
FlexInfoSession,
|
|
37
|
+
ManifestUtils,
|
|
38
38
|
Settings,
|
|
39
39
|
Condenser,
|
|
40
40
|
UIChangeManager,
|
|
@@ -111,23 +111,19 @@ sap.ui.define([
|
|
|
111
111
|
* @private
|
|
112
112
|
* @ui5-restricted
|
|
113
113
|
*/
|
|
114
|
-
PersistenceWriteAPI.hasHigherLayerChanges = function(mPropertyBag) {
|
|
114
|
+
PersistenceWriteAPI.hasHigherLayerChanges = async function(mPropertyBag) {
|
|
115
115
|
mPropertyBag.upToLayer ||= LayerUtils.getCurrentLayer();
|
|
116
116
|
|
|
117
|
-
|
|
118
|
-
.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
// Hidden control variants and their related changes might be necessary for referenced variants, but are not relevant for this check
|
|
128
|
-
// Same apply for changes of deleted comp variants
|
|
129
|
-
return FlexObjectManager.filterHiddenFlexObjects(aFilteredFlexObjects, mPropertyBag.reference).length > 0;
|
|
130
|
-
});
|
|
117
|
+
const aFlexObjects = await FlexObjectManager.getFlexObjects(mPropertyBag);
|
|
118
|
+
const aFilteredFlexObjects = aFlexObjects.filter(
|
|
119
|
+
(oFlexObject) => LayerUtils.isOverLayer(oFlexObject.getLayer(), mPropertyBag.upToLayer)
|
|
120
|
+
);
|
|
121
|
+
if (aFilteredFlexObjects.length === 0) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
// Hidden control variants and their related changes might be necessary for referenced variants, but are not relevant for this check
|
|
125
|
+
// Same apply for changes of deleted comp variants
|
|
126
|
+
return FlexObjectManager.filterHiddenFlexObjects(aFilteredFlexObjects, mPropertyBag.reference).length > 0;
|
|
131
127
|
};
|
|
132
128
|
|
|
133
129
|
/**
|
|
@@ -148,16 +144,19 @@ sap.ui.define([
|
|
|
148
144
|
// when save or activate a version in rta no reload is triggered but flex/data request is send
|
|
149
145
|
// and will delete version and maxLayer without saveChangeKeepSession
|
|
150
146
|
// after the request saveChangeKeepSession needs to be delete again
|
|
151
|
-
const sReference = ManifestUtils.
|
|
147
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(mPropertyBag.selector);
|
|
152
148
|
let oFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
153
149
|
oFlexInfoSession.saveChangeKeepSession = true;
|
|
154
150
|
FlexInfoSession.setByReference(oFlexInfoSession, sReference);
|
|
155
151
|
await FlexObjectManager.saveFlexObjects(mPropertyBag);
|
|
156
152
|
|
|
157
153
|
// This is needed as long the save requests does not return the necessary information to update the FlexState without a new request
|
|
158
|
-
const aFlexObjects = await FlexObjectManager.getFlexObjects(
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
const aFlexObjects = await FlexObjectManager.getFlexObjects({
|
|
155
|
+
..._omit(mPropertyBag, ["skipUpdateCache", "layer"]),
|
|
156
|
+
invalidateCache: true,
|
|
157
|
+
currentLayer: mPropertyBag.layer,
|
|
158
|
+
includeCtrlVariants: true
|
|
159
|
+
});
|
|
161
160
|
|
|
162
161
|
if (aFlexObjects?.length > 0) {
|
|
163
162
|
await PersistenceWriteAPI.updateResetAndPublishInfo(mPropertyBag);
|
|
@@ -180,6 +179,7 @@ sap.ui.define([
|
|
|
180
179
|
* @ui5-restricted sap.ui.fl, sap.ui.rta
|
|
181
180
|
*/
|
|
182
181
|
PersistenceWriteAPI.updateResetAndPublishInfo = async function(mPropertyBag) {
|
|
182
|
+
const sReference = ManifestUtils.getFlexReferenceForSelector(mPropertyBag.selector);
|
|
183
183
|
const [bHasChanges, bIsPublishAvailable] = await Promise.all([
|
|
184
184
|
hasChanges(mPropertyBag),
|
|
185
185
|
FeaturesAPI.isPublishAvailable()
|
|
@@ -196,7 +196,10 @@ sap.ui.define([
|
|
|
196
196
|
// If the layer is transportable, fetch additional information from the backend
|
|
197
197
|
if (bIsLayerTransportable) {
|
|
198
198
|
try {
|
|
199
|
-
const oResponse = await Storage.getFlexInfo(
|
|
199
|
+
const oResponse = await Storage.getFlexInfo({
|
|
200
|
+
...mPropertyBag,
|
|
201
|
+
reference: sReference
|
|
202
|
+
});
|
|
200
203
|
// default is true, so only set to false if explicitly set to false
|
|
201
204
|
oFlexInfo.allContextsProvided = oResponse.allContextsProvided !== false;
|
|
202
205
|
oFlexInfo.isResetEnabled = oResponse.isResetEnabled;
|
|
@@ -207,7 +210,6 @@ sap.ui.define([
|
|
|
207
210
|
}
|
|
208
211
|
|
|
209
212
|
// Update the Flex Info Session
|
|
210
|
-
const sReference = ManifestUtils.getFlexReferenceForControl(mPropertyBag.selector);
|
|
211
213
|
const oOldFlexInfoSession = FlexInfoSession.getByReference(sReference);
|
|
212
214
|
const oNewFlexInfoSession = {
|
|
213
215
|
...oOldFlexInfoSession,
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
9
|
-
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
10
9
|
"sap/ui/fl/initial/_internal/FlexInfoSession",
|
|
10
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
11
11
|
"sap/ui/fl/initial/_internal/Settings",
|
|
12
12
|
"sap/ui/fl/initial/api/Version",
|
|
13
|
-
"sap/ui/fl/write/_internal/flexState/compVariants/
|
|
13
|
+
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager",
|
|
14
14
|
"sap/ui/fl/write/api/FeaturesAPI",
|
|
15
15
|
"sap/ui/fl/write/api/PersistenceWriteAPI",
|
|
16
16
|
"sap/ui/fl/write/api/VersionsAPI",
|
|
@@ -18,11 +18,11 @@ sap.ui.define([
|
|
|
18
18
|
"sap/ui/fl/LayerUtils"
|
|
19
19
|
], function(
|
|
20
20
|
FlexState,
|
|
21
|
-
ManifestUtils,
|
|
22
21
|
FlexInfoSession,
|
|
22
|
+
ManifestUtils,
|
|
23
23
|
Settings,
|
|
24
24
|
Version,
|
|
25
|
-
|
|
25
|
+
CompVariantManager,
|
|
26
26
|
FeaturesAPI,
|
|
27
27
|
PersistenceWriteAPI,
|
|
28
28
|
VersionsAPI,
|
|
@@ -64,7 +64,7 @@ sap.ui.define([
|
|
|
64
64
|
|
|
65
65
|
function checkSVMControlsForDirty(oReloadInfo) {
|
|
66
66
|
if (LayerUtils.isOverLayer(Layer.USER, oReloadInfo.layer)) {
|
|
67
|
-
return
|
|
67
|
+
return CompVariantManager.checkSVMControlsForDirty((ManifestUtils.getFlexReferenceForControl(oReloadInfo.selector)));
|
|
68
68
|
}
|
|
69
69
|
return false;
|
|
70
70
|
}
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/write/_internal/flexState/compVariants/
|
|
9
|
-
"sap/ui/fl/apply/_internal/flexState/ManifestUtils",
|
|
8
|
+
"sap/ui/fl/write/_internal/flexState/compVariants/CompVariantManager",
|
|
10
9
|
"sap/ui/fl/apply/_internal/flexState/compVariants/Utils",
|
|
11
10
|
"sap/ui/fl/apply/_internal/flexState/FlexState",
|
|
11
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
12
12
|
"sap/ui/fl/Layer"
|
|
13
13
|
], function(
|
|
14
|
-
|
|
15
|
-
ManifestUtils,
|
|
14
|
+
CompVariantManager,
|
|
16
15
|
CompVariantUtils,
|
|
17
16
|
FlexState,
|
|
17
|
+
ManifestUtils,
|
|
18
18
|
Layer
|
|
19
19
|
) {
|
|
20
20
|
"use strict";
|
|
@@ -72,7 +72,7 @@ sap.ui.define([
|
|
|
72
72
|
return Promise.reject("the user is not authorized to edit the PUBLIC variant (no author nor key user)");
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
|
|
76
|
-
return
|
|
75
|
+
CompVariantManager.updateVariant(mPropertyBag);
|
|
76
|
+
return CompVariantManager.persist(mPropertyBag);
|
|
77
77
|
};
|
|
78
78
|
});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
sap.ui.define([
|
|
8
|
-
"sap/ui/fl/
|
|
8
|
+
"sap/ui/fl/initial/_internal/ManifestUtils",
|
|
9
9
|
"sap/ui/fl/initial/_internal/Settings",
|
|
10
10
|
"sap/ui/fl/write/_internal/appVariant/AppVariantFactory",
|
|
11
11
|
"sap/ui/fl/write/_internal/connectors/LrepConnector",
|